aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/Mips/Mips16FrameLowering.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/Mips/Mips16FrameLowering.cpp b/lib/Target/Mips/Mips16FrameLowering.cpp
index 030042f2e8..a671df4bc1 100644
--- a/lib/Target/Mips/Mips16FrameLowering.cpp
+++ b/lib/Target/Mips/Mips16FrameLowering.cpp
@@ -35,6 +35,8 @@ void Mips16FrameLowering::emitPrologue(MachineFunction &MF) const {
DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
uint64_t StackSize = MFI->getStackSize();
+ StackSize += 16; // need to allocate space for RA. Clean this up later
+ // when we fix the save/restore instruction. TBD..
// No need to allocate space on the stack.
if (StackSize == 0 && !MFI->adjustsStack()) return;
@@ -52,6 +54,8 @@ void Mips16FrameLowering::emitEpilogue(MachineFunction &MF,
DebugLoc dl = MBBI->getDebugLoc();
uint64_t StackSize = MFI->getStackSize();
+ StackSize += 16; // need to allocate space for RA. Clean this up later
+ // when we fix the save/restore instruction. TBD..
if (!StackSize)
return;