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 | |
parent | 4b2d8e4442745a09f24804c1fcc97b7c5c4506f1 (diff) | |
download | glibc-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 'sysdeps')
30 files changed, 56 insertions, 4 deletions
diff --git a/sysdeps/ia64/fpu/e_exp10f.S b/sysdeps/ia64/fpu/e_exp10f.S index 67218c7..e82394b 100644 --- a/sysdeps/ia64/fpu/e_exp10f.S +++ b/sysdeps/ia64/fpu/e_exp10f.S @@ -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) diff --git a/sysdeps/ieee754/flt-32/e_exp10f.c b/sysdeps/ieee754/flt-32/e_exp10f.c index 034a9e3..f51c499 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 diff --git a/sysdeps/m68k/m680x0/fpu/e_exp10f.c b/sysdeps/m68k/m680x0/fpu/e_exp10f.c index f58fddd..0d03f00 100644 --- a/sysdeps/m68k/m680x0/fpu/e_exp10f.c +++ b/sysdeps/m68k/m680x0/fpu/e_exp10f.c @@ -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) diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist index 1a41ae5..a19a69c 100644 --- a/sysdeps/mach/hurd/i386/libm.abilist +++ b/sysdeps/mach/hurd/i386/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/aarch64/libm.abilist b/sysdeps/unix/sysv/linux/aarch64/libm.abilist index 62e1fee..5362c24 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libm.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/alpha/libm.abilist b/sysdeps/unix/sysv/linux/alpha/libm.abilist index 08ac390..650d10e 100644 --- a/sysdeps/unix/sysv/linux/alpha/libm.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/arm/be/libm.abilist b/sysdeps/unix/sysv/linux/arm/be/libm.abilist index dd5931f..6914b58 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/arm/le/libm.abilist b/sysdeps/unix/sysv/linux/arm/le/libm.abilist index dd5931f..6914b58 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/hppa/libm.abilist b/sysdeps/unix/sysv/linux/hppa/libm.abilist index e7686d7..6ac2295 100644 --- a/sysdeps/unix/sysv/linux/hppa/libm.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index e67f9d7..0ab740d 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/ia64/libm.abilist b/sysdeps/unix/sysv/linux/ia64/libm.abilist index 0cf637f..c8e8fd7 100644 --- a/sysdeps/unix/sysv/linux/ia64/libm.abilist +++ b/sysdeps/unix/sysv/linux/ia64/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist index dd5931f..6914b58 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist index f0b17ae..c60fdc6 100644 --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist index 8dedc9a..adea0fe 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist index 8dedc9a..adea0fe 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist index a221d7b..272969a 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist index 823f872..dd0dc66 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/nios2/libm.abilist b/sysdeps/unix/sysv/linux/nios2/libm.abilist index 64ac932..4941dee 100644 --- a/sysdeps/unix/sysv/linux/nios2/libm.abilist +++ b/sysdeps/unix/sysv/linux/nios2/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist index 3fab31f..fc2d142 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist index b90d28a..e6feaf7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist index 1369ab5..972c9bc 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist index aa45e26..4f8d3c1 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist index cd6be8e..321810d 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist index 5291424..451a860 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/sh/be/libm.abilist b/sysdeps/unix/sysv/linux/sh/be/libm.abilist index de0f1c5..a5fb514 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/sh/le/libm.abilist b/sysdeps/unix/sysv/linux/sh/le/libm.abilist index de0f1c5..a5fb514 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist index fc52ebf..d81e8a7 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist index 5288a28..3d12376 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist index d620e46..89c4ac4 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist @@ -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 diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist index 44b0edd..d3c9cec 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist @@ -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 |