From 6e0857e0b6b241e8b698417659a5821f15290a63 Mon Sep 17 00:00:00 2001 From: Amaury de la Vieuville Date: Wed, 26 Jun 2013 13:39:07 +0000 Subject: [PATCH] ARM: operands should be explicit when disassembled git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184943 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp | 11 +++-------- test/MC/Disassembler/ARM/thumb2.txt | 4 ++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp index 8734e441978..1797c6c3814 100644 --- a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp +++ b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp @@ -1176,19 +1176,14 @@ void ARMInstPrinter::printT2AddrModeImm8s4OffsetOperand(const MCInst *MI, assert(((OffImm & 0x3) == 0) && "Not a valid immediate!"); - // Don't print +0. - if (OffImm != 0) - O << ", "; - if (OffImm != 0 && UseMarkup) - O << " 0) + else O << "#" << OffImm; - if (OffImm != 0 && UseMarkup) - O << ">"; + O << markup(">"); } void ARMInstPrinter::printT2AddrModeSoRegOperand(const MCInst *MI, diff --git a/test/MC/Disassembler/ARM/thumb2.txt b/test/MC/Disassembler/ARM/thumb2.txt index b2c6fb88fcf..110a4c0530e 100644 --- a/test/MC/Disassembler/ARM/thumb2.txt +++ b/test/MC/Disassembler/ARM/thumb2.txt @@ -683,6 +683,7 @@ # CHECK: ldrd r0, r1, [r2, #-0]! # CHECK: ldrd r0, r1, [r2, #0]! # CHECK: ldrd r0, r1, [r2, #-0] +# CHECK: ldrd r1, r1, [r0], #0 0xd6 0xe9 0x06 0x35 0xf6 0xe9 0x06 0x35 @@ -694,6 +695,7 @@ 0x72 0xe9 0x00 0x01 0xf2 0xe9 0x00 0x01 0x52 0xe9 0x00 0x01 +0xf0 0xe8 0x00 0x11 #------------------------------------------------------------------------------ @@ -1926,6 +1928,7 @@ #------------------------------------------------------------------------------ # STRD (immediate) #------------------------------------------------------------------------------ +# CHECK: strd r1, r1, [r0], #0 # CHECK: strd r6, r3, [r5], #-8 # CHECK: strd r8, r5, [r5], #-0 # CHECK: strd r7, r4, [r5], #-4 @@ -1933,6 +1936,7 @@ # CHECK: strd r0, r1, [r2, #0]! # CHECK: strd r0, r1, [r2, #-0] +0xe0 0xe8 0x00 0x11 0x65 0xe8 0x02 0x63 0x65 0xe8 0x00 0x85 0x65 0xe8 0x01 0x74