about summary refs log tree commit diff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/multiarch/strlen.S7
1 files changed, 4 insertions, 3 deletions
diff --git a/sysdeps/x86_64/multiarch/strlen.S b/sysdeps/x86_64/multiarch/strlen.S
index bf889c1ab6..3f03b6930c 100644
--- a/sysdeps/x86_64/multiarch/strlen.S
+++ b/sysdeps/x86_64/multiarch/strlen.S
@@ -40,6 +40,7 @@ ENTRY(strlen)
 END(strlen)
 
 
+	.align 	16
 	.type	__strlen_sse42, @function
 __strlen_sse42:
 	pxor	%xmm2, %xmm2
@@ -63,9 +64,9 @@ __strlen_sse42:
 	subq	%r8, %rax
 	ret
 
-1:	bsfl	%edx, %eax
-	leaq	(%rdi,%rax), %rax
-	subq	%r8, %rax
+1:	subq	%r8, %rdi
+	bsfl	%edx, %eax
+	addq	%rdi, %rax
 	ret
 	.size	__strlen_sse42, .-__strlen_sse42