Fix decoding for indexed STRB and LDRB. Fixes <rdar://problem/9926161>.
authorOwen Anderson <resistor@mac.com>
Thu, 11 Aug 2011 20:47:56 +0000 (20:47 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 11 Aug 2011 20:47:56 +0000 (20:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137347 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/Disassembler/ARMDisassembler.cpp
test/MC/Disassembler/ARM/arm-tests.txt

index 8cfb21793e9664209eb10308b495c2ef44c012e5..d2809f0c2c9eb4a8ebc220968c0b0ae0a6e67619 100644 (file)
@@ -941,6 +941,8 @@ static bool DecodeAddrMode2IdxInstruction(llvm::MCInst &Inst, unsigned Insn,
   switch (Inst.getOpcode()) {
     case ARM::STR_POST_IMM:
     case ARM::STR_POST_REG:
+    case ARM::STRB_POST_IMM:
+    case ARM::STRB_POST_REG:
     case ARM::STRTr:
     case ARM::STRTi:
     case ARM::STRBT_POST_REG:
@@ -957,6 +959,8 @@ static bool DecodeAddrMode2IdxInstruction(llvm::MCInst &Inst, unsigned Insn,
   switch (Inst.getOpcode()) {
     case ARM::LDR_POST_IMM:
     case ARM::LDR_POST_REG:
+    case ARM::LDRB_POST_IMM:
+    case ARM::LDRB_POST_REG:
     case ARM::LDR_PRE:
     case ARM::LDRBT_POST_REG:
     case ARM::LDRBT_POST_IMM:
index a6299895f99197a04e957b9654269ca5ca4f7af4..c306a0656b0800915f6f52fcd33a3c926074c126 100644 (file)
 
 # CHECK:        andeq   r0, r0, r0, lsr #32
 0x20 0x00 0x00 0x00
+
+# CHECK: strb  r3, [r2], #1
+0x01 0x30 0xc2 0xe4