Fix application of the exception mask
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 18 Jan 2013 08:46:25 +0000 (14:16 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Fri, 18 Jan 2013 08:46:25 +0000 (14:16 +0530)
Fixes BZ #14496.

ChangeLog
sysdeps/i386/fpu/fenv_private.h

index 52a9542..647ce1d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2013-01-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
+       [BZ #14496]
+       * sysdeps/i386/fpu/fenv_private.h (libc_feupdateenv_test_sse):
+       Fix application of SIMD FP exception mask.
+
        * sysdeps/ieee754/dbl-64/mpa.h (__pow_mp): New function to get an
        mp_no from a power of two.
        * sysdeps/ieee754/dbl-64/mpexp.c (__mpexp): Remove
index 03f4c97..1f8336c 100644 (file)
@@ -176,7 +176,7 @@ libc_feupdateenv_test_sse (fenv_t *e, int ex)
 
   /* Raise SIGFPE for any new exceptions since the hold.  Expect that
      the normal environment has all exceptions masked.  */
-  if (__builtin_expect ((old_mxcsr >> 7) & cur_ex, 0))
+  if (__glibc_unlikely (~(old_mxcsr >> 7) & cur_ex))
     __feraiseexcept (cur_ex);
 
   /* Test for exceptions raised since the hold.  */