mirror of https://github.com/x64dbg/zydis
Fixed detection of bad gather registers in non 64-bit mode
This commit is contained in:
parent
1f1be9fa21
commit
74ef4ac22e
|
@ -4325,7 +4325,14 @@ static ZydisStatus ZydisCheckErrorConditions(ZydisDecoderContext* context,
|
||||||
ZYDIS_ASSERT((constrREG == ZYDIS_REG_CONSTRAINTS_NONE) &&
|
ZYDIS_ASSERT((constrREG == ZYDIS_REG_CONSTRAINTS_NONE) &&
|
||||||
(constrRM == ZYDIS_REG_CONSTRAINTS_VSIB) &&
|
(constrRM == ZYDIS_REG_CONSTRAINTS_VSIB) &&
|
||||||
(constrNDSNDD == ZYDIS_REG_CONSTRAINTS_NONE));
|
(constrNDSNDD == ZYDIS_REG_CONSTRAINTS_NONE));
|
||||||
mask = context->cache.v_vvvv;
|
if (context->decoder->machineMode == ZYDIS_MACHINE_MODE_LONG_64)
|
||||||
|
{
|
||||||
|
mask = context->cache.v_vvvv;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
// Ignore the high-register bits in 16- and 32-bit mode
|
||||||
|
mask = context->cache.v_vvvv & 0x07;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ZYDIS_INSTRUCTION_ENCODING_EVEX:
|
case ZYDIS_INSTRUCTION_ENCODING_EVEX:
|
||||||
case ZYDIS_INSTRUCTION_ENCODING_MVEX:
|
case ZYDIS_INSTRUCTION_ENCODING_MVEX:
|
||||||
|
|
Loading…
Reference in New Issue