x86: another attempt for #456

This commit is contained in:
Nguyen Anh Quynh 2015-08-16 18:43:49 +08:00
parent 0e45cd2904
commit 0dde6707b9
2 changed files with 9 additions and 2 deletions

View File

@ -462,9 +462,13 @@ static void printPCRelImm(MCInst *MI, unsigned OpNo, SStream *O)
}
// CALL/JMP rel16 is special
if (MI->Opcode == X86_CALLpcrel16 || MI->Opcode == X86_JMP_2 || MI->Opcode == X86_JMP_4)
if (MI->Opcode == X86_CALLpcrel16 || MI->Opcode == X86_JMP_2)
imm = imm & 0xffff;
if (MI->csh->mode == CS_MODE_16 && MI->Opcode == X86_JMP_4)
imm = imm & 0xffff;
if (imm < 0) {
SStream_concat(O, "0x%"PRIx64, imm);
} else {

View File

@ -544,7 +544,10 @@ static void printPCRelImm(MCInst *MI, unsigned OpNo, SStream *O)
}
// CALL/JMP rel16 is special
if (MI->Opcode == X86_CALLpcrel16 || MI->Opcode == X86_JMP_2 || MI->Opcode == X86_JMP_4)
if (MI->Opcode == X86_CALLpcrel16 || MI->Opcode == X86_JMP_2)
imm = imm & 0xffff;
if (MI->csh->mode == CS_MODE_16 && MI->Opcode == X86_JMP_4)
imm = imm & 0xffff;
if (imm < 0) {