mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
ARM: support interrupt attribute
This function-attribute modifies the callee-saved register list and function epilogue (specifically the return instruction) so that a routine is suitable for use as an interrupt-handler of the specified type without disrupting user-mode applications. rdar://problem/14207019 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191766 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -962,6 +962,18 @@ bool ARMExpandPseudo::ExpandMI(MachineBasicBlock &MBB,
|
||||
ExpandMOV32BitImm(MBB, MBBI);
|
||||
return true;
|
||||
|
||||
case ARM::SUBS_PC_LR: {
|
||||
MachineInstrBuilder MIB =
|
||||
BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(ARM::SUBri), ARM::PC)
|
||||
.addReg(ARM::LR)
|
||||
.addOperand(MI.getOperand(0))
|
||||
.addOperand(MI.getOperand(1))
|
||||
.addOperand(MI.getOperand(2))
|
||||
.addReg(ARM::CPSR, RegState::Undef);
|
||||
TransferImpOps(MI, MIB, MIB);
|
||||
MI.eraseFromParent();
|
||||
return true;
|
||||
}
|
||||
case ARM::VLDMQIA: {
|
||||
unsigned NewOpc = ARM::VLDMDIA;
|
||||
MachineInstrBuilder MIB =
|
||||
|
Reference in New Issue
Block a user