Einzelnen Beitrag anzeigen

Benutzerbild von milos
milos

Registriert seit: 14. Jul 2008
Ort: Bern (CH)
508 Beiträge
 
Delphi 11 Alexandria
 
#1

AVX2 Support auslesen?

  Alt 23. Mär 2015, 07:57
Hallo,
ich habe mir eine Funktion aus dem Internet geholt die mir den Support für AVX ausliest.

Delphi-Quellcode:
function TForm1.FisAvxSupported: Boolean;
asm
{$IFDEF CPUX86}
    push ebx
{$ENDIF}
{$IFDEF CPUX64}
    mov r10, rbx
{$ENDIF}
    xor eax, eax
    cpuid
    cmp eax, 1
    jb @not_supported
    mov eax, 1
    cpuid
    and ecx, 018000000h
    cmp ecx, 018000000h
    jne @not_supported
    xor ecx, ecx
    db 0Fh, 01h, 0D0h //XGETBV
    and eax, 110b
    cmp eax, 110b
    jne @not_supported
    mov eax, 1
    jmp @done
@not_supported:
    xor eax, eax
@done:
{$IFDEF CPUX86}
    pop ebx
{$ENDIF}
{$IFDEF CPUX64}
    mov rbx, r10
{$ENDIF}
end;
Leider kann ich kein ASM und verstehe deshalb auch nicht was er da genau macht. Gibt es eine ähnliche Funktion wie diese für AVX2?

Freundliche Grüsse
Milos
  Mit Zitat antworten Zitat