Thumb assembly parsing and encoding for LDRSB and LDRSH.
authorJim Grosbach <grosbach@apple.com>
Fri, 19 Aug 2011 19:17:58 +0000 (19:17 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 19 Aug 2011 19:17:58 +0000 (19:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138061 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrThumb.td
test/MC/ARM/basic-thumb-instructions.s

index edc4660034f615cb45bed94ae685c8a61b902b60..63d8b48734e6d504e688c5df89e4352b9858e14d 100644 (file)
@@ -120,6 +120,7 @@ def t_addrmode_rr : Operand<i32>,
   let EncoderMethod = "getThumbAddrModeRegRegOpValue";
   let PrintMethod = "printThumbAddrModeRROperand";
   let DecoderMethod = "DecodeThumbAddrModeRR";
+  let ParserMatchClass = t_addrmode_rr_asm_operand;
   let MIOperandInfo = (ops tGPR:$base, tGPR:$offsreg);
 }
 
index 591c6c6dd0bef6303ca5525bef38663a5370c597..50554326ca89989eeb7bc0c3471e5de27fc4a801 100644 (file)
@@ -250,3 +250,13 @@ _func:
         ldrh r6, [r2, r6]
 
 @ CHECK: ldrh  r6, [r2, r6]            @ encoding: [0x96,0x5b]
+
+
+@------------------------------------------------------------------------------
+@ LDRSB/LDRSH
+@------------------------------------------------------------------------------
+        ldrsb r6, [r2, r6]
+        ldrsh r3, [r7, r1]
+
+@ CHECK: ldrsb r6, [r2, r6]            @ encoding: [0x96,0x57]
+@ CHECK: ldrsh r3, [r7, r1]            @ encoding: [0x7b,0x5e]