ARM: fix t2am_imm8_offset operand printing for imm=#-0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183913 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Amaury de la Vieuville 2013-06-13 16:40:51 +00:00
parent 13f17ea6c0
commit 1290ce00a3
2 changed files with 5 additions and 1 deletions

View File

@ -1148,7 +1148,9 @@ void ARMInstPrinter::printT2AddrModeImm8OffsetOperand(const MCInst *MI,
const MCOperand &MO1 = MI->getOperand(OpNum);
int32_t OffImm = (int32_t)MO1.getImm();
O << ", " << markup("<imm:");
if (OffImm < 0)
if (OffImm == INT32_MIN)
O << "#-0";
else if (OffImm < 0)
O << "#-" << -OffImm;
else
O << "#" << OffImm;

View File

@ -2616,6 +2616,7 @@ _func:
strb r9, [r2], #4
strb r3, [sp], #-4
strb r4, [r8, #-0]!
strb r1, [r0], #-0
@ CHECK: strb r5, [r5, #-4] @ encoding: [0x05,0xf8,0x04,0x5c]
@ CHECK: strb.w r5, [r6, #32] @ encoding: [0x86,0xf8,0x20,0x50]
@ -2629,6 +2630,7 @@ _func:
@ CHECK: strb r9, [r2], #4 @ encoding: [0x02,0xf8,0x04,0x9b]
@ CHECK: strb r3, [sp], #-4 @ encoding: [0x0d,0xf8,0x04,0x39]
@ CHECK: strb r4, [r8, #-0]! @ encoding: [0x08,0xf8,0x00,0x4d]
@ CHECK: strb r1, [r0], #-0 @ encoding: [0x00,0xf8,0x00,0x19]
@------------------------------------------------------------------------------