Jelajahi Sumber

Merged revisions 8040 via svnmerge from
svn+ssh://[email protected]/FPC/svn/fpc/trunk

........
r8040 | florian | 2007-07-13 23:16:48 +0200 (Fri, 13 Jul 2007) | 2 lines

* improved SSE check by Martin Schreiber

........

git-svn-id: branches/fixes_2_2@8096 -

joost 18 tahun lalu
induk
melakukan
d21b29ffef
1 mengubah file dengan 13 tambahan dan 9 penghapusan
  1. 13 9
      rtl/i386/i386.inc

+ 13 - 9
rtl/i386/i386.inc

@@ -1216,15 +1216,19 @@ Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
 procedure fpc_cpucodeinit;
   begin
     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;
     SysResetFPU;
 {$ifdef USE_FASTMOVE}