Add XMM1 as a second return value register for f32 and f64 on x86-64. This

is needed for the x86-64-ABI handling of structs that contain floating-point
members that are returned by value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49441 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2008-04-09 17:54:37 +00:00
parent 719e64e8c1
commit c2ffd4b1cb

View File

@ -65,16 +65,16 @@ def RetCC_X86_32_Fast : CallingConv<[
def RetCC_X86_32_SSE : CallingConv<[
// The X86-32 sseregparm calling convention returns FP values in XMM0 if the
// target has SSE2, otherwise it is the C calling convention.
CCIfType<[f32], CCIfSubtarget<"hasSSE2()", CCAssignToReg<[XMM0]>>>,
CCIfType<[f64], CCIfSubtarget<"hasSSE2()", CCAssignToReg<[XMM0]>>>,
CCIfType<[f32], CCIfSubtarget<"hasSSE2()", CCAssignToReg<[XMM0, XMM1]>>>,
CCIfType<[f64], CCIfSubtarget<"hasSSE2()", CCAssignToReg<[XMM0, XMM1]>>>,
CCDelegateTo<RetCC_X86Common>
]>;
// X86-64 C return-value convention.
def RetCC_X86_64_C : CallingConv<[
// The X86-64 calling convention always returns FP values in XMM0.
CCIfType<[f32], CCAssignToReg<[XMM0]>>,
CCIfType<[f64], CCAssignToReg<[XMM0]>>,
CCIfType<[f32], CCAssignToReg<[XMM0, XMM1]>>,
CCIfType<[f64], CCAssignToReg<[XMM0, XMM1]>>,
CCDelegateTo<RetCC_X86Common>
]>;