- 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 -
This commit is contained in:
sergei 2011-09-25 19:27:52 +00:00
parent 028421ca6a
commit 268d8685e7
2 changed files with 4 additions and 12 deletions

View File

@ -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);

View File

@ -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;