summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMInstrThumb2.td
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2013-07-31 21:05:30 +0000
committerKevin Enderby <enderby@apple.com>2013-07-31 21:05:30 +0000
commite38070fc32818a6e412dafbb8b3807b413d0819e (patch)
tree1de7b8d724aac6fa8e418f0fe3ba33cc3cb78750 /lib/Target/ARM/ARMInstrThumb2.td
parent6b3f6a744a6d16c5d62dc3477186035e8a74a8e9 (diff)
downloadllvm-e38070fc32818a6e412dafbb8b3807b413d0819e.tar.gz
llvm-e38070fc32818a6e412dafbb8b3807b413d0819e.tar.bz2
llvm-e38070fc32818a6e412dafbb8b3807b413d0819e.tar.xz
Added the B9.3.19 SUBS PC, LR, #imm (Thumb2) system instruction.
While the .td entry is nice and all, it takes a pretty gross hack in ARMAsmParser::ParseInstruction() because of handling of other "subs" instructions to get it to match. Ran it by Jim Grosbach and he said it was about what he expected to make this work given the existing code. rdar://14214063 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187530 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMInstrThumb2.td')
-rw-r--r--lib/Target/ARM/ARMInstrThumb2.td10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMInstrThumb2.td b/lib/Target/ARM/ARMInstrThumb2.td
index 8e5e8c1735..842f3372d0 100644
--- a/lib/Target/ARM/ARMInstrThumb2.td
+++ b/lib/Target/ARM/ARMInstrThumb2.td
@@ -3599,6 +3599,16 @@ def t2RFEIA : T2RFE<0b111010011001,
(outs), (ins GPR:$Rn), NoItinerary, "rfeia", "\t$Rn",
[/* For disassembly only; pattern left blank */]>;
+// B9.3.19 SUBS PC, LR, #imm (Thumb2) system instruction.
+let Defs = [PC], Uses = [LR] in
+def t2SUBS_PC_LR : T2I <(outs), (ins imm0_255:$imm), NoItinerary,
+ "subs", "\tpc, lr, $imm", []>, Requires<[IsThumb2]> {
+ let Inst{31-8} = 0b111100111101111010001111;
+
+ bits<8> imm;
+ let Inst{7-0} = imm;
+}
+
//===----------------------------------------------------------------------===//
// Non-Instruction Patterns
//