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 hjl/ifunc/c updated. glibc-2.25-460-g394bf2e


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, hjl/ifunc/c has been updated
       via  394bf2e50e02a6e7f40c7db44b9fdcef9299fe40 (commit)
      from  04ff139985118631eea7669d1bb595186cadbc24 (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=394bf2e50e02a6e7f40c7db44b9fdcef9299fe40

commit 394bf2e50e02a6e7f40c7db44b9fdcef9299fe40
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jun 13 05:31:35 2017 -0700

    More strcmp SSE4 fixes

diff --git a/sysdeps/x86_64/multiarch/strncase_l-avx.S b/sysdeps/x86_64/multiarch/strncase_l-avx.S
index 457afce..d7e7c47 100644
--- a/sysdeps/x86_64/multiarch/strncase_l-avx.S
+++ b/sysdeps/x86_64/multiarch/strncase_l-avx.S
@@ -16,10 +16,20 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+/* Since the counter, %r11, is unsigned, we branch to strcmp_exitz
+   if the new counter > the old one or is 0.  */
+#define UPDATE_STRNCMP_COUNTER				\
+	/* calculate left number to compare */		\
+	lea	-16(%rcx, %r11), %r9;			\
+	cmp	%r9, %r11;				\
+	jb	LABEL(strcmp_exitz);			\
+	test	%r9, %r9;				\
+	je	LABEL(strcmp_exitz);			\
+	mov	%r9, %r11
+
 #define USE_AVX			1
 #define SECTION			avx
 #define GLABEL(l)		l##_avx
-#define UPDATE_STRNCMP_COUNTER
 #define STRCMP_SSE42		__strncasecmp_l_avx
 #define USE_AS_STRNCASECMP_L
 #define NO_NOLOCALE_ALIAS
diff --git a/sysdeps/x86_64/multiarch/strncase_l-sse42.S b/sysdeps/x86_64/multiarch/strncase_l-sse42.S
index a13a7d6..1cfb3d2 100644
--- a/sysdeps/x86_64/multiarch/strncase_l-sse42.S
+++ b/sysdeps/x86_64/multiarch/strncase_l-sse42.S
@@ -17,9 +17,19 @@
    <http://www.gnu.org/licenses/>.  */
 
 #if IS_IN (libc)
+/* Since the counter, %r11, is unsigned, we branch to strcmp_exitz
+   if the new counter > the old one or is 0.  */
+# define UPDATE_STRNCMP_COUNTER				\
+	/* calculate left number to compare */		\
+	lea	-16(%rcx, %r11), %r9;			\
+	cmp	%r9, %r11;				\
+	jb	LABEL(strcmp_exitz);			\
+	test	%r9, %r9;				\
+	je	LABEL(strcmp_exitz);			\
+	mov	%r9, %r11
+
 # define SECTION			sse4.2
 # define GLABEL(l)		l##_sse42
-# define UPDATE_STRNCMP_COUNTER
 # define STRCMP_SSE42		__strncasecmp_l_sse42
 # define USE_AS_STRNCASECMP_L
 # define NO_NOLOCALE_ALIAS

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

Summary of changes:
 sysdeps/x86_64/multiarch/strncase_l-avx.S   |   12 +++++++++++-
 sysdeps/x86_64/multiarch/strncase_l-sse42.S |   12 +++++++++++-
 2 files changed, 22 insertions(+), 2 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]