llvm-6502/lib
Chris Lattner c8af02c403 Improve signed division by power of 2 *dramatically* from this:
div:
        mov %EDX, DWORD PTR [%ESP + 4]
        mov %ECX, 64
        mov %EAX, %EDX
        sar %EDX, 31
        idiv %ECX
        ret

to this:

div:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %ECX, %EAX
        sar %ECX, 5
        shr %ECX, 26
        mov %EDX, %EAX
        add %EDX, %ECX
        sar %EAX, 6
        ret

Note that the intel compiler is currently making this:

div:
        movl      4(%esp), %edx                                 #3.5
        movl      %edx, %eax                                    #4.14
        sarl      $5, %eax                                      #4.14
        shrl      $26, %eax                                     #4.14
        addl      %edx, %eax                                    #4.14
        sarl      $6, %eax                                      #4.14
        ret                                                     #4.14

Which has one less register->register copy.  (hint hint alkis :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13354 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-04 19:33:58 +00:00
..
Analysis Add stub support for reading BBTraces. 2004-05-04 17:11:14 +00:00
Archive Use the true, decoded name of the archive member in getObjectType. 2004-03-31 19:51:00 +00:00
AsmParser Fix a memory leak. We leaked the vector holding the entries in switch tables. 2004-04-17 23:49:15 +00:00
Bytecode Squelch compile-time warning (profile build). 2004-04-28 15:32:09 +00:00
CodeGen Operate on the Machine CFG instead of on the LLVM CFG 2004-05-01 21:24:39 +00:00
Debugger "fix" a nasty race condition 2004-01-14 21:18:03 +00:00
ExecutionEngine Generalize the strlen size_t hack, for the benefit of the other external 2004-05-01 06:42:15 +00:00
Linker Don't use invalid HTML in a doxygen comment. 2004-04-15 15:23:45 +00:00
Support Bugpoint was not correctly capturing stderr! This caused it to "find" bugs 2004-04-16 05:35:58 +00:00
Target Improve signed division by power of 2 *dramatically* from this: 2004-05-04 19:33:58 +00:00
Transforms Do not mark instructions in unreachable sections of the function as live. 2004-05-04 17:00:46 +00:00
VMCore class AssemblyWriter: 2004-04-28 19:24:28 +00:00
Makefile CBackend is no longer here 2004-02-13 23:29:37 +00:00