math: Remove the SVID error handling wrapper from y0/j0

Tested on x86_64-linux-gnu and i686-linux-gnu.

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
This commit is contained in:
Adhemerval Zanella 2025-10-08 10:55:19 -03:00
parent 03eeeba705
commit b050cb53b0
29 changed files with 88 additions and 10 deletions

View File

@ -693,6 +693,8 @@ libm {
asinf;
atanhf;
coshf;
j0f;
log10f;
y0f;
}
}

View File

@ -20,12 +20,13 @@
#include <math_private.h>
#include <math-svid-compat.h>
#include <libm-alias-float.h>
#include <shlib-compat.h>
#if LIBM_SVID_COMPAT
#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_43)
/* wrapper j0f */
float
__j0f (float x)
__j0f_svid (float x)
{
if (__builtin_expect (isgreater (fabsf (x),
AS_FLOAT_CONSTANT (X_TLOSS)), 0)
@ -35,12 +36,12 @@ __j0f (float x)
return __ieee754_j0f (x);
}
libm_alias_float (__j0, j0)
compat_symbol (libm, __j0f_svid, j0f, GLIBC_2_0);
/* wrapper y0f */
float
__y0f (float x)
__y0f_svid (float x)
{
if (__builtin_expect (islessequal (x, 0.0f)
|| isgreater (x, AS_FLOAT_CONSTANT (X_TLOSS)), 0)
@ -65,5 +66,5 @@ __y0f (float x)
return __ieee754_y0f (x);
}
libm_alias_float (__y0, y0)
compat_symbol (libm, __y0f_svid, y0f, GLIBC_2_0);
#endif

View File

@ -17,7 +17,10 @@
#include <math_private.h>
#include <fenv_private.h>
#include <libm-alias-finite.h>
#include <libm-alias-float.h>
#include <math-svid-compat.h>
#include <reduce_aux.h>
#include "math_config.h"
static float pzerof(float), qzerof(float);
@ -251,7 +254,7 @@ j0f_near_root (float x, float z)
}
float
__ieee754_j0f(float x)
__j0f(float x)
{
float z, s,c,ss,cc,r,u,v;
int32_t hx,ix;
@ -306,8 +309,16 @@ __ieee754_j0f(float x)
return((one+u)*(one-u)+z*(r/s));
}
}
strong_alias (__j0f, __ieee754_j0f)
#if LIBM_SVID_COMPAT
versioned_symbol (libm, __j0f, j0f, GLIBC_2_43);
libm_alias_float_other (__j0, j0)
#else
libm_alias_float (__j0, j0)
#endif
libm_alias_finite (__ieee754_j0f, __j0f)
static const float
u00 = -7.3804296553e-02, /* 0xbd9726b5 */
u01 = 1.7666645348e-01, /* 0x3e34e80d */
@ -535,7 +546,7 @@ y0f_near_root (float x, float z)
}
float
__ieee754_y0f(float x)
__y0f(float x)
{
float z, s,c,ss,cc,u,v;
int32_t hx,ix;
@ -543,9 +554,15 @@ __ieee754_y0f(float x)
GET_FLOAT_WORD(hx,x);
ix = 0x7fffffff&hx;
/* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0, y0(0) is -inf. */
if(ix>=0x7f800000) return one/(x+x*x);
if(ix==0) return -1/zero; /* -inf and divide by zero exception. */
if(hx<0) return zero/(zero*x);
if(ix>=0x7f800000)
{
if (hx==0xFF800000)
return __math_invalidf (1);
else
return one/(x+x*x);
}
if(ix==0) return __math_divzerof (1); /* -inf and divide by zero exception. */
if(hx<0) return __math_invalidf (x);
if(ix >= 0x40000000 || (0x3f5340ed <= ix && ix <= 0x3f77b5e5)) {
/* |x| >= 2.0 or
0x1.a681dap-1 <= |x| <= 0x1.ef6bcap-1 (around 1st zero) */
@ -597,6 +614,13 @@ __ieee754_y0f(float x)
v = one+z*(v01+z*(v02+z*(v03+z*v04)));
return(u/v + tpi*(__ieee754_j0f(x)*__ieee754_logf(x)));
}
strong_alias (__y0f, __ieee754_y0f)
#if LIBM_SVID_COMPAT
versioned_symbol (libm, __y0f, y0f, GLIBC_2_43);
libm_alias_float_other (__y0, y0)
#else
libm_alias_float (__y0, y0)
#endif
libm_alias_finite (__ieee754_y0f, __y0f)
/* The asymptotic expansion of pzero is

View File

@ -0,0 +1 @@
/* Not needed */

View File

@ -1324,4 +1324,6 @@ GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 fmod F
GLIBC_2.43 fmodf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1290,4 +1290,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1449,4 +1449,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -955,4 +955,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -955,4 +955,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -955,4 +955,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1331,4 +1331,6 @@ GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 fmod F
GLIBC_2.43 fmodf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -955,4 +955,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -989,3 +989,5 @@ GLIBC_2.42 rsqrtl F
GLIBC_2.43 acoshf F
GLIBC_2.43 fmod F
GLIBC_2.43 fmodf F
GLIBC_2.43 j0f F
GLIBC_2.43 y0f F

View File

@ -955,4 +955,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -955,4 +955,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -955,4 +955,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1290,4 +1290,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1102,4 +1102,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1101,4 +1101,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1095,4 +1095,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1479,4 +1479,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1393,4 +1393,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1393,4 +1393,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -955,4 +955,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -955,4 +955,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1400,4 +1400,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1290,4 +1290,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1323,4 +1323,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F

View File

@ -1323,4 +1323,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F