Skip to content

Commit e1574fa

Browse files
authored
Add xcr0 (os support) check
1 parent 68eb314 commit e1574fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

driver/others/dynamic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ int support_avx512(){
332332
ret=0; //OS does not even support AVX2
333333
}
334334
if((ebx & (1<<31)) != 0){
335+
xgetbv(0, &eax, &edx);
336+
if((eax & 0xe0) == 0xe0)
335337
ret=1; //OS supports AVX512VL
336338
}
337339
return ret;

0 commit comments

Comments
 (0)