summaryrefslogtreecommitdiff
path: root/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h')
-rw-r--r--sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h
index a2526a2ee0..6fb21ee024 100644
--- a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h
+++ b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <init-arch.h>
+#include <x86-math-features.h>
extern __typeof (REDIRECT_NAME) OPTIMIZE (sse2) attribute_hidden;
extern __typeof (REDIRECT_NAME) OPTIMIZE (fma) attribute_hidden;
@@ -26,13 +27,12 @@ extern __typeof (REDIRECT_NAME) OPTIMIZE (fma4) attribute_hidden;
static inline void *
IFUNC_SELECTOR (void)
{
- const struct cpu_features* cpu_features = __get_cpu_features ();
+ unsigned int features = __x86_math_features ();
- if (CPU_FEATURES_ARCH_P (cpu_features, FMA_Usable)
- && CPU_FEATURES_ARCH_P (cpu_features, AVX2_Usable))
+ if ((features & x86_math_feature_fma)
+ && (features & x86_math_feature_avx2))
return OPTIMIZE (fma);
-
- if (CPU_FEATURES_ARCH_P (cpu_features, FMA4_Usable))
+ if (features & x86_math_feature_fma4)
return OPTIMIZE (fma4);
return OPTIMIZE (sse2);