llvm-6502/lib/Target/X86
Chris Lattner 610f1e2785 Codegen signed divides by 2 and -2 more efficiently. In particular
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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16760 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-06 04:02:39 +00:00
..
.cvsignore Tell CVS to ignore all .inc files 2003-08-03 15:50:17 +00:00
Makefile Add support for the -x86-asm-syntax flag, which can be used to choose between 2004-10-03 20:36:57 +00:00
X86.h Add -sse[,2,3] arguments to LLC 2004-08-24 08:18:44 +00:00
X86.td Add support for the -x86-asm-syntax flag, which can be used to choose between 2004-10-03 20:36:57 +00:00
X86AsmPrinter.cpp * Prune #includes 2004-10-04 07:31:08 +00:00
X86CodeEmitter.cpp Fix filename: Printer.cpp has become X86AsmPrinter.cpp 2004-09-12 21:26:04 +00:00
X86FloatingPoint.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
X86InstrBuilder.h Reduce the number of arguments in the instruction builder and make some 2004-08-30 00:13:26 +00:00
X86InstrInfo.cpp Fix a warning 2004-08-01 19:31:30 +00:00
X86InstrInfo.h Remove a bunch of ad-hoc target-specific flags that were only used by the 2004-08-11 07:12:04 +00:00
X86InstrInfo.td Add some new instructions. Fix the asm string for sbb32rr 2004-10-06 04:01:02 +00:00
X86ISelPattern.cpp Disable the pattern isel 2004-08-15 23:02:17 +00:00
X86ISelSimple.cpp Codegen signed divides by 2 and -2 more efficiently. In particular 2004-10-06 04:02:39 +00:00
X86JITInfo.h Clean up a lot of the code I added yesterday by exposing the IntrinsicLowering 2003-12-28 21:23:38 +00:00
X86PeepholeOpt.cpp Add some new instructions. Fix the asm string for sbb32rr 2004-10-06 04:01:02 +00:00
X86RegisterInfo.cpp Add some new instructions. Fix the asm string for sbb32rr 2004-10-06 04:01:02 +00:00
X86RegisterInfo.h Code insertion methods now return void instead of an int. 2004-08-15 22:15:11 +00:00
X86RegisterInfo.td The real x87 floating point registers should not be allocatable. They 2004-09-21 21:22:11 +00:00
X86TargetMachine.cpp Changes For Bug 352 2004-09-01 22:55:40 +00:00
X86TargetMachine.h Auto-registrate target 2004-07-11 02:48:49 +00:00