SSE varargs arguments are passed in memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46262 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2008-01-22 23:26:53 +00:00
parent 8e1f7ac87d
commit 2cbdd27305
2 changed files with 11 additions and 2 deletions

View File

@ -190,8 +190,8 @@ def CC_X86_32_Common : CallingConv<[
CCIfType<[f80], CCAssignToStack<0, 4>>,
// The first 4 vector arguments are passed in XMM registers.
CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64],
CCAssignToReg<[XMM0, XMM1, XMM2, XMM3]>>,
CCIfNotVarArg<CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64],
CCAssignToReg<[XMM0, XMM1, XMM2, XMM3]>>>,
// Other vectors get 16-byte stack slots that are 16-byte aligned.
CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64], CCAssignToStack<16, 16>>,

View File

@ -0,0 +1,9 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep xmm | grep esp
define i32 @t() nounwind {
entry:
tail call void (i32, ...)* @foo( i32 1, <4 x i32> < i32 10, i32 11, i32 12, i32 13 > ) nounwind
ret i32 0
}
declare void @foo(i32, ...)