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.21-171-gb838844


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  b838844bc5028b2b3401af9f0f51687d8a1f8a54 (commit)
      from  e0ed2fb40a0e29c43cf60addc74741dab15f2e05 (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=b838844bc5028b2b3401af9f0f51687d8a1f8a54

commit b838844bc5028b2b3401af9f0f51687d8a1f8a54
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat Mar 7 01:39:42 2015 +0000

    soft-fp: Support conditional zero-initialization in declarations.
    
    In the Linux kernel, some architectures have a single function that
    uses different kinds of unpacking and packing depending on the
    instruction being emulated, meaning it is not readily visible to the
    compiler that variables from _FP_DECL and _FP_FRAC_DECL_* macros are
    only used in cases where they were initialized.  The existing copy of
    soft-fp in the Linux kernel uses zero-initialization to avoid warnings
    in this case, so while frowned upon as a warning suppression mechanism
    in code built for glibc it seems appropriate to have such
    zero-initialization conditional on __KERNEL__.  This patch duly adds
    it, via a macro _FP_ZERO_INIT that expands to empty for non-kernel
    compilations.
    
    Tested for powerpc-nofpu that installed stripped shared libraries are
    unchanged by this patch.
    
    	* soft-fp/soft-fp.h (_FP_ZERO_INIT): New macro.  Define depending
    	on [__KERNEL__].
    	* soft-fp/op-1.h (_FP_FRAC_DECL_1): Use _FP_ZERO_INIT.
    	* soft-fp/op-2.h (_FP_FRAC_DECL_2): Likewise.
    	* soft-fp/op-common.h (_FP_DECL): Likewise.

diff --git a/ChangeLog b/ChangeLog
index 7f2e14b..a200bce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-03-07  Joseph Myers  <joseph@codesourcery.com>
+
+	* soft-fp/soft-fp.h (_FP_ZERO_INIT): New macro.  Define depending
+	on [__KERNEL__].
+	* soft-fp/op-1.h (_FP_FRAC_DECL_1): Use _FP_ZERO_INIT.
+	* soft-fp/op-2.h (_FP_FRAC_DECL_2): Likewise.
+	* soft-fp/op-common.h (_FP_DECL): Likewise.
+
 2015-03-06  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* elf/ifuncdep2.c (global): Replace
diff --git a/soft-fp/op-1.h b/soft-fp/op-1.h
index 34c84d0..bc9e33b 100644
--- a/soft-fp/op-1.h
+++ b/soft-fp/op-1.h
@@ -30,7 +30,7 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#define _FP_FRAC_DECL_1(X)	_FP_W_TYPE X##_f
+#define _FP_FRAC_DECL_1(X)	_FP_W_TYPE X##_f _FP_ZERO_INIT
 #define _FP_FRAC_COPY_1(D, S)	(D##_f = S##_f)
 #define _FP_FRAC_SET_1(X, I)	(X##_f = I)
 #define _FP_FRAC_HIGH_1(X)	(X##_f)
diff --git a/soft-fp/op-2.h b/soft-fp/op-2.h
index 94a1c71..26bdfc0 100644
--- a/soft-fp/op-2.h
+++ b/soft-fp/op-2.h
@@ -30,7 +30,8 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#define _FP_FRAC_DECL_2(X)	_FP_W_TYPE X##_f0, X##_f1
+#define _FP_FRAC_DECL_2(X)				\
+  _FP_W_TYPE X##_f0 _FP_ZERO_INIT, X##_f1 _FP_ZERO_INIT
 #define _FP_FRAC_COPY_2(D, S)	(D##_f0 = S##_f0, D##_f1 = S##_f1)
 #define _FP_FRAC_SET_2(X, I)	__FP_FRAC_SET_2 (X, I)
 #define _FP_FRAC_HIGH_2(X)	(X##_f1)
diff --git a/soft-fp/op-common.h b/soft-fp/op-common.h
index 14fd6cd..ee41476 100644
--- a/soft-fp/op-common.h
+++ b/soft-fp/op-common.h
@@ -29,10 +29,10 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#define _FP_DECL(wc, X)				\
-  _FP_I_TYPE X##_c __attribute__ ((unused));	\
-  _FP_I_TYPE X##_s __attribute__ ((unused));	\
-  _FP_I_TYPE X##_e __attribute__ ((unused));	\
+#define _FP_DECL(wc, X)						\
+  _FP_I_TYPE X##_c __attribute__ ((unused)) _FP_ZERO_INIT;	\
+  _FP_I_TYPE X##_s __attribute__ ((unused)) _FP_ZERO_INIT;	\
+  _FP_I_TYPE X##_e __attribute__ ((unused)) _FP_ZERO_INIT;	\
   _FP_FRAC_DECL_##wc (X)
 
 /* Test whether the qNaN bit denotes a signaling NaN.  */
diff --git a/soft-fp/soft-fp.h b/soft-fp/soft-fp.h
index 1eafcb4..f93a941 100644
--- a/soft-fp/soft-fp.h
+++ b/soft-fp/soft-fp.h
@@ -51,6 +51,17 @@
 # endif
 #endif
 
+/* In the Linux kernel, some architectures have a single function that
+   uses different kinds of unpacking and packing depending on the
+   instruction being emulated, meaning it is not readily visible to
+   the compiler that variables from _FP_DECL and _FP_FRAC_DECL_*
+   macros are only used in cases where they were initialized.  */
+#ifdef __KERNEL__
+# define _FP_ZERO_INIT		= 0
+#else
+# define _FP_ZERO_INIT
+#endif
+
 #define _FP_WORKBITS		3
 #define _FP_WORK_LSB		((_FP_W_TYPE) 1 << 3)
 #define _FP_WORK_ROUND		((_FP_W_TYPE) 1 << 2)

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

Summary of changes:
 ChangeLog           |    8 ++++++++
 soft-fp/op-1.h      |    2 +-
 soft-fp/op-2.h      |    3 ++-
 soft-fp/op-common.h |    8 ++++----
 soft-fp/soft-fp.h   |   11 +++++++++++
 5 files changed, 26 insertions(+), 6 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]