[llvm-branch-commits] [llvm-branch] r109655 - /llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp

Daniel Dunbar daniel at zuster.org
Wed Jul 28 14:02:12 PDT 2010


Author: ddunbar
Date: Wed Jul 28 16:02:12 2010
New Revision: 109655

URL: http://llvm.org/viewvc/llvm-project?rev=109655&view=rev
Log:
Merge r109652:
--
Author: Jakob Stoklund Olesen <stoklund at 2pi.dk>
Date:   Wed Jul 28 20:55:38 2010 +0000

    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/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp

Modified: llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp?rev=109655&r1=109654&r2=109655&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp Wed Jul 28 16:02:12 2010
@@ -1638,7 +1638,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-branch-commits mailing list