aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-04-08 19:51:44 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-06-19 12:08:47 -0300
commitbe668a8d782ab6bf363d4cdd7086295b5eebb8ea (patch)
tree5db51571d98c5e41e4b65e2079713558661f7a04 /math
parent4b2d8e4442745a09f24804c1fcc97b7c5c4506f1 (diff)
downloadglibc-be668a8d782ab6bf363d4cdd7086295b5eebb8ea.zip
glibc-be668a8d782ab6bf363d4cdd7086295b5eebb8ea.tar.gz
glibc-be668a8d782ab6bf363d4cdd7086295b5eebb8ea.tar.bz2
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 'math')
-rw-r--r--math/Versions3
-rw-r--r--math/w_exp10f.c1
-rw-r--r--math/w_exp10f_compat.c8
3 files changed, 8 insertions, 4 deletions
diff --git a/math/Versions b/math/Versions
index d892c5f..5b3c321 100644
--- a/math/Versions
+++ b/math/Versions
@@ -590,4 +590,7 @@ libm {
totalorderf128;
totalordermagf128;
}
+ GLIBC_2.32 {
+ exp10f;
+ }
}
diff --git a/math/w_exp10f.c b/math/w_exp10f.c
new file mode 100644
index 0000000..6e25b02
--- /dev/null
+++ b/math/w_exp10f.c
@@ -0,0 +1 @@
+/* Empty. */
diff --git a/math/w_exp10f_compat.c b/math/w_exp10f_compat.c
index 2ab0940..ea8f947 100644
--- a/math/w_exp10f_compat.c
+++ b/math/w_exp10f_compat.c
@@ -28,9 +28,9 @@
#if LIBM_SVID_COMPAT
float
-__exp10f (float x)
+__exp10f_compat (float x)
{
- float z = __ieee754_exp10f (x);
+ float z = __exp10f (x);
if (__builtin_expect (!isfinite (z) || z == 0, 0)
&& isfinite (x) && _LIB_VERSION != _IEEE_)
/* exp10f overflow (146) if x > 0, underflow (147) if x < 0. */
@@ -38,9 +38,9 @@ __exp10f (float x)
return z;
}
-libm_alias_float (__exp10, exp10)
+compat_symbol (libm, __exp10f_compat, exp10f, GLIBC_2_1);
# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
-strong_alias (__exp10f, __pow10f)
+strong_alias (__exp10f_compat, __pow10f)
compat_symbol (libm, __pow10f, pow10f, GLIBC_2_1);
# endif
#endif