diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-08-07 22:51:02 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-08-07 22:51:02 -0700 |
commit | 0fda545d5f9253d7b2b7832c37cd8f57c5619da4 (patch) | |
tree | b51e2c63b9eada8f64ca7e0f6cb82e4cbbb8b30f /sysdeps/x86_64/multiarch/strcmp.S | |
parent | 9083bcc5dc747eeec24c2bb8bf5b7055b3bd4dbf (diff) | |
download | glibc-0fda545d5f9253d7b2b7832c37cd8f57c5619da4.tar.gz glibc-0fda545d5f9253d7b2b7832c37cd8f57c5619da4.tar.xz glibc-0fda545d5f9253d7b2b7832c37cd8f57c5619da4.zip |
Add SSSE3-optimized implementation of str{,n}cmp for x86-64.
Diffstat (limited to 'sysdeps/x86_64/multiarch/strcmp.S')
-rw-r--r-- | sysdeps/x86_64/multiarch/strcmp.S | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sysdeps/x86_64/multiarch/strcmp.S b/sysdeps/x86_64/multiarch/strcmp.S index 1a315737af..05adf1e2e6 100644 --- a/sysdeps/x86_64/multiarch/strcmp.S +++ b/sysdeps/x86_64/multiarch/strcmp.S @@ -34,6 +34,7 @@ mov %r9, %r11 #define STRCMP_SSE42 __strncmp_sse42 +#define STRCMP_SSSE3 __strncmp_ssse3 #define STRCMP_SSE2 __strncmp_sse2 #define __GI_STRCMP __GI_strncmp #else @@ -41,6 +42,7 @@ #ifndef STRCMP #define STRCMP strcmp #define STRCMP_SSE42 __strcmp_sse42 +#define STRCMP_SSSE3 __strcmp_ssse3 #define STRCMP_SSE2 __strcmp_sse2 #define __GI_STRCMP __GI_strcmp #endif @@ -60,10 +62,14 @@ ENTRY(STRCMP) cmpl $0, __cpu_features+KIND_OFFSET(%rip) jne 1f call __init_cpu_features -1: leaq STRCMP_SSE2(%rip), %rax - testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) - jz 2f +1: leaq STRCMP_SSE42(%rip), %rax + testl $(1<<20), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + jnz 2f + leaq STRCMP_SSSE3(%rip), %rax + testl $(1<<9), __cpu_features+CPUID_OFFSET+COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET(%rip) + jnz 2f + leaq STRCMP_SSE2(%rip), %rax 2: ret END(STRCMP) |