bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test-fenv-* failures on legacy Darwin/powerpc


From: Bruno Haible
Subject: Re: test-fenv-* failures on legacy Darwin/powerpc
Date: Sat, 11 Nov 2023 10:56:20 +0100

I wrote:
> Just found that xnu/osfmk/ppc/status.c contains a function
> thread_enable_fpe(), and this function gets called from
> xnu/bsd/kern/kern_sig.c when a SIGFPE signal handler is installed
> (value != SIG_DFL or SIG_IGN).
> 
> Can you try to install this handler for SIGFPE?
> 
> static void
> my_sigfpe_handler (int sig)
> {
>   signal (SIGFPE, SIG_DFL);
>   raise (sig);
> }
> 
> This would be much easier than a Mach exception handler.

There is even a complete example in the book
  PowerPC Numerics
  
<https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=348046036eee75f3dbb5c9ceb22339474a6799e8>
  pages 96..99

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]