about summary refs log tree commit diff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-10-19 22:22:29 -0400
committerUlrich Drepper <drepper@gmail.com>2011-10-19 22:22:29 -0400
commit855d156018a701b3613eb4b14ab3bd09fd12f0a3 (patch)
treeca43c7fc79f55509f9de920fee1af242ce7bab98 /sysdeps/x86_64
parentd9a4d2ab278ab50637e383b6174e9ec42db84327 (diff)
downloadglibc-855d156018a701b3613eb4b14ab3bd09fd12f0a3.tar.gz
glibc-855d156018a701b3613eb4b14ab3bd09fd12f0a3.tar.xz
glibc-855d156018a701b3613eb4b14ab3bd09fd12f0a3.zip
Optimize x86-64 rawmemchr and add test
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/multiarch/rawmemchr.S7
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdeps/x86_64/multiarch/rawmemchr.S b/sysdeps/x86_64/multiarch/rawmemchr.S
index a8933fb55a..1f5bbe6d3f 100644
--- a/sysdeps/x86_64/multiarch/rawmemchr.S
+++ b/sysdeps/x86_64/multiarch/rawmemchr.S
@@ -43,19 +43,18 @@ strong_alias (rawmemchr, __rawmemchr)
 
 
 	.section .text.sse4.2,"ax",@progbits
-	.align 	16
+	.align	16
 	.type	__rawmemchr_sse42, @function
 __rawmemchr_sse42:
 	cfi_startproc
 	CALL_MCOUNT
 	movd	%esi, %xmm1
 	movq	%rdi, %rcx
-	punpcklbw %xmm1, %xmm1
+	pxor	%xmm2, %xmm2
 	andq	$~15, %rdi
-	punpcklbw %xmm1, %xmm1
 	orl	$0xffffffff, %esi
+	pshufb	%xmm2, %xmm1
 	movdqa	(%rdi), %xmm0
-	pshufd	$0, %xmm1, %xmm1
 	subq	%rdi, %rcx
 	pcmpeqb	%xmm1, %xmm0
 	shl	%cl, %esi