@@ -32,8 +32,6 @@ begin
Else
Res:=207; {coprocessor error}
end;
- { clear "exception happened" flags }
- SigContext^.uc_mcontext^.__fs.__fpsr:=SigContext^.uc_mcontext^.__fs.__fpsr and not(fpu_exception_mask shr fpu_exception_mask_to_status_mask_shift);
SIGBUS:
res:=214;
@@ -45,6 +43,8 @@ begin
SIGQUIT:
res:=233;
+ { right now, macOS generates SIGILL signals for fpu exceptions, so always clear the fpu exceptions }
+ SigContext^.uc_mcontext^.__fs.__fpsr:=SigContext^.uc_mcontext^.__fs.__fpsr and not(fpu_exception_mask shr fpu_exception_mask_to_status_mask_shift);
{$ifdef FPC_USE_SIGPROCMASK}
reenable_signal(sig);
{$endif }