Z_INTERNAL int x86_cpu_has_sse42;
Z_INTERNAL int x86_cpu_has_pclmulqdq;
Z_INTERNAL int x86_cpu_has_vpclmulqdq;
-Z_INTERNAL int x86_cpu_has_tzcnt;
Z_INTERNAL int x86_cpu_has_os_save_ymm;
Z_INTERNAL int x86_cpu_has_os_save_zmm;
// check BMI1 bit
// Reference: https://software.intel.com/sites/default/files/article/405250/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family.pdf
- x86_cpu_has_tzcnt = ebx & 0x8;
x86_cpu_has_vpclmulqdq = ecx & 0x400;
// check AVX2 bit if the OS supports saving YMM registers
x86_cpu_has_avx512vnni = 0;
}
} else {
- x86_cpu_has_tzcnt = 0;
x86_cpu_has_avx2 = 0;
x86_cpu_has_avx512 = 0;
x86_cpu_has_avx512vnni = 0;
extern int x86_cpu_has_sse42;
extern int x86_cpu_has_pclmulqdq;
extern int x86_cpu_has_vpclmulqdq;
-extern int x86_cpu_has_tzcnt;
extern int x86_cpu_has_os_save_ymm;
extern int x86_cpu_has_os_save_zmm;