Load/Store Multiple:
authorJohnny Chen <johnny.chen@apple.com>
Thu, 24 Mar 2011 01:40:42 +0000 (01:40 +0000)
committerJohnny Chen <johnny.chen@apple.com>
Thu, 24 Mar 2011 01:40:42 +0000 (01:40 +0000)
These instructions were changed to not embed the addressing mode within the MC instructions
We also need to update the corresponding assert stmt.  Also add two test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128191 91177308-0d34-0410-b5e6-96231b3b80d8

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

index d92a019c13e96e65c5ef3de1d8e7427286dbcf8a..e000cab815bf69a767721853e4909b94410518e2 100644 (file)
@@ -1235,13 +1235,13 @@ static bool DisassembleStMiscFrm(MCInst &MI, unsigned Opcode, uint32_t insn,
 }
 
 // The algorithm for disassembly of LdStMulFrm is different from others because
-// it explicitly populates the two predicate operands after operand 0 (the base)
-// and operand 1 (the AM4 mode imm).  After operand 3, we need to populate the
-// reglist with each affected register encoded as an MCOperand.
+// it explicitly populates the two predicate operands after the base register.
+// After that, we need to populate the reglist with each affected register
+// encoded as an MCOperand.
 static bool DisassembleLdStMulFrm(MCInst &MI, unsigned Opcode, uint32_t insn,
     unsigned short NumOps, unsigned &NumOpsAdded, BO B) {
 
-  assert(NumOps >= 5 && "LdStMulFrm expects NumOps >= 5");
+  assert(NumOps >= 4 && "LdStMulFrm expects NumOps >= 4");
   NumOpsAdded = 0;
 
   unsigned Base = getRegisterEnum(B, ARM::GPRRegClassID, decodeRn(insn));
index eace5ab7bf47db36a4879b3406936ee076ad4991..93d6a03005b05581aec46699cbcefdd8274c1652 100644 (file)
 
 # CHECK:       strtvc  r5, [r3], r0, lsr #20
 0x30 0x5a 0xa3 0x76
+
+# CHECK:       stmiblo sp, {r0, r4, r8, r11, r12, pc}
+0x11 0x99 0x8d 0x39
+
+# CHECK:       ldmdb   sp, {r0, r4, r8, r11, r12, pc}
+0x11 0x99 0x1d 0xe9