diff --git a/arch/ARM/ARMInstPrinter.c b/arch/ARM/ARMInstPrinter.c index 2f4bcdc8..69ff6728 100644 --- a/arch/ARM/ARMInstPrinter.c +++ b/arch/ARM/ARMInstPrinter.c @@ -2251,7 +2251,12 @@ static void printModImmOperand(MCInst *MI, unsigned OpNum, SStream *O) Rotated = rotr32(Bits, Rot); if (getSOImmVal(Rotated) == MCOperand_getImm(Op)) { // #rot has the least possible value - if (Rotated >= 0) { + if (PrintUnsigned) { + if (Rotated > HEX_THRESHOLD || Rotated < -HEX_THRESHOLD) + SStream_concat(O, "#0x%x", Rotated); + else + SStream_concat(O, "#%u", Rotated); + } else if (Rotated >= 0) { if (Rotated > HEX_THRESHOLD) SStream_concat(O, "#0x%x", Rotated); else