diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-12-01 10:44:58 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-12-13 10:08:43 -0300 |
commit | 583c4d424ec29f506c2c21fad99de3dd3caf53bb (patch) | |
tree | 41cf16ecb7d927c02c4fac42dbf2f35b1c0acd29 /math | |
parent | 72ab1eaec7e46cdb6c4f37fb687a7a593f93020a (diff) | |
download | glibc-583c4d424ec29f506c2c21fad99de3dd3caf53bb.zip glibc-583c4d424ec29f506c2c21fad99de3dd3caf53bb.tar.gz glibc-583c4d424ec29f506c2c21fad99de3dd3caf53bb.tar.bz2 |
math: Add math-use-builtinds-fmin.h
It allows the architecture to use the builtin instead of generic
implementation.
Diffstat (limited to 'math')
-rw-r--r-- | math/s_fmin_template.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/math/s_fmin_template.c b/math/s_fmin_template.c index 565a836..5fc4719 100644 --- a/math/s_fmin_template.c +++ b/math/s_fmin_template.c @@ -17,11 +17,15 @@ <https://www.gnu.org/licenses/>. */ #include <math.h> +#include <math-use-builtins.h> 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); |