search for: extrn

Displaying 4 results from an estimated 4 matches for "extrn".

Did you mean: extern
2011 Dec 06
0
[LLVMdev] Implement implicit TLS on Windows - need advice
...add tests. As for the second patch, that's not how MSVC 2010 emits code (and it needs tests). thread_local.c: #ifdef _MSC_VER #define __thread __declspec(thread) #endif __thread int i = 0; int foo() { return i++; } thread_local.asm: PUBLIC _i _TLS SEGMENT _i DD 00H _TLS ENDS PUBLIC _foo EXTRN __tls_array:DWORD EXTRN __tls_index:DWORD ; Function compile flags: /Ogtpy _TEXT SEGMENT _foo PROC ; File c:\users\mspencer\projects\llvm-project\test\thread_local.c ; Line 7 mov eax, DWORD PTR __tls_index mov ecx, DWORD PTR fs:__tls_array mov ecx, DWORD PTR [ecx+eax*4] mov eax, DWORD PTR _i[ec...
2009 Jan 07
3
[LLVMdev] LLVM optmization
...varx = varx + parami + 1 ; ; 22 : vary = varx + nI; ; 23 : } ; 24 : ; 25 : return varx ; ; 26 : } ret 0 _TESTE ENDP _TEXT ENDS PUBLIC ??_C at _0CG@LBAPCNHJ@?6?$CI2?$CJleu?5?$CFld?5threadid?5?$DN?5?5?$CFld?5seqt@ ; `string' PUBLIC __real at 3ff0000000000000 PUBLIC _thread_call EXTRN _printf:PROC EXTRN __imp__GetCurrentThreadId at 0:PROC EXTRN __fltused:DWORD ; COMDAT ??_C at _0CG@LBAPCNHJ@?6?$CI2?$CJleu?5?$CFld?5threadid?5?$DN?5?5?$CFld?5seqt@ CONST SEGMENT ??_C at _0CG@LBAPCNHJ@?6?$CI2?$CJleu?5?$CFld?5threadid?5?$DN?5?5?$CFld?5seqt@ DB 0aH DB '(2)leu %ld threadid = %ld...
2011 Dec 04
3
[LLVMdev] Implement implicit TLS on Windows - need advice
Hi! LLVM currently does not implement the implicit TLS model on Windows. This model is easy: - a thread local variable ends up in the .tls section - to access a thread local variable, you have to do (1) load pointer to thread local storage from TEB On x86_64, this is gs:0x58, on x86 it is fs:0x2C. (2) load pointer to thread local state. In general, the index is stored in variable
2009 Sep 25
2
[LLVMdev] MinGW/MSVC++ uses different ABI for sret
...FI0: movl %esp, %ebp LCFI1: pushl %ebx LCFI2: subl $20, %esp LCFI3: movl 8(%ebp), %ebx movl %ebx, (%esp) call __Z3barv pushl %eax movl %ebx, %eax movl -4(%ebp), %ebx leave ret $4 This is the result of cl -O2 -c -Fa (again, focus on the final `ret') PUBLIC ?foo@@YA?AUS@@XZ ; foo EXTRN ?bar@@YA?AUS@@XZ:PROC ; bar ; Function compile flags: /Ogtpy ; COMDAT ?foo@@YA?AUS@@XZ _TEXT SEGMENT $T2548 = -16 ; size = 16 $T2546 = 8 ; size = 4 ?foo@@YA?AUS@@XZ PROC ; foo, COMDAT ; File c:\dev\exp\bar.cpp ; Line 8 sub esp, 16 ; 00000010H ; Line 9 lea eax, DWORD PTR $T254...