You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

267 lines
7.5 KiB

3 years ago
/// @file xed-category-enum.c
// This file was automatically generated.
// Do not edit this file.
#include <string.h>
#include <assert.h>
#include "xed-category-enum.h"
typedef struct {
const char* name;
xed_category_enum_t value;
} name_table_xed_category_enum_t;
static const name_table_xed_category_enum_t name_array_xed_category_enum_t[] = {
{"INVALID", XED_CATEGORY_INVALID},
{"3DNOW", XED_CATEGORY_3DNOW},
{"ADOX_ADCX", XED_CATEGORY_ADOX_ADCX},
{"AES", XED_CATEGORY_AES},
{"AMX_TILE", XED_CATEGORY_AMX_TILE},
{"AVX", XED_CATEGORY_AVX},
{"AVX2", XED_CATEGORY_AVX2},
{"AVX2GATHER", XED_CATEGORY_AVX2GATHER},
{"AVX512", XED_CATEGORY_AVX512},
{"AVX512_4FMAPS", XED_CATEGORY_AVX512_4FMAPS},
{"AVX512_4VNNIW", XED_CATEGORY_AVX512_4VNNIW},
{"AVX512_BITALG", XED_CATEGORY_AVX512_BITALG},
{"AVX512_VBMI", XED_CATEGORY_AVX512_VBMI},
{"AVX512_VP2INTERSECT", XED_CATEGORY_AVX512_VP2INTERSECT},
{"BINARY", XED_CATEGORY_BINARY},
{"BITBYTE", XED_CATEGORY_BITBYTE},
{"BLEND", XED_CATEGORY_BLEND},
{"BMI1", XED_CATEGORY_BMI1},
{"BMI2", XED_CATEGORY_BMI2},
{"BROADCAST", XED_CATEGORY_BROADCAST},
{"CALL", XED_CATEGORY_CALL},
{"CET", XED_CATEGORY_CET},
{"CLDEMOTE", XED_CATEGORY_CLDEMOTE},
{"CLFLUSHOPT", XED_CATEGORY_CLFLUSHOPT},
{"CLWB", XED_CATEGORY_CLWB},
{"CLZERO", XED_CATEGORY_CLZERO},
{"CMOV", XED_CATEGORY_CMOV},
{"COMPRESS", XED_CATEGORY_COMPRESS},
{"COND_BR", XED_CATEGORY_COND_BR},
{"CONFLICT", XED_CATEGORY_CONFLICT},
{"CONVERT", XED_CATEGORY_CONVERT},
{"DATAXFER", XED_CATEGORY_DATAXFER},
{"DECIMAL", XED_CATEGORY_DECIMAL},
{"ENQCMD", XED_CATEGORY_ENQCMD},
{"EXPAND", XED_CATEGORY_EXPAND},
{"FCMOV", XED_CATEGORY_FCMOV},
{"FLAGOP", XED_CATEGORY_FLAGOP},
{"FMA4", XED_CATEGORY_FMA4},
{"FP16", XED_CATEGORY_FP16},
{"GATHER", XED_CATEGORY_GATHER},
{"GFNI", XED_CATEGORY_GFNI},
{"HRESET", XED_CATEGORY_HRESET},
{"IFMA", XED_CATEGORY_IFMA},
{"INTERRUPT", XED_CATEGORY_INTERRUPT},
{"IO", XED_CATEGORY_IO},
{"IOSTRINGOP", XED_CATEGORY_IOSTRINGOP},
{"KEYLOCKER", XED_CATEGORY_KEYLOCKER},
{"KEYLOCKER_WIDE", XED_CATEGORY_KEYLOCKER_WIDE},
{"KMASK", XED_CATEGORY_KMASK},
{"LEGACY", XED_CATEGORY_LEGACY},
{"LOGICAL", XED_CATEGORY_LOGICAL},
{"LOGICAL_FP", XED_CATEGORY_LOGICAL_FP},
{"LZCNT", XED_CATEGORY_LZCNT},
{"MISC", XED_CATEGORY_MISC},
{"MMX", XED_CATEGORY_MMX},
{"MOVDIR", XED_CATEGORY_MOVDIR},
{"MPX", XED_CATEGORY_MPX},
{"NOP", XED_CATEGORY_NOP},
{"PCLMULQDQ", XED_CATEGORY_PCLMULQDQ},
{"PCONFIG", XED_CATEGORY_PCONFIG},
{"PKU", XED_CATEGORY_PKU},
{"POP", XED_CATEGORY_POP},
{"PREFETCH", XED_CATEGORY_PREFETCH},
{"PREFETCHWT1", XED_CATEGORY_PREFETCHWT1},
{"PTWRITE", XED_CATEGORY_PTWRITE},
{"PUSH", XED_CATEGORY_PUSH},
{"RDPID", XED_CATEGORY_RDPID},
{"RDPRU", XED_CATEGORY_RDPRU},
{"RDRAND", XED_CATEGORY_RDRAND},
{"RDSEED", XED_CATEGORY_RDSEED},
{"RDWRFSGS", XED_CATEGORY_RDWRFSGS},
{"RET", XED_CATEGORY_RET},
{"ROTATE", XED_CATEGORY_ROTATE},
{"SCATTER", XED_CATEGORY_SCATTER},
{"SEGOP", XED_CATEGORY_SEGOP},
{"SEMAPHORE", XED_CATEGORY_SEMAPHORE},
{"SERIALIZE", XED_CATEGORY_SERIALIZE},
{"SETCC", XED_CATEGORY_SETCC},
{"SGX", XED_CATEGORY_SGX},
{"SHA", XED_CATEGORY_SHA},
{"SHIFT", XED_CATEGORY_SHIFT},
{"SMAP", XED_CATEGORY_SMAP},
{"SSE", XED_CATEGORY_SSE},
{"STRINGOP", XED_CATEGORY_STRINGOP},
{"STTNI", XED_CATEGORY_STTNI},
{"SYSCALL", XED_CATEGORY_SYSCALL},
{"SYSRET", XED_CATEGORY_SYSRET},
{"SYSTEM", XED_CATEGORY_SYSTEM},
{"TBM", XED_CATEGORY_TBM},
{"TSX_LDTRK", XED_CATEGORY_TSX_LDTRK},
{"UINTR", XED_CATEGORY_UINTR},
{"UNCOND_BR", XED_CATEGORY_UNCOND_BR},
{"VAES", XED_CATEGORY_VAES},
{"VBMI2", XED_CATEGORY_VBMI2},
{"VEX", XED_CATEGORY_VEX},
{"VFMA", XED_CATEGORY_VFMA},
{"VIA_PADLOCK", XED_CATEGORY_VIA_PADLOCK},
{"VPCLMULQDQ", XED_CATEGORY_VPCLMULQDQ},
{"VTX", XED_CATEGORY_VTX},
{"WAITPKG", XED_CATEGORY_WAITPKG},
{"WIDENOP", XED_CATEGORY_WIDENOP},
{"X87_ALU", XED_CATEGORY_X87_ALU},
{"XOP", XED_CATEGORY_XOP},
{"XSAVE", XED_CATEGORY_XSAVE},
{"XSAVEOPT", XED_CATEGORY_XSAVEOPT},
{"LAST", XED_CATEGORY_LAST},
{0, XED_CATEGORY_LAST},
};
xed_category_enum_t str2xed_category_enum_t(const char* s)
{
const name_table_xed_category_enum_t* p = name_array_xed_category_enum_t;
while( p->name ) {
if (strcmp(p->name,s) == 0) {
return p->value;
}
p++;
}
return XED_CATEGORY_INVALID;
}
const char* xed_category_enum_t2str(const xed_category_enum_t p)
{
xed_category_enum_t type_idx = p;
if ( p > XED_CATEGORY_LAST) type_idx = XED_CATEGORY_LAST;
return name_array_xed_category_enum_t[type_idx].name;
}
xed_category_enum_t xed_category_enum_t_last(void) {
return XED_CATEGORY_LAST;
}
/*
Here is a skeleton switch statement embedded in a comment
switch(p) {
case XED_CATEGORY_INVALID:
case XED_CATEGORY_3DNOW:
case XED_CATEGORY_ADOX_ADCX:
case XED_CATEGORY_AES:
case XED_CATEGORY_AMX_TILE:
case XED_CATEGORY_AVX:
case XED_CATEGORY_AVX2:
case XED_CATEGORY_AVX2GATHER:
case XED_CATEGORY_AVX512:
case XED_CATEGORY_AVX512_4FMAPS:
case XED_CATEGORY_AVX512_4VNNIW:
case XED_CATEGORY_AVX512_BITALG:
case XED_CATEGORY_AVX512_VBMI:
case XED_CATEGORY_AVX512_VP2INTERSECT:
case XED_CATEGORY_BINARY:
case XED_CATEGORY_BITBYTE:
case XED_CATEGORY_BLEND:
case XED_CATEGORY_BMI1:
case XED_CATEGORY_BMI2:
case XED_CATEGORY_BROADCAST:
case XED_CATEGORY_CALL:
case XED_CATEGORY_CET:
case XED_CATEGORY_CLDEMOTE:
case XED_CATEGORY_CLFLUSHOPT:
case XED_CATEGORY_CLWB:
case XED_CATEGORY_CLZERO:
case XED_CATEGORY_CMOV:
case XED_CATEGORY_COMPRESS:
case XED_CATEGORY_COND_BR:
case XED_CATEGORY_CONFLICT:
case XED_CATEGORY_CONVERT:
case XED_CATEGORY_DATAXFER:
case XED_CATEGORY_DECIMAL:
case XED_CATEGORY_ENQCMD:
case XED_CATEGORY_EXPAND:
case XED_CATEGORY_FCMOV:
case XED_CATEGORY_FLAGOP:
case XED_CATEGORY_FMA4:
case XED_CATEGORY_FP16:
case XED_CATEGORY_GATHER:
case XED_CATEGORY_GFNI:
case XED_CATEGORY_HRESET:
case XED_CATEGORY_IFMA:
case XED_CATEGORY_INTERRUPT:
case XED_CATEGORY_IO:
case XED_CATEGORY_IOSTRINGOP:
case XED_CATEGORY_KEYLOCKER:
case XED_CATEGORY_KEYLOCKER_WIDE:
case XED_CATEGORY_KMASK:
case XED_CATEGORY_LEGACY:
case XED_CATEGORY_LOGICAL:
case XED_CATEGORY_LOGICAL_FP:
case XED_CATEGORY_LZCNT:
case XED_CATEGORY_MISC:
case XED_CATEGORY_MMX:
case XED_CATEGORY_MOVDIR:
case XED_CATEGORY_MPX:
case XED_CATEGORY_NOP:
case XED_CATEGORY_PCLMULQDQ:
case XED_CATEGORY_PCONFIG:
case XED_CATEGORY_PKU:
case XED_CATEGORY_POP:
case XED_CATEGORY_PREFETCH:
case XED_CATEGORY_PREFETCHWT1:
case XED_CATEGORY_PTWRITE:
case XED_CATEGORY_PUSH:
case XED_CATEGORY_RDPID:
case XED_CATEGORY_RDPRU:
case XED_CATEGORY_RDRAND:
case XED_CATEGORY_RDSEED:
case XED_CATEGORY_RDWRFSGS:
case XED_CATEGORY_RET:
case XED_CATEGORY_ROTATE:
case XED_CATEGORY_SCATTER:
case XED_CATEGORY_SEGOP:
case XED_CATEGORY_SEMAPHORE:
case XED_CATEGORY_SERIALIZE:
case XED_CATEGORY_SETCC:
case XED_CATEGORY_SGX:
case XED_CATEGORY_SHA:
case XED_CATEGORY_SHIFT:
case XED_CATEGORY_SMAP:
case XED_CATEGORY_SSE:
case XED_CATEGORY_STRINGOP:
case XED_CATEGORY_STTNI:
case XED_CATEGORY_SYSCALL:
case XED_CATEGORY_SYSRET:
case XED_CATEGORY_SYSTEM:
case XED_CATEGORY_TBM:
case XED_CATEGORY_TSX_LDTRK:
case XED_CATEGORY_UINTR:
case XED_CATEGORY_UNCOND_BR:
case XED_CATEGORY_VAES:
case XED_CATEGORY_VBMI2:
case XED_CATEGORY_VEX:
case XED_CATEGORY_VFMA:
case XED_CATEGORY_VIA_PADLOCK:
case XED_CATEGORY_VPCLMULQDQ:
case XED_CATEGORY_VTX:
case XED_CATEGORY_WAITPKG:
case XED_CATEGORY_WIDENOP:
case XED_CATEGORY_X87_ALU:
case XED_CATEGORY_XOP:
case XED_CATEGORY_XSAVE:
case XED_CATEGORY_XSAVEOPT:
case XED_CATEGORY_LAST:
default:
xed_assert(0);
}
*/