mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Create a fixed stack object for varargs that is as large as any register.
The size of this object isn't used for anything - technically it is of variable size. This avoids a false positive from the assert in X86InstrInfo::loadRegFromStackSlot, and fixes PR7735. llvm-svn: 109652
This commit is contained in:
parent
3f202e65e8
commit
d4c60eed5e
@ -1701,7 +1701,10 @@ X86TargetLowering::LowerFormalArguments(SDValue Chain,
|
||||
if (isVarArg) {
|
||||
if (Is64Bit || (CallConv != CallingConv::X86_FastCall &&
|
||||
CallConv != CallingConv::X86_ThisCall)) {
|
||||
FuncInfo->setVarArgsFrameIndex(MFI->CreateFixedObject(1, StackSize,true));
|
||||
// The fixed varargs object is created large enough that we can load and
|
||||
// store any register in it.
|
||||
FuncInfo->setVarArgsFrameIndex(MFI->CreateFixedObject(32, StackSize,
|
||||
true));
|
||||
}
|
||||
if (Is64Bit) {
|
||||
unsigned TotalNumIntRegs = 0, TotalNumXMMRegs = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user