[llvm-commits] [llvm] r114554 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Bob Wilson bob.wilson at apple.com
Wed Sep 22 10:35:14 PDT 2010


Author: bwilson
Date: Wed Sep 22 12:35:14 2010
New Revision: 114554

URL: http://llvm.org/viewvc/llvm-project?rev=114554&view=rev
Log:
Attempt to fix llvm-gcc build.  It was crashing when building gcov.o for an
ARM cross-compiler on x86, because the MMO size did not match the type size.
This fixes the MMO size and also the size of the stack object to match the
type size.

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=114554&r1=114553&r2=114554&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Sep 22 12:35:14 2010
@@ -6384,7 +6384,8 @@
     // shouldn't be necessary except that RFP cannot be live across
     // multiple blocks. When stackifier is fixed, they can be uncoupled.
     MachineFunction &MF = DAG.getMachineFunction();
-    int SSFI = MF.getFrameInfo()->CreateStackObject(8, 8, false);
+    unsigned SSFISize = Op.getValueType().getSizeInBits()/8;
+    int SSFI = MF.getFrameInfo()->CreateStackObject(SSFISize, SSFISize, false);
     SDValue StackSlot = DAG.getFrameIndex(SSFI, getPointerTy());
     Tys = DAG.getVTList(MVT::Other);
     SDValue Ops[] = {
@@ -6393,7 +6394,7 @@
     MachineMemOperand *MMO =
       DAG.getMachineFunction()
       .getMachineMemOperand(MachinePointerInfo::getFixedStack(SSFI),
-                            MachineMemOperand::MOStore, 8, 8);
+                            MachineMemOperand::MOStore, SSFISize, SSFISize);
     
     Chain = DAG.getMemIntrinsicNode(X86ISD::FST, DL, Tys,
                                     Ops, array_lengthof(Ops),





More information about the llvm-commits mailing list