aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86FloatingPoint.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-21 05:57:20 +0000
committerChris Lattner <sabre@nondot.org>2008-03-21 05:57:20 +0000
commit0353526ed11fc308cf34465e4d14a6cadf8cfb62 (patch)
treedf1885649fd0d9969d76a4f24276cf0500334041 /lib/Target/X86/X86FloatingPoint.cpp
parent41dc0fcb68e7ea5d7c043af2a6303adfdad19c72 (diff)
Enable support for returning two long-double values in ST(0)/ST(1).
This allows us to compile fp-stack-2results.ll into: _test: fldz fld1 ret which returns 1 in ST(0) and 0 in ST(1). This is needed for x86-64 _Complex long double. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48632 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86FloatingPoint.cpp')
-rw-r--r--lib/Target/X86/X86FloatingPoint.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/Target/X86/X86FloatingPoint.cpp b/lib/Target/X86/X86FloatingPoint.cpp
index ca965375f2..d9ab1ed415 100644
--- a/lib/Target/X86/X86FloatingPoint.cpp
+++ b/lib/Target/X86/X86FloatingPoint.cpp
@@ -1053,9 +1053,6 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
return;
}
- assert(0 && "TODO: This code should work, but has never been tested."
- "Test it when we have multiple FP return values working");
-
// Otherwise, we are returning two values:
// 2) If returning the same value for both, we only have one thing in the FP
// stack. Consider: RET FP1, FP1
@@ -1083,7 +1080,7 @@ void FPS::handleSpecialFP(MachineBasicBlock::iterator &I) {
/// 4) Finally, FirstFPRegOp must be in ST(0) and SecondFPRegOp must be in
/// ST(1). Just remove both from our understanding of the stack and return.
assert(getStackEntry(0) == FirstFPRegOp && "Unknown regs live");
- assert(getStackEntry(0) == SecondFPRegOp && "Unknown regs live");
+ assert(getStackEntry(1) == SecondFPRegOp && "Unknown regs live");
StackTop = 0;
return;
}