- Oct 06, 2004
-
-
Chris Lattner authored
the JIT had last night. llvm-svn: 16766
-
Chris Lattner authored
t: mov %EDX, DWORD PTR [%ESP + 4] mov %ECX, 2 mov %EAX, %EDX sar %EDX, 31 idiv %ECX mov %EAX, %EDX ret Generate: t: mov %ECX, DWORD PTR [%ESP + 4] *** mov %EAX, %ECX cdq and %ECX, 1 xor %ECX, %EDX sub %ECX, %EDX *** mov %EAX, %ECX ret Note that the two marked moves are redundant, and should be eliminated by the register allocator, but aren't. Compare this to GCC, which generates: t: mov %eax, DWORD PTR [%esp+4] mov %edx, %eax shr %edx, 31 lea %ecx, [%edx+%eax] and %ecx, -2 sub %eax, %ecx ret or ICC 8.0, which generates: t: movl 4(%esp), %ecx #3.5 movl $-2147483647, %eax #3.25 imull %ecx #3.25 movl %ecx, %eax #3.25 sarl $31, %eax #3.25 addl %ecx, %edx #3.25 subl %edx, %eax #3.25 addl %eax, %eax #3.25 negl %eax #3.25 subl %eax, %ecx #3.25 movl %ecx, %eax #3.25 ret #3.25 We would be in great shape if not for the moves. llvm-svn: 16763
-
Chris Lattner authored
s: ;; X / 4 mov %EAX, DWORD PTR [%ESP + 4] mov %ECX, %EAX sar %ECX, 1 shr %ECX, 30 mov %EDX, %EAX add %EDX, %ECX sar %EAX, 2 ret When we really meant: s: mov %EAX, DWORD PTR [%ESP + 4] mov %ECX, %EAX sar %ECX, 1 shr %ECX, 30 add %EAX, %ECX sar %EAX, 2 ret Hey, this also reduces register pressure too :) llvm-svn: 16761
-
Chris Lattner authored
instead of: s: ;; X / 2 movl 4(%esp), %eax movl %eax, %ecx shrl $31, %ecx movl %eax, %edx addl %ecx, %edx sarl $1, %eax ret t: ;; X / -2 movl 4(%esp), %eax movl %eax, %ecx shrl $31, %ecx movl %eax, %edx addl %ecx, %edx sarl $1, %eax negl %eax ret Emit: s: movl 4(%esp), %eax cmpl $-2147483648, %eax sbbl $-1, %eax sarl $1, %eax ret t: movl 4(%esp), %eax cmpl $-2147483648, %eax sbbl $-1, %eax sarl $1, %eax negl %eax ret llvm-svn: 16760
-
Chris Lattner authored
llvm-svn: 16759
-
- Oct 04, 2004
-
-
Chris Lattner authored
* Update comments * Rearrange code a bit * Finally ELIMINATE the GAS workaround emitter for Intel mode. woot! llvm-svn: 16647
-
Chris Lattner authored
may now choose their output format with the -x86-asm-syntax={intel|att} flag. llvm-svn: 16646
-
Chris Lattner authored
llvm-svn: 16645
-
Chris Lattner authored
old and broken AT&T syntax assemblers. The problem with this hack is that *SOME* forms of the fdiv and fsub instructions have the 'r' bit inverted. This was a real pain to figure out, but is trivially easy to support: thus we are now bug compatible with gas and gcc. llvm-svn: 16644
-
Chris Lattner authored
llvm-svn: 16642
-
Chris Lattner authored
llvm-svn: 16641
-
Chris Lattner authored
llvm-svn: 16640
-
- Oct 03, 2004
-
-
Chris Lattner authored
Intel and AT&T style assembly language. The ultimate goal of this is to eliminate the GasBugWorkaroundEmitter class, but for now AT&T style emission is not fully operational. llvm-svn: 16639
-
Chris Lattner authored
hopefully lead to the death of the 'GasBugWorkaroundEmitter'. This also includes changes to wrap the whole file to 80 columns! Woot! :) Note that the AT&T style output has not been tested at all. llvm-svn: 16638
-
- Sep 21, 2004
-
-
Alkis Evlogimenos authored
are only used by the stackifier when transforming FPn register allocations to the real stack file x87 registers. llvm-svn: 16472
-
Misha Brukman authored
front-end in gcc does not mangle classes in anonymous namespaces correctly. llvm-svn: 16469
-
- Sep 15, 2004
-
-
Reid Spencer authored
Patch contributed by Paolo Invernizzi. Thanks Paolo! llvm-svn: 16368
-
Misha Brukman authored
llvm-svn: 16353
-
- Sep 14, 2004
-
-
Chris Lattner authored
specify aliases directly in register definitions. Patch contributed by Jason Eckhardt! llvm-svn: 16330
-
- Sep 12, 2004
-
-
Misha Brukman authored
llvm-svn: 16299
-
- Sep 08, 2004
-
-
Alkis Evlogimenos authored
FpSETRESULT. llvm-svn: 16247
-
Alkis Evlogimenos authored
value is returned in that register. The pseudo instructions FpGETRESULT and FpSETRESULT shold also have an implicity use and def of ST0 repsecitvely. llvm-svn: 16246
-
- Sep 02, 2004
-
-
Reid Spencer authored
Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
-
- Aug 30, 2004
-
-
Reid Spencer authored
improvements on instruction selection that account for register and frame index bases. Patch contributed by Jeff Cohen. Thanks Jeff! llvm-svn: 16110
-
- Aug 24, 2004
-
-
Chris Lattner authored
llvm-svn: 16018
-
Chris Lattner authored
llvm-svn: 16017
-
- Aug 21, 2004
-
-
Chris Lattner authored
llvm-svn: 15974
-
Chris Lattner authored
llvm-svn: 15973
-
- Aug 18, 2004
-
-
Chris Lattner authored
llvm-svn: 15897
-
- Aug 17, 2004
-
-
Chris Lattner authored
Changes to make this more similar to the ppc asmprinter llvm-svn: 15890
-
Chris Lattner authored
llvm-svn: 15872
-
Chris Lattner authored
drops our half-assed support for cygwin, which noone uses and doesn't work anyway. llvm-svn: 15839
-
- Aug 16, 2004
-
-
Chris Lattner authored
llvm-svn: 15787
-
Chris Lattner authored
llvm-svn: 15780
-
- Aug 15, 2004
-
-
Chris Lattner authored
llvm-svn: 15774
-
Nate Begeman authored
Eliminate MachineFunction& argument from eliminateFrameIndex in x86 Target. Get MachineFunction from MachineInstruction's parent's parent llvm-svn: 15739
-
- Aug 11, 2004
-
-
Chris Lattner authored
old asmprinter. llvm-svn: 15660
-
Chris Lattner authored
llvm-svn: 15659
-
Chris Lattner authored
llvm-svn: 15658
-
Chris Lattner authored
llvm-svn: 15657
-