1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Add SSE4.2 support for strcmp and strncmp on x86-64.

This commit is contained in:
H.J. Lu
2009-06-22 20:38:41 -07:00
committed by Ulrich Drepper
parent 9618c7c20e
commit 772f4e6a1b
7 changed files with 1714 additions and 5 deletions

View File

@ -21,15 +21,16 @@
#undef strncmp
#ifndef STRNCMP
#define STRNCMP strncmp
#endif
/* Compare no more than N characters of S1 and S2,
returning less than, equal to or greater than zero
if S1 is lexicographically less than, equal to or
greater than S2. */
int
strncmp (s1, s2, n)
const char *s1;
const char *s2;
size_t n;
STRNCMP (const char *s1, const char *s2, size_t n)
{
unsigned reg_char c1 = '\0';
unsigned reg_char c2 = '\0';
@ -70,4 +71,5 @@ strncmp (s1, s2, n)
return c1 - c2;
}
libc_hidden_builtin_def (strncmp)
libc_hidden_builtin_def (STRNCMP)