xref: /haiku/src/system/libroot/posix/musl/math/riscv64/fmaxf.c (revision f504f61099b010fbfa94b1cc63d2e9072c7f7185)
1*f504f610SAugustin Cavalier #include <math.h>
2*f504f610SAugustin Cavalier 
3*f504f610SAugustin Cavalier #if __riscv_flen >= 32
4*f504f610SAugustin Cavalier 
fmaxf(float x,float y)5*f504f610SAugustin Cavalier float fmaxf(float x, float y)
6*f504f610SAugustin Cavalier {
7*f504f610SAugustin Cavalier 	__asm__ ("fmax.s %0, %1, %2" : "=f"(x) : "f"(x), "f"(y));
8*f504f610SAugustin Cavalier 	return x;
9*f504f610SAugustin Cavalier }
10*f504f610SAugustin Cavalier 
11*f504f610SAugustin Cavalier #else
12*f504f610SAugustin Cavalier 
13*f504f610SAugustin Cavalier #include "../fmaxf.c"
14*f504f610SAugustin Cavalier 
15*f504f610SAugustin Cavalier #endif
16