]> sourceware.org Git - glibc.git/commitdiff
x86-64: Require BMI2 for __strlen_evex and __strnlen_evex
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 19 Apr 2021 14:07:21 +0000 (07:07 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 19 Apr 2021 14:51:33 +0000 (07:51 -0700)
Since __strlen_evex and __strnlen_evex added by

commit 1fd8c163a83d96ace1ff78fa6bac7aee084f6f77
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Mar 5 06:24:52 2021 -0800

    x86-64: Add ifunc-avx2.h functions with 256-bit EVEX

use sarx:

c4 e2 6a f7 c0        sarx   %edx,%eax,%eax

require BMI2 for __strlen_evex and __strnlen_evex in ifunc-impl-list.c.
ifunc-avx2.h already requires BMI2 for EVEX implementation.

sysdeps/x86_64/multiarch/ifunc-impl-list.c

index 770986e41a6180038bf05dd6f332b8eb7be47bd7..f1a755b1d63b26c0ec4852ab617788464ad7c814 100644 (file)
@@ -293,7 +293,8 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
                              __strlen_avx2_rtm)
              IFUNC_IMPL_ADD (array, i, strlen,
                              (CPU_FEATURE_USABLE (AVX512VL)
-                              && CPU_FEATURE_USABLE (AVX512BW)),
+                              && CPU_FEATURE_USABLE (AVX512BW)
+                              && CPU_FEATURE_USABLE (BMI2)),
                              __strlen_evex)
              IFUNC_IMPL_ADD (array, i, strlen, 1, __strlen_sse2))
 
@@ -308,7 +309,8 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
                              __strnlen_avx2_rtm)
              IFUNC_IMPL_ADD (array, i, strnlen,
                              (CPU_FEATURE_USABLE (AVX512VL)
-                              && CPU_FEATURE_USABLE (AVX512BW)),
+                              && CPU_FEATURE_USABLE (AVX512BW)
+                              && CPU_FEATURE_USABLE (BMI2)),
                              __strnlen_evex)
              IFUNC_IMPL_ADD (array, i, strnlen, 1, __strnlen_sse2))
 
This page took 0.044139 seconds and 5 git commands to generate.