mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-11-29 00:10:33 +00:00
x86: print immediate of IN/OUT instructions in positive form. this fixes issue #554
This commit is contained in:
parent
ed88b001f8
commit
7fc5bc3b4b
@ -644,6 +644,8 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O)
|
||||
SStream_concat(O, "$0x%"PRIx64, imm);
|
||||
break;
|
||||
|
||||
case X86_INS_IN:
|
||||
case X86_INS_OUT:
|
||||
case X86_INS_INT:
|
||||
// do not print number in negative form
|
||||
imm = imm & 0xff;
|
||||
|
@ -829,6 +829,7 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O)
|
||||
if (opsize == 1) // print 1 byte immediate in positive form
|
||||
imm = imm & 0xff;
|
||||
|
||||
// printf(">>> id = %u\n", MI->flat_insn->id);
|
||||
switch(MI->flat_insn->id) {
|
||||
default:
|
||||
printImm(MI->csh->syntax, O, imm, false);
|
||||
@ -839,6 +840,8 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O)
|
||||
printImm(MI->csh->syntax, O, imm, true);
|
||||
break;
|
||||
|
||||
case X86_INS_IN:
|
||||
case X86_INS_OUT:
|
||||
case X86_INS_INT:
|
||||
// do not print number in negative form
|
||||
imm = imm & 0xff;
|
||||
|
Loading…
Reference in New Issue
Block a user