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.25-20-gc2ff5ec


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  c2ff5ec13fca1bdd1cd646a0260808386d7bd7ff (commit)
       via  e688cceee598f2c675b19bbb423543020c5a5638 (commit)
       via  04f0fd640d78ff715cb9409f03d55366ed76966e (commit)
      from  dcd4cd575678c94f042c1a6b08663c648781a9eb (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=c2ff5ec13fca1bdd1cd646a0260808386d7bd7ff

commit c2ff5ec13fca1bdd1cd646a0260808386d7bd7ff
Author: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
Date:   Tue Feb 7 10:49:47 2017 +0530

    powerpc: Set minimum kernel version for powerpc64le
    
    This patch sets the minimum kernel version required for ppc64le as 3.10.0.

diff --git a/ChangeLog b/ChangeLog
index f8dacf7..4997650 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2017-02-07  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>
 
+	[BZ #15998]
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+	(arch_minimum_kernel): Set as 3.10.0 for ppc64le.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/configure: Regenerate.
+
+2017-02-07  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>
+
 	* sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S: Redefine
 	STRCHR as __strchr_power8.
 	* sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c: Redefine
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
index af06970..4e7fcf1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -207,3 +207,27 @@ $as_echo "$libc_cv_ppc64_def_call_elf" >&6; }
     libc_extra_cppflags="$libc_extra_cppflags -D_CALL_ELF=1"
   fi
 fi
+# Set minimum kernel version for ppc64le.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the machine type to set minimum kernel version" >&5
+$as_echo_n "checking the machine type to set minimum kernel version... " >&6; }
+if ${libc_cv_ppc64_le+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+                      yes
+                     #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  arch_minimum_kernel=3.10.0
+else
+  libc_cv_ppc64_le=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ppc64_le" >&5
+$as_echo "$libc_cv_ppc64_le" >&6; }
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
index 0822915..f9cba6e 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
@@ -27,3 +27,10 @@ else
     libc_extra_cppflags="$libc_extra_cppflags -D_CALL_ELF=1"
   fi
 fi
+# Set minimum kernel version for ppc64le.
+AC_CACHE_CHECK([the machine type to set minimum kernel version],
+  [libc_cv_ppc64_le],
+  [AC_EGREP_CPP(yes,[#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+                      yes
+                     #endif
+  ], arch_minimum_kernel=3.10.0, libc_cv_ppc64_le=no)])

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

commit e688cceee598f2c675b19bbb423543020c5a5638
Author: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
Date:   Tue Feb 7 10:42:06 2017 +0530

    powerpc: Use latest optimizations for internal function calls
    
    Some of the power8 strings optimizations are not updated to use the latest
    version of other string optimizations

diff --git a/ChangeLog b/ChangeLog
index 769e738..f8dacf7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2017-02-07  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>
 
+	* sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S: Redefine
+	STRCHR as __strchr_power8.
+	* sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c: Redefine
+	strlen as __strlen_power8.
+
+2017-02-07  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>
+
 	* sysdeps/powerpc/powerpc64/power8/strcmp.S: Adjust address for
 	unaligned load for shorter strings.
 	* sysdeps/powerpc/powerpc64/power9/strcmp.S: Likewise.
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S b/sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S
index f188c45..5a0eb9c 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcasestr-power8.S
@@ -44,6 +44,6 @@
 /* strnlen is used to check if len of r3 is more than r4.  */
 #define STRNLEN __strnlen_power7
 /* strchr is used to check if first char of r4 is present in r3.  */
-#define STRCHR __strchr_power7
+#define STRCHR __strchr_power8
 
 #include <sysdeps/powerpc/powerpc64/power8/strcasestr.S>
diff --git a/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c b/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c
index d6e69b1..f138bee 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/strcat-power8.c
@@ -23,8 +23,8 @@
 #define libc_hidden_def(name)
 
 extern typeof (strcpy) __strcpy_power8;
-extern typeof (strlen) __strlen_power7;
+extern typeof (strlen) __strlen_power8;
 
 #define strcpy __strcpy_power8
-#define strlen __strlen_power7
+#define strlen __strlen_power8
 #include <string/strcat.c>

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

commit 04f0fd640d78ff715cb9409f03d55366ed76966e
Author: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
Date:   Tue Feb 7 10:40:26 2017 +0530

    powerpc: Improve strcmp performance for shorter strings
    
    For strings >16B and <32B existing algorithm takes more time than default
    implementation when strings are placed closed to end of page. This is due
    to byte by byte access for handling page cross. This is improved by
    following >32B code path where the address is adjusted to aligned memory
    before doing load doubleword operation instead of loading bytes.
    
    Tested on powerpc64 and powerpc64le.

diff --git a/ChangeLog b/ChangeLog
index 6399c1f..769e738 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-02-07  Rajalakshmi Srinivasaraghavan  <raji@linux.vnet.ibm.com>
+
+	* sysdeps/powerpc/powerpc64/power8/strcmp.S: Adjust address for
+	unaligned load for shorter strings.
+	* sysdeps/powerpc/powerpc64/power9/strcmp.S: Likewise.
+
 2017-02-06  Joseph Myers  <joseph@codesourcery.com>
 
 	* math/libm-test-driver.c (flag_test_errno): New variable.
diff --git a/sysdeps/powerpc/powerpc64/power8/strcmp.S b/sysdeps/powerpc/powerpc64/power8/strcmp.S
index c34ff4a..d46bff8 100644
--- a/sysdeps/powerpc/powerpc64/power8/strcmp.S
+++ b/sysdeps/powerpc/powerpc64/power8/strcmp.S
@@ -30,21 +30,21 @@
 EALIGN (strcmp, 4, 0)
 	li	r0,0
 
-	/* Check if [s1]+32 or [s2]+32 will cross a 4K page boundary using
+	/* Check if [s1]+16 or [s2]+16 will cross a 4K page boundary using
 	   the code:
 
 	    (((size_t) s1) % PAGE_SIZE > (PAGE_SIZE - ITER_SIZE))
 
-	   with PAGE_SIZE being 4096 and ITER_SIZE begin 32.  */
+	   with PAGE_SIZE being 4096 and ITER_SIZE begin 16.  */
 
 	rldicl	r7,r3,0,52
 	rldicl	r9,r4,0,52
-	cmpldi	cr7,r7,4096-32
+	cmpldi	cr7,r7,4096-16
 	bgt	cr7,L(pagecross_check)
-	cmpldi	cr5,r9,4096-32
+	cmpldi	cr5,r9,4096-16
 	bgt	cr5,L(pagecross_check)
 
-	/* For short string up to 32 bytes, load both s1 and s2 using
+	/* For short string up to 16 bytes, load both s1 and s2 using
 	   unaligned dwords and compare.  */
 	ld	r8,0(r3)
 	ld	r10,0(r4)
@@ -60,25 +60,11 @@ EALIGN (strcmp, 4, 0)
 	orc.	r9,r12,r11
 	bne	cr0,L(different_nocmpb)
 
-	ld	r8,16(r3)
-	ld	r10,16(r4)
-	cmpb	r12,r8,r0
-	cmpb	r11,r8,r10
-	orc.	r9,r12,r11
-	bne	cr0,L(different_nocmpb)
-
-	ld	r8,24(r3)
-	ld	r10,24(r4)
-	cmpb	r12,r8,r0
-	cmpb	r11,r8,r10
-	orc.	r9,r12,r11
-	bne	cr0,L(different_nocmpb)
-
-	addi	r7,r3,32
-	addi	r4,r4,32
+	addi	r7,r3,16
+	addi	r4,r4,16
 
 L(align_8b):
-	/* Now it has checked for first 32 bytes, align source1 to doubleword
+	/* Now it has checked for first 16 bytes, align source1 to doubleword
 	   and adjust source2 address.  */
 	rldicl	r9,r7,0,61	/* source1 alignment to doubleword  */
 	subf	r4,r9,r4	/* Adjust source2 address based on source1
diff --git a/sysdeps/powerpc/powerpc64/power9/strcmp.S b/sysdeps/powerpc/powerpc64/power9/strcmp.S
index 3e32396..17ec8c2 100644
--- a/sysdeps/powerpc/powerpc64/power9/strcmp.S
+++ b/sysdeps/powerpc/powerpc64/power9/strcmp.S
@@ -65,21 +65,21 @@
 EALIGN (strcmp, 4, 0)
 	li	r0, 0
 
-	/* Check if [s1]+32 or [s2]+32 will cross a 4K page boundary using
+	/* Check if [s1]+16 or [s2]+16 will cross a 4K page boundary using
 	   the code:
 
 	    (((size_t) s1) % PAGE_SIZE > (PAGE_SIZE - ITER_SIZE))
 
-	   with PAGE_SIZE being 4096 and ITER_SIZE begin 32.  */
+	   with PAGE_SIZE being 4096 and ITER_SIZE begin 16.  */
 
 	rldicl	r7, r3, 0, 52
 	rldicl	r9, r4, 0, 52
-	cmpldi	cr7, r7, 4096-32
+	cmpldi	cr7, r7, 4096-16
 	bgt	cr7, L(pagecross_check)
-	cmpldi	cr5, r9, 4096-32
+	cmpldi	cr5, r9, 4096-16
 	bgt	cr5, L(pagecross_check)
 
-	/* For short strings up to 32 bytes,  load both s1 and s2 using
+	/* For short strings up to 16 bytes,  load both s1 and s2 using
 	   unaligned dwords and compare.  */
 	ld	r8, 0(r3)
 	ld	r10, 0(r4)
@@ -95,25 +95,11 @@ EALIGN (strcmp, 4, 0)
 	orc.	r9, r12, r11
 	bne	cr0, L(different_nocmpb)
 
-	ld	r8, 16(r3)
-	ld	r10, 16(r4)
-	cmpb	r12, r8, r0
-	cmpb	r11, r8, r10
-	orc.	r9, r12, r11
-	bne	cr0, L(different_nocmpb)
-
-	ld	r8, 24(r3)
-	ld	r10, 24(r4)
-	cmpb	r12, r8, r0
-	cmpb	r11, r8, r10
-	orc.	r9, r12, r11
-	bne	cr0, L(different_nocmpb)
-
-	addi	r7, r3, 32
-	addi	r4, r4, 32
+	addi	r7, r3, 16
+	addi	r4, r4, 16
 
 L(align):
-	/* Now it has checked for first 32 bytes.  */
+	/* Now it has checked for first 16 bytes.  */
 	vspltisb	v0, 0
 	vspltisb	v2, -1
 	lvsr	v6, 0, r4   /* Compute mask.  */

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

Summary of changes:
 ChangeLog                                          |   20 +++++++++++++
 .../powerpc64/multiarch/strcasestr-power8.S        |    2 +-
 .../powerpc/powerpc64/multiarch/strcat-power8.c    |    4 +-
 sysdeps/powerpc/powerpc64/power8/strcmp.S          |   30 +++++--------------
 sysdeps/powerpc/powerpc64/power9/strcmp.S          |   30 +++++--------------
 .../unix/sysv/linux/powerpc/powerpc64/configure    |   24 ++++++++++++++++
 .../unix/sysv/linux/powerpc/powerpc64/configure.ac |    7 ++++
 7 files changed, 70 insertions(+), 47 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]