From b4f7b2ca350ccaa6f58ecec72ac46b7aef22d1c3 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Thu, 3 Sep 2020 05:45:44 -0400 Subject: riscv32: add fenv and math These are identical to riscv64. --- src/math/riscv32/fminf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/math/riscv32/fminf.c (limited to 'src/math/riscv32/fminf.c') diff --git a/src/math/riscv32/fminf.c b/src/math/riscv32/fminf.c new file mode 100644 index 00000000..32156e80 --- /dev/null +++ b/src/math/riscv32/fminf.c @@ -0,0 +1,15 @@ +#include + +#if __riscv_flen >= 32 + +float fminf(float x, float y) +{ + __asm__ ("fmin.s %0, %1, %2" : "=f"(x) : "f"(x), "f"(y)); + return x; +} + +#else + +#include "../fminf.c" + +#endif -- cgit 1.4.1