This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.10-207-g4e5b582
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 26 Jul 2009 02:15:33 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.10-207-g4e5b582
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 4e5b5821bf58ddc30d455ee4968623f3334fbe28 (commit)
from 657317537c09b82a2feb1194fda045f63e3a1222 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4e5b5821bf58ddc30d455ee4968623f3334fbe28
commit 4e5b5821bf58ddc30d455ee4968623f3334fbe28
Author: H.J. Lu <hongjiu.lu@intel.com>
Date: Sat Jul 25 19:15:14 2009 -0700
Some some optimizations for x86-64 strcmp.
diff --git a/ChangeLog b/ChangeLog
index f47b089..abfe7db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-07-25 Ulrich Drepper <drepper@redhat.com>
+ * sysdeps/x86_64/multiarch/strcmp.S: Some more optimizations for
+ modern processor versions. Patch by H.J. Lu <hongjiu.lu@intel.com>.
+
[BZ #10448]
* sysdeps/posix/getaddrinfo.c (gaih_inet): If NSS module contains no
callback we must touch the status to avoid using stale value.
diff --git a/sysdeps/x86_64/multiarch/strcmp.S b/sysdeps/x86_64/multiarch/strcmp.S
index f9cf943..15148e4 100644
--- a/sysdeps/x86_64/multiarch/strcmp.S
+++ b/sysdeps/x86_64/multiarch/strcmp.S
@@ -120,10 +120,8 @@ STRCMP_SSE42:
ja LABEL(crosscache) /* rsi: 16-byte load will cross cache line */
cmp $0x30, %eax
ja LABEL(crosscache) /* rdi: 16-byte load will cross cache line */
- movlpd (%rdi), %xmm1
- movlpd (%rsi), %xmm2
- movhpd 8(%rdi), %xmm1
- movhpd 8(%rsi), %xmm2
+ movdqu (%rdi), %xmm1
+ movdqu (%rsi), %xmm2
pxor %xmm0, %xmm0 /* clear %xmm0 for null char checks */
pcmpeqb %xmm1, %xmm0 /* Any null chars? */
pcmpeqb %xmm2, %xmm1 /* compare first 16 bytes for equality */
@@ -1492,11 +1490,8 @@ LABEL(less16bytes):
sub %rdx, %r11
jbe LABEL(strcmp_exitz)
#endif
- xor %ecx, %ecx /* clear %ecx */
- xor %eax, %eax /* clear %eax */
-
- movb (%rsi, %rdx), %cl
- movb (%rdi, %rdx), %al
+ movzbl (%rsi, %rdx), %ecx
+ movzbl (%rdi, %rdx), %eax
sub %ecx, %eax
ret
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 +++
sysdeps/x86_64/multiarch/strcmp.S | 13 ++++---------
2 files changed, 7 insertions(+), 9 deletions(-)
hooks/post-receive
--
GNU C Library master sources