diff options
| author | Akira Hatanaka <ahatanaka@mips.com> | 2012-09-17 20:02:42 +0000 |
|---|---|---|
| committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-09-17 20:02:42 +0000 |
| commit | 9068706bb623e3aed4a8ab47009978218fe194fc (patch) | |
| tree | 54bbaecf00ed2c6cd37f60a22402967f87af1bad | |
| parent | ee23ae264b278a4a90ddf397fb2a566a04c91d16 (diff) | |
| download | bcm5719-llvm-9068706bb623e3aed4a8ab47009978218fe194fc.tar.gz bcm5719-llvm-9068706bb623e3aed4a8ab47009978218fe194fc.zip | |
Make sure there is enough room for RA. getStackSize needs to be cleaned up but
we will do that when we implement the full save/restore.
Patch by Reed Kotler.
llvm-svn: 164051
| -rw-r--r-- | llvm/lib/Target/Mips/Mips16FrameLowering.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/Mips16FrameLowering.cpp b/llvm/lib/Target/Mips/Mips16FrameLowering.cpp index 030042f2e83..a671df4bc12 100644 --- a/llvm/lib/Target/Mips/Mips16FrameLowering.cpp +++ b/llvm/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; |

