glibc/sysdeps/powerpc/fpu
Adhemerval Zanella ecb1e7220d powerpc: Do not raise exception traps for fesetexcept/fesetexceptflag (BZ 30988)
According to ISO C23 (7.6.4.4), fesetexcept is supposed to set
floating-point exception flags without raising a trap (unlike
feraiseexcept, which is supposed to raise a trap if feenableexcept was
called with the appropriate argument).

This is a side-effect of how we implement the GNU extension
feenableexcept, where feenableexcept/fesetenv/fesetmode/feupdateenv
might issue prctl (PR_SET_FPEXC, PR_FP_EXC_PRECISE) depending of the
argument.  And on PR_FP_EXC_PRECISE, setting a floating-point exception
flag triggers a trap.

To make the both functions follow the C23, fesetexcept and
fesetexceptflag now fail if the argument may trigger a trap.

The math tests now check for an value different than 0, instead
of bail out as unsupported for EXCEPTION_SET_FORCES_TRAP.

Checked on powerpc64le-linux-gnu.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2023-12-19 15:12:34 -03:00
..
e_sqrt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
e_sqrtf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fclrexcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fe_mask.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fe_nomask.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fegetmode.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fegetround.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fenv_const.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fenv_libc.h fegetenv_and_set_rn now uses the builtins provided by GCC. 2023-09-27 13:55:36 -03:00
fenv_private.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fesetenv.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fesetexcept.c powerpc: Do not raise exception traps for fesetexcept/fesetexceptflag (BZ 30988) 2023-12-19 15:12:34 -03:00
fesetmode.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fesetround.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
feupdateenv.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fix-fp-int-compare-invalid.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fsetexcptflg.c powerpc: Do not raise exception traps for fesetexcept/fesetexceptflag (BZ 30988) 2023-12-19 15:12:34 -03:00
ftestexcept.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
get-rounding-mode.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
libm-test-ulps powerpc:Regenerate ulps for hypot 2023-02-23 22:06:03 -06:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
Makefile
math_ldbl.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
math_private.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
math-barriers.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
math-tests-trap-force.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
math-use-builtins-fabs.h math: Add math-use-builtins-fabs (BZ#29027) 2022-05-23 17:49:18 -03:00
math-use-builtins-fma.h math: Decompose math-use-builtins.h 2020-06-22 11:09:45 -03:00
math-use-builtins-sqrt.h powerpc: Use sqrt{f} builtin 2020-06-22 11:09:49 -03:00
round_to_integer.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_ceil.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_ceilf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_floor.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_floorf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_logb.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_logbf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_logbl.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_lrintf.c powerpc: Refactor powerpc32 lrint/lrintf/llrint/llrintf 2019-06-17 09:27:02 -03:00
s_modf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_modff.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_nearbyint.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_nearbyintf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_rint.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_rintf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_round.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_roundf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_trunc.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_truncf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
t_sqrt.c
tst-setcontext-fpscr.c sysdeps/powerpc/fpu/tst-setcontext-fpscr.c: Fix warn unused result 2023-06-22 00:21:17 -04:00