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.12-213-g8ca52c6


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  8ca52c6e3b2dc44a46c32d6a8e6a7f608915998f (commit)
      from  69da074d7adfab7b57004a0dea9403a928e310a5 (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://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8ca52c6e3b2dc44a46c32d6a8e6a7f608915998f

commit 8ca52c6e3b2dc44a46c32d6a8e6a7f608915998f
Author: H.J. Lu <hongjiu.lu@intel.com>
Date:   Wed Nov 10 03:05:37 2010 -0500

    Fix one exit path in x86-64 SSE4.2 str{,n}casecmp.

diff --git a/ChangeLog b/ChangeLog
index d40db12..89f622b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-11-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #12205]
+	* string/test-strncasecmp.c (check_result): New function.
+	(do_one_test): Use it.
+	(check1): New function.
+	(test_main): Use it.
+	* sysdeps/i386/i686/multiarch/strcmp.S (nibble_ashr_use_sse4_2_exit):
+	Support strcasecmp and strncasecmp.
+
 2010-11-08  Ulrich Drepper  <drepper@gmail.com>
 
 	[BZ #12194]
diff --git a/NEWS b/NEWS
index d4d5b73..c588bd1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes.  2010-11-8
+GNU C Library NEWS -- history of user-visible changes.  2010-11-10
 Copyright (C) 1992-2009, 2010 Free Software Foundation, Inc.
 See the end for copying conditions.
 
@@ -11,7 +11,7 @@ Version 2.13
 
   3268, 7066, 10851, 11611, 11640, 11701, 11840, 11856, 11883, 11903, 11904,
   11968, 11979, 12005, 12037, 12067, 12077, 12078, 12092, 12093, 12107, 12108,
-  12113, 12140, 12159, 12167, 12191, 12194
+  12113, 12140, 12159, 12167, 12191, 12194, 12205
 
 * New Linux interfaces: prlimit, prlimit64, fanotify_init, fanotify_mark
 
diff --git a/string/test-strncasecmp.c b/string/test-strncasecmp.c
index 80e4d63..daff6ed 100644
--- a/string/test-strncasecmp.c
+++ b/string/test-strncasecmp.c
@@ -70,9 +70,9 @@ stupid_strncasecmp (const char *s1, const char *s2, size_t max)
   return ret;
 }
 
-static void
-do_one_test (impl_t *impl, const char *s1, const char *s2, size_t n,
-	     int exp_result)
+static int
+check_result (impl_t *impl, const char *s1, const char *s2, size_t n,
+	      int exp_result)
 {
   int result = CALL (impl, s1, s2, n);
   if ((exp_result == 0 && result != 0)
@@ -82,9 +82,19 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, size_t n,
       error (0, 0, "Wrong result in function %s %d %d", impl->name,
 	     result, exp_result);
       ret = 1;
-      return;
+      return -1;
     }
 
+  return 0;
+}
+
+static void
+do_one_test (impl_t *impl, const char *s1, const char *s2, size_t n,
+	     int exp_result)
+{
+  if (check_result (impl, s1, s2, n, exp_result) < 0)
+    return;
+
   if (HP_TIMING_AVAIL)
     {
       hp_timing_t start __attribute ((unused));
@@ -242,6 +252,25 @@ do_random_tests (void)
     }
 }
 
+
+static void
+check1 (void)
+{
+  static char cp [4096+16] __attribute__ ((aligned(4096)));
+  static char gotrel[4096] __attribute__ ((aligned(4096)));
+  char *s1 = cp + 0xffa;
+  char *s2 = gotrel + 0xcbe;
+  int exp_result;
+  size_t n = 6;
+
+  strcpy (s1, "gottpoff");
+  strcpy (s2, "GOTPLT");
+
+  exp_result = simple_strncasecmp (s1, s2, n);
+  FOR_EACH_IMPL (impl, 0)
+    check_result (impl, s1, s2, n, exp_result);
+}
+
 int
 test_main (void)
 {
@@ -249,6 +278,8 @@ test_main (void)
 
   test_init ();
 
+  check1 ();
+
   printf ("%23s", "");
   FOR_EACH_IMPL (impl, 0)
     printf ("\t%s", impl->name);
diff --git a/sysdeps/x86_64/multiarch/strcmp.S b/sysdeps/x86_64/multiarch/strcmp.S
index 54e5bbc..1859289 100644
--- a/sysdeps/x86_64/multiarch/strcmp.S
+++ b/sysdeps/x86_64/multiarch/strcmp.S
@@ -1809,7 +1809,13 @@ LABEL(nibble_ashr_15_use_sse4_2):
 	ja	LABEL(loop_ashr_15_use_sse4_2)
 
 LABEL(nibble_ashr_use_sse4_2_exit):
+# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
 	pcmpistri      $0x1a,(%rsi,%rdx), %xmm0
+# else
+	movdqa	(%rsi,%rdx), %xmm1
+	TOLOWER (%xmm0, %xmm1)
+	pcmpistri $0x1a, %xmm1, %xmm0
+# endif
 	.p2align 4
 LABEL(use_sse4_2_exit):
 	jnc	LABEL(strcmp_exitz_sse4_2)

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

Summary of changes:
 ChangeLog                         |   10 +++++++++
 NEWS                              |    4 +-
 string/test-strncasecmp.c         |   39 +++++++++++++++++++++++++++++++++---
 sysdeps/x86_64/multiarch/strcmp.S |    6 +++++
 4 files changed, 53 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]