[llvm-commits] [llvm] r109652 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Wed Jul 28 13:55:39 PDT 2010
Author: stoklund
Date: Wed Jul 28 15:55:38 2010
New Revision: 109652
URL: http://llvm.org/viewvc/llvm-project?rev=109652&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=109652&r1=109651&r2=109652&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jul 28 15:55:38 2010
@@ -1701,7 +1701,10 @@
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;
More information about the llvm-commits
mailing list