x86: address-size prefix should override RIP relative address in x64 mode. bug reported by @hlide
This commit is contained in:
parent
656ebc9625
commit
ed6b8c5a96
|
@ -411,9 +411,13 @@ static bool translateRMMemory(MCInst *mcInst, InternalInstruction *insn)
|
|||
return true;
|
||||
}
|
||||
if (insn->mode == MODE_64BIT) {
|
||||
if (insn->prefix3 == 0x67) // address-size prefix overrides RIP relative addressing
|
||||
MCOperand_CreateReg0(mcInst, X86_EIP);
|
||||
else
|
||||
MCOperand_CreateReg0(mcInst, X86_RIP); // Section 2.2.1.6
|
||||
} else
|
||||
} else {
|
||||
MCOperand_CreateReg0(mcInst, 0);
|
||||
}
|
||||
|
||||
indexReg = 0;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue