* Removed SysInitFPU/SysResetFPU from (remaining) system units initialization code. It is redundant there because it is called from fpc_cpuinit, or, in case of i386, from fpc_cpucodeinit.

* It fixes regression of tw16283b after r27169. 
* BeOS, Haiku: added fpc_cpucodeinit to compensate for removal of SysInitFPU, it also enables use of CPU features like SSE.

git-svn-id: trunk@27171 -
This commit is contained in:
sergei 2014-03-17 10:53:52 +00:00
parent 420e0165a2
commit 9801288cdc
7 changed files with 10 additions and 19 deletions

View File

@ -376,13 +376,13 @@ begin
StackLength := CheckInitialStkLen(InitialStkLen);
StackBottom := Sptr - StackLength;
SysResetFPU;
if not(IsLibrary) then
SysInitFPU;
{ Set up signals handlers (may be needed by init code to test cpu features) }
InstallSignals;
{$ifdef cpui386}
fpc_cpucodeinit;
{$endif}
{ Setup heap }
myheapsize:=4096*1;// $ 20000;
myheaprealsize:=4096*1;// $ 20000;

View File

@ -330,10 +330,6 @@ Begin
{ Set up signals handlers (may be needed by init code to test cpu features) }
InstallSignals;
SysResetFPU;
if not(IsLibrary) then
SysInitFPU;
{$if defined(cpui386) or defined(cpuarm)}
fpc_cpucodeinit;
{$endif cpui386}

View File

@ -212,6 +212,8 @@ var
begin
{$ifdef FPC_HAS_FEATURE_FPU}
{ Beware: The same code is executed from fpc_cpuinit, which is included
per-cpu unconditionally }
SysResetFPU;
if not(IsLibrary) then
SysInitFPU;

View File

@ -409,13 +409,13 @@ begin
StackBottom := Sptr - StackLength;
ReturnNilIfGrowHeapFails := False;
SysResetFPU;
if not(IsLibrary) then
SysInitFPU;
{ Set up signals handlers }
InstallSignals;
{$ifdef cpui386}
fpc_cpucodeinit;
{$endif}
{ Setup heap }
myheapsize:=4096*100;// $ 20000;
myheaprealsize:=4096*100;// $ 20000;

View File

@ -341,9 +341,6 @@ begin
{$endif}
{$ifndef FPUNONE}
SysResetFPU;
if not(IsLibrary) then
SysInitFPU;
{$if defined(cpupowerpc)}
// some PPC kernels set the exception bits FE0/FE1 in the MSR to zero,
// disabling all FPU exceptions. Enable them again.

View File

@ -402,9 +402,6 @@ begin
IsConsole := TRUE;
StackLength := CheckInitialStkLen(InitialStkLen);
StackBottom := Sptr - StackLength;
SysResetFPU;
if not(IsLibrary) then
SysInitFPU;
{ OS specific startup }
MOS_ambMsg:=nil;
MOS_origDir:=0;

View File

@ -1121,7 +1121,6 @@ begin
xorl %eax,%eax
movw %ss,%ax
movl %eax,_SS
call SysResetFPU
end;
{$ENDIF OS2EXCEPTIONS}
DosGetInfoBlocks (@TIB, @PIB);