diff options
author | Andreas Schwab <schwab@redhat.com> | 2010-07-21 07:26:18 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2010-07-21 07:26:18 -0700 |
commit | f6a31e0eb6150b8b2307b6003ab18a048b91b11a (patch) | |
tree | 50bfad1b713f24a57a0b2c7a679f9cf00286a5a1 /sysdeps/x86_64 | |
parent | 23d101d8eea76469b41c12b10a8e8ed13cf66bc6 (diff) | |
download | glibc-f6a31e0eb6150b8b2307b6003ab18a048b91b11a.tar glibc-f6a31e0eb6150b8b2307b6003ab18a048b91b11a.tar.gz glibc-f6a31e0eb6150b8b2307b6003ab18a048b91b11a.tar.bz2 glibc-f6a31e0eb6150b8b2307b6003ab18a048b91b11a.zip |
Add strcasestr-nonascii to i386 build
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r-- | sysdeps/x86_64/multiarch/strcasestr-nonascii.c | 4 | ||||
-rw-r--r-- | sysdeps/x86_64/multiarch/strstr.c | 13 |
2 files changed, 10 insertions, 7 deletions
diff --git a/sysdeps/x86_64/multiarch/strcasestr-nonascii.c b/sysdeps/x86_64/multiarch/strcasestr-nonascii.c index 0804e96de7..8e1e6cfdd8 100644 --- a/sysdeps/x86_64/multiarch/strcasestr-nonascii.c +++ b/sysdeps/x86_64/multiarch/strcasestr-nonascii.c @@ -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 @@ __m128i_strloadu_tolower (const unsigned char * p) #define STRCASESTR_NONASCII #define USE_AS_STRCASESTR -#define STRSTR_SSE42 attribute_hidden __strcasestr_sse42_nonascii +#define STRSTR_SSE42 __strcasestr_sse42_nonascii #include "strstr.c" diff --git a/sysdeps/x86_64/multiarch/strstr.c b/sysdeps/x86_64/multiarch/strstr.c index a0f2bb4d74..32ab939330 100644 --- a/sysdeps/x86_64/multiarch/strstr.c +++ b/sysdeps/x86_64/multiarch/strstr.c @@ -168,13 +168,12 @@ __m128i_strloadu (const unsigned char * p) /* 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 @@ STRSTR_SSE42 (const unsigned char *s1, const unsigned char *s2) if (__builtin_expect (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_NONASCII_CASE) != 0, 0)) return __strcasestr_sse42_nonascii (s1, s2); -# endif -# define strloadu __m128i_strloadu_tolower + 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 #else # define strloadu __m128i_strloadu #endif |