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:
@ -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)
|
||||
|
Reference in New Issue
Block a user