[glibc] alpha: add the denormal trap enable bit to FE_NOMASK_ENV
Adhemerval Zanella via Glibc-cvs <[email protected]>
| Newsgroups | gmane.comp.lib.glibc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8e41f6008df3b5d56df199e8b4d19891666857a4 commit 8e41f6008df3b5d56df199e8b4d19891666857a4 Author: Matt Turner <[email protected]> Date: Mon Aug 3 19:55:06 2026 -0400 alpha: add the denormal trap enable bit to FE_NOMASK_ENV FE_NOMASK_ENV is the floating-point environment in which no exception is masked, so it must enable every exception that FE_ALL_EXCEPT covers. On Alpha that includes the GNU extension FE_DENORMAL, whose SWCR trap enable bit is IEEE_TRAP_ENABLE_DNO (bit 6). The constant only set bits 1 through 5 (INV, DZE, OVF, UNF and INE), so after fesetenv (FE_NOMASK_ENV) a subsequent fegetexcept () returned 0x3e0000 rather than FE_ALL_EXCEPT (0x7e0000), and denormal exceptions stayed masked. Set bit 6 as well. Fixes math/test-fenv-return on alpha. Reviewed-by: Adhemerval Zanella <[email protected]> Diff: --- sysdeps/alpha/fpu/bits/fenv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/alpha/fpu/bits/fenv.h b/sysdeps/alpha/fpu/bits/fenv.h index b1135f1f0a..530f298914 100644 --- a/sysdeps/alpha/fpu/bits/fenv.h +++ b/sysdeps/alpha/fpu/bits/fenv.h @@ -121,7 +121,7 @@ typedef unsigned long int fenv_t; #ifdef __USE_GNU /* Floating-point environment where none of the exceptions are masked. */ -# define FE_NOMASK_ENV ((const fenv_t *) 0x880000000000003eUL) +# define FE_NOMASK_ENV ((const fenv_t *) 0x880000000000007eUL) /* Floating-point environment with (processor-dependent) non-IEEE floating point. In this case, mapping denormals to zero. */