From 72ab1eaec7e46cdb6c4f37fb687a7a593f93020a Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Wed, 1 Dec 2021 10:37:44 -0300 Subject: math: Add math-use-builtinds-fmax.h It allows the architecture to use the builtin instead of generic implementation. --- math/s_fmax_template.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'math') diff --git a/math/s_fmax_template.c b/math/s_fmax_template.c index d817406f04..4a88266e71 100644 --- a/math/s_fmax_template.c +++ b/math/s_fmax_template.c @@ -17,10 +17,14 @@ . */ #include +#include FLOAT M_DECL_FUNC (__fmax) (FLOAT x, FLOAT y) { +#if M_USE_BUILTIN (FMAX) + return M_SUF (__builtin_fmax) (x, y); +#else if (isgreaterequal (x, y)) return x; else if (isless (x, y)) @@ -29,6 +33,7 @@ M_DECL_FUNC (__fmax) (FLOAT x, FLOAT y) return x + y; else return isnan (y) ? x : y; +#endif } declare_mgen_alias (__fmax, fmax); -- cgit v1.2.3