arm: printModImmOperand() should print Imm as unsigned number in some special cases

test2
Nguyen Anh Quynh 10 years ago
parent 796f1d4022
commit e0329ddde3
  1. 7
      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

Loading…
Cancel
Save