Browse Source

+ also init Default8087CW in DetectFPU

git-svn-id: trunk@26201 -
nickysn 11 years ago
parent
commit
d0a7522e1f
1 changed files with 5 additions and 1 deletions
  1. 5 1
      rtl/i8086/i8086.inc

+ 5 - 1
rtl/i8086/i8086.inc

@@ -216,7 +216,7 @@ const
   fpucw : word = $1300 or FPU_StackUnderflow or FPU_Underflow or FPU_Denormal;
   fpucw : word = $1300 or FPU_StackUnderflow or FPU_Underflow or FPU_Denormal;
   }
   }
 
 
-{ Detects the FPU and initializes the Test8087 variable:
+{ Detects the FPU and initializes the Test8087 variable (and Default8087CW):
   0 = NO FPU
   0 = NO FPU
   1 = 8087
   1 = 8087
   2 = 80287
   2 = 80287
@@ -262,6 +262,10 @@ procedure DetectFPU;
 @@Done:
 @@Done:
       mov Test8087, bl
       mov Test8087, bl
     end ['AX','BX'];
     end ['AX','BX'];
+    if Test8087<=2 then
+      Default8087CW:=$1330
+    else
+      Default8087CW:=$1332;
   end;
   end;
 
 
 {$define FPC_SYSTEM_HAS_SYSINITFPU}
 {$define FPC_SYSTEM_HAS_SYSINITFPU}