diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2009-07-16 14:12:36 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2009-07-16 14:12:36 +0000 |
commit | c3a5196133ff15d95bb01510ae2386ba1a528668 (patch) | |
tree | 10bb1233860454f4990113e20ec877eee06a9f59 /lib/Target/SystemZ/SystemZRegisterInfo.cpp | |
parent | 0ba60d96588e8491c0ae0367d152d1c274986793 (diff) | |
download | llvm-c3a5196133ff15d95bb01510ae2386ba1a528668.tar.gz llvm-c3a5196133ff15d95bb01510ae2386ba1a528668.tar.bz2 llvm-c3a5196133ff15d95bb01510ae2386ba1a528668.tar.xz |
Properly generate stack frame
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75998 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ/SystemZRegisterInfo.cpp')
-rw-r--r-- | lib/Target/SystemZ/SystemZRegisterInfo.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/lib/Target/SystemZ/SystemZRegisterInfo.cpp index 6e8982d94a..deceb35284 100644 --- a/lib/Target/SystemZ/SystemZRegisterInfo.cpp +++ b/lib/Target/SystemZ/SystemZRegisterInfo.cpp @@ -193,8 +193,9 @@ void SystemZRegisterInfo::emitPrologue(MachineFunction &MF) const { // Get the number of bytes to allocate from the FrameInfo. // Note that area for callee-saved stuff is already allocated, thus we need to // 'undo' the stack movement. - uint64_t StackSize = - MFI->getStackSize() - SystemZMFI->getCalleeSavedFrameSize(); + uint64_t StackSize = MFI->getStackSize(); + uint64_t NumBytes = StackSize - SystemZMFI->getCalleeSavedFrameSize(); + NumBytes -= TFI.getOffsetOfLocalArea(); // Skip the callee-saved push instructions. while (MBBI != MBB.end() && @@ -205,9 +206,8 @@ void SystemZRegisterInfo::emitPrologue(MachineFunction &MF) const { if (MBBI != MBB.end()) DL = MBBI->getDebugLoc(); - uint64_t NumBytes = StackSize - TFI.getOffsetOfLocalArea(); - - if (NumBytes) // adjust stack pointer: R15 -= numbytes + // adjust stack pointer: R15 -= numbytes + if (StackSize) emitSPUpdate(MBB, MBBI, -(int64_t)NumBytes, TII); if (hasFP(MF)) { |