diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-06-05 06:42:20 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-07-23 05:12:51 -0700 |
commit | 7c124e3714c38157230ed1a5d743b37defe64dc2 (patch) | |
tree | f1e13e18239c4421675234b56d880ae081d4bdcd /sysdeps/x86/tst-get-cpu-features.c | |
parent | 5b8d271571434a74b2464c278eafe2ff81f31029 (diff) | |
download | glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.tar.gz glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.tar.xz glibc-7c124e3714c38157230ed1a5d743b37defe64dc2.zip |
x86: Install <bits/platform/x86.h> [BZ #27958]
1. Install <bits/platform/x86.h> for <sys/platform/x86.h> which includes <bits/platform/x86.h>. 2. Rename HAS_CPU_FEATURE to CPU_FEATURE_PRESENT which checks if the processor has the feature. 3. Rename CPU_FEATURE_USABLE to CPU_FEATURE_ACTIVE which checks if the feature is active. There may be other preconditions, like sufficient stack space or further setup for AMX, which must be satisfied before the feature can be used. This fixes BZ #27958. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/x86/tst-get-cpu-features.c')
-rw-r--r-- | sysdeps/x86/tst-get-cpu-features.c | 670 |
1 files changed, 335 insertions, 335 deletions
diff --git a/sysdeps/x86/tst-get-cpu-features.c b/sysdeps/x86/tst-get-cpu-features.c index 11fa3054b9..b833811e8a 100644 --- a/sysdeps/x86/tst-get-cpu-features.c +++ b/sysdeps/x86/tst-get-cpu-features.c @@ -21,353 +21,353 @@ #include <sys/platform/x86.h> #include <support/check.h> -#define CHECK_CPU_FEATURE(name) \ - { \ - if (HAS_CPU_FEATURE (name)) \ - printf (" " #name "\n"); \ +#define CHECK_CPU_FEATURE_PRESENT(name) \ + { \ + if (CPU_FEATURE_PRESENT (name)) \ + printf (" " #name "\n"); \ } -#define CHECK_CPU_FEATURE_USABLE(name) \ - { \ - if (CPU_FEATURE_USABLE(name)) \ - printf (" " #name "\n"); \ +#define CHECK_CPU_FEATURE_ACTIVE(name) \ + { \ + if (CPU_FEATURE_ACTIVE(name)) \ + printf (" " #name "\n"); \ } static int do_test (void) { #ifdef __SSE2__ - TEST_VERIFY_EXIT (HAS_CPU_FEATURE (SSE2)); + TEST_VERIFY_EXIT (CPU_FEATURE_PRESENT (SSE2)); #endif printf ("CPU features:\n"); - CHECK_CPU_FEATURE (SSE3); - CHECK_CPU_FEATURE (PCLMULQDQ); - CHECK_CPU_FEATURE (DTES64); - CHECK_CPU_FEATURE (MONITOR); - CHECK_CPU_FEATURE (DS_CPL); - CHECK_CPU_FEATURE (VMX); - CHECK_CPU_FEATURE (SMX); - CHECK_CPU_FEATURE (EIST); - CHECK_CPU_FEATURE (TM2); - CHECK_CPU_FEATURE (SSSE3); - CHECK_CPU_FEATURE (CNXT_ID); - CHECK_CPU_FEATURE (SDBG); - CHECK_CPU_FEATURE (FMA); - CHECK_CPU_FEATURE (CMPXCHG16B); - CHECK_CPU_FEATURE (XTPRUPDCTRL); - CHECK_CPU_FEATURE (PDCM); - CHECK_CPU_FEATURE (PCID); - CHECK_CPU_FEATURE (DCA); - CHECK_CPU_FEATURE (SSE4_1); - CHECK_CPU_FEATURE (SSE4_2); - CHECK_CPU_FEATURE (X2APIC); - CHECK_CPU_FEATURE (MOVBE); - CHECK_CPU_FEATURE (POPCNT); - CHECK_CPU_FEATURE (TSC_DEADLINE); - CHECK_CPU_FEATURE (AES); - CHECK_CPU_FEATURE (XSAVE); - CHECK_CPU_FEATURE (OSXSAVE); - CHECK_CPU_FEATURE (AVX); - CHECK_CPU_FEATURE (F16C); - CHECK_CPU_FEATURE (RDRAND); - CHECK_CPU_FEATURE (FPU); - CHECK_CPU_FEATURE (VME); - CHECK_CPU_FEATURE (DE); - CHECK_CPU_FEATURE (PSE); - CHECK_CPU_FEATURE (TSC); - CHECK_CPU_FEATURE (MSR); - CHECK_CPU_FEATURE (PAE); - CHECK_CPU_FEATURE (MCE); - CHECK_CPU_FEATURE (CX8); - CHECK_CPU_FEATURE (APIC); - CHECK_CPU_FEATURE (SEP); - CHECK_CPU_FEATURE (MTRR); - CHECK_CPU_FEATURE (PGE); - CHECK_CPU_FEATURE (MCA); - CHECK_CPU_FEATURE (CMOV); - CHECK_CPU_FEATURE (PAT); - CHECK_CPU_FEATURE (PSE_36); - CHECK_CPU_FEATURE (PSN); - CHECK_CPU_FEATURE (CLFSH); - CHECK_CPU_FEATURE (DS); - CHECK_CPU_FEATURE (ACPI); - CHECK_CPU_FEATURE (MMX); - CHECK_CPU_FEATURE (FXSR); - CHECK_CPU_FEATURE (SSE); - CHECK_CPU_FEATURE (SSE2); - CHECK_CPU_FEATURE (SS); - CHECK_CPU_FEATURE (HTT); - CHECK_CPU_FEATURE (TM); - CHECK_CPU_FEATURE (PBE); - CHECK_CPU_FEATURE (FSGSBASE); - CHECK_CPU_FEATURE (TSC_ADJUST); - CHECK_CPU_FEATURE (SGX); - CHECK_CPU_FEATURE (BMI1); - CHECK_CPU_FEATURE (HLE); - CHECK_CPU_FEATURE (AVX2); - CHECK_CPU_FEATURE (SMEP); - CHECK_CPU_FEATURE (BMI2); - CHECK_CPU_FEATURE (ERMS); - CHECK_CPU_FEATURE (INVPCID); - CHECK_CPU_FEATURE (RTM); - CHECK_CPU_FEATURE (RDT_M); - CHECK_CPU_FEATURE (DEPR_FPU_CS_DS); - CHECK_CPU_FEATURE (MPX); - CHECK_CPU_FEATURE (RDT_A); - CHECK_CPU_FEATURE (AVX512F); - CHECK_CPU_FEATURE (AVX512DQ); - CHECK_CPU_FEATURE (RDSEED); - CHECK_CPU_FEATURE (ADX); - CHECK_CPU_FEATURE (SMAP); - CHECK_CPU_FEATURE (AVX512_IFMA); - CHECK_CPU_FEATURE (CLFLUSHOPT); - CHECK_CPU_FEATURE (CLWB); - CHECK_CPU_FEATURE (TRACE); - CHECK_CPU_FEATURE (AVX512PF); - CHECK_CPU_FEATURE (AVX512ER); - CHECK_CPU_FEATURE (AVX512CD); - CHECK_CPU_FEATURE (SHA); - CHECK_CPU_FEATURE (AVX512BW); - CHECK_CPU_FEATURE (AVX512VL); - CHECK_CPU_FEATURE (PREFETCHWT1); - CHECK_CPU_FEATURE (AVX512_VBMI); - CHECK_CPU_FEATURE (UMIP); - CHECK_CPU_FEATURE (PKU); - CHECK_CPU_FEATURE (OSPKE); - CHECK_CPU_FEATURE (WAITPKG); - CHECK_CPU_FEATURE (AVX512_VBMI2); - CHECK_CPU_FEATURE (SHSTK); - CHECK_CPU_FEATURE (GFNI); - CHECK_CPU_FEATURE (VAES); - CHECK_CPU_FEATURE (VPCLMULQDQ); - CHECK_CPU_FEATURE (AVX512_VNNI); - CHECK_CPU_FEATURE (AVX512_BITALG); - CHECK_CPU_FEATURE (AVX512_VPOPCNTDQ); - CHECK_CPU_FEATURE (RDPID); - CHECK_CPU_FEATURE (KL); - CHECK_CPU_FEATURE (CLDEMOTE); - CHECK_CPU_FEATURE (MOVDIRI); - CHECK_CPU_FEATURE (MOVDIR64B); - CHECK_CPU_FEATURE (ENQCMD); - CHECK_CPU_FEATURE (SGX_LC); - CHECK_CPU_FEATURE (PKS); - CHECK_CPU_FEATURE (AVX512_4VNNIW); - CHECK_CPU_FEATURE (AVX512_4FMAPS); - CHECK_CPU_FEATURE (FSRM); - CHECK_CPU_FEATURE (UINTR); - CHECK_CPU_FEATURE (AVX512_VP2INTERSECT); - CHECK_CPU_FEATURE (MD_CLEAR); - CHECK_CPU_FEATURE (RTM_ALWAYS_ABORT); - CHECK_CPU_FEATURE (SERIALIZE); - CHECK_CPU_FEATURE (HYBRID); - CHECK_CPU_FEATURE (TSXLDTRK); - CHECK_CPU_FEATURE (PCONFIG); - CHECK_CPU_FEATURE (IBT); - CHECK_CPU_FEATURE (AMX_BF16); - CHECK_CPU_FEATURE (AVX512_FP16); - CHECK_CPU_FEATURE (AMX_TILE); - CHECK_CPU_FEATURE (AMX_INT8); - CHECK_CPU_FEATURE (IBRS_IBPB); - CHECK_CPU_FEATURE (STIBP); - CHECK_CPU_FEATURE (L1D_FLUSH); - CHECK_CPU_FEATURE (ARCH_CAPABILITIES); - CHECK_CPU_FEATURE (CORE_CAPABILITIES); - CHECK_CPU_FEATURE (SSBD); - CHECK_CPU_FEATURE (LAHF64_SAHF64); - CHECK_CPU_FEATURE (SVM); - CHECK_CPU_FEATURE (LZCNT); - CHECK_CPU_FEATURE (SSE4A); - CHECK_CPU_FEATURE (PREFETCHW); - CHECK_CPU_FEATURE (XOP); - CHECK_CPU_FEATURE (LWP); - CHECK_CPU_FEATURE (FMA4); - CHECK_CPU_FEATURE (TBM); - CHECK_CPU_FEATURE (SYSCALL_SYSRET); - CHECK_CPU_FEATURE (NX); - CHECK_CPU_FEATURE (PAGE1GB); - CHECK_CPU_FEATURE (RDTSCP); - CHECK_CPU_FEATURE (LM); - CHECK_CPU_FEATURE (XSAVEOPT); - CHECK_CPU_FEATURE (XSAVEC); - CHECK_CPU_FEATURE (XGETBV_ECX_1); - CHECK_CPU_FEATURE (XSAVES); - CHECK_CPU_FEATURE (XFD); - CHECK_CPU_FEATURE (INVARIANT_TSC); - CHECK_CPU_FEATURE (WBNOINVD); - CHECK_CPU_FEATURE (AVX_VNNI); - CHECK_CPU_FEATURE (AVX512_BF16); - CHECK_CPU_FEATURE (FZLRM); - CHECK_CPU_FEATURE (FSRS); - CHECK_CPU_FEATURE (FSRCS); - CHECK_CPU_FEATURE (HRESET); - CHECK_CPU_FEATURE (LAM); - CHECK_CPU_FEATURE (AESKLE); - CHECK_CPU_FEATURE (WIDE_KL); - CHECK_CPU_FEATURE (PTWRITE); + CHECK_CPU_FEATURE_PRESENT (SSE3); + CHECK_CPU_FEATURE_PRESENT (PCLMULQDQ); + CHECK_CPU_FEATURE_PRESENT (DTES64); + CHECK_CPU_FEATURE_PRESENT (MONITOR); + CHECK_CPU_FEATURE_PRESENT (DS_CPL); + CHECK_CPU_FEATURE_PRESENT (VMX); + CHECK_CPU_FEATURE_PRESENT (SMX); + CHECK_CPU_FEATURE_PRESENT (EIST); + CHECK_CPU_FEATURE_PRESENT (TM2); + CHECK_CPU_FEATURE_PRESENT (SSSE3); + CHECK_CPU_FEATURE_PRESENT (CNXT_ID); + CHECK_CPU_FEATURE_PRESENT (SDBG); + CHECK_CPU_FEATURE_PRESENT (FMA); + CHECK_CPU_FEATURE_PRESENT (CMPXCHG16B); + CHECK_CPU_FEATURE_PRESENT (XTPRUPDCTRL); + CHECK_CPU_FEATURE_PRESENT (PDCM); + CHECK_CPU_FEATURE_PRESENT (PCID); + CHECK_CPU_FEATURE_PRESENT (DCA); + CHECK_CPU_FEATURE_PRESENT (SSE4_1); + CHECK_CPU_FEATURE_PRESENT (SSE4_2); + CHECK_CPU_FEATURE_PRESENT (X2APIC); + CHECK_CPU_FEATURE_PRESENT (MOVBE); + CHECK_CPU_FEATURE_PRESENT (POPCNT); + CHECK_CPU_FEATURE_PRESENT (TSC_DEADLINE); + CHECK_CPU_FEATURE_PRESENT (AES); + CHECK_CPU_FEATURE_PRESENT (XSAVE); + CHECK_CPU_FEATURE_PRESENT (OSXSAVE); + CHECK_CPU_FEATURE_PRESENT (AVX); + CHECK_CPU_FEATURE_PRESENT (F16C); + CHECK_CPU_FEATURE_PRESENT (RDRAND); + CHECK_CPU_FEATURE_PRESENT (FPU); + CHECK_CPU_FEATURE_PRESENT (VME); + CHECK_CPU_FEATURE_PRESENT (DE); + CHECK_CPU_FEATURE_PRESENT (PSE); + CHECK_CPU_FEATURE_PRESENT (TSC); + CHECK_CPU_FEATURE_PRESENT (MSR); + CHECK_CPU_FEATURE_PRESENT (PAE); + CHECK_CPU_FEATURE_PRESENT (MCE); + CHECK_CPU_FEATURE_PRESENT (CX8); + CHECK_CPU_FEATURE_PRESENT (APIC); + CHECK_CPU_FEATURE_PRESENT (SEP); + CHECK_CPU_FEATURE_PRESENT (MTRR); + CHECK_CPU_FEATURE_PRESENT (PGE); + CHECK_CPU_FEATURE_PRESENT (MCA); + CHECK_CPU_FEATURE_PRESENT (CMOV); + CHECK_CPU_FEATURE_PRESENT (PAT); + CHECK_CPU_FEATURE_PRESENT (PSE_36); + CHECK_CPU_FEATURE_PRESENT (PSN); + CHECK_CPU_FEATURE_PRESENT (CLFSH); + CHECK_CPU_FEATURE_PRESENT (DS); + CHECK_CPU_FEATURE_PRESENT (ACPI); + CHECK_CPU_FEATURE_PRESENT (MMX); + CHECK_CPU_FEATURE_PRESENT (FXSR); + CHECK_CPU_FEATURE_PRESENT (SSE); + CHECK_CPU_FEATURE_PRESENT (SSE2); + CHECK_CPU_FEATURE_PRESENT (SS); + CHECK_CPU_FEATURE_PRESENT (HTT); + CHECK_CPU_FEATURE_PRESENT (TM); + CHECK_CPU_FEATURE_PRESENT (PBE); + CHECK_CPU_FEATURE_PRESENT (FSGSBASE); + CHECK_CPU_FEATURE_PRESENT (TSC_ADJUST); + CHECK_CPU_FEATURE_PRESENT (SGX); + CHECK_CPU_FEATURE_PRESENT (BMI1); + CHECK_CPU_FEATURE_PRESENT (HLE); + CHECK_CPU_FEATURE_PRESENT (AVX2); + CHECK_CPU_FEATURE_PRESENT (SMEP); + CHECK_CPU_FEATURE_PRESENT (BMI2); + CHECK_CPU_FEATURE_PRESENT (ERMS); + CHECK_CPU_FEATURE_PRESENT (INVPCID); + CHECK_CPU_FEATURE_PRESENT (RTM); + CHECK_CPU_FEATURE_PRESENT (RDT_M); + CHECK_CPU_FEATURE_PRESENT (DEPR_FPU_CS_DS); + CHECK_CPU_FEATURE_PRESENT (MPX); + CHECK_CPU_FEATURE_PRESENT (RDT_A); + CHECK_CPU_FEATURE_PRESENT (AVX512F); + CHECK_CPU_FEATURE_PRESENT (AVX512DQ); + CHECK_CPU_FEATURE_PRESENT (RDSEED); + CHECK_CPU_FEATURE_PRESENT (ADX); + CHECK_CPU_FEATURE_PRESENT (SMAP); + CHECK_CPU_FEATURE_PRESENT (AVX512_IFMA); + CHECK_CPU_FEATURE_PRESENT (CLFLUSHOPT); + CHECK_CPU_FEATURE_PRESENT (CLWB); + CHECK_CPU_FEATURE_PRESENT (TRACE); + CHECK_CPU_FEATURE_PRESENT (AVX512PF); + CHECK_CPU_FEATURE_PRESENT (AVX512ER); + CHECK_CPU_FEATURE_PRESENT (AVX512CD); + CHECK_CPU_FEATURE_PRESENT (SHA); + CHECK_CPU_FEATURE_PRESENT (AVX512BW); + CHECK_CPU_FEATURE_PRESENT (AVX512VL); + CHECK_CPU_FEATURE_PRESENT (PREFETCHWT1); + CHECK_CPU_FEATURE_PRESENT (AVX512_VBMI); + CHECK_CPU_FEATURE_PRESENT (UMIP); + CHECK_CPU_FEATURE_PRESENT (PKU); + CHECK_CPU_FEATURE_PRESENT (OSPKE); + CHECK_CPU_FEATURE_PRESENT (WAITPKG); + CHECK_CPU_FEATURE_PRESENT (AVX512_VBMI2); + CHECK_CPU_FEATURE_PRESENT (SHSTK); + CHECK_CPU_FEATURE_PRESENT (GFNI); + CHECK_CPU_FEATURE_PRESENT (VAES); + CHECK_CPU_FEATURE_PRESENT (VPCLMULQDQ); + CHECK_CPU_FEATURE_PRESENT (AVX512_VNNI); + CHECK_CPU_FEATURE_PRESENT (AVX512_BITALG); + CHECK_CPU_FEATURE_PRESENT (AVX512_VPOPCNTDQ); + CHECK_CPU_FEATURE_PRESENT (RDPID); + CHECK_CPU_FEATURE_PRESENT (KL); + CHECK_CPU_FEATURE_PRESENT (CLDEMOTE); + CHECK_CPU_FEATURE_PRESENT (MOVDIRI); + CHECK_CPU_FEATURE_PRESENT (MOVDIR64B); + CHECK_CPU_FEATURE_PRESENT (ENQCMD); + CHECK_CPU_FEATURE_PRESENT (SGX_LC); + CHECK_CPU_FEATURE_PRESENT (PKS); + CHECK_CPU_FEATURE_PRESENT (AVX512_4VNNIW); + CHECK_CPU_FEATURE_PRESENT (AVX512_4FMAPS); + CHECK_CPU_FEATURE_PRESENT (FSRM); + CHECK_CPU_FEATURE_PRESENT (UINTR); + CHECK_CPU_FEATURE_PRESENT (AVX512_VP2INTERSECT); + CHECK_CPU_FEATURE_PRESENT (MD_CLEAR); + CHECK_CPU_FEATURE_PRESENT (RTM_ALWAYS_ABORT); + CHECK_CPU_FEATURE_PRESENT (SERIALIZE); + CHECK_CPU_FEATURE_PRESENT (HYBRID); + CHECK_CPU_FEATURE_PRESENT (TSXLDTRK); + CHECK_CPU_FEATURE_PRESENT (PCONFIG); + CHECK_CPU_FEATURE_PRESENT (IBT); + CHECK_CPU_FEATURE_PRESENT (AMX_BF16); + CHECK_CPU_FEATURE_PRESENT (AVX512_FP16); + CHECK_CPU_FEATURE_PRESENT (AMX_TILE); + CHECK_CPU_FEATURE_PRESENT (AMX_INT8); + CHECK_CPU_FEATURE_PRESENT (IBRS_IBPB); + CHECK_CPU_FEATURE_PRESENT (STIBP); + CHECK_CPU_FEATURE_PRESENT (L1D_FLUSH); + CHECK_CPU_FEATURE_PRESENT (ARCH_CAPABILITIES); + CHECK_CPU_FEATURE_PRESENT (CORE_CAPABILITIES); + CHECK_CPU_FEATURE_PRESENT (SSBD); + CHECK_CPU_FEATURE_PRESENT (LAHF64_SAHF64); + CHECK_CPU_FEATURE_PRESENT (SVM); + CHECK_CPU_FEATURE_PRESENT (LZCNT); + CHECK_CPU_FEATURE_PRESENT (SSE4A); + CHECK_CPU_FEATURE_PRESENT (PREFETCHW); + CHECK_CPU_FEATURE_PRESENT (XOP); + CHECK_CPU_FEATURE_PRESENT (LWP); + CHECK_CPU_FEATURE_PRESENT (FMA4); + CHECK_CPU_FEATURE_PRESENT (TBM); + CHECK_CPU_FEATURE_PRESENT (SYSCALL_SYSRET); + CHECK_CPU_FEATURE_PRESENT (NX); + CHECK_CPU_FEATURE_PRESENT (PAGE1GB); + CHECK_CPU_FEATURE_PRESENT (RDTSCP); + CHECK_CPU_FEATURE_PRESENT (LM); + CHECK_CPU_FEATURE_PRESENT (XSAVEOPT); + CHECK_CPU_FEATURE_PRESENT (XSAVEC); + CHECK_CPU_FEATURE_PRESENT (XGETBV_ECX_1); + CHECK_CPU_FEATURE_PRESENT (XSAVES); + CHECK_CPU_FEATURE_PRESENT (XFD); + CHECK_CPU_FEATURE_PRESENT (INVARIANT_TSC); + CHECK_CPU_FEATURE_PRESENT (WBNOINVD); + CHECK_CPU_FEATURE_PRESENT (AVX_VNNI); + CHECK_CPU_FEATURE_PRESENT (AVX512_BF16); + CHECK_CPU_FEATURE_PRESENT (FZLRM); + CHECK_CPU_FEATURE_PRESENT (FSRS); + CHECK_CPU_FEATURE_PRESENT (FSRCS); + CHECK_CPU_FEATURE_PRESENT (HRESET); + CHECK_CPU_FEATURE_PRESENT (LAM); + CHECK_CPU_FEATURE_PRESENT (AESKLE); + CHECK_CPU_FEATURE_PRESENT (WIDE_KL); + CHECK_CPU_FEATURE_PRESENT (PTWRITE); - printf ("Usable CPU features:\n"); - CHECK_CPU_FEATURE_USABLE (SSE3); - CHECK_CPU_FEATURE_USABLE (PCLMULQDQ); - CHECK_CPU_FEATURE_USABLE (DTES64); - CHECK_CPU_FEATURE_USABLE (MONITOR); - CHECK_CPU_FEATURE_USABLE (DS_CPL); - CHECK_CPU_FEATURE_USABLE (VMX); - CHECK_CPU_FEATURE_USABLE (SMX); - CHECK_CPU_FEATURE_USABLE (EIST); - CHECK_CPU_FEATURE_USABLE (TM2); - CHECK_CPU_FEATURE_USABLE (SSSE3); - CHECK_CPU_FEATURE_USABLE (CNXT_ID); - CHECK_CPU_FEATURE_USABLE (SDBG); - CHECK_CPU_FEATURE_USABLE (FMA); - CHECK_CPU_FEATURE_USABLE (CMPXCHG16B); - CHECK_CPU_FEATURE_USABLE (XTPRUPDCTRL); - CHECK_CPU_FEATURE_USABLE (PDCM); - CHECK_CPU_FEATURE_USABLE (PCID); - CHECK_CPU_FEATURE_USABLE (DCA); - CHECK_CPU_FEATURE_USABLE (SSE4_1); - CHECK_CPU_FEATURE_USABLE (SSE4_2); - CHECK_CPU_FEATURE_USABLE (X2APIC); - CHECK_CPU_FEATURE_USABLE (MOVBE); - CHECK_CPU_FEATURE_USABLE (POPCNT); - CHECK_CPU_FEATURE_USABLE (TSC_DEADLINE); - CHECK_CPU_FEATURE_USABLE (AES); - CHECK_CPU_FEATURE_USABLE (XSAVE); - CHECK_CPU_FEATURE_USABLE (OSXSAVE); - CHECK_CPU_FEATURE_USABLE (AVX); - CHECK_CPU_FEATURE_USABLE (F16C); - CHECK_CPU_FEATURE_USABLE (RDRAND); - CHECK_CPU_FEATURE_USABLE (FPU); - CHECK_CPU_FEATURE_USABLE (VME); - CHECK_CPU_FEATURE_USABLE (DE); - CHECK_CPU_FEATURE_USABLE (PSE); - CHECK_CPU_FEATURE_USABLE (TSC); - CHECK_CPU_FEATURE_USABLE (MSR); - CHECK_CPU_FEATURE_USABLE (PAE); - CHECK_CPU_FEATURE_USABLE (MCE); - CHECK_CPU_FEATURE_USABLE (CX8); - CHECK_CPU_FEATURE_USABLE (APIC); - CHECK_CPU_FEATURE_USABLE (SEP); - CHECK_CPU_FEATURE_USABLE (MTRR); - CHECK_CPU_FEATURE_USABLE (PGE); - CHECK_CPU_FEATURE_USABLE (MCA); - CHECK_CPU_FEATURE_USABLE (CMOV); - CHECK_CPU_FEATURE_USABLE (PAT); - CHECK_CPU_FEATURE_USABLE (PSE_36); - CHECK_CPU_FEATURE_USABLE (PSN); - CHECK_CPU_FEATURE_USABLE (CLFSH); - CHECK_CPU_FEATURE_USABLE (DS); - CHECK_CPU_FEATURE_USABLE (ACPI); - CHECK_CPU_FEATURE_USABLE (MMX); - CHECK_CPU_FEATURE_USABLE (FXSR); - CHECK_CPU_FEATURE_USABLE (SSE); - CHECK_CPU_FEATURE_USABLE (SSE2); - CHECK_CPU_FEATURE_USABLE (SS); - CHECK_CPU_FEATURE_USABLE (HTT); - CHECK_CPU_FEATURE_USABLE (TM); - CHECK_CPU_FEATURE_USABLE (PBE); - CHECK_CPU_FEATURE_USABLE (FSGSBASE); - CHECK_CPU_FEATURE_USABLE (TSC_ADJUST); - CHECK_CPU_FEATURE_USABLE (SGX); - CHECK_CPU_FEATURE_USABLE (BMI1); - CHECK_CPU_FEATURE_USABLE (HLE); - CHECK_CPU_FEATURE_USABLE (AVX2); - CHECK_CPU_FEATURE_USABLE (SMEP); - CHECK_CPU_FEATURE_USABLE (BMI2); - CHECK_CPU_FEATURE_USABLE (ERMS); - CHECK_CPU_FEATURE_USABLE (INVPCID); - CHECK_CPU_FEATURE_USABLE (RTM); - CHECK_CPU_FEATURE_USABLE (RDT_M); - CHECK_CPU_FEATURE_USABLE (DEPR_FPU_CS_DS); - CHECK_CPU_FEATURE_USABLE (MPX); - CHECK_CPU_FEATURE_USABLE (RDT_A); - CHECK_CPU_FEATURE_USABLE (AVX512F); - CHECK_CPU_FEATURE_USABLE (AVX512DQ); - CHECK_CPU_FEATURE_USABLE (RDSEED); - CHECK_CPU_FEATURE_USABLE (ADX); - CHECK_CPU_FEATURE_USABLE (SMAP); - CHECK_CPU_FEATURE_USABLE (AVX512_IFMA); - CHECK_CPU_FEATURE_USABLE (CLFLUSHOPT); - CHECK_CPU_FEATURE_USABLE (CLWB); - CHECK_CPU_FEATURE_USABLE (TRACE); - CHECK_CPU_FEATURE_USABLE (AVX512PF); - CHECK_CPU_FEATURE_USABLE (AVX512ER); - CHECK_CPU_FEATURE_USABLE (AVX512CD); - CHECK_CPU_FEATURE_USABLE (SHA); - CHECK_CPU_FEATURE_USABLE (AVX512BW); - CHECK_CPU_FEATURE_USABLE (AVX512VL); - CHECK_CPU_FEATURE_USABLE (PREFETCHWT1); - CHECK_CPU_FEATURE_USABLE (AVX512_VBMI); - CHECK_CPU_FEATURE_USABLE (UMIP); - CHECK_CPU_FEATURE_USABLE (PKU); - CHECK_CPU_FEATURE_USABLE (OSPKE); - CHECK_CPU_FEATURE_USABLE (WAITPKG); - CHECK_CPU_FEATURE_USABLE (AVX512_VBMI2); - CHECK_CPU_FEATURE_USABLE (SHSTK); - CHECK_CPU_FEATURE_USABLE (GFNI); - CHECK_CPU_FEATURE_USABLE (VAES); - CHECK_CPU_FEATURE_USABLE (VPCLMULQDQ); - CHECK_CPU_FEATURE_USABLE (AVX512_VNNI); - CHECK_CPU_FEATURE_USABLE (AVX512_BITALG); - CHECK_CPU_FEATURE_USABLE (AVX512_VPOPCNTDQ); - CHECK_CPU_FEATURE_USABLE (RDPID); - CHECK_CPU_FEATURE_USABLE (KL); - CHECK_CPU_FEATURE_USABLE (CLDEMOTE); - CHECK_CPU_FEATURE_USABLE (MOVDIRI); - CHECK_CPU_FEATURE_USABLE (MOVDIR64B); - CHECK_CPU_FEATURE_USABLE (ENQCMD); - CHECK_CPU_FEATURE_USABLE (SGX_LC); - CHECK_CPU_FEATURE_USABLE (PKS); - CHECK_CPU_FEATURE_USABLE (AVX512_4VNNIW); - CHECK_CPU_FEATURE_USABLE (AVX512_4FMAPS); - CHECK_CPU_FEATURE_USABLE (FSRM); - CHECK_CPU_FEATURE_USABLE (AVX512_VP2INTERSECT); - CHECK_CPU_FEATURE_USABLE (MD_CLEAR); - CHECK_CPU_FEATURE_USABLE (RTM_ALWAYS_ABORT); - CHECK_CPU_FEATURE_USABLE (SERIALIZE); - CHECK_CPU_FEATURE_USABLE (HYBRID); - CHECK_CPU_FEATURE_USABLE (TSXLDTRK); - CHECK_CPU_FEATURE_USABLE (PCONFIG); - CHECK_CPU_FEATURE_USABLE (IBT); - CHECK_CPU_FEATURE_USABLE (AMX_BF16); - CHECK_CPU_FEATURE_USABLE (AVX512_FP16); - CHECK_CPU_FEATURE_USABLE (AMX_TILE); - CHECK_CPU_FEATURE_USABLE (AMX_INT8); - CHECK_CPU_FEATURE_USABLE (IBRS_IBPB); - CHECK_CPU_FEATURE_USABLE (STIBP); - CHECK_CPU_FEATURE_USABLE (L1D_FLUSH); - CHECK_CPU_FEATURE_USABLE (ARCH_CAPABILITIES); - CHECK_CPU_FEATURE_USABLE (CORE_CAPABILITIES); - CHECK_CPU_FEATURE_USABLE (SSBD); - CHECK_CPU_FEATURE_USABLE (LAHF64_SAHF64); - CHECK_CPU_FEATURE_USABLE (SVM); - CHECK_CPU_FEATURE_USABLE (LZCNT); - CHECK_CPU_FEATURE_USABLE (SSE4A); - CHECK_CPU_FEATURE_USABLE (PREFETCHW); - CHECK_CPU_FEATURE_USABLE (XOP); - CHECK_CPU_FEATURE_USABLE (LWP); - CHECK_CPU_FEATURE_USABLE (FMA4); - CHECK_CPU_FEATURE_USABLE (TBM); - CHECK_CPU_FEATURE_USABLE (SYSCALL_SYSRET); - CHECK_CPU_FEATURE_USABLE (NX); - CHECK_CPU_FEATURE_USABLE (PAGE1GB); - CHECK_CPU_FEATURE_USABLE (RDTSCP); - CHECK_CPU_FEATURE_USABLE (LM); - CHECK_CPU_FEATURE_USABLE (XSAVEOPT); - CHECK_CPU_FEATURE_USABLE (XSAVEC); - CHECK_CPU_FEATURE_USABLE (XGETBV_ECX_1); - CHECK_CPU_FEATURE_USABLE (XSAVES); - CHECK_CPU_FEATURE_USABLE (XFD); - CHECK_CPU_FEATURE_USABLE (INVARIANT_TSC); - CHECK_CPU_FEATURE_USABLE (WBNOINVD); - CHECK_CPU_FEATURE_USABLE (AVX_VNNI); - CHECK_CPU_FEATURE_USABLE (AVX512_BF16); - CHECK_CPU_FEATURE_USABLE (FZLRM); - CHECK_CPU_FEATURE_USABLE (FSRS); - CHECK_CPU_FEATURE_USABLE (FSRCS); - CHECK_CPU_FEATURE_USABLE (AESKLE); - CHECK_CPU_FEATURE_USABLE (WIDE_KL); - CHECK_CPU_FEATURE_USABLE (PTWRITE); + printf ("Possible CPU features:\n"); + CHECK_CPU_FEATURE_ACTIVE (SSE3); + CHECK_CPU_FEATURE_ACTIVE (PCLMULQDQ); + CHECK_CPU_FEATURE_ACTIVE (DTES64); + CHECK_CPU_FEATURE_ACTIVE (MONITOR); + CHECK_CPU_FEATURE_ACTIVE (DS_CPL); + CHECK_CPU_FEATURE_ACTIVE (VMX); + CHECK_CPU_FEATURE_ACTIVE (SMX); + CHECK_CPU_FEATURE_ACTIVE (EIST); + CHECK_CPU_FEATURE_ACTIVE (TM2); + CHECK_CPU_FEATURE_ACTIVE (SSSE3); + CHECK_CPU_FEATURE_ACTIVE (CNXT_ID); + CHECK_CPU_FEATURE_ACTIVE (SDBG); + CHECK_CPU_FEATURE_ACTIVE (FMA); + CHECK_CPU_FEATURE_ACTIVE (CMPXCHG16B); + CHECK_CPU_FEATURE_ACTIVE (XTPRUPDCTRL); + CHECK_CPU_FEATURE_ACTIVE (PDCM); + CHECK_CPU_FEATURE_ACTIVE (PCID); + CHECK_CPU_FEATURE_ACTIVE (DCA); + CHECK_CPU_FEATURE_ACTIVE (SSE4_1); + CHECK_CPU_FEATURE_ACTIVE (SSE4_2); + CHECK_CPU_FEATURE_ACTIVE (X2APIC); + CHECK_CPU_FEATURE_ACTIVE (MOVBE); + CHECK_CPU_FEATURE_ACTIVE (POPCNT); + CHECK_CPU_FEATURE_ACTIVE (TSC_DEADLINE); + CHECK_CPU_FEATURE_ACTIVE (AES); + CHECK_CPU_FEATURE_ACTIVE (XSAVE); + CHECK_CPU_FEATURE_ACTIVE (OSXSAVE); + CHECK_CPU_FEATURE_ACTIVE (AVX); + CHECK_CPU_FEATURE_ACTIVE (F16C); + CHECK_CPU_FEATURE_ACTIVE (RDRAND); + CHECK_CPU_FEATURE_ACTIVE (FPU); + CHECK_CPU_FEATURE_ACTIVE (VME); + CHECK_CPU_FEATURE_ACTIVE (DE); + CHECK_CPU_FEATURE_ACTIVE (PSE); + CHECK_CPU_FEATURE_ACTIVE (TSC); + CHECK_CPU_FEATURE_ACTIVE (MSR); + CHECK_CPU_FEATURE_ACTIVE (PAE); + CHECK_CPU_FEATURE_ACTIVE (MCE); + CHECK_CPU_FEATURE_ACTIVE (CX8); + CHECK_CPU_FEATURE_ACTIVE (APIC); + CHECK_CPU_FEATURE_ACTIVE (SEP); + CHECK_CPU_FEATURE_ACTIVE (MTRR); + CHECK_CPU_FEATURE_ACTIVE (PGE); + CHECK_CPU_FEATURE_ACTIVE (MCA); + CHECK_CPU_FEATURE_ACTIVE (CMOV); + CHECK_CPU_FEATURE_ACTIVE (PAT); + CHECK_CPU_FEATURE_ACTIVE (PSE_36); + CHECK_CPU_FEATURE_ACTIVE (PSN); + CHECK_CPU_FEATURE_ACTIVE (CLFSH); + CHECK_CPU_FEATURE_ACTIVE (DS); + CHECK_CPU_FEATURE_ACTIVE (ACPI); + CHECK_CPU_FEATURE_ACTIVE (MMX); + CHECK_CPU_FEATURE_ACTIVE (FXSR); + CHECK_CPU_FEATURE_ACTIVE (SSE); + CHECK_CPU_FEATURE_ACTIVE (SSE2); + CHECK_CPU_FEATURE_ACTIVE (SS); + CHECK_CPU_FEATURE_ACTIVE (HTT); + CHECK_CPU_FEATURE_ACTIVE (TM); + CHECK_CPU_FEATURE_ACTIVE (PBE); + CHECK_CPU_FEATURE_ACTIVE (FSGSBASE); + CHECK_CPU_FEATURE_ACTIVE (TSC_ADJUST); + CHECK_CPU_FEATURE_ACTIVE (SGX); + CHECK_CPU_FEATURE_ACTIVE (BMI1); + CHECK_CPU_FEATURE_ACTIVE (HLE); + CHECK_CPU_FEATURE_ACTIVE (AVX2); + CHECK_CPU_FEATURE_ACTIVE (SMEP); + CHECK_CPU_FEATURE_ACTIVE (BMI2); + CHECK_CPU_FEATURE_ACTIVE (ERMS); + CHECK_CPU_FEATURE_ACTIVE (INVPCID); + CHECK_CPU_FEATURE_ACTIVE (RTM); + CHECK_CPU_FEATURE_ACTIVE (RDT_M); + CHECK_CPU_FEATURE_ACTIVE (DEPR_FPU_CS_DS); + CHECK_CPU_FEATURE_ACTIVE (MPX); + CHECK_CPU_FEATURE_ACTIVE (RDT_A); + CHECK_CPU_FEATURE_ACTIVE (AVX512F); + CHECK_CPU_FEATURE_ACTIVE (AVX512DQ); + CHECK_CPU_FEATURE_ACTIVE (RDSEED); + CHECK_CPU_FEATURE_ACTIVE (ADX); + CHECK_CPU_FEATURE_ACTIVE (SMAP); + CHECK_CPU_FEATURE_ACTIVE (AVX512_IFMA); + CHECK_CPU_FEATURE_ACTIVE (CLFLUSHOPT); + CHECK_CPU_FEATURE_ACTIVE (CLWB); + CHECK_CPU_FEATURE_ACTIVE (TRACE); + CHECK_CPU_FEATURE_ACTIVE (AVX512PF); + CHECK_CPU_FEATURE_ACTIVE (AVX512ER); + CHECK_CPU_FEATURE_ACTIVE (AVX512CD); + CHECK_CPU_FEATURE_ACTIVE (SHA); + CHECK_CPU_FEATURE_ACTIVE (AVX512BW); + CHECK_CPU_FEATURE_ACTIVE (AVX512VL); + CHECK_CPU_FEATURE_ACTIVE (PREFETCHWT1); + CHECK_CPU_FEATURE_ACTIVE (AVX512_VBMI); + CHECK_CPU_FEATURE_ACTIVE (UMIP); + CHECK_CPU_FEATURE_ACTIVE (PKU); + CHECK_CPU_FEATURE_ACTIVE (OSPKE); + CHECK_CPU_FEATURE_ACTIVE (WAITPKG); + CHECK_CPU_FEATURE_ACTIVE (AVX512_VBMI2); + CHECK_CPU_FEATURE_ACTIVE (SHSTK); + CHECK_CPU_FEATURE_ACTIVE (GFNI); + CHECK_CPU_FEATURE_ACTIVE (VAES); + CHECK_CPU_FEATURE_ACTIVE (VPCLMULQDQ); + CHECK_CPU_FEATURE_ACTIVE (AVX512_VNNI); + CHECK_CPU_FEATURE_ACTIVE (AVX512_BITALG); + CHECK_CPU_FEATURE_ACTIVE (AVX512_VPOPCNTDQ); + CHECK_CPU_FEATURE_ACTIVE (RDPID); + CHECK_CPU_FEATURE_ACTIVE (KL); + CHECK_CPU_FEATURE_ACTIVE (CLDEMOTE); + CHECK_CPU_FEATURE_ACTIVE (MOVDIRI); + CHECK_CPU_FEATURE_ACTIVE (MOVDIR64B); + CHECK_CPU_FEATURE_ACTIVE (ENQCMD); + CHECK_CPU_FEATURE_ACTIVE (SGX_LC); + CHECK_CPU_FEATURE_ACTIVE (PKS); + CHECK_CPU_FEATURE_ACTIVE (AVX512_4VNNIW); + CHECK_CPU_FEATURE_ACTIVE (AVX512_4FMAPS); + CHECK_CPU_FEATURE_ACTIVE (FSRM); + CHECK_CPU_FEATURE_ACTIVE (AVX512_VP2INTERSECT); + CHECK_CPU_FEATURE_ACTIVE (MD_CLEAR); + CHECK_CPU_FEATURE_ACTIVE (RTM_ALWAYS_ABORT); + CHECK_CPU_FEATURE_ACTIVE (SERIALIZE); + CHECK_CPU_FEATURE_ACTIVE (HYBRID); + CHECK_CPU_FEATURE_ACTIVE (TSXLDTRK); + CHECK_CPU_FEATURE_ACTIVE (PCONFIG); + CHECK_CPU_FEATURE_ACTIVE (IBT); + CHECK_CPU_FEATURE_ACTIVE (AMX_BF16); + CHECK_CPU_FEATURE_ACTIVE (AVX512_FP16); + CHECK_CPU_FEATURE_ACTIVE (AMX_TILE); + CHECK_CPU_FEATURE_ACTIVE (AMX_INT8); + CHECK_CPU_FEATURE_ACTIVE (IBRS_IBPB); + CHECK_CPU_FEATURE_ACTIVE (STIBP); + CHECK_CPU_FEATURE_ACTIVE (L1D_FLUSH); + CHECK_CPU_FEATURE_ACTIVE (ARCH_CAPABILITIES); + CHECK_CPU_FEATURE_ACTIVE (CORE_CAPABILITIES); + CHECK_CPU_FEATURE_ACTIVE (SSBD); + CHECK_CPU_FEATURE_ACTIVE (LAHF64_SAHF64); + CHECK_CPU_FEATURE_ACTIVE (SVM); + CHECK_CPU_FEATURE_ACTIVE (LZCNT); + CHECK_CPU_FEATURE_ACTIVE (SSE4A); + CHECK_CPU_FEATURE_ACTIVE (PREFETCHW); + CHECK_CPU_FEATURE_ACTIVE (XOP); + CHECK_CPU_FEATURE_ACTIVE (LWP); + CHECK_CPU_FEATURE_ACTIVE (FMA4); + CHECK_CPU_FEATURE_ACTIVE (TBM); + CHECK_CPU_FEATURE_ACTIVE (SYSCALL_SYSRET); + CHECK_CPU_FEATURE_ACTIVE (NX); + CHECK_CPU_FEATURE_ACTIVE (PAGE1GB); + CHECK_CPU_FEATURE_ACTIVE (RDTSCP); + CHECK_CPU_FEATURE_ACTIVE (LM); + CHECK_CPU_FEATURE_ACTIVE (XSAVEOPT); + CHECK_CPU_FEATURE_ACTIVE (XSAVEC); + CHECK_CPU_FEATURE_ACTIVE (XGETBV_ECX_1); + CHECK_CPU_FEATURE_ACTIVE (XSAVES); + CHECK_CPU_FEATURE_ACTIVE (XFD); + CHECK_CPU_FEATURE_ACTIVE (INVARIANT_TSC); + CHECK_CPU_FEATURE_ACTIVE (WBNOINVD); + CHECK_CPU_FEATURE_ACTIVE (AVX_VNNI); + CHECK_CPU_FEATURE_ACTIVE (AVX512_BF16); + CHECK_CPU_FEATURE_ACTIVE (FZLRM); + CHECK_CPU_FEATURE_ACTIVE (FSRS); + CHECK_CPU_FEATURE_ACTIVE (FSRCS); + CHECK_CPU_FEATURE_ACTIVE (AESKLE); + CHECK_CPU_FEATURE_ACTIVE (WIDE_KL); + CHECK_CPU_FEATURE_ACTIVE (PTWRITE); return 0; } |