190885
From e7e6385876577e04101a9b9ed8d10c34f634c905 Mon Sep 17 00:00:00 2001
190885
From: "H.J. Lu" <hjl.tools@gmail.com>
190885
Date: Thu, 11 Jun 2020 12:41:18 -0700
190885
Subject: [PATCH] x86_64: Use %xmmN with vpxor to clear a vector register
190885
190885
Since "vpxor %xmmN, %xmmN, %xmmN" clears the whole vector register, use
190885
%xmmN, instead of %ymmN, with vpxor to clear a vector register.
190885
190885
(cherry picked from commit a35a59036ebae3efcdf5e8167610e0656fca9770)
190885
---
190885
 sysdeps/x86_64/multiarch/strcmp-avx2.S  | 4 ++--
190885
 sysdeps/x86_64/multiarch/strrchr-avx2.S | 2 +-
190885
 2 files changed, 3 insertions(+), 3 deletions(-)
190885
190885
diff --git a/sysdeps/x86_64/multiarch/strcmp-avx2.S b/sysdeps/x86_64/multiarch/strcmp-avx2.S
190885
index 433ae047..70d8499b 100644
190885
--- a/sysdeps/x86_64/multiarch/strcmp-avx2.S
190885
+++ b/sysdeps/x86_64/multiarch/strcmp-avx2.S
190885
@@ -105,8 +105,8 @@ ENTRY (STRCMP)
190885
 # endif
190885
 	movl	%edi, %eax
190885
 	xorl	%edx, %edx
190885
-	/* Make %ymm7 all zeros in this function.  */
190885
-	vpxor	%ymm7, %ymm7, %ymm7
190885
+	/* Make %xmm7 (%ymm7) all zeros in this function.  */
190885
+	vpxor	%xmm7, %xmm7, %xmm7
190885
 	orl	%esi, %eax
190885
 	andl	$(PAGE_SIZE - 1), %eax
190885
 	cmpl	$(PAGE_SIZE - (VEC_SIZE * 4)), %eax
190885
diff --git a/sysdeps/x86_64/multiarch/strrchr-avx2.S b/sysdeps/x86_64/multiarch/strrchr-avx2.S
190885
index 9f22a15e..c949410b 100644
190885
--- a/sysdeps/x86_64/multiarch/strrchr-avx2.S
190885
+++ b/sysdeps/x86_64/multiarch/strrchr-avx2.S
190885
@@ -48,7 +48,7 @@ ENTRY (STRRCHR)
190885
 	movl	%edi, %ecx
190885
 	/* Broadcast CHAR to YMM4.  */
190885
 	VPBROADCAST %xmm4, %ymm4
190885
-	vpxor	%ymm0, %ymm0, %ymm0
190885
+	vpxor	%xmm0, %xmm0, %xmm0
190885
 
190885
 	/* Check if we may cross page boundary with one vector load.  */
190885
 	andl	$(2 * VEC_SIZE - 1), %ecx
190885
-- 
190885
GitLab
190885