mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 04:50:07 +00:00
Use libm_alias_double for alpha.
Continuing the preparation for additional _FloatN / _FloatNx function aliases, this patch makes alpha libm function implementations use libm_alias_double to define function aliases. This also simplifies the code because the compatibility for long double = double is handled by libm_alias_double instead of locally in each source file. Tested with build-many-glibcs.py for alpha-linux-gnu that installed stripped shared libraries are unchanged by the patch. * sysdeps/alpha/fpu/s_ceil.c: Include <libm-alias-double.h>. (ceil): Define using libm_alias_double. * sysdeps/alpha/fpu/s_copysign.c: Include <libm-alias-double.h>. (copysign): Define using libm_alias_double. * sysdeps/alpha/fpu/s_fabs.c: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/alpha/fpu/s_floor.c: Include <libm-alias-double.h>. (floor): Define using libm_alias_double. * sysdeps/alpha/fpu/s_fmax.S: Include <libm-alias-double.h>. (fmax): Define using libm_alias_double. * sysdeps/alpha/fpu/s_fmin.S: Include <libm-alias-double.h>. (fmin): Define using libm_alias_double. * sysdeps/alpha/fpu/s_lrint.c: Include <libm-alias-double.h>. (lrint): Define using libm_alias_double. (llrint): Likewise. * sysdeps/alpha/fpu/s_lround.c: Include <libm-alias-double.h>. (lround): Define using libm_alias_double. (llround): Likewise. * sysdeps/alpha/fpu/s_rint.c: Include <libm-alias-double.h>. (rint): Define using libm_alias_double. * sysdeps/alpha/fpu/s_trunc.c: Include <libm-alias-double.h>. (trunc): Define using libm_alias_double.
This commit is contained in:
parent
d812486444
commit
5de606387b
23
ChangeLog
23
ChangeLog
@ -1,5 +1,28 @@
|
|||||||
2017-11-28 Joseph Myers <joseph@codesourcery.com>
|
2017-11-28 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
* sysdeps/alpha/fpu/s_ceil.c: Include <libm-alias-double.h>.
|
||||||
|
(ceil): Define using libm_alias_double.
|
||||||
|
* sysdeps/alpha/fpu/s_copysign.c: Include <libm-alias-double.h>.
|
||||||
|
(copysign): Define using libm_alias_double.
|
||||||
|
* sysdeps/alpha/fpu/s_fabs.c: Include <libm-alias-double.h>.
|
||||||
|
(fabs): Define using libm_alias_double.
|
||||||
|
* sysdeps/alpha/fpu/s_floor.c: Include <libm-alias-double.h>.
|
||||||
|
(floor): Define using libm_alias_double.
|
||||||
|
* sysdeps/alpha/fpu/s_fmax.S: Include <libm-alias-double.h>.
|
||||||
|
(fmax): Define using libm_alias_double.
|
||||||
|
* sysdeps/alpha/fpu/s_fmin.S: Include <libm-alias-double.h>.
|
||||||
|
(fmin): Define using libm_alias_double.
|
||||||
|
* sysdeps/alpha/fpu/s_lrint.c: Include <libm-alias-double.h>.
|
||||||
|
(lrint): Define using libm_alias_double.
|
||||||
|
(llrint): Likewise.
|
||||||
|
* sysdeps/alpha/fpu/s_lround.c: Include <libm-alias-double.h>.
|
||||||
|
(lround): Define using libm_alias_double.
|
||||||
|
(llround): Likewise.
|
||||||
|
* sysdeps/alpha/fpu/s_rint.c: Include <libm-alias-double.h>.
|
||||||
|
(rint): Define using libm_alias_double.
|
||||||
|
* sysdeps/alpha/fpu/s_trunc.c: Include <libm-alias-double.h>.
|
||||||
|
(trunc): Define using libm_alias_double.
|
||||||
|
|
||||||
* sysdeps/ieee754/ldbl-opt/libm-alias-double.h
|
* sysdeps/ieee754/ldbl-opt/libm-alias-double.h
|
||||||
(libm_alias_double_r): Add semicolon after weak_alias call.
|
(libm_alias_double_r): Add semicolon after weak_alias call.
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
#include <libm-alias-double.h>
|
||||||
|
|
||||||
/* Use the -inf rounding mode conversion instructions to implement
|
/* Use the -inf rounding mode conversion instructions to implement
|
||||||
ceil, via something akin to -floor(-x). This is much faster than
|
ceil, via something akin to -floor(-x). This is much faster than
|
||||||
@ -46,11 +47,4 @@ __ceil (double x)
|
|||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
weak_alias (__ceil, ceil)
|
libm_alias_double (__ceil, ceil)
|
||||||
#ifdef NO_LONG_DOUBLE
|
|
||||||
strong_alias (__ceil, __ceill)
|
|
||||||
weak_alias (__ceil, ceill)
|
|
||||||
#endif
|
|
||||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
|
|
||||||
compat_symbol (libm, __ceil, ceill, GLIBC_2_0);
|
|
||||||
#endif
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
#include <libm-alias-double.h>
|
||||||
|
|
||||||
double
|
double
|
||||||
__copysign (double x, double y)
|
__copysign (double x, double y)
|
||||||
@ -25,15 +26,7 @@ __copysign (double x, double y)
|
|||||||
return __builtin_copysign (x, y);
|
return __builtin_copysign (x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
weak_alias (__copysign, copysign)
|
libm_alias_double (__copysign, copysign)
|
||||||
#ifdef NO_LONG_DOUBLE
|
#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
|
||||||
strong_alias (__copysign, __copysignl)
|
|
||||||
weak_alias (__copysign, copysignl)
|
|
||||||
#endif
|
|
||||||
#if IS_IN (libm)
|
|
||||||
# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
|
|
||||||
compat_symbol (libm, __copysign, copysignl, GLIBC_2_0);
|
|
||||||
# endif
|
|
||||||
#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
|
|
||||||
compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
|
compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
|
||||||
#endif
|
#endif
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
#include <libm-alias-double.h>
|
||||||
|
|
||||||
double
|
double
|
||||||
__fabs (double x)
|
__fabs (double x)
|
||||||
@ -25,11 +26,4 @@ __fabs (double x)
|
|||||||
return __builtin_fabs (x);
|
return __builtin_fabs (x);
|
||||||
}
|
}
|
||||||
|
|
||||||
weak_alias (__fabs, fabs)
|
libm_alias_double (__fabs, fabs)
|
||||||
#ifdef NO_LONG_DOUBLE
|
|
||||||
strong_alias (__fabs, __fabsl)
|
|
||||||
weak_alias (__fabs, fabsl)
|
|
||||||
#endif
|
|
||||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
|
|
||||||
compat_symbol (libm, __fabs, fabsl, GLIBC_2_0);
|
|
||||||
#endif
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
#include <libm-alias-double.h>
|
||||||
|
|
||||||
|
|
||||||
/* Use the -inf rounding mode conversion instructions to implement
|
/* Use the -inf rounding mode conversion instructions to implement
|
||||||
@ -47,11 +48,4 @@ __floor (double x)
|
|||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
weak_alias (__floor, floor)
|
libm_alias_double (__floor, floor)
|
||||||
#ifdef NO_LONG_DOUBLE
|
|
||||||
strong_alias (__floor, __floorl)
|
|
||||||
weak_alias (__floor, floorl)
|
|
||||||
#endif
|
|
||||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
|
|
||||||
compat_symbol (libm, __floor, floorl, GLIBC_2_0);
|
|
||||||
#endif
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
#include <libm-alias-double.h>
|
||||||
|
|
||||||
.set noat
|
.set noat
|
||||||
.set noreorder
|
.set noreorder
|
||||||
@ -47,11 +48,4 @@ END (__fmax)
|
|||||||
strong_alias (__fmax, __fmaxf)
|
strong_alias (__fmax, __fmaxf)
|
||||||
weak_alias (__fmaxf, fmaxf)
|
weak_alias (__fmaxf, fmaxf)
|
||||||
|
|
||||||
weak_alias (__fmax, fmax)
|
libm_alias_double (__fmax, fmax)
|
||||||
#ifdef NO_LONG_DOUBLE
|
|
||||||
strong_alias (__fmax, __fmaxl)
|
|
||||||
weak_alias (__fmaxl, fmaxl)
|
|
||||||
#endif
|
|
||||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
|
|
||||||
compat_symbol (libm, __fmax, fmaxl, GLIBC_2_1);
|
|
||||||
#endif
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
#include <libm-alias-double.h>
|
||||||
|
|
||||||
.set noat
|
.set noat
|
||||||
.set noreorder
|
.set noreorder
|
||||||
@ -47,11 +48,4 @@ END (__fmin)
|
|||||||
strong_alias (__fmin, __fminf)
|
strong_alias (__fmin, __fminf)
|
||||||
weak_alias (__fminf, fminf)
|
weak_alias (__fminf, fminf)
|
||||||
|
|
||||||
weak_alias (__fmin, fmin)
|
libm_alias_double (__fmin, fmin)
|
||||||
#ifdef NO_LONG_DOUBLE
|
|
||||||
strong_alias (__fmin, __fminl)
|
|
||||||
weak_alias (__fminl, fminl)
|
|
||||||
#endif
|
|
||||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
|
|
||||||
compat_symbol (libm, __fmin, fminl, GLIBC_2_1);
|
|
||||||
#endif
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#define llrint not_llrint
|
#define llrint not_llrint
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
#include <libm-alias-double.h>
|
||||||
#undef __llrint
|
#undef __llrint
|
||||||
#undef llrint
|
#undef llrint
|
||||||
|
|
||||||
@ -33,15 +34,5 @@ __lrint (double x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
strong_alias (__lrint, __llrint)
|
strong_alias (__lrint, __llrint)
|
||||||
weak_alias (__lrint, lrint)
|
libm_alias_double (__lrint, lrint)
|
||||||
weak_alias (__llrint, llrint)
|
libm_alias_double (__llrint, llrint)
|
||||||
#ifdef NO_LONG_DOUBLE
|
|
||||||
strong_alias (__lrint, __lrintl)
|
|
||||||
strong_alias (__lrint, __llrintl)
|
|
||||||
weak_alias (__lrintl, lrintl)
|
|
||||||
weak_alias (__llrintl, llrintl)
|
|
||||||
#endif
|
|
||||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
|
|
||||||
compat_symbol (libm, __lrint, lrintl, GLIBC_2_1);
|
|
||||||
compat_symbol (libm, __llrint, llrintl, GLIBC_2_1);
|
|
||||||
#endif
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#define llround not_llround
|
#define llround not_llround
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
#include <libm-alias-double.h>
|
||||||
#undef __llround
|
#undef __llround
|
||||||
#undef llround
|
#undef llround
|
||||||
|
|
||||||
@ -33,15 +34,5 @@ __lround (double x)
|
|||||||
}
|
}
|
||||||
|
|
||||||
strong_alias (__lround, __llround)
|
strong_alias (__lround, __llround)
|
||||||
weak_alias (__lround, lround)
|
libm_alias_double (__lround, lround)
|
||||||
weak_alias (__llround, llround)
|
libm_alias_double (__llround, llround)
|
||||||
#ifdef NO_LONG_DOUBLE
|
|
||||||
strong_alias (__lround, __lroundl)
|
|
||||||
strong_alias (__lround, __llroundl)
|
|
||||||
weak_alias (__lroundl, lroundl)
|
|
||||||
weak_alias (__llroundl, llroundl)
|
|
||||||
#endif
|
|
||||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
|
|
||||||
compat_symbol (libm, __lround, lroundl, GLIBC_2_1);
|
|
||||||
compat_symbol (libm, __llround, llroundl, GLIBC_2_1);
|
|
||||||
#endif
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
#include <libm-alias-double.h>
|
||||||
|
|
||||||
|
|
||||||
double
|
double
|
||||||
@ -41,11 +42,4 @@ __rint (double x)
|
|||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
weak_alias (__rint, rint)
|
libm_alias_double (__rint, rint)
|
||||||
#ifdef NO_LONG_DOUBLE
|
|
||||||
strong_alias (__rint, __rintl)
|
|
||||||
weak_alias (__rint, rintl)
|
|
||||||
#endif
|
|
||||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
|
|
||||||
compat_symbol (libm, __rint, rintl, GLIBC_2_0);
|
|
||||||
#endif
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <math_ldbl_opt.h>
|
#include <math_ldbl_opt.h>
|
||||||
|
#include <libm-alias-double.h>
|
||||||
|
|
||||||
|
|
||||||
/* Use the chopped rounding mode conversion instructions to implement trunc. */
|
/* Use the chopped rounding mode conversion instructions to implement trunc. */
|
||||||
@ -41,11 +42,4 @@ __trunc (double x)
|
|||||||
return copysign (r, x);
|
return copysign (r, x);
|
||||||
}
|
}
|
||||||
|
|
||||||
weak_alias (__trunc, trunc)
|
libm_alias_double (__trunc, trunc)
|
||||||
#ifdef NO_LONG_DOUBLE
|
|
||||||
strong_alias (__trunc, __truncl)
|
|
||||||
weak_alias (__trunc, truncl)
|
|
||||||
#endif
|
|
||||||
#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
|
|
||||||
compat_symbol (libm, __trunc, truncl, GLIBC_2_1);
|
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user