[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fenv-*: Port to Haiku
|
From: |
Bruno Haible |
|
Subject: |
fenv-*: Port to Haiku |
|
Date: |
Sun, 05 Nov 2023 22:23:32 +0100 |
On Haiku/x86_64, version hrev57363 or newer, I see this test failure:
FAIL test-fenv-except-state-2 (exit status: 149)
Looking at it in the debugger, it crashes at an 'fld1' instruction, here:
/* Do a harmless floating-point operation (since on some CPUs, floating-point
exceptions trigger a trap only at the next floating-point operation). */
a = 1.0; b = a + a; // <==== HERE
This means, the function fesetexceptflag() triggers a floating-point
exception, although it shouldn't.
This hypothesis can be verified by rebuilding with the configure arguments
gl_cv_func_fesetexceptflag_works1=no gl_cv_func_fesetexceptflag_works2=no
So, this patch fixes it. Likewise on Haiku/i386 (r1beta4 from 2022).
2023-11-05 Bruno Haible <bruno@clisp.org>
fenv-exceptions-trapping: Avoid test failure on Haiku/i386.
* tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests also on
Haiku/i386.
fenv-exceptions-state: Fix test failure on Haiku/i386 and Haiku/x86_64.
* m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): Arrange to
override fesetexceptflag() on Haiku.
* doc/posix-functions/fesetexceptflag.texi: Mention the Haiku bug.
0001-fenv-exceptions-state-Fix-test-failure-on-Haiku-i386.patch
Description: Text Data
0002-fenv-exceptions-trapping-Avoid-test-failure-on-Haiku.patch
Description: Text Data
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- fenv-*: Port to Haiku,
Bruno Haible <=