Ensure Mips::GP is properly reloaded after a function call. Patch by Sasa Stankovic
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 18 Jan 2011 19:50:18 +0000 (19:50 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 18 Jan 2011 19:50:18 +0000 (19:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123768 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/MipsFrameLowering.cpp
lib/Target/Mips/MipsFrameLowering.h

index 711887abec8a888cbc111bd3ac88fcc3d63202d9..87a097a5d5901f35047ae6f993236e8774e2d3f6 100644 (file)
@@ -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);
+}
index 15e3843416e9a52463318dc37101dfadd1c3b931..a8426c1b70fd8754a95c159a1915b968601d95e0 100644 (file)
@@ -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