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 | a3157b1c9c8cd782b2936daa645fe02ef40e2a33 (patch) | |
tree | 6c997277b266a2ae49169065395503485e010380 /llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp | |
parent | 6f3d11cf0b4e533fae9e1bbd412d67959c9eaf7a (diff) | |
download | bcm5719-llvm-a3157b1c9c8cd782b2936daa645fe02ef40e2a33.tar.gz bcm5719-llvm-a3157b1c9c8cd782b2936daa645fe02ef40e2a33.zip |
Properly generate stack frame
llvm-svn: 75998
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp index 6e8982d94a9..deceb35284a 100644 --- a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp +++ b/llvm/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)) { |