From bc4e8f9b49950c982f22d4f4c602a972a63abf65 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 28 Nov 2017 18:15:44 +0000 Subject: Use libm_alias_double for i386. Continuing the preparation for additional _FloatN / _FloatNx function aliases, this patch makes i386 libm function implementations use libm_alias_double to define function aliases. Tested with build-many-glibcs.py for all its i386 configurations that installed stripped shared libraries are unchanged by the patch, as well as running the full glibc testsuite for i686. * sysdeps/i386/fpu/s_asinh.S: Include . (asinh): Define using libm_alias_double. * sysdeps/i386/fpu/s_atan.S: Include . (atan): Define using libm_alias_double. * sysdeps/i386/fpu/s_cbrt.S: Include . (cbrt): Define using libm_alias_double. * sysdeps/i386/fpu/s_ceil.S: Include . (ceil): Define using libm_alias_double. * sysdeps/i386/fpu/s_copysign.S: Include . (copysign): Define using libm_alias_double. * sysdeps/i386/fpu/s_expm1.S: Include . (expm1): Define using libm_alias_double. * sysdeps/i386/fpu/s_fabs.S: Include . (fabs): Define using libm_alias_double. * sysdeps/i386/fpu/s_fdim.c: Include . (fdim): Define using libm_alias_double. * sysdeps/i386/fpu/s_floor.S: Include . (floor): Define using libm_alias_double. * sysdeps/i386/fpu/s_fmax.S: Include . (fmax): Define using libm_alias_double. * sysdeps/i386/fpu/s_fmin.S: Include . (fmin): Define using libm_alias_double. * sysdeps/i386/fpu/s_frexp.S: Include . (frexp): Define using libm_alias_double. * sysdeps/i386/fpu/s_llrint.S: Include . (llrint): Define using libm_alias_double. * sysdeps/i386/fpu/s_logb.S: Include . (logb): Define using libm_alias_double. * sysdeps/i386/fpu/s_lrint.S: Include . (lrint): Define using libm_alias_double. * sysdeps/i386/fpu/s_nearbyint.S: Include . (nearbyint): Define using libm_alias_double. * sysdeps/i386/fpu/s_remquo.S: Include . (remquo): Define using libm_alias_double. * sysdeps/i386/fpu/s_rint.S: Include . (rint): Define using libm_alias_double. * sysdeps/i386/fpu/s_trunc.S: Include . (trunc): Define using libm_alias_double. * sysdeps/i386/i686/fpu/s_fmax.S: Include . (fmax): Define using libm_alias_double. * sysdeps/i386/i686/fpu/s_fmin.S: Include . (fmin): Define using libm_alias_double. * sysdeps/i386/i686/multiarch/s_fma.c: Include . (fma): Define using libm_alias_double. --- sysdeps/i386/fpu/s_asinh.S | 3 ++- sysdeps/i386/fpu/s_atan.S | 3 ++- sysdeps/i386/fpu/s_cbrt.S | 3 ++- sysdeps/i386/fpu/s_ceil.S | 3 ++- sysdeps/i386/fpu/s_copysign.S | 3 ++- sysdeps/i386/fpu/s_expm1.S | 3 ++- sysdeps/i386/fpu/s_fabs.S | 3 ++- sysdeps/i386/fpu/s_fdim.c | 7 ++----- sysdeps/i386/fpu/s_floor.S | 3 ++- sysdeps/i386/fpu/s_fmax.S | 3 ++- sysdeps/i386/fpu/s_fmin.S | 3 ++- sysdeps/i386/fpu/s_frexp.S | 3 ++- sysdeps/i386/fpu/s_llrint.S | 3 ++- sysdeps/i386/fpu/s_logb.S | 3 ++- sysdeps/i386/fpu/s_lrint.S | 3 ++- sysdeps/i386/fpu/s_nearbyint.S | 3 ++- sysdeps/i386/fpu/s_remquo.S | 3 ++- sysdeps/i386/fpu/s_rint.S | 3 ++- sysdeps/i386/fpu/s_trunc.S | 3 ++- 19 files changed, 38 insertions(+), 23 deletions(-) (limited to 'sysdeps/i386/fpu') diff --git a/sysdeps/i386/fpu/s_asinh.S b/sysdeps/i386/fpu/s_asinh.S index 1a60f7de2c..85fe5a16a7 100644 --- a/sysdeps/i386/fpu/s_asinh.S +++ b/sysdeps/i386/fpu/s_asinh.S @@ -18,6 +18,7 @@ . */ #include +#include .section .rodata @@ -136,4 +137,4 @@ ENTRY(__asinh) fchs 4: ret END(__asinh) -weak_alias (__asinh, asinh) +libm_alias_double (__asinh, asinh) diff --git a/sysdeps/i386/fpu/s_atan.S b/sysdeps/i386/fpu/s_atan.S index 644de78feb..0102281be9 100644 --- a/sysdeps/i386/fpu/s_atan.S +++ b/sysdeps/i386/fpu/s_atan.S @@ -5,6 +5,7 @@ #include #include +#include RCSID("$NetBSD: s_atan.S,v 1.4 1995/05/08 23:50:41 jtc Exp $") @@ -27,4 +28,4 @@ ENTRY(__atan) DBL_CHECK_FORCE_UFLOW ret END (__atan) -weak_alias (__atan, atan) +libm_alias_double (__atan, atan) diff --git a/sysdeps/i386/fpu/s_cbrt.S b/sysdeps/i386/fpu/s_cbrt.S index 7f01659eae..5d8b5d2b50 100644 --- a/sysdeps/i386/fpu/s_cbrt.S +++ b/sysdeps/i386/fpu/s_cbrt.S @@ -19,6 +19,7 @@ . */ #include +#include .section .rodata @@ -197,4 +198,4 @@ ENTRY(__cbrt) 1: fldl 4(%esp) ret END(__cbrt) -weak_alias (__cbrt, cbrt) +libm_alias_double (__cbrt, cbrt) diff --git a/sysdeps/i386/fpu/s_ceil.S b/sysdeps/i386/fpu/s_ceil.S index 1226bb2f87..9287ab0673 100644 --- a/sysdeps/i386/fpu/s_ceil.S +++ b/sysdeps/i386/fpu/s_ceil.S @@ -4,6 +4,7 @@ */ #include +#include RCSID("$NetBSD: s_ceil.S,v 1.4 1995/05/08 23:52:13 jtc Exp $") @@ -31,4 +32,4 @@ ENTRY(__ceil) cfi_adjust_cfa_offset (-32) ret END (__ceil) -weak_alias (__ceil, ceil) +libm_alias_double (__ceil, ceil) diff --git a/sysdeps/i386/fpu/s_copysign.S b/sysdeps/i386/fpu/s_copysign.S index 2520a94427..1434d407a7 100644 --- a/sysdeps/i386/fpu/s_copysign.S +++ b/sysdeps/i386/fpu/s_copysign.S @@ -4,6 +4,7 @@ */ #include +#include RCSID("$NetBSD: s_copysign.S,v 1.4 1995/05/08 23:53:02 jtc Exp $") @@ -17,4 +18,4 @@ ENTRY(__copysign) fldl 4(%esp) ret END (__copysign) -weak_alias (__copysign, copysign) +libm_alias_double (__copysign, copysign) diff --git a/sysdeps/i386/fpu/s_expm1.S b/sysdeps/i386/fpu/s_expm1.S index 59fded2d5a..09a006f7c1 100644 --- a/sysdeps/i386/fpu/s_expm1.S +++ b/sysdeps/i386/fpu/s_expm1.S @@ -24,6 +24,7 @@ #include #include #include +#include .section .rodata @@ -110,4 +111,4 @@ ENTRY(__expm1) fldl MO(minus1) // Set result to -1.0. 3: ret END(__expm1) -weak_alias (__expm1, expm1) +libm_alias_double (__expm1, expm1) diff --git a/sysdeps/i386/fpu/s_fabs.S b/sysdeps/i386/fpu/s_fabs.S index 23ae9dccb9..c623eb526c 100644 --- a/sysdeps/i386/fpu/s_fabs.S +++ b/sysdeps/i386/fpu/s_fabs.S @@ -1,4 +1,5 @@ #include +#include .text ENTRY(__fabs) @@ -6,4 +7,4 @@ ENTRY(__fabs) fabs ret END(__fabs) -weak_alias (__fabs, fabs) +libm_alias_double (__fabs, fabs) diff --git a/sysdeps/i386/fpu/s_fdim.c b/sysdeps/i386/fpu/s_fdim.c index 6243c62998..bb87398998 100644 --- a/sysdeps/i386/fpu/s_fdim.c +++ b/sysdeps/i386/fpu/s_fdim.c @@ -20,6 +20,7 @@ #include #include #include +#include double __fdim (double x, double y) @@ -43,8 +44,4 @@ __fdim (double x, double y) return r; } -weak_alias (__fdim, fdim) -#ifdef NO_LONG_DOUBLE -strong_alias (__fdim, __fdiml) -weak_alias (__fdim, fdiml) -#endif +libm_alias_double (__fdim, fdim) diff --git a/sysdeps/i386/fpu/s_floor.S b/sysdeps/i386/fpu/s_floor.S index ed837dae40..f3cd66e77f 100644 --- a/sysdeps/i386/fpu/s_floor.S +++ b/sysdeps/i386/fpu/s_floor.S @@ -4,6 +4,7 @@ */ #include +#include RCSID("$NetBSD: s_floor.S,v 1.4 1995/05/09 00:01:59 jtc Exp $") @@ -31,4 +32,4 @@ ENTRY(__floor) cfi_adjust_cfa_offset (-32) ret END (__floor) -weak_alias (__floor, floor) +libm_alias_double (__floor, floor) diff --git a/sysdeps/i386/fpu/s_fmax.S b/sysdeps/i386/fpu/s_fmax.S index 218dcef421..4e2e46c23f 100644 --- a/sysdeps/i386/fpu/s_fmax.S +++ b/sysdeps/i386/fpu/s_fmax.S @@ -18,6 +18,7 @@ . */ #include +#include .text ENTRY(__fmax) @@ -40,4 +41,4 @@ ENTRY(__fmax) ret END(__fmax) -weak_alias (__fmax, fmax) +libm_alias_double (__fmax, fmax) diff --git a/sysdeps/i386/fpu/s_fmin.S b/sysdeps/i386/fpu/s_fmin.S index a5bb0e06dd..4be59389e0 100644 --- a/sysdeps/i386/fpu/s_fmin.S +++ b/sysdeps/i386/fpu/s_fmin.S @@ -18,6 +18,7 @@ . */ #include +#include .text ENTRY(__fmin) @@ -40,4 +41,4 @@ ENTRY(__fmin) ret END(__fmin) -weak_alias (__fmin, fmin) +libm_alias_double (__fmin, fmin) diff --git a/sysdeps/i386/fpu/s_frexp.S b/sysdeps/i386/fpu/s_frexp.S index 104f733bf6..1c1c76c1c4 100644 --- a/sysdeps/i386/fpu/s_frexp.S +++ b/sysdeps/i386/fpu/s_frexp.S @@ -18,6 +18,7 @@ . */ #include +#include .section .rodata @@ -80,4 +81,4 @@ ENTRY (__frexp) ret END (__frexp) -weak_alias (__frexp, frexp) +libm_alias_double (__frexp, frexp) diff --git a/sysdeps/i386/fpu/s_llrint.S b/sysdeps/i386/fpu/s_llrint.S index a597183aab..13689e34a7 100644 --- a/sysdeps/i386/fpu/s_llrint.S +++ b/sysdeps/i386/fpu/s_llrint.S @@ -19,6 +19,7 @@ . */ #include +#include .text ENTRY(__llrint) @@ -33,4 +34,4 @@ ENTRY(__llrint) cfi_adjust_cfa_offset (-4) ret END(__llrint) -weak_alias (__llrint, llrint) +libm_alias_double (__llrint, llrint) diff --git a/sysdeps/i386/fpu/s_logb.S b/sysdeps/i386/fpu/s_logb.S index f78c091c8a..d4b3a4714f 100644 --- a/sysdeps/i386/fpu/s_logb.S +++ b/sysdeps/i386/fpu/s_logb.S @@ -4,6 +4,7 @@ */ #include +#include RCSID("$NetBSD: s_logb.S,v 1.4 1995/05/09 00:14:30 jtc Exp $") @@ -13,4 +14,4 @@ ENTRY(__logb) fstp %st ret END (__logb) -weak_alias (__logb, logb) +libm_alias_double (__logb, logb) diff --git a/sysdeps/i386/fpu/s_lrint.S b/sysdeps/i386/fpu/s_lrint.S index 79a374b399..dea7c12c58 100644 --- a/sysdeps/i386/fpu/s_lrint.S +++ b/sysdeps/i386/fpu/s_lrint.S @@ -19,6 +19,7 @@ . */ #include +#include .text ENTRY(__lrint) @@ -31,4 +32,4 @@ ENTRY(__lrint) cfi_adjust_cfa_offset (-4) ret END(__lrint) -weak_alias (__lrint, lrint) +libm_alias_double (__lrint, lrint) diff --git a/sysdeps/i386/fpu/s_nearbyint.S b/sysdeps/i386/fpu/s_nearbyint.S index f7b79b6ff2..11fb61b242 100644 --- a/sysdeps/i386/fpu/s_nearbyint.S +++ b/sysdeps/i386/fpu/s_nearbyint.S @@ -5,6 +5,7 @@ /* Adapted for use as nearbyint by Ulrich Drepper . */ #include +#include ENTRY(__nearbyint) fldl 4(%esp) @@ -17,4 +18,4 @@ ENTRY(__nearbyint) cfi_adjust_cfa_offset (-32) ret END (__nearbyint) -weak_alias (__nearbyint, nearbyint) +libm_alias_double (__nearbyint, nearbyint) diff --git a/sysdeps/i386/fpu/s_remquo.S b/sysdeps/i386/fpu/s_remquo.S index 341285db30..ac911727a8 100644 --- a/sysdeps/i386/fpu/s_remquo.S +++ b/sysdeps/i386/fpu/s_remquo.S @@ -5,6 +5,7 @@ */ #include +#include #define PARMS 4 /* no space for saved regs */ #define DVDND PARMS @@ -42,4 +43,4 @@ ENTRY (__remquo) ret END (__remquo) -weak_alias (__remquo, remquo) +libm_alias_double (__remquo, remquo) diff --git a/sysdeps/i386/fpu/s_rint.S b/sysdeps/i386/fpu/s_rint.S index be36c5f0ca..b4ab01940f 100644 --- a/sysdeps/i386/fpu/s_rint.S +++ b/sysdeps/i386/fpu/s_rint.S @@ -4,6 +4,7 @@ */ #include +#include RCSID("$NetBSD: s_rint.S,v 1.4 1995/05/09 00:16:08 jtc Exp $") @@ -12,4 +13,4 @@ ENTRY(__rint) frndint ret END (__rint) -weak_alias (__rint, rint) +libm_alias_double (__rint, rint) diff --git a/sysdeps/i386/fpu/s_trunc.S b/sysdeps/i386/fpu/s_trunc.S index e9a850b877..98b0fa1697 100644 --- a/sysdeps/i386/fpu/s_trunc.S +++ b/sysdeps/i386/fpu/s_trunc.S @@ -18,6 +18,7 @@ . */ #include +#include ENTRY(__trunc) fldl 4(%esp) @@ -34,4 +35,4 @@ ENTRY(__trunc) cfi_adjust_cfa_offset (-32) ret END(__trunc) -weak_alias (__trunc, trunc) +libm_alias_double (__trunc, trunc) -- cgit v1.2.1