* added SysResetFPU, which is required for MorphOS

git-svn-id: trunk@1279 -
This commit is contained in:
Károly Balogh 2005-10-03 22:49:44 +00:00
parent 28381b1287
commit ccc29a13f3
2 changed files with 15 additions and 0 deletions

View File

@ -303,6 +303,7 @@ end;
begin
SysResetFPU;
IsConsole := TRUE;
IsLibrary := FALSE;
StackLength := InitialStkLen;

View File

@ -1147,3 +1147,17 @@ asm
end;
{$IFDEF MORPHOS}
{ this is only required for MorphOS }
{$define FPC_SYSTEM_HAS_SYSRESETFPU}
procedure SysResetFPU;assembler;{$ifdef SYSTEMINLINE}inline;{$endif}
var tmp: array[0..1] of dword;
asm
{ setting fpu to round to nearest mode }
li r3,0
stw r3,8(r1)
stw r3,12(r1)
lfd f1,8(r1)
mtfsf 7,f1
end;
{$ENDIF}