diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-01-18 19:50:18 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-01-18 19:50:18 +0000 |
commit | fb67faa6614c2bf6e5a126ccdc712a64e4263797 (patch) | |
tree | 510b594b9778a43e1b8740159c41b0ed6b2aa585 /lib/Target/Mips | |
parent | 6b9028251cfc5ae93431838dfa6db4750e6b67f4 (diff) | |
download | external_llvm-fb67faa6614c2bf6e5a126ccdc712a64e4263797.zip external_llvm-fb67faa6614c2bf6e5a126ccdc712a64e4263797.tar.gz external_llvm-fb67faa6614c2bf6e5a126ccdc712a64e4263797.tar.bz2 |
Ensure Mips::GP is properly reloaded after a function call. Patch by Sasa Stankovic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r-- | lib/Target/Mips/MipsFrameLowering.cpp | 7 | ||||
-rw-r--r-- | lib/Target/Mips/MipsFrameLowering.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsFrameLowering.cpp b/lib/Target/Mips/MipsFrameLowering.cpp index 711887a..87a097a 100644 --- a/lib/Target/Mips/MipsFrameLowering.cpp +++ b/lib/Target/Mips/MipsFrameLowering.cpp @@ -305,3 +305,10 @@ void MipsFrameLowering::emitEpilogue(MachineFunction &MF, .addReg(Mips::SP).addImm(NumBytes); } } + +void MipsFrameLowering:: +processFunctionBeforeFrameFinalized(MachineFunction &MF) const { + const MipsRegisterInfo *RegInfo = + static_cast<const MipsRegisterInfo*>(MF.getTarget().getRegisterInfo()); + RegInfo->processFunctionBeforeFrameFinalized(MF); +} diff --git a/lib/Target/Mips/MipsFrameLowering.h b/lib/Target/Mips/MipsFrameLowering.h index 15e3843..a8426c1 100644 --- a/lib/Target/Mips/MipsFrameLowering.h +++ b/lib/Target/Mips/MipsFrameLowering.h @@ -39,6 +39,8 @@ public: void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; bool hasFP(const MachineFunction &MF) const; + + void processFunctionBeforeFrameFinalized(MachineFunction &MF) const; }; } // End llvm namespace |