]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
[powerpc] Rename fesetenv_mode to fesetenv_control
authorPaul A. Clarke <pc@us.ibm.com>
Thu, 19 Sep 2019 19:04:45 +0000 (14:04 -0500)
committerPaul A. Clarke <pc@us.ibm.com>
Wed, 13 Nov 2019 21:37:19 +0000 (15:37 -0600)
fesetenv_mode is used variously to write the FPSCR exception enable
bits and rounding mode bits.  These are referred to as the control
bits in the POWER ISA.  Change the name to be reflective of its
current and expected use, and match up well with fegetenv_control.

ChangeLog
sysdeps/powerpc/fpu/fedisblxcpt.c
sysdeps/powerpc/fpu/feenablxcpt.c
sysdeps/powerpc/fpu/fenv_libc.h
sysdeps/powerpc/fpu/fenv_private.h
sysdeps/powerpc/fpu/fesetmode.c

index c9a4b3cb9628432339aff581042746cad9647dbf..f45b0ed25a84a5bf0e708219497b52b1c66cd607 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2019-09-27  Paul A. Clarke  <pc@us.ibm.com>
+
+       * sysdeps/powerpc/fpu/fenv_libc.h (fesetenv_mode): Rename to
+       fesetenv_control.
+       * sysdeps/powerpc/fpu/fedisblxcpt.c (fedisableexcept): Accommodate
+       rename of fesetenv_mode to fegetenv_control.
+       * sysdeps/powerpc/fpu/feenablxcpt.c (feenableexcept): Likewise.
+       * sysdeps/powerpc/fpu/fesetmode.c (fesetmode): Likewise.
+       * sysdeps/powerpc/fpu/fenv_private.h (__libc_femergeenv_ppc): Likewise.
+       (libc_feholdsetround_noex_ppc_ctx): Likewise.
+
 2019-09-27  Paul A. Clarke  <pc@us.ibm.com>
 
        * sysdeps/powerpc/fpu/fenv_private.h
index 65fe4313f5e5c375b2080fdad3c47182b7cdb120..70dbc65a7e7e6039bd708c28b734e849a2da2d72 100644 (file)
@@ -41,7 +41,7 @@ fedisableexcept (int excepts)
   fe.l &= ~new;
 
   if (fe.l != curr.l)
-    fesetenv_mode (fe.fenv);
+    fesetenv_control (fe.fenv);
 
   __TEST_AND_ENTER_NON_STOP (-1ULL, fe.l);
 
index d025a44e244ec8ac32a3fa269327a9d5744014df..8be82a0f58e061e7c045c8fe5fb886d07bcd769b 100644 (file)
@@ -41,7 +41,7 @@ feenableexcept (int excepts)
   fe.l |= new;
 
   if (fe.l != curr.l)
-    fesetenv_mode (fe.fenv);
+    fesetenv_control (fe.fenv);
 
   __TEST_AND_EXIT_NON_STOP (0ULL, fe.l);
 
index 0dc81fc2d3efae69a9351b92a092702f52f86fcc..df38487a551c3ff8864b6de26b66ef391be0d383 100644 (file)
@@ -116,7 +116,7 @@ extern const fenv_t *__fe_mask_env (void) attribute_hidden;
 /* Set the last 2 nibbles of the FPSCR, which contain the
    exception enables and the rounding mode.
    'fegetenv_control' retrieves these bits by reading the FPSCR.  */
-#define fesetenv_mode(env) __builtin_mtfsf (0b00000011, (env));
+#define fesetenv_control(env) __builtin_mtfsf (0b00000011, (env));
 
 /* This very handy macro:
    - Sets the rounding mode to 'round to nearest';
index 084289ec50d6cd1f6cfe873f0710973340a36551..452d531b71177fefb5c5a856d027e465f39beeb2 100644 (file)
@@ -61,7 +61,7 @@ __libc_femergeenv_ppc (const fenv_t *envp, unsigned long long old_mask,
       == (FPSCR_CONTROL_MASK|FPSCR_EXCEPTIONS_MASK) &&
       (old.l & FPSCR_EXCEPTIONS_MASK) == (new.l & FPSCR_EXCEPTIONS_MASK))
   {
-    fesetenv_mode (new.fenv);
+    fesetenv_control (new.fenv);
   }
   else
     /* Atomically enable and raise (if appropriate) exceptions set in `new'.  */
@@ -142,7 +142,7 @@ libc_feholdsetround_noex_ppc_ctx (struct rm_ctx *ctx, int r)
   if (__glibc_unlikely (new.l != old.l))
     {
       __TEST_AND_ENTER_NON_STOP (old.l, 0ULL);
-      fesetenv_mode (new.fenv);
+      fesetenv_control (new.fenv);
       ctx->updated_status = true;
     }
   else
index bda221821000c8c2c4e7f4bde492fc283b820e2b..72acdaf5ebfe57a2db36c33e18200ae901f52f8c 100644 (file)
@@ -36,6 +36,6 @@ fesetmode (const femode_t *modep)
   __TEST_AND_EXIT_NON_STOP (old.l, new.l);
   __TEST_AND_ENTER_NON_STOP (old.l, new.l);
 
-  fesetenv_mode (new.fenv);
+  fesetenv_control (new.fenv);
   return 0;
 }