[newlib-cygwin] libm: Detect fast fmaf support
Corinna Vinschen
corinna@sourceware.org
Mon Aug 10 19:06:34 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0c1989070ee1d849c7a25ad2eb6c8e3fb1df6393
commit 0c1989070ee1d849c7a25ad2eb6c8e3fb1df6393
Author: Keith Packard via Newlib <newlib@sourceware.org>
Date: Sat Aug 8 15:34:12 2020 -0700
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>
Diff:
---
newlib/libm/common/math_config.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/newlib/libm/common/math_config.h b/newlib/libm/common/math_config.h
index df8f8d6e4..e7a8bb7fe 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. */
More information about the Newlib-cvs
mailing list