[llvm-commits] CVS: llvm/lib/Target/X86/InstSelectSimple.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Dec 16 16:30:01 PST 2002


Changes in directory llvm/lib/Target/X86:

InstSelectSimple.cpp updated: 1.72 -> 1.73

---
Log message:

Make sure stack manipulation refers to ESP the right number of times


---
Diffs of the changes:

Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.72 llvm/lib/Target/X86/InstSelectSimple.cpp:1.73
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.72	Mon Dec 16 13:32:50 2002
+++ llvm/lib/Target/X86/InstSelectSimple.cpp	Mon Dec 16 16:29:06 2002
@@ -1092,7 +1092,8 @@
   unsigned int allocatedTypeWords = allocatedTypeSize / 4;
   if (allocatedTypeSize % 4 != 0) { allocatedTypeWords++; }
   // Subtract size from stack pointer, thereby allocating some space.
-  BuildMI (BB, X86::SUBri32, 1, X86::ESP).addZImm (allocatedTypeWords * 4);
+  BuildMI(BB, X86::SUBri32, 2,
+          X86::ESP).addReg(X86::ESP).addZImm(allocatedTypeWords * 4);
   // Put a pointer to the space into the result register, by copying
   // the stack pointer.
   BuildMI (BB, X86::MOVrr32, 1, getReg (I)).addReg (X86::ESP);





More information about the llvm-commits mailing list