This commit is contained in:
Frank Denis 2016-05-17 01:41:06 +02:00
parent 1b30cf14ed
commit efb81c7290

View File

@ -169,6 +169,7 @@ _sodium_runtime_intel_cpu_features(CPUFeatures * const cpu_features)
(defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86)))
if (cpu_features->has_avx) {
unsigned int cpu_info7[4];
_cpuid(cpu_info7, 0x00000007);
cpu_features->has_avx2 = ((cpu_info7[1] & CPUID_EBX_AVX2) != 0x0);
}