mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
lib/Target/X86/X86ISelLowering.cpp: Introduce a new variable "IsWin64". No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124948 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9c7719e8b6
commit
fb840c9117
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user