decode: Fix combinations of VEX with legacy prefix
This commit is contained in:
4
decode.c
4
decode.c
@@ -128,10 +128,10 @@ decode_prefixes(const uint8_t* buffer, int len, DecodeMode mode,
|
||||
goto out;
|
||||
|
||||
// VEX + 66/F2/F3/LOCK will #UD.
|
||||
if (prefixes & (PREFIX_REP|PREFIX_REPNZ|PREFIX_OPSZ|PREFIX_LOCK))
|
||||
if (prefixes & (PREFIX_OPSZ|PREFIX_LOCK))
|
||||
return FD_ERR_UD;
|
||||
// VEX + REX will #UD.
|
||||
if (rex_prefix)
|
||||
if (rex_prefix || rep)
|
||||
return FD_ERR_UD;
|
||||
|
||||
prefixes |= PREFIX_VEX;
|
||||
|
||||
Reference in New Issue
Block a user