llvm/lib
Chris Lattner c4769bb529 implement vastart. The dag isel compiles this:
void test3(va_list Y);
void test2(int F, ...) {
  va_list X;
  va_start(X, F);
  test3(X);
}

into this:

test2:
        save -104, %o6, %o6
        st %i5, [%i6+88]
        st %i4, [%i6+84]
        st %i3, [%i6+80]
        st %i2, [%i6+76]
        st %i1, [%i6+72]
        add %i6, 72, %o0
        st %o0, [%i6+-4]
        call test3
        nop
        restore %g0, %g0, %g0
        retl
        nop

The simple isel emits:

test2:
        save -96, %o6, %o6
        st %i0, [%i6+68]
        st %i1, [%i6+72]
        st %i2, [%i6+76]
        st %i3, [%i6+80]
        st %i4, [%i6+84]
        st %i5, [%i6+88]
        or %g0, 1, %l0
        or %g0, 4, %l1
        umul %l0, %l1, %l0
        add %l0, 7, %l0
        and %l0, -8, %l0
        sub %o6, %l0, %o6
        add %o6, 96, %l0
        add %i6, 72, %l1
        st %l1, [%l0]
        ld [%l0], %o0
        call test3
        nop
        restore %g0, %g0, %g0
        retl
        nop


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24985 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 06:24:04 +00:00
..
Analysis Separate the call graph implementation from its interface. This implements 2005-12-22 06:07:52 +00:00
Archive Fix a problem with llvm-ranlib that (on some platforms) caused the archive 2005-11-30 05:21:10 +00:00
AsmParser Regenerate 2005-12-21 18:31:50 +00:00
Bytecode Fix a problem with llvm-ranlib that (on some platforms) caused the archive 2005-11-30 05:21:10 +00:00
CodeGen Simplify store(bitconv(x)) to store(x). This allows us to compile this: 2005-12-23 05:48:07 +00:00
Debugger tell selectiondag when we're debugging 2005-11-16 07:21:47 +00:00
ExecutionEngine Fix a nasty bug that was causing miscompilation of global variables 2005-10-23 23:54:56 +00:00
Linker Adjust the constructor to the Linker class to take an argument that names 2005-12-13 20:00:37 +00:00
Support For PR351: 2005-12-22 03:31:26 +00:00
System For PR351: 2005-12-22 20:00:16 +00:00
Target implement vastart. The dag isel compiles this: 2005-12-23 06:24:04 +00:00
Transforms Fix Transforms/ScalarRepl/2005-12-14-UnionPromoteCrash.ll, a crash on undefined 2005-12-14 17:23:59 +00:00
VMCore Revert previous patch. Additional tests fail. 2005-12-22 21:46:37 +00:00
Makefile Add the Linker library 2004-11-14 21:54:41 +00:00