summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-10-14 10:09:39 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-10-14 10:09:39 +0000
commit4099f4f91a542f2989789b2f5bc7cc1768d8c455 (patch)
treec531dfb6e3d21366765b374c0a205c487ab7a60b /llvm/lib
parent8d6da9142c4f05c533fa5c086fd971913bad5a61 (diff)
downloadbcm5719-llvm-4099f4f91a542f2989789b2f5bc7cc1768d8c455.tar.gz
bcm5719-llvm-4099f4f91a542f2989789b2f5bc7cc1768d8c455.zip
Unbreak x86-64.
llvm-svn: 42962
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 12606c3b2d3..bac658f85ec 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -1839,7 +1839,7 @@ X86TargetLowering::LowerX86_64CCCArguments(SDOperand Op, SelectionDAG &DAG) {
ArgValues.push_back(Root);
// Tail call convention (fastcc) needs callee pop.
- if (CC == CallingConv::Fast && PerformTailCallOpt){
+ if (CC == CallingConv::Fast && PerformTailCallOpt) {
BytesToPopOnReturn = StackSize; // Callee pops everything.
BytesCallerReserves = 0;
} else {
@@ -1864,7 +1864,7 @@ X86TargetLowering::LowerX86_64CCCCallTo(SDOperand Op, SelectionDAG &DAG,
// Analyze operands of the call, assigning locations to each operand.
SmallVector<CCValAssign, 16> ArgLocs;
CCState CCInfo(CC, isVarArg, getTargetMachine(), ArgLocs);
- if (CC==CallingConv::Fast)
+ if (CC==CallingConv::Fast && PerformTailCallOpt)
CCInfo.AnalyzeCallOperands(Op.Val, CC_X86_64_TailCall);
else
CCInfo.AnalyzeCallOperands(Op.Val, CC_X86_64_C);
@@ -1982,9 +1982,8 @@ X86TargetLowering::LowerX86_64CCCCallTo(SDOperand Op, SelectionDAG &DAG,
NodeTys, &Ops[0], Ops.size());
InFlag = Chain.getValue(1);
int NumBytesForCalleeToPush = 0;
- if (CC==CallingConv::Fast) {
+ if (CC==CallingConv::Fast && PerformTailCallOpt) {
NumBytesForCalleeToPush = NumBytes; // Callee pops everything
-
} else {
NumBytesForCalleeToPush = 0; // Callee pops nothing.
}
OpenPOWER on IntegriCloud