Code: Select all
Procedure.b CheckAVX()
Protected avx.l
!MOV Eax, 1
!CPUID
!AND Ecx, 018000000h
!CMP Ecx, 018000000h
!JNE not_support
!MOV Ecx, 0
!xgetbv
!AND Eax, 06h
!MOV [p.v_avx], Eax
If avx = 6
ProcedureReturn #True
EndIf
!not_support:
ProcedureReturn #False
EndProcedure