glibc/sysdeps/x86_64/multiarch/strcasestr-c.c
H.J. Lu 2b7a8664fa SSE4.2 strstr/strcasestr for x86-64.
This patch implements SSE4.2 strstr/strcasestr, using Knuth-Morris-Pratt
string searching algorithm.
2009-07-20 21:06:50 -07:00

19 lines
481 B
C

#include "init-arch.h"
#define STRCASESTR __strcasestr_sse2
#undef libc_hidden_builtin_def
#define libc_hidden_builtin_def(name) \
__hidden_ver1 (__strcasestr_sse2, __GI_strcasestr, __strcasestr_sse2);
#include "string/strcasestr.c"
extern char *__strcasestr_sse42 (const char *, const char *);
#if 1
libc_ifunc (__strcasestr,
HAS_SSE4_2 ? __strcasestr_sse42 : __strcasestr_sse2);
#else
libc_ifunc (__strcasestr,
0 ? __strcasestr_sse42 : __strcasestr_sse2);
#endif