Browse Source

* use SysResetFPU instead of inline assembler

git-svn-id: trunk@4545 -
florian 19 years ago
parent
commit
8573d3679e
1 changed files with 3 additions and 9 deletions
  1. 3 9
      rtl/win32/system.pp

+ 3 - 9
rtl/win32/system.pp

@@ -805,10 +805,8 @@ begin
         if IsConsole then
         if IsConsole then
           writeln(stderr,'In JumpToHandleErrorFrame error=',error);
           writeln(stderr,'In JumpToHandleErrorFrame error=',error);
 {$endif SYSTEMEXCEPTIONDEBUG}
 {$endif SYSTEMEXCEPTIONDEBUG}
-        if resetFPU[exceptLevel] then asm
-                fninit
-                fldcw   fpucw
-        end;
+        if resetFPU[exceptLevel] then
+          SysResetFPU;
         { build a fake stack }
         { build a fake stack }
         asm
         asm
 {$ifdef REGCALL}
 {$ifdef REGCALL}
@@ -1002,11 +1000,7 @@ procedure fpc_cpucodeinit;
     sse_check:=false;
     sse_check:=false;
     has_sse_support:=sse_support;
     has_sse_support:=sse_support;
     has_mmx_support:=mmx_support;
     has_mmx_support:=mmx_support;
-    { reset FPU }
-    asm
-      fninit
-      fldcw   fpucw
-    end;
+    SysResetFPU;
     setup_fastmove;
     setup_fastmove;
   end;
   end;