aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/SPARC/varargs.ll
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-21 21:36:49 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-04-21 21:36:49 +0000
commitddb14ce76cbdf682d95765aa1e576fafeec180ae (patch)
treee695e6730c87900c204e372109aa3128ef2c7d4b /test/CodeGen/SPARC/varargs.ll
parent1e48093df8971ba188d943d71eb7cdb1fb65aa42 (diff)
downloadexternal_llvm-ddb14ce76cbdf682d95765aa1e576fafeec180ae.zip
external_llvm-ddb14ce76cbdf682d95765aa1e576fafeec180ae.tar.gz
external_llvm-ddb14ce76cbdf682d95765aa1e576fafeec180ae.tar.bz2
Passing arguments to varags functions under the SPARC v9 ABI.
Arguments after the fixed arguments never use the floating point registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/SPARC/varargs.ll')
-rw-r--r--test/CodeGen/SPARC/varargs.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/SPARC/varargs.ll b/test/CodeGen/SPARC/varargs.ll
index 2f83294..b13f90e 100644
--- a/test/CodeGen/SPARC/varargs.ll
+++ b/test/CodeGen/SPARC/varargs.ll
@@ -60,3 +60,16 @@ sw.default:
}
declare void @llvm.va_start(i8*)
+
+@.str = private unnamed_addr constant [4 x i8] c"abc\00", align 1
+
+; CHECK: call_1d
+; The fixed-arg double goes in %d2, the second goes in %o2.
+; CHECK: sethi 1048576
+; CHECK: , %o2
+; CHECK: , %f2
+define i32 @call_1d() #0 {
+entry:
+ %call = call double (i8*, double, ...)* @varargsfunc(i8* undef, double 1.000000e+00, double 2.000000e+00)
+ ret i32 1
+}