diff options
Diffstat (limited to '')
-rw-r--r-- | libc-top-half/musl/src/math/riscv64/fma.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/math/riscv64/fma.c b/libc-top-half/musl/src/math/riscv64/fma.c new file mode 100644 index 0000000..99b0571 --- /dev/null +++ b/libc-top-half/musl/src/math/riscv64/fma.c @@ -0,0 +1,15 @@ +#include <math.h> + +#if __riscv_flen >= 64 + +double fma(double x, double y, double z) +{ + __asm__ ("fmadd.d %0, %1, %2, %3" : "=f"(x) : "f"(x), "f"(y), "f"(z)); + return x; +} + +#else + +#include "../fma.c" + +#endif |