]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
New exp10f version without SVID compat wrapper
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 8 Apr 2020 22:51:44 +0000 (19:51 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Fri, 19 Jun 2020 15:08:47 +0000 (12:08 -0300)
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.

33 files changed:
math/Versions
math/w_exp10f.c [new file with mode: 0644]
math/w_exp10f_compat.c
sysdeps/ia64/fpu/e_exp10f.S
sysdeps/ieee754/flt-32/e_exp10f.c
sysdeps/m68k/m680x0/fpu/e_exp10f.c
sysdeps/mach/hurd/i386/libm.abilist
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/i386/libm.abilist
sysdeps/unix/sysv/linux/ia64/libm.abilist
sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist
sysdeps/unix/sysv/linux/m68k/m680x0/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 d892c5f911b4c8e33e45759a93f5dc1cfb9a31f3..5b3c32149061c292e0933d721123275b78067a1e 100644 (file)
@@ -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 (file)
index 0000000..6e25b02
--- /dev/null
@@ -0,0 +1 @@
+/* Empty.  */
index 2ab094060132673063fd1fd192db52dab426d0cc..ea8f947193d2786e92746ede5045e60ae444914c 100644 (file)
@@ -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
index 67218c737ff4c256c0f93dfaa9832ca62c36f114..e82394b7253ede0ac8617582eba028f65b75cb6e 100644 (file)
@@ -218,7 +218,7 @@ LOCAL_OBJECT_END(T_table)
 
 
 .section .text
-GLOBAL_IEEE754_ENTRY(exp10f)
+GLOBAL_IEEE754_ENTRY(__exp10f)
 
 
 {.mfi
@@ -487,11 +487,17 @@ OUT_RANGE_exp10:
 }
 ;;
 
-GLOBAL_IEEE754_END(exp10f)
+GLOBAL_IEEE754_END(__exp10f)
 libm_alias_float_other (__exp10, exp10)
 #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
-compat_symbol (libm, exp10f, pow10f, GLIBC_2_2)
+strong_alias (__exp10f, __pow10f_compat)
+compat_symbol (libm, __pow10f_compat, pow10f, GLIBC_2_2)
 #endif
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_32)
+strong_alias (__exp10f, __exp10f_compat)
+compat_symbol (libm, __exp10f_compat, exp10f, GLIBC_2_1)
+#endif
+versioned_symbol (libm, __exp10f, exp10f, GLIBC_2_32)
 
 
 LOCAL_LIBM_ENTRY(__libm_error_region)
index 034a9e364ae701681e85b82e8de99439089c24c9..f51c499b83511911c6a6bd28308742a1a0aeb760 100644 (file)
@@ -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
index f58fddd8a6ab876d407a69685d5e58474bd24384..0d03f00e0688477b8dc4a2e65b1dc016540c89fe 100644 (file)
@@ -1,3 +1,8 @@
+#include <libm-alias-float.h>
 #define FUNC __ieee754_exp10f
 #define FUNC_FINITE __exp10f
 #include <e_acosf.c>
+strong_alias (__ieee754_exp10f, __exp10f)
+libm_alias_finite (__ieee754_exp10f, __exp10f)
+versioned_symbol (libm, __exp10f, exp10f, GLIBC_2_32);
+libm_alias_float_other (__ieee754_exp10, exp10)
index 1a41ae589ff983e6b3c690c939c22701126f9b07..a19a69ce6ae2c2e168b00bc270e0d8c2b6ef4264 100644 (file)
@@ -1089,3 +1089,4 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
index 62e1fee467db0242e3b8c02b79726322d95fb251..5362c24e4c474b7fadb6e76b4cd6c9b8abf6e542 100644 (file)
@@ -1053,3 +1053,4 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
index 08ac3905a081680854603b33122436606d2e354c..650d10ec8e307c240b517f63d7e7f123d46a23cc 100644 (file)
@@ -1110,6 +1110,7 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index dd5931f2883a73e7578e85a1feb76f15f907f8fb..6914b58d76ba2d260bb607effbb73cf36afaa333 100644 (file)
@@ -470,6 +470,7 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 _LIB_VERSION D 0x4
 GLIBC_2.4 __clog10 F
 GLIBC_2.4 __clog10f F
index dd5931f2883a73e7578e85a1feb76f15f907f8fb..6914b58d76ba2d260bb607effbb73cf36afaa333 100644 (file)
@@ -470,6 +470,7 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 _LIB_VERSION D 0x4
 GLIBC_2.4 __clog10 F
 GLIBC_2.4 __clog10f F
index e7686d71cfe34d76f55b39b6b080258973f6cc1e..6ac2295b05a633ebc55acd6600f03dc43a2c20fd 100644 (file)
@@ -781,4 +781,5 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 exp2l F
index e67f9d7d27e05cb56b696a1c90eaaf739213af5d..0ab740dd97c0ddfc8505eb3c548f7b395741575a 100644 (file)
@@ -1096,3 +1096,4 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
index 0cf637f2481908ac6f91ddf20408dd33b617daba..c8e8fd71426391334f6cda9e6323d8f7095c94d9 100644 (file)
@@ -1026,3 +1026,4 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
index dd5931f2883a73e7578e85a1feb76f15f907f8fb..6914b58d76ba2d260bb607effbb73cf36afaa333 100644 (file)
@@ -470,6 +470,7 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 _LIB_VERSION D 0x4
 GLIBC_2.4 __clog10 F
 GLIBC_2.4 __clog10f F
index f0b17ae485cb67455af3c5f15442582504a86c63..c60fdc62987e9df8e14ac76fcaa3f4be8c90f5cb 100644 (file)
@@ -821,3 +821,4 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
index 8dedc9a8a6eafe66b44ab56fabc0b25d3cc67bfd..adea0fe4c01183992a7ce4a7cf4d3da6890e5a8b 100644 (file)
@@ -782,3 +782,4 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
index 8dedc9a8a6eafe66b44ab56fabc0b25d3cc67bfd..adea0fe4c01183992a7ce4a7cf4d3da6890e5a8b 100644 (file)
@@ -782,3 +782,4 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
index a221d7be09240c7d0771e0fec03b7b175dad1c1e..272969a26f56d4b234755c2144bb55e9883673ef 100644 (file)
@@ -781,4 +781,5 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 exp2l F
index 823f87277e2a62e1125f8bc0522c69609095312e..dd0dc6689c08f2ac8f0057a749f0237f1dd91d12 100644 (file)
@@ -1053,3 +1053,4 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
index 64ac932c6ab887e65fb1dd554a99acbe7064e7bc..4941deefa615b511f0b3c380377204177696a653 100644 (file)
@@ -782,3 +782,4 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
index 3fab31ff9c868efeb031bc8a456a619b2cbd8f45..fc2d142bd5abf4f8458ab975d17d0ce6ab9faf32 100644 (file)
@@ -827,6 +827,7 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index b90d28a8feb6bb1c35ff9f7d96f6d9020258cbd7..e6feaf7ec7d13b9484431c22ad2b251493fdd610 100644 (file)
@@ -826,6 +826,7 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index 1369ab510cbfae75b6d3a6f021b32ac8a13ae9e2..972c9bc5971aabf5cdcefbb05d3596eaf6dccfa9 100644 (file)
@@ -820,6 +820,7 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index aa45e2639cf5711e8c4403edfc97811afdc1fe49..4f8d3c11917d939954bc824b887d27ef84cda34d 100644 (file)
@@ -1214,3 +1214,4 @@ GLIBC_2.32 __ufromfpxieee128 F
 GLIBC_2.32 __y0ieee128 F
 GLIBC_2.32 __y1ieee128 F
 GLIBC_2.32 __ynieee128 F
+GLIBC_2.32 exp10f F
index cd6be8e58491ae6efe7eed55efd1841a83f8e66c..321810d5a406415844355d04b349656ecb4a38d8 100644 (file)
@@ -1054,6 +1054,7 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index 5291424feba6226d99b82b582e9519f76bd027da..451a860a83e34eab1320b42ef70bdc9be2a5e5ae 100644 (file)
@@ -1054,6 +1054,7 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index de0f1c57c378342d75016cc10dc3cb55295ddf63..a5fb514eaedf3ca7d47c791dc57b2c294a6300a5 100644 (file)
@@ -781,4 +781,5 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 exp2l F
index de0f1c57c378342d75016cc10dc3cb55295ddf63..a5fb514eaedf3ca7d47c791dc57b2c294a6300a5 100644 (file)
@@ -781,4 +781,5 @@ GLIBC_2.31 totalordermagf32 F
 GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 exp2l F
index fc52ebf64eced81fb2b2a51f4b499cdd41c0191d..d81e8a726ba2075f273b97b8948ea5ffbed452ae 100644 (file)
@@ -1061,6 +1061,7 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
 GLIBC_2.4 __clog10l F
 GLIBC_2.4 __finitel F
 GLIBC_2.4 __fpclassifyl F
index 5288a28533ce45d60302b56d15c0861f6cd41bd9..3d12376d33461cda62a5edc5f0bcd128c027bc4b 100644 (file)
@@ -1053,3 +1053,4 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
index d620e465d253b8c73464dd72e05db41facbda235..89c4ac484dc5ff825c81551b5247bf557f1d402a 100644 (file)
@@ -1087,3 +1087,4 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F
index 44b0eddc5060db746701c96f23f8f707a519bfe7..d3c9cec71a5c588e80b11d399459cb94bc376240 100644 (file)
@@ -1087,3 +1087,4 @@ GLIBC_2.31 totalordermagf32x F
 GLIBC_2.31 totalordermagf64 F
 GLIBC_2.31 totalordermagf64x F
 GLIBC_2.31 totalordermagl F
+GLIBC_2.32 exp10f F