From e28e9b1ec40d5b545d980b0a36cbe41f3d1dbf6a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 21 May 2018 16:54:46 -0700 Subject: x86-64: Check Prefer_FSRM in ifunc-memmove.h Although the REP MOVSB implementations of memmove, memcpy and mempcpy aren't used by the current processors, this patch adds Prefer_FSRM check in ifunc-memmove.h so that they can be used in the future. * sysdeps/x86/cpu-features.h (bit_arch_Prefer_FSRM): New. (index_arch_Prefer_FSRM): Likewise. * sysdeps/x86/cpu-tunables.c (TUNABLE_CALLBACK (set_hwcaps)): Also check Prefer_FSRM. * sysdeps/x86_64/multiarch/ifunc-memmove.h (IFUNC_SELECTOR): Also return OPTIMIZE (erms) for Prefer_FSRM. --- sysdeps/x86_64/multiarch/ifunc-memmove.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sysdeps/x86_64') diff --git a/sysdeps/x86_64/multiarch/ifunc-memmove.h b/sysdeps/x86_64/multiarch/ifunc-memmove.h index a2ffba0531..5b1eb1c92c 100644 --- a/sysdeps/x86_64/multiarch/ifunc-memmove.h +++ b/sysdeps/x86_64/multiarch/ifunc-memmove.h @@ -41,7 +41,8 @@ IFUNC_SELECTOR (void) { const struct cpu_features* cpu_features = __get_cpu_features (); - if (CPU_FEATURES_ARCH_P (cpu_features, Prefer_ERMS)) + if (CPU_FEATURES_ARCH_P (cpu_features, Prefer_ERMS) + || CPU_FEATURES_ARCH_P (cpu_features, Prefer_FSRM)) return OPTIMIZE (erms); if (CPU_FEATURES_ARCH_P (cpu_features, AVX512F_Usable) -- cgit 1.4.1