2#define XBYAK_NO_OP_NAMES
5#define NUM_OF_ARRAY(x) (sizeof(x) / sizeof(x[0]))
20 printf(
"vendor %s\n", cpu.
has(Cpu::tINTEL) ?
"intel" :
"amd");
26 { Cpu::tMMX2,
"mmx2" },
27 { Cpu::tCMOV,
"cmov" },
29 { Cpu::tSSE2,
"sse2" },
30 { Cpu::tSSE3,
"sse3" },
31 { Cpu::tSSSE3,
"ssse3" },
32 { Cpu::tSSE41,
"sse41" },
33 { Cpu::tSSE42,
"sse42" },
34 { Cpu::tPOPCNT,
"popcnt" },
36 { Cpu::tE3DN,
"e3dn" },
37 { Cpu::tSSE4a,
"sse4a" },
38 { Cpu::tSSE5,
"sse5" },
39 { Cpu::tAESNI,
"aesni" },
40 { Cpu::tRDTSCP,
"rdtscp" },
41 { Cpu::tOSXSAVE,
"osxsave(xgetvb)" },
42 { Cpu::tPCLMULQDQ,
"pclmulqdq" },
45 { Cpu::tAVX2,
"avx2" },
46 { Cpu::tBMI1,
"bmi1" },
47 { Cpu::tBMI2,
"bmi2" },
48 { Cpu::tLZCNT,
"lzcnt" },
49 { Cpu::tPREFETCHW,
"prefetchw" },
50 { Cpu::tENHANCED_REP,
"enh_rep" },
51 { Cpu::tRDRAND,
"rdrand" },
53 { Cpu::tRDSEED,
"rdseed" },
54 { Cpu::tSMAP,
"smap" },
59 { Cpu::tPREFETCHWT1,
"prefetchwt1" },
60 { Cpu::tF16C,
"f16c" },
61 { Cpu::tMOVBE,
"movbe" },
62 { Cpu::tAVX512F,
"avx512f" },
63 { Cpu::tAVX512DQ,
"avx512dq" },
64 { Cpu::tAVX512IFMA,
"avx512_ifma" },
65 { Cpu::tAVX512PF,
"avx512pf" },
66 { Cpu::tAVX512ER,
"avx512er" },
67 { Cpu::tAVX512CD,
"avx512cd" },
68 { Cpu::tAVX512BW,
"avx512bw" },
69 { Cpu::tAVX512VL,
"avx512vl" },
70 { Cpu::tAVX512VBMI,
"avx512_vbmi" },
71 { Cpu::tAVX512_4VNNIW,
"avx512_4vnniw" },
72 { Cpu::tAVX512_4FMAPS,
"avx512_4fmaps" },
74 { Cpu::tAVX512_VBMI2,
"avx512_vbmi2" },
75 { Cpu::tGFNI,
"gfni" },
76 { Cpu::tVAES,
"vaes" },
77 { Cpu::tVPCLMULQDQ,
"vpclmulqdq" },
78 { Cpu::tAVX512_VNNI,
"avx512_vnni" },
79 { Cpu::tAVX512_BITALG,
"avx512_bitalg" },
80 { Cpu::tAVX512_VPOPCNTDQ,
"avx512_vpopcntdq" },
83 if (cpu.
has(
tbl[i].type)) printf(
" %s",
tbl[i].str);
86 if (cpu.
has(Cpu::tPOPCNT)) {
87 const int n = 0x12345678;
93 printf(
"popcnt ng %d %d\n",
r, ok);
const uint8 * getCode() const
void mov(const Operand ®1, const Operand ®2)
void popcnt(const Reg ®, const Operand &op)
unsigned int getDataCacheLevels() const
bool has(Type type) const
unsigned int getCoresSharingDataCache(unsigned int i) const
unsigned int getDataCacheSize(unsigned int i) const