mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-21 05:21:28 +00:00
Add more function call and prototype specific tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@777 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a2f8ba018
commit
49ca7aae44
@ -1,13 +1,28 @@
|
||||
%FunTy = type int(int)
|
||||
|
||||
declare int "test"(...) ; Test differences of prototype
|
||||
declare int "test"() ; Differ only by vararg
|
||||
|
||||
implementation
|
||||
|
||||
; Bytecode gets a constant pool block, that constains:
|
||||
; type plane: int(int)
|
||||
void "invoke"(%FunTy *%x)
|
||||
begin
|
||||
%foo = call %FunTy* %x(int 123)
|
||||
ret void
|
||||
end
|
||||
|
||||
int "main"(int %argc) ; TODO: , sbyte **argv, sbyte **envp)
|
||||
begin
|
||||
%retval = call int (int) *%test(int %argc)
|
||||
%two = add int %retval, %retval
|
||||
ret int %two
|
||||
%retval2 = invoke int %test(int %argc)
|
||||
to label %Next except label %Error
|
||||
Next:
|
||||
%two2 = add int %two, %retval2
|
||||
call void %invoke (%FunTy* %test)
|
||||
ret int %two2
|
||||
Error:
|
||||
ret int -1
|
||||
end
|
||||
|
||||
int "test"(int %i0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user