Re: new module 'fenv-exceptions-tracking-c99'

2023-11-04 Thread Bruno Haible
Two small patches: 1) On NetBSD 8.0/sparc, I see a test failure of test-fenv-except-tracking-2 regarding 'long double's. Certainly due to the software floating-point routines. 2) The Cygwin fraiseexcept bug has been acknowledged and fixed:

Re: new module 'fenv-exceptions-tracking-c99'

2023-10-30 Thread Bruno Haible
Oops, this code has a bug on x86_64 and i386: It may leave the exception traps masked, due to a side effect of the 'fnsetenv' instruction. This patch should fix it. 2023-10-30 Bruno Haible fenv-exceptions-tracking-{c99,c23}: Fix the x86_64 and i386 case. * lib/fenv-except-trac

Re: new module 'fenv-exceptions-tracking-c99'

2023-10-28 Thread Bruno Haible
It's interesting to observe that the various architectures have different semantics for the floating-point exception flags in the presence of traps: * On some architectures, modifying bits in some control register does not actually raise a trap. To raise a trap, feraiseexcept() must do an

Re: new module 'fenv-exceptions-tracking-c99'

2023-10-28 Thread Bruno Haible
Oops, after enhancing a unit test, I noticed that on MSVC, the overridden feraiseexcept function does not work for FE_OVERFLOW, FE_UNDERFLOW, FE_INEXACT. This patch fixes it. The enhanced unit test will come later. 2023-10-28 Bruno Haible fenv-exceptions-tracking-c99: Fix feraiseexce

new module 'fenv-exceptions-tracking-c99'

2023-10-28 Thread Bruno Haible
This module adds the functions that deal with tracking which floating-point exceptions have occurred: feclearexcept feraiseexcept fetestexcept It not only adds the functions for old platforms, but also provides workarounds for glibc and Cygwin bugs. With this done, it is possible to fix a