Use libm_alias_ldouble in sysdeps/i386/fpu.

This patch continues the preparation for additional _FloatN / _FloatNx
function aliases by using libm_alias_ldouble for sysdeps/i386/fpu long
double functions, so that they can have _Float64x aliases added in
future.

Tested for x86_64 (which includes some of these implementations) and
x86, including build-many-glibcs.py tests that installed stripped
shared libraries are unchanged by the patch.

	* sysdeps/i386/fpu/e_expl.S: Include <libm-alias-ldouble.h>.
	[USE_AS_EXPM1L] (expm1l): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_asinhl.S: Include <libm-alias-ldouble.h>.
	(asinhl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_atanl.c: Include <libm-alias-ldouble.h>.
	(atanl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_cbrtl.S: Include <libm-alias-ldouble.h>.
	(cbrtl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_ceill.S: Include <libm-alias-ldouble.h>.
	(ceill): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_copysignl.S: Include <libm-alias-ldouble.h>.
	(copysignl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_fabsl.S: Include <libm-alias-ldouble.h>.
	(fabsl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_floorl.S: Include <libm-alias-ldouble.h>.
	(floorl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_fmaxl.S: Include <libm-alias-ldouble.h>.
	(fmaxl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_fminl.S: Include <libm-alias-ldouble.h>.
	(fminl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_frexpl.S: Include <libm-alias-ldouble.h>.
	(frexpl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_llrintl.S: Include <libm-alias-ldouble.h>.
	(llrintl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_logbl.c: Include <libm-alias-ldouble.h>.
	(logbl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_lrintl.S: Include <libm-alias-ldouble.h>.
	(lrintl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_nearbyintl.S: Include <libm-alias-ldouble.h>.
	(nearbyintl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_nextafterl.c: Include <libm-alias-ldouble.h>.
	(nextafterl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_remquol.S: Include <libm-alias-ldouble.h>.
	(remquol): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_rintl.c: Include <libm-alias-ldouble.h>.
	(rintl): Define using libm_alias_ldouble.
	* sysdeps/i386/fpu/s_truncl.S: Include <libm-alias-ldouble.h>.
	(truncl): Define using libm_alias_ldouble.
	* sysdeps/i386/i686/fpu/s_fmaxl.S: Include <libm-alias-ldouble.h>.
	(fmaxl): Define using libm_alias_ldouble.
	* sysdeps/i386/i686/fpu/s_fminl.S: Include <libm-alias-ldouble.h>.
	(fminl): Define using libm_alias_ldouble.
This commit is contained in:
Joseph Myers 2017-11-17 22:54:39 +00:00
parent 015c6dc288
commit 2ce30701e6
22 changed files with 85 additions and 21 deletions

View File

@ -1,5 +1,48 @@
2017-11-17 Joseph Myers <joseph@codesourcery.com> 2017-11-17 Joseph Myers <joseph@codesourcery.com>
* sysdeps/i386/fpu/e_expl.S: Include <libm-alias-ldouble.h>.
[USE_AS_EXPM1L] (expm1l): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_asinhl.S: Include <libm-alias-ldouble.h>.
(asinhl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_atanl.c: Include <libm-alias-ldouble.h>.
(atanl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_cbrtl.S: Include <libm-alias-ldouble.h>.
(cbrtl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_ceill.S: Include <libm-alias-ldouble.h>.
(ceill): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_copysignl.S: Include <libm-alias-ldouble.h>.
(copysignl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_fabsl.S: Include <libm-alias-ldouble.h>.
(fabsl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_floorl.S: Include <libm-alias-ldouble.h>.
(floorl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_fmaxl.S: Include <libm-alias-ldouble.h>.
(fmaxl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_fminl.S: Include <libm-alias-ldouble.h>.
(fminl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_frexpl.S: Include <libm-alias-ldouble.h>.
(frexpl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_llrintl.S: Include <libm-alias-ldouble.h>.
(llrintl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_logbl.c: Include <libm-alias-ldouble.h>.
(logbl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_lrintl.S: Include <libm-alias-ldouble.h>.
(lrintl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_nearbyintl.S: Include <libm-alias-ldouble.h>.
(nearbyintl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_nextafterl.c: Include <libm-alias-ldouble.h>.
(nextafterl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_remquol.S: Include <libm-alias-ldouble.h>.
(remquol): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_rintl.c: Include <libm-alias-ldouble.h>.
(rintl): Define using libm_alias_ldouble.
* sysdeps/i386/fpu/s_truncl.S: Include <libm-alias-ldouble.h>.
(truncl): Define using libm_alias_ldouble.
* sysdeps/i386/i686/fpu/s_fmaxl.S: Include <libm-alias-ldouble.h>.
(fmaxl): Define using libm_alias_ldouble.
* sysdeps/i386/i686/fpu/s_fminl.S: Include <libm-alias-ldouble.h>.
(fminl): Define using libm_alias_ldouble.
* bits/floatn-common.h [!__ASSEMBLER]: Disable everything related * bits/floatn-common.h [!__ASSEMBLER]: Disable everything related
to C syntax instead of availability and properties of types. to C syntax instead of availability and properties of types.
* bits/floatn.h [!__ASSEMBLER]: Likewise. * bits/floatn.h [!__ASSEMBLER]: Likewise.

View File

@ -22,6 +22,7 @@
* -- moshier@na-net.ornl.gov * -- moshier@na-net.ornl.gov
*/ */
#include <libm-alias-ldouble.h>
#include <machine/asm.h> #include <machine/asm.h>
#include <i386-math-asm.h> #include <i386-math-asm.h>
@ -220,7 +221,7 @@ ENTRY(IEEE754_EXPL)
END(IEEE754_EXPL) END(IEEE754_EXPL)
#ifdef USE_AS_EXPM1L #ifdef USE_AS_EXPM1L
libm_hidden_def (__expm1l) libm_hidden_def (__expm1l)
weak_alias (__expm1l, expm1l) libm_alias_ldouble (__expm1, expm1)
#else #else
strong_alias (IEEE754_EXPL, EXPL_FINITE) strong_alias (IEEE754_EXPL, EXPL_FINITE)
#endif #endif

View File

@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include <libm-alias-ldouble.h>
#include <machine/asm.h> #include <machine/asm.h>
.section .rodata .section .rodata
@ -141,4 +142,4 @@ ENTRY(__asinhl)
fchs fchs
4: ret 4: ret
END(__asinhl) END(__asinhl)
weak_alias (__asinhl, asinhl) libm_alias_ldouble (__asinh, asinh)

View File

@ -6,6 +6,7 @@
*/ */
#include <math_private.h> #include <math_private.h>
#include <libm-alias-ldouble.h>
long double long double
__atanl (long double x) __atanl (long double x)
@ -19,4 +20,4 @@ __atanl (long double x)
return res; return res;
} }
weak_alias (__atanl, atanl) libm_alias_ldouble (__atan, atan)

View File

@ -18,6 +18,7 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include <libm-alias-ldouble.h>
#include <machine/asm.h> #include <machine/asm.h>
.section .rodata .section .rodata
@ -226,4 +227,4 @@ ENTRY(__cbrtl)
fadd %st fadd %st
ret ret
END(__cbrtl) END(__cbrtl)
weak_alias (__cbrtl, cbrtl) libm_alias_ldouble (__cbrt, cbrt)

View File

@ -4,6 +4,7 @@
* Public domain. * Public domain.
*/ */
#include <libm-alias-ldouble.h>
#include <machine/asm.h> #include <machine/asm.h>
RCSID("$NetBSD: $") RCSID("$NetBSD: $")
@ -37,4 +38,4 @@ ENTRY(__ceill)
cfi_adjust_cfa_offset (-32) cfi_adjust_cfa_offset (-32)
ret ret
END (__ceill) END (__ceill)
weak_alias (__ceill, ceill) libm_alias_ldouble (__ceil, ceil)

View File

@ -4,6 +4,7 @@
* Public domain. * Public domain.
*/ */
#include <libm-alias-ldouble.h>
#include <machine/asm.h> #include <machine/asm.h>
RCSID("$NetBSD: $") RCSID("$NetBSD: $")
@ -18,4 +19,4 @@ ENTRY(__copysignl)
fldt 4(%esp) fldt 4(%esp)
ret ret
END (__copysignl) END (__copysignl)
weak_alias (__copysignl, copysignl) libm_alias_ldouble (__copysign, copysign)

View File

@ -1,3 +1,4 @@
#include <libm-alias-ldouble.h>
#include <sysdep.h> #include <sysdep.h>
.text .text
@ -6,4 +7,4 @@ ENTRY(__fabsl)
fabs fabs
ret ret
END(__fabsl) END(__fabsl)
weak_alias (__fabsl, fabsl) libm_alias_ldouble (__fabs, fabs)

View File

@ -4,6 +4,7 @@
* Public domain. * Public domain.
*/ */
#include <libm-alias-ldouble.h>
#include <machine/asm.h> #include <machine/asm.h>
RCSID("$NetBSD: $") RCSID("$NetBSD: $")
@ -37,4 +38,4 @@ ENTRY(__floorl)
cfi_adjust_cfa_offset (-32) cfi_adjust_cfa_offset (-32)
ret ret
END (__floorl) END (__floorl)
weak_alias (__floorl, floorl) libm_alias_ldouble (__floor, floor)

View File

@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include <libm-alias-ldouble.h>
#include <sysdep.h> #include <sysdep.h>
.text .text
@ -68,4 +69,4 @@ ENTRY(__fmaxl)
faddp faddp
ret ret
END(__fmaxl) END(__fmaxl)
weak_alias (__fmaxl, fmaxl) libm_alias_ldouble (__fmax, fmax)

View File

@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include <libm-alias-ldouble.h>
#include <sysdep.h> #include <sysdep.h>
.text .text
@ -68,4 +69,4 @@ ENTRY(__fminl)
faddp faddp
ret ret
END(__fminl) END(__fminl)
weak_alias (__fminl, fminl) libm_alias_ldouble (__fmin, fmin)

View File

@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include <libm-alias-ldouble.h>
#include <machine/asm.h> #include <machine/asm.h>
.section .rodata .section .rodata
@ -89,4 +90,4 @@ ENTRY (__frexpl)
movl %ecx, (%eax) movl %ecx, (%eax)
ret ret
END (__frexpl) END (__frexpl)
weak_alias (__frexpl, frexpl) libm_alias_ldouble (__frexp, frexp)

View File

@ -18,6 +18,7 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include <libm-alias-ldouble.h>
#include <sysdep.h> #include <sysdep.h>
.text .text
@ -33,4 +34,4 @@ ENTRY(__llrintl)
cfi_adjust_cfa_offset (-4) cfi_adjust_cfa_offset (-4)
ret ret
END(__llrintl) END(__llrintl)
weak_alias (__llrintl, llrintl) libm_alias_ldouble (__llrint, llrint)

View File

@ -4,6 +4,7 @@
* Public domain. * Public domain.
*/ */
#include <libm-alias-ldouble.h>
#include <math_private.h> #include <math_private.h>
long double long double
@ -16,4 +17,4 @@ __logbl (long double x)
return res; return res;
} }
weak_alias (__logbl, logbl) libm_alias_ldouble (__logb, logb)

View File

@ -18,6 +18,7 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include <libm-alias-ldouble.h>
#include <sysdep.h> #include <sysdep.h>
.text .text
@ -31,4 +32,4 @@ ENTRY(__lrintl)
cfi_adjust_cfa_offset (-4) cfi_adjust_cfa_offset (-4)
ret ret
END(__lrintl) END(__lrintl)
weak_alias (__lrintl, lrintl) libm_alias_ldouble (__lrint, lrint)

View File

@ -4,6 +4,7 @@
*/ */
/* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */ /* Adapted for use as nearbyint by Ulrich Drepper <drepper@cygnus.com>. */
#include <libm-alias-ldouble.h>
#include <machine/asm.h> #include <machine/asm.h>
ENTRY(__nearbyintl) ENTRY(__nearbyintl)
@ -20,4 +21,4 @@ ENTRY(__nearbyintl)
cfi_adjust_cfa_offset (-32) cfi_adjust_cfa_offset (-32)
ret ret
END (__nearbyintl) END (__nearbyintl)
weak_alias (__nearbyintl, nearbyintl) libm_alias_ldouble (__nearbyint, nearbyint)

View File

@ -29,6 +29,7 @@ static char rcsid[] = "$NetBSD: $";
#include <errno.h> #include <errno.h>
#include <math.h> #include <math.h>
#include <math_private.h> #include <math_private.h>
#include <libm-alias-ldouble.h>
long double __nextafterl(long double x, long double y) long double __nextafterl(long double x, long double y)
{ {
@ -120,6 +121,6 @@ long double __nextafterl(long double x, long double y)
SET_LDOUBLE_WORDS(x,esx,hx,lx); SET_LDOUBLE_WORDS(x,esx,hx,lx);
return x; return x;
} }
weak_alias (__nextafterl, nextafterl) libm_alias_ldouble (__nextafter, nextafter)
strong_alias (__nextafterl, __nexttowardl) strong_alias (__nextafterl, __nexttowardl)
weak_alias (__nextafterl, nexttowardl) weak_alias (__nextafterl, nexttowardl)

View File

@ -4,6 +4,7 @@
* Public domain. * Public domain.
*/ */
#include <libm-alias-ldouble.h>
#include <machine/asm.h> #include <machine/asm.h>
#define PARMS 4 /* no space for saved regs */ #define PARMS 4 /* no space for saved regs */
@ -42,4 +43,4 @@ ENTRY (__remquol)
ret ret
END (__remquol) END (__remquol)
weak_alias (__remquol, remquol) libm_alias_ldouble (__remquo, remquo)

View File

@ -4,6 +4,7 @@
* Public domain. * Public domain.
*/ */
#include <libm-alias-ldouble.h>
#include <math_private.h> #include <math_private.h>
long double long double
@ -15,4 +16,4 @@ __rintl (long double x)
return res; return res;
} }
weak_alias (__rintl, rintl) libm_alias_ldouble (__rint, rint)

View File

@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include <libm-alias-ldouble.h>
#include <machine/asm.h> #include <machine/asm.h>
ENTRY(__truncl) ENTRY(__truncl)
@ -37,4 +38,4 @@ ENTRY(__truncl)
cfi_adjust_cfa_offset (-32) cfi_adjust_cfa_offset (-32)
ret ret
END(__truncl) END(__truncl)
weak_alias (__truncl, truncl) libm_alias_ldouble (__trunc, trunc)

View File

@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include <sysdep.h> #include <sysdep.h>
#include <libm-alias-ldouble.h>
.text .text
ENTRY(__fmaxl) ENTRY(__fmaxl)
@ -55,4 +56,4 @@ ENTRY(__fmaxl)
faddp faddp
ret ret
END(__fmaxl) END(__fmaxl)
weak_alias (__fmaxl, fmaxl) libm_alias_ldouble (__fmax, fmax)

View File

@ -17,6 +17,7 @@
License along with the GNU C Library; if not, see License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#include <libm-alias-ldouble.h>
#include <sysdep.h> #include <sysdep.h>
.text .text
@ -55,4 +56,4 @@ ENTRY(__fminl)
faddp faddp
ret ret
END(__fminl) END(__fminl)
weak_alias (__fminl, fminl) libm_alias_ldouble (__fmin, fmin)