diff options
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp | 4 | ||||
-rw-r--r-- | llvm/test/MC/ARM/basic-thumb2-instructions.s | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp index 7fef795b23e..0b3d266db75 100644 --- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp +++ b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp @@ -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; diff --git a/llvm/test/MC/ARM/basic-thumb2-instructions.s b/llvm/test/MC/ARM/basic-thumb2-instructions.s index 98eb7f243fe..978ec8298de 100644 --- a/llvm/test/MC/ARM/basic-thumb2-instructions.s +++ b/llvm/test/MC/ARM/basic-thumb2-instructions.s @@ -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] @------------------------------------------------------------------------------ |