1
0
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:
Jakob Stoklund Olesen 2010-07-28 20:55:38 +00:00
parent 3f202e65e8
commit d4c60eed5e

View File

@ -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;