diff options
author | Reed Kotler <rkotler@mips.com> | 2012-10-31 05:21:10 +0000 |
---|---|---|
committer | Reed Kotler <rkotler@mips.com> | 2012-10-31 05:21:10 +0000 |
commit | 27a7229c475b45bac4928637d0ab5322ab00d3e2 (patch) | |
tree | 1cc52d9b34f1951d677f5c64cd9055f47aed5d32 /llvm/lib/Target/Mips/Mips16FrameLowering.cpp | |
parent | 8cd3b07a51764128c9ab584e540320c23905a259 (diff) | |
download | llvm-27a7229c475b45bac4928637d0ab5322ab00d3e2.zip llvm-27a7229c475b45bac4928637d0ab5322ab00d3e2.tar.gz llvm-27a7229c475b45bac4928637d0ab5322ab00d3e2.tar.bz2 |
Implement ADJCALLSTACKUP and ADJCALLSTACKDOWN
llvm-svn: 167107
Diffstat (limited to 'llvm/lib/Target/Mips/Mips16FrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/Mips16FrameLowering.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/Mips16FrameLowering.cpp b/llvm/lib/Target/Mips/Mips16FrameLowering.cpp index 74cffd2..4e6b21f 100644 --- a/llvm/lib/Target/Mips/Mips16FrameLowering.cpp +++ b/llvm/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:: |