summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorRichard Li <richardpku@gmail.com>2010-10-25 14:13:17 -0400
committerPetr Baudis <pasky@suse.cz>2010-11-01 22:29:35 +0100
commit0cd8f10947cd557d35175cab5f38c4e38fab646a (patch)
tree91e9b7196b94d1001477569c72cf5c7cba362560 /sysdeps
parentcd8ba92d3437c83cefdc31ed493cc3731ceec356 (diff)
downloadglibc-0cd8f10947cd557d35175cab5f38c4e38fab646a.tar.gz
Fix x86-64 strchr propagation of search byte into all bytes of SSE register
(cherry picked from commit dbf3a06904168417a05882a871342e7a9ee3b383)
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/x86_64/multiarch/strchr.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/x86_64/multiarch/strchr.S b/sysdeps/x86_64/multiarch/strchr.S
index b35566d1a5..44538aaa81 100644
--- a/sysdeps/x86_64/multiarch/strchr.S
+++ b/sysdeps/x86_64/multiarch/strchr.S
@@ -1,5 +1,5 @@
/* strchr with SSE4.2
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -87,13 +87,13 @@ __strchr_sse42:
pxor %xmm2, %xmm2
movd %esi, %xmm1
movl %edi, %ecx
+ pshufb %xmm2, %xmm1
andl $15, %ecx
movq %rdi, %r8
je L(aligned_start)
/* Handle unaligned string. */
andq $-16, %r8
- pshufb %xmm2, %xmm1
movdqa (%r8), %xmm0
pcmpeqb %xmm0, %xmm2
pcmpeqb %xmm1, %xmm0