mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
Update test to new style
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9327 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7939597b62
commit
25e6e9949e
@ -2,20 +2,18 @@
|
||||
; the va_arg instruction.
|
||||
|
||||
implementation
|
||||
declare void %llvm.va_start(sbyte**, ...)
|
||||
declare void %llvm.va_copy(sbyte**, sbyte*)
|
||||
declare void %llvm.va_end(sbyte**)
|
||||
declare sbyte* %llvm.va_start()
|
||||
declare sbyte* %llvm.va_copy(sbyte*)
|
||||
declare void %llvm.va_end(sbyte*)
|
||||
|
||||
int %test(int %X, ...) {
|
||||
%ap = alloca sbyte*
|
||||
%aq = alloca sbyte*
|
||||
call void (sbyte**, ...)* %llvm.va_start(sbyte** %ap, int %X)
|
||||
%apv = load sbyte** %ap
|
||||
call void %llvm.va_copy(sbyte** %aq, sbyte* %apv)
|
||||
call void %llvm.va_end(sbyte** %aq)
|
||||
%ap = call sbyte* %llvm.va_start()
|
||||
%aq = call sbyte* %llvm.va_copy(sbyte* %ap)
|
||||
call void %llvm.va_end(sbyte* %aq)
|
||||
|
||||
%tmp = va_arg sbyte** %ap, int
|
||||
%tmp = vaarg sbyte* %ap, int
|
||||
%ap2 = vanext sbyte* %ap, int
|
||||
|
||||
call void %llvm.va_end(sbyte** %ap)
|
||||
call void %llvm.va_end(sbyte* %ap2)
|
||||
ret int %tmp
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user