summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/Mips16FrameLowering.cpp
diff options
context:
space:
mode:
authorReed Kotler <rkotler@mips.com>2012-10-31 05:21:10 +0000
committerReed Kotler <rkotler@mips.com>2012-10-31 05:21:10 +0000
commit9441125d636dee246acf9cb6c8f264edda92c335 (patch)
tree004c196c6fdd4ed683e045962ae7a82d8cf2776e /lib/Target/Mips/Mips16FrameLowering.cpp
parentb5bc8d00096e794c52dc82fefb31a07ae5a263be (diff)
downloadllvm-9441125d636dee246acf9cb6c8f264edda92c335.tar.gz
llvm-9441125d636dee246acf9cb6c8f264edda92c335.tar.bz2
llvm-9441125d636dee246acf9cb6c8f264edda92c335.tar.xz
Implement ADJCALLSTACKUP and ADJCALLSTACKDOWN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167107 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/Mips16FrameLowering.cpp')
-rw-r--r--lib/Target/Mips/Mips16FrameLowering.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/Mips/Mips16FrameLowering.cpp b/lib/Target/Mips/Mips16FrameLowering.cpp
index 74cffd202c..4e6b21feb5 100644
--- a/lib/Target/Mips/Mips16FrameLowering.cpp
+++ b/lib/Target/Mips/Mips16FrameLowering.cpp
@@ -115,8 +115,10 @@ bool Mips16FrameLowering::restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
bool
Mips16FrameLowering::hasReservedCallFrame(const MachineFunction &MF) const {
- // FIXME: implement.
- return true;
+ const MachineFrameInfo *MFI = MF.getFrameInfo();
+ // Reserve call frame if the size of the maximum call frame fits into 15-bit
+ // immediate field and there are no variable sized objects on the stack.
+ return isInt<15>(MFI->getMaxCallFrameSize()) && !MFI->hasVarSizedObjects();
}
void Mips16FrameLowering::