Blame SOURCES/ia-bmi2-req-strlen-strnlen.patch

190885
From 6518570fa9ff5c4d0a7e0c4b6788fb0f8e9ebb22 Mon Sep 17 00:00:00 2001
190885
From: "H.J. Lu" <hjl.tools@gmail.com>
190885
Date: Mon, 19 Apr 2021 07:07:21 -0700
190885
Subject: [PATCH] x86-64: Require BMI2 for __strlen_evex and __strnlen_evex
190885
190885
Since __strlen_evex and __strnlen_evex added by
190885
190885
commit 1fd8c163a83d96ace1ff78fa6bac7aee084f6f77
190885
Author: H.J. Lu <hjl.tools@gmail.com>
190885
Date:   Fri Mar 5 06:24:52 2021 -0800
190885
190885
    x86-64: Add ifunc-avx2.h functions with 256-bit EVEX
190885
190885
use sarx:
190885
190885
c4 e2 6a f7 c0       	sarx   %edx,%eax,%eax
190885
190885
require BMI2 for __strlen_evex and __strnlen_evex in ifunc-impl-list.c.
190885
ifunc-avx2.h already requires BMI2 for EVEX implementation.
190885
190885
(cherry picked from commit 55bf411b451c13f0fb7ff3d3bf9a820020b45df1)
190885
---
190885
 sysdeps/x86_64/multiarch/ifunc-impl-list.c | 6 ++++--
190885
 1 file changed, 4 insertions(+), 2 deletions(-)
190885
190885
diff --git a/sysdeps/x86_64/multiarch/ifunc-impl-list.c b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
190885
index fec384f6..cbfc1a5d 100644
190885
--- a/sysdeps/x86_64/multiarch/ifunc-impl-list.c
190885
+++ b/sysdeps/x86_64/multiarch/ifunc-impl-list.c
190885
@@ -293,7 +293,8 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
190885
 			      __strlen_avx2_rtm)
190885
 	      IFUNC_IMPL_ADD (array, i, strlen,
190885
 			      (CPU_FEATURE_USABLE (AVX512VL)
190885
-			       && CPU_FEATURE_USABLE (AVX512BW)),
190885
+			       && CPU_FEATURE_USABLE (AVX512BW)
190885
+			       && CPU_FEATURE_USABLE (BMI2)),
190885
 			      __strlen_evex)
190885
 	      IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_sse2))
190885
 
190885
@@ -308,7 +309,8 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
190885
 			      __strnlen_avx2_rtm)
190885
 	      IFUNC_IMPL_ADD (array, i, strnlen,
190885
 			      (CPU_FEATURE_USABLE (AVX512VL)
190885
-			       && CPU_FEATURE_USABLE (AVX512BW)),
190885
+			       && CPU_FEATURE_USABLE (AVX512BW)
190885
+			       && CPU_FEATURE_USABLE (BMI2)),
190885
 			      __strnlen_evex)
190885
 	      IFUNC_IMPL_ADD (array, i, strnlen, 1, __strnlen_sse2))
190885
 
190885
-- 
190885
GitLab
190885