Skip to content

Commit

Permalink
arm: print address Imm without prefix 0x for Imm >= -9
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Apr 11, 2014
1 parent 669e329 commit 2c61a01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/ARM/ARMInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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("<imm:"), -OffImm, markup(">"));
if (OffImm < -HEX_THRESHOLD)
SStream_concat(O, ", %s#-0x%x%s", markup("<imm:"), -OffImm, markup(">"));
else
SStream_concat(O, ", %s#-%u%s", markup("<imm:"), -OffImm, markup(">"));
} else if (AlwaysPrintImm0 || OffImm > 0) {
if (OffImm >= 0) {
if (OffImm > HEX_THRESHOLD)
Expand Down

0 comments on commit 2c61a01

Please sign in to comment.