mirror of https://github.com/x64dbg/zydis
Changed size of `AVX2`-gather memory operands to match `AVX512`
The operand-size is now the size of a single element instead of the total size (like it already is for the `AVX512` gather/scatter instructions)
This commit is contained in:
parent
82f72cf5a1
commit
e4f9054c97
|
@ -58,48 +58,6 @@ static ZydisStatus ZydisFormatInstruction(const ZydisFormatter* formatter, const
|
||||||
/* Intel style */
|
/* Intel style */
|
||||||
/* ---------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static ZydisStatus ZydisPrintSegmentIntel(const ZydisFormatter* formatter, ZydisString* string,
|
|
||||||
const ZydisDecodedInstruction* instruction, const ZydisDecodedOperand* operand, void* userData)
|
|
||||||
{
|
|
||||||
ZYDIS_ASSERT(formatter);
|
|
||||||
ZYDIS_ASSERT(string);
|
|
||||||
ZYDIS_ASSERT(instruction);
|
|
||||||
ZYDIS_ASSERT(operand);
|
|
||||||
|
|
||||||
switch (operand->mem.segment)
|
|
||||||
{
|
|
||||||
case ZYDIS_REGISTER_ES:
|
|
||||||
case ZYDIS_REGISTER_CS:
|
|
||||||
case ZYDIS_REGISTER_FS:
|
|
||||||
case ZYDIS_REGISTER_GS:
|
|
||||||
ZYDIS_CHECK(formatter->funcPrintRegister(formatter, string, instruction, operand,
|
|
||||||
operand->mem.segment, userData));
|
|
||||||
return ZydisStringAppendC(string, ":");
|
|
||||||
case ZYDIS_REGISTER_SS:
|
|
||||||
if ((formatter->forceMemorySegment) ||
|
|
||||||
(instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_SS))
|
|
||||||
{
|
|
||||||
ZYDIS_CHECK(formatter->funcPrintRegister(formatter, string, instruction, operand,
|
|
||||||
operand->mem.segment, userData));
|
|
||||||
return ZydisStringAppendC(string, ":");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case ZYDIS_REGISTER_DS:
|
|
||||||
if ((formatter->forceMemorySegment) ||
|
|
||||||
(instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_DS))
|
|
||||||
{
|
|
||||||
ZYDIS_CHECK(formatter->funcPrintRegister(formatter, string, instruction, operand,
|
|
||||||
operand->mem.segment, userData));
|
|
||||||
return ZydisStringAppendC(string, ":");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ZYDIS_STATUS_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static ZydisStatus ZydisFormatInstrIntel(const ZydisFormatter* formatter, ZydisString* string,
|
static ZydisStatus ZydisFormatInstrIntel(const ZydisFormatter* formatter, ZydisString* string,
|
||||||
|
@ -255,7 +213,37 @@ static ZydisStatus ZydisFormatOperandMemIntel(const ZydisFormatter* formatter, Z
|
||||||
return ZYDIS_STATUS_INVALID_PARAMETER;
|
return ZYDIS_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZYDIS_CHECK(ZydisPrintSegmentIntel(formatter, string, instruction, operand, userData));
|
switch (operand->mem.segment)
|
||||||
|
{
|
||||||
|
case ZYDIS_REGISTER_ES:
|
||||||
|
case ZYDIS_REGISTER_CS:
|
||||||
|
case ZYDIS_REGISTER_FS:
|
||||||
|
case ZYDIS_REGISTER_GS:
|
||||||
|
ZYDIS_CHECK(formatter->funcPrintRegister(formatter, string, instruction, operand,
|
||||||
|
operand->mem.segment, userData));
|
||||||
|
ZYDIS_CHECK(ZydisStringAppendC(string, ":"));
|
||||||
|
case ZYDIS_REGISTER_SS:
|
||||||
|
if ((formatter->forceMemorySegment) ||
|
||||||
|
(instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_SS))
|
||||||
|
{
|
||||||
|
ZYDIS_CHECK(formatter->funcPrintRegister(formatter, string, instruction, operand,
|
||||||
|
operand->mem.segment, userData));
|
||||||
|
ZYDIS_CHECK(ZydisStringAppendC(string, ":"));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ZYDIS_REGISTER_DS:
|
||||||
|
if ((formatter->forceMemorySegment) ||
|
||||||
|
(instruction->attributes & ZYDIS_ATTRIB_HAS_SEGMENT_DS))
|
||||||
|
{
|
||||||
|
ZYDIS_CHECK(formatter->funcPrintRegister(formatter, string, instruction, operand,
|
||||||
|
operand->mem.segment, userData));
|
||||||
|
ZYDIS_CHECK(ZydisStringAppendC(string, ":"));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
ZYDIS_CHECK(ZydisStringAppendC(string, "["));
|
ZYDIS_CHECK(ZydisStringAppendC(string, "["));
|
||||||
|
|
||||||
if (operand->mem.disp.hasDisplacement && (
|
if (operand->mem.disp.hasDisplacement && (
|
||||||
|
|
|
@ -3755,25 +3755,25 @@ const ZydisOperandDefinition operandDefinitions[] =
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_FLOAT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_FLOAT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT8, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT8, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT8, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT8, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
|
@ -3974,25 +3974,25 @@ const ZydisOperandDefinition operandDefinitions[] =
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT16, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT16, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ 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_IMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 1, 1, 1 }, ZYDIS_IELEMENT_TYPE_UINT8, { .encoding = ZYDIS_OPERAND_ENCODING_UIMM8 } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBX, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 4, 4, 4 }, ZYDIS_IELEMENT_TYPE_UINT32, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT32, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_CONDREAD_WRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
{ ZYDIS_SEMANTIC_OPTYPE_MEM_VSIBY, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 8, 8, 8 }, ZYDIS_IELEMENT_TYPE_UINT64, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_RM } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_YMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READWRITE, { 32, 32, 32 }, ZYDIS_IELEMENT_TYPE_INT64, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT16, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_WRITE, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_INT16, { .encoding = ZYDIS_OPERAND_ENCODING_MODRM_REG } },
|
||||||
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT8, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
{ ZYDIS_SEMANTIC_OPTYPE_XMM, ZYDIS_OPERAND_VISIBILITY_EXPLICIT, ZYDIS_OPERAND_ACTION_READ, { 16, 16, 16 }, ZYDIS_IELEMENT_TYPE_UINT8, { .encoding = ZYDIS_OPERAND_ENCODING_NDSNDD } },
|
||||||
|
|
|
@ -603,7 +603,7 @@ int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
fputs("Usage: ZydisInfo -[real|16|32|64] [hexbytes]\n", stderr);
|
fputs("Usage: ZydisInfo -[real|16|32|64] [hexbytes]\n", stderr);
|
||||||
return ZYDIS_STATUS_INVALID_PARAMETER;
|
return ZYDIS_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t data[ZYDIS_MAX_INSTRUCTION_LENGTH];
|
uint8_t data[ZYDIS_MAX_INSTRUCTION_LENGTH];
|
||||||
uint8_t length = 0;
|
uint8_t length = 0;
|
||||||
|
|
Loading…
Reference in New Issue