瀏覽代碼

* use DefaultCW to reload fpu settings

git-svn-id: trunk@5169 -
florian 19 年之前
父節點
當前提交
4ee9f1b394
共有 2 個文件被更改,包括 4 次插入6 次删除
  1. 3 1
      rtl/i386/i386.inc
  2. 1 5
      rtl/win32/signals.pp

+ 3 - 1
rtl/i386/i386.inc

@@ -1180,7 +1180,9 @@ const
   FPU_StackOverflow = $40;
   FPU_ExceptionMask = $ff;
 
+  { use Default8087CW instead
   fpucw : word = $1300 or FPU_StackUnderflow or FPU_Underflow or FPU_Denormal;
+  }
 
   MM_MaskInvalidOp = %0000000010000000;
   MM_MaskDenorm    = %0000000100000000;
@@ -1196,7 +1198,7 @@ Procedure SysResetFPU;{$ifdef SYSTEMINLINE}inline;{$endif}
   begin
     asm
       fninit
-      fldcw   fpucw
+      fldcw   Default8087CW
       fwait
     end;
     if has_sse_support then

+ 1 - 5
rtl/win32/signals.pp

@@ -175,7 +175,6 @@ var
   _SS : cardinal;
 
 const
-  fpucw : word = $1332;
   Exception_handler_installed : boolean = false;
   MAX_Level = 16;
   except_level : byte = 0;
@@ -205,10 +204,7 @@ var
 
       sigtype:=except_signal[except_level];
       if reset_fpu[except_level] then
-        asm
-          fninit
-          fldcw   fpucw
-        end;
+        SysResetFPU;
       if assigned(System_exception_frame) then
         { get the handler in front again }
         asm