mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
XCore target: Lower EH_RETURN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198615 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -252,6 +252,15 @@ void XCoreFrameLowering::emitEpilogue(MachineFunction &MF,
|
||||
DebugLoc dl = MBBI->getDebugLoc();
|
||||
unsigned RetOpcode = MBBI->getOpcode();
|
||||
|
||||
if (RetOpcode == XCore::EH_RETURN) {
|
||||
unsigned EhStackReg = MBBI->getOperand(0).getReg();
|
||||
unsigned EhHandlerReg = MBBI->getOperand(1).getReg();
|
||||
BuildMI(MBB, MBBI, dl, TII.get(XCore::SETSP_1r)).addReg(EhStackReg);
|
||||
BuildMI(MBB, MBBI, dl, TII.get(XCore::BAU_1r)).addReg(EhHandlerReg);
|
||||
MBB.erase(MBBI); // Erase the previous return instruction.
|
||||
return;
|
||||
}
|
||||
|
||||
// Work out frame sizes.
|
||||
// We will adjust the SP in stages towards the final FrameSize.
|
||||
int RemainingAdj = MFI->getStackSize();
|
||||
|
||||
Reference in New Issue
Block a user