llvm-6502/lib/Target
Chris Lattner 3ffdff6448 Fix a scary bug with signed division by a power of two. We used to generate:
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 :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16761 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-06 04:19:43 +00:00
..
CBackend FreeBSD uses GCC. Patch contributed by Jeff Cohen! 2004-10-06 03:15:44 +00:00
PowerPC Generate better code by being far less clever when it comes to the select instruction. Don't create overlapping register lifetimes 2004-09-29 05:00:31 +00:00
Skeleton
Sparc I think this will handle double args. 2004-09-30 19:44:32 +00:00
SparcV8 I think this will handle double args. 2004-09-30 19:44:32 +00:00
SparcV9 Make EmitMappingInfo into an "external location" option, so that it can be set 2004-09-30 20:20:01 +00:00
X86 Fix a scary bug with signed division by a power of two. We used to generate: 2004-10-06 04:19:43 +00:00
Makefile
MRegisterInfo.cpp
Target.td Add initial support for variants 2004-10-03 19:34:18 +00:00
TargetData.cpp
TargetFrameInfo.cpp
TargetInstrInfo.cpp
TargetMachine.cpp
TargetMachineRegistry.cpp
TargetSchedInfo.cpp