diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-10-14 10:09:39 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-10-14 10:09:39 +0000 |
commit | 364460156360ad2620df29fa18caab108e481754 (patch) | |
tree | 494c2c64026afa8da9557c4e7f831bcb7bb5c8dc /lib/Target | |
parent | 34729256e8058d4106706e9feb2dfad7893502d1 (diff) | |
download | external_llvm-364460156360ad2620df29fa18caab108e481754.zip external_llvm-364460156360ad2620df29fa18caab108e481754.tar.gz external_llvm-364460156360ad2620df29fa18caab108e481754.tar.bz2 |
Unbreak x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42962 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 12606c3..bac658f 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/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. } |