[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r8531 - in /fsf/trunk/libc: ChangeLog sysdeps/x86_64/strlen.S



Author: eglibc
Date: Fri Jun  5 00:07:40 2009
New Revision: 8531

Log:
Import glibc-mainline for 2009-06-05

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/sysdeps/x86_64/strlen.S

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Jun  5 00:07:40 2009
@@ -1,3 +1,7 @@
+2009-06-04  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* sysdeps/x86_64/strlen.S: Minor optimizations.
+
 2009-06-02  H.J. Lu  <hongjiu.lu@xxxxxxxxx>
 
 	* elf/Makefile (distribute): Add ifuncmain1.c, ifuncmain1pic.c,

Modified: fsf/trunk/libc/sysdeps/x86_64/strlen.S
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/strlen.S (original)
+++ fsf/trunk/libc/sysdeps/x86_64/strlen.S Fri Jun  5 00:07:40 2009
@@ -23,30 +23,27 @@
 
 	.text
 ENTRY(strlen)
+	pxor	%xmm2, %xmm2
 	movq	%rdi, %rcx
 	movq	%rdi, %r8
 	andq	$~15, %rdi
-	pxor	%xmm1, %xmm1
+	movdqa	%xmm2, %xmm1
+	pcmpeqb	(%rdi), %xmm2
 	orl	$0xffffffff, %esi
-	movdqa	(%rdi), %xmm0
 	subq	%rdi, %rcx
-	leaq	16(%rdi), %rdi
-	pcmpeqb	%xmm1, %xmm0
-	shl	%cl, %esi
-	pmovmskb %xmm0, %edx
-	xorl	%eax, %eax
-	negq	%r8
+	shll	%cl, %esi
+	pmovmskb %xmm2, %edx
 	andl	%esi, %edx
 	jnz	1f
 
-2:	movdqa	(%rdi), %xmm0
+2:	movdqa	16(%rdi), %xmm0
 	leaq	16(%rdi), %rdi
 	pcmpeqb	%xmm1, %xmm0
 	pmovmskb %xmm0, %edx
 	testl	%edx, %edx
 	jz	2b
 
-1:	leaq	-16(%rdi,%r8), %rdi
+1:	subq	%r8, %rdi
 	bsfl	%edx, %eax
 	addq	%rdi, %rax
 	ret