Skip to content

Commit

Permalink
APX progress
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed Jan 23, 2024
1 parent c422232 commit b46eaa3
Show file tree
Hide file tree
Showing 12 changed files with 8,104 additions and 7,950 deletions.
5 changes: 4 additions & 1 deletion include/Zydis/DecoderTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,11 +529,14 @@ typedef enum ZydisExceptionClass_
ZYDIS_EXCEPTION_CLASS_APX_EVEX_CET_WRSS,
ZYDIS_EXCEPTION_CLASS_APX_EVEX_CET_WRUSS,
ZYDIS_EXCEPTION_CLASS_APX_LEGACY_JMPABS,
ZYDIS_EXCEPTION_CLASS_APX_EVEX_RAO_INT,
ZYDIS_EXCEPTION_CLASS_USER_MSR_EVEX,
ZYDIS_EXCEPTION_CLASS_LEGACY_RAO_INT,

/**
* Maximum value of this enum.
*/
ZYDIS_EXCEPTION_CLASS_MAX_VALUE = ZYDIS_EXCEPTION_CLASS_APX_LEGACY_JMPABS,
ZYDIS_EXCEPTION_CLASS_MAX_VALUE = ZYDIS_EXCEPTION_CLASS_LEGACY_RAO_INT,
/**
* The minimum number of bits required to represent all values of this enum.
*/
Expand Down
3 changes: 1 addition & 2 deletions include/Zydis/Generated/EnumISAExt.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ typedef enum ZydisISAExt_
ZYDIS_ISA_EXT_AMD3DNOW,
ZYDIS_ISA_EXT_AMD3DNOW_PREFETCH,
ZYDIS_ISA_EXT_AMD_INVLPGB,
ZYDIS_ISA_EXT_AMX_BF16,
ZYDIS_ISA_EXT_AMX_FP16,
ZYDIS_ISA_EXT_AMX_INT8,
ZYDIS_ISA_EXT_AMX_TILE,
ZYDIS_ISA_EXT_APXEVEX,
ZYDIS_ISA_EXT_APX_F,
ZYDIS_ISA_EXT_APXLEGACY,
ZYDIS_ISA_EXT_AVX,
ZYDIS_ISA_EXT_AVX2,
ZYDIS_ISA_EXT_AVX2GATHER,
Expand Down
23 changes: 21 additions & 2 deletions include/Zydis/Generated/EnumISASet.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,33 @@ typedef enum ZydisISASet_
ZYDIS_ISA_SET_AMD3DNOW,
ZYDIS_ISA_SET_AMD_INVLPGB,
ZYDIS_ISA_SET_AMX_BF16,
ZYDIS_ISA_SET_AMX_COMPLEX,
ZYDIS_ISA_SET_AMX_FP16,
ZYDIS_ISA_SET_AMX_INT8,
ZYDIS_ISA_SET_AMX_TILE,
ZYDIS_ISA_SET_APX_F,
ZYDIS_ISA_SET_APX_F_ADX,
ZYDIS_ISA_SET_APX_F_AMX,
ZYDIS_ISA_SET_APX_F_BMI1,
ZYDIS_ISA_SET_APX_F_BMI2,
ZYDIS_ISA_SET_APX_F_CET,
ZYDIS_ISA_SET_APX_F_CMPCCXADD,
ZYDIS_ISA_SET_APX_F_ENQCMD,
ZYDIS_ISA_SET_APX_F_INVPCID,
ZYDIS_ISA_SET_APX_F_KEYLOCKER,
ZYDIS_ISA_SET_APX_F_KEYLOCKER_WIDE,
ZYDIS_ISA_SET_APX_F_KOPB,
ZYDIS_ISA_SET_APX_F_KOPD,
ZYDIS_ISA_SET_APX_F_KOPQ,
ZYDIS_ISA_SET_APX_F_KOPW,
ZYDIS_ISA_SET_APX_F_LZCNT,
ZYDIS_ISA_SET_APX_F_MOVBE,
ZYDIS_ISA_SET_APX_F_MOVDIR64B,
ZYDIS_ISA_SET_APX_F_MOVDIRI,
ZYDIS_ISA_SET_APX_F_RAO_INT,
ZYDIS_ISA_SET_APX_F_SHA,
ZYDIS_ISA_SET_APX_F_USER_MSR,
ZYDIS_ISA_SET_APX_F_VMX,
ZYDIS_ISA_SET_AVX,
ZYDIS_ISA_SET_AVX2,
ZYDIS_ISA_SET_AVX2GATHER,
Expand All @@ -42,7 +60,7 @@ typedef enum ZydisISASet_
ZYDIS_ISA_SET_AVX512F_128N,
ZYDIS_ISA_SET_AVX512F_256,
ZYDIS_ISA_SET_AVX512F_512,
ZYDIS_ISA_SET_AVX512F_KOP,
ZYDIS_ISA_SET_AVX512F_KOPW,
ZYDIS_ISA_SET_AVX512F_SCALAR,
ZYDIS_ISA_SET_AVX512PF_512,
ZYDIS_ISA_SET_AVX512_4FMAPS_512,
Expand Down Expand Up @@ -140,7 +158,8 @@ typedef enum ZydisISASet_
ZYDIS_ISA_SET_MONITOR,
ZYDIS_ISA_SET_MONITORX,
ZYDIS_ISA_SET_MOVBE,
ZYDIS_ISA_SET_MOVDIR,
ZYDIS_ISA_SET_MOVDIR64B,
ZYDIS_ISA_SET_MOVDIRI,
ZYDIS_ISA_SET_MPX,
ZYDIS_ISA_SET_MSRLIST,
ZYDIS_ISA_SET_PADLOCK_ACE,
Expand Down
4 changes: 4 additions & 0 deletions include/Zydis/Generated/EnumMnemonic.h
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,8 @@ typedef enum ZydisMnemonic_
ZYDIS_MNEMONIC_SYSEXIT,
ZYDIS_MNEMONIC_SYSRET,
ZYDIS_MNEMONIC_T1MSKC,
ZYDIS_MNEMONIC_TCMMIMFP16PS,
ZYDIS_MNEMONIC_TCMMRLFP16PS,
ZYDIS_MNEMONIC_TDCALL,
ZYDIS_MNEMONIC_TDPBF16PS,
ZYDIS_MNEMONIC_TDPBSSD,
Expand Down Expand Up @@ -893,6 +895,8 @@ typedef enum ZydisMnemonic_
ZYDIS_MNEMONIC_UNPCKHPS,
ZYDIS_MNEMONIC_UNPCKLPD,
ZYDIS_MNEMONIC_UNPCKLPS,
ZYDIS_MNEMONIC_URDMSR,
ZYDIS_MNEMONIC_UWRMSR,
ZYDIS_MNEMONIC_V4FMADDPS,
ZYDIS_MNEMONIC_V4FMADDSS,
ZYDIS_MNEMONIC_V4FNMADDPS,
Expand Down
3 changes: 2 additions & 1 deletion src/Decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -5087,7 +5087,8 @@ static ZyanStatus ZydisDecodeInstruction(ZydisDecoderState* state,
break;
case ZYDIS_NODETYPE_FILTER_MODE_UD0_COMPAT:
index = !!(state->decoder->decoder_mode & (1 << ZYDIS_DECODER_MODE_UD0_COMPAT));
break; case ZYDIS_NODETYPE_FILTER_EVEX_ND:
break;
case ZYDIS_NODETYPE_FILTER_EVEX_ND:
status = ZydisNodeHandlerEvexND(state->context, instruction, &index);
break;
case ZYDIS_NODETYPE_FILTER_EVEX_NF:
Expand Down
3 changes: 2 additions & 1 deletion src/DecoderData.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ const ZydisDecoderTreeNode* ZydisDecoderTreeGetChildNode(const ZydisDecoderTreeN
return &FILTERS_MODE_IPREFETCH[parent->value][index];
case ZYDIS_NODETYPE_FILTER_MODE_UD0_COMPAT:
ZYAN_ASSERT(index < 2);
return &FILTERS_MODE_UD0_COMPAT[parent->value][index]; case ZYDIS_NODETYPE_FILTER_EVEX_ND:
return &FILTERS_MODE_UD0_COMPAT[parent->value][index];
case ZYDIS_NODETYPE_FILTER_EVEX_ND:
ZYAN_ASSERT(index < 2);
return &FILTERS_EVEX_ND[parent->value][index];
case ZYDIS_NODETYPE_FILTER_EVEX_NF:
Expand Down
9,444 changes: 4,761 additions & 4,683 deletions src/Generated/DecoderTables.inc

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/Generated/EnumISAExt.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ static const char* STR_ISAEXT[] =
"AMD3DNOW",
"AMD3DNOW_PREFETCH",
"AMD_INVLPGB",
"AMX_BF16",
"AMX_FP16",
"AMX_INT8",
"AMX_TILE",
"APXEVEX",
"APX_F",
"APXLEGACY",
"AVX",
"AVX2",
"AVX2GATHER",
Expand Down
23 changes: 21 additions & 2 deletions src/Generated/EnumISASet.inc
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,33 @@ static const char* STR_ISASET[] =
"AMD3DNOW",
"AMD_INVLPGB",
"AMX_BF16",
"AMX_COMPLEX",
"AMX_FP16",
"AMX_INT8",
"AMX_TILE",
"APX_F",
"APX_F_ADX",
"APX_F_AMX",
"APX_F_BMI1",
"APX_F_BMI2",
"APX_F_CET",
"APX_F_CMPCCXADD",
"APX_F_ENQCMD",
"APX_F_INVPCID",
"APX_F_KEYLOCKER",
"APX_F_KEYLOCKER_WIDE",
"APX_F_KOPB",
"APX_F_KOPD",
"APX_F_KOPQ",
"APX_F_KOPW",
"APX_F_LZCNT",
"APX_F_MOVBE",
"APX_F_MOVDIR64B",
"APX_F_MOVDIRI",
"APX_F_RAO_INT",
"APX_F_SHA",
"APX_F_USER_MSR",
"APX_F_VMX",
"AVX",
"AVX2",
"AVX2GATHER",
Expand All @@ -39,7 +57,7 @@ static const char* STR_ISASET[] =
"AVX512F_128N",
"AVX512F_256",
"AVX512F_512",
"AVX512F_KOP",
"AVX512F_KOPW",
"AVX512F_SCALAR",
"AVX512PF_512",
"AVX512_4FMAPS_512",
Expand Down Expand Up @@ -137,7 +155,8 @@ static const char* STR_ISASET[] =
"MONITOR",
"MONITORX",
"MOVBE",
"MOVDIR",
"MOVDIR64B",
"MOVDIRI",
"MPX",
"MSRLIST",
"PADLOCK_ACE",
Expand Down
4 changes: 4 additions & 0 deletions src/Generated/EnumMnemonic.inc
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,8 @@ static const ZydisShortString STR_MNEMONIC[] =
ZYDIS_MAKE_SHORTSTRING("sysexit"),
ZYDIS_MAKE_SHORTSTRING("sysret"),
ZYDIS_MAKE_SHORTSTRING("t1mskc"),
ZYDIS_MAKE_SHORTSTRING("tcmmimfp16ps"),
ZYDIS_MAKE_SHORTSTRING("tcmmrlfp16ps"),
ZYDIS_MAKE_SHORTSTRING("tdcall"),
ZYDIS_MAKE_SHORTSTRING("tdpbf16ps"),
ZYDIS_MAKE_SHORTSTRING("tdpbssd"),
Expand Down Expand Up @@ -890,6 +892,8 @@ static const ZydisShortString STR_MNEMONIC[] =
ZYDIS_MAKE_SHORTSTRING("unpckhps"),
ZYDIS_MAKE_SHORTSTRING("unpcklpd"),
ZYDIS_MAKE_SHORTSTRING("unpcklps"),
ZYDIS_MAKE_SHORTSTRING("urdmsr"),
ZYDIS_MAKE_SHORTSTRING("uwrmsr"),
ZYDIS_MAKE_SHORTSTRING("v4fmaddps"),
ZYDIS_MAKE_SHORTSTRING("v4fmaddss"),
ZYDIS_MAKE_SHORTSTRING("v4fnmaddps"),
Expand Down
Loading

0 comments on commit b46eaa3

Please sign in to comment.