From 583c4d424ec29f506c2c21fad99de3dd3caf53bb Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 1 Dec 2021 10:44:58 -0300 Subject: math: Add math-use-builtinds-fmin.h It allows the architecture to use the builtin instead of generic implementation. --- math/s_fmin_template.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'math') diff --git a/math/s_fmin_template.c b/math/s_fmin_template.c index 565a836266..5fc47193b7 100644 --- a/math/s_fmin_template.c +++ b/math/s_fmin_template.c @@ -17,11 +17,15 @@ . */ #include +#include FLOAT M_DECL_FUNC (__fmin) (FLOAT x, FLOAT y) { +#if M_USE_BUILTIN (FMIN) + return M_SUF (__builtin_fmin) (x, y); +#else if (islessequal (x, y)) return x; else if (isgreater (x, y)) @@ -30,5 +34,6 @@ M_DECL_FUNC (__fmin) (FLOAT x, FLOAT y) return x + y; else return isnan (y) ? x : y; +#endif } declare_mgen_alias (__fmin, fmin); -- cgit 1.4.1