dfa500
commit d7a568af5546e0313abbc04060c8e9b0d3f750b4
dfa500
Author: Paul A. Clarke <pc@us.ibm.com>
dfa500
Date:   Thu Sep 19 14:04:45 2019 -0500
dfa500
dfa500
    [powerpc] Rename fesetenv_mode to fesetenv_control
dfa500
    
dfa500
    fesetenv_mode is used variously to write the FPSCR exception enable
dfa500
    bits and rounding mode bits.  These are referred to as the control
dfa500
    bits in the POWER ISA.  Change the name to be reflective of its
dfa500
    current and expected use, and match up well with fegetenv_control.
dfa500
dfa500
diff --git a/sysdeps/powerpc/fpu/fedisblxcpt.c b/sysdeps/powerpc/fpu/fedisblxcpt.c
dfa500
index 1273987459655585..efa9c422fe54f5d8 100644
dfa500
--- a/sysdeps/powerpc/fpu/fedisblxcpt.c
dfa500
+++ b/sysdeps/powerpc/fpu/fedisblxcpt.c
dfa500
@@ -41,7 +41,7 @@ fedisableexcept (int excepts)
dfa500
   fe.l &= ~new;
dfa500
 
dfa500
   if (fe.l != curr.l)
dfa500
-    fesetenv_mode (fe.fenv);
dfa500
+    fesetenv_control (fe.fenv);
dfa500
 
dfa500
   __TEST_AND_ENTER_NON_STOP (-1ULL, fe.l);
dfa500
 
dfa500
diff --git a/sysdeps/powerpc/fpu/feenablxcpt.c b/sysdeps/powerpc/fpu/feenablxcpt.c
dfa500
index fa233c305aedd5f6..dfcc6fb7bd24b8db 100644
dfa500
--- a/sysdeps/powerpc/fpu/feenablxcpt.c
dfa500
+++ b/sysdeps/powerpc/fpu/feenablxcpt.c
dfa500
@@ -41,7 +41,7 @@ feenableexcept (int excepts)
dfa500
   fe.l |= new;
dfa500
 
dfa500
   if (fe.l != curr.l)
dfa500
-    fesetenv_mode (fe.fenv);
dfa500
+    fesetenv_control (fe.fenv);
dfa500
 
dfa500
   __TEST_AND_EXIT_NON_STOP (0ULL, fe.l);
dfa500
 
dfa500
diff --git a/sysdeps/powerpc/fpu/fenv_libc.h b/sysdeps/powerpc/fpu/fenv_libc.h
dfa500
index b5c8da1adefe93cb..287fc9f8f70e051c 100644
dfa500
--- a/sysdeps/powerpc/fpu/fenv_libc.h
dfa500
+++ b/sysdeps/powerpc/fpu/fenv_libc.h
dfa500
@@ -117,7 +117,7 @@ extern const fenv_t *__fe_mask_env (void) attribute_hidden;
dfa500
 /* Set the last 2 nibbles of the FPSCR, which contain the
dfa500
    exception enables and the rounding mode.
dfa500
    'fegetenv_control' retrieves these bits by reading the FPSCR.  */
dfa500
-#define fesetenv_mode(env) __builtin_mtfsf (0b00000011, (env));
dfa500
+#define fesetenv_control(env) __builtin_mtfsf (0b00000011, (env));
dfa500
 
dfa500
 /* This very handy macro:
dfa500
    - Sets the rounding mode to 'round to nearest';
dfa500
diff --git a/sysdeps/powerpc/fpu/fenv_private.h b/sysdeps/powerpc/fpu/fenv_private.h
dfa500
index c88142fe3053580f..666fbfdd9fef7759 100644
dfa500
--- a/sysdeps/powerpc/fpu/fenv_private.h
dfa500
+++ b/sysdeps/powerpc/fpu/fenv_private.h
dfa500
@@ -61,7 +61,7 @@ __libc_femergeenv_ppc (const fenv_t *envp, unsigned long long old_mask,
dfa500
       == (FPSCR_CONTROL_MASK|FPSCR_EXCEPTIONS_MASK) &&
dfa500
       (old.l & FPSCR_EXCEPTIONS_MASK) == (new.l & FPSCR_EXCEPTIONS_MASK))
dfa500
   {
dfa500
-    fesetenv_mode (new.fenv);
dfa500
+    fesetenv_control (new.fenv);
dfa500
   }
dfa500
   else
dfa500
     /* Atomically enable and raise (if appropriate) exceptions set in `new'.  */
dfa500
@@ -142,7 +142,7 @@ libc_feholdsetround_noex_ppc_ctx (struct rm_ctx *ctx, int r)
dfa500
   if (__glibc_unlikely (new.l != old.l))
dfa500
     {
dfa500
       __TEST_AND_ENTER_NON_STOP (old.l, 0ULL);
dfa500
-      fesetenv_mode (new.fenv);
dfa500
+      fesetenv_control (new.fenv);
dfa500
       ctx->updated_status = true;
dfa500
     }
dfa500
   else
dfa500
diff --git a/sysdeps/powerpc/fpu/fesetmode.c b/sysdeps/powerpc/fpu/fesetmode.c
dfa500
index e5938af04cb71ca1..fdaecb1a6a25a820 100644
dfa500
--- a/sysdeps/powerpc/fpu/fesetmode.c
dfa500
+++ b/sysdeps/powerpc/fpu/fesetmode.c
dfa500
@@ -36,6 +36,6 @@ fesetmode (const femode_t *modep)
dfa500
   __TEST_AND_EXIT_NON_STOP (old.l, new.l);
dfa500
   __TEST_AND_ENTER_NON_STOP (old.l, new.l);
dfa500
 
dfa500
-  fesetenv_mode (new.fenv);
dfa500
+  fesetenv_control (new.fenv);
dfa500
   return 0;
dfa500
 }