[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r11020 - in /fsf/trunk/libc: ./ sysdeps/i386/i686/multiarch/ sysdeps/x86_64/multiarch/



Author: eglibc
Date: Thu Jul 22 00:03:36 2010
New Revision: 11020

Log:
Import glibc-mainline for 2010-07-22

Added:
    fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcasestr-nonascii.c
Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/sysdeps/i386/i686/multiarch/Makefile
    fsf/trunk/libc/sysdeps/x86_64/multiarch/strcasestr-nonascii.c
    fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Jul 22 00:03:36 2010
@@ -1,3 +1,12 @@
+2010-07-21  Andreas Schwab  <schwab@xxxxxxxxxx>
+
+	* sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
+	strcasestr-nonascii.
+	(CFLAGS-strcasestr-nonascii.c): Define.
+	* sysdeps/i386/i686/multiarch/strcasestr-nonascii.c: New file.
+	* sysdeps/x86_64/multiarch/strcasestr-nonascii.c (STRSTR_SSE42):
+	Remove unused attribute.
+
 2010-07-20  Roland McGrath  <roland@xxxxxxxxxx>
 
 	* elf/dl-sysdep.c (_dl_important_hwcaps): Add dsocaps mask to

Modified: fsf/trunk/libc/sysdeps/i386/i686/multiarch/Makefile
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/Makefile (original)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/Makefile Thu Jul 22 00:03:36 2010
@@ -9,7 +9,7 @@
 		   memmove-ssse3-rep bcopy-ssse3 bcopy-ssse3-rep \
 		   memset-sse2-rep bzero-sse2-rep strcmp-ssse3 \
 		   strcmp-sse4 strncmp-c strncmp-ssse3 strncmp-sse4 \
-		   memcmp-ssse3 memcmp-sse4
+		   memcmp-ssse3 memcmp-sse4 strcasestr-nonascii
 ifeq (yes,$(config-cflags-sse4))
 sysdep_routines += strcspn-c strpbrk-c strspn-c strstr-c strcasestr-c
 CFLAGS-strcspn-c.c += -msse4
@@ -17,6 +17,7 @@
 CFLAGS-strspn-c.c += -msse4
 CFLAGS-strstr.c += -msse4
 CFLAGS-strcasestr.c += -msse4
+CFLAGS-strcasestr-nonascii.c += -msse4
 endif
 endif
 

Added: fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcasestr-nonascii.c
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcasestr-nonascii.c (added)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcasestr-nonascii.c Thu Jul 22 00:03:36 2010
@@ -1,0 +1,2 @@
+#include <nmmintrin.h>
+#include <sysdeps/x86_64/multiarch/strcasestr-nonascii.c>

Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strcasestr-nonascii.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strcasestr-nonascii.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strcasestr-nonascii.c Thu Jul 22 00:03:36 2010
@@ -23,7 +23,7 @@
 /* Similar to __m128i_strloadu.  Convert to lower case for none-POSIX/C
    locale.  */
 static inline __m128i
-__m128i_strloadu_tolower (const unsigned char * p)
+__m128i_strloadu_tolower (const unsigned char *p)
 {
   union
     {
@@ -46,5 +46,5 @@
 
 #define STRCASESTR_NONASCII
 #define USE_AS_STRCASESTR
-#define STRSTR_SSE42 attribute_hidden __strcasestr_sse42_nonascii
+#define STRSTR_SSE42 __strcasestr_sse42_nonascii
 #include "strstr.c"

Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr.c Thu Jul 22 00:03:36 2010
@@ -168,13 +168,12 @@
 /* Similar to __m128i_strloadu.  Convert to lower case for POSIX/C
    locale.  */
 static inline __m128i
-__m128i_strloadu_tolower (const unsigned char * p)
+__m128i_strloadu_tolower (const unsigned char *p, __m128i rangeuc,
+			  __m128i u2ldelta)
 {
   __m128i frag = __m128i_strloadu (p);
 
   /* Convert frag to lower case for POSIX/C locale.  */
-  __m128i rangeuc = _mm_set_epi64x (0x0, 0x5a41);
-  __m128i u2ldelta = _mm_set1_epi64x (0xe0e0e0e0e0e0e0e0);
   __m128i mask1 = _mm_cmpistrm (rangeuc, frag, 0x44);
   __m128i mask2 = _mm_blendv_epi8 (u2ldelta, frag, mask1);
   mask2 = _mm_sub_epi8 (mask2, u2ldelta);
@@ -244,9 +243,13 @@
   if (__builtin_expect (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_NONASCII_CASE)
 			!= 0, 0))
     return __strcasestr_sse42_nonascii (s1, s2);
+
+  const __m128i rangeuc = _mm_set_epi64x (0x0, 0x5a41);
+  const __m128i u2ldelta = _mm_set1_epi64x (0xe0e0e0e0e0e0e0e0);
+#  define strloadu(p) __m128i_strloadu_tolower (p, rangeuc, u2ldelta)
+# else
+#  define strloadu __m128i_strloadu_tolower
 # endif
-
-# define strloadu __m128i_strloadu_tolower
 #else
 # define strloadu __m128i_strloadu
 #endif