This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.19-661-gb8c0057


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  b8c005732e1f799ffcd522d83aa2a826b6248752 (commit)
       via  b5570d92d6bb6ba9c25ac6ed77ba170dd7f4acd3 (commit)
       via  947bdca24d1ada7e83cf266213dba02c99d035a5 (commit)
       via  00f669edb8c447cbe4e73d8067abd3146c5c312b (commit)
       via  222b787a6fd36601f5c5d22378176798327fcf31 (commit)
      from  db59bad394ef61bf6d6ef7916012f2a09d0b3d11 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b8c005732e1f799ffcd522d83aa2a826b6248752

commit b8c005732e1f799ffcd522d83aa2a826b6248752
Author: Wilco <wdijkstr@arm.com>
Date:   Tue Jun 24 15:05:23 2014 +0000

    Optimize fesetenv
    
    Improve fesetenv to use an optimized implementation similar to
    feupdateenv.
    
    2014-06-24  Wilco  <wdijkstr@arm.com>
    
    	* sysdeps/arm/fesetenv.c (fesetenv): Optimize implementation.

diff --git a/ChangeLog b/ChangeLog
index 6775994..b855439 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2014-06-24  Wilco  <wdijkstr@arm.com>
 
+	* sysdeps/arm/fesetenv.c (fesetenv): Optimize implementation.
+
+2014-06-24  Wilco  <wdijkstr@arm.com>
+
 	* sysdeps/arm/fpu_control.h (_FPU_MASK_RM): Define.
 	* sysdeps/arm/fenv_private.h (libc_fesetround_vfp)
 	(libc_feholdexcept_setround_vfp) (libc_feholdsetround_vfp)
diff --git a/sysdeps/arm/fesetenv.c b/sysdeps/arm/fesetenv.c
index b2ed1d3..ac47ae2 100644
--- a/sysdeps/arm/fesetenv.c
+++ b/sysdeps/arm/fesetenv.c
@@ -17,14 +17,13 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
-#include <fpu_control.h>
 #include <arm-features.h>
 
 
 int
 fesetenv (const fenv_t *envp)
 {
-  fpu_control_t fpscr;
+  fpu_control_t fpscr, new_fpscr, updated_fpscr;
 
   /* Fail if a VFP unit isn't present.  */
   if (!ARM_HAVE_VFP)
@@ -32,25 +31,31 @@ fesetenv (const fenv_t *envp)
 
   _FPU_GETCW (fpscr);
 
-  /* Preserve the reserved FPSCR flags.  */
-  fpscr &= _FPU_RESERVED;
+  if ((envp != FE_DFL_ENV) && (envp != FE_NOMASK_ENV))
+    {
+      /* The new FPSCR is valid, so don't merge the reserved flags.  */
+      new_fpscr = envp->__cw;
 
-  if (envp == FE_DFL_ENV)
-    fpscr |= _FPU_DEFAULT;
-  else if (envp == FE_NOMASK_ENV)
-    fpscr |= _FPU_IEEE;
-  else
-    fpscr |= envp->__cw & ~_FPU_RESERVED;
+      /* Write new FPSCR if different (ignoring NZCV flags).  */
+      if (((fpscr ^ new_fpscr) & ~_FPU_MASK_NZCV) != 0)
+	_FPU_SETCW (new_fpscr);
 
-  _FPU_SETCW (fpscr);
+      return 0;
+    }
 
-  if (envp == FE_NOMASK_ENV)
+  /* Preserve the reserved FPSCR flags.  */
+  new_fpscr = fpscr & _FPU_RESERVED;
+  new_fpscr |= (envp == FE_DFL_ENV) ? _FPU_DEFAULT : _FPU_IEEE;
+
+  if (((new_fpscr ^ fpscr) & ~_FPU_MASK_NZCV) != 0)
     {
+      _FPU_SETCW (new_fpscr);
+
       /* Not all VFP architectures support trapping exceptions, so
 	 test whether the relevant bits were set and fail if not.  */
-      _FPU_GETCW (fpscr);
-      if ((fpscr & _FPU_IEEE) != _FPU_IEEE)
-	return 1;
+      _FPU_GETCW (updated_fpscr);
+
+      return new_fpscr & ~updated_fpscr;
     }
 
   return 0;

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b5570d92d6bb6ba9c25ac6ed77ba170dd7f4acd3

commit b5570d92d6bb6ba9c25ac6ed77ba170dd7f4acd3
Author: Wilco <wdijkstr@arm.com>
Date:   Tue Jun 24 15:02:51 2014 +0000

    Add _FPU_MASK_RM and use it instead of FE_TOWARDZERO.
    
    2014-06-24  Wilco  <wdijkstr@arm.com>
    
    	* sysdeps/arm/fpu_control.h (_FPU_MASK_RM): Define.
    	* sysdeps/arm/fenv_private.h (libc_fesetround_vfp)
    	(libc_feholdexcept_setround_vfp) (libc_feholdsetround_vfp)
    	(libc_feresetround_vfp) (libc_feholdsetround_vfp_ctx)
    	(libc_feresetround_vfp_ctx): Use _FPU_MASK_RM.
    	* sysdeps/arm/fesetround.c (fesetround): Use _FPU_MASK_RM.
    	* sysdeps/arm/get-rounding-mode.h (get_rounding_mode):
    	Use _FPU_MASK_RM.

diff --git a/ChangeLog b/ChangeLog
index 0ecd1f1..6775994 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2014-06-24  Wilco  <wdijkstr@arm.com>
 
+	* sysdeps/arm/fpu_control.h (_FPU_MASK_RM): Define.
+	* sysdeps/arm/fenv_private.h (libc_fesetround_vfp)
+	(libc_feholdexcept_setround_vfp) (libc_feholdsetround_vfp)
+	(libc_feresetround_vfp) (libc_feholdsetround_vfp_ctx)
+	(libc_feresetround_vfp_ctx): Use _FPU_MASK_RM.
+	* sysdeps/arm/fesetround.c (fesetround): Use _FPU_MASK_RM.
+	* sysdeps/arm/get-rounding-mode.h (get_rounding_mode):
+	Use _FPU_MASK_RM.
+
+2014-06-24  Wilco  <wdijkstr@arm.com>
+
 	* sysdeps/arm/fsetexcptflg.c (fesetexceptflag): Remove unused include.
 
 2014-06-24  Wilco  <wdijkstr@arm.com>
diff --git a/sysdeps/arm/fenv_private.h b/sysdeps/arm/fenv_private.h
index bff8acd..743df18 100644
--- a/sysdeps/arm/fenv_private.h
+++ b/sysdeps/arm/fenv_private.h
@@ -43,8 +43,8 @@ libc_fesetround_vfp (int round)
   _FPU_GETCW (fpscr);
 
   /* Set new rounding mode if different.  */
-  if (__glibc_unlikely ((fpscr & FE_TOWARDZERO) != round))
-    _FPU_SETCW ((fpscr & ~FE_TOWARDZERO) | round);
+  if (__glibc_unlikely ((fpscr & _FPU_MASK_RM) != round))
+    _FPU_SETCW ((fpscr & ~_FPU_MASK_RM) | round);
 }
 
 static __always_inline void
@@ -57,7 +57,7 @@ libc_feholdexcept_setround_vfp (fenv_t *envp, int round)
 
   /* Clear exception flags, set all exceptions to non-stop,
      and set new rounding mode.  */
-  fpscr &= ~(_FPU_MASK_EXCEPT | FE_TOWARDZERO);
+  fpscr &= ~(_FPU_MASK_EXCEPT | _FPU_MASK_RM);
   _FPU_SETCW (fpscr | round);
 }
 
@@ -70,8 +70,8 @@ libc_feholdsetround_vfp (fenv_t *envp, int round)
   envp->__cw = fpscr;
 
   /* Set new rounding mode if different.  */
-  if (__glibc_unlikely ((fpscr & FE_TOWARDZERO) != round))
-    _FPU_SETCW ((fpscr & ~FE_TOWARDZERO) | round);
+  if (__glibc_unlikely ((fpscr & _FPU_MASK_RM) != round))
+    _FPU_SETCW ((fpscr & ~_FPU_MASK_RM) | round);
 }
 
 static __always_inline void
@@ -82,7 +82,7 @@ libc_feresetround_vfp (fenv_t *envp)
   _FPU_GETCW (fpscr);
 
   /* Check whether rounding modes are different.  */
-  round = (envp->__cw ^ fpscr) & FE_TOWARDZERO;
+  round = (envp->__cw ^ fpscr) & _FPU_MASK_RM;
 
   /* Restore the rounding mode if it was changed.  */
   if (__glibc_unlikely (round != 0))
@@ -150,7 +150,7 @@ libc_feholdsetround_vfp_ctx (struct rm_ctx *ctx, int r)
   ctx->env.__cw = fpscr;
 
   /* Check whether rounding modes are different.  */
-  round = (fpscr ^ r) & FE_TOWARDZERO;
+  round = (fpscr ^ r) & _FPU_MASK_RM;
 
   /* Set the rounding mode if changed.  */
   if (__glibc_unlikely (round != 0))
@@ -169,7 +169,7 @@ libc_feresetround_vfp_ctx (struct rm_ctx *ctx)
       fpu_control_t fpscr;
 
       _FPU_GETCW (fpscr);
-      fpscr = (fpscr & ~FE_TOWARDZERO) | (ctx->env.__cw & FE_TOWARDZERO);
+      fpscr = (fpscr & ~_FPU_MASK_RM) | (ctx->env.__cw & _FPU_MASK_RM);
       _FPU_SETCW (fpscr);
     }
 }
diff --git a/sysdeps/arm/fesetround.c b/sysdeps/arm/fesetround.c
index 2e21925..530a6ba 100644
--- a/sysdeps/arm/fesetround.c
+++ b/sysdeps/arm/fesetround.c
@@ -28,8 +28,7 @@ fesetround (int round)
   if (!ARM_HAVE_VFP)
     return (round == FE_TONEAREST) ? 0 : 1;
 
-  /* Fail if the rounding mode is not valid.  */
-  if (round & ~FE_TOWARDZERO)
+  if (round & ~_FPU_MASK_RM)
     return 1;
 
   libc_fesetround_vfp (round);
diff --git a/sysdeps/arm/fpu_control.h b/sysdeps/arm/fpu_control.h
index 0377697..dbce935 100644
--- a/sysdeps/arm/fpu_control.h
+++ b/sysdeps/arm/fpu_control.h
@@ -37,8 +37,8 @@ extern fpu_control_t __fpu_control;
 #define _FPU_MASK_UM	0x00000800	/* underflow */
 #define _FPU_MASK_PM	0x00001000	/* inexact */
 
-#define _FPU_MASK_NZCV	0xF0000000	/* NZCV flags */
-
+#define _FPU_MASK_NZCV	0xf0000000	/* NZCV flags */
+#define _FPU_MASK_RM	0x00c00000	/* rounding mode */
 #define _FPU_MASK_EXCEPT 0x00001f1f	/* all exception flags */
 
 /* Some bits in the FPSCR are not yet defined.  They must be preserved when
diff --git a/sysdeps/arm/get-rounding-mode.h b/sysdeps/arm/get-rounding-mode.h
index a1ecf51..f50ef24 100644
--- a/sysdeps/arm/get-rounding-mode.h
+++ b/sysdeps/arm/get-rounding-mode.h
@@ -36,7 +36,7 @@ get_rounding_mode (void)
     return FE_TONEAREST;
 
   _FPU_GETCW (fpscr);
-  return fpscr & FE_TOWARDZERO;
+  return fpscr & _FPU_MASK_RM;
 }
 
 #endif /* get-rounding-mode.h */

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=947bdca24d1ada7e83cf266213dba02c99d035a5

commit 947bdca24d1ada7e83cf266213dba02c99d035a5
Author: Wilco <wdijkstr@arm.com>
Date:   Tue Jun 24 15:00:01 2014 +0000

    Remove an unused include.
    
    2014-06-24  Wilco  <wdijkstr@arm.com>
    
    	* sysdeps/arm/fsetexcptflg.c (fesetexceptflag): Remove unused include.

diff --git a/ChangeLog b/ChangeLog
index 96c08b4..0ecd1f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2014-06-24  Wilco  <wdijkstr@arm.com>
 
+	* sysdeps/arm/fsetexcptflg.c (fesetexceptflag): Remove unused include.
+
+2014-06-24  Wilco  <wdijkstr@arm.com>
+
 	* sysdeps/arm/feholdexcpt.c (feholdexcept): Remove space.
 	* sysdeps/arm/fesetenv.c (fesetenv): Remove space.
 	* sysdeps/arm/fesetround.c (fesetround): Remove space.
diff --git a/sysdeps/arm/fsetexcptflg.c b/sysdeps/arm/fsetexcptflg.c
index 28810d3..38dc96e 100644
--- a/sysdeps/arm/fsetexcptflg.c
+++ b/sysdeps/arm/fsetexcptflg.c
@@ -17,7 +17,6 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
-#include <math.h>
 #include <fpu_control.h>
 #include <arm-features.h>
 

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=00f669edb8c447cbe4e73d8067abd3146c5c312b

commit 00f669edb8c447cbe4e73d8067abd3146c5c312b
Author: Wilco <wdijkstr@arm.com>
Date:   Tue Jun 24 14:57:32 2014 +0000

    Cleanup fenv implementation
    
    Remove some spaces before libm_hidden_def.
    
    2014-06-24  Wilco  <wdijkstr@arm.com>
    
    	* sysdeps/arm/feholdexcpt.c (feholdexcept): Remove space.
    	* sysdeps/arm/fesetenv.c (fesetenv): Remove space.
    	* sysdeps/arm/fesetround.c (fesetround): Remove space.
    	* sysdeps/arm/fraiseexcpt.c (feraiseexcept): Remove space.

diff --git a/ChangeLog b/ChangeLog
index 6cd1895..96c08b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2014-06-24  Wilco  <wdijkstr@arm.com>
 
+	* sysdeps/arm/feholdexcpt.c (feholdexcept): Remove space.
+	* sysdeps/arm/fesetenv.c (fesetenv): Remove space.
+	* sysdeps/arm/fesetround.c (fesetround): Remove space.
+	* sysdeps/arm/fraiseexcpt.c (feraiseexcept): Remove space.
+
+2014-06-24  Wilco  <wdijkstr@arm.com>
+
 	* NEWS: Add 16918 to fixed bug list.
 
 2014-06-24  Wilco  <wdijkstr@arm.com>
diff --git a/sysdeps/arm/feholdexcpt.c b/sysdeps/arm/feholdexcpt.c
index 2d79e0c..0f72aee 100644
--- a/sysdeps/arm/feholdexcpt.c
+++ b/sysdeps/arm/feholdexcpt.c
@@ -30,5 +30,4 @@ feholdexcept (fenv_t *envp)
   libc_feholdexcept_vfp (envp);
   return 0;
 }
-
 libm_hidden_def (feholdexcept)
diff --git a/sysdeps/arm/fesetenv.c b/sysdeps/arm/fesetenv.c
index 62031d5..b2ed1d3 100644
--- a/sysdeps/arm/fesetenv.c
+++ b/sysdeps/arm/fesetenv.c
@@ -55,5 +55,4 @@ fesetenv (const fenv_t *envp)
 
   return 0;
 }
-
 libm_hidden_def (fesetenv)
diff --git a/sysdeps/arm/fesetround.c b/sysdeps/arm/fesetround.c
index d79f910..2e21925 100644
--- a/sysdeps/arm/fesetround.c
+++ b/sysdeps/arm/fesetround.c
@@ -35,5 +35,4 @@ fesetround (int round)
   libc_fesetround_vfp (round);
   return 0;
 }
-
 libm_hidden_def (fesetround)
diff --git a/sysdeps/arm/fraiseexcpt.c b/sysdeps/arm/fraiseexcpt.c
index a964cb0..91ec86f 100644
--- a/sysdeps/arm/fraiseexcpt.c
+++ b/sysdeps/arm/fraiseexcpt.c
@@ -102,5 +102,4 @@ feraiseexcept (int excepts)
       return 0;
     }
 }
-
 libm_hidden_def (feraiseexcept)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=222b787a6fd36601f5c5d22378176798327fcf31

commit 222b787a6fd36601f5c5d22378176798327fcf31
Author: Wilco <wdijkstr@arm.com>
Date:   Tue Jun 24 14:48:05 2014 +0000

    Add bug 16918 to NEWS.

diff --git a/ChangeLog b/ChangeLog
index 3330b0b..6cd1895 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2014-06-24  Wilco  <wdijkstr@arm.com>
 
+	* NEWS: Add 16918 to fixed bug list.
+
+2014-06-24  Wilco  <wdijkstr@arm.com>
+
 	[BZ #16918]
 	* sysdeps/arm/feupdateenv.c (feupdateenv):
 	Rewrite to reduce FPSCR accesses and fix return value.
diff --git a/NEWS b/NEWS
index 140f84a..305e1c3 100644
--- a/NEWS
+++ b/NEWS
@@ -18,9 +18,10 @@ Version 2.20
   16724, 16731, 16739, 16740, 16743, 16754, 16758, 16759, 16760, 16770,
   16786, 16789, 16791, 16796, 16799, 16800, 16815, 16823, 16824, 16831,
   16838, 16849, 16854, 16876, 16877, 16878, 16882, 16885, 16888, 16890,
-  16912, 16915, 16916, 16917, 16922, 16927, 16928, 16932, 16943, 16958,
-  16965, 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009, 17022,
-  17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075, 17079.
+  16912, 16915, 16916, 16917, 16918, 16922, 16927, 16928, 16932, 16943,
+  16958, 16965, 16966, 16967, 16977, 16978, 16984, 16990, 16996, 17009,
+  17022, 17031, 17042, 17048, 17050, 17058, 17061, 17062, 17069, 17075,
+  17079.
 
 * Optimized strchr implementation for AArch64.  Contributed by ARM Ltd.
 
@@ -54,6 +55,10 @@ Version 2.20
   default mutexes are elided via __builtin_tbegin, if the cpu supports
   transactions. By default lock elision is not enabled and the elision code
   is not built.
+0001-Use-libc-calls.patch       0005-Remove-spaces.patch
+0002-Avoid-FPSCR-writes.patch   0006-Remove-include.patch
+0003-Improve-feupdateenv.patch  0007-Add-_FPU_MASK_RM.patch
+0004-Improve-fesetenv.patch     0008-Improve-rounding-mode-check.patch
 
 * CVE-2014-4043 The posix_spawn_file_actions_addopen implementation did not
   copy the path argument.  This allowed programs to cause posix_spawn to

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                       |   30 ++++++++++++++++++++++++++++++
 NEWS                            |   11 ++++++++---
 sysdeps/arm/feholdexcpt.c       |    1 -
 sysdeps/arm/fenv_private.h      |   16 ++++++++--------
 sysdeps/arm/fesetenv.c          |   36 ++++++++++++++++++++----------------
 sysdeps/arm/fesetround.c        |    4 +---
 sysdeps/arm/fpu_control.h       |    4 ++--
 sysdeps/arm/fraiseexcpt.c       |    1 -
 sysdeps/arm/fsetexcptflg.c      |    1 -
 sysdeps/arm/get-rounding-mode.h |    2 +-
 10 files changed, 70 insertions(+), 36 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]