alpha: Fix fesetexceptflag (BZ 30998)

It clears some exception flags that are outside the EXCEPTS argument.

It fixes math/test-fexcept on qemu-user.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Bruno Haible 2023-11-02 11:23:48 -03:00 committed by Adhemerval Zanella
parent 802aef27b2
commit 80a40a9e14

View file

@ -27,7 +27,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts)
tmp = __ieee_get_fp_control ();
/* Set all the bits that were called for. */
tmp = (tmp & ~SWCR_STATUS_MASK) | (*flagp & excepts & SWCR_STATUS_MASK);
tmp ^= (tmp ^ *flagp) & excepts & SWCR_STATUS_MASK;
/* And store it back. */
__ieee_set_fp_control (tmp);