mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 14:30:06 +00:00
Use libm_alias_double for x86_64.
Continuing the preparation for additional _FloatN / _FloatNx function aliases, this patch makes x86_64 libm function implementations use libm_alias_double to define function aliases. Tested with the glibc testsuite for x86_64, and tested with build-many-glibcs.py for all its x86_64 configurations that installed stripped shared libraries are unchanged by the patch. * sysdeps/x86_64/fpu/multiarch/s_atan.c: Include <libm-alias-double.h>. (atan): Define using libm_alias_double. * sysdeps/x86_64/fpu/multiarch/s_ceil.c: Include <libm-alias-double.h>. (ceil): Define using libm_alias_double. * sysdeps/x86_64/fpu/multiarch/s_floor.c: Include <libm-alias-double.h>. (floor): Define using libm_alias_double. * sysdeps/x86_64/fpu/multiarch/s_fma.c: Include <libm-alias-double.h>. (fma): Define using libm_alias_double. * sysdeps/x86_64/fpu/multiarch/s_nearbyint.c: Include <libm-alias-double.h>. (nearbyint): Define using libm_alias_double. * sysdeps/x86_64/fpu/multiarch/s_rint.c: Include <libm-alias-double.h>. (rint): Define using libm_alias_double. * sysdeps/x86_64/fpu/multiarch/s_sin.c: Include <libm-alias-double.h>. (sin): Define using libm_alias_double. (cos): Likewise. * sysdeps/x86_64/fpu/multiarch/s_tan.c: Include <libm-alias-double.h>. (tan): Define using libm_alias_double. * sysdeps/x86_64/fpu/multiarch/s_trunc.c: Include <libm-alias-double.h>. (trunc): Define using libm_alias_double. * sysdeps/x86_64/fpu/s_copysign.S: Include <libm-alias-double.h>. (copysign): Define using libm_alias_double. * sysdeps/x86_64/fpu/s_fabs.c: Include <libm-alias-double.h>. (fabs): Define using libm_alias_double. * sysdeps/x86_64/fpu/s_fmax.S: Include <libm-alias-double.h>. (fmax): Define using libm_alias_double. * sysdeps/x86_64/fpu/s_fmin.S: Include <libm-alias-double.h>. (fmin): Define using libm_alias_double. * sysdeps/x86_64/fpu/s_llrint.S: Include <libm-alias-double.h>. (llrint): Define using libm_alias_double. [!__ILP32__] (lrint): Likewise. * sysdeps/x86_64/x32/fpu/s_lrint.S: Include <libm-alias-double.h>. (lrint): Define using libm_alias_double.
This commit is contained in:
parent
21bfcc3d24
commit
011fba7e48
44
ChangeLog
44
ChangeLog
@ -1,3 +1,47 @@
|
||||
2017-11-29 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* sysdeps/x86_64/fpu/multiarch/s_atan.c: Include
|
||||
<libm-alias-double.h>.
|
||||
(atan): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/multiarch/s_ceil.c: Include
|
||||
<libm-alias-double.h>.
|
||||
(ceil): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/multiarch/s_floor.c: Include
|
||||
<libm-alias-double.h>.
|
||||
(floor): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/multiarch/s_fma.c: Include
|
||||
<libm-alias-double.h>.
|
||||
(fma): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/multiarch/s_nearbyint.c: Include
|
||||
<libm-alias-double.h>.
|
||||
(nearbyint): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/multiarch/s_rint.c: Include
|
||||
<libm-alias-double.h>.
|
||||
(rint): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/multiarch/s_sin.c: Include
|
||||
<libm-alias-double.h>.
|
||||
(sin): Define using libm_alias_double.
|
||||
(cos): Likewise.
|
||||
* sysdeps/x86_64/fpu/multiarch/s_tan.c: Include
|
||||
<libm-alias-double.h>.
|
||||
(tan): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/multiarch/s_trunc.c: Include
|
||||
<libm-alias-double.h>.
|
||||
(trunc): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/s_copysign.S: Include <libm-alias-double.h>.
|
||||
(copysign): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/s_fabs.c: Include <libm-alias-double.h>.
|
||||
(fabs): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/s_fmax.S: Include <libm-alias-double.h>.
|
||||
(fmax): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/s_fmin.S: Include <libm-alias-double.h>.
|
||||
(fmin): Define using libm_alias_double.
|
||||
* sysdeps/x86_64/fpu/s_llrint.S: Include <libm-alias-double.h>.
|
||||
(llrint): Define using libm_alias_double.
|
||||
[!__ILP32__] (lrint): Likewise.
|
||||
* sysdeps/x86_64/x32/fpu/s_lrint.S: Include <libm-alias-double.h>.
|
||||
(lrint): Define using libm_alias_double.
|
||||
|
||||
2017-11-29 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||
|
||||
* sysdeps/sparc/sparc64/fpu/multiarch/Makefile
|
||||
|
@ -16,13 +16,15 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
extern double __redirect_atan (double);
|
||||
|
||||
#define SYMBOL_NAME atan
|
||||
#include "ifunc-avx-fma4.h"
|
||||
|
||||
libc_ifunc_redirected (__redirect_atan, __atan, IFUNC_SELECTOR ());
|
||||
weak_alias (__atan, atan)
|
||||
libm_alias_double (__atan, atan)
|
||||
|
||||
#define __atan __atan_sse2
|
||||
#include <sysdeps/ieee754/dbl-64/s_atan.c>
|
||||
|
@ -16,6 +16,8 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
#define ceil __redirect_ceil
|
||||
#define __ceil __redirect___ceil
|
||||
#include <math.h>
|
||||
@ -26,4 +28,4 @@
|
||||
#include "ifunc-sse4_1.h"
|
||||
|
||||
libc_ifunc_redirected (__redirect_ceil, __ceil, IFUNC_SELECTOR ());
|
||||
weak_alias (__ceil, ceil)
|
||||
libm_alias_double (__ceil, ceil)
|
||||
|
@ -16,6 +16,8 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
#define floor __redirect_floor
|
||||
#define __floor __redirect___floor
|
||||
#include <math.h>
|
||||
@ -26,4 +28,4 @@
|
||||
#include "ifunc-sse4_1.h"
|
||||
|
||||
libc_ifunc_redirected (__redirect_floor, __floor, IFUNC_SELECTOR ());
|
||||
weak_alias (__floor, floor)
|
||||
libm_alias_double (__floor, floor)
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <config.h>
|
||||
#include <math.h>
|
||||
#include <init-arch.h>
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
extern double __fma_sse2 (double x, double y, double z) attribute_hidden;
|
||||
|
||||
@ -43,7 +44,7 @@ __fma_fma4 (double x, double y, double z)
|
||||
libm_ifunc (__fma, HAS_ARCH_FEATURE (FMA_Usable)
|
||||
? __fma_fma3 : (HAS_ARCH_FEATURE (FMA4_Usable)
|
||||
? __fma_fma4 : __fma_sse2));
|
||||
weak_alias (__fma, fma)
|
||||
libm_alias_double (__fma, fma)
|
||||
|
||||
#define __fma __fma_sse2
|
||||
|
||||
|
@ -16,6 +16,8 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
#define nearbyint __redirect_nearbyint
|
||||
#define __nearbyint __redirect___nearbyint
|
||||
#include <math.h>
|
||||
@ -27,4 +29,4 @@
|
||||
|
||||
libc_ifunc_redirected (__redirect_nearbyint, __nearbyint,
|
||||
IFUNC_SELECTOR ());
|
||||
weak_alias (__nearbyint, nearbyint)
|
||||
libm_alias_double (__nearbyint, nearbyint)
|
||||
|
@ -16,6 +16,8 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
#define rint __redirect_rint
|
||||
#define __rint __redirect___rint
|
||||
#include <math.h>
|
||||
@ -26,4 +28,4 @@
|
||||
#include "ifunc-sse4_1.h"
|
||||
|
||||
libc_ifunc_redirected (__redirect_rint, __rint, IFUNC_SELECTOR ());
|
||||
weak_alias (__rint, rint)
|
||||
libm_alias_double (__rint, rint)
|
||||
|
@ -16,6 +16,8 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
extern double __redirect_sin (double);
|
||||
extern double __redirect_cos (double);
|
||||
|
||||
@ -23,14 +25,14 @@ extern double __redirect_cos (double);
|
||||
#include "ifunc-avx-fma4.h"
|
||||
|
||||
libc_ifunc_redirected (__redirect_sin, __sin, IFUNC_SELECTOR ());
|
||||
weak_alias (__sin, sin)
|
||||
libm_alias_double (__sin, sin)
|
||||
|
||||
#undef SYMBOL_NAME
|
||||
#define SYMBOL_NAME cos
|
||||
#include "ifunc-avx-fma4.h"
|
||||
|
||||
libc_ifunc_redirected (__redirect_cos, __cos, IFUNC_SELECTOR ());
|
||||
weak_alias (__cos, cos)
|
||||
libm_alias_double (__cos, cos)
|
||||
|
||||
#define __cos __cos_sse2
|
||||
#define __sin __sin_sse2
|
||||
|
@ -16,13 +16,15 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
extern double __redirect_tan (double);
|
||||
|
||||
#define SYMBOL_NAME tan
|
||||
#include "ifunc-avx-fma4.h"
|
||||
|
||||
libc_ifunc_redirected (__redirect_tan, __tan, IFUNC_SELECTOR ());
|
||||
weak_alias (__tan, tan)
|
||||
libm_alias_double (__tan, tan)
|
||||
|
||||
#define __tan __tan_sse2
|
||||
#include <sysdeps/ieee754/dbl-64/s_tan.c>
|
||||
|
@ -16,6 +16,8 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
#define trunc __redirect_trunc
|
||||
#define __trunc __redirect___trunc
|
||||
#include <math.h>
|
||||
@ -26,4 +28,4 @@
|
||||
#include "ifunc-sse4_1.h"
|
||||
|
||||
libc_ifunc_redirected (__redirect_trunc, __trunc, IFUNC_SELECTOR ());
|
||||
weak_alias (__trunc, trunc)
|
||||
libm_alias_double (__trunc, trunc)
|
||||
|
@ -18,6 +18,7 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <machine/asm.h>
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
.section .rodata.cst16,"aM",@progbits,16
|
||||
|
||||
@ -47,4 +48,4 @@ ENTRY(__copysign)
|
||||
ret
|
||||
END (__copysign)
|
||||
|
||||
weak_alias (__copysign, copysign)
|
||||
libm_alias_double (__copysign, copysign)
|
||||
|
@ -17,10 +17,11 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <math.h>
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
double
|
||||
__fabs (double x)
|
||||
{
|
||||
return __builtin_fabs (x);
|
||||
}
|
||||
weak_alias (__fabs, fabs)
|
||||
libm_alias_double (__fabs, fabs)
|
||||
|
@ -18,6 +18,7 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
.text
|
||||
ENTRY(__fmax)
|
||||
@ -49,4 +50,4 @@ ENTRY(__fmax)
|
||||
|
||||
2: ret
|
||||
END(__fmax)
|
||||
weak_alias (__fmax, fmax)
|
||||
libm_alias_double (__fmax, fmax)
|
||||
|
@ -18,6 +18,7 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
.text
|
||||
ENTRY(__fmin)
|
||||
@ -49,4 +50,4 @@ ENTRY(__fmin)
|
||||
|
||||
2: ret
|
||||
END(__fmin)
|
||||
weak_alias (__fmin, fmin)
|
||||
libm_alias_double (__fmin, fmin)
|
||||
|
@ -19,14 +19,15 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
.text
|
||||
ENTRY(__llrint)
|
||||
cvtsd2si %xmm0,%rax
|
||||
ret
|
||||
END(__llrint)
|
||||
weak_alias (__llrint, llrint)
|
||||
libm_alias_double (__llrint, llrint)
|
||||
#ifndef __ILP32__
|
||||
strong_alias (__llrint, __lrint)
|
||||
weak_alias (__llrint, lrint)
|
||||
libm_alias_double (__llrint, lrint)
|
||||
#endif
|
||||
|
@ -18,10 +18,11 @@
|
||||
<http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <sysdep.h>
|
||||
#include <libm-alias-double.h>
|
||||
|
||||
.text
|
||||
ENTRY(__lrint)
|
||||
cvtsd2si %xmm0,%eax
|
||||
ret
|
||||
END(__lrint)
|
||||
weak_alias (__lrint, lrint)
|
||||
libm_alias_double (__lrint, lrint)
|
||||
|
Loading…
Reference in New Issue
Block a user