[llvm] r184943 - ARM: operands should be explicit when disassembled
Amaury de la Vieuville
amaury.dlv at gmail.com
Wed Jun 26 06:39:07 PDT 2013
Author: amaury.dlv
Date: Wed Jun 26 08:39:07 2013
New Revision: 184943
URL: http://llvm.org/viewvc/llvm-project?rev=184943&view=rev
Log:
ARM: operands should be explicit when disassembled
Modified:
llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
llvm/trunk/test/MC/Disassembler/ARM/thumb2.txt
Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp?rev=184943&r1=184942&r2=184943&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp Wed Jun 26 08:39:07 2013
@@ -1176,19 +1176,14 @@ void ARMInstPrinter::printT2AddrModeImm8
assert(((OffImm & 0x3) == 0) && "Not a valid immediate!");
- // Don't print +0.
- if (OffImm != 0)
- O << ", ";
- if (OffImm != 0 && UseMarkup)
- O << "<imm:";
+ O << ", " << markup("<imm:");
if (OffImm == INT32_MIN)
O << "#-0";
else if (OffImm < 0)
O << "#-" << -OffImm;
- else if (OffImm > 0)
+ else
O << "#" << OffImm;
- if (OffImm != 0 && UseMarkup)
- O << ">";
+ O << markup(">");
}
void ARMInstPrinter::printT2AddrModeSoRegOperand(const MCInst *MI,
Modified: llvm/trunk/test/MC/Disassembler/ARM/thumb2.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/ARM/thumb2.txt?rev=184943&r1=184942&r2=184943&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/ARM/thumb2.txt (original)
+++ llvm/trunk/test/MC/Disassembler/ARM/thumb2.txt Wed Jun 26 08:39:07 2013
@@ -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
More information about the llvm-commits
mailing list