mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-09 14:50:05 +00:00
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.
This commit is contained in:
parent
4b2d8e4442
commit
be668a8d78
@ -590,4 +590,7 @@ libm {
|
||||
totalorderf128;
|
||||
totalordermagf128;
|
||||
}
|
||||
GLIBC_2.32 {
|
||||
exp10f;
|
||||
}
|
||||
}
|
||||
|
1
math/w_exp10f.c
Normal file
1
math/w_exp10f.c
Normal file
@ -0,0 +1 @@
|
||||
/* Empty. */
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user