In the same spirit of r101524, which removed the assert() from printAddrMode2OffsetOp...
authorJohnny Chen <johnny.chen@apple.com>
Fri, 16 Apr 2010 19:57:21 +0000 (19:57 +0000)
committerJohnny Chen <johnny.chen@apple.com>
Fri, 16 Apr 2010 19:57:21 +0000 (19:57 +0000)
this patch removes the assert() from printAddrMode3OffsetOperand() and adds a test case.

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

lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
test/MC/Disassembler/arm-tests.txt

index ddd2ba5c8280a7b8b0d6cfaec61aa9320a30b6cb..88e8d98775cb230e9ee11bd86045c07a8ed4f156 100644 (file)
@@ -555,7 +555,6 @@ void ARMAsmPrinter::printAddrMode3OffsetOperand(const MachineInstr *MI, int Op,
   }
 
   unsigned ImmOffs = ARM_AM::getAM3Offset(MO2.getImm());
-  assert(ImmOffs && "Malformed indexed load / store!");
   O << "#"
     << ARM_AM::getAddrOpcStr(ARM_AM::getAM3Op(MO2.getImm()))
     << ImmOffs;
index 845d7bb085dc1abd4bb7f3a9d2e53f8b2b5aa038..bc61a15e7a6fa4cb7bd147373277da143135e02a 100644 (file)
@@ -379,7 +379,6 @@ void ARMInstPrinter::printAddrMode3OffsetOperand(const MCInst *MI,
   }
   
   unsigned ImmOffs = ARM_AM::getAM3Offset(MO2.getImm());
-  assert(ImmOffs && "Malformed indexed load / store!");
   O << '#'
     << ARM_AM::getAddrOpcStr(ARM_AM::getAM3Op(MO2.getImm()))
     << ImmOffs;
index b3417e51c84f477aa09d94e5a9f7674f3d5076c8..a1e229caebf86aa8e67c4e8e2aec5c1652c6888c 100644 (file)
@@ -21,6 +21,9 @@
 # CHECK:       ldr     r0, [r2], #15
 0x0f 0x00 0x92 0xe4
 
+# CHECK:       ldrh    r0, [r2], #0
+0xb0 0x00 0xd2 0xe0
+
 # CHECK:       ldrht   r0, [r2], #15
 0xbf 0x00 0xf2 0xe0