diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-04-08 19:51:44 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-06-19 12:08:47 -0300 |
commit | be668a8d782ab6bf363d4cdd7086295b5eebb8ea (patch) | |
tree | 5db51571d98c5e41e4b65e2079713558661f7a04 /sysdeps/ieee754 | |
parent | 4b2d8e4442745a09f24804c1fcc97b7c5c4506f1 (diff) | |
download | glibc-be668a8d782ab6bf363d4cdd7086295b5eebb8ea.tar.gz glibc-be668a8d782ab6bf363d4cdd7086295b5eebb8ea.tar.xz glibc-be668a8d782ab6bf363d4cdd7086295b5eebb8ea.zip |
New exp10f version without SVID compat wrapper
This patch changes the exp10f error handling semantics to only set errno according to POSIX rules. New symbol version is introduced at GLIBC_2.32. The old wrappers are kept for compat symbols. There are some outliers that need special handling: - ia64 provides an optimized implementation of exp10f that uses ia64 specific routines to set SVID compatibility. The new symbol version is aliased to the exp10f one. - m68k also provides an optimized implementation, and the new version uses it instead of the sysdeps/ieee754/flt32 one. - riscv and csky uses the generic template implementation that does not provide SVID support. For both cases a new exp10f version is not added, but rather the symbols version of the generic sysdeps/ieee754/flt32 is adjusted instead. Checked on aarch64-linux-gnu, x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu.
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r-- | sysdeps/ieee754/flt-32/e_exp10f.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sysdeps/ieee754/flt-32/e_exp10f.c b/sysdeps/ieee754/flt-32/e_exp10f.c index 034a9e364a..f51c499b83 100644 --- a/sysdeps/ieee754/flt-32/e_exp10f.c +++ b/sysdeps/ieee754/flt-32/e_exp10f.c @@ -21,6 +21,8 @@ #include <stdint.h> #include <libm-alias-finite.h> #include <libm-alias-float.h> +#include <shlib-compat.h> +#include <math-svid-compat.h> #include "math_config.h" /* @@ -139,7 +141,7 @@ top13 (float x) } float -__ieee754_exp10f (float x) +__exp10f (float x) { uint32_t abstop; uint64_t ki, t; @@ -195,4 +197,16 @@ __ieee754_exp10f (float x) y = y * s; return (float) y; } +#ifndef __exp10f +strong_alias (__exp10f, __ieee754_exp10f) libm_alias_finite (__ieee754_exp10f, __exp10f) +/* For architectures that already provided exp10f without SVID support, there + is no need to add a new version. */ +#if !LIBM_SVID_COMPAT +# define EXP10F_VERSION GLIBC_2_26 +#else +# define EXP10F_VERSION GLIBC_2_32 +#endif +versioned_symbol (libm, __exp10f, exp10f, EXP10F_VERSION); +libm_alias_float_other (__exp10, exp10) +#endif |