Fix RIP-relative address decoding
This commit is contained in:
2
decode.c
2
decode.c
@@ -295,6 +295,7 @@ decode_modrm(const uint8_t* buffer, int len, DecodeMode mode, FdInstr* instr,
|
|||||||
// If there was no SIB byte.
|
// If there was no SIB byte.
|
||||||
if (rm != 4)
|
if (rm != 4)
|
||||||
{
|
{
|
||||||
|
instr->idx_reg = FD_REG_NONE;
|
||||||
if (mod == 0 && rm == 5)
|
if (mod == 0 && rm == 5)
|
||||||
{
|
{
|
||||||
#if defined(ARCH_X86_64)
|
#if defined(ARCH_X86_64)
|
||||||
@@ -311,7 +312,6 @@ decode_modrm(const uint8_t* buffer, int len, DecodeMode mode, FdInstr* instr,
|
|||||||
reg_idx += prefixes & PREFIX_REXB ? 8 : 0;
|
reg_idx += prefixes & PREFIX_REXB ? 8 : 0;
|
||||||
#endif
|
#endif
|
||||||
out_o1->reg = reg_idx;
|
out_o1->reg = reg_idx;
|
||||||
instr->idx_reg = FD_REG_NONE;
|
|
||||||
return off;
|
return off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user