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

2023-11-14 Thread Sevan Janiyan
On 11/11/2023 09:56, Bruno Haible wrote: There is even a complete example in the book PowerPC Numerics pages 96..99 Thanks for the link, I'll give it a try. :) Sevan

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

2023-11-11 Thread Bruno Haible
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

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

2023-11-10 Thread Sevan Janiyan
On 10/11/2023 19:36, Bruno Haible wrote: 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. Ok, I need a few days. I'll get back to this next week.

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

2023-11-10 Thread Bruno Haible
> I would guess that the problem is that on PowerPC, enabling these traps > requires OS support (in order to set the bits FE0 and FE1 of the MSR > (= Machine State Register), which can only be done through privileged > instructions), and Mac OS X 10.4 does not provide that support, or > we don't kn

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

2023-11-10 Thread Sevan Janiyan
On 10/11/2023 19:25, Bruno Haible wrote: That's the same as without these gl_cv_* overrides. This means, the system function feraiseexcept is most likely working right, and the problem is that the Gnulib code does not know how to enforce traps on floating-point exceptions. I see. I would gues

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

2023-11-10 Thread Bruno Haible
Sevan Janiyan wrote: > > The first step is to take note of the values of the gl_cv_func_fe* > > variables in config.cache. (Pass the option '-C' to configure.) > > gl_cv_func_feenableexcept_in_libm=${gl_cv_func_feenableexcept_in_libm=no} > gl_cv_func_feenableexcept_no_libm=${gl_cv_func_feenableexc

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

2023-11-10 Thread Sevan Janiyan
On 09/11/2023 23:36, Bruno Haible wrote: All three failures occur in situations where the code expects a trap from a floating-point exception, but a trap is not occurring. Understood. The first step is to take note of the values of the gl_cv_func_fe* variables in config.cache. (Pass the optio

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

2023-11-09 Thread Bruno Haible
Sevan Janiyan wrote: > FAIL: test-fenv-except-tracking-2.sh > > > Failed: ./test-fenv-except-tracking-2 f > FAIL test-fenv-except-tracking-2.sh (exit status: 1) > > FAIL: test-fenv-except-tracking-3.sh > > > Failed: ./test