2006-05-17 03:57:31 +00:00
|
|
|
; Test various forms of calls.
|
|
|
|
|
2007-04-15 21:17:45 +00:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
|
|
|
|
; RUN: grep {bl } | wc -l | grep 2
|
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
|
|
|
|
; RUN: grep {bctrl} | wc -l | grep 1
|
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=ppc32 | \
|
|
|
|
; RUN: grep {bla } | wc -l | grep 1
|
2006-05-17 03:57:31 +00:00
|
|
|
|
|
|
|
declare void %foo()
|
|
|
|
|
|
|
|
void %test_direct() {
|
|
|
|
call void %foo()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2006-05-17 04:20:13 +00:00
|
|
|
void %test_extsym(sbyte *%P) {
|
|
|
|
free sbyte* %P
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2006-05-17 03:57:31 +00:00
|
|
|
void %test_indirect(void()* %fp) {
|
|
|
|
call void %fp()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
void %test_abs() {
|
|
|
|
%fp = cast int 400 to void()*
|
|
|
|
call void %fp()
|
|
|
|
ret void
|
|
|
|
}
|