[llvm-commits] CVS: llvm/test/Feature/varargs.ll
Chris Lattner
lattner at cs.uiuc.edu
Wed May 7 22:48:00 PDT 2003
Changes in directory llvm/test/Feature:
varargs.ll updated: 1.1 -> 1.2
---
Log message:
Test the whole range of varargs handling stuff
---
Diffs of the changes:
Index: llvm/test/Feature/varargs.ll
diff -u llvm/test/Feature/varargs.ll:1.1 llvm/test/Feature/varargs.ll:1.2
--- llvm/test/Feature/varargs.ll:1.1 Wed May 7 21:39:37 2003
+++ llvm/test/Feature/varargs.ll Wed May 7 22:46:51 2003
@@ -1,9 +1,21 @@
+; Demonstrate all of the variable argument handling intrinsic functions plus
+; the va_arg instruction.
-
+implementation
+declare void %llvm.va_start(sbyte**, ...)
+declare void %llvm.va_copy(sbyte**, sbyte*)
+declare void %llvm.va_end(sbyte**)
int %test(int %X, ...) {
%ap = alloca sbyte*
- ; This is not a legal testcase, it just shows the syntax for va_arg
+ %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)
+
%tmp = va_arg sbyte** %ap, int
+
+ call void %llvm.va_end(sbyte** %ap)
ret int %tmp
}
More information about the llvm-commits
mailing list