[COMMITTED] hppa: Fix missing call to __feraiseexcept (BZ 34306)
John David Anglin
dave.anglin@bell.net
Tue Jun 23 17:51:46 GMT 2026
Committed to master, 2.42 and 2.42 branches.
Dave
---
hppa: Fix missing call to __feraiseexcept (BZ 34306)
The feupdateenv function is supposed to raise exceptions after
installing the environment represented by its envp argument.
This was accidentally missed on hppa.
The failure to raise exceptions was noticed by the failure of
the math/test-narrowing-trap test.
Signed-off-by: John David Anglin <dave.anglin@bell.net>
diff --git a/sysdeps/hppa/fpu/feupdateenv.c b/sysdeps/hppa/fpu/feupdateenv.c
index 397ec7298c..4d7c7f5a37 100644
--- a/sysdeps/hppa/fpu/feupdateenv.c
+++ b/sysdeps/hppa/fpu/feupdateenv.c
@@ -24,6 +24,7 @@ __feupdateenv (const fenv_t *envp)
{
union { unsigned long long l; unsigned int sw[2]; } s;
fenv_t temp;
+
/* Get the current exception status */
__asm__ ("fstd %%fr0,0(%1) \n\t"
"fldd 0(%1),%%fr0 \n\t"
@@ -46,6 +47,10 @@ __feupdateenv (const fenv_t *envp)
/* Install new environment. */
__fesetenv (&temp);
+
+ /* Raise exceptions. */
+ __feraiseexcept (temp.__status_word >> 27);
+
/* Success. */
return 0;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260623/f942f7e0/attachment.sig>
More information about the Libc-alpha
mailing list