mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-12-13 16:28:03 +00:00
arm: printModImmOperand() should print Imm as unsigned number in some special cases
This commit is contained in:
parent
796f1d4022
commit
e0329ddde3
@ -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…
Reference in New Issue
Block a user