diff options
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r-- | lib/CodeGen/PrologEpilogInserter.cpp | 4 |
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()); } |