2004-11-06 23:32:43 +00:00
|
|
|
; RUN: llvm-as -f %s -o %t.bc
|
|
|
|
; RUN: lli %t.bc > /dev/null
|
|
|
|
|
2002-12-03 20:30:03 +00:00
|
|
|
|
2002-12-04 17:15:07 +00:00
|
|
|
declare void %exit(int)
|
2002-12-03 20:30:03 +00:00
|
|
|
|
2002-12-28 20:01:07 +00:00
|
|
|
int %test(sbyte %C, short %S) {
|
2004-11-22 19:50:41 +00:00
|
|
|
%X = cast short %S to ubyte
|
|
|
|
%Y = cast ubyte %X to int
|
|
|
|
ret int %Y
|
2002-12-28 20:01:07 +00:00
|
|
|
}
|
2002-12-13 14:15:20 +00:00
|
|
|
|
|
|
|
void %FP(void(int) * %F) {
|
2002-12-28 20:01:07 +00:00
|
|
|
%X = call int %test(sbyte 123, short 1024)
|
|
|
|
call void %F(int %X)
|
2002-12-13 14:15:20 +00:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2002-12-13 04:43:32 +00:00
|
|
|
int %main() {
|
2002-12-13 14:15:20 +00:00
|
|
|
call void %FP(void(int)* %exit)
|
2002-12-13 04:43:32 +00:00
|
|
|
ret int 1
|
2002-12-03 20:30:03 +00:00
|
|
|
}
|