blob: 3bd608ab59383b7e1121d70192dbb6c839f61659 [file] [log] [blame]
Chris Lattner413100f2006-05-17 03:57:31 +00001; Test various forms of calls.
2
Reid Spencerc58ef012007-04-15 21:17:45 +00003; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
Dan Gohman28beeea2007-08-15 13:36:28 +00004; RUN: grep {bl } | count 2
Reid Spencerc58ef012007-04-15 21:17:45 +00005; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
Dan Gohman28beeea2007-08-15 13:36:28 +00006; RUN: grep {bctrl} | count 1
Reid Spencerc58ef012007-04-15 21:17:45 +00007; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
Dan Gohman28beeea2007-08-15 13:36:28 +00008; RUN: grep {bla } | count 1
Chris Lattner413100f2006-05-17 03:57:31 +00009
10declare void %foo()
11
12void %test_direct() {
13 call void %foo()
14 ret void
15}
16
Chris Lattner732baf32006-05-17 04:20:13 +000017void %test_extsym(sbyte *%P) {
18 free sbyte* %P
19 ret void
20}
21
Chris Lattner413100f2006-05-17 03:57:31 +000022void %test_indirect(void()* %fp) {
23 call void %fp()
24 ret void
25}
26
27void %test_abs() {
28 %fp = cast int 400 to void()*
29 call void %fp()
30 ret void
31}