mirror of https://github.com/x64dbg/zydis
Changed type of implicit memory operands to `ZYDIS_MEMOP_TYPE_MEM` instead of `ZYDIS_MEMOP_TYPE_INVALID`
This commit is contained in:
parent
6a8825ead2
commit
c6b3c5d242
|
@ -124,10 +124,20 @@ enum ZydisDecoderModes
|
|||
* This mode is enabled by default.
|
||||
*/
|
||||
ZYDIS_DECODER_MODE_TZCNT,
|
||||
/**
|
||||
* @brief Enables the WBNOINVD mode.
|
||||
*
|
||||
* The `WBINVD` instruction is interpreted as `WBNOINVD` on ICL chips, if a `F3` prefix is
|
||||
* used.
|
||||
*
|
||||
* This mode is disabled by default.
|
||||
*/
|
||||
ZYDIS_DECODER_MODE_WBNOINVD,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
*/
|
||||
ZYDIS_DECODER_MODE_MAX_VALUE = ZYDIS_DECODER_MODE_TZCNT
|
||||
ZYDIS_DECODER_MODE_MAX_VALUE = ZYDIS_DECODER_MODE_WBNOINVD
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
|
|
@ -72,8 +72,7 @@ enum ZydisMemoryOperandTypes
|
|||
ZYDIS_MEMOP_TYPE_AGEN,
|
||||
/**
|
||||
* @brief A memory operand using `SIB` addressing form, where the index register is not used
|
||||
* in address calculation and scale is ignored. No real memory-access is
|
||||
* caused.
|
||||
* in address calculation and scale is ignored. No real memory-access is caused.
|
||||
*/
|
||||
ZYDIS_MEMOP_TYPE_MIB
|
||||
};
|
||||
|
@ -627,6 +626,11 @@ typedef ZydisU8 ZydisMaskMode;
|
|||
enum ZydisMaskModes
|
||||
{
|
||||
ZYDIS_MASK_MODE_INVALID,
|
||||
|
||||
// TODO: Add `ZYDIS_MASK_MODE_DISABLED` for for `EVEX`/`MVEX` instructions with `K0` mask
|
||||
// TODO: Add `ZYDIS_MASK_MODE_CONTROL` and `ZYDIS_MASK_MODE_CONTROL_ZERO` as replacement for
|
||||
// the `isControlMask` field
|
||||
|
||||
/**
|
||||
* @brief The embedded mask register is used as a merge-mask. This is the default mode for
|
||||
* all EVEX/MVEX-instructions.
|
||||
|
|
|
@ -1632,6 +1632,7 @@ static void ZydisDecodeOperandImplicitMemory(ZydisDecoderContext* context,
|
|||
};
|
||||
|
||||
operand->type = ZYDIS_OPERAND_TYPE_MEMORY;
|
||||
operand->mem.type = ZYDIS_MEMOP_TYPE_MEM;
|
||||
|
||||
switch (definition->op.mem.base)
|
||||
{
|
||||
|
@ -4588,7 +4589,8 @@ ZydisStatus ZydisDecoderInit(ZydisDecoder* decoder, ZydisMachineMode machineMode
|
|||
ZYDIS_TRUE , // ZYDIS_DECODER_MODE_MPX
|
||||
ZYDIS_TRUE , // ZYDIS_DECODER_MODE_CET
|
||||
ZYDIS_TRUE , // ZYDIS_DECODER_MODE_LZCNT
|
||||
ZYDIS_TRUE // ZYDIS_DECODER_MODE_TZCNT
|
||||
ZYDIS_TRUE , // ZYDIS_DECODER_MODE_TZCNT
|
||||
ZYDIS_FALSE // ZYDIS_DECODER_MODE_WBNOINVD
|
||||
};
|
||||
|
||||
if (!decoder ||
|
||||
|
@ -4659,8 +4661,6 @@ ZydisStatus ZydisDecoderDecodeBuffer(const ZydisDecoder* decoder, const void* bu
|
|||
ZYDIS_CHECK(ZydisCollectOptionalPrefixes(&context, instruction));
|
||||
ZYDIS_CHECK(ZydisDecodeInstruction(&context, instruction));
|
||||
|
||||
// TODO: More EVEX UD conditions (page 81)
|
||||
|
||||
return ZYDIS_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue