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.23-78-g183a34d


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  183a34dc4a07cad723cd78e494d16a5ef0b6a63e (commit)
       via  911569d02dec023d949d96aa7b0e828c91c06f55 (commit)
      from  87da630b22f70355531a759099f7f4b9311fb39d (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=183a34dc4a07cad723cd78e494d16a5ef0b6a63e

commit 183a34dc4a07cad723cd78e494d16a5ef0b6a63e
Author: Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
Date:   Fri Jan 22 18:05:05 2016 -0200

    powerpc: Remove uses of operand modifier (%s) in inline asm
    
    The operand modifier %s on powerpc is an undocumented internal implementation
    detail of GCC.  Besides that, the GCC community wants to remove it.  This patch
    rewrites the expressions that use this modifier with logically equivalent
    expressions that don't require it.
    
    Explanation for the substitution:
    
    The %s modifier takes an immediate operand and prints 32 less such immediate.
    Thus, in the previous code, the expression resulted in:
    
      32 - __builtin_ffs(e)
    
    where e was guaranteed to have exactly a single bit set, by the following
    expressions:
    
      (e & (e-1) == 0) : e has at most one bit set.
      (e != 0)         : e is not zero, thus it has at least one bit set.
    
    Since we guarantee that there is exactly only one bit set, the following
    statement is true:
    
      32 - __builtin_ffs(e) == __builtin_clz(e)
    
    Thus, we can replace __builtin_ffs with __builtin_clz and remove the %s operand
    modifier.

diff --git a/ChangeLog b/ChangeLog
index 79a0904..585c9c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-08  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>
+
+	* sysdeps/powerpc/bits/fenvinline.h (feraiseexcept): Remove use of %s
+	operand modifier.
+	(feclearexcept): Likewise.
+
 2016-03-08  Carlos Eduardo Seo  <cseo@linux.vnet.ibm.com>
 
 	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Updated
diff --git a/sysdeps/powerpc/bits/fenvinline.h b/sysdeps/powerpc/bits/fenvinline.h
index 4a7b2af..c283ede 100644
--- a/sysdeps/powerpc/bits/fenvinline.h
+++ b/sysdeps/powerpc/bits/fenvinline.h
@@ -32,8 +32,10 @@
    warning when __excepts is not a constant.  Otherwise, they mean the
    same as just plain 'i'.  */
 
+#  if __GNUC_PREREQ(3, 4)
+
 /* Inline definition for feraiseexcept.  */
-#  define feraiseexcept(__excepts) \
+#   define feraiseexcept(__excepts) \
   (__extension__  ({ 							      \
     int __e = __excepts;						      \
     int __ret;								      \
@@ -42,8 +44,8 @@
         && __e != FE_INVALID)						      \
       {									      \
 	if (__e != 0)							      \
-	  __asm__ __volatile__ ("mtfsb1 %s0"				      \
-				: : "i#*X" (__builtin_ffs (__e)));	      \
+	  __asm__ __volatile__ ("mtfsb1 %0"				      \
+				: : "i#*X" (__builtin_clz (__e)));	      \
         __ret = 0;							      \
       }									      \
     else								      \
@@ -52,7 +54,7 @@
   }))
 
 /* Inline definition for feclearexcept.  */
-#  define feclearexcept(__excepts) \
+#   define feclearexcept(__excepts) \
   (__extension__  ({ 							      \
     int __e = __excepts;						      \
     int __ret;								      \
@@ -61,8 +63,8 @@
         && __e != FE_INVALID)						      \
       {									      \
 	if (__e != 0)							      \
-	  __asm__ __volatile__ ("mtfsb0 %s0"				      \
-				: : "i#*X" (__builtin_ffs (__e)));	      \
+	  __asm__ __volatile__ ("mtfsb0 %0"				      \
+				: : "i#*X" (__builtin_clz (__e)));	      \
         __ret = 0;							      \
       }									      \
     else								      \
@@ -70,6 +72,8 @@
     __ret;								      \
   }))
 
+#  endif /* __GNUC_PREREQ(3, 4).  */
+
 # endif /* !__NO_MATH_INLINES.  */
 
 #endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */

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

commit 911569d02dec023d949d96aa7b0e828c91c06f55
Author: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Date:   Mon Dec 28 16:36:46 2015 -0200

    powerpc: Fix dl-procinfo HWCAP
    
    HWCAP-related code should had been updated when the 32 bits of HWCAP were
    used.  This patch updates the code in dl-procinfo.h to loop through all
    the 32 bits in HWCAP and updates _dl_powerpc_cap_flags accordingly.

diff --git a/ChangeLog b/ChangeLog
index 289d578..79a0904 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-03-08  Carlos Eduardo Seo  <cseo@linux.vnet.ibm.com>
+
+	* sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Updated
+	to reflect the entire 32-bit HWCAP.
+	* sysdeps/powerpc/dl-procinfo.h: Code cleanup.
+	(_DL_HWCAP_FIRST): Removed.  Replaced by 0 accordingly.
+
 2016-03-08  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #19783]
diff --git a/sysdeps/powerpc/dl-procinfo.c b/sysdeps/powerpc/dl-procinfo.c
index 6e7850e..0b55906 100644
--- a/sysdeps/powerpc/dl-procinfo.c
+++ b/sysdeps/powerpc/dl-procinfo.c
@@ -45,11 +45,12 @@
 #if !defined PROCINFO_DECL && defined SHARED
   ._dl_powerpc_cap_flags
 #else
-PROCINFO_CLASS const char _dl_powerpc_cap_flags[60][10]
+PROCINFO_CLASS const char _dl_powerpc_cap_flags[64][10]
 #endif
 #ifndef PROCINFO_DECL
 = {
-    "ppcle", "true_le", "archpmu", "vsx",
+    "ppcle", "true_le", "", "",
+    "", "", "archpmu", "vsx",
     "arch_2_06", "power6x", "dfp", "pa6t",
     "arch_2_05", "ic_snoop", "smt", "booke",
     "cellbe", "power5+", "power5", "power4",
diff --git a/sysdeps/powerpc/dl-procinfo.h b/sysdeps/powerpc/dl-procinfo.h
index bce3a49..2187c5e 100644
--- a/sysdeps/powerpc/dl-procinfo.h
+++ b/sysdeps/powerpc/dl-procinfo.h
@@ -22,9 +22,6 @@
 #include <ldsodefs.h>
 #include <sysdep.h>	/* This defines the PPC_FEATURE[2]_* macros.  */
 
-/* There are 28 bits used, but they are bits 4..31.  */
-#define _DL_HWCAP_FIRST		4
-
 /* The total number of available bits (including those prior to
    _DL_HWCAP_FIRST).  Some of these bits might not be used.  */
 #define _DL_HWCAP_COUNT		64
@@ -68,7 +65,7 @@ static inline const char *
 __attribute__ ((unused))
 _dl_hwcap_string (int idx)
 {
-  return GLRO(dl_powerpc_cap_flags)[idx - _DL_HWCAP_FIRST];
+  return GLRO(dl_powerpc_cap_flags)[idx];
 }
 
 static inline const char *
@@ -82,7 +79,7 @@ static inline int
 __attribute__ ((unused))
 _dl_string_hwcap (const char *str)
 {
-  for (int i = _DL_HWCAP_FIRST; i < _DL_HWCAP_COUNT; ++i)
+  for (int i = 0; i < _DL_HWCAP_COUNT; ++i)
     if (strcmp (str, _dl_hwcap_string (i)) == 0)
       return i;
   return -1;
@@ -180,7 +177,7 @@ _dl_procinfo (unsigned int type, unsigned long int word)
     case AT_HWCAP:
       _dl_printf ("AT_HWCAP:       ");
 
-      for (int i = _DL_HWCAP_FIRST; i <= _DL_HWCAP_LAST; ++i)
+      for (int i = 0; i <= _DL_HWCAP_LAST; ++i)
        if (word & (1 << i))
          _dl_printf (" %s", _dl_hwcap_string (i));
       break;

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

Summary of changes:
 ChangeLog                         |   13 +++++++++++++
 sysdeps/powerpc/bits/fenvinline.h |   16 ++++++++++------
 sysdeps/powerpc/dl-procinfo.c     |    5 +++--
 sysdeps/powerpc/dl-procinfo.h     |    9 +++------
 4 files changed, 29 insertions(+), 14 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]