Fixed non 64-bit mode mask-register error condition

This commit is contained in:
flobernd 2018-01-27 17:48:20 +01:00
parent 36f9172dad
commit 1f1be9fa21
No known key found for this signature in database
GPG Key ID: 9C3AE0ED4A969F10
1 changed files with 2 additions and 1 deletions

View File

@ -4297,7 +4297,8 @@ static ZydisStatus ZydisCheckErrorConditions(ZydisDecoderContext* context,
}
break;
case ZYDIS_REG_CONSTRAINTS_MASK:
if (context->cache.v_vvvv > 7)
if ((context->decoder->machineMode == ZYDIS_MACHINE_MODE_LONG_64) &&
(context->cache.v_vvvv > 7))
{
return ZYDIS_STATUS_BAD_REGISTER;
}