lib/Target/X86/X86ISelLowering.cpp: Introduce a new variable "IsWin64". No functional changes.

llvm-svn: 124948
This commit is contained in:
NAKAMURA Takumi 2011-02-05 15:11:13 +00:00
parent b1bbdd8d44
commit b21c3db920
1 changed files with 4 additions and 3 deletions

View File

@ -1838,6 +1838,7 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
SmallVectorImpl<SDValue> &InVals) const {
MachineFunction &MF = DAG.getMachineFunction();
bool Is64Bit = Subtarget->is64Bit();
bool IsWin64 = Subtarget->isTargetWin64();
bool IsStructRet = CallIsStructReturn(Outs);
bool IsSibcall = false;
@ -1945,7 +1946,7 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
if (VA.isRegLoc()) {
RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg));
if (isVarArg && Subtarget->isTargetWin64()) {
if (isVarArg && IsWin64) {
// Win64 ABI requires argument XMM reg to be copied to the corresponding
// shadow reg if callee is a varargs function.
unsigned ShadowReg = 0;
@ -2011,7 +2012,7 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
}
}
if (Is64Bit && isVarArg && !Subtarget->isTargetWin64()) {
if (Is64Bit && isVarArg && !IsWin64) {
// From AMD64 ABI document:
// For calls that may call functions that use varargs or stdargs
// (prototype-less calls or calls to functions containing ellipsis (...) in
@ -2186,7 +2187,7 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
Ops.push_back(DAG.getRegister(X86::EBX, getPointerTy()));
// Add an implicit use of AL for non-Windows x86 64-bit vararg functions.
if (Is64Bit && isVarArg && !Subtarget->isTargetWin64())
if (Is64Bit && isVarArg && !IsWin64)
Ops.push_back(DAG.getRegister(X86::AL, MVT::i8));
if (InFlag.getNode())