aboutsummaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorKeith Packard via Newlib <newlib@sourceware.org>2020-09-03 13:54:33 -0700
committerCorinna Vinschen <corinna@vinschen.de>2020-09-04 15:11:31 +0200
commita0d7982ff486292540078c0121a435013c5ee1ea (patch)
treef6a4ee74577cc9c0600cb701371a6296d2b6e80a /newlib
parent373f628d043cbfb138c0f53c73cafb831bac621c (diff)
downloadnewlib-a0d7982ff486292540078c0121a435013c5ee1ea.zip
newlib-a0d7982ff486292540078c0121a435013c5ee1ea.tar.gz
newlib-a0d7982ff486292540078c0121a435013c5ee1ea.tar.bz2
libm/riscv: Use common fma code when necessary
For RISC-V targets without hardware FMA support, include the common fma implementation to provide that API. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'newlib')
-rw-r--r--newlib/libm/machine/riscv/s_fma.c2
-rw-r--r--newlib/libm/machine/riscv/sf_fma.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libm/machine/riscv/s_fma.c b/newlib/libm/machine/riscv/s_fma.c
index b7f3780..2d9ebfc 100644
--- a/newlib/libm/machine/riscv/s_fma.c
+++ b/newlib/libm/machine/riscv/s_fma.c
@@ -46,4 +46,6 @@ fma (double x, double y, double z)
return result;
}
+#else
+#include "../../common/s_fma.c"
#endif
diff --git a/newlib/libm/machine/riscv/sf_fma.c b/newlib/libm/machine/riscv/sf_fma.c
index 8061a8a..285c548 100644
--- a/newlib/libm/machine/riscv/sf_fma.c
+++ b/newlib/libm/machine/riscv/sf_fma.c
@@ -46,4 +46,6 @@ fmaf (float x, float y, float z)
return result;
}
+#else
+#include "../../common/sf_fma.c"
#endif