mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
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
This commit is contained in:
@@ -305,3 +305,10 @@ void MipsFrameLowering::emitEpilogue(MachineFunction &MF,
|
|||||||
.addReg(Mips::SP).addImm(NumBytes);
|
.addReg(Mips::SP).addImm(NumBytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MipsFrameLowering::
|
||||||
|
processFunctionBeforeFrameFinalized(MachineFunction &MF) const {
|
||||||
|
const MipsRegisterInfo *RegInfo =
|
||||||
|
static_cast<const MipsRegisterInfo*>(MF.getTarget().getRegisterInfo());
|
||||||
|
RegInfo->processFunctionBeforeFrameFinalized(MF);
|
||||||
|
}
|
||||||
|
@@ -39,6 +39,8 @@ public:
|
|||||||
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
||||||
|
|
||||||
bool hasFP(const MachineFunction &MF) const;
|
bool hasFP(const MachineFunction &MF) const;
|
||||||
|
|
||||||
|
void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
Reference in New Issue
Block a user