conformtest: Add test data for fenv.h.
[glibc.git] / sysdeps / x86_64 / multiarch / strcasestr-nonascii.c
bloba1f996884859069156836ec1bda1b8e0f86af604
1 /* strstr with SSE4.2 intrinsics
2 Copyright (C) 2010 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 # include <ctype.h>
22 /* Similar to __m128i_strloadu. Convert to lower case for none-POSIX/C
23 locale. */
24 static inline __m128i
25 __m128i_strloadu_tolower (const unsigned char *p)
27 union
29 char b[16];
30 __m128i x;
31 } u;
33 for (int i = 0; i < 16; ++i)
34 if (p[i] == 0)
36 u.b[i] = 0;
37 break;
39 else
40 u.b[i] = tolower (p[i]);
42 return u.x;
46 #define STRCASESTR_NONASCII
47 #define USE_AS_STRCASESTR
48 #define STRSTR_SSE42 __strcasestr_sse42_nonascii
49 #include "strstr.c"