aboutsummaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorKeith Packard via Newlib <newlib@sourceware.org>2020-08-08 15:34:12 -0700
committerCorinna Vinschen <corinna@vinschen.de>2020-08-10 21:01:46 +0200
commit0c1989070ee1d849c7a25ad2eb6c8e3fb1df6393 (patch)
tree1acbfbf1b4a6a0a7beef9cc9590eb67b3d44f4e5 /newlib
parent432b331c79a379ef92635fc173b4689b6d5b3feb (diff)
downloadnewlib-0c1989070ee1d849c7a25ad2eb6c8e3fb1df6393.zip
newlib-0c1989070ee1d849c7a25ad2eb6c8e3fb1df6393.tar.gz
newlib-0c1989070ee1d849c7a25ad2eb6c8e3fb1df6393.tar.bz2
libm: Detect fast fmaf support
Anything with fast FMA is assumed to have fast FMAF, along with 32-bit arms that advertise 32-bit FP support and __ARM_FEATURE_FMA Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libm/common/math_config.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/newlib/libm/common/math_config.h b/newlib/libm/common/math_config.h
index df8f8d6..e7a8bb7 100644
--- a/newlib/libm/common/math_config.h
+++ b/newlib/libm/common/math_config.h
@@ -79,6 +79,14 @@
# endif
#endif
+#ifndef HAVE_FAST_FMAF
+# if HAVE_FAST_FMA || (__ARM_FEATURE_FMA && (__ARM_FP & 4))
+# define HAVE_FAST_FMAF 1
+# else
+# define HAVE_FAST_FMAF 0
+# endif
+#endif
+
#if HAVE_FAST_ROUND
/* When set, the roundtoint and converttoint functions are provided with
the semantics documented below. */