Displaying 6 results from an estimated 6 matches for "ogtpy".
2009 Jan 07
3
[LLVMdev] LLVM optmization
...ed by Microsoft (R) Optimizing Compiler Version 14.00.50727.762
TITLE C:\msys\1.0\home\mteixeira\testeadvpl.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
_DATA SEGMENT
COMM _tini:DWORD
COMM _tfim:DWORD
_DATA ENDS
PUBLIC _TESTE
; Function compile flags: /Ogtpy
; File c:\msys\1.0\home\mteixeira\testeadvpl.c
; COMDAT _TESTE
_TEXT SEGMENT
_parami$ = 8 ; size = 4
_paraml$ = 12 ; size = 4
_paramd$ = 16 ; size = 8
_TESTE PROC ; COMDAT
; 6 : int varx=0,vary=0;
; 7 : int nI =0;
; 8 : //varx= parami;
; 9 : if( parami >...
2009 Jan 06
2
[LLVMdev] LLVM Optmizer
...rx.1.lcssa = phi i32 [ %varx.110, %entry ], [ %phitmp, %bb5.loopexit ] ; <i32> [#uses=1]
%5 = add i32 %paraml, 5 ; <i32> [#uses=1]
%6 = add i32 %5, %varx.1.lcssa ; <i32> [#uses=1]
ret i32 %6
}
While the MSVC generates the assemble :
PUBLIC _TESTE
; Function compile flags: /Ogtpy
; File c:\msys\1.0\home\mteixeira\testeadvpl.c
; COMDAT _TESTE
_TEXT SEGMENT
_parami$ = 8 ; size = 4
_paraml$ = 12 ; size = 4
_paramd$ = 16 ; size = 8
_TESTE PROC ; COMDAT
; 6 : int varx=0,vary;
; 7 : int nI =0;
; 8 : //varx= parami;
; 9 : if( parami >...
2011 Dec 06
0
[LLVMdev] Implement implicit TLS on Windows - need advice
...e (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[ecx]
lea edx, DWORD PTR [eax+1]
mov DWORD PTR _i[ecx], edx
; Line 8
ret 0...
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
2012 Mar 27
1
[LLVMdev] Compiling integer mod
...7, %edx # imm = 0x38E38E39
movl %ecx, %eax
imull %edx
movl %edx, %eax
shrl $31, %eax
sarl $2, %edx
addl %eax, %edx
imull $18, %edx, %eax
subl %eax, %ecx
movl %ecx, %eax
ret
The visual studio compiler (/O2) instead issues the idiv instruction:
PUBLIC _f
; Function compile flags: /Ogtpy
; COMDAT _f
_TEXT SEGMENT
_n$ = 8 ; size = 4
_f PROC ; COMDAT
; File c:\a.c
; Line 6
mov eax, DWORD PTR _n$[esp-4]
inc eax
cdq
mov ecx, 18 ; 00000012H
idiv ecx
mov eax, edx
; Line 7
ret 0
_f ENDP
_TEXT ENDS
END
2009 Sep 25
2
[LLVMdev] MinGW/MSVC++ uses different ABI for sret
...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 $T2548[esp+16]
push eax
call ?bar@@YA?AUS@@XZ ; bar
mov ecx, DWO...