Cleanup fedisableexcept to use the same logic as the ARM version. No functional changes.
authorWilco Dijkstra <wdijkstr@arm.com>
Fri, 24 Oct 2014 13:06:04 +0000 (13:06 +0000)
committerWilco Dijkstra <wdijkstr@arm.com>
Fri, 24 Oct 2014 13:06:04 +0000 (13:06 +0000)
ChangeLog
sysdeps/aarch64/fpu/fedisblxcpt.c

index fa7bcf32efb1559d397d6f630c23b1de0be3ed32..ea29be2291379ce0697e797626da4e2bdaf8f692 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
+
+       * sysdeps/aarch64/fpu/fedisblxcpt.c (fedisableexcept):
+       Simplify logic.
+
 2014-10-24  Joseph Myers  <joseph@codesourcery.com>
 
        [BZ #14138]
index c43335c4e5dba289694af54000319574acc873ff..1ea6e1040c02d5d03cd9ac49ea45d79e9a921693 100644 (file)
@@ -24,18 +24,13 @@ fedisableexcept (int excepts)
 {
   fpu_control_t fpcr;
   fpu_control_t fpcr_new;
-  int original_excepts;
 
   _FPU_GETCW (fpcr);
-
-  original_excepts = (fpcr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
-
   excepts &= FE_ALL_EXCEPT;
-
   fpcr_new = fpcr & ~(excepts << FE_EXCEPT_SHIFT);
 
   if (fpcr != fpcr_new)
     _FPU_SETCW (fpcr_new);
 
-  return original_excepts;
+  return (fpcr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
 }