From 2c61a019f30281d62f42417cc4d3e3b7ebb85ecd Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Sat, 12 Apr 2014 00:19:42 +0800 Subject: [PATCH] arm: print address Imm without prefix 0x for Imm >= -9 --- arch/ARM/ARMInstPrinter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/ARM/ARMInstPrinter.c b/arch/ARM/ARMInstPrinter.c index ceb726cc98..499a2dff51 100644 --- a/arch/ARM/ARMInstPrinter.c +++ b/arch/ARM/ARMInstPrinter.c @@ -1644,7 +1644,10 @@ static void printAddrModeImm12Operand(MCInst *MI, unsigned OpNum, if (OffImm == INT32_MIN) OffImm = 0; if (isSub) { - SStream_concat(O, ", %s#-0x%x%s", markup("")); + if (OffImm < -HEX_THRESHOLD) + SStream_concat(O, ", %s#-0x%x%s", markup("")); + else + SStream_concat(O, ", %s#-%u%s", markup("")); } else if (AlwaysPrintImm0 || OffImm > 0) { if (OffImm >= 0) { if (OffImm > HEX_THRESHOLD)