about summary refs log tree commit diff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-06-23 12:45:57 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-06-23 12:46:12 -0700
commit049816c3be14e47e5fe10f8cd5a38bb611d34ce5 (patch)
treead7c9e5f7277c4e8dd9dcaf4fa2cc0bbf78ac1cc /sysdeps/x86_64
parent52a8e5cb43a937d5224d271537093a1f92d78e94 (diff)
downloadglibc-049816c3be14e47e5fe10f8cd5a38bb611d34ce5.tar.gz
glibc-049816c3be14e47e5fe10f8cd5a38bb611d34ce5.tar.xz
glibc-049816c3be14e47e5fe10f8cd5a38bb611d34ce5.zip
x86-64: Optimize L(between_2_3) in memcmp-avx2-movbe.S
Turn

	movzbl	-1(%rdi, %rdx), %edi
	movzbl	-1(%rsi, %rdx), %esi
	orl	%edi, %eax
	orl	%esi, %ecx

into

	movb	-1(%rdi, %rdx), %al
	movb	-1(%rsi, %rdx), %cl

	* sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S (between_2_3):
	Replace movzbl and orl with movb.
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S6
1 files changed, 2 insertions, 4 deletions
diff --git a/sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S b/sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S
index 2cd2f71b85..abcc61c381 100644
--- a/sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S
+++ b/sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S
@@ -144,10 +144,8 @@ L(between_2_3):
 	shll	$8, %ecx
 	bswap	%eax
 	bswap	%ecx
-	movzbl	-1(%rdi, %rdx), %edi
-	movzbl	-1(%rsi, %rdx), %esi
-	orl	%edi, %eax
-	orl	%esi, %ecx
+	movb	-1(%rdi, %rdx), %al
+	movb	-1(%rsi, %rdx), %cl
 	/* Subtraction is okay because the upper 8 bits are zero.  */
 	subl	%ecx, %eax
 	ret