Fixed operand-action for EVEX/MVEX instructions with write-mask (again)

This commit is contained in:
flobernd 2017-06-26 00:54:49 +02:00
parent e15279ed1f
commit 99de0f3152
4 changed files with 2726 additions and 2707 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -112,8 +112,9 @@ enum ZydisStatusCode
* @brief An error occured while decoding the MVEX-prefix.
*/
ZYDIS_STATUS_MALFORMED_MVEX, // TODO: Do we need this?
// TODO:
/**
* @brief An invalid write-mask was specified for an EVEX/MVEX instruction.
*/
ZYDIS_STATUS_INVALID_MASK,
/* ------------------------------------------------------------------------------------------ */

View File

@ -1939,8 +1939,16 @@ FinalizeOperand:
info->operands[0].action = ZYDIS_OPERAND_ACTION_READ_CONDWRITE;
break;
case ZYDIS_OPERAND_TYPE_MEMORY:
ZYDIS_ASSERT(info->operands[0].action == ZYDIS_OPERAND_ACTION_WRITE);
info->operands[0].action = ZYDIS_OPERAND_ACTION_CONDWRITE;
switch (info->operands[0].action)
{
case ZYDIS_OPERAND_ACTION_READ:
break;
case ZYDIS_OPERAND_ACTION_WRITE:
info->operands[0].action = ZYDIS_OPERAND_ACTION_CONDWRITE;
break;
default:
ZYDIS_UNREACHABLE;
}
break;
default:
break;