* PIC codegen for X86/Linux has been implemented
[oota-llvm.git] / test / CodeGen / X86 / test-pic-4.ll
1 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic &&
2 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep _GLOBAL_OFFSET_TABLE_ &&
3 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep piclabel | wc -l | grep 3 &&
4 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep PLT | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep "GOT" | wc -l | grep 1 &&
6 ; RUN: llvm-as < %s | llc -mtriple=i686-pc-linux-gnu -relocation-model=pic | grep "GOTOFF" | wc -l | grep 0
7
8 %pfoo = external global void(...)* 
9
10 define void %bar() {
11 entry:
12     %tmp = call void(...)*(...)* %afoo()
13     store void(...)* %tmp, void(...)** %pfoo
14     %tmp1 = load void(...)** %pfoo
15     call void(...)* %tmp1()
16     br label %return
17 return:
18     ret void
19 }
20
21 declare void(...)* %afoo(...)