Use libm_alias_float for ia64.

Continuing the preparation for additional _FloatN / _FloatNx function
aliases, this patch makes ia64 libm function implementations use
libm_alias_float to define function aliases.  The same approach is
followed as with the corresponding long double and double patches: the
ia64-specific macros are left unchanged, with calls to
libm_alias_float_other being added in most cases and libm_alias_float
itself being used in only a few places.

Tested with build-many-glibcs.py for ia64-linux-gnu that installed
stripped shared libraries are unchanged by the patch.

	* sysdeps/ia64/fpu/libm-symbols.h: Include <libm-alias-float.h>.
	* sysdeps/ia64/fpu/e_acosf.S (acosf): Use libm_alias_float_other.
	* sysdeps/ia64/fpu/e_acoshf.S (acoshf): Likewise.
	* sysdeps/ia64/fpu/e_asinf.S (asinf): Likewise.
	* sysdeps/ia64/fpu/e_atan2f.S (atan2f): Likewise.
	* sysdeps/ia64/fpu/e_atanhf.S (atanhf): Likewise.
	* sysdeps/ia64/fpu/e_coshf.S (coshf): Likewise.
	* sysdeps/ia64/fpu/e_exp10f.S (exp10f): Likewise.
	* sysdeps/ia64/fpu/e_exp2f.S (exp2f): Likewise.
	* sysdeps/ia64/fpu/e_expf.S (expf): Likewise.
	* sysdeps/ia64/fpu/e_fmodf.S (fmodf): Likewise.
	* sysdeps/ia64/fpu/e_hypotf.S (hypotf): Likewise.
	* sysdeps/ia64/fpu/e_lgammaf_r.c (lgammaf_r): Define using
	libm_alias_float_r.
	* sysdeps/ia64/fpu/e_log2f.S (log2f): Use libm_alias_float_other.
	* sysdeps/ia64/fpu/e_logf.S (log10f): Likewise.
	(logf): Likewise.
	* sysdeps/ia64/fpu/e_powf.S (powf): Likewise.
	* sysdeps/ia64/fpu/e_remainderf.S (remainderf): Likewise.
	* sysdeps/ia64/fpu/e_sinhf.S (sinhf): Likewise.
	* sysdeps/ia64/fpu/e_sqrtf.S (sqrtf): Likewise.
	* sysdeps/ia64/fpu/libm_sincosf.S (sincosf): Likewise.
	* sysdeps/ia64/fpu/s_asinhf.S (asinhf): Likewise.
	* sysdeps/ia64/fpu/s_atanf.S (atanf): Likewise.
	* sysdeps/ia64/fpu/s_cbrtf.S (cbrtf): Likewise.
	* sysdeps/ia64/fpu/s_ceilf.S (ceilf): Likewise.
	* sysdeps/ia64/fpu/s_copysign.S (copysignf): Define using
	libm_alias_float.
	* sysdeps/ia64/fpu/s_cosf.S (sinf): Use libm_alias_float_other.
	(cosf): Likewise.
	* sysdeps/ia64/fpu/s_erfcf.S (erfcf): Likewise.
	* sysdeps/ia64/fpu/s_erff.S (erff): Likewise.
	* sysdeps/ia64/fpu/s_expm1f.S (expm1f): Likewise.
	* sysdeps/ia64/fpu/s_fabsf.S (fabsf): Likewise.
	* sysdeps/ia64/fpu/s_fdimf.S (fdimf): Likewise.
	* sysdeps/ia64/fpu/s_floorf.S (floorf): Likewise.
	* sysdeps/ia64/fpu/s_fmaf.S (fmaf): Likewise.
	* sysdeps/ia64/fpu/s_fmaxf.S (fmaxf): Likewise.
	* sysdeps/ia64/fpu/s_frexpf.c (frexpf): Likewise.
	* sysdeps/ia64/fpu/s_ldexpf.c (ldexpf): Likewise.
	* sysdeps/ia64/fpu/s_log1pf.S (log1pf): Likewise.
	* sysdeps/ia64/fpu/s_logbf.S (logbf): Likewise.
	* sysdeps/ia64/fpu/s_modff.S (modff): Likewise.
	* sysdeps/ia64/fpu/s_nearbyintf.S (nearbyintf): Likewise.
	* sysdeps/ia64/fpu/s_nextafterf.S (nextafterf): Likewise.
	* sysdeps/ia64/fpu/s_rintf.S (rintf): Likewise.
	* sysdeps/ia64/fpu/s_roundf.S (roundf): Likewise.
	* sysdeps/ia64/fpu/s_scalblnf.c (scalblnf): Likewise.
	* sysdeps/ia64/fpu/s_scalbnf.c (scalbnf): Define using
	libm_alias_float.
	* sysdeps/ia64/fpu/s_tanf.S (tanf): Use libm_alias_float_other.
	* sysdeps/ia64/fpu/s_tanhf.S (tanhf): Likewise.
	* sysdeps/ia64/fpu/s_truncf.S (truncf): Likewise.
	* sysdeps/ia64/fpu/w_lgammaf_main.c
	[BUILD_LGAMMA && !USE_AS_COMPAT] (lgammaf): Likewise.
	* sysdeps/ia64/fpu/w_tgammaf_compat.S (tgammaf): Likewise.
This commit is contained in:
Joseph Myers 2017-11-29 17:38:35 +00:00
parent 8da25eec0a
commit aa1142c593
51 changed files with 111 additions and 3 deletions

View File

@ -1,3 +1,62 @@
2017-11-29 Joseph Myers <joseph@codesourcery.com>
* sysdeps/ia64/fpu/libm-symbols.h: Include <libm-alias-float.h>.
* sysdeps/ia64/fpu/e_acosf.S (acosf): Use libm_alias_float_other.
* sysdeps/ia64/fpu/e_acoshf.S (acoshf): Likewise.
* sysdeps/ia64/fpu/e_asinf.S (asinf): Likewise.
* sysdeps/ia64/fpu/e_atan2f.S (atan2f): Likewise.
* sysdeps/ia64/fpu/e_atanhf.S (atanhf): Likewise.
* sysdeps/ia64/fpu/e_coshf.S (coshf): Likewise.
* sysdeps/ia64/fpu/e_exp10f.S (exp10f): Likewise.
* sysdeps/ia64/fpu/e_exp2f.S (exp2f): Likewise.
* sysdeps/ia64/fpu/e_expf.S (expf): Likewise.
* sysdeps/ia64/fpu/e_fmodf.S (fmodf): Likewise.
* sysdeps/ia64/fpu/e_hypotf.S (hypotf): Likewise.
* sysdeps/ia64/fpu/e_lgammaf_r.c (lgammaf_r): Define using
libm_alias_float_r.
* sysdeps/ia64/fpu/e_log2f.S (log2f): Use libm_alias_float_other.
* sysdeps/ia64/fpu/e_logf.S (log10f): Likewise.
(logf): Likewise.
* sysdeps/ia64/fpu/e_powf.S (powf): Likewise.
* sysdeps/ia64/fpu/e_remainderf.S (remainderf): Likewise.
* sysdeps/ia64/fpu/e_sinhf.S (sinhf): Likewise.
* sysdeps/ia64/fpu/e_sqrtf.S (sqrtf): Likewise.
* sysdeps/ia64/fpu/libm_sincosf.S (sincosf): Likewise.
* sysdeps/ia64/fpu/s_asinhf.S (asinhf): Likewise.
* sysdeps/ia64/fpu/s_atanf.S (atanf): Likewise.
* sysdeps/ia64/fpu/s_cbrtf.S (cbrtf): Likewise.
* sysdeps/ia64/fpu/s_ceilf.S (ceilf): Likewise.
* sysdeps/ia64/fpu/s_copysign.S (copysignf): Define using
libm_alias_float.
* sysdeps/ia64/fpu/s_cosf.S (sinf): Use libm_alias_float_other.
(cosf): Likewise.
* sysdeps/ia64/fpu/s_erfcf.S (erfcf): Likewise.
* sysdeps/ia64/fpu/s_erff.S (erff): Likewise.
* sysdeps/ia64/fpu/s_expm1f.S (expm1f): Likewise.
* sysdeps/ia64/fpu/s_fabsf.S (fabsf): Likewise.
* sysdeps/ia64/fpu/s_fdimf.S (fdimf): Likewise.
* sysdeps/ia64/fpu/s_floorf.S (floorf): Likewise.
* sysdeps/ia64/fpu/s_fmaf.S (fmaf): Likewise.
* sysdeps/ia64/fpu/s_fmaxf.S (fmaxf): Likewise.
* sysdeps/ia64/fpu/s_frexpf.c (frexpf): Likewise.
* sysdeps/ia64/fpu/s_ldexpf.c (ldexpf): Likewise.
* sysdeps/ia64/fpu/s_log1pf.S (log1pf): Likewise.
* sysdeps/ia64/fpu/s_logbf.S (logbf): Likewise.
* sysdeps/ia64/fpu/s_modff.S (modff): Likewise.
* sysdeps/ia64/fpu/s_nearbyintf.S (nearbyintf): Likewise.
* sysdeps/ia64/fpu/s_nextafterf.S (nextafterf): Likewise.
* sysdeps/ia64/fpu/s_rintf.S (rintf): Likewise.
* sysdeps/ia64/fpu/s_roundf.S (roundf): Likewise.
* sysdeps/ia64/fpu/s_scalblnf.c (scalblnf): Likewise.
* sysdeps/ia64/fpu/s_scalbnf.c (scalbnf): Define using
libm_alias_float.
* sysdeps/ia64/fpu/s_tanf.S (tanf): Use libm_alias_float_other.
* sysdeps/ia64/fpu/s_tanhf.S (tanhf): Likewise.
* sysdeps/ia64/fpu/s_truncf.S (truncf): Likewise.
* sysdeps/ia64/fpu/w_lgammaf_main.c
[BUILD_LGAMMA && !USE_AS_COMPAT] (lgammaf): Likewise.
* sysdeps/ia64/fpu/w_tgammaf_compat.S (tgammaf): Likewise.
2017-11-28 Mike FABIAN <mfabian@redhat.com>, Alexandre Oliva <aoliva@redhat.com>
[BZ #17750]

View File

@ -600,6 +600,7 @@ ACOSF_ABS_ONE:
}
GLOBAL_LIBM_END(acosf)
libm_alias_float_other (acos, acos)
// Stack operations when calling error support.

View File

@ -967,6 +967,7 @@ ACOSH_LESS_ONE:
;;
GLOBAL_LIBM_END(acoshf)
libm_alias_float_other (acosh, acosh)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -583,6 +583,7 @@ ASINF_ABS_ONE:
;;
GLOBAL_LIBM_END(asinf)
libm_alias_float_other (asin, asin)
// Stack operations when calling error support.
// (1) (2)

View File

@ -826,6 +826,7 @@ ATAN2F_XY_INF_NAN_ZERO:
GLOBAL_IEEE754_END(atan2f)
libm_alias_float_other (__atan2, atan2)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -781,6 +781,7 @@ atanhf_ge_one:
;;
GLOBAL_LIBM_END(atanhf)
libm_alias_float_other (atanh, atanh)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -652,6 +652,7 @@ COSH_UNORM:
;;
GLOBAL_IEEE754_END(coshf)
libm_alias_float_other (__cosh, cosh)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -488,6 +488,7 @@ OUT_RANGE_exp10:
;;
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)
#endif

View File

@ -469,6 +469,7 @@ OUT_RANGE_exp2:
;;
GLOBAL_LIBM_END(__exp2f)
libm_alias_float_other (__exp2, __exp2)
#ifdef SHARED
.symver __exp2f,exp2f@@GLIBC_2.27
.weak __exp2f_compat

View File

@ -657,6 +657,7 @@ EXP_UNDERFLOW_ZERO:
;;
GLOBAL_IEEE754_END(expf)
libm_alias_float_other (__exp, exp)
#ifdef SHARED
.symver expf,expf@@GLIBC_2.27
.weak __expf_compat

View File

@ -514,6 +514,7 @@ EXP_ERROR_RETURN:
}
GLOBAL_IEEE754_END(fmodf)
libm_alias_float_other (__fmod, fmod)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue

View File

@ -338,6 +338,7 @@ GLOBAL_IEEE754_ENTRY(hypotf)
(p9) br.ret.sptk b0;;
}
GLOBAL_IEEE754_END(hypotf)
libm_alias_float_other (__hypot, hypot)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue

View File

@ -60,7 +60,7 @@ float __ieee754_lgammaf_r(float x, int* signgam)
{
return __libm_lgammaf(x, signgam, sizeof(*signgam));
}
weak_alias (__ieee754_lgammaf_r, lgammaf_r)
libm_alias_float_r (__ieee754_lgamma, lgamma, _r)
#ifndef _LIBC
float __ieee754_gammaf_r(float x, int* signgam)

View File

@ -492,6 +492,7 @@ SPECIAL_log2f:
}
GLOBAL_LIBM_END(__log2f)
libm_alias_float_other (__log2, __log2)
#ifdef SHARED
.symver __log2f,log2f@@GLIBC_2.27
.weak __log2f_compat

View File

@ -842,6 +842,7 @@ GLOBAL_IEEE754_ENTRY(log10f)
br.cond.sptk logf_log10f_common
};;
GLOBAL_IEEE754_END(log10f)
libm_alias_float_other (__log10, log10)
GLOBAL_IEEE754_ENTRY(logf)
{ .mfi
@ -1088,6 +1089,7 @@ logf_libm_err:
nop.i 0
};;
GLOBAL_IEEE754_END(logf)
libm_alias_float_other (__log, log)
#ifdef SHARED
.symver logf,logf@@GLIBC_2.27
.weak __logf_compat

View File

@ -2003,6 +2003,7 @@ POW_OVER_UNDER_ERROR:
;;
GLOBAL_LIBM_END(__powf)
libm_alias_float_other (__pow, __pow)
#ifdef SHARED
.symver __powf,powf@@GLIBC_2.27
.weak __powf_compat

View File

@ -548,6 +548,7 @@ EXP_ERROR_RETURN:
}
GLOBAL_IEEE754_END(remainderf)
libm_alias_float_other (__remainder, remainder)
weak_alias (__remainderf, dremf)

View File

@ -689,6 +689,7 @@ SINH_UNORM:
;;
GLOBAL_IEEE754_END(sinhf)
libm_alias_float_other (__sinh, sinh)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -203,6 +203,7 @@ GLOBAL_IEEE754_ENTRY(sqrtf)
// with the result equal to frcpa(x)
//
GLOBAL_IEEE754_END(sqrtf)
libm_alias_float_other (__sqrt, sqrt)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -2,6 +2,7 @@
# include <sysdep.h>
# undef ret /* get rid of the stupid "ret" macro; it breaks br.ret */
# include <libm-alias-float.h>
# include <libm-alias-double.h>
# include <libm-alias-ldouble.h>

View File

@ -421,6 +421,7 @@ GLOBAL_IEEE754_ENTRY(sincosf)
br.cond.sptk _CISF_COMMON
};;
GLOBAL_IEEE754_END(sincosf)
libm_alias_float_other (__sincos, sincos)
GLOBAL_LIBM_ENTRY(__libm_sincosf)
{ .mlx

View File

@ -935,3 +935,4 @@ ASINH_UNORM:
;;
GLOBAL_LIBM_END(asinhf)
libm_alias_float_other (asinh, asinh)

View File

@ -553,3 +553,4 @@ ATANF_X_INF_NAN_ZERO:
;;
GLOBAL_LIBM_END(atanf)
libm_alias_float_other (atan, atan)

View File

@ -759,3 +759,4 @@ GLOBAL_LIBM_ENTRY(cbrtf)
GLOBAL_LIBM_END(cbrtf)
libm_alias_float_other (cbrt, cbrt)

View File

@ -222,3 +222,4 @@ CEIL_UNORM:
;;
GLOBAL_LIBM_END(ceilf)
libm_alias_float_other (ceil, ceil)

View File

@ -33,5 +33,5 @@ strong_alias (__copysign, __libm_copysignf)
strong_alias (__copysign, __libm_copysignl)
libm_alias_double (__copysign, copysign)
weak_alias (__copysignf, copysignf)
libm_alias_float (__copysign, copysign)
libm_alias_ldouble (__copysign, copysign)

View File

@ -409,6 +409,7 @@ GLOBAL_IEEE754_ENTRY(sinf)
};;
GLOBAL_IEEE754_END(sinf)
libm_alias_float_other (__sin, sin)
GLOBAL_IEEE754_ENTRY(cosf)
@ -659,6 +660,7 @@ _SINCOSF_SPECIAL_ARGS:
};;
GLOBAL_IEEE754_END(cosf)
libm_alias_float_other (__cos, cos)
//////////// x >= 2^24 - large arguments routine call ////////////
LOCAL_LIBM_ENTRY(__libm_callout_sincosf)

View File

@ -918,6 +918,7 @@ SPECIAL:
;;
GLOBAL_LIBM_END(erfcf)
libm_alias_float_other (erfc, erfc)
// Call via (p10) br.cond.spnt __libm_error_region

View File

@ -556,3 +556,4 @@ erff_denormal:
;;
GLOBAL_LIBM_END(erff)
libm_alias_float_other (erf, erf)

View File

@ -612,6 +612,7 @@ EXPM1_CERTAIN_OVERFLOW:
;;
GLOBAL_IEEE754_END(expm1f)
libm_alias_float_other (__expm1, expm1)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -80,3 +80,4 @@ GLOBAL_IEEE754_ENTRY(fabsf)
}
GLOBAL_IEEE754_END(fabsf)
libm_alias_float_other (__fabs, fabs)

View File

@ -163,6 +163,7 @@ FDIM_OVERFLOW:
;;
GLOBAL_LIBM_END(fdimf)
libm_alias_float_other (fdim, fdim)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -213,3 +213,4 @@ FLOOR_UNORM:
;;
GLOBAL_IEEE754_END(floorf)
libm_alias_float_other (__floor, floor)

View File

@ -69,3 +69,4 @@ GLOBAL_LIBM_ENTRY(fmaf)
;;
GLOBAL_LIBM_END(fmaf)
libm_alias_float_other (fma, fma)

View File

@ -112,3 +112,4 @@ GLOBAL_LIBM_ENTRY(fmaxf)
;;
GLOBAL_LIBM_END(fmaxf)
libm_alias_float_other (fmax, fmax)

View File

@ -65,3 +65,4 @@ float frexpf(float x, int *y)
#endif
}
libm_alias_float_other (frexp, frexp)

View File

@ -59,3 +59,4 @@ float ldexpf(float x, int n)
#endif
}
libm_alias_float_other (ldexp, ldexp)

View File

@ -733,6 +733,7 @@ log_libm_err:
;;
GLOBAL_IEEE754_END(log1pf)
libm_alias_float_other (__log1p, log1p)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -218,6 +218,7 @@ LOGB_ZERO:
;;
GLOBAL_LIBM_END(logbf)
libm_alias_float_other (logb, logb)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -276,3 +276,4 @@ MODF_DENORM:
}
GLOBAL_LIBM_END(modff)
libm_alias_float_other (modf, modf)

View File

@ -215,3 +215,4 @@ RINT_NOT_ROUND_NEAREST:
;;
GLOBAL_LIBM_END(nearbyintf)
libm_alias_float_other (nearbyint, nearbyint)

View File

@ -437,6 +437,7 @@ NEXT_OVERFLOW:
;;
GLOBAL_LIBM_END(nextafterf)
libm_alias_float_other (nextafter, nextafter)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -227,3 +227,4 @@ RINT_NOT_ROUND_NEAREST:
;;
GLOBAL_IEEE754_END(rintf)
libm_alias_float_other (__rint, rint)

View File

@ -231,3 +231,4 @@ ROUND_UNORM:
;;
GLOBAL_LIBM_END(roundf)
libm_alias_float_other (round, round)

View File

@ -59,3 +59,4 @@ float scalblnf(float x, long int n)
#endif
}
libm_alias_float_other (scalbln, scalbln)

View File

@ -60,4 +60,4 @@ float __scalbnf(float x, int n)
}
weak_alias (__scalbnf, scalbnf)
libm_alias_float (__scalbn, scalbn)

View File

@ -550,6 +550,7 @@ Return_From_Huges:
;;
GLOBAL_IEEE754_END(tanf)
libm_alias_float_other (__tan, tan)
LOCAL_LIBM_ENTRY(__libm_callout)

View File

@ -579,3 +579,4 @@ tanhf_denormal:
;;
GLOBAL_LIBM_END(tanhf)
libm_alias_float_other (tanh, tanh)

View File

@ -164,3 +164,4 @@ TRUNC_UNORM:
;;
GLOBAL_LIBM_END(truncf)
libm_alias_float_other (trunc, trunc)

View File

@ -69,6 +69,7 @@ float LGFUNC (lgammaf) (float x)
compat_symbol (libm, __lgammaf_compat, lgammaf, LGAMMA_OLD_VER);
# else
versioned_symbol (libm, __ieee754_lgammaf, lgammaf, LGAMMA_NEW_VER);
libm_alias_float_other (__ieee754_lgamma, lgamma)
# endif
# if GAMMA_ALIAS
strong_alias (LGFUNC (lgammaf), __ieee754_gammaf)

View File

@ -1276,6 +1276,7 @@ tgammaf_libm_err:
};;
GLOBAL_LIBM_END(tgammaf)
libm_alias_float_other (tgamma, tgamma)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue