Fix AVX512 capability test (always returning zero)

from #2322
This commit is contained in:
Martin Kroeker 2019-11-23 22:38:07 +01:00 committed by GitHub
parent 04226f1e97
commit f95989cbc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -329,7 +329,7 @@ int support_avx512(){
if (!support_avx()) if (!support_avx())
return 0; return 0;
cpuid(7, &eax, &ebx, &ecx, &edx); cpuid(7, &eax, &ebx, &ecx, &edx);
if((ebx & (1<<7)) != 1){ if((ebx & (1<<7)) == 0){
ret=0; //OS does not even support AVX2 ret=0; //OS does not even support AVX2
} }
if((ebx & (1<<31)) != 0){ if((ebx & (1<<31)) != 0){