* 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 asm
movw cw,%ax movw cw,%ax
{$ifdef FPC_PIC} {$ifdef FPC_PIC}
movq default8087cw@GOTPCREL(%rip),%rax movq default8087cw@GOTPCREL(%rip),%rdx
movw %ax,(%rax) movw %ax,(%rdx)
fnclex fnclex
fldcw (%rax) fldcw (%rdx)
{$else FPC_PIC} {$else FPC_PIC}
movw %ax,default8087cw movw %ax,default8087cw
fnclex fnclex

View File

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