diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-06-05 16:54:50 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-06-05 16:54:50 -0700 |
commit | b77c93232978db6506c75d708df851895ab3d48c (patch) | |
tree | e95b8c743e4d16983d0998211f5668c23e8d2fd5 /sysdeps/x86_64/rawmemchr.S | |
parent | 6f9eea15bf8d49d64ca1f3fd6d1a528c40f658a4 (diff) | |
download | glibc-b77c93232978db6506c75d708df851895ab3d48c.tar glibc-b77c93232978db6506c75d708df851895ab3d48c.tar.gz glibc-b77c93232978db6506c75d708df851895ab3d48c.tar.bz2 glibc-b77c93232978db6506c75d708df851895ab3d48c.zip |
Add SSE4.2 optimized rawmemchr implementation for x86-64.
Diffstat (limited to 'sysdeps/x86_64/rawmemchr.S')
-rw-r--r-- | sysdeps/x86_64/rawmemchr.S | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdeps/x86_64/rawmemchr.S b/sysdeps/x86_64/rawmemchr.S index c3bd771635..cfb4cebf68 100644 --- a/sysdeps/x86_64/rawmemchr.S +++ b/sysdeps/x86_64/rawmemchr.S @@ -34,19 +34,18 @@ ENTRY (rawmemchr) pcmpeqb %xmm1, %xmm0 shl %cl, %esi pmovmskb %xmm0, %ecx - leaq 16(%rdi), %rdi andl %esi, %ecx jnz 1f -2: movdqa (%rdi), %xmm0 +2: movdqa 16(%rdi), %xmm0 leaq 16(%rdi), %rdi pcmpeqb %xmm1, %xmm0 pmovmskb %xmm0, %ecx testl %ecx, %ecx jz 2b -1: bsfl %ecx, %ecx - leaq -16(%rcx,%rdi), %rax +1: bsfl %ecx, %eax + addq %rdi, %rax ret END (rawmemchr) |