diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-11-24 13:18:25 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-11-24 13:18:25 +0000 |
commit | 915558e77559bf76c57031729d244d319fdce3e6 (patch) | |
tree | 1942726abfcbe9fcc8bf01847be4a94231bfd104 /test/CodeGen/PowerPC/available-externally.ll | |
parent | e8ca482c9734a556f3b66d44ba27e23a1d00b1e0 (diff) | |
download | external_llvm-915558e77559bf76c57031729d244d319fdce3e6.zip external_llvm-915558e77559bf76c57031729d244d319fdce3e6.tar.gz external_llvm-915558e77559bf76c57031729d244d319fdce3e6.tar.bz2 |
PPC: MCize most of the darwin PIC emission.
The last remaining bit is "bcl 20, 31, AnonSymbol", which I couldn't find the
instruction definition for. Only whitespace changes in assembly output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168541 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/available-externally.ll')
-rw-r--r-- | test/CodeGen/PowerPC/available-externally.ll | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/test/CodeGen/PowerPC/available-externally.ll b/test/CodeGen/PowerPC/available-externally.ll index fdead7d..abed0de 100644 --- a/test/CodeGen/PowerPC/available-externally.ll +++ b/test/CodeGen/PowerPC/available-externally.ll @@ -1,6 +1,8 @@ ; RUN: llc < %s -relocation-model=static | FileCheck %s -check-prefix=STATIC ; RUN: llc < %s -relocation-model=pic | FileCheck %s -check-prefix=PIC +; RUN: llc < %s -relocation-model=pic -mtriple=powerpc64-apple-darwin8 | FileCheck %s -check-prefix=PIC64 ; RUN: llc < %s -relocation-model=dynamic-no-pic | FileCheck %s -check-prefix=DYNAMIC +; RUN: llc < %s -relocation-model=dynamic-no-pic -mtriple=powerpc64-apple-darwin8 | FileCheck %s -check-prefix=DYNAMIC64 ; PR4482 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" target triple = "powerpc-apple-darwin8" @@ -16,10 +18,18 @@ entry: ; PIC: bl L_exact_log2$stub ; PIC: blr +; PIC64: _foo: +; PIC64: bl L_exact_log2$stub +; PIC64: blr + ; DYNAMIC: _foo: ; DYNAMIC: bl L_exact_log2$stub ; DYNAMIC: blr +; DYNAMIC64: _foo: +; DYNAMIC64: bl L_exact_log2$stub +; DYNAMIC64: blr + %A = call i32 @exact_log2(i64 %x) nounwind ret i32 %A } @@ -34,13 +44,13 @@ entry: ; PIC: L_exact_log2$stub: ; PIC: .indirect_symbol _exact_log2 ; PIC: mflr r0 -; PIC: bcl 20,31,L_exact_log2$stub$tmp +; PIC: bcl 20, 31, L_exact_log2$stub$tmp ; PIC: L_exact_log2$stub$tmp: ; PIC: mflr r11 -; PIC: addis r11,r11,ha16(L_exact_log2$lazy_ptr-L_exact_log2$stub$tmp) +; PIC: addis r11, r11, ha16(L_exact_log2$lazy_ptr-L_exact_log2$stub$tmp) ; PIC: mtlr r0 -; PIC: lwzu r12,lo16(L_exact_log2$lazy_ptr-L_exact_log2$stub$tmp)(r11) +; PIC: lwzu r12, lo16(L_exact_log2$lazy_ptr-L_exact_log2$stub$tmp)(r11) ; PIC: mtctr r12 ; PIC: bctr @@ -51,12 +61,32 @@ entry: ; PIC: .subsections_via_symbols +; PIC64: .section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32 +; PIC64: L_exact_log2$stub: +; PIC64: .indirect_symbol _exact_log2 +; PIC64: mflr r0 +; PIC64: bcl 20, 31, L_exact_log2$stub$tmp + +; PIC64: L_exact_log2$stub$tmp: +; PIC64: mflr r11 +; PIC64: addis r11, r11, ha16(L_exact_log2$lazy_ptr-L_exact_log2$stub$tmp) +; PIC64: mtlr r0 +; PIC64: ldu r12, lo16(L_exact_log2$lazy_ptr-L_exact_log2$stub$tmp)(r11) +; PIC64: mtctr r12 +; PIC64: bctr + +; PIC64: .section __DATA,__la_symbol_ptr,lazy_symbol_pointers +; PIC64: L_exact_log2$lazy_ptr: +; PIC64: .indirect_symbol _exact_log2 +; PIC64: .quad dyld_stub_binding_helper + +; PIC64: .subsections_via_symbols ; DYNAMIC: .section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16 ; DYNAMIC: L_exact_log2$stub: ; DYNAMIC: .indirect_symbol _exact_log2 -; DYNAMIC: lis r11,ha16(L_exact_log2$lazy_ptr) -; DYNAMIC: lwzu r12,lo16(L_exact_log2$lazy_ptr)(r11) +; DYNAMIC: lis r11, ha16(L_exact_log2$lazy_ptr) +; DYNAMIC: lwzu r12, lo16(L_exact_log2$lazy_ptr)(r11) ; DYNAMIC: mtctr r12 ; DYNAMIC: bctr @@ -65,7 +95,15 @@ entry: ; DYNAMIC: .indirect_symbol _exact_log2 ; DYNAMIC: .long dyld_stub_binding_helper - - - - +; DYNAMIC64: .section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16 +; DYNAMIC64: L_exact_log2$stub: +; DYNAMIC64: .indirect_symbol _exact_log2 +; DYNAMIC64: lis r11, ha16(L_exact_log2$lazy_ptr) +; DYNAMIC64: ldu r12, lo16(L_exact_log2$lazy_ptr)(r11) +; DYNAMIC64: mtctr r12 +; DYNAMIC64: bctr + +; DYNAMIC64: .section __DATA,__la_symbol_ptr,lazy_symbol_pointers +; DYNAMIC64: L_exact_log2$lazy_ptr: +; DYNAMIC64: .indirect_symbol _exact_log2 +; DYNAMIC64: .quad dyld_stub_binding_helper |