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