llvm-6502/lib
Chris Lattner 4053b1e30b Implement Regression/CodeGen/X86/rotate.ll: emit rotate instructions (which
typically cost 1 cycle) instead of shld/shrd instruction (which are typically
6 or more cycles).  This also saves code space.

For example, instead of emitting:

rotr:
        mov %EAX, DWORD PTR [%ESP + 4]
        mov %CL, BYTE PTR [%ESP + 8]
        shrd %EAX, %EAX, %CL
        ret
rotli:
        mov %EAX, DWORD PTR [%ESP + 4]
        shrd %EAX, %EAX, 27
        ret

Emit:

rotr32:
        mov %CL, BYTE PTR [%ESP + 8]
        mov %EAX, DWORD PTR [%ESP + 4]
        ror %EAX, %CL
        ret
rotli32:
        mov %EAX, DWORD PTR [%ESP + 4]
        ror %EAX, 27
        ret

We also emit byte rotate instructions which do not have a sh[lr]d counterpart
at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19692 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-19 08:07:05 +00:00
..
Analysis Silence VC++ warnings. 2005-01-12 04:51:37 +00:00
Archive Remove potential platform portability issue with size of "int". 2004-12-29 01:20:24 +00:00
AsmParser Silence VS warnings. 2005-01-08 20:07:03 +00:00
Bytecode Remove potential platform portability issue with size of "int". 2004-12-29 01:20:24 +00:00
CodeGen Use the TargetInstrInfo::commuteInstruction method to commute instructions 2005-01-19 07:08:42 +00:00
Debugger Correct the comments and file header. 2004-12-23 21:16:46 +00:00
ExecutionEngine Improve compatiblity with HPUX on Itanium, patch by Duraid Madina 2005-01-16 01:31:31 +00:00
Linker Remove un-needed #includes. 2004-12-20 04:15:44 +00:00
Support Use size_t instead of long to represent memory usage. long is 32 bits 2005-01-08 20:15:57 +00:00
System Fix bugpoint 2005-01-16 04:23:22 +00:00
Target Implement Regression/CodeGen/X86/rotate.ll: emit rotate instructions (which 2005-01-19 08:07:05 +00:00
Transforms Delete PHI nodes that are not dead but are locked in a cycle of single 2005-01-17 05:10:15 +00:00
VMCore implement these methods. 2005-01-15 06:52:40 +00:00
Makefile Add the Linker library 2004-11-14 21:54:41 +00:00