From: Bruno Cardoso Lopes Date: Tue, 18 Jan 2011 19:50:18 +0000 (+0000) Subject: Ensure Mips::GP is properly reloaded after a function call. Patch by Sasa Stankovic X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fb67faa6614c2bf6e5a126ccdc712a64e4263797;p=oota-llvm.git 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 --- diff --git a/lib/Target/Mips/MipsFrameLowering.cpp b/lib/Target/Mips/MipsFrameLowering.cpp index 711887abec8..87a097a5d59 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(MF.getTarget().getRegisterInfo()); + RegInfo->processFunctionBeforeFrameFinalized(MF); +} diff --git a/lib/Target/Mips/MipsFrameLowering.h b/lib/Target/Mips/MipsFrameLowering.h index 15e3843416e..a8426c1b70f 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