aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMExpandPseudoInsts.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2013-10-01 14:33:28 +0000
committerTim Northover <tnorthover@apple.com>2013-10-01 14:33:28 +0000
commitbba9390fc6c0d536172c6bb4a9c93db557c1aff4 (patch)
treeaf829f6b393c4a7aa3f847f13d98eddc855c60a4 /lib/Target/ARM/ARMExpandPseudoInsts.cpp
parent6d2158acae7ec731500a36fbb4ae79483ee10969 (diff)
downloadexternal_llvm-bba9390fc6c0d536172c6bb4a9c93db557c1aff4.zip
external_llvm-bba9390fc6c0d536172c6bb4a9c93db557c1aff4.tar.gz
external_llvm-bba9390fc6c0d536172c6bb4a9c93db557c1aff4.tar.bz2
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
Diffstat (limited to 'lib/Target/ARM/ARMExpandPseudoInsts.cpp')
-rw-r--r--lib/Target/ARM/ARMExpandPseudoInsts.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMExpandPseudoInsts.cpp b/lib/Target/ARM/ARMExpandPseudoInsts.cpp
index 2f7f1bf..109135e 100644
--- a/lib/Target/ARM/ARMExpandPseudoInsts.cpp
+++ b/lib/Target/ARM/ARMExpandPseudoInsts.cpp
@@ -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 =