]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
math: remove exp10 wrappers
authorWilco Dijkstra <wilco.dijkstra@arm.com>
Tue, 9 Jan 2024 15:32:08 +0000 (15:32 +0000)
committerWilco Dijkstra <wilco.dijkstra@arm.com>
Fri, 12 Jan 2024 16:02:12 +0000 (16:02 +0000)
Remove the error handling wrapper from exp10.  This is very similar to
the changes done to exp and exp2, except that we also need to handle
pow10 and pow10l.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
29 files changed:
math/Versions
math/w_exp10_compat.c
sysdeps/i386/fpu/w_exp10_compat.c [new file with mode: 0644]
sysdeps/ieee754/dbl-64/e_exp10.c
sysdeps/ieee754/dbl-64/w_exp10.c [new file with mode: 0644]
sysdeps/m68k/m680x0/fpu/w_exp10_compat.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/aarch64/libm.abilist
sysdeps/unix/sysv/linux/alpha/libm.abilist
sysdeps/unix/sysv/linux/arm/be/libm.abilist
sysdeps/unix/sysv/linux/arm/le/libm.abilist
sysdeps/unix/sysv/linux/hppa/libm.abilist
sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist
sysdeps/unix/sysv/linux/microblaze/be/libm.abilist
sysdeps/unix/sysv/linux/microblaze/le/libm.abilist
sysdeps/unix/sysv/linux/mips/mips32/libm.abilist
sysdeps/unix/sysv/linux/mips/mips64/libm.abilist
sysdeps/unix/sysv/linux/nios2/libm.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist
sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist
sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist
sysdeps/unix/sysv/linux/sh/be/libm.abilist
sysdeps/unix/sysv/linux/sh/le/libm.abilist
sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist
sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist
sysdeps/unix/sysv/linux/x86_64/64/libm.abilist
sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist

index 759b5fac7f43739de9bf63fcb5d41fae071ee86b..26e15cedea26c1d6ed63da6f5fe60716089d135f 100644 (file)
@@ -635,4 +635,8 @@ libm {
     # No SVID compatible error handling.
     fmod; fmodf;
   }
+  GLIBC_2.39 {
+    # No SVID compatible error handling.
+    exp10;
+  }
 }
index d8e0f7e773386aa30c0e59601b3bc4d1e4b111c8..6b72aef7bd5ed8d0e4107025308ee95a30e7db6f 100644 (file)
 #include <math-svid-compat.h>
 #include <libm-alias-double.h>
 
-#if LIBM_SVID_COMPAT
+#ifndef NO_COMPAT_NEEDED
+# define NO_COMPAT_NEEDED 0
+#endif
+
+#if LIBM_SVID_COMPAT && (SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_39) \
+                        || defined NO_LONG_DOUBLE \
+                        || defined LONG_DOUBLE_COMPAT)
 double
-__exp10 (double x)
+__exp10_compat (double x)
 {
   double z = __ieee754_exp10 (x);
   if (__builtin_expect (!isfinite (z) || z == 0, 0)
@@ -37,14 +43,30 @@ __exp10 (double x)
 
   return z;
 }
-libm_alias_double (__exp10, exp10)
+# if NO_COMPAT_NEEDED
+#  ifdef SHARED
+libm_alias_double (__exp10_compat, exp10)
+#  endif
+#else
+#  if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_39)
+compat_symbol (libm, __exp10_compat, exp10, GLIBC_2_1);
+#  endif
+#  ifdef NO_LONG_DOUBLE
+weak_alias (__exp10_compat, exp10l)
+#  endif
+#  ifdef LONG_DOUBLE_COMPAT
+LONG_DOUBLE_COMPAT_CHOOSE_libm_exp10l (
+  compat_symbol (libm, __exp10_compat, exp10l, FIRST_VERSION_libm_exp10l), );
+#  endif
+# endif
+
 # if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
-strong_alias (__exp10, __pow10)
+strong_alias (__exp10_compat, __pow10)
 compat_symbol (libm, __pow10, pow10, GLIBC_2_1);
 # endif
 # ifdef NO_LONG_DOUBLE
 #  if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
-strong_alias (__exp10l, __pow10l)
+strong_alias (exp10l, __pow10l)
 compat_symbol (libm, __pow10l, pow10l, GLIBC_2_1);
 #  endif
 # endif
diff --git a/sysdeps/i386/fpu/w_exp10_compat.c b/sysdeps/i386/fpu/w_exp10_compat.c
new file mode 100644 (file)
index 0000000..b534553
--- /dev/null
@@ -0,0 +1,3 @@
+/* i386 provides an optimized __ieee754_exp10.  */
+#define NO_COMPAT_NEEDED 1
+#include <math/w_exp10_compat.c>
index 0d4e42833aef46d61e7160c6f9ba86096cf836f8..225fc74c4c5ed0ff196c795c0828180a7015a10d 100644 (file)
@@ -18,9 +18,9 @@
 #include <math.h>
 #include <math-barriers.h>
 #include <math-narrow-eval.h>
-#include <math_private.h>
-#include <float.h>
+#include <math-svid-compat.h>
 #include <libm-alias-finite.h>
+#include <libm-alias-double.h>
 #include "math_config.h"
 
 #define N (1 << EXP_TABLE_BITS)
@@ -75,7 +75,7 @@ special_case (uint64_t sbits, double_t tmp, uint64_t ki)
 
 /* Double-precision 10^x approximation. Largest observed error is ~0.513 ULP.  */
 double
-__ieee754_exp10 (double x)
+__exp10 (double x)
 {
   uint64_t ix = asuint64 (x);
   uint32_t abstop = (ix >> 52) & 0x7ff;
@@ -144,4 +144,11 @@ __ieee754_exp10 (double x)
   return s * y + s;
 }
 
+strong_alias (__exp10, __ieee754_exp10)
 libm_alias_finite (__ieee754_exp10, __exp10)
+#if LIBM_SVID_COMPAT
+versioned_symbol (libm, __exp10, exp10, GLIBC_2_39);
+libm_alias_double_other (__exp10, exp10)
+#else
+libm_alias_double (__exp10, exp10)
+#endif
diff --git a/sysdeps/ieee754/dbl-64/w_exp10.c b/sysdeps/ieee754/dbl-64/w_exp10.c
new file mode 100644 (file)
index 0000000..1cc8931
--- /dev/null
@@ -0,0 +1 @@
+/* Not needed.  */
diff --git a/sysdeps/m68k/m680x0/fpu/w_exp10_compat.c b/sysdeps/m68k/m680x0/fpu/w_exp10_compat.c
new file mode 100644 (file)
index 0000000..0d3e718
--- /dev/null
@@ -0,0 +1,3 @@
+/* m68k provides an optimized __ieee754_exp10.  */
+#define NO_COMPAT_NEEDED 1
+#include <math/w_exp10_compat.c>
index e3924c3499d290fc96e4e6919bc8a26da8f7777c..f0da228fbba6e6fdb8f1fd24285478bdda333a16 100644 (file)
@@ -1148,3 +1148,4 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
index 066dd1a6b371d060eea4196f83fd86d8dacdf614..f5d8023d624e9cb0ae24a088b6dd0e00c2a9d560 100644 (file)
@@ -1205,6 +1205,7 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index 4adfed072b0239d5508559c2442cf30cb064d7b7..f020a8a9043d4d211e2404b7dbb3095eeb792fd3 100644 (file)
@@ -535,6 +535,7 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 _LIB_VERSION D 0x4
 GLIBC_2.4 __clog10 F
 GLIBC_2.4 __clog10f F
index 4adfed072b0239d5508559c2442cf30cb064d7b7..f020a8a9043d4d211e2404b7dbb3095eeb792fd3 100644 (file)
@@ -535,6 +535,7 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 _LIB_VERSION D 0x4
 GLIBC_2.4 __clog10 F
 GLIBC_2.4 __clog10f F
index 5c3f47caefe8d89a95d0fbd3663c623eaefa5778..450ac03223c0258af2c5d23a031d54b24461cc24 100644 (file)
@@ -846,4 +846,5 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 exp2l F
index 4adfed072b0239d5508559c2442cf30cb064d7b7..f020a8a9043d4d211e2404b7dbb3095eeb792fd3 100644 (file)
@@ -535,6 +535,7 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 _LIB_VERSION D 0x4
 GLIBC_2.4 __clog10 F
 GLIBC_2.4 __clog10f F
index ea0dbd4b727a618bc9598a27ea2dd4a2bd1b8a30..1f7f63f60cd7b9fbe1e1ef240afda3b3c3bd20c0 100644 (file)
@@ -847,3 +847,4 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
index ea0dbd4b727a618bc9598a27ea2dd4a2bd1b8a30..1f7f63f60cd7b9fbe1e1ef240afda3b3c3bd20c0 100644 (file)
@@ -847,3 +847,4 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
index 7c94a8db706e39147886da035e4a07fa12032bb7..797071aee8c56f9f8538bf5a50d44b164c5e26c4 100644 (file)
@@ -846,4 +846,5 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 exp2l F
index 0d08245adf0e1e652aa0a6eb4707509208bc582b..14758703cfb72749902907dec5cfa288116a76cf 100644 (file)
@@ -1148,3 +1148,4 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
index a3b776fece3a4f5b50fb4c88500384027eea9e37..c0ebe119dc05aea86cbc48c3eff6c9b090069607 100644 (file)
@@ -847,3 +847,4 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
index c696215739f408f4b16008a76d1007fa80d52f5a..4f88e0af9ca9d30c9e9fe5172803464d400a25d0 100644 (file)
@@ -892,6 +892,7 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index a5ce9b1997939909e3239fe5b694246a410aeb56..edc26140dca7b309f9412d870cf6cca1771aeb98 100644 (file)
@@ -891,6 +891,7 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index 8e41056d0d4a588b4f8346e4b8bab3742036cdd0..0a8a1433d765358734ea688c71b23d097a70b92c 100644 (file)
@@ -885,6 +885,7 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index 939f29a0f28023d1307bb7e84c62be8161bfdd71..5174d20032330b26d4f66ce8525a4ede9c1bd2dc 100644 (file)
@@ -1320,3 +1320,4 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
index 4baefb1217b27d42023c0f39cb5425fd5ac35ee6..5ff11fb54f26696433f9c0d577ae429aafc42878 100644 (file)
@@ -1149,6 +1149,7 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index debb767575907b5ff5e1a335aaf06b0ee8b41d18..0e246c2c54f537ede4bdd1d8f23ce3f98da682f2 100644 (file)
@@ -1149,6 +1149,7 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index fb94386fffdc81329031c0f26545ea22ddb4cc8e..7b43a866e20c4f51f06fcf4bcd10ec1534bc1a8d 100644 (file)
@@ -846,4 +846,5 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 exp2l F
index fb94386fffdc81329031c0f26545ea22ddb4cc8e..7b43a866e20c4f51f06fcf4bcd10ec1534bc1a8d 100644 (file)
@@ -846,4 +846,5 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 exp2l F
index 2fdb5ff14508606311e2a24595c5f46552bda578..e3dcf3d4e7ecf3f07ca67ebec75c5497e018c127 100644 (file)
@@ -1156,6 +1156,7 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index 02d4c3a754862f8205267f6baf69a020df9dfa99..20fef20c8b5e04c756b2a3b7797830745632beab 100644 (file)
@@ -1148,3 +1148,4 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
index cc8be5b510d832d77d11b6e89e424492bc42dba1..c1c5c76e26189bee20892d6ea15a3d22ab22d834 100644 (file)
@@ -1181,3 +1181,4 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F
index fda4df265316c534102192201474b8b26c4e9a47..fac219d45ab2f03e16574d0d119bfce2c62795d8 100644 (file)
@@ -1181,3 +1181,4 @@ GLIBC_2.35 hypot F
 GLIBC_2.35 hypotf F
 GLIBC_2.38 fmod F
 GLIBC_2.38 fmodf F
+GLIBC_2.39 exp10 F