Page 1 of 1

CheckAVX

Posted: Mon Nov 03, 2014 8:06 pm
by oryaaaaa

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