forked from OSchip/llvm-project
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. llvm-svn: 49441
This commit is contained in:
parent
cbf87313a2
commit
3d074a3125
llvm/lib/Target/X86
|
@ -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>
|
||||
]>;
|
||||
|
||||
|
|
Loading…
Reference in New Issue