]> sourceware.org Git - glibc.git/commitdiff
Make ARM fesetenv (FE_NOMASK_ENV) detect failure (bug 14866).
authorJoseph Myers <joseph@codesourcery.com>
Wed, 21 Nov 2012 20:26:56 +0000 (20:26 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 21 Nov 2012 20:26:56 +0000 (20:26 +0000)
NEWS
ports/ChangeLog.arm
ports/sysdeps/arm/fesetenv.c

diff --git a/NEWS b/NEWS
index f78758a903fa499798492ef8a16807766103ec83..9eb0a10ab6939ee23dfa3569b38251b14e863a10 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,7 +21,7 @@ Version 2.17
   14638, 14645, 14648, 14652, 14660, 14661, 14669, 14672, 14683, 14694,
   14716, 14719, 14743, 14767, 14783, 14784, 14785, 14793, 14796, 14797,
   14801, 14805, 14807, 14809, 14811, 14815, 14821, 14824, 14828, 14831,
-  14835, 14838, 14856.
+  14835, 14838, 14856, 14866.
 
 * Port to ARM AArch64 contributed by Linaro.
 
index d060121311a2ad547693bfc967089f4c219d90c1..2a56a9f64343205e7a8b15c9e6f5550f874b4a57 100644 (file)
@@ -1,3 +1,9 @@
+2012-11-21  Joseph Myers  <joseph@codesourcery.com>
+
+       [BZ #14866]
+       * sysdeps/arm/fesetenv.c (__fesetenv): Test whether bits for
+       trapping exceptions were successfully set for FE_NOMASK_ENV.
+
 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
 
        * sysdeps/unix/sysv/linux/arm/Makefile (libcrypt-sysdep_routines): Add
index 2fad61da1a1942e2c017d8923f20eed10c17141e..e92f9f5ac8427daf4be9d0ca16ae25aafd708307 100644 (file)
@@ -40,6 +40,16 @@ __fesetenv (const fenv_t *envp)
 
       _FPU_SETCW (temp);
 
+      if (envp == FE_NOMASK_ENV)
+       {
+         /* VFPv3 and VFPv4 do not support trapping exceptions, so
+            test whether the relevant bits were set and fail if
+            not.  */
+         _FPU_GETCW (temp);
+         if ((temp & _FPU_IEEE) != _FPU_IEEE)
+           return 1;
+       }
+
       /* Success.  */
       return 0;
     }
This page took 0.050468 seconds and 5 git commands to generate.