[llvm-branch-commits] [llvm-branch] r109835 - in /llvm/branches/Apple/williamson/lib/Target/X86: X86ISelLowering.cpp X86ISelLowering.cpp.orig X86InstrInfo.cpp

Daniel Dunbar daniel at zuster.org
Thu Jul 29 18:12:20 PDT 2010


Author: ddunbar
Date: Thu Jul 29 20:12:19 2010
New Revision: 109835

URL: http://llvm.org/viewvc/llvm-project?rev=109835&view=rev
Log:
Merge r109764:
--
Author: Jakob Stoklund Olesen <stoklund at 2pi.dk>
Date:   Thu Jul 29 17:42:27 2010 +0000

    Revert r109652, and remove the offending assert in loadRegFromStackSlot instead.

    We do sometimes load from a too small stack slot when dealing with x86 arguments
    (varargs and smaller-than-32-bit args). It looks like we know what we are doing
    in those cases, so I am going to remove the assert instead of artifically
    enlarging stack slot sizes.

    The assert in storeRegToStackSlot stays in. We don't want to write beyond the
    bounds of a stack slot.

Added:
    llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp.orig
      - copied, changed from r109655, llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp
Modified:
    llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp
    llvm/branches/Apple/williamson/lib/Target/X86/X86InstrInfo.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=109835&r1=109834&r2=109835&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp Thu Jul 29 20:12:19 2010
@@ -1638,10 +1638,7 @@
   if (isVarArg) {
     if (Is64Bit || (CallConv != CallingConv::X86_FastCall &&
                     CallConv != CallingConv::X86_ThisCall)) {
-      // 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));
+      FuncInfo->setVarArgsFrameIndex(MFI->CreateFixedObject(1, StackSize,true));
     }
     if (Is64Bit) {
       unsigned TotalNumIntRegs = 0, TotalNumXMMRegs = 0;

Copied: llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp.orig (from r109655, 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.orig?p2=llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp.orig&p1=llvm/branches/Apple/williamson/lib/Target/X86/X86ISelLowering.cpp&r1=109655&r2=109835&rev=109835&view=diff
==============================================================================
    (empty)

Modified: llvm/branches/Apple/williamson/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/williamson/lib/Target/X86/X86InstrInfo.cpp?rev=109835&r1=109834&r2=109835&view=diff
==============================================================================
--- llvm/branches/Apple/williamson/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/branches/Apple/williamson/lib/Target/X86/X86InstrInfo.cpp Thu Jul 29 20:12:19 2010
@@ -2033,8 +2033,6 @@
                                         const TargetRegisterClass *RC,
                                         const TargetRegisterInfo *TRI) const {
   const MachineFunction &MF = *MBB.getParent();
-  assert(MF.getFrameInfo()->getObjectSize(FrameIdx) >= RC->getSize() &&
-         "Stack slot too small for load");
   bool isAligned = (RI.getStackAlignment() >= 16) || RI.canRealignStack(MF);
   unsigned Opc = getLoadRegOpcode(DestReg, RC, isAligned, TM);
   DebugLoc DL = MBB.findDebugLoc(MI);





More information about the llvm-branch-commits mailing list