about summary refs log tree commit diff
path: root/sysdeps/ieee754/flt-32
diff options
context:
space:
mode:
authorWilco Dijkstra <Wilco.Dijkstra@arm.com>2019-07-16 12:17:22 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-01-03 10:02:04 -0300
commit220622dde5704c95a100c2792a280f18f3deba73 (patch)
treefbf0df37c2671a9bc21a200bd2f587fc5e4cbe2b /sysdeps/ieee754/flt-32
parentcf4dfd461725b6dbe6f27fbd16913f2c6c5cf7c5 (diff)
downloadglibc-220622dde5704c95a100c2792a280f18f3deba73.tar.gz
glibc-220622dde5704c95a100c2792a280f18f3deba73.tar.xz
glibc-220622dde5704c95a100c2792a280f18f3deba73.zip
Add libm_alias_finite for _finite symbols
This patch adds a new macro, libm_alias_finite, to define all _finite
symbol.  It sets all _finite symbol as compat symbol based on its first
version (obtained from the definition at built generated first-versions.h).

The <fn>f128_finite symbols were introduced in GLIBC 2.26 and so need
special treatment in code that is shared between long double and float128.
It is done by adding a list, similar to internal symbol redifinition,
on sysdeps/ieee754/float128/float128_private.h.

Alpha also needs some tricky changes to ensure we still emit 2 compat
symbols for sqrt(f).

Passes buildmanyglibc.

Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps/ieee754/flt-32')
-rw-r--r--sysdeps/ieee754/flt-32/e_acosf.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_acoshf.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_asinf.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_atan2f.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_atanhf.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_coshf.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_exp2f.c4
-rw-r--r--sysdeps/ieee754/flt-32/e_expf.c4
-rw-r--r--sysdeps/ieee754/flt-32/e_fmodf.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_gammaf_r.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_hypotf.c5
-rw-r--r--sysdeps/ieee754/flt-32/e_j0f.c5
-rw-r--r--sysdeps/ieee754/flt-32/e_j1f.c5
-rw-r--r--sysdeps/ieee754/flt-32/e_jnf.c5
-rw-r--r--sysdeps/ieee754/flt-32/e_lgammaf_r.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_log10f.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_log2f.c4
-rw-r--r--sysdeps/ieee754/flt-32/e_logf.c4
-rw-r--r--sysdeps/ieee754/flt-32/e_powf.c4
-rw-r--r--sysdeps/ieee754/flt-32/e_remainderf.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_sinhf.c3
-rw-r--r--sysdeps/ieee754/flt-32/e_sqrtf.c5
22 files changed, 51 insertions, 30 deletions
diff --git a/sysdeps/ieee754/flt-32/e_acosf.c b/sysdeps/ieee754/flt-32/e_acosf.c
index 3b2e4f1bde..ce688c9802 100644
--- a/sysdeps/ieee754/flt-32/e_acosf.c
+++ b/sysdeps/ieee754/flt-32/e_acosf.c
@@ -15,6 +15,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <libm-alias-finite.h>
 
 static const float
 one =  1.0000000000e+00, /* 0x3F800000 */
@@ -75,4 +76,4 @@ __ieee754_acosf(float x)
 	    return (float)2.0*(df+w);
 	}
 }
-strong_alias (__ieee754_acosf, __acosf_finite)
+libm_alias_finite (__ieee754_acosf, __acosf)
diff --git a/sysdeps/ieee754/flt-32/e_acoshf.c b/sysdeps/ieee754/flt-32/e_acoshf.c
index 49e64f3c43..5f573c3e98 100644
--- a/sysdeps/ieee754/flt-32/e_acoshf.c
+++ b/sysdeps/ieee754/flt-32/e_acoshf.c
@@ -19,6 +19,7 @@ static char rcsid[] = "$NetBSD: e_acoshf.c,v 1.5 1995/05/12 04:57:20 jtc Exp $";
 
 #include <math.h>
 #include <math_private.h>
+#include <libm-alias-finite.h>
 
 static const float
 one	= 1.0,
@@ -46,4 +47,4 @@ float __ieee754_acoshf(float x)
 	    return __log1pf(t+sqrtf((float)2.0*t+t*t));
 	}
 }
-strong_alias (__ieee754_acoshf, __acoshf_finite)
+libm_alias_finite (__ieee754_acoshf, __acoshf)
diff --git a/sysdeps/ieee754/flt-32/e_asinf.c b/sysdeps/ieee754/flt-32/e_asinf.c
index 3328a8f296..720e95d64d 100644
--- a/sysdeps/ieee754/flt-32/e_asinf.c
+++ b/sysdeps/ieee754/flt-32/e_asinf.c
@@ -43,6 +43,7 @@ static char rcsid[] = "$NetBSD: e_asinf.c,v 1.5 1995/05/12 04:57:25 jtc Exp $";
 #include <math.h>
 #include <math_private.h>
 #include <math-underflow.h>
+#include <libm-alias-finite.h>
 
 static const float
 one =  1.0000000000e+00, /* 0x3F800000 */
@@ -102,4 +103,4 @@ float __ieee754_asinf(float x)
 	}
 	if(hx>0) return t; else return -t;
 }
-strong_alias (__ieee754_asinf, __asinf_finite)
+libm_alias_finite (__ieee754_asinf, __asinf)
diff --git a/sysdeps/ieee754/flt-32/e_atan2f.c b/sysdeps/ieee754/flt-32/e_atan2f.c
index ddc5873ade..743b6fd43c 100644
--- a/sysdeps/ieee754/flt-32/e_atan2f.c
+++ b/sysdeps/ieee754/flt-32/e_atan2f.c
@@ -15,6 +15,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <libm-alias-finite.h>
 
 static const float
 tiny  = 1.0e-30,
@@ -91,4 +92,4 @@ __ieee754_atan2f (float y, float x)
 		    return  (z-pi_lo)-pi;/* atan(-,-) */
 	}
 }
-strong_alias (__ieee754_atan2f, __atan2f_finite)
+libm_alias_finite (__ieee754_atan2f, __atan2f)
diff --git a/sysdeps/ieee754/flt-32/e_atanhf.c b/sysdeps/ieee754/flt-32/e_atanhf.c
index 6ca9aa14dd..6a5c2d9adb 100644
--- a/sysdeps/ieee754/flt-32/e_atanhf.c
+++ b/sysdeps/ieee754/flt-32/e_atanhf.c
@@ -41,6 +41,7 @@
 #include <math-barriers.h>
 #include <math_private.h>
 #include <math-underflow.h>
+#include <libm-alias-finite.h>
 
 static const float huge = 1e30;
 
@@ -73,4 +74,4 @@ __ieee754_atanhf (float x)
 
   return copysignf (t, x);
 }
-strong_alias (__ieee754_atanhf, __atanhf_finite)
+libm_alias_finite (__ieee754_atanhf, __atanhf)
diff --git a/sysdeps/ieee754/flt-32/e_coshf.c b/sysdeps/ieee754/flt-32/e_coshf.c
index a2aa83876d..742a68139e 100644
--- a/sysdeps/ieee754/flt-32/e_coshf.c
+++ b/sysdeps/ieee754/flt-32/e_coshf.c
@@ -17,6 +17,7 @@
 #include <math.h>
 #include <math-narrow-eval.h>
 #include <math_private.h>
+#include <libm-alias-finite.h>
 
 static const float huge = 1.0e30;
 static const float one = 1.0, half=0.5;
@@ -61,4 +62,4 @@ __ieee754_coshf (float x)
     /* |x| > overflowthresold, cosh(x) overflow */
 	return math_narrow_eval (huge*huge);
 }
-strong_alias (__ieee754_coshf, __coshf_finite)
+libm_alias_finite (__ieee754_coshf, __coshf)
diff --git a/sysdeps/ieee754/flt-32/e_exp2f.c b/sysdeps/ieee754/flt-32/e_exp2f.c
index 30c1d4fb7b..3df5674081 100644
--- a/sysdeps/ieee754/flt-32/e_exp2f.c
+++ b/sysdeps/ieee754/flt-32/e_exp2f.c
@@ -19,7 +19,7 @@
 #include <math.h>
 #include <math-narrow-eval.h>
 #include <stdint.h>
-#include <shlib-compat.h>
+#include <libm-alias-finite.h>
 #include <libm-alias-float.h>
 #include "math_config.h"
 
@@ -90,7 +90,7 @@ __exp2f (float x)
 }
 #ifndef __exp2f
 strong_alias (__exp2f, __ieee754_exp2f)
-strong_alias (__exp2f, __exp2f_finite)
+libm_alias_finite (__ieee754_exp2f, __exp2f)
 versioned_symbol (libm, __exp2f, exp2f, GLIBC_2_27);
 libm_alias_float_other (__exp2, exp2)
 #endif
diff --git a/sysdeps/ieee754/flt-32/e_expf.c b/sysdeps/ieee754/flt-32/e_expf.c
index dd4628e33d..973fe9af42 100644
--- a/sysdeps/ieee754/flt-32/e_expf.c
+++ b/sysdeps/ieee754/flt-32/e_expf.c
@@ -24,7 +24,7 @@
 #include <math.h>
 #include <math-narrow-eval.h>
 #include <stdint.h>
-#include <shlib-compat.h>
+#include <libm-alias-finite.h>
 #include <libm-alias-float.h>
 #include "math_config.h"
 
@@ -108,7 +108,7 @@ __expf (float x)
 #ifndef __expf
 hidden_def (__expf)
 strong_alias (__expf, __ieee754_expf)
-strong_alias (__expf, __expf_finite)
+libm_alias_finite (__ieee754_expf, __expf)
 versioned_symbol (libm, __expf, expf, GLIBC_2_27);
 libm_alias_float_other (__exp, exp)
 #endif
diff --git a/sysdeps/ieee754/flt-32/e_fmodf.c b/sysdeps/ieee754/flt-32/e_fmodf.c
index 1a9407b517..e641599221 100644
--- a/sysdeps/ieee754/flt-32/e_fmodf.c
+++ b/sysdeps/ieee754/flt-32/e_fmodf.c
@@ -21,6 +21,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <libm-alias-finite.h>
 
 static const float one = 1.0, Zero[] = {0.0, -0.0,};
 
@@ -99,4 +100,4 @@ __ieee754_fmodf (float x, float y)
 	}
 	return x;		/* exact output */
 }
-strong_alias (__ieee754_fmodf, __fmodf_finite)
+libm_alias_finite (__ieee754_fmodf, __fmodf)
diff --git a/sysdeps/ieee754/flt-32/e_gammaf_r.c b/sysdeps/ieee754/flt-32/e_gammaf_r.c
index 15960adfc1..7aae9592eb 100644
--- a/sysdeps/ieee754/flt-32/e_gammaf_r.c
+++ b/sysdeps/ieee754/flt-32/e_gammaf_r.c
@@ -23,6 +23,7 @@
 #include <fenv_private.h>
 #include <math-underflow.h>
 #include <float.h>
+#include <libm-alias-finite.h>
 
 /* Coefficients B_2k / 2k(2k-1) of x^-(2k-1) inside exp in Stirling's
    approximation to gamma function.  */
@@ -212,4 +213,4 @@ __ieee754_gammaf_r (float x, int *signgamp)
   else
     return ret;
 }
-strong_alias (__ieee754_gammaf_r, __gammaf_r_finite)
+libm_alias_finite (__ieee754_gammaf_r, __gammaf_r)
diff --git a/sysdeps/ieee754/flt-32/e_hypotf.c b/sysdeps/ieee754/flt-32/e_hypotf.c
index 5336876cf4..dfffcf4988 100644
--- a/sysdeps/ieee754/flt-32/e_hypotf.c
+++ b/sysdeps/ieee754/flt-32/e_hypotf.c
@@ -15,6 +15,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <libm-alias-finite.h>
 
 float
 __ieee754_hypotf(float x, float y)
@@ -42,4 +43,6 @@ __ieee754_hypotf(float x, float y)
 
 	return (float) sqrt(d_x * d_x + d_y * d_y);
 }
-strong_alias (__ieee754_hypotf, __hypotf_finite)
+#ifndef __ieee754_hypotf
+libm_alias_finite (__ieee754_hypotf, __hypotf)
+#endif
diff --git a/sysdeps/ieee754/flt-32/e_j0f.c b/sysdeps/ieee754/flt-32/e_j0f.c
index 0efc646a12..0ac7d8e636 100644
--- a/sysdeps/ieee754/flt-32/e_j0f.c
+++ b/sysdeps/ieee754/flt-32/e_j0f.c
@@ -16,6 +16,7 @@
 #include <math.h>
 #include <math-barriers.h>
 #include <math_private.h>
+#include <libm-alias-finite.h>
 
 static float pzerof(float), qzerof(float);
 
@@ -81,7 +82,7 @@ __ieee754_j0f(float x)
 	    return((one+u)*(one-u)+z*(r/s));
 	}
 }
-strong_alias (__ieee754_j0f, __j0f_finite)
+libm_alias_finite (__ieee754_j0f, __j0f)
 
 static const float
 u00  = -7.3804296553e-02, /* 0xbd9726b5 */
@@ -147,7 +148,7 @@ __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 (__ieee754_y0f, __y0f_finite)
+libm_alias_finite (__ieee754_y0f, __y0f)
 
 /* The asymptotic expansions of pzero is
  *	1 - 9/128 s^2 + 11025/98304 s^4 - ...,	where s = 1/x.
diff --git a/sysdeps/ieee754/flt-32/e_j1f.c b/sysdeps/ieee754/flt-32/e_j1f.c
index 09b2296483..eafff4f4b5 100644
--- a/sysdeps/ieee754/flt-32/e_j1f.c
+++ b/sysdeps/ieee754/flt-32/e_j1f.c
@@ -20,6 +20,7 @@
 #include <math_private.h>
 #include <fenv_private.h>
 #include <math-underflow.h>
+#include <libm-alias-finite.h>
 
 static float ponef(float), qonef(float);
 
@@ -87,7 +88,7 @@ __ieee754_j1f(float x)
 	r *= x;
 	return(x*(float)0.5+r/s);
 }
-strong_alias (__ieee754_j1f, __j1f_finite)
+libm_alias_finite (__ieee754_j1f, __j1f)
 
 static const float U0[5] = {
  -1.9605709612e-01, /* 0xbe48c331 */
@@ -156,7 +157,7 @@ __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 (__ieee754_y1f, __y1f_finite)
+libm_alias_finite (__ieee754_y1f, __y1f)
 
 /* For x >= 8, the asymptotic expansions of pone is
  *	1 + 15/128 s^2 - 4725/2^15 s^4 - ...,	where s = 1/x.
diff --git a/sysdeps/ieee754/flt-32/e_jnf.c b/sysdeps/ieee754/flt-32/e_jnf.c
index ae29015424..b2a015a48a 100644
--- a/sysdeps/ieee754/flt-32/e_jnf.c
+++ b/sysdeps/ieee754/flt-32/e_jnf.c
@@ -20,6 +20,7 @@
 #include <math_private.h>
 #include <fenv_private.h>
 #include <math-underflow.h>
+#include <libm-alias-finite.h>
 
 static const float
 two   =  2.0000000000e+00, /* 0x40000000 */
@@ -181,7 +182,7 @@ __ieee754_jnf(int n, float x)
 	math_check_force_underflow (ret);
     return ret;
 }
-strong_alias (__ieee754_jnf, __jnf_finite)
+libm_alias_finite (__ieee754_jnf, __jnf)
 
 float
 __ieee754_ynf(int n, float x)
@@ -233,4 +234,4 @@ __ieee754_ynf(int n, float x)
 	ret = copysignf (FLT_MAX, ret) * FLT_MAX;
     return ret;
 }
-strong_alias (__ieee754_ynf, __ynf_finite)
+libm_alias_finite (__ieee754_ynf, __ynf)
diff --git a/sysdeps/ieee754/flt-32/e_lgammaf_r.c b/sysdeps/ieee754/flt-32/e_lgammaf_r.c
index a7f9b9fbad..0667b1bb3e 100644
--- a/sysdeps/ieee754/flt-32/e_lgammaf_r.c
+++ b/sysdeps/ieee754/flt-32/e_lgammaf_r.c
@@ -17,6 +17,7 @@
 #include <math-narrow-eval.h>
 #include <math_private.h>
 #include <libc-diag.h>
+#include <libm-alias-finite.h>
 
 static const float
 two23=  8.3886080000e+06, /* 0x4b000000 */
@@ -244,4 +245,4 @@ __ieee754_lgammaf_r(float x, int *signgamp)
 	DIAG_POP_NEEDS_COMMENT;
 	return r;
 }
-strong_alias (__ieee754_lgammaf_r, __lgammaf_r_finite)
+libm_alias_finite (__ieee754_lgammaf_r, __lgammaf_r)
diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c
index 7f1ffdad77..4e31e5cfdd 100644
--- a/sysdeps/ieee754/flt-32/e_log10f.c
+++ b/sysdeps/ieee754/flt-32/e_log10f.c
@@ -16,6 +16,7 @@
 #include <math.h>
 #include <math_private.h>
 #include <fix-int-fp-convert-zero.h>
+#include <libm-alias-finite.h>
 
 static const float
 two25      =  3.3554432000e+07, /* 0x4c000000 */
@@ -51,4 +52,4 @@ __ieee754_log10f(float x)
 	z  = y*log10_2lo + ivln10*__ieee754_logf(x);
 	return  z+y*log10_2hi;
 }
-strong_alias (__ieee754_log10f, __log10f_finite)
+libm_alias_finite (__ieee754_log10f, __log10f)
diff --git a/sysdeps/ieee754/flt-32/e_log2f.c b/sysdeps/ieee754/flt-32/e_log2f.c
index 9bee8362be..ca39776b3f 100644
--- a/sysdeps/ieee754/flt-32/e_log2f.c
+++ b/sysdeps/ieee754/flt-32/e_log2f.c
@@ -18,7 +18,7 @@
 
 #include <math.h>
 #include <stdint.h>
-#include <shlib-compat.h>
+#include <libm-alias-finite.h>
 #include <libm-alias-float.h>
 #include "math_config.h"
 
@@ -89,7 +89,7 @@ __log2f (float x)
 }
 #ifndef __log2f
 strong_alias (__log2f, __ieee754_log2f)
-strong_alias (__log2f, __log2f_finite)
+libm_alias_finite (__ieee754_log2f, __log2f)
 versioned_symbol (libm, __log2f, log2f, GLIBC_2_27);
 libm_alias_float_other (__log2, log2)
 #endif
diff --git a/sysdeps/ieee754/flt-32/e_logf.c b/sysdeps/ieee754/flt-32/e_logf.c
index e9e0346197..2a7227dd8a 100644
--- a/sysdeps/ieee754/flt-32/e_logf.c
+++ b/sysdeps/ieee754/flt-32/e_logf.c
@@ -18,7 +18,7 @@
 
 #include <math.h>
 #include <stdint.h>
-#include <shlib-compat.h>
+#include <libm-alias-finite.h>
 #include <libm-alias-float.h>
 #include "math_config.h"
 
@@ -88,7 +88,7 @@ __logf (float x)
 }
 #ifndef __logf
 strong_alias (__logf, __ieee754_logf)
-strong_alias (__logf, __logf_finite)
+libm_alias_finite (__ieee754_logf, __logf)
 versioned_symbol (libm, __logf, logf, GLIBC_2_27);
 libm_alias_float_other (__log, log)
 #endif
diff --git a/sysdeps/ieee754/flt-32/e_powf.c b/sysdeps/ieee754/flt-32/e_powf.c
index 8035dfeb2c..e423b835de 100644
--- a/sysdeps/ieee754/flt-32/e_powf.c
+++ b/sysdeps/ieee754/flt-32/e_powf.c
@@ -20,7 +20,7 @@
 #include <math-barriers.h>
 #include <math-narrow-eval.h>
 #include <stdint.h>
-#include <shlib-compat.h>
+#include <libm-alias-finite.h>
 #include <libm-alias-float.h>
 #include "math_config.h"
 
@@ -231,7 +231,7 @@ __powf (float x, float y)
 }
 #ifndef __powf
 strong_alias (__powf, __ieee754_powf)
-strong_alias (__powf, __powf_finite)
+libm_alias_finite (__ieee754_powf, __powf)
 versioned_symbol (libm, __powf, powf, GLIBC_2_27);
 libm_alias_float_other (__pow, pow)
 #endif
diff --git a/sysdeps/ieee754/flt-32/e_remainderf.c b/sysdeps/ieee754/flt-32/e_remainderf.c
index 8e78784e0f..946527c3f8 100644
--- a/sysdeps/ieee754/flt-32/e_remainderf.c
+++ b/sysdeps/ieee754/flt-32/e_remainderf.c
@@ -15,6 +15,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <libm-alias-finite.h>
 
 static const float zero = 0.0;
 
@@ -59,4 +60,4 @@ __ieee754_remainderf(float x, float p)
 	SET_FLOAT_WORD(x,hx^sx);
 	return x;
 }
-strong_alias (__ieee754_remainderf, __remainderf_finite)
+libm_alias_finite (__ieee754_remainderf, __remainderf)
diff --git a/sysdeps/ieee754/flt-32/e_sinhf.c b/sysdeps/ieee754/flt-32/e_sinhf.c
index 20f7db81ea..6fe74f3faf 100644
--- a/sysdeps/ieee754/flt-32/e_sinhf.c
+++ b/sysdeps/ieee754/flt-32/e_sinhf.c
@@ -18,6 +18,7 @@
 #include <math-narrow-eval.h>
 #include <math_private.h>
 #include <math-underflow.h>
+#include <libm-alias-finite.h>
 
 static const float one = 1.0, shuge = 1.0e37;
 
@@ -59,4 +60,4 @@ __ieee754_sinhf(float x)
     /* |x| > overflowthresold, sinh(x) overflow */
 	return math_narrow_eval (x*shuge);
 }
-strong_alias (__ieee754_sinhf, __sinhf_finite)
+libm_alias_finite (__ieee754_sinhf, __sinhf)
diff --git a/sysdeps/ieee754/flt-32/e_sqrtf.c b/sysdeps/ieee754/flt-32/e_sqrtf.c
index 6025da19cf..b339444301 100644
--- a/sysdeps/ieee754/flt-32/e_sqrtf.c
+++ b/sysdeps/ieee754/flt-32/e_sqrtf.c
@@ -15,6 +15,7 @@
 
 #include <math.h>
 #include <math_private.h>
+#include <libm-alias-finite.h>
 
 static	const float	one	= 1.0, tiny=1.0e-30;
 
@@ -83,4 +84,6 @@ __ieee754_sqrtf(float x)
 	SET_FLOAT_WORD(z,ix);
 	return z;
 }
-strong_alias (__ieee754_sqrtf, __sqrtf_finite)
+#ifndef __ieee754_sqrtf
+libm_alias_finite (__ieee754_sqrtf, __sqrtf)
+#endif