aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/libm-ieee754/e_log.c
diff options
context:
space:
mode:
authormirabilos <tg@debian.org>2025-01-13 11:24:37 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2025-01-13 11:25:23 -0300
commitf42634f8244ba80773c5f2207f01ea936a6746ca (patch)
tree4fefe787712c549553d27c10a01f0ecb48a6af5a /sysdeps/libm-ieee754/e_log.c
parent72dfba1be426f449a7f1c913c3656ff8b400ba9e (diff)
downloadglibc-master.zip
glibc-master.tar.gz
glibc-master.tar.bz2
sh4: ensure FPSCR.PR==0 when executing FRCHG [BZ #27543]HEADmaster
If the bit is not 0, the operations FRCHG and FSCHG are undefined and cause a trap; qemu now checks for this as well, so we set it to 0 temporarily and restore the old value in getcontext afterwards (setcontext/swapcontext already do so). From the discussion in the bugreport, this can probably be optimised in one place but none of the people involved are SH4 assembly experts, this patch is field-tested, and it’s not a code path run often. The other question, what happens if a signal occurs while the bit is temporarily 0, is also still unsolved, but to fix that a kernel change is most likely needed; this patch changes a certain trap on many CPUs for a hard-to-get trap in a signal handler if a signal is delivered during the few instructions the PR bit is temporarily set to 0, so it’s not a regression for most users. See BZ and https://bugs.launchpad.net/qemu/+bug/1796520 for related discussion, references and review comments. Signed-off-by: mirabilos <tg@debian.org> Reviewed-by: Oleg Endo <olegendo@gcc.gnu.org> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/libm-ieee754/e_log.c')
0 files changed, 0 insertions, 0 deletions