From e4f9054c9712a65c23d37c72508e5d713108a991 Mon Sep 17 00:00:00 2001 From: flobernd Date: Sun, 10 Dec 2017 10:44:59 +0100 Subject: [PATCH] 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) --- src/Formatter.c | 74 ++++++++++++---------------- src/Generated/OperandDefinitions.inc | 28 +++++------ tools/ZydisInfo.c | 2 +- 3 files changed, 46 insertions(+), 58 deletions(-) diff --git a/src/Formatter.c b/src/Formatter.c index 235c746..10d9235 100644 --- a/src/Formatter.c +++ b/src/Formatter.c @@ -58,48 +58,6 @@ static ZydisStatus ZydisFormatInstruction(const ZydisFormatter* formatter, const /* 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, @@ -255,7 +213,37 @@ static ZydisStatus ZydisFormatOperandMemIntel(const ZydisFormatter* formatter, Z 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, "[")); if (operand->mem.disp.hasDisplacement && ( diff --git a/src/Generated/OperandDefinitions.inc b/src/Generated/OperandDefinitions.inc index c218bc4..dc6c2ef 100644 --- a/src/Generated/OperandDefinitions.inc +++ b/src/Generated/OperandDefinitions.inc @@ -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_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_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_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_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_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_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_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_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_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 } }, @@ -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_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_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_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_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_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_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_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_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_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 } }, diff --git a/tools/ZydisInfo.c b/tools/ZydisInfo.c index 5c26a85..6ca24d5 100644 --- a/tools/ZydisInfo.c +++ b/tools/ZydisInfo.c @@ -603,7 +603,7 @@ int main(int argc, char** argv) { fputs("Usage: ZydisInfo -[real|16|32|64] [hexbytes]\n", stderr); return ZYDIS_STATUS_INVALID_PARAMETER; - } + } uint8_t data[ZYDIS_MAX_INSTRUCTION_LENGTH]; uint8_t length = 0;