diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-25 09:31:16 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-25 09:31:16 +0000 |
commit | 5e265b29ea1420db59b943bf95a1cb14fa9ca8c5 (patch) | |
tree | 0072484d4bfecf73899a889ab80e1d8a18e40db1 | |
parent | 113296ba51b5077eb06ca190baef37ace01458ad (diff) |
fastcc functions that return double values now return them in xmm0 on x86-32.
This implements CodeGen/X86/fp-stack-ret.ll:test[23]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34592 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index af8abf15fc..ffd24ee80b 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -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; |