diff options
author | Chris Lattner <sabre@nondot.org> | 2002-12-16 22:29:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-12-16 22:29:06 +0000 |
commit | 4863fe14dedc7346ef916e43c5644b655aee540f (patch) | |
tree | 5349a4dfba65b3be77a453b4ccf859bc25126030 /lib/Target/X86/InstSelectSimple.cpp | |
parent | 1ada06480392243f7c7986434f98e63eeecb216f (diff) |
Make sure stack manipulation refers to ESP the right number of times
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5086 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/InstSelectSimple.cpp')
-rw-r--r-- | lib/Target/X86/InstSelectSimple.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp index dd93142f64..e35867df00 100644 --- a/lib/Target/X86/InstSelectSimple.cpp +++ b/lib/Target/X86/InstSelectSimple.cpp @@ -1092,7 +1092,8 @@ ISel::visitAllocaInst (AllocaInst &I) 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); |