dfa500
commit 36c17c7079a5243a890ba43affff326a041775a9
dfa500
Author: Paul A. Clarke <pc@us.ibm.com>
dfa500
Date:   Thu Sep 19 11:31:31 2019 -0500
dfa500
dfa500
    [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write
dfa500
    
dfa500
    libc_feholdsetround_noex_ppc_ctx currently performs:
dfa500
    1. Read FPSCR, save to context.
dfa500
    2. Create new FPSCR value: clear enables and set new rounding mode.
dfa500
    3. Write new value to FPSCR.
dfa500
    
dfa500
    Since other bits just pass through, there is no need to write them.
dfa500
    
dfa500
    Instead, write just the changed values (enables and rounding mode),
dfa500
    which can be a bit more efficient.
dfa500
dfa500
diff --git a/sysdeps/powerpc/fpu/fenv_private.h b/sysdeps/powerpc/fpu/fenv_private.h
dfa500
index 86a3611b3ef41759..c88142fe3053580f 100644
dfa500
--- a/sysdeps/powerpc/fpu/fenv_private.h
dfa500
+++ b/sysdeps/powerpc/fpu/fenv_private.h
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_register (new.fenv);
dfa500
+      fesetenv_mode (new.fenv);
dfa500
       ctx->updated_status = true;
dfa500
     }
dfa500
   else