Преглед изворни кода

- Removed SysResetFPU/SysInitFPU from win32/win64 system unit initialization. It is redundant here because it is called from fpc_initializeunits->fpc_cpuinit (on win64) or from fpc_cpucodeinit (on win32).
* Also declared hprevinst as a typed constant and removed its initialization from code.

git-svn-id: trunk@19234 -

sergei пре 14 година
родитељ
комит
268d8685e7
2 измењених фајлова са 4 додато и 12 уклоњено
  1. 2 7
      rtl/win32/system.pp
  2. 2 5
      rtl/win64/system.pp

+ 2 - 7
rtl/win32/system.pp

@@ -97,12 +97,13 @@ var
   argv : ppchar; public name 'operatingsystem_parameter_argv';
 { Win32 Info }
   startupinfo : tstartupinfo;
-  hprevinst,
   MainInstance,
   cmdshow     : longint;
   DLLreason : longint; public name 'operatingsystem_dllreason';
   DLLparam : longint; public name 'operatingsystem_dllparam';
   StartupConsoleMode : DWORD;
+const
+  hprevinst: longint=0;
 
 type
   TDLL_Entry_Hook = procedure (dllparam : longint);
@@ -678,13 +679,7 @@ function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt;
 begin
   { get some helpful informations }
   GetStartupInfo(@startupinfo);
-
-  SysResetFPU;
-  if not(IsLibrary) then
-    SysInitFPU;
-
   { some misc Win32 stuff }
-  hprevinst:=0;
   if not IsLibrary then
     SysInstance:=getmodulehandle(nil);
 

+ 2 - 5
rtl/win64/system.pp

@@ -93,10 +93,11 @@ var
 { Win32 Info }
   startupinfo : tstartupinfo;
   StartupConsoleMode : dword;
-  hprevinst,
   MainInstance : qword;
   cmdshow     : longint;
   DLLreason,DLLparam:longint;
+const
+  hprevinst: qword=0;
 type
   TDLL_Entry_Hook = procedure (dllparam : longint);
 
@@ -614,16 +615,12 @@ end;
 
 
 begin
-  SysResetFPU;
-  if not(IsLibrary) then
-    SysInitFPU;
   { pass dummy value }
   StackLength := CheckInitialStkLen($1000000);
   StackBottom := StackTop - StackLength;
   { get some helpful informations }
   GetStartupInfo(@startupinfo);
   { some misc Win32 stuff }
-  hprevinst:=0;
   if not IsLibrary then
     SysInstance:=getmodulehandle(nil);
   MainInstance:=SysInstance;