mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 18:50:37 +02:00
* darwin/AArch64: always clear fpu exception flags regardless of the
triggered signal, as the kernel currently triggers SIGILL rather than SIGFPE for FPU exceptions git-svn-id: trunk@47858 -
This commit is contained in:
parent
8ba4c4bcf0
commit
514db355b1
@ -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);
|
||||
end;
|
||||
SIGBUS:
|
||||
res:=214;
|
||||
@ -45,6 +43,8 @@ begin
|
||||
SIGQUIT:
|
||||
res:=233;
|
||||
end;
|
||||
{ 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 }
|
||||
|
Loading…
Reference in New Issue
Block a user