mirror of https://github.com/x64dbg/zydis
Implemented decoder-modes to support ISA-extensions that conflict with existing instructions
- Added decoder-modes - `ZYDIS_DECODER_MODE_MINIMAL` - `ZYDIS_DECODER_MODE_AMD_BRANCHES` - `ZYDIS_DECODER_MODE_MPX` - `ZYDIS_DECODER_MODE_CET` - `ZYDIS_DECODER_MODE_LZCNT` - `ZYDIS_DECODER_MODE_TZCNT` - Removed `ZydisDecoderInitEx` and the possibility to pass a decoder-granularity (use `ZYDIS_DECODER_MODE_MINIMAL` instead)
This commit is contained in:
parent
5ed561a0fc
commit
57f7ff8bcd
|
@ -39,10 +39,11 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <Zydis/Zydis.h>
|
#include <Zydis/Zydis.h>
|
||||||
|
|
||||||
typedef struct ZydisFuzzControlBlock_ {
|
typedef struct ZydisFuzzControlBlock_
|
||||||
|
{
|
||||||
ZydisMachineMode machineMode;
|
ZydisMachineMode machineMode;
|
||||||
ZydisAddressWidth addressWidth;
|
ZydisAddressWidth addressWidth;
|
||||||
ZydisDecodeGranularity granularity;
|
ZydisBool decoderMode[ZYDIS_DECODER_MODE_MAX_VALUE + 1];
|
||||||
ZydisFormatterStyle formatterStyle;
|
ZydisFormatterStyle formatterStyle;
|
||||||
ZydisFormatterFlags formatterFlags;
|
ZydisFormatterFlags formatterFlags;
|
||||||
ZydisFormatterAddressFormat formatterAddrFormat;
|
ZydisFormatterAddressFormat formatterAddrFormat;
|
||||||
|
@ -70,12 +71,21 @@ int main()
|
||||||
}
|
}
|
||||||
|
|
||||||
ZydisDecoder decoder;
|
ZydisDecoder decoder;
|
||||||
if (!ZYDIS_SUCCESS(ZydisDecoderInitEx(&decoder, controlBlock.machineMode,
|
if (!ZYDIS_SUCCESS(
|
||||||
controlBlock.addressWidth, controlBlock.granularity)))
|
ZydisDecoderInit(&decoder, controlBlock.machineMode, controlBlock.addressWidth)))
|
||||||
{
|
{
|
||||||
fputs("Failed to initialize decoder\n", stderr);
|
fputs("Failed to initialize decoder\n", stderr);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
for (ZydisDecoderMode mode = 1; mode <= ZYDIS_DECODER_MODE_MAX_VALUE; ++mode)
|
||||||
|
{
|
||||||
|
if (!ZYDIS_SUCCESS(
|
||||||
|
ZydisDecoderEnableMode(&decoder, mode, controlBlock.decoderMode[mode] ? 1 : 0)))
|
||||||
|
{
|
||||||
|
fputs("Failed to adjust decoder-mode\n", stderr);
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ZydisFormatter formatter;
|
ZydisFormatter formatter;
|
||||||
if (!ZYDIS_SUCCESS(ZydisFormatterInitEx(&formatter, controlBlock.formatterStyle,
|
if (!ZYDIS_SUCCESS(ZydisFormatterInitEx(&formatter, controlBlock.formatterStyle,
|
||||||
|
|
|
@ -152,16 +152,21 @@ void adjustProcessAndThreadPriority()
|
||||||
/* Internal functions */
|
/* Internal functions */
|
||||||
/* ============================================================================================== */
|
/* ============================================================================================== */
|
||||||
|
|
||||||
uint64_t processBuffer(const char* buffer, size_t length, ZydisDecodeGranularity granularity,
|
uint64_t processBuffer(const char* buffer, size_t length, ZydisBool minimalMode, ZydisBool format)
|
||||||
ZydisBool format)
|
|
||||||
{
|
{
|
||||||
ZydisDecoder decoder;
|
ZydisDecoder decoder;
|
||||||
if (!ZYDIS_SUCCESS(ZydisDecoderInitEx(&decoder,
|
if (!ZYDIS_SUCCESS(
|
||||||
ZYDIS_MACHINE_MODE_LONG_64, ZYDIS_ADDRESS_WIDTH_64, granularity)))
|
ZydisDecoderInit(&decoder, ZYDIS_MACHINE_MODE_LONG_64, ZYDIS_ADDRESS_WIDTH_64)))
|
||||||
{
|
{
|
||||||
fputs("Failed to initialize decoder\n", stderr);
|
fputs("Failed to initialize decoder\n", stderr);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
if (!ZYDIS_SUCCESS(
|
||||||
|
ZydisDecoderEnableMode(&decoder, ZYDIS_DECODER_MODE_MINIMAL, minimalMode)))
|
||||||
|
{
|
||||||
|
fputs("Failed to adjust decoder-mode\n", stderr);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
ZydisFormatter formatter;
|
ZydisFormatter formatter;
|
||||||
if (format)
|
if (format)
|
||||||
|
@ -202,21 +207,20 @@ uint64_t processBuffer(const char* buffer, size_t length, ZydisDecodeGranularity
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
void testPerformance(const char* buffer, size_t length, ZydisDecodeGranularity granularity,
|
void testPerformance(const char* buffer, size_t length, ZydisBool minimalMode, ZydisBool format)
|
||||||
ZydisBool format)
|
|
||||||
{
|
{
|
||||||
// Cache warmup
|
// Cache warmup
|
||||||
processBuffer(buffer, length, granularity, format);
|
processBuffer(buffer, length, minimalMode, format);
|
||||||
|
|
||||||
// Testing
|
// Testing
|
||||||
uint64_t count = 0;
|
uint64_t count = 0;
|
||||||
StartCounter();
|
StartCounter();
|
||||||
for (uint8_t j = 0; j < 100; ++j)
|
for (uint8_t j = 0; j < 100; ++j)
|
||||||
{
|
{
|
||||||
count += processBuffer(buffer, length, granularity, format);
|
count += processBuffer(buffer, length, minimalMode, format);
|
||||||
}
|
}
|
||||||
printf("Granularity %d, Formatting %d, Instructions: %6.2fM, Time: %8.2f msec\n",
|
printf("Minimal-Mode %d, Formatting %d, Instructions: %6.2fM, Time: %8.2f msec\n",
|
||||||
granularity, format, (double)count / 1000000, GetCounter());
|
minimalMode, format, (double)count / 1000000, GetCounter());
|
||||||
}
|
}
|
||||||
|
|
||||||
void generateTestData(FILE* file, uint8_t encoding)
|
void generateTestData(FILE* file, uint8_t encoding)
|
||||||
|
@ -401,9 +405,9 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Testing %s ...\n", tests[i].encoding);
|
printf("Testing %s ...\n", tests[i].encoding);
|
||||||
testPerformance(buffer, length, ZYDIS_DECODE_GRANULARITY_MINIMAL, ZYDIS_FALSE);
|
testPerformance(buffer, length, ZYDIS_TRUE , ZYDIS_FALSE);
|
||||||
testPerformance(buffer, length, ZYDIS_DECODE_GRANULARITY_FULL , ZYDIS_FALSE);
|
testPerformance(buffer, length, ZYDIS_FALSE, ZYDIS_FALSE);
|
||||||
testPerformance(buffer, length, ZYDIS_DECODE_GRANULARITY_FULL , ZYDIS_TRUE );
|
testPerformance(buffer, length, ZYDIS_FALSE, ZYDIS_TRUE );
|
||||||
puts("");
|
puts("");
|
||||||
|
|
||||||
NextFile1:
|
NextFile1:
|
||||||
|
|
|
@ -45,22 +45,23 @@ extern "C" {
|
||||||
/* Enums and types */
|
/* Enums and types */
|
||||||
/* ============================================================================================== */
|
/* ============================================================================================== */
|
||||||
|
|
||||||
/**
|
/* ---------------------------------------------------------------------------------------------- */
|
||||||
* @brief Defines the @c ZydisDecodeGranularity datatype.
|
/* Decoder mode */
|
||||||
*/
|
/* ---------------------------------------------------------------------------------------------- */
|
||||||
typedef uint8_t ZydisDecodeGranularity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Decoder modes defining how granular the instruction should be decoded.
|
* @brief Defines the @c ZydisDecoderMode datatype.
|
||||||
*/
|
*/
|
||||||
enum ZydisDecodeGranularities
|
typedef uint8_t ZydisDecoderMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Values that represent decoder-modes.
|
||||||
|
*/
|
||||||
|
enum ZydisDecoderModes
|
||||||
{
|
{
|
||||||
|
ZYDIS_DECODER_MODE_INVALID,
|
||||||
/**
|
/**
|
||||||
* @brief Defaults to `ZYDIS_DECODE_GRANULARITY_FULL`.
|
* @brief Enables minimal instruction decoding without semantic analysis.
|
||||||
*/
|
|
||||||
ZYDIS_DECODE_GRANULARITY_DEFAULT,
|
|
||||||
/**
|
|
||||||
* @brief Minimal instruction decoding without semantic analysis.
|
|
||||||
*
|
*
|
||||||
* This mode provides access to the mnemonic, the instruction-length, the effective
|
* This mode provides access to the mnemonic, the instruction-length, the effective
|
||||||
* operand-size, the effective address-width, some attributes (e.g. `ZYDIS_ATTRIB_IS_RELATIVE`)
|
* operand-size, the effective address-width, some attributes (e.g. `ZYDIS_ATTRIB_IS_RELATIVE`)
|
||||||
|
@ -69,17 +70,58 @@ enum ZydisDecodeGranularities
|
||||||
* Operands, most attributes and other specific information (like AVX info) are not
|
* Operands, most attributes and other specific information (like AVX info) are not
|
||||||
* accessible in this mode.
|
* accessible in this mode.
|
||||||
*/
|
*/
|
||||||
ZYDIS_DECODE_GRANULARITY_MINIMAL,
|
ZYDIS_DECODER_MODE_MINIMAL,
|
||||||
/**
|
/**
|
||||||
* @brief Full physical and semantic instruction-decoding.
|
* @brief Enables the AMD-branch mode.
|
||||||
|
*
|
||||||
|
* Intel ignores the operand-size override-prefix (`0x66`) for all branches with 32-bit
|
||||||
|
* immediates and forces the operand-size of the instruction to 64-bit in 64-bit mode.
|
||||||
|
* In AMD-branch mode `0x66` is not ignored and changes the operand-size and the size of the
|
||||||
|
* immediate to 16-bit.
|
||||||
*/
|
*/
|
||||||
ZYDIS_DECODE_GRANULARITY_FULL,
|
ZYDIS_DECODER_MODE_AMD_BRANCHES,
|
||||||
|
/**
|
||||||
|
* @brief Enables the MPX mode.
|
||||||
|
*
|
||||||
|
* The MPX isa-extension reuses (overrides) some of the widenop instruction opcodes.
|
||||||
|
*
|
||||||
|
* This mode is enabled by default.
|
||||||
|
*/
|
||||||
|
ZYDIS_DECODER_MODE_MPX,
|
||||||
|
/**
|
||||||
|
* @brief Enables the CET mode.
|
||||||
|
*
|
||||||
|
* The CET isa-extension reuses (overrides) some of the widenop instruction opcodes.
|
||||||
|
*
|
||||||
|
* This mode is enabled by default.
|
||||||
|
*/
|
||||||
|
ZYDIS_DECODER_MODE_CET,
|
||||||
|
/**
|
||||||
|
* @brief Enables the LZCNT mode.
|
||||||
|
*
|
||||||
|
* The LZCNT isa-extension reuses (overrides) some of the widenop instruction opcodes.
|
||||||
|
*
|
||||||
|
* This mode is enabled by default.
|
||||||
|
*/
|
||||||
|
ZYDIS_DECODER_MODE_LZCNT,
|
||||||
|
/**
|
||||||
|
* @brief Enables the TZCNT mode.
|
||||||
|
*
|
||||||
|
* The TZCNT isa-extension reuses (overrides) some of the widenop instruction opcodes.
|
||||||
|
*
|
||||||
|
* This mode is enabled by default.
|
||||||
|
*/
|
||||||
|
ZYDIS_DECODER_MODE_TZCNT,
|
||||||
/**
|
/**
|
||||||
* @brief Maximum value of this enum.
|
* @brief Maximum value of this enum.
|
||||||
*/
|
*/
|
||||||
ZYDIS_DECODE_GRANULARITY_MAX_VALUE = ZYDIS_DECODE_GRANULARITY_FULL,
|
ZYDIS_DECODER_MODE_MAX_VALUE = ZYDIS_DECODER_MODE_TZCNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* ---------------------------------------------------------------------------------------------- */
|
||||||
|
/* Decoder struct */
|
||||||
|
/* ---------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Defines the @c ZydisDecoder struct.
|
* @brief Defines the @c ZydisDecoder struct.
|
||||||
*/
|
*/
|
||||||
|
@ -87,7 +129,7 @@ typedef struct ZydisDecoder_
|
||||||
{
|
{
|
||||||
ZydisMachineMode machineMode;
|
ZydisMachineMode machineMode;
|
||||||
ZydisAddressWidth addressWidth;
|
ZydisAddressWidth addressWidth;
|
||||||
ZydisDecodeGranularity granularity;
|
ZydisBool decoderMode[ZYDIS_DECODER_MODE_MAX_VALUE + 1];
|
||||||
} ZydisDecoder;
|
} ZydisDecoder;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------- */
|
||||||
|
@ -109,17 +151,16 @@ ZYDIS_EXPORT ZydisStatus ZydisDecoderInit(ZydisDecoder* decoder, ZydisMachineMod
|
||||||
ZydisAddressWidth addressWidth);
|
ZydisAddressWidth addressWidth);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Initializes the given @c ZydisDecoder instance.
|
* @brief Enables or disables the specified decoder-mode.
|
||||||
*
|
*
|
||||||
* @param decoder A pointer to the @c ZydisDecoder instance.
|
* @param decoder A pointer to the @c ZydisDecoder instance.
|
||||||
* @param machineMode The machine mode.
|
* @param mode The decoder mode.
|
||||||
* @param addressWidth The address width.
|
* @param enabled `ZYDIS_TRUE` to enable, or `ZYDIS_FALSE` to disable the specified decoder-mode.
|
||||||
* @param granularity The decode granularity.
|
|
||||||
*
|
*
|
||||||
* @return A zydis status code.
|
* @return A zydis status code.
|
||||||
*/
|
*/
|
||||||
ZYDIS_EXPORT ZydisStatus ZydisDecoderInitEx(ZydisDecoder* decoder, ZydisMachineMode machineMode,
|
ZYDIS_EXPORT ZydisStatus ZydisDecoderEnableMode(ZydisDecoder* decoder, ZydisDecoderMode mode,
|
||||||
ZydisAddressWidth addressWidth, ZydisDecodeGranularity granularity);
|
ZydisBool enabled);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Decodes the instruction in the given input @c buffer.
|
* @brief Decodes the instruction in the given input @c buffer.
|
||||||
|
|
|
@ -2107,7 +2107,8 @@ static void ZydisSetAttributes(ZydisDecoderContext* context, ZydisDecodedInstruc
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (instruction->attributes & ZYDIS_ATTRIB_ACCEPTS_BOUND)
|
if (context->decoder->decoderMode[ZYDIS_DECODER_MODE_MPX] &&
|
||||||
|
instruction->attributes & ZYDIS_ATTRIB_ACCEPTS_BOUND)
|
||||||
{
|
{
|
||||||
instruction->attributes |= ZYDIS_ATTRIB_HAS_BOUND;
|
instruction->attributes |= ZYDIS_ATTRIB_HAS_BOUND;
|
||||||
break;
|
break;
|
||||||
|
@ -4298,12 +4299,20 @@ static ZydisStatus ZydisDecodeInstruction(ZydisDecoderContext* context,
|
||||||
case ZYDIS_NODETYPE_FILTER_MVEX_E:
|
case ZYDIS_NODETYPE_FILTER_MVEX_E:
|
||||||
status = ZydisNodeHandlerMvexE(instruction, &index);
|
status = ZydisNodeHandlerMvexE(instruction, &index);
|
||||||
break;
|
break;
|
||||||
case ZYDIS_NODETYPE_FILTER_FEATURE_MPX:
|
case ZYDIS_NODETYPE_FILTER_MODE_AMD:
|
||||||
case ZYDIS_NODETYPE_FILTER_FEATURE_CET:
|
index = context->decoder->decoderMode[ZYDIS_DECODER_MODE_AMD_BRANCHES] ? 1 : 0;
|
||||||
case ZYDIS_NODETYPE_FILTER_FEATURE_LZCNT:
|
break;
|
||||||
case ZYDIS_NODETYPE_FILTER_FEATURE_TZCNT:
|
case ZYDIS_NODETYPE_FILTER_MODE_MPX:
|
||||||
// TODO: Make configurable by option
|
index = context->decoder->decoderMode[ZYDIS_DECODER_MODE_MPX] ? 1 : 0;
|
||||||
index = 1;
|
break;
|
||||||
|
case ZYDIS_NODETYPE_FILTER_MODE_CET:
|
||||||
|
index = context->decoder->decoderMode[ZYDIS_DECODER_MODE_CET] ? 1 : 0;
|
||||||
|
break;
|
||||||
|
case ZYDIS_NODETYPE_FILTER_MODE_LZCNT:
|
||||||
|
index = context->decoder->decoderMode[ZYDIS_DECODER_MODE_LZCNT] ? 1 : 0;
|
||||||
|
break;
|
||||||
|
case ZYDIS_NODETYPE_FILTER_MODE_TZCNT:
|
||||||
|
index = context->decoder->decoderMode[ZYDIS_DECODER_MODE_TZCNT] ? 1 : 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (nodeType & ZYDIS_NODETYPE_DEFINITION_MASK)
|
if (nodeType & ZYDIS_NODETYPE_DEFINITION_MASK)
|
||||||
|
@ -4344,7 +4353,7 @@ static ZydisStatus ZydisDecodeInstruction(ZydisDecoderContext* context,
|
||||||
instruction->meta.isaExt = definition->isaExt;
|
instruction->meta.isaExt = definition->isaExt;
|
||||||
instruction->meta.exceptionClass = definition->exceptionClass;
|
instruction->meta.exceptionClass = definition->exceptionClass;
|
||||||
|
|
||||||
if (context->decoder->granularity == ZYDIS_DECODE_GRANULARITY_FULL)
|
if (!context->decoder->decoderMode[ZYDIS_DECODER_MODE_MINIMAL])
|
||||||
{
|
{
|
||||||
ZydisSetAttributes(context, instruction, definition);
|
ZydisSetAttributes(context, instruction, definition);
|
||||||
switch (instruction->encoding)
|
switch (instruction->encoding)
|
||||||
|
@ -4387,16 +4396,18 @@ static ZydisStatus ZydisDecodeInstruction(ZydisDecoderContext* context,
|
||||||
ZydisStatus ZydisDecoderInit(ZydisDecoder* decoder, ZydisMachineMode machineMode,
|
ZydisStatus ZydisDecoderInit(ZydisDecoder* decoder, ZydisMachineMode machineMode,
|
||||||
ZydisAddressWidth addressWidth)
|
ZydisAddressWidth addressWidth)
|
||||||
{
|
{
|
||||||
return ZydisDecoderInitEx(decoder, machineMode, addressWidth, ZYDIS_DECODE_GRANULARITY_DEFAULT);
|
static const ZydisBool decoderModes[ZYDIS_DECODER_MODE_MAX_VALUE + 1] =
|
||||||
}
|
|
||||||
|
|
||||||
ZydisStatus ZydisDecoderInitEx(ZydisDecoder* decoder, ZydisMachineMode machineMode,
|
|
||||||
ZydisAddressWidth addressWidth, ZydisDecodeGranularity granularity)
|
|
||||||
{
|
{
|
||||||
if (!decoder || ((machineMode != 16) && (machineMode != 32) && (machineMode != 64)) ||
|
ZYDIS_FALSE, // ZYDIS_DECODER_MODE_INVALID
|
||||||
((granularity != ZYDIS_DECODE_GRANULARITY_DEFAULT) &&
|
ZYDIS_FALSE, // ZYDIS_DECODER_MODE_MINIMAL
|
||||||
(granularity != ZYDIS_DECODE_GRANULARITY_MINIMAL) &&
|
ZYDIS_FALSE, // ZYDIS_DECODER_MODE_AMD_BRANCHES
|
||||||
(granularity != ZYDIS_DECODE_GRANULARITY_FULL)))
|
ZYDIS_TRUE , // ZYDIS_DECODER_MODE_MPX
|
||||||
|
ZYDIS_TRUE , // ZYDIS_DECODER_MODE_CET
|
||||||
|
ZYDIS_TRUE , // ZYDIS_DECODER_MODE_LZCNT
|
||||||
|
ZYDIS_TRUE // ZYDIS_DECODER_MODE_TZCNT
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!decoder || ((machineMode != 16) && (machineMode != 32) && (machineMode != 64)))
|
||||||
{
|
{
|
||||||
return ZYDIS_STATUS_INVALID_PARAMETER;
|
return ZYDIS_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
@ -4413,14 +4424,22 @@ ZydisStatus ZydisDecoderInitEx(ZydisDecoder* decoder, ZydisMachineMode machineMo
|
||||||
return ZYDIS_STATUS_INVALID_PARAMETER;
|
return ZYDIS_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (granularity == ZYDIS_DECODE_GRANULARITY_DEFAULT)
|
|
||||||
{
|
|
||||||
granularity = ZYDIS_DECODE_GRANULARITY_FULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
decoder->machineMode = machineMode;
|
decoder->machineMode = machineMode;
|
||||||
decoder->addressWidth = addressWidth;
|
decoder->addressWidth = addressWidth;
|
||||||
decoder->granularity = granularity;
|
memcpy(&decoder->decoderMode, &decoderModes, sizeof(decoderModes));
|
||||||
|
|
||||||
|
return ZYDIS_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
ZydisStatus ZydisDecoderEnableMode(ZydisDecoder* decoder, ZydisDecoderMode mode, ZydisBool enabled)
|
||||||
|
{
|
||||||
|
if (!decoder || !mode || (mode > ZYDIS_DECODER_MODE_MAX_VALUE))
|
||||||
|
{
|
||||||
|
return ZYDIS_STATUS_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
decoder->decoderMode[mode] = enabled;
|
||||||
|
|
||||||
return ZYDIS_STATUS_SUCCESS;
|
return ZYDIS_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -333,18 +333,21 @@ const ZydisDecoderTreeNode* ZydisDecoderTreeGetChildNode(const ZydisDecoderTreeN
|
||||||
case ZYDIS_NODETYPE_FILTER_MVEX_E:
|
case ZYDIS_NODETYPE_FILTER_MVEX_E:
|
||||||
ZYDIS_ASSERT(index < 2);
|
ZYDIS_ASSERT(index < 2);
|
||||||
return &filtersMVEXE[parent->value][index];
|
return &filtersMVEXE[parent->value][index];
|
||||||
case ZYDIS_NODETYPE_FILTER_FEATURE_MPX:
|
case ZYDIS_NODETYPE_FILTER_MODE_AMD:
|
||||||
ZYDIS_ASSERT(index < 2);
|
ZYDIS_ASSERT(index < 2);
|
||||||
return &filtersFeatureMPX[parent->value][index];
|
return &filtersModeAMD[parent->value][index];
|
||||||
case ZYDIS_NODETYPE_FILTER_FEATURE_CET:
|
case ZYDIS_NODETYPE_FILTER_MODE_MPX:
|
||||||
ZYDIS_ASSERT(index < 2);
|
ZYDIS_ASSERT(index < 2);
|
||||||
return &filtersFeatureCET[parent->value][index];
|
return &filtersModeMPX[parent->value][index];
|
||||||
case ZYDIS_NODETYPE_FILTER_FEATURE_LZCNT:
|
case ZYDIS_NODETYPE_FILTER_MODE_CET:
|
||||||
ZYDIS_ASSERT(index < 2);
|
ZYDIS_ASSERT(index < 2);
|
||||||
return &filtersFeatureLZCNT[parent->value][index];
|
return &filtersModeCET[parent->value][index];
|
||||||
case ZYDIS_NODETYPE_FILTER_FEATURE_TZCNT:
|
case ZYDIS_NODETYPE_FILTER_MODE_LZCNT:
|
||||||
ZYDIS_ASSERT(index < 2);
|
ZYDIS_ASSERT(index < 2);
|
||||||
return &filtersFeatureTZCNT[parent->value][index];
|
return &filtersModeLZCNT[parent->value][index];
|
||||||
|
case ZYDIS_NODETYPE_FILTER_MODE_TZCNT:
|
||||||
|
ZYDIS_ASSERT(index < 2);
|
||||||
|
return &filtersModeTZCNT[parent->value][index];
|
||||||
default:
|
default:
|
||||||
ZYDIS_UNREACHABLE;
|
ZYDIS_UNREACHABLE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,21 +138,25 @@ enum ZydisDecoderTreeNodeTypes
|
||||||
*/
|
*/
|
||||||
ZYDIS_NODETYPE_FILTER_MVEX_E = 0x12,
|
ZYDIS_NODETYPE_FILTER_MVEX_E = 0x12,
|
||||||
/**
|
/**
|
||||||
* @brief Reference to a MPX-feature filter.
|
* @brief Reference to a AMD-mode filter.
|
||||||
*/
|
*/
|
||||||
ZYDIS_NODETYPE_FILTER_FEATURE_MPX = 0x13,
|
ZYDIS_NODETYPE_FILTER_MODE_AMD = 0x13,
|
||||||
/**
|
/**
|
||||||
* @brief Reference to a CET-feature filter.
|
* @brief Reference to a MPX-mode filter.
|
||||||
*/
|
*/
|
||||||
ZYDIS_NODETYPE_FILTER_FEATURE_CET = 0x14,
|
ZYDIS_NODETYPE_FILTER_MODE_MPX = 0x14,
|
||||||
/**
|
/**
|
||||||
* @brief Reference to a LZCNT-feature filter.
|
* @brief Reference to a CET-mode filter.
|
||||||
*/
|
*/
|
||||||
ZYDIS_NODETYPE_FILTER_FEATURE_LZCNT = 0x15,
|
ZYDIS_NODETYPE_FILTER_MODE_CET = 0x15,
|
||||||
/**
|
/**
|
||||||
* @brief Reference to a TZCNT-feature filter.
|
* @brief Reference to a LZCNT-mode filter.
|
||||||
*/
|
*/
|
||||||
ZYDIS_NODETYPE_FILTER_FEATURE_TZCNT = 0x16
|
ZYDIS_NODETYPE_FILTER_MODE_LZCNT = 0x16,
|
||||||
|
/**
|
||||||
|
* @brief Reference to a TZCNT-mode filter.
|
||||||
|
*/
|
||||||
|
ZYDIS_NODETYPE_FILTER_MODE_TZCNT = 0x17
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------- */
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1098,6 +1098,10 @@ const ZydisOperandDefinition operandDefinitions[] =
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_GPR_SSZ, { .id = 0x4 } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_GPR_SSZ, { .id = 0x4 } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_MEM, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_WRITE, { 2, 4, 8 }, ZYDIS_IELEMENT_TYPE_INT, { .mem = { 0, ZYDIS_IMPLMEM_BASE_ASP } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_MEM, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_WRITE, { 2, 4, 8 }, ZYDIS_IELEMENT_TYPE_INT, { .mem = { 0, ZYDIS_IMPLMEM_BASE_ASP } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 2, 4, 4 }, ZYDIS_IELEMENT_TYPE_INT, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM16_32_32 } },
|
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 2, 4, 4 }, ZYDIS_IELEMENT_TYPE_INT, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM16_32_32 } },
|
||||||
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_RIP } } } },
|
||||||
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_GPR_SSZ, { .id = 0x4 } } } },
|
||||||
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_MEM, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_WRITE, { 2, 4, 8 }, ZYDIS_IELEMENT_TYPE_INT, { .mem = { 0, ZYDIS_IMPLMEM_BASE_ASP } } },
|
||||||
|
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 2, 4, 4 }, ZYDIS_IELEMENT_TYPE_INT, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM16_32_32 } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_EIP } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_EIP } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_GPR_SSZ, { .id = 0x4 } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_GPR_SSZ, { .id = 0x4 } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_MEM, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_WRITE, { 2, 4, 8 }, ZYDIS_IELEMENT_TYPE_INT, { .mem = { 0, ZYDIS_IMPLMEM_BASE_ASP } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_MEM, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_WRITE, { 2, 4, 8 }, ZYDIS_IELEMENT_TYPE_INT, { .mem = { 0, ZYDIS_IMPLMEM_BASE_ASP } } },
|
||||||
|
@ -3067,15 +3071,15 @@ const ZydisOperandDefinition operandDefinitions[] =
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_WRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_WRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 1, 1, 1 }, ZYDIS_IELEMENT_TYPE_INT8, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM8 } },
|
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 1, 1, 1 }, ZYDIS_IELEMENT_TYPE_INT8, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM8 } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_RIP } } } },
|
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 1, 1, 1 }, ZYDIS_IELEMENT_TYPE_INT8, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM8 } },
|
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_EIP } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_EIP } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM32 } },
|
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM32 } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_RIP } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_RIP } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 2, 4, 4 }, ZYDIS_IELEMENT_TYPE_INT, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM16_32_32 } },
|
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 2, 4, 4 }, ZYDIS_IELEMENT_TYPE_INT, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM16_32_32 } },
|
||||||
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_RIP } } } },
|
||||||
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
||||||
|
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 2, 4, 4 }, ZYDIS_IELEMENT_TYPE_INT, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM16_32_32 } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_EIP } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_EIP } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 1, 1, 1 }, ZYDIS_IELEMENT_TYPE_INT8, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM8 } },
|
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 1, 1, 1 }, ZYDIS_IELEMENT_TYPE_INT8, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM8 } },
|
||||||
|
@ -5662,6 +5666,8 @@ const ZydisOperandDefinition operandDefinitions[] =
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_FLAGS_SSZ, { .id = 0x3F } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_IMPLICIT, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_GPR_OSZ, { .id = 0x0 } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_IMPLICIT, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_GPR_OSZ, { .id = 0x0 } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_IMPLICIT, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_ECX } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_IMPLICIT, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_ECX } } } },
|
||||||
|
{ ZYDIS_SEMANTIC_OPTYPE_REL, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 1, 1, 1 }, ZYDIS_IELEMENT_TYPE_INT8, { .encoding = ZYDIS_OPERAND_ENCODING_JIMM8 } },
|
||||||
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_READWRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_STATIC, { .reg = ZYDIS_REGISTER_RIP } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_GPR16_32_64, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_GPR16_32_64, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_WRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_IP_SSZ, { .id = 0x3F } } } },
|
{ ZYDIS_SEMANTIC_OPTYPE_IMPLICIT_REG, ZYDIS_OPERAND_VISIBILITY_HIDDEN, ZYDIS_OPERAND_ACTION_WRITE, { 0, 0, 0 }, ZYDIS_IELEMENT_TYPE_INVALID, { .reg = { ZYDIS_IMPLREG_TYPE_IP_SSZ, { .id = 0x3F } } } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 2, 4, 8 }, ZYDIS_IELEMENT_TYPE_INT, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 2, 4, 8 }, ZYDIS_IELEMENT_TYPE_INT, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
|
|
Loading…
Reference in New Issue