llvm-6502/lib
Chris Lattner 7203e158da Refactor this code a bit and make it more general. This now compiles:
struct S { unsigned int i : 6, j : 11, k : 15; } b;
void plus2 (unsigned int x) { b.j += x; }

To:

_plus2:
        lis r2, ha16(L_b$non_lazy_ptr)
        lwz r2, lo16(L_b$non_lazy_ptr)(r2)
        lwz r4, 0(r2)
        slwi r3, r3, 6
        add r3, r4, r3
        rlwimi r3, r4, 0, 26, 14
        stw r3, 0(r2)
        blr


instead of:

_plus2:
        lis r2, ha16(L_b$non_lazy_ptr)
        lwz r2, lo16(L_b$non_lazy_ptr)(r2)
        lwz r4, 0(r2)
        rlwinm r5, r4, 26, 21, 31
        add r3, r5, r3
        rlwimi r4, r3, 6, 15, 25
        stw r4, 0(r2)
        blr

by eliminating an 'and'.

I'm pretty sure this is as small as we can go :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23386 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-18 07:22:02 +00:00
..
Analysis Add a new getLoopLatch() method. 2005-09-12 17:03:55 +00:00
Archive Final Changes For PR495: 2005-07-08 03:08:58 +00:00
AsmParser Implement PR614: 2005-08-27 18:50:39 +00:00
Bytecode Culling out use of unions for converting FP to bits and vice versa. 2005-08-17 19:34:49 +00:00
CodeGen More DAG combining. Still need the branch instructions, and select_cc 2005-09-16 00:54:12 +00:00
Debugger For PR495: 2005-07-07 23:21:43 +00:00
ExecutionEngine Add help support for -mcpu and -mattr. 2005-09-02 19:27:43 +00:00
Linker For PR495: 2005-07-07 23:21:43 +00:00
Support Allow bugpoint+PPC codegen to use fsqrt 2005-08-29 13:14:24 +00:00
System For PR616: 2005-08-24 10:07:20 +00:00
Target Implement hook for ppc 2005-09-17 01:03:26 +00:00
Transforms Refactor this code a bit and make it more general. This now compiles: 2005-09-18 07:22:02 +00:00
VMCore add printer support for flag operands 2005-08-25 17:59:23 +00:00
Makefile Add the Linker library 2004-11-14 21:54:41 +00:00