We can't return SSE/MMX vectors if SSE is disabled.

llvm-svn: 114745
This commit is contained in:
Dale Johannesen 2010-09-24 19:05:48 +00:00
parent 3843bb9d2c
commit 6a4cd59b08
1 changed files with 5 additions and 3 deletions

View File

@ -1315,9 +1315,11 @@ X86TargetLowering::LowerReturn(SDValue Chain,
SDValue ValToCopy = OutVals[i];
EVT ValVT = ValToCopy.getValueType();
// If this is x86-64, and we disabled SSE, we can't return FP values
if ((ValVT == MVT::f32 || ValVT == MVT::f64) &&
(Subtarget->is64Bit() && !Subtarget->hasSSE1())) {
// If this is x86-64, and we disabled SSE, we can't return FP values,
// or SSE or MMX vectors.
if ((ValVT == MVT::f32 || ValVT == MVT::f64 ||
VA.getLocReg() == X86::XMM0 || VA.getLocReg() == X86::XMM1) &&
(Subtarget->is64Bit() && !Subtarget->hasSSE1())) {
report_fatal_error("SSE register return with SSE disabled");
}
// Likewise we can't return F64 values with SSE1 only. gcc does so, but