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