In the same spirit of r101524, which removed the assert() from printAddrMode2OffsetOperand(),

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
This commit is contained in:
Johnny Chen 2010-04-16 19:57:21 +00:00
parent 5b13a1a4c3
commit 16fda6982b
3 changed files with 3 additions and 2 deletions

View File

@ -555,7 +555,6 @@ void ARMAsmPrinter::printAddrMode3OffsetOperand(const MachineInstr *MI, int Op,
} }
unsigned ImmOffs = ARM_AM::getAM3Offset(MO2.getImm()); unsigned ImmOffs = ARM_AM::getAM3Offset(MO2.getImm());
assert(ImmOffs && "Malformed indexed load / store!");
O << "#" O << "#"
<< ARM_AM::getAddrOpcStr(ARM_AM::getAM3Op(MO2.getImm())) << ARM_AM::getAddrOpcStr(ARM_AM::getAM3Op(MO2.getImm()))
<< ImmOffs; << ImmOffs;

View File

@ -379,7 +379,6 @@ void ARMInstPrinter::printAddrMode3OffsetOperand(const MCInst *MI,
} }
unsigned ImmOffs = ARM_AM::getAM3Offset(MO2.getImm()); unsigned ImmOffs = ARM_AM::getAM3Offset(MO2.getImm());
assert(ImmOffs && "Malformed indexed load / store!");
O << '#' O << '#'
<< ARM_AM::getAddrOpcStr(ARM_AM::getAM3Op(MO2.getImm())) << ARM_AM::getAddrOpcStr(ARM_AM::getAM3Op(MO2.getImm()))
<< ImmOffs; << ImmOffs;

View File

@ -21,6 +21,9 @@
# CHECK: ldr r0, [r2], #15 # CHECK: ldr r0, [r2], #15
0x0f 0x00 0x92 0xe4 0x0f 0x00 0x92 0xe4
# CHECK: ldrh r0, [r2], #0
0xb0 0x00 0xd2 0xe0
# CHECK: ldrht r0, [r2], #15 # CHECK: ldrht r0, [r2], #15
0xbf 0x00 0xf2 0xe0 0xbf 0x00 0xf2 0xe0