fastcc functions that return double values now return them in xmm0 on x86-32.

This implements CodeGen/X86/fp-stack-ret.ll:test[23]

llvm-svn: 34592
This commit is contained in:
Chris Lattner 2007-02-25 09:31:16 +00:00
parent 2b8b520e53
commit fcee9b5568
1 changed files with 3 additions and 1 deletions

View File

@ -434,7 +434,7 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM)
static void GetRetValueLocs(const MVT::ValueType *VTs, unsigned NumVTs,
unsigned *ResultRegs,
const X86Subtarget *Subtarget,
unsigned CallingConv) {
unsigned CC) {
if (NumVTs == 0) return;
if (NumVTs == 2) {
@ -456,6 +456,8 @@ static void GetRetValueLocs(const MVT::ValueType *VTs, unsigned NumVTs,
case MVT::f64:
if (Subtarget->is64Bit())
Reg = X86::XMM0; // FP values in X86-64 go in XMM0.
else if (CC == CallingConv::Fast)
Reg = X86::XMM0; // FP values in X86-32 with fastcc go in XMM0.
else
Reg = X86::ST0; // FP values in X86-32 go in ST0.
break;