Browse Source

Add xcr0 (os support) check

tags/v0.3.6^2
Martin Kroeker GitHub 6 years ago
parent
commit
68eb3146ce
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      cpuid_x86.c

+ 2
- 0
cpuid_x86.c View File

@@ -239,6 +239,8 @@ int support_avx512(){
ret=0; //OS does not even support AVX2
}
if((ebx & (1<<31)) != 0){
xgetbv(0, &eax, &edx);
if((eax & 0xe0) == 0xe0)
ret=1; //OS supports AVX512VL
}
return ret;


Loading…
Cancel
Save