* fixed broken Math.SetExceptionMask

git-svn-id: trunk@5858 -
This commit is contained in:
florian 2007-01-08 22:46:12 +00:00
parent 2ddc5fed76
commit 538e1bb8e8
2 changed files with 5 additions and 5 deletions

View File

@ -40,10 +40,10 @@ FPC_ABSMASK_DOUBLE:
asm
movw cw,%ax
{$ifdef FPC_PIC}
movq default8087cw@GOTPCREL(%rip),%rax
movw %ax,(%rax)
movq default8087cw@GOTPCREL(%rip),%rdx
movw %ax,(%rdx)
fnclex
fldcw (%rax)
fldcw (%rdx)
{$else FPC_PIC}
movw %ax,default8087cw
fnclex

View File

@ -81,7 +81,7 @@ end;
function GetExceptionMask: TFPUExceptionMask;
begin
{$ifdef win64}
Result:=TFPUExceptionMask((GetSSECSR shr 7) and $1f);
Result:=TFPUExceptionMask((GetSSECSR shr 7) and $3f);
{$else win64}
Result:=TFPUExceptionMask(dword(Get8087CW and $3F));
{$endif win64}
@ -93,7 +93,7 @@ var
begin
CtlWord:=Get8087CW;
Set8087CW((CtlWord and $FFC0) or Byte(Longint(Mask)));
SetSSECSR((((GetSSECSR shr 7) and $ffffffc0) or dword(Mask)) shl 7);
SetSSECSR((GetSSECSR and $ffffe07f) or (dword(Mask) shl 7));
Result:=GetExceptionMask;
end;