Use libm_alias_double for ia64.

Continuing the preparation for additional _FloatN / _FloatNx function
aliases, this patch makes ia64 libm function implementations use
libm_alias_double to define function aliases.  The same approach is
followed as with the corresponding long double patch: the
ia64-specific macros are left unchanged, with calls to
libm_alias_double_other being added in most cases and
libm_alias_double 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-double.h>.
	* sysdeps/ia64/fpu/e_acos.S (acos): Use libm_alias_double_other.
	* sysdeps/ia64/fpu/e_acosh.S (acosh): Likewise.
	* sysdeps/ia64/fpu/e_asin.S (asin): Likewise.
	* sysdeps/ia64/fpu/e_atan2.S (atan2): Likewise.
	* sysdeps/ia64/fpu/e_atanh.S (atanh): Likewise.
	* sysdeps/ia64/fpu/e_cosh.S (cosh): Likewise.
	* sysdeps/ia64/fpu/e_exp.S (exp): Likewise.
	* sysdeps/ia64/fpu/e_exp10.S (exp10): Likewise.
	* sysdeps/ia64/fpu/e_exp2.S (exp2): Likewise.
	* sysdeps/ia64/fpu/e_fmod.S (fmod): Likewise.
	* sysdeps/ia64/fpu/e_hypot.S (hypot): Likewise.
	* sysdeps/ia64/fpu/e_lgamma_r.c (lgamma_r): Define using
	libm_alias_double_r.
	* sysdeps/ia64/fpu/e_log.S (log10): Use libm_alias_double_other.
	(log): Likewise.
	* sysdeps/ia64/fpu/e_log2.S (log2): Likewise.
	* sysdeps/ia64/fpu/e_pow.S (pow): Likewise.
	* sysdeps/ia64/fpu/e_remainder.S (remainder): Likewise.
	* sysdeps/ia64/fpu/e_sinh.S (sinh): Likewise.
	* sysdeps/ia64/fpu/e_sqrt.S (sqrt): Likewise.
	* sysdeps/ia64/fpu/libm_sincos.S (sincos): Likewise.
	* sysdeps/ia64/fpu/s_asinh.S (asinh): Likewise.
	* sysdeps/ia64/fpu/s_atan.S (atan): Likewise.
	* sysdeps/ia64/fpu/s_cbrt.S (cbrt): Likewise.
	* sysdeps/ia64/fpu/s_ceil.S (ceil): Likewise.
	* sysdeps/ia64/fpu/s_copysign.S (copysign): Define using
	libm_alias_double.
	* sysdeps/ia64/fpu/s_cos.S (sin): Use libm_alias_double_other.
	(cos): Likewise.
	* sysdeps/ia64/fpu/s_erf.S (erf): Likewise.
	* sysdeps/ia64/fpu/s_erfc.S (erfc): Likewise.
	* sysdeps/ia64/fpu/s_expm1.S (expm1): Likewise.
	* sysdeps/ia64/fpu/s_fabs.S (fabs): Likewise.
	* sysdeps/ia64/fpu/s_fdim.S (fdim): Likewise.
	* sysdeps/ia64/fpu/s_floor.S (floor): Likewise.
	* sysdeps/ia64/fpu/s_fma.S (fma): Likewise.
	* sysdeps/ia64/fpu/s_fmax.S (fmax): Likewise.
	* sysdeps/ia64/fpu/s_frexp.c (frexp): Likewise.
	* sysdeps/ia64/fpu/s_ldexp.c (ldexp): Likewise.
	* sysdeps/ia64/fpu/s_log1p.S (log1p): Likewise.
	* sysdeps/ia64/fpu/s_logb.S (logb): Likewise.
	* sysdeps/ia64/fpu/s_modf.S (modf): Likewise.
	* sysdeps/ia64/fpu/s_nearbyint.S (nearbyint): Likewise.
	* sysdeps/ia64/fpu/s_nextafter.S (nextafter): Likewise.
	* sysdeps/ia64/fpu/s_rint.S (rint): Likewise.
	* sysdeps/ia64/fpu/s_round.S (round): Likewise.
	* sysdeps/ia64/fpu/s_scalbn.c (scalbn): Define using
	libm_alias_double.
	* sysdeps/ia64/fpu/s_tan.S (tan): Use libm_alias_double_other.
	* sysdeps/ia64/fpu/s_tanh.S (tanh): Likewise.
	* sysdeps/ia64/fpu/s_trunc.S (trunc): Likewise.
	* sysdeps/ia64/fpu/w_lgamma_main.c
	[BUILD_LGAMMA && !USE_AS_COMPAT] (lgamma): Likewise.
	* sysdeps/ia64/fpu/w_tgamma_compat.S (tgamma): Likewise.
This commit is contained in:
Joseph Myers 2017-11-29 01:23:23 +00:00
parent d5bfa34a53
commit 0609ec0a74
50 changed files with 109 additions and 3 deletions

View File

@ -1,3 +1,61 @@
2017-11-29 Joseph Myers <joseph@codesourcery.com>
* sysdeps/ia64/fpu/libm-symbols.h: Include <libm-alias-double.h>.
* sysdeps/ia64/fpu/e_acos.S (acos): Use libm_alias_double_other.
* sysdeps/ia64/fpu/e_acosh.S (acosh): Likewise.
* sysdeps/ia64/fpu/e_asin.S (asin): Likewise.
* sysdeps/ia64/fpu/e_atan2.S (atan2): Likewise.
* sysdeps/ia64/fpu/e_atanh.S (atanh): Likewise.
* sysdeps/ia64/fpu/e_cosh.S (cosh): Likewise.
* sysdeps/ia64/fpu/e_exp.S (exp): Likewise.
* sysdeps/ia64/fpu/e_exp10.S (exp10): Likewise.
* sysdeps/ia64/fpu/e_exp2.S (exp2): Likewise.
* sysdeps/ia64/fpu/e_fmod.S (fmod): Likewise.
* sysdeps/ia64/fpu/e_hypot.S (hypot): Likewise.
* sysdeps/ia64/fpu/e_lgamma_r.c (lgamma_r): Define using
libm_alias_double_r.
* sysdeps/ia64/fpu/e_log.S (log10): Use libm_alias_double_other.
(log): Likewise.
* sysdeps/ia64/fpu/e_log2.S (log2): Likewise.
* sysdeps/ia64/fpu/e_pow.S (pow): Likewise.
* sysdeps/ia64/fpu/e_remainder.S (remainder): Likewise.
* sysdeps/ia64/fpu/e_sinh.S (sinh): Likewise.
* sysdeps/ia64/fpu/e_sqrt.S (sqrt): Likewise.
* sysdeps/ia64/fpu/libm_sincos.S (sincos): Likewise.
* sysdeps/ia64/fpu/s_asinh.S (asinh): Likewise.
* sysdeps/ia64/fpu/s_atan.S (atan): Likewise.
* sysdeps/ia64/fpu/s_cbrt.S (cbrt): Likewise.
* sysdeps/ia64/fpu/s_ceil.S (ceil): Likewise.
* sysdeps/ia64/fpu/s_copysign.S (copysign): Define using
libm_alias_double.
* sysdeps/ia64/fpu/s_cos.S (sin): Use libm_alias_double_other.
(cos): Likewise.
* sysdeps/ia64/fpu/s_erf.S (erf): Likewise.
* sysdeps/ia64/fpu/s_erfc.S (erfc): Likewise.
* sysdeps/ia64/fpu/s_expm1.S (expm1): Likewise.
* sysdeps/ia64/fpu/s_fabs.S (fabs): Likewise.
* sysdeps/ia64/fpu/s_fdim.S (fdim): Likewise.
* sysdeps/ia64/fpu/s_floor.S (floor): Likewise.
* sysdeps/ia64/fpu/s_fma.S (fma): Likewise.
* sysdeps/ia64/fpu/s_fmax.S (fmax): Likewise.
* sysdeps/ia64/fpu/s_frexp.c (frexp): Likewise.
* sysdeps/ia64/fpu/s_ldexp.c (ldexp): Likewise.
* sysdeps/ia64/fpu/s_log1p.S (log1p): Likewise.
* sysdeps/ia64/fpu/s_logb.S (logb): Likewise.
* sysdeps/ia64/fpu/s_modf.S (modf): Likewise.
* sysdeps/ia64/fpu/s_nearbyint.S (nearbyint): Likewise.
* sysdeps/ia64/fpu/s_nextafter.S (nextafter): Likewise.
* sysdeps/ia64/fpu/s_rint.S (rint): Likewise.
* sysdeps/ia64/fpu/s_round.S (round): Likewise.
* sysdeps/ia64/fpu/s_scalbn.c (scalbn): Define using
libm_alias_double.
* sysdeps/ia64/fpu/s_tan.S (tan): Use libm_alias_double_other.
* sysdeps/ia64/fpu/s_tanh.S (tanh): Likewise.
* sysdeps/ia64/fpu/s_trunc.S (trunc): Likewise.
* sysdeps/ia64/fpu/w_lgamma_main.c
[BUILD_LGAMMA && !USE_AS_COMPAT] (lgamma): Likewise.
* sysdeps/ia64/fpu/w_tgamma_compat.S (tgamma): Likewise.
2017-11-28 John David Anglin <danglin@gcc.gnu.org>
* sysdeps/hppa/start.S (_start): Check PIC instead of SHARED. Load

View File

@ -822,6 +822,7 @@ acos_abs_gt_1:
}
;;
GLOBAL_LIBM_END(acos)
libm_alias_double_other (acos, acos)

View File

@ -1139,6 +1139,7 @@ ACOSH_LESS_ONE:
;;
GLOBAL_LIBM_END(acosh)
libm_alias_double_other (acosh, acosh)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -798,6 +798,7 @@ asin_abs_gt_1:
}
;;
GLOBAL_LIBM_END(asin)
libm_alias_double_other (asin, asin)

View File

@ -985,6 +985,7 @@ ATAN2_ERROR:
;;
}
GLOBAL_IEEE754_END(atan2)
libm_alias_double_other (__atan2, atan2)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -1008,6 +1008,7 @@ atanh_ge_one:
;;
GLOBAL_LIBM_END(atanh)
libm_alias_double_other (atanh, atanh)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -811,6 +811,7 @@ COSH_UNORM:
;;
GLOBAL_IEEE754_END(cosh)
libm_alias_double_other (__cosh, cosh)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -738,6 +738,7 @@ EXP_UNDERFLOW_ZERO:
;;
GLOBAL_IEEE754_END(exp)
libm_alias_double_other (__exp, exp)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -536,6 +536,7 @@ OUT_RANGE_exp10:
;;
GLOBAL_IEEE754_END(exp10)
libm_alias_double_other (__exp10, exp10)
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
compat_symbol (libm, exp10, pow10, GLIBC_2_2)
#endif

View File

@ -494,6 +494,7 @@ OUT_RANGE_exp2:
;;
GLOBAL_LIBM_END(exp2)
libm_alias_double_other (exp2, exp2)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -499,6 +499,7 @@ FMOD_Y_ZERO:
}
GLOBAL_IEEE754_END(fmod)
libm_alias_double_other (__fmod, fmod)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue

View File

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

View File

@ -60,7 +60,7 @@ double __ieee754_lgamma_r(double x, int* signgam)
{
return __libm_lgamma(x, signgam, sizeof(*signgam));
}
weak_alias (__ieee754_lgamma_r, lgamma_r)
libm_alias_double_r (__ieee754_lgamma, lgamma, _r)
#ifndef _LIBC
double __ieee754_gamma_r(double x, int* signgam)

View File

@ -1386,6 +1386,7 @@ GLOBAL_IEEE754_ENTRY(log10)
br.cond.sptk log_log10_common
};;
GLOBAL_IEEE754_END(log10)
libm_alias_double_other (__log10, log10)
GLOBAL_IEEE754_ENTRY(log)
@ -1668,6 +1669,7 @@ log_libm_err:
nop.i 0
};;
GLOBAL_IEEE754_END(log)
libm_alias_double_other (__log, log)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -654,6 +654,7 @@ SPECIAL_LOG2:
}
GLOBAL_LIBM_END(log2)
libm_alias_double_other (log2, log2)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -2234,6 +2234,7 @@ POW_OVER_UNDER_ERROR:
;;
GLOBAL_LIBM_END(pow)
libm_alias_double_other (pow, pow)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -529,6 +529,7 @@ EXP_ERROR_RETURN:
}
GLOBAL_IEEE754_END(remainder)
libm_alias_double_other (__remainder, remainder)
weak_alias (__remainder, drem)

View File

@ -850,6 +850,7 @@ SINH_UNORM:
;;
GLOBAL_IEEE754_END(sinh)
libm_alias_double_other (__sinh, sinh)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

@ -252,6 +252,7 @@ GLOBAL_IEEE754_ENTRY(sqrt)
}
// END DOUBLE PRECISION MINIMUM LATENCY SQUARE ROOT ALGORITHM
GLOBAL_IEEE754_END(sqrt)
libm_alias_double_other (__sqrt, sqrt)
// Stack operations when calling error support.
// (1) (2) (3) (call) (4)

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-double.h>
# include <libm-alias-ldouble.h>
/* Support for compatible assembler handling. */

View File

@ -425,6 +425,7 @@ GLOBAL_IEEE754_ENTRY(sincos)
br.cond.sptk _CIS_COMMON
};;
GLOBAL_IEEE754_END(sincos)
libm_alias_double_other (__sincos, sincos)
GLOBAL_LIBM_ENTRY(__libm_sincos)
// cis_GR_sig_inv_pi_by_16 = significand of 16/pi

View File

@ -1135,3 +1135,4 @@ ASINH_UNORM:
;;
GLOBAL_LIBM_END(asinh)
libm_alias_double_other (asinh, asinh)

View File

@ -751,3 +751,4 @@ GLOBAL_LIBM_ENTRY(atan)
}
GLOBAL_LIBM_END(atan)
libm_alias_double_other (atan, atan)

View File

@ -765,3 +765,4 @@ GLOBAL_LIBM_ENTRY(cbrt)
GLOBAL_LIBM_END(cbrt)
libm_alias_double_other (cbrt, cbrt)

View File

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

View File

@ -32,6 +32,6 @@ strong_alias (__copysign, __libm_copysign)
strong_alias (__copysign, __libm_copysignf)
strong_alias (__copysign, __libm_copysignl)
weak_alias (__copysign, copysign)
libm_alias_double (__copysign, copysign)
weak_alias (__copysignf, copysignf)
libm_alias_ldouble (__copysign, copysign)

View File

@ -420,6 +420,7 @@ GLOBAL_IEEE754_ENTRY(sin)
;;
GLOBAL_IEEE754_END(sin)
libm_alias_double_other (__sin, sin)
GLOBAL_IEEE754_ENTRY(cos)
@ -707,6 +708,7 @@ _SINCOS_UNORM:
};;
GLOBAL_IEEE754_END(cos)
libm_alias_double_other (__cos, cos)
//////////// x >= 2^27 - large arguments routine call ////////////
LOCAL_LIBM_ENTRY(__libm_callout_sincos)

View File

@ -922,3 +922,4 @@ erf_denormal:
;;
GLOBAL_LIBM_END(erf)
libm_alias_double_other (erf, erf)

View File

@ -1136,6 +1136,7 @@ GLOBAL_LIBM_ENTRY(erfc)
};;
GLOBAL_LIBM_END(erfc)
libm_alias_double_other (erfc, erfc)
// call via (p15) br.cond.spnt __libm_error_region
// for x > ARG_ASYMP = 28.0

View File

@ -831,6 +831,7 @@ EXPM1_CERTAIN_MINUS_ONE:
;;
GLOBAL_IEEE754_END(expm1)
libm_alias_double_other (__expm1, expm1)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

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

View File

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

View File

@ -214,3 +214,4 @@ FLOOR_UNORM:
;;
GLOBAL_IEEE754_END(floor)
libm_alias_double_other (__floor, floor)

View File

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

View File

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

View File

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

View File

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

View File

@ -1047,6 +1047,7 @@ log_libm_err:
;;
GLOBAL_IEEE754_END(log1p)
libm_alias_double_other (__log1p, log1p)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

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

View File

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

View File

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

View File

@ -431,6 +431,7 @@ NEXT_OVERFLOW:
;;
GLOBAL_LIBM_END(nextafter)
libm_alias_double_other (nextafter, nextafter)
LOCAL_LIBM_ENTRY(__libm_error_region)

View File

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

View File

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

View File

@ -60,4 +60,4 @@ double __scalbn(double x, int n)
}
weak_alias (__scalbn, scalbn)
libm_alias_double (__scalbn, scalbn)

View File

@ -737,6 +737,7 @@ COMMON_PATH:
br.ret.sptk b0 ;;
}
GLOBAL_IEEE754_END(tan)
libm_alias_double_other (__tan, tan)
LOCAL_LIBM_ENTRY(__libm_callout)

View File

@ -982,3 +982,4 @@ _tanh_spec:
};;
GLOBAL_LIBM_END(tanh)
libm_alias_double_other (tanh, tanh)

View File

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

View File

@ -69,6 +69,7 @@ double LGFUNC (lgamma) (double x)
compat_symbol (libm, __lgamma_compat, lgamma, LGAMMA_OLD_VER);
# else
versioned_symbol (libm, __ieee754_lgamma, lgamma, LGAMMA_NEW_VER);
libm_alias_double_other (__ieee754_lgamma, lgamma)
# endif
# if GAMMA_ALIAS
strong_alias (LGFUNC (lgamma), __ieee754_gamma)

View File

@ -1781,6 +1781,7 @@ tgamma_libm_err:
};;
GLOBAL_LIBM_END(tgamma)
libm_alias_double_other (tgamma, tgamma)
LOCAL_LIBM_ENTRY(__libm_error_region)
.prologue