Browse Source

+ UseAVX check

git-svn-id: trunk@22642 -
florian 12 years ago
parent
commit
d7e0f07aab
1 changed files with 7 additions and 0 deletions
  1. 7 0
      compiler/x86/cgx86.pas

+ 7 - 0
compiler/x86/cgx86.pas

@@ -150,6 +150,8 @@ unit cgx86;
       winstackpagesize = 4096;
 {$endif NOTARGETWIN}
 
+    function UseAVX: boolean;
+
   implementation
 
     uses
@@ -158,6 +160,11 @@ unit cgx86;
        tgobj,ncgutil,
        fmodule,symsym;
 
+    function UseAVX: boolean;
+      begin
+        Result:=current_settings.fputype in [fpu_avx];
+      end;
+
     const
       TOpCG2AsmOp: Array[topcg] of TAsmOp = (A_NONE,A_MOV,A_ADD,A_AND,A_DIV,
                             A_IDIV,A_IMUL,A_MUL,A_NEG,A_NOT,A_OR,