Browse Source

* improved SSE check by Martin Schreiber

git-svn-id: trunk@8040 -
florian 18 years ago
parent
commit
6f6e60b723
1 changed files with 13 additions and 9 deletions
  1. 13 9
      rtl/i386/i386.inc

+ 13 - 9
rtl/i386/i386.inc

@@ -1236,15 +1236,19 @@ Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
 procedure fpc_cpucodeinit;
 procedure fpc_cpucodeinit;
   begin
   begin
     os_supports_sse:=true;
     os_supports_sse:=true;
-    sse_check:=true;
-    asm
-      { force an sse exception if no sse is supported, the exception handler sets
-        os_supports_sse to false then }
-      { don't change this instruction, the code above depends on its size }
-      movaps %xmm7, %xmm6
-    end;
-    sse_check:=false;
-    has_sse_support:=sse_support;
+    os_supports_sse:=sse_support;
+    if os_supports_sse then
+      begin
+        sse_check:=true;
+        asm
+          { force an sse exception if no sse is supported, the exception handler sets
+            os_supports_sse to false then }
+          { don't change this instruction, the code above depends on its size }
+          movaps %xmm7, %xmm6
+        end;
+        sse_check:=false;
+      end;
+    has_sse_support:=os_supports_sse;
     has_mmx_support:=mmx_support;
     has_mmx_support:=mmx_support;
     SysResetFPU;
     SysResetFPU;
 {$ifdef USE_FASTMOVE}
 {$ifdef USE_FASTMOVE}