]> 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>
Fri, 27 Sep 2019 16:03:25 +0000 (11:03 -0500)
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 3c792b4317bd7102eeac77286ffdac03feba5aba..d9ea94ad703a47d213ca386d76f16366e9a71ac7 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 870cfc8dbcb17f40ed4ab05b52858c258f38778b..9f86c5fbef87e1667cbe6921bfa34bd79c492f7a 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 43f6482f43b9fcdb48e604285dbea8eedfb5ff89..141cfb4cd9b7ac45ee7fe818bfa8c8d221f482f2 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 17667d0a34b5ab0402ca2d7bb2e892b73ee2f197..ed368473ea400b836ee851973d0cb181ec0abc64 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 ade0bfaf5f4053133291662c1bed5d220d7b3ac9..5eedc3b552db43e251788c332eafaf3c098f3b87 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 1e9a874efa8b4497377c73a8920824c413ea53e6..a7ead9f015141fc69244b8f3f603ef6ae6361886 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;
 }