aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-06-11 06:37:11 +0000
committerChris Lattner <sabre@nondot.org>2004-06-11 06:37:11 +0000
commit7f7bbc2fdb833485ac3d865a405fd948e58e8ddb (patch)
treefd18ea576bb35a3e4209dc7913bc0efce50f7535 /lib/CodeGen/PrologEpilogInserter.cpp
parent9f35196fc22fc807eb5fd6d0e5c58685bf79c056 (diff)
Fix fallout from getOffsetOfLocalArea() being negated. Debugging dumps were being
printed incorrectly, and we were reserving 8 extra bytes of stack space for functions on X86. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14152 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--lib/CodeGen/PrologEpilogInserter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp
index e9a998b873..6157e3fc99 100644
--- a/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/lib/CodeGen/PrologEpilogInserter.cpp
@@ -206,7 +206,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
// of stack growth -- so it's always positive.
int Offset = TFI.getOffsetOfLocalArea();
if (StackGrowsDown)
- Offset = -Offset;
+ Offset = -Offset;
assert(Offset >= 0
&& "Local area offset should be in direction of stack growth");
@@ -256,7 +256,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
Offset = (Offset+StackAlignment-1)/StackAlignment*StackAlignment;
// Set the final value of the stack pointer...
- FFI->setStackSize(Offset-TFI.getOffsetOfLocalArea());
+ FFI->setStackSize(Offset+TFI.getOffsetOfLocalArea());
}