Use libm_alias_ldouble macros in sysdeps/ia64/fpu.

Continuing the preparation for additional _FloatN / _FloatNx aliases,
this patch makes long double functions in sysdeps/ia64/fpu use
libm_alias_ldouble macros, so that they can have _Float64x aliases
added in future.

Most ia64 libm functions are defined using ia64-specific macros in
libm-symbols.h.  These are left unchanged, with libm-alias-ldouble.h
included from libm-symbols.h (and the expectation that other
libm-alias-*.h headers will be included from there as well in future),
and libm_alias_ldouble_other then being used in most cases to define
aliases for any additional types (currently the empty set).  Functions
that used weak_alias are converted to use libm_alias_ldouble.

Tested (compilation only) with build-many-glibcs.py for ia64,
including that installed stripped shared libraries are unchanged by
the patch.

	* sysdeps/ia64/fpu/libm-symbols.h: Include <libm-alias-ldouble.h>.
	* sysdeps/ia64/fpu/e_acoshl.S (acoshl): Use
	libm_alias_ldouble_other.
	* sysdeps/ia64/fpu/e_acosl.S (acosl): Likewise.
	* sysdeps/ia64/fpu/e_asinl.S (asinl): Likewise.
	* sysdeps/ia64/fpu/e_atanhl.S (atanhl): Likewise.
	* sysdeps/ia64/fpu/e_coshl.S (coshl): Likewise.
	* sysdeps/ia64/fpu/e_exp10l.S (exp10l): Likewise.
	* sysdeps/ia64/fpu/e_exp2l.S (exp2l): Likewise.
	* sysdeps/ia64/fpu/e_fmodl.S (fmodl): Likewise.
	* sysdeps/ia64/fpu/e_hypotl.S (hypotl): Likewise.
	* sysdeps/ia64/fpu/e_lgammal_r.c (lgammal_r): Define using
	libm_alias_ldouble_r.
	* sysdeps/ia64/fpu/e_log2l.S (log2l): Use
	libm_alias_ldouble_other.
	* sysdeps/ia64/fpu/e_logl.S (logl): Likewise.
	(log10l): Likewise.
	* sysdeps/ia64/fpu/e_powl.S (powl): Likewise.
	* sysdeps/ia64/fpu/e_remainderl.S (remainderl): Likewise.
	* sysdeps/ia64/fpu/e_sinhl.S (sinhl): Likewise.
	* sysdeps/ia64/fpu/e_sqrtl.S (sqrtl): Likewise.
	* sysdeps/ia64/fpu/libm_sincosl.S (sincosl): Likewise.
	* sysdeps/ia64/fpu/s_asinhl.S (asinhl): Likewise.
	* sysdeps/ia64/fpu/s_atanl.S (atanl): Likewise.
	(atan2l): Likewise.
	* sysdeps/ia64/fpu/s_cbrtl.S (cbrtl): Likewise.
	* sysdeps/ia64/fpu/s_ceill.S (ceill): Likewise.
	* sysdeps/ia64/fpu/s_copysign.S (copysignl): Define using
	libm_alias_ldouble.
	* sysdeps/ia64/fpu/s_cosl.S (sinl): Use libm_alias_ldouble_other.
	(cosl): Likewise.
	* sysdeps/ia64/fpu/s_erfcl.S (erfcl): Likewise.
	* sysdeps/ia64/fpu/s_erfl.S (erfl): Likewise.
	* sysdeps/ia64/fpu/s_expm1l.S (expm1l): Likewise.
	(expl): Likewise.
	* sysdeps/ia64/fpu/s_fabsl.S (fabsl): Likewise.
	* sysdeps/ia64/fpu/s_fdiml.S (fdiml): Likewise.
	* sysdeps/ia64/fpu/s_floorl.S (floorl): Likewise.
	* sysdeps/ia64/fpu/s_fmal.S (fmal): Likewise.
	* sysdeps/ia64/fpu/s_fmaxl.S (fmaxl): Likewise.
	* sysdeps/ia64/fpu/s_frexpl.c (frexpl): Likewise.
	* sysdeps/ia64/fpu/s_ldexpl.c (ldexpl): Likewise.
	* sysdeps/ia64/fpu/s_log1pl.S (log1pl): Likewise.
	* sysdeps/ia64/fpu/s_logbl.S (logbl): Likewise.
	* sysdeps/ia64/fpu/s_modfl.S (modfl): Likewise.
	* sysdeps/ia64/fpu/s_nearbyintl.S (nearbyintl): Define using
	libm_alias_ldouble.
	* sysdeps/ia64/fpu/s_nextafterl.S (nextafterl): Use
	libm_alias_ldouble_other.
	* sysdeps/ia64/fpu/s_rintl.S (rintl): Likewise.
	* sysdeps/ia64/fpu/s_roundl.S (roundl): Likewise.
	* sysdeps/ia64/fpu/s_scalbnl.c (scalbnl): Define using
	libm_alias_ldouble.
	* sysdeps/ia64/fpu/s_tanhl.S (tanhl): Use
	libm_alias_ldouble_other.
	* sysdeps/ia64/fpu/s_tanl.S (tanl): Likewise.
	* sysdeps/ia64/fpu/s_truncl.S (truncl): Likewise.
	* sysdeps/ia64/fpu/w_lgammal_main.c
	[BUILD_LGAMMA && !USE_AS_COMPAT] (lgammal): Likewise.
	* sysdeps/ia64/fpu/w_tgammal_compat.S (tgammal): Likewise.
This commit is contained in:
Joseph Myers 2017-11-23 23:34:54 +00:00
parent 0a947e061d
commit 3a327316ad
48 changed files with 115 additions and 4 deletions

View File

@ -1,3 +1,66 @@
2017-11-23 Joseph Myers <joseph@codesourcery.com>
* sysdeps/ia64/fpu/libm-symbols.h: Include <libm-alias-ldouble.h>.
* sysdeps/ia64/fpu/e_acoshl.S (acoshl): Use
libm_alias_ldouble_other.
* sysdeps/ia64/fpu/e_acosl.S (acosl): Likewise.
* sysdeps/ia64/fpu/e_asinl.S (asinl): Likewise.
* sysdeps/ia64/fpu/e_atanhl.S (atanhl): Likewise.
* sysdeps/ia64/fpu/e_coshl.S (coshl): Likewise.
* sysdeps/ia64/fpu/e_exp10l.S (exp10l): Likewise.
* sysdeps/ia64/fpu/e_exp2l.S (exp2l): Likewise.
* sysdeps/ia64/fpu/e_fmodl.S (fmodl): Likewise.
* sysdeps/ia64/fpu/e_hypotl.S (hypotl): Likewise.
* sysdeps/ia64/fpu/e_lgammal_r.c (lgammal_r): Define using
libm_alias_ldouble_r.
* sysdeps/ia64/fpu/e_log2l.S (log2l): Use
libm_alias_ldouble_other.
* sysdeps/ia64/fpu/e_logl.S (logl): Likewise.
(log10l): Likewise.
* sysdeps/ia64/fpu/e_powl.S (powl): Likewise.
* sysdeps/ia64/fpu/e_remainderl.S (remainderl): Likewise.
* sysdeps/ia64/fpu/e_sinhl.S (sinhl): Likewise.
* sysdeps/ia64/fpu/e_sqrtl.S (sqrtl): Likewise.
* sysdeps/ia64/fpu/libm_sincosl.S (sincosl): Likewise.
* sysdeps/ia64/fpu/s_asinhl.S (asinhl): Likewise.
* sysdeps/ia64/fpu/s_atanl.S (atanl): Likewise.
(atan2l): Likewise.
* sysdeps/ia64/fpu/s_cbrtl.S (cbrtl): Likewise.
* sysdeps/ia64/fpu/s_ceill.S (ceill): Likewise.
* sysdeps/ia64/fpu/s_copysign.S (copysignl): Define using
libm_alias_ldouble.
* sysdeps/ia64/fpu/s_cosl.S (sinl): Use libm_alias_ldouble_other.
(cosl): Likewise.
* sysdeps/ia64/fpu/s_erfcl.S (erfcl): Likewise.
* sysdeps/ia64/fpu/s_erfl.S (erfl): Likewise.
* sysdeps/ia64/fpu/s_expm1l.S (expm1l): Likewise.
(expl): Likewise.
* sysdeps/ia64/fpu/s_fabsl.S (fabsl): Likewise.
* sysdeps/ia64/fpu/s_fdiml.S (fdiml): Likewise.
* sysdeps/ia64/fpu/s_floorl.S (floorl): Likewise.
* sysdeps/ia64/fpu/s_fmal.S (fmal): Likewise.
* sysdeps/ia64/fpu/s_fmaxl.S (fmaxl): Likewise.
* sysdeps/ia64/fpu/s_frexpl.c (frexpl): Likewise.
* sysdeps/ia64/fpu/s_ldexpl.c (ldexpl): Likewise.
* sysdeps/ia64/fpu/s_log1pl.S (log1pl): Likewise.
* sysdeps/ia64/fpu/s_logbl.S (logbl): Likewise.
* sysdeps/ia64/fpu/s_modfl.S (modfl): Likewise.
* sysdeps/ia64/fpu/s_nearbyintl.S (nearbyintl): Define using
libm_alias_ldouble.
* sysdeps/ia64/fpu/s_nextafterl.S (nextafterl): Use
libm_alias_ldouble_other.
* sysdeps/ia64/fpu/s_rintl.S (rintl): Likewise.
* sysdeps/ia64/fpu/s_roundl.S (roundl): Likewise.
* sysdeps/ia64/fpu/s_scalbnl.c (scalbnl): Define using
libm_alias_ldouble.
* sysdeps/ia64/fpu/s_tanhl.S (tanhl): Use
libm_alias_ldouble_other.
* sysdeps/ia64/fpu/s_tanl.S (tanl): Likewise.
* sysdeps/ia64/fpu/s_truncl.S (truncl): Likewise.
* sysdeps/ia64/fpu/w_lgammal_main.c
[BUILD_LGAMMA && !USE_AS_COMPAT] (lgammal): Likewise.
* sysdeps/ia64/fpu/w_tgammal_compat.S (tgammal): Likewise.
2017-11-23 Florian Weimer <fweimer@redhat.com>
* malloc/malloc.c (tcache_thread_shutdown): Rename from

View File

@ -1650,6 +1650,7 @@ acoshl_lt_pone:
};;
GLOBAL_LIBM_END(acoshl)
libm_alias_ldouble_other (acosh, acosh)

View File

@ -2481,6 +2481,7 @@ acosl_SPECIAL_CASES:
GLOBAL_LIBM_END(acosl)
libm_alias_ldouble_other (acos, acos)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -2457,6 +2457,7 @@ SMALL_S:
GLOBAL_LIBM_END(asinl)
libm_alias_ldouble_other (asin, asin)

View File

@ -1101,6 +1101,7 @@ atanhl_gt_one:
};;
GLOBAL_LIBM_END(atanhl)
libm_alias_ldouble_other (atanh, atanh)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue

View File

@ -1032,6 +1032,7 @@ COSH_HUGE:
;;
GLOBAL_IEEE754_END(coshl)
libm_alias_ldouble_other (__cosh, cosh)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -749,6 +749,7 @@ OUT_RANGE_EXP10:
;;
GLOBAL_IEEE754_END(exp10l)
libm_alias_ldouble_other (__exp10, exp10)
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
compat_symbol (libm, exp10l, pow10l, GLIBC_2_2)
#endif

View File

@ -746,6 +746,7 @@ OUT_RANGE_exp2l:
GLOBAL_LIBM_END(exp2l)
libm_alias_ldouble_other (exp2, exp2)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -606,6 +606,7 @@ FMOD_B_ZERO:
;;
GLOBAL_IEEE754_END(fmodl)
libm_alias_ldouble_other (__fmod, fmod)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue

View File

@ -422,6 +422,7 @@ GLOBAL_IEEE754_ENTRY(hypotl)
(p9) br.ret.sptk b0;;
}
GLOBAL_IEEE754_END(hypotl)
libm_alias_ldouble_other (__hypot, hypot)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue

View File

@ -59,7 +59,7 @@ long double __ieee754_lgammal_r(long double x, int* signgam)
{
return __libm_lgammal(x, signgam, sizeof(*signgam));
}
weak_alias (__ieee754_lgammal_r, lgammal_r)
libm_alias_ldouble_r (__ieee754_lgamma, lgamma, _r)
#ifndef _LIBC
long double __ieee754_gammal_r(long double x, int* signgam)

View File

@ -760,6 +760,7 @@ LOG2_PSEUDO_ZERO:
GLOBAL_IEEE754_END(log2l)
libm_alias_ldouble_other (__log2, log2)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -633,6 +633,7 @@ GLOBAL_IEEE754_ENTRY(logl)
;;
GLOBAL_IEEE754_END(logl)
libm_alias_ldouble_other (__log, log)
GLOBAL_IEEE754_ENTRY(log10l)
@ -1145,6 +1146,7 @@ LOGL_64_negative:
GLOBAL_IEEE754_END(log10l)
libm_alias_ldouble_other (__log10, log10)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue

View File

@ -2755,6 +2755,7 @@ POWL_64_SQRT:
;;
GLOBAL_LIBM_END(powl)
libm_alias_ldouble_other (pow, pow)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -557,6 +557,7 @@ EXP_ERROR_RETURN:
}
GLOBAL_IEEE754_END(remainderl)
libm_alias_ldouble_other (__remainder, remainder)
weak_alias (__remainderl, dreml)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -1054,6 +1054,7 @@ SINH_HUGE:
;;
GLOBAL_IEEE754_END(sinhl)
libm_alias_ldouble_other (__sinh, sinh)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -221,6 +221,7 @@ alloc r32= ar.pfs,0,5,4,0
// END DOUBLE EXTENDED PRECISION MINIMUM LATENCY SQUARE ROOT ALGORITHM
GLOBAL_IEEE754_END(sqrtl)
libm_alias_ldouble_other (__sqrt, sqrt)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue

View File

@ -2,6 +2,8 @@
# include <sysdep.h>
# undef ret /* get rid of the stupid "ret" macro; it breaks br.ret */
# include <libm-alias-ldouble.h>
/* Support for compatible assembler handling. */
# define ASM_SIZE_DIRECTIVE(name) .size name,.-name

View File

@ -835,6 +835,7 @@ GLOBAL_IEEE754_ENTRY(sincosl)
br.cond.sptk _COMMON_SINCOSL
};;
GLOBAL_IEEE754_END(sincosl)
libm_alias_ldouble_other (__sincos, sincos)
GLOBAL_LIBM_ENTRY(__libm_sincosl)
{ .mlx ///////////////////////////// 1 /////////////////

View File

@ -1342,3 +1342,4 @@ near_0:
};;
GLOBAL_LIBM_END(asinhl)
libm_alias_ldouble_other (asinh, asinh)

View File

@ -813,6 +813,7 @@ GLOBAL_IEEE754_ENTRY(atanl)
;;
GLOBAL_IEEE754_END(atanl)
libm_alias_ldouble_other (__atan, atan)
GLOBAL_IEEE754_ENTRY(atan2l)
@ -1953,6 +1954,7 @@ ATANL_ArgY_Not_INF:
;;
GLOBAL_IEEE754_END(atan2l)
libm_alias_ldouble_other (__atan2, atan2)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue

View File

@ -982,3 +982,4 @@ GLOBAL_LIBM_ENTRY(cbrtl)
;;
GLOBAL_LIBM_END(cbrtl)
libm_alias_ldouble_other (cbrt, cbrt)

View File

@ -222,3 +222,4 @@ CEIL_UNORM:
;;
GLOBAL_LIBM_END(ceill)
libm_alias_ldouble_other (ceil, ceil)

View File

@ -34,4 +34,4 @@ strong_alias (__copysign, __libm_copysignl)
weak_alias (__copysign, copysign)
weak_alias (__copysignf, copysignf)
weak_alias (__copysignl, copysignl)
libm_alias_ldouble (__copysign, copysign)

View File

@ -774,6 +774,7 @@ GLOBAL_IEEE754_ENTRY(sinl)
;;
GLOBAL_IEEE754_END(sinl)
libm_alias_ldouble_other (__sin, sin)
GLOBAL_IEEE754_ENTRY(cosl)
{ .mlx
@ -2288,6 +2289,7 @@ SINCOSL_SPECIAL:
}
GLOBAL_IEEE754_END(cosl)
libm_alias_ldouble_other (__cos, cos)
// *******************************************************************
// *******************************************************************

View File

@ -2003,6 +2003,7 @@ ERFC_RESULT:
};;
GLOBAL_LIBM_END(erfcl)
libm_alias_ldouble_other (erfc, erfc)
// call via (p15) br.cond.spnt __libm_error_region
// for x > POS_ARG_ASYMP

View File

@ -1235,3 +1235,4 @@ _0_to_1o8:
GLOBAL_LIBM_END(erfl)
libm_alias_ldouble_other (erf, erf)

View File

@ -677,6 +677,7 @@ GLOBAL_IEEE754_ENTRY(expm1l)
;;
GLOBAL_IEEE754_END(expm1l)
libm_alias_ldouble_other (__expm1, expm1)
GLOBAL_IEEE754_ENTRY(expl)
@ -1377,6 +1378,7 @@ EXP_64_UNSUPPORTED:
;;
GLOBAL_IEEE754_END(expl)
libm_alias_ldouble_other (__exp, exp)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue

View File

@ -80,3 +80,4 @@ GLOBAL_IEEE754_ENTRY(fabsl)
}
GLOBAL_IEEE754_END(fabsl)
libm_alias_ldouble_other (__fabs, fabs)

View File

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

View File

@ -213,3 +213,4 @@ FLOOR_UNORM:
;;
GLOBAL_IEEE754_END(floorl)
libm_alias_ldouble_other (__floor, floor)

View File

@ -69,3 +69,4 @@ GLOBAL_LIBM_ENTRY(fmal)
;;
GLOBAL_LIBM_END(fmal)
libm_alias_ldouble_other (fma, fma)

View File

@ -112,3 +112,4 @@ GLOBAL_LIBM_ENTRY(fmaxl)
;;
GLOBAL_LIBM_END(fmaxl)
libm_alias_ldouble_other (fmax, fmax)

View File

@ -65,3 +65,4 @@ long double frexpl(long double x, int *y)
#endif
}
libm_alias_ldouble_other (frexp, frexp)

View File

@ -59,3 +59,4 @@ long double ldexpl(long double x, int n)
#endif
}
libm_alias_ldouble_other (ldexp, ldexp)

View File

@ -1145,6 +1145,7 @@ LOG1P_LT_Minus_1:
GLOBAL_IEEE754_END(log1pl)
libm_alias_ldouble_other (__log1p, log1p)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue

View File

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

View File

@ -271,3 +271,4 @@ MODF_DENORM:
}
GLOBAL_LIBM_END(modfl)
libm_alias_ldouble_other (modf, modf)

View File

@ -215,4 +215,4 @@ RINT_NOT_ROUND_NEAREST:
;;
GLOBAL_LIBM_END(__nearbyintl)
weak_alias (__nearbyintl, nearbyintl)
libm_alias_ldouble (__nearbyint, nearbyint)

View File

@ -436,6 +436,7 @@ NEXT_OVERFLOW:
;;
GLOBAL_LIBM_END(nextafterl)
libm_alias_ldouble_other (nextafter, nextafter)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -227,3 +227,4 @@ RINT_NOT_ROUND_NEAREST:
;;
GLOBAL_IEEE754_END(rintl)
libm_alias_ldouble_other (__rint, rint)

View File

@ -231,3 +231,4 @@ ROUND_UNORM:
;;
GLOBAL_LIBM_END(roundl)
libm_alias_ldouble_other (round, round)

View File

@ -60,4 +60,4 @@ long double __scalbnl(long double x, int n)
}
weak_alias (__scalbnl, scalbnl)
libm_alias_ldouble (__scalbn, scalbn)

View File

@ -1342,3 +1342,4 @@ _0_to_1o8:
};;
GLOBAL_LIBM_END(tanhl)
libm_alias_ldouble_other (tanh, tanh)

View File

@ -3091,6 +3091,7 @@ TANL_UNSUPPORTED:
;;
GLOBAL_IEEE754_END(tanl)
libm_alias_ldouble_other (__tan, tan)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -164,3 +164,4 @@ TRUNC_UNORM:
;;
GLOBAL_LIBM_END(truncl)
libm_alias_ldouble_other (trunc, trunc)

View File

@ -68,6 +68,7 @@ long double LGFUNC (lgammal) (long double x)
compat_symbol (libm, __lgammal_compat, lgammal, LGAMMA_OLD_VER);
# else
versioned_symbol (libm, __ieee754_lgammal, lgammal, LGAMMA_NEW_VER);
libm_alias_ldouble_other (__ieee754_lgamma, lgamma)
# endif
# if GAMMA_ALIAS
strong_alias (LGFUNC (lgammal), __ieee754_gammal)

View File

@ -4426,6 +4426,7 @@ tgammal_underflow:
GLOBAL_LIBM_END(tgammal)
libm_alias_ldouble_other (tgamma, tgamma)