From 01b8267d47802fe19819253a8117df6e797b00b7 Mon Sep 17 00:00:00 2001 From: flobernd Date: Sun, 10 Sep 2017 21:43:52 +0200 Subject: [PATCH] Minor refactorings - Adjusted datatype of some enums - Renamed some things - `ZydisDecodedInstruction.flags` -> `ZydisDecodedInstruction.accessedFlags` - `ZydisDecodedInstruction.meta.roundingMode` -> `ZydisDecodedInstruction.meta.rounding.mode` - `ZydisDecodedInstruction.meta.swizzleMode` -> `ZydisDecodedInstruction.meta.swizzle.mode` - `ZydisDecodedInstruction.meta.conversionMode` -> `ZydisDecodedInstruction.meta.conversion.mode` - `ZydisGetCPUFlagsByAction` -> `ZydisGetAccessedFlagsByAction` --- include/Zydis/DecoderTypes.h | 46 +++++++++++++------ include/Zydis/Generated/EnumISAExt.h | 2 + include/Zydis/Generated/EnumISASet.h | 2 + ...umCategory.h => EnumInstructionCategory.h} | 4 +- include/Zydis/Generated/EnumMnemonic.h | 2 + include/Zydis/MetaInfo.h | 8 +--- include/Zydis/Mnemonic.h | 2 - include/Zydis/Utils.h | 4 +- src/Decoder.c | 46 +++++++++---------- src/Formatter.c | 10 ++-- ...inc => EnumInstructionCategoryStrings.inc} | 2 +- src/MetaInfo.c | 6 +-- src/Utils.c | 6 +-- tools/ZydisInfo.c | 24 +++++----- 14 files changed, 91 insertions(+), 73 deletions(-) rename include/Zydis/Generated/{EnumCategory.h => EnumInstructionCategory.h} (96%) rename src/Generated/{EnumCategoryStrings.inc => EnumInstructionCategoryStrings.inc} (95%) diff --git a/include/Zydis/DecoderTypes.h b/include/Zydis/DecoderTypes.h index 341fc00..977fd71 100644 --- a/include/Zydis/DecoderTypes.h +++ b/include/Zydis/DecoderTypes.h @@ -480,7 +480,7 @@ enum ZydisCPUFlagActions /** * @brief Defines the @c ZydisExceptionClass datatype. */ -typedef uint16_t ZydisExceptionClass; +typedef uint8_t ZydisExceptionClass; /** * @brief Values that represent exception-classes. @@ -583,7 +583,7 @@ enum ZydisMaskModes /** * @brief Defines the @c ZydisBroadcastMode datatype. */ -typedef uint16_t ZydisBroadcastMode; +typedef uint8_t ZydisBroadcastMode; /** * @brief Values that represent AVX broadcast-modes. @@ -645,7 +645,7 @@ enum ZydisRoundingModes /** * @brief Defines the @c ZydisSwizzleMode datatype. */ -typedef uint16_t ZydisSwizzleMode; +typedef uint8_t ZydisSwizzleMode; /** * @brief Values that represent swizzle-modes. @@ -670,7 +670,7 @@ enum ZydisSwizzleModes /** * @brief Defines the @c ZydisConversionMode datatype. */ -typedef uint16_t ZydisConversionMode; +typedef uint8_t ZydisConversionMode; /** * @brief Values that represent conversion-modes. @@ -766,11 +766,11 @@ typedef struct ZydisDecodedInstruction_ /** * @brief The CPU-flag action. * - * You can call `ZydisGetCPUFlagsByAction` to get a mask with all flags matching a specific - * action. + * You can call `ZydisGetAccessedFlagsByAction` to get a mask with all flags matching a + * specific action. */ ZydisCPUFlagAction action; - } flags[ZYDIS_CPUFLAG_ENUM_COUNT]; + } accessedFlags[ZYDIS_CPUFLAG_ENUM_COUNT]; /** * @brief Extended info for AVX instructions. */ @@ -799,7 +799,7 @@ typedef struct ZydisDecodedInstruction_ ZydisBool isControlMask; } mask; /** - * @brief Contains info about the AVX broadcast-factor. + * @brief Contains info about the AVX broadcast. */ struct { @@ -816,17 +816,35 @@ typedef struct ZydisDecodedInstruction_ ZydisBroadcastMode mode; } broadcast; /** - * @brief The AVX rounding-mode. + * @brief Contains info about the AVX rounding. */ - ZydisRoundingMode roundingMode; + struct + { + /** + * @brief The AVX rounding-mode. + */ + ZydisRoundingMode mode; + } rounding; /** - * @brief The AVX register-swizzle mode (MVEX only). + * @brief Contains info about the AVX register-swizzle (MVEX only). */ - ZydisSwizzleMode swizzleMode; + struct + { + /** + * @brief The AVX register-swizzle mode (MVEX only). + */ + ZydisSwizzleMode mode; + } swizzle; /** - * @brief The AVX data-conversion mode (MVEX only). + * @brief Contains info about the AVX data-conversion (MVEX only). */ - ZydisConversionMode conversionMode; + struct + { + /** + * @brief The AVX data-conversion mode (MVEX only). + */ + ZydisConversionMode mode; + } conversion; /** * @brief Signals, if the sae functionality is enabled for the instruction. */ diff --git a/include/Zydis/Generated/EnumISAExt.h b/include/Zydis/Generated/EnumISAExt.h index f3621f8..80e1407 100644 --- a/include/Zydis/Generated/EnumISAExt.h +++ b/include/Zydis/Generated/EnumISAExt.h @@ -1,3 +1,5 @@ +typedef uint8_t ZydisISAExt; + enum ZydisISAExts { ZYDIS_ISA_EXT_INVALID, diff --git a/include/Zydis/Generated/EnumISASet.h b/include/Zydis/Generated/EnumISASet.h index eaa5293..d18b1b6 100644 --- a/include/Zydis/Generated/EnumISASet.h +++ b/include/Zydis/Generated/EnumISASet.h @@ -1,3 +1,5 @@ +typedef uint8_t ZydisISASet; + enum ZydisISASets { ZYDIS_ISA_SET_INVALID, diff --git a/include/Zydis/Generated/EnumCategory.h b/include/Zydis/Generated/EnumInstructionCategory.h similarity index 96% rename from include/Zydis/Generated/EnumCategory.h rename to include/Zydis/Generated/EnumInstructionCategory.h index c0767f8..d7d0816 100644 --- a/include/Zydis/Generated/EnumCategory.h +++ b/include/Zydis/Generated/EnumInstructionCategory.h @@ -1,4 +1,6 @@ -enum ZydisCategories +typedef uint8_t ZydisInstructionCategory; + +enum ZydisInstructionCategories { ZYDIS_CATEGORY_INVALID, ZYDIS_CATEGORY_AES, diff --git a/include/Zydis/Generated/EnumMnemonic.h b/include/Zydis/Generated/EnumMnemonic.h index c79ae2c..7181e42 100644 --- a/include/Zydis/Generated/EnumMnemonic.h +++ b/include/Zydis/Generated/EnumMnemonic.h @@ -1,3 +1,5 @@ +typedef uint16_t ZydisMnemonic; + enum ZydisMnemonics { ZYDIS_MNEMONIC_INVALID, diff --git a/include/Zydis/MetaInfo.h b/include/Zydis/MetaInfo.h index 91b8c35..542cf3e 100644 --- a/include/Zydis/MetaInfo.h +++ b/include/Zydis/MetaInfo.h @@ -46,22 +46,16 @@ extern "C" { /** * @brief Defines the @c ZydisInstructionCategory datatype. */ -typedef uint16_t ZydisInstructionCategory; - -#include +#include /** * @brief Defines the @c ZydisISASet datatype. */ -typedef uint16_t ZydisISASet; - #include /** * @brief Defines the @c ZydisISAExt datatype. */ -typedef uint16_t ZydisISAExt; - #include /* ============================================================================================== */ diff --git a/include/Zydis/Mnemonic.h b/include/Zydis/Mnemonic.h index 705deea..ee40e92 100644 --- a/include/Zydis/Mnemonic.h +++ b/include/Zydis/Mnemonic.h @@ -46,8 +46,6 @@ extern "C" { /** * @brief Defines the @c ZydisMnemonic datatype. */ -typedef uint16_t ZydisMnemonic; - #include /* ============================================================================================== */ diff --git a/include/Zydis/Utils.h b/include/Zydis/Utils.h index 146c0e4..a699c77 100644 --- a/include/Zydis/Utils.h +++ b/include/Zydis/Utils.h @@ -62,7 +62,7 @@ ZYDIS_EXPORT ZydisStatus ZydisUtilsCalcAbsoluteTargetAddress( /* ============================================================================================== */ /** - * @brief Returns a mask of CPU-flags matching the given `action`. + * @brief Returns a mask of accessed CPU-flags matching the given `action`. * * @param instruction A pointer to the @c ZydisDecodedInstruction struct. * @param action The CPU-flag action. @@ -70,7 +70,7 @@ ZYDIS_EXPORT ZydisStatus ZydisUtilsCalcAbsoluteTargetAddress( * * @return A zydis status code */ -ZYDIS_EXPORT ZydisStatus ZydisGetCPUFlagsByAction(const ZydisDecodedInstruction* instruction, +ZYDIS_EXPORT ZydisStatus ZydisGetAccessedFlagsByAction(const ZydisDecodedInstruction* instruction, ZydisCPUFlagAction action, ZydisCPUFlagMask* flags); /* ============================================================================================== */ diff --git a/src/Decoder.c b/src/Decoder.c index 527c5db..d916c02 100644 --- a/src/Decoder.c +++ b/src/Decoder.c @@ -1153,7 +1153,7 @@ static void ZydisSetOperandSizeAndElementInfo(ZydisDecoderContext* context, ZYDIS_ASSERT(definition->elementType == ZYDIS_IELEMENT_TYPE_VARIABLE); ZYDIS_ASSERT(instruction->avx.vectorLength == 512); - switch (instruction->avx.conversionMode) + switch (instruction->avx.conversion.mode) { case ZYDIS_CONVERSION_MODE_INVALID: operand->size = 512; @@ -2205,7 +2205,7 @@ static void ZydisSetAccessedFlags(ZydisDecodedInstruction* instruction, ZYDIS_ASSERT(ZYDIS_ARRAY_SIZE(instruction->flags) == ZYDIS_ARRAY_SIZE(flags->action)); - memcpy(&instruction->flags, &flags->action, ZYDIS_ARRAY_SIZE(flags->action)); + memcpy(&instruction->accessedFlags, &flags->action, ZYDIS_ARRAY_SIZE(flags->action)); } /** @@ -2681,7 +2681,7 @@ static void ZydisSetAVXInformation(ZydisDecoderContext* context, // Noting to do here break; case ZYDIS_EVEX_FUNC_RC: - instruction->avx.roundingMode = ZYDIS_ROUNDING_MODE_RN + context->cache.LL; + instruction->avx.rounding.mode = ZYDIS_ROUNDING_MODE_RN + context->cache.LL; // Intentional fallthrough case ZYDIS_EVEX_FUNC_SAE: instruction->avx.hasSAE = ZYDIS_TRUE; @@ -2838,7 +2838,7 @@ static void ZydisSetAVXInformation(ZydisDecoderContext* context, // Nothing to do here break; case ZYDIS_MVEX_FUNC_RC: - instruction->avx.roundingMode = ZYDIS_ROUNDING_MODE_RN + instruction->raw.mvex.SSS; + instruction->avx.rounding.mode = ZYDIS_ROUNDING_MODE_RN + instruction->raw.mvex.SSS; break; case ZYDIS_MVEX_FUNC_SAE: if (instruction->raw.mvex.SSS >= 4) @@ -2848,7 +2848,7 @@ static void ZydisSetAVXInformation(ZydisDecoderContext* context, break; case ZYDIS_MVEX_FUNC_SWIZZLE_32: case ZYDIS_MVEX_FUNC_SWIZZLE_64: - instruction->avx.swizzleMode = ZYDIS_SWIZZLE_MODE_DCBA + instruction->raw.mvex.SSS; + instruction->avx.swizzle.mode = ZYDIS_SWIZZLE_MODE_DCBA + instruction->raw.mvex.SSS; break; case ZYDIS_MVEX_FUNC_SF_32: case ZYDIS_MVEX_FUNC_SF_32_BCST: @@ -2864,19 +2864,19 @@ static void ZydisSetAVXInformation(ZydisDecoderContext* context, instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_4_TO_16; break; case 3: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_FLOAT16; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_FLOAT16; break; case 4: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_UINT8; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT8; break; case 5: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_SINT8; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT8; break; case 6: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_UINT16; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT16; break; case 7: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_SINT16; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT16; break; default: ZYDIS_UNREACHABLE; @@ -2896,16 +2896,16 @@ static void ZydisSetAVXInformation(ZydisDecoderContext* context, instruction->avx.broadcast.mode = ZYDIS_BROADCAST_MODE_4_TO_16; break; case 4: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_UINT8; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT8; break; case 5: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_SINT8; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT8; break; case 6: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_UINT16; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT16; break; case 7: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_SINT16; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT16; break; default: ZYDIS_UNREACHABLE; @@ -2934,19 +2934,19 @@ static void ZydisSetAVXInformation(ZydisDecoderContext* context, case 0: break; case 3: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_FLOAT16; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_FLOAT16; break; case 4: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_UINT8; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT8; break; case 5: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_SINT8; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT8; break; case 6: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_UINT16; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT16; break; case 7: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_SINT16; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT16; break; default: ZYDIS_UNREACHABLE; @@ -2962,16 +2962,16 @@ static void ZydisSetAVXInformation(ZydisDecoderContext* context, case 0: break; case 4: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_UINT8; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT8; break; case 5: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_SINT8; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT8; break; case 6: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_UINT16; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_UINT16; break; case 7: - instruction->avx.conversionMode = ZYDIS_CONVERSION_MODE_SINT16; + instruction->avx.conversion.mode = ZYDIS_CONVERSION_MODE_SINT16; break; default: ZYDIS_UNREACHABLE; diff --git a/src/Formatter.c b/src/Formatter.c index 962c162..fbdee5e 100644 --- a/src/Formatter.c +++ b/src/Formatter.c @@ -728,7 +728,7 @@ static ZydisStatus ZydisFormatterPrintDecoratorIntel(const ZydisFormatter* forma case ZYDIS_DECORATOR_TYPE_ROUNDING_CONTROL: if (instruction->avx.hasSAE) { - switch (instruction->avx.roundingMode) + switch (instruction->avx.rounding.mode) { case ZYDIS_ROUNDING_MODE_INVALID: break; @@ -753,7 +753,7 @@ static ZydisStatus ZydisFormatterPrintDecoratorIntel(const ZydisFormatter* forma } } else { - switch (instruction->avx.roundingMode) + switch (instruction->avx.rounding.mode) { case ZYDIS_ROUNDING_MODE_INVALID: break; @@ -779,14 +779,14 @@ static ZydisStatus ZydisFormatterPrintDecoratorIntel(const ZydisFormatter* forma } break; case ZYDIS_DECORATOR_TYPE_SAE: - if (instruction->avx.hasSAE && !instruction->avx.roundingMode) + if (instruction->avx.hasSAE && !instruction->avx.rounding.mode) { ZYDIS_CHECK(ZydisStringBufferAppend(buffer, bufEnd - *buffer, ZYDIS_STRBUF_APPEND_MODE_DEFAULT, " {sae}")); } break; case ZYDIS_DECORATOR_TYPE_SWIZZLE: - switch (instruction->avx.swizzleMode) + switch (instruction->avx.swizzle.mode) { case ZYDIS_SWIZZLE_MODE_INVALID: case ZYDIS_SWIZZLE_MODE_DCBA: @@ -825,7 +825,7 @@ static ZydisStatus ZydisFormatterPrintDecoratorIntel(const ZydisFormatter* forma } break; case ZYDIS_DECORATOR_TYPE_CONVERSION: - switch (instruction->avx.conversionMode) + switch (instruction->avx.conversion.mode) { case ZYDIS_CONVERSION_MODE_INVALID: break; diff --git a/src/Generated/EnumCategoryStrings.inc b/src/Generated/EnumInstructionCategoryStrings.inc similarity index 95% rename from src/Generated/EnumCategoryStrings.inc rename to src/Generated/EnumInstructionCategoryStrings.inc index 46badd8..225370c 100644 --- a/src/Generated/EnumCategoryStrings.inc +++ b/src/Generated/EnumInstructionCategoryStrings.inc @@ -1,4 +1,4 @@ -static const char* zydisCategoryStrings[] = +static const char* zydisInstructionCategoryStrings[] = { "INVALID", "AES", diff --git a/src/MetaInfo.c b/src/MetaInfo.c index b02edbc..f3d221e 100644 --- a/src/MetaInfo.c +++ b/src/MetaInfo.c @@ -30,7 +30,7 @@ /* Enum strings */ /* ============================================================================================== */ -#include +#include #include #include @@ -40,11 +40,11 @@ const char* ZydisCategoryGetString(ZydisInstructionCategory category) { - if (category > ZYDIS_ARRAY_SIZE(zydisCategoryStrings) - 1) + if (category > ZYDIS_ARRAY_SIZE(zydisInstructionCategoryStrings) - 1) { return NULL; } - return zydisCategoryStrings[category]; + return zydisInstructionCategoryStrings[category]; } const char* ZydisISASetGetString(ZydisISASet isaSet) diff --git a/src/Utils.c b/src/Utils.c index 98d5235..14c01c5 100644 --- a/src/Utils.c +++ b/src/Utils.c @@ -97,7 +97,7 @@ ZydisStatus ZydisUtilsCalcAbsoluteTargetAddress(const ZydisDecodedInstruction* i /* Exported functions */ /* ---------------------------------------------------------------------------------------------- */ -ZydisStatus ZydisGetCPUFlagsByAction(const ZydisDecodedInstruction* instruction, +ZydisStatus ZydisGetAccessedFlagsByAction(const ZydisDecodedInstruction* instruction, ZydisCPUFlagAction action, ZydisCPUFlagMask* flags) { if (!instruction) @@ -105,9 +105,9 @@ ZydisStatus ZydisGetCPUFlagsByAction(const ZydisDecodedInstruction* instruction, return ZYDIS_STATUS_INVALID_PARAMETER; } *flags = 0; - for (uint8_t i = 0; i < ZYDIS_ARRAY_SIZE(instruction->flags); ++i) + for (uint8_t i = 0; i < ZYDIS_ARRAY_SIZE(instruction->accessedFlags); ++i) { - if (instruction->flags[i].action == action) + if (instruction->accessedFlags[i].action == action) { *flags |= (1 << i); } diff --git a/tools/ZydisInfo.c b/tools/ZydisInfo.c index a6f4d05..0bdbab7 100644 --- a/tools/ZydisInfo.c +++ b/tools/ZydisInfo.c @@ -251,30 +251,30 @@ void printFlags(ZydisDecodedInstruction* instruction) fputs("=======================================\n", stdout); printf(" ACTIONS: "); uint8_t c = 0; - for (ZydisCPUFlag i = 0; i < ZYDIS_ARRAY_SIZE(instruction->flags); ++i) + for (ZydisCPUFlag i = 0; i < ZYDIS_ARRAY_SIZE(instruction->accessedFlags); ++i) { - if (instruction->flags[i].action != ZYDIS_CPUFLAG_ACTION_NONE) + if (instruction->accessedFlags[i].action != ZYDIS_CPUFLAG_ACTION_NONE) { if (c && (c % 8 == 0)) { printf("\n "); } ++c; - printf("[%-4s: %s] ", flagNames[i], flagActions[instruction->flags[i].action]); + printf("[%-4s: %s] ", flagNames[i], flagActions[instruction->accessedFlags[i].action]); } } puts(c ? "" : "none"); ZydisCPUFlagMask flags, temp; - ZydisGetCPUFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_TESTED, &flags); + ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_TESTED, &flags); printf(" READ: 0x%08" PRIX32 "\n", flags); - ZydisGetCPUFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_MODIFIED, &flags); - ZydisGetCPUFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_SET_0, &temp); + ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_MODIFIED, &flags); + ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_SET_0, &temp); flags |= temp; - ZydisGetCPUFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_SET_1, &temp); + ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_SET_1, &temp); flags |= temp; printf(" WRITTEN: 0x%08" PRIX32 "\n", flags); - ZydisGetCPUFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_UNDEFINED, &flags); + ZydisGetAccessedFlagsByAction(instruction, ZYDIS_CPUFLAG_ACTION_UNDEFINED, &flags); printf(" UNDEFINED: 0x%08" PRIX32 "\n", flags); } @@ -346,19 +346,19 @@ void printAVXInfo(ZydisDecodedInstruction* instruction) switch (instruction->encoding) { case ZYDIS_INSTRUCTION_ENCODING_EVEX: - printf("\n ROUNDING: %s", roundingModeStrings[instruction->avx.roundingMode]); + printf("\n ROUNDING: %s", roundingModeStrings[instruction->avx.rounding.mode]); printf("\n SAE: %s", instruction->avx.hasSAE ? "Y" : "N"); printf("\n MASK: %s [%5s]%s", ZydisRegisterGetString(instruction->avx.mask.reg), maskModeStrings[instruction->avx.mask.mode], instruction->avx.mask.isControlMask ? " (control-mask)" : ""); break; case ZYDIS_INSTRUCTION_ENCODING_MVEX: - printf("\n ROUNDING: %s", roundingModeStrings[instruction->avx.roundingMode]); + printf("\n ROUNDING: %s", roundingModeStrings[instruction->avx.rounding.mode]); printf("\n SAE: %s", instruction->avx.hasSAE ? "Y" : "N"); printf("\n MASK: %s [MERGE]", ZydisRegisterGetString(instruction->avx.mask.reg)); printf("\n EH: %s", instruction->avx.hasEvictionHint ? "Y" : "N"); - printf("\n SWIZZLE: %s", swizzleModeStrings[instruction->avx.swizzleMode]); - printf("\n CONVERT: %s", conversionModeStrings[instruction->avx.conversionMode]); + printf("\n SWIZZLE: %s", swizzleModeStrings[instruction->avx.swizzle.mode]); + printf("\n CONVERT: %s", conversionModeStrings[instruction->avx.conversion.mode]); break; default: break;