-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SSE4.2 strstr/strcasestr for x86-64.
This patch implements SSE4.2 strstr/strcasestr, using Knuth-Morris-Pratt string searching algorithm.
- Loading branch information
H.J. Lu
authored and
Ulrich Drepper
committed
Jul 21, 2009
1 parent
63fbc91
commit 2b7a866
Showing
8 changed files
with
551 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#define USE_AS_STRCASESTR | ||
#define STRSTR_SSE42 __strcasestr_sse42 | ||
#include "strstr.c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "init-arch.h" | ||
|
||
#define STRSTR __strstr_sse2 | ||
#undef libc_hidden_builtin_def | ||
#define libc_hidden_builtin_def(name) \ | ||
__hidden_ver1 (__strstr_sse2, __GI_strstr, __strstr_sse2); | ||
|
||
#include "string/strstr.c" | ||
|
||
extern char *__strstr_sse42 (const char *, const char *); | ||
|
||
libc_ifunc (strstr, HAS_SSE4_2 ? __strstr_sse42 : __strstr_sse2); |
Oops, something went wrong.