add an external symbol testcase
[oota-llvm.git] / test / CodeGen / PowerPC / calls.ll
1 ; Test various forms of calls.
2
3 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bl ' | wc -l | grep 2 &&
4 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bctrl' | wc -l | grep 1 &&
5 ; RUN: llvm-as < %s | llc -march=ppc32 | grep 'bla ' | wc -l | grep 1
6
7 declare void %foo()
8
9 void %test_direct() {
10         call void %foo()
11         ret void
12 }
13
14 void %test_extsym(sbyte *%P) {
15         free sbyte* %P
16         ret void
17 }
18
19 void %test_indirect(void()* %fp) {
20         call void %fp()
21         ret void
22 }
23
24 void %test_abs() {
25         %fp = cast int 400 to void()*
26         call void %fp()
27         ret void
28 }