mirror of https://github.com/x64dbg/zydis
Some decoder and formatter improvements
- Added `const` specifiers to some local variables - Added KNC compatibility-mode (`ZYDIS_DECODER_MODE_KNC`) to improve decoding of ambiguous KNC/KNL+ mask-instructions
This commit is contained in:
parent
e314c71db3
commit
4195e9b0b8
|
@ -68,6 +68,8 @@ enum ZydisDecoderModes
|
|||
*
|
||||
* Operands, most attributes and other specific information (like AVX info) are not
|
||||
* accessible in this mode.
|
||||
*
|
||||
* This mode is NOT enabled by default.
|
||||
*/
|
||||
ZYDIS_DECODER_MODE_MINIMAL,
|
||||
/**
|
||||
|
@ -77,8 +79,19 @@ enum ZydisDecoderModes
|
|||
* 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.
|
||||
*
|
||||
* This mode is NOT enabled by default.
|
||||
*/
|
||||
ZYDIS_DECODER_MODE_AMD_BRANCHES,
|
||||
/**
|
||||
* @brief Enables KNC compatibility-mode.
|
||||
*
|
||||
* KNC and KNL+ chips are sharing opcodes and encodings for some mask-related instructions.
|
||||
* Enable this mode to use the old KNC specifications (different mnemonics, operands, ..).
|
||||
*
|
||||
* This mode is NOT enabled by default.
|
||||
*/
|
||||
ZYDIS_DECODER_MODE_KNC,
|
||||
/**
|
||||
* @brief Enables the MPX mode.
|
||||
*
|
||||
|
|
|
@ -344,6 +344,7 @@ enum ZydisMnemonics
|
|||
ZYDIS_MNEMONIC_KORB,
|
||||
ZYDIS_MNEMONIC_KORD,
|
||||
ZYDIS_MNEMONIC_KORQ,
|
||||
ZYDIS_MNEMONIC_KORTEST,
|
||||
ZYDIS_MNEMONIC_KORTESTB,
|
||||
ZYDIS_MNEMONIC_KORTESTD,
|
||||
ZYDIS_MNEMONIC_KORTESTQ,
|
||||
|
|
|
@ -1370,7 +1370,7 @@ static ZydisStatus ZydisDecodeOperandMemory(ZydisDecoderContext* context,
|
|||
operand->type = ZYDIS_OPERAND_TYPE_MEMORY;
|
||||
operand->mem.type = ZYDIS_MEMOP_TYPE_MEM;
|
||||
|
||||
uint8_t modrm_rm = instruction->raw.modrm.rm;
|
||||
const uint8_t modrm_rm = instruction->raw.modrm.rm;
|
||||
uint8_t displacementSize = 0;
|
||||
switch (instruction->addressWidth)
|
||||
{
|
||||
|
@ -4319,6 +4319,9 @@ static ZydisStatus ZydisDecodeInstruction(ZydisDecoderContext* context,
|
|||
case ZYDIS_NODETYPE_FILTER_MODE_AMD:
|
||||
index = context->decoder->decoderMode[ZYDIS_DECODER_MODE_AMD_BRANCHES] ? 1 : 0;
|
||||
break;
|
||||
case ZYDIS_NODETYPE_FILTER_MODE_KNC:
|
||||
index = context->decoder->decoderMode[ZYDIS_DECODER_MODE_KNC] ? 1 : 0;
|
||||
break;
|
||||
case ZYDIS_NODETYPE_FILTER_MODE_MPX:
|
||||
index = context->decoder->decoderMode[ZYDIS_DECODER_MODE_MPX] ? 1 : 0;
|
||||
break;
|
||||
|
@ -4384,7 +4387,7 @@ static ZydisStatus ZydisDecodeInstruction(ZydisDecoderContext* context,
|
|||
break;
|
||||
}
|
||||
ZYDIS_CHECK(ZydisDecodeOperands(context, instruction, definition));
|
||||
ZydisRegister reg =
|
||||
const ZydisRegister reg =
|
||||
instruction->operands[instruction->operandCount - 1].reg.value;
|
||||
if ((reg == ZYDIS_REGISTER_FLAGS ) || (reg == ZYDIS_REGISTER_EFLAGS) ||
|
||||
(reg == ZYDIS_REGISTER_RFLAGS))
|
||||
|
@ -4416,6 +4419,7 @@ ZydisStatus ZydisDecoderInit(ZydisDecoder* decoder, ZydisMachineMode machineMode
|
|||
{
|
||||
ZYDIS_FALSE, // ZYDIS_DECODER_MODE_MINIMAL
|
||||
ZYDIS_FALSE, // ZYDIS_DECODER_MODE_AMD_BRANCHES
|
||||
ZYDIS_FALSE, // ZYDIS_DECODER_MODE_KNC
|
||||
ZYDIS_TRUE , // ZYDIS_DECODER_MODE_MPX
|
||||
ZYDIS_TRUE , // ZYDIS_DECODER_MODE_CET
|
||||
ZYDIS_TRUE , // ZYDIS_DECODER_MODE_LZCNT
|
||||
|
|
|
@ -336,6 +336,9 @@ const ZydisDecoderTreeNode* ZydisDecoderTreeGetChildNode(const ZydisDecoderTreeN
|
|||
case ZYDIS_NODETYPE_FILTER_MODE_AMD:
|
||||
ZYDIS_ASSERT(index < 2);
|
||||
return &filtersModeAMD[parent->value][index];
|
||||
case ZYDIS_NODETYPE_FILTER_MODE_KNC:
|
||||
ZYDIS_ASSERT(index < 2);
|
||||
return &filtersModeKNC[parent->value][index];
|
||||
case ZYDIS_NODETYPE_FILTER_MODE_MPX:
|
||||
ZYDIS_ASSERT(index < 2);
|
||||
return &filtersModeMPX[parent->value][index];
|
||||
|
|
|
@ -141,22 +141,26 @@ enum ZydisDecoderTreeNodeTypes
|
|||
* @brief Reference to a AMD-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_AMD = 0x13,
|
||||
/**
|
||||
* @brief Reference to a KNC-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_KNC = 0x14,
|
||||
/**
|
||||
* @brief Reference to a MPX-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_MPX = 0x14,
|
||||
ZYDIS_NODETYPE_FILTER_MODE_MPX = 0x15,
|
||||
/**
|
||||
* @brief Reference to a CET-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_CET = 0x15,
|
||||
ZYDIS_NODETYPE_FILTER_MODE_CET = 0x16,
|
||||
/**
|
||||
* @brief Reference to a LZCNT-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_LZCNT = 0x16,
|
||||
ZYDIS_NODETYPE_FILTER_MODE_LZCNT = 0x17,
|
||||
/**
|
||||
* @brief Reference to a TZCNT-mode filter.
|
||||
*/
|
||||
ZYDIS_NODETYPE_FILTER_MODE_TZCNT = 0x17
|
||||
ZYDIS_NODETYPE_FILTER_MODE_TZCNT = 0x18
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
|
|
@ -118,7 +118,7 @@ ZydisStatus ZydisPrintDecU32(char** buffer, size_t bufferLen, uint32_t value, ui
|
|||
p -= 2;
|
||||
memcpy(p, &decimalLookup[value * 2], sizeof(uint16_t));
|
||||
|
||||
size_t n = &temp[ZYDIS_MAXCHARS_DEC_32] - p;
|
||||
const size_t n = &temp[ZYDIS_MAXCHARS_DEC_32] - p;
|
||||
if ((bufferLen < (size_t)(n + 1)) || (bufferLen < (size_t)(paddingLength + 1)))
|
||||
{
|
||||
return ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE;
|
||||
|
@ -156,7 +156,7 @@ ZydisStatus ZydisPrintHexU32(char** buffer, size_t bufferLen, uint32_t value, ui
|
|||
|
||||
if (!value)
|
||||
{
|
||||
uint8_t n = (paddingLength ? paddingLength : 1);
|
||||
const uint8_t n = (paddingLength ? paddingLength : 1);
|
||||
|
||||
if (bufferLen < (size_t)(n + 1))
|
||||
{
|
||||
|
@ -172,7 +172,7 @@ ZydisStatus ZydisPrintHexU32(char** buffer, size_t bufferLen, uint32_t value, ui
|
|||
uint8_t n = 0;
|
||||
for (int8_t i = ZYDIS_MAXCHARS_HEX_32 - 1; i >= 0; --i)
|
||||
{
|
||||
uint8_t v = (value >> i * 4) & 0x0F;
|
||||
const uint8_t v = (value >> i * 4) & 0x0F;
|
||||
if (!n)
|
||||
{
|
||||
if (!v)
|
||||
|
@ -227,7 +227,7 @@ ZydisStatus ZydisPrintDecU64(char** buffer, size_t bufferLen, uint64_t value, ui
|
|||
p -= 2;
|
||||
memcpy(p, &decimalLookup[value * 2], 2);
|
||||
|
||||
size_t n = &temp[ZYDIS_MAXCHARS_DEC_64] - p;
|
||||
const size_t n = &temp[ZYDIS_MAXCHARS_DEC_64] - p;
|
||||
if ((bufferLen < (size_t)(n + 1)) || (bufferLen < (size_t)(paddingLength + 1)))
|
||||
{
|
||||
return ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE;
|
||||
|
@ -265,7 +265,7 @@ ZydisStatus ZydisPrintHexU64(char** buffer, size_t bufferLen, uint64_t value, ui
|
|||
|
||||
if (!value)
|
||||
{
|
||||
uint8_t n = (paddingLength ? paddingLength : 1);
|
||||
const uint8_t n = (paddingLength ? paddingLength : 1);
|
||||
|
||||
if (bufferLen < (size_t)(n + 1))
|
||||
{
|
||||
|
@ -279,10 +279,10 @@ ZydisStatus ZydisPrintHexU64(char** buffer, size_t bufferLen, uint64_t value, ui
|
|||
}
|
||||
|
||||
uint8_t n = 0;
|
||||
uint8_t c = ((value & 0xFFFFFFFF00000000) ? ZYDIS_MAXCHARS_HEX_64 : ZYDIS_MAXCHARS_HEX_32);
|
||||
const uint8_t c = ((value & 0xFFFFFFFF00000000) ? ZYDIS_MAXCHARS_HEX_64 : ZYDIS_MAXCHARS_HEX_32);
|
||||
for (int8_t i = c - 1; i >= 0; --i)
|
||||
{
|
||||
uint8_t v = (value >> i * 4) & 0x0F;
|
||||
const uint8_t v = (value >> i * 4) & 0x0F;
|
||||
if (!n)
|
||||
{
|
||||
if (!v)
|
||||
|
@ -329,7 +329,7 @@ ZydisStatus ZydisPrintStr(char** buffer, size_t bufferLen, const char* text,
|
|||
ZYDIS_ASSERT(bufferLen > 0);
|
||||
ZYDIS_ASSERT(text);
|
||||
|
||||
size_t strLen = strlen(text);
|
||||
const size_t strLen = strlen(text);
|
||||
if (strLen >= bufferLen)
|
||||
{
|
||||
return ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE;
|
||||
|
|
|
@ -93,7 +93,7 @@ static ZydisStatus ZydisFormatterPrintMnemonicIntel(const ZydisFormatter* format
|
|||
return ZYDIS_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
char* bufEnd = *buffer + bufferLen;
|
||||
const char* bufEnd = *buffer + bufferLen;
|
||||
|
||||
const char* mnemonic = ZydisMnemonicGetString(instruction->mnemonic);
|
||||
if (!mnemonic)
|
||||
|
@ -145,7 +145,7 @@ static ZydisStatus ZydisFormatterFormatOperandMemIntel(const ZydisFormatter* for
|
|||
return ZYDIS_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
char* bufEnd = *buffer + bufferLen;
|
||||
const char* bufEnd = *buffer + bufferLen;
|
||||
|
||||
ZYDIS_CHECK(ZydisPrintStr(buffer, bufEnd - *buffer, "[", ZYDIS_LETTER_CASE_DEFAULT));
|
||||
|
||||
|
@ -221,7 +221,7 @@ static ZydisStatus ZydisFormatterFormatOperandPtrIntel(const ZydisFormatter* for
|
|||
return ZYDIS_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
char* bufEnd = *buffer + bufferLen;
|
||||
const char* bufEnd = *buffer + bufferLen;
|
||||
ZYDIS_CHECK(ZydisPrintHexU(buffer, bufEnd - *buffer, operand->ptr.segment, 4,
|
||||
formatter->hexUppercase, formatter->hexPrefix, formatter->hexSuffix));
|
||||
ZYDIS_CHECK(ZydisPrintStr(buffer, bufEnd - *buffer, ":", ZYDIS_LETTER_CASE_DEFAULT));
|
||||
|
@ -320,7 +320,7 @@ static ZydisStatus ZydisFormatterPrintDisplacementIntel(const ZydisFormatter* fo
|
|||
((operand->mem.base == ZYDIS_REGISTER_NONE) &&
|
||||
(operand->mem.index == ZYDIS_REGISTER_NONE))))
|
||||
{
|
||||
ZydisBool printSignedHEX =
|
||||
const ZydisBool printSignedHEX =
|
||||
(formatter->displacementFormat != ZYDIS_DISP_FORMAT_HEX_UNSIGNED);
|
||||
if (printSignedHEX && (operand->mem.disp.value < 0) && (
|
||||
(operand->mem.base != ZYDIS_REGISTER_NONE) ||
|
||||
|
@ -330,7 +330,7 @@ static ZydisStatus ZydisFormatterPrintDisplacementIntel(const ZydisFormatter* fo
|
|||
formatter->hexPaddingDisplacement, formatter->hexUppercase, formatter->hexPrefix,
|
||||
formatter->hexSuffix);
|
||||
}
|
||||
char* bufEnd = *buffer + bufferLen;
|
||||
const char* bufEnd = *buffer + bufferLen;
|
||||
if ((operand->mem.base != ZYDIS_REGISTER_NONE) ||
|
||||
(operand->mem.index != ZYDIS_REGISTER_NONE))
|
||||
{
|
||||
|
@ -527,7 +527,7 @@ static ZydisStatus ZydisFormatterPrintSegmentIntel(const ZydisFormatter* formatt
|
|||
return ZYDIS_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
char* bufEnd = *buffer + bufferLen;
|
||||
const char* bufEnd = *buffer + bufferLen;
|
||||
switch (operand->mem.segment)
|
||||
{
|
||||
case ZYDIS_REGISTER_ES:
|
||||
|
@ -784,7 +784,7 @@ static ZydisStatus ZydisFormatterFormatInstrIntel(const ZydisFormatter* formatte
|
|||
return ZYDIS_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
char* bufEnd = *buffer + bufferLen;
|
||||
const char* bufEnd = *buffer + bufferLen;
|
||||
ZYDIS_CHECK(
|
||||
formatter->funcPrintPrefixes(formatter, buffer, bufEnd - *buffer, instruction, userData));
|
||||
ZYDIS_CHECK(
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -336,6 +336,7 @@ static const char* zydisMnemonicStrings[] =
|
|||
"korb",
|
||||
"kord",
|
||||
"korq",
|
||||
"kortest",
|
||||
"kortestb",
|
||||
"kortestd",
|
||||
"kortestq",
|
||||
|
|
|
@ -2224,11 +2224,11 @@ const ZydisInstructionDefinitionVEX instructionDefinitionsVEX[] =
|
|||
{ ZYDIS_MNEMONIC_KORB, 3, 0xE14, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512DQ_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_TRUE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORD, 3, 0xE14, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_TRUE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORQ, 3, 0xE14, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_TRUE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORTESTB, 3, 0xE1D, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512DQ_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORTESTD, 3, 0xE20, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KNCMASK, ZYDIS_ISA_SET_KNC, ZYDIS_ISA_EXT_KNCV, ZYDIS_EXCEPTION_CLASS_NONE, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORTESTD, 3, 0xE1D, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORTESTQ, 3, 0xE1D, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORTESTW, 3, 0xE1D, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512F_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORTEST, 3, 0xE1D, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KNCMASK, ZYDIS_ISA_SET_KNC, ZYDIS_ISA_EXT_KNCV, ZYDIS_EXCEPTION_CLASS_NONE, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORTESTB, 3, 0xE20, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512DQ_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORTESTD, 3, 0xE20, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORTESTQ, 3, 0xE20, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORTESTW, 3, 0xE20, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512F_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KORW, 3, 0xE14, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512F_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_TRUE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KSHIFTLB, 3, 0xE23, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512DQ_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KSHIFTLD, 3, 0xE23, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
|
@ -2238,10 +2238,10 @@ const ZydisInstructionDefinitionVEX instructionDefinitionsVEX[] =
|
|||
{ ZYDIS_MNEMONIC_KSHIFTRD, 3, 0xE23, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KSHIFTRQ, 3, 0xE23, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KSHIFTRW, 3, 0xE23, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512F_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KTESTB, 3, 0xE1D, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512DQ_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KTESTD, 3, 0xE1D, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KTESTQ, 3, 0xE1D, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KTESTW, 3, 0xE1D, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512DQ_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KTESTB, 3, 0xE20, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512DQ_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KTESTD, 3, 0xE20, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KTESTQ, 3, 0xE20, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KTESTW, 3, 0xE20, 0, 0x2A, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512DQ_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_FALSE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KUNPCKBW, 3, 0xE14, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512F_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_TRUE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KUNPCKDQ, 3, 0xE14, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_TRUE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
{ ZYDIS_MNEMONIC_KUNPCKWD, 3, 0xE14, 0, 0x4, ZYDIS_FALSE, ZYDIS_TRUE, ZYDIS_CATEGORY_KMASK, ZYDIS_ISA_SET_AVX512VEX, ZYDIS_ISA_EXT_AVX512BW_KOP, ZYDIS_EXCEPTION_CLASS_K20, ZYDIS_TRUE, ZYDIS_VEX_STATIC_BROADCAST_NONE },
|
||||
|
|
|
@ -3613,12 +3613,12 @@ const ZydisOperandDefinition operandDefinitions[] =
|
|||
{ ZYDIS_SEMANTIC_OPTYPE_MASK, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_WRITE, { 2, 2, 2 }, ZYDIS_IELEMENT_TYPE_INT1, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||
{ ZYDIS_SEMANTIC_OPTYPE_GPR64, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||
{ ZYDIS_SEMANTIC_OPTYPE_IMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 1, 1, 1 }, ZYDIS_IELEMENT_TYPE_UINT8, { .encoding = ZYDIS_OPERAND_ENCODING_UIMM8 } },
|
||||
{ ZYDIS_SEMANTIC_OPTYPE_MASK, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_INT1, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||
{ ZYDIS_SEMANTIC_OPTYPE_MASK, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_INT1, { .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_MASK, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 2, 2, 2 }, ZYDIS_IELEMENT_TYPE_INT1, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||
{ ZYDIS_SEMANTIC_OPTYPE_MASK, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 2, 2, 2 }, ZYDIS_IELEMENT_TYPE_INT1, { .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_MASK, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_INT1, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||
{ ZYDIS_SEMANTIC_OPTYPE_MASK, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_INT1, { .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_MASK, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_WRITE, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_INT1, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||
{ ZYDIS_SEMANTIC_OPTYPE_MASK, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_INT1, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||
{ ZYDIS_SEMANTIC_OPTYPE_IMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 1, 1, 1 }, ZYDIS_IELEMENT_TYPE_UINT8, { .encoding = ZYDIS_OPERAND_ENCODING_UIMM8 } },
|
||||
|
|
Loading…
Reference in New Issue