Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2018-07-05 14:37:25 +0300
committerCorinna Vinschen <corinna@vinschen.de>2018-07-06 11:29:01 +0300
commit393a1cb4eaeadbc67587a009328715bbc42e56b7 (patch)
tree49a0f0fa761c493330873f81faee2ff6a92c1f32 /newlib/libm/common/math_config.h
parentcbe50607fb4741bd96e8de726ad89d0ec3d9f427 (diff)
Move __HAVE_FAST_FMA to math_config.h
Define it consistently with other HAVE_* macros that only affect code using math_config.h. This is also closer to the Arm Optimized Routines code.
Diffstat (limited to 'newlib/libm/common/math_config.h')
-rw-r--r--newlib/libm/common/math_config.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/newlib/libm/common/math_config.h b/newlib/libm/common/math_config.h
index aec9cd0d6..1f83756ab 100644
--- a/newlib/libm/common/math_config.h
+++ b/newlib/libm/common/math_config.h
@@ -61,6 +61,15 @@
# endif
#endif
+/* Compiler can inline fma as a single instruction. */
+#ifndef HAVE_FAST_FMA
+# if __aarch64__ || __ARM_FEATURE_FMA
+# define HAVE_FAST_FMA 1
+# else
+# define HAVE_FAST_FMA 0
+# endif
+#endif
+
#if HAVE_FAST_ROUND
# define TOINT_INTRINSICS 1
@@ -366,7 +375,7 @@ extern const struct log_data
double poly[LOG_POLY_ORDER - 1]; /* First coefficient is 1. */
double poly1[LOG_POLY1_ORDER - 1];
struct {double invc, logc;} tab[1 << LOG_TABLE_BITS];
-#if !__HAVE_FAST_FMA
+#if !HAVE_FAST_FMA
struct {double chi, clo;} tab2[1 << LOG_TABLE_BITS];
#endif
} __log_data HIDDEN;
@@ -381,7 +390,7 @@ extern const struct log2_data
double poly[LOG2_POLY_ORDER - 1];
double poly1[LOG2_POLY1_ORDER - 1];
struct {double invc, logc;} tab[1 << LOG2_TABLE_BITS];
-#if !__HAVE_FAST_FMA
+#if !HAVE_FAST_FMA
struct {double chi, clo;} tab2[1 << LOG2_TABLE_BITS];
#endif
} __log2_data HIDDEN;