1
0
mirror of https://sourceware.org/git/glibc.git synced 2026-10-24 01:33:52 +03:00

math: Remove the SVID error handling wrapper from y1/j1

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:20 -03:00
parent b050cb53b0
commit 8d4815e6d7
29 changed files with 86 additions and 11 deletions

View File

@@ -694,7 +694,9 @@ libm {
atanhf;
coshf;
j0f;
j1f;
log10f;
y0f;
y1f;
}
}

View File

@@ -22,10 +22,10 @@
#include <libm-alias-float.h>
#if LIBM_SVID_COMPAT
#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_43)
/* wrapper j1f */
float
__j1f (float x)
__j1f_svid (float x)
{
if (__builtin_expect (isgreater (fabsf (x),
AS_FLOAT_CONSTANT (X_TLOSS)), 0)
@@ -35,12 +35,12 @@ __j1f (float x)
return __ieee754_j1f (x);
}
libm_alias_float (__j1, j1)
compat_symbol (libm, __j1f_svid, j1f, GLIBC_2_0);
/* wrapper y1f */
float
__y1f (float x)
__y1f_svid (float x)
{
if (__builtin_expect (islessequal (x, 0.0f)
|| isgreater (x, AS_FLOAT_CONSTANT (X_TLOSS)), 0)
@@ -65,5 +65,5 @@ __y1f (float x)
return __ieee754_y1f (x);
}
libm_alias_float (__y1, y1)
compat_symbol (libm, __y1f_svid, y1f, GLIBC_2_0);
#endif

View File

@@ -20,7 +20,10 @@
#include <fenv_private.h>
#include <math-underflow.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 ponef(float), qonef(float);
@@ -260,7 +263,7 @@ j1f_near_root (float x, float z)
}
float
__ieee754_j1f(float x)
__j1f(float x)
{
float z, s,c,ss,cc,r,u,v,y;
int32_t hx,ix;
@@ -317,6 +320,13 @@ __ieee754_j1f(float x)
r *= x;
return(x*(float)0.5+r/s);
}
strong_alias (__j1f, __ieee754_j1f)
#if LIBM_SVID_COMPAT
versioned_symbol (libm, __j1f, j1f, GLIBC_2_43);
libm_alias_float_other (__j1, j1)
#else
libm_alias_float (__j1, j1)
#endif
libm_alias_finite (__ieee754_j1f, __j1f)
static const float U0[5] = {
@@ -549,7 +559,7 @@ y1f_near_root (float x, float z)
}
float
__ieee754_y1f(float x)
__y1f(float x)
{
float z, s,c,ss,cc,u,v;
int32_t hx,ix;
@@ -557,10 +567,15 @@ __ieee754_y1f(float x)
GET_FLOAT_WORD(hx,x);
ix = 0x7fffffff&hx;
/* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */
if(__builtin_expect(ix>=0x7f800000, 0)) return one/(x+x*x);
if(__builtin_expect(ix==0, 0))
return -1/zero; /* -inf and divide by zero exception. */
if(__builtin_expect(hx<0, 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 >= 0x3fe0dfbc) { /* |x| >= 0x1.c1bf78p+0 */
SET_RESTORE_ROUNDF (FE_TONEAREST);
__sincosf (x, &s, &c);
@@ -611,6 +626,13 @@ __ieee754_y1f(float x)
v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4]))));
return(x*(u/v) + tpi*(__ieee754_j1f(x)*__ieee754_logf(x)-one/x));
}
strong_alias (__y1f, __ieee754_y1f)
#if LIBM_SVID_COMPAT
versioned_symbol (libm, __y1f, y1f, GLIBC_2_43);
libm_alias_float_other (__y1, y1)
#else
libm_alias_float (__y1, y1)
#endif
libm_alias_finite (__ieee754_y1f, __y1f)
/* For x >= 8, the asymptotic expansion of pone is

View File

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

View File

@@ -1325,5 +1325,7 @@ GLIBC_2.43 coshf F
GLIBC_2.43 fmod F
GLIBC_2.43 fmodf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1291,5 +1291,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1450,5 +1450,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -956,5 +956,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -956,5 +956,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -956,5 +956,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1332,5 +1332,7 @@ GLIBC_2.43 coshf F
GLIBC_2.43 fmod F
GLIBC_2.43 fmodf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -956,5 +956,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -990,4 +990,6 @@ GLIBC_2.43 acoshf F
GLIBC_2.43 fmod F
GLIBC_2.43 fmodf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -956,5 +956,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -956,5 +956,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -956,5 +956,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1291,5 +1291,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1103,5 +1103,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1102,5 +1102,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1096,5 +1096,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1480,5 +1480,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1394,5 +1394,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1394,5 +1394,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -956,5 +956,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -956,5 +956,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1401,5 +1401,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1291,5 +1291,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1324,5 +1324,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F

View File

@@ -1324,5 +1324,7 @@ GLIBC_2.43 asinf F
GLIBC_2.43 atanhf F
GLIBC_2.43 coshf F
GLIBC_2.43 j0f F
GLIBC_2.43 j1f F
GLIBC_2.43 log10f F
GLIBC_2.43 y0f F
GLIBC_2.43 y1f F