glibc/sysdeps/s390/fpu
Stefan Liebler 97a58d885b s390: Fix undefined behaviour in feenableexcept, fedisableexcept [BZ #30960]
If feenableexcept or fedisableexcept gets excepts=FE_INVALID=0x80
as input, we have a signed left shift: 0x80 << 24 which is not
representable as int and thus is undefined behaviour according to
C standard.

This patch casts excepts as unsigned int before shifting, which is
defined.

For me, the observed undefined behaviour is that the shift is done
with "unsigned"-instructions, which is exactly what we want.
Furthermore, I don't get any exception-flags.

After the fix, the code is using the same instruction sequence as
before.
2023-10-19 14:28:22 +02:00
..
bits Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
e_sqrtl.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
fedisblxcpt.c s390: Fix undefined behaviour in feenableexcept, fedisableexcept [BZ #30960] 2023-10-19 14:28:22 +02:00
feenablxcpt.c s390: Fix undefined behaviour in feenableexcept, fedisableexcept [BZ #30960] 2023-10-19 14:28:22 +02: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_libc.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00: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 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00: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
fpu_control.h S390: Fix _FPU_SETCW/GETCW when compiling with Clang [BZ #30130] 2023-02-28 14:01:28 +01:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00: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 s390x: Regenerate ULPs. 2023-02-28 10:38:25 +01: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
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-use-builtins-ceil.h math: Decompose math-use-builtins.h 2020-06-22 11:09:45 -03:00
math-use-builtins-floor.h math: Decompose math-use-builtins.h 2020-06-22 11:09:45 -03:00
math-use-builtins-fma.h s390x: Use fma{f} builtin 2020-06-22 11:09:49 -03:00
math-use-builtins-nearbyint.h math: Decompose math-use-builtins.h 2020-06-22 11:09:45 -03:00
math-use-builtins-rint.h math: Decompose math-use-builtins.h 2020-06-22 11:09:45 -03:00
math-use-builtins-round.h math: Decompose math-use-builtins.h 2020-06-22 11:09:45 -03:00
math-use-builtins-sqrt.h s390: Use sqrt{f} builtin 2020-06-22 11:09:50 -03:00
math-use-builtins-trunc.h math: Decompose math-use-builtins.h 2020-06-22 11:09:45 -03:00
s_llrint.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_llrintf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_llrintl.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_llround.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_llroundf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_llroundl.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_lrint.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_lrintf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_lrintl.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_lround.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_lroundf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_lroundl.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_roundeven.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_roundevenf.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
s_roundevenl.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00