summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/fpu/multiarch
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc64/fpu/multiarch')
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile44
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-power8.S24
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-ppc64.c21
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c32
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot-power7.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot-ppc64.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot.c3
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf-power7.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf-ppc64.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf.c3
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-power5+.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-ppc64.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c13
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-power5+.S4
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-ppc64.S4
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-power6.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-ppc64.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c15
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysignf.c5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf-power8.S24
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf-ppc64.c24
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf.c32
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power7.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-ppc64.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c29
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef-ppc64.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c16
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-power5+.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-ppc64.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor.c13
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-power5+.S4
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-ppc64.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf.c5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power7.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-ppc64.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c31
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff-ppc64.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c16
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power5.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6x.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power7.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-ppc64.S16
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c41
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c27
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power6x.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power8.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-ppc64.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint.c21
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrintf.c47
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power5+.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power6x.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power8.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-ppc64.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround.c23
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llroundf-ppc64.S31
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_llroundf.c47
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-power7.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-ppc64.c7
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb.c14
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf-power7.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf-ppc64.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf.c5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl-power7.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl-ppc64.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf-power5+.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf-ppc64.c7
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c15
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff-power5+.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff-ppc64.c2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff.c5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-power5+.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-ppc64.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c13
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-power5+.S4
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-ppc64.S4
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf.c5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf-power8.S24
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf-ppc64.c24
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf.c32
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-power5+.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-ppc64.S5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c13
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-power5+.S4
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-ppc64.S4
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf.c5
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/w_expf.c1
92 files changed, 640 insertions, 335 deletions
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
index 0e3eac7190..73f2f69377 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
@@ -1,30 +1,35 @@
ifeq ($(subdir),math)
-sysdep_routines += s_isnan-power7 s_isnan-power6x s_isnan-power6 \
- s_isnan-power5 s_isnan-ppc64 s_copysign-power6 \
- s_copysign-ppc64 s_finite-power7 s_finite-ppc64 \
- s_finitef-ppc64 s_isinff-ppc64 s_isinf-power7 \
- s_isinf-ppc64 s_modf-power5+ s_modf-ppc64 \
- s_modff-power5+ s_modff-ppc64 s_isnan-power8 \
- s_isinf-power8 s_finite-power8
+# These functions are built both for libc and libm because they're required
+# by printf. While the libc objects have the prefix s_, the libm ones are
+# prefixed with m_.
+sysdep_calls := s_copysign-power6 s_copysign-ppc64 \
+ s_finite-power8 s_finite-power7 s_finite-ppc64 \
+ s_finitef-ppc64 \
+ s_isinf-power8 s_isinf-ppc64 \
+ s_isinff-ppc64 s_isinf-power7 \
+ s_isnan-power8 s_isnan-power7 s_isnan-power6x s_isnan-power6 \
+ s_isnan-power5 s_isnan-ppc64 \
+ s_modf-power5+ s_modf-ppc64 \
+ s_modff-power5+ s_modff-ppc64
-libm-sysdep_routines += s_isnan-power7 s_isnan-power6x s_isnan-power6 \
- s_isnan-power5 s_isnan-ppc64 s_llround-power6x \
+sysdep_routines += $(sysdep_calls)
+libm-sysdep_routines += s_llround-power6x \
s_llround-power5+ s_llround-ppc64 s_ceil-power5+ \
s_ceil-ppc64 s_ceilf-power5+ s_ceilf-ppc64 \
s_floor-power5+ s_floor-ppc64 s_floorf-power5+ \
s_floorf-ppc64 s_round-power5+ s_round-ppc64 \
s_roundf-power5+ s_roundf-ppc64 s_trunc-power5+ \
s_trunc-ppc64 s_truncf-power5+ s_truncf-ppc64 \
- s_copysign-power6 s_copysign-ppc64 s_llrint-power6x \
- s_llrint-ppc64 s_finite-power7 s_finite-ppc64 \
- s_finitef-ppc64 s_isinff-ppc64 s_isinf-power7 \
- s_isinf-ppc64 s_logb-power7 s_logbf-power7 \
+ s_llrint-power6x s_llrint-ppc64 \
+ s_logb-power7 s_logbf-power7 \
s_logbl-power7 s_logb-ppc64 s_logbf-ppc64 \
- s_logbl-ppc64 s_modf-power5+ s_modf-ppc64 \
- s_modff-power5+ s_modff-ppc64 e_hypot-ppc64 \
+ s_logbl-ppc64 e_hypot-ppc64 \
e_hypot-power7 e_hypotf-ppc64 e_hypotf-power7 \
- s_isnan-power8 s_isinf-power8 s_finite-power8 \
- s_llrint-power8 s_llround-power8
+ s_llrint-power8 s_llround-power8 s_llroundf-ppc64 \
+ e_expf-power8 e_expf-ppc64 \
+ s_sinf-ppc64 s_sinf-power8 \
+ s_cosf-ppc64 s_cosf-power8 \
+ $(sysdep_calls:s_%=m_%)
CFLAGS-s_logbf-power7.c = -mcpu=power7
CFLAGS-s_logbl-power7.c = -mcpu=power7
@@ -33,4 +38,9 @@ CFLAGS-s_modf-power5+.c = -mcpu=power5+
CFLAGS-s_modff-power5+.c = -mcpu=power5+
CFLAGS-e_hypot-power7.c = -mcpu=power7
CFLAGS-e_hypotf-power7.c = -mcpu=power7
+
+# These files quiet sNaNs in a way that is optimized away without
+# -fsignaling-nans.
+CFLAGS-s_modf-ppc64.c += -fsignaling-nans
+CFLAGS-s_modff-ppc64.c += -fsignaling-nans
endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-power8.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-power8.S
new file mode 100644
index 0000000000..c9dad4e132
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-power8.S
@@ -0,0 +1,24 @@
+/* __ieee754_expf() POWER8 version.
+ Copyright (C) 2016-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#undef strong_alias
+#define strong_alias(a, b)
+
+#define __ieee754_expf __ieee754_expf_power8
+
+#include <sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S>
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-ppc64.c
new file mode 100644
index 0000000000..8ab41a8ed4
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-ppc64.c
@@ -0,0 +1,21 @@
+/* __ieee_expf() PowerPC64 version.
+ Copyright (C) 2016-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define __expf __ieee754_expf_ppc64
+
+#include <sysdeps/ieee754/flt-32/e_expf.c>
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c
new file mode 100644
index 0000000000..f752514efa
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c
@@ -0,0 +1,32 @@
+/* Multiple versions of ieee754_expf.
+ Copyright (C) 2016-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <math_private.h>
+#include <math_ldbl_opt.h>
+#include "init-arch.h"
+
+extern __typeof (__ieee754_expf) __ieee754_expf_ppc64 attribute_hidden;
+extern __typeof (__ieee754_expf) __ieee754_expf_power8 attribute_hidden;
+
+libc_ifunc (__ieee754_expf,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __ieee754_expf_power8
+ : __ieee754_expf_ppc64);
+
+strong_alias (__ieee754_expf, __expf_finite)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot-power7.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot-power7.c
index d79ee7ba47..416ef50df6 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot-power7.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot-power7.c
@@ -1,5 +1,5 @@
/* __ieee_hypot() POWER7 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot-ppc64.c
index 8bbcfc3560..f469a24719 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot-ppc64.c
@@ -1,5 +1,5 @@
/* __ieee_hypot() PowerPC64 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot.c
index 30f91ef742..8d05c430cc 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypot.c
@@ -1,5 +1,5 @@
/* Multiple versions of ieee754_hypot.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <math_private.h>
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf-power7.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf-power7.c
index 572dfe6bfb..b40158fd29 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf-power7.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf-power7.c
@@ -1,5 +1,5 @@
/* __ieee_hypotf() POWER7 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf-ppc64.c
index 634bf85da6..54dbaee016 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf-ppc64.c
@@ -1,5 +1,5 @@
/* __ieee_hypot() PowerPC64 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf.c
index 7686b51e2b..9bef1fea3f 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_hypotf.c
@@ -1,5 +1,5 @@
/* Multiple versions of ieee754_hypot.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <math_private.h>
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-power5+.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-power5+.S
index be59f4bdb8..76651b694c 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-power5+.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-power5+.S
@@ -1,5 +1,5 @@
/* ceil function. PowerPC64/power5+ version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-ppc64.S
index b44d44af33..c75c66ba3b 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-ppc64.S
@@ -1,5 +1,5 @@
/* ceil function. PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c
index 3c20329eb0..5cde4eb46f 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c
@@ -1,5 +1,5 @@
/* Multiple versions of ceil.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-double.h>
extern __typeof (__ceil) __ceil_ppc64 attribute_hidden;
extern __typeof (__ceil) __ceil_power5plus attribute_hidden;
@@ -29,12 +30,4 @@ libc_ifunc (__ceil,
? __ceil_power5plus
: __ceil_ppc64);
-weak_alias (__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
+libm_alias_double (__ceil, ceil)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-power5+.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-power5+.S
index d9ad500d9c..b9c9e14fba 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-power5+.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-power5+.S
@@ -1,5 +1,5 @@
/* ceilf function. PowerPC64/power5+ version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-ppc64.S
index ba3a20f0ba..ce5cc49770 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-ppc64.S
@@ -1,5 +1,5 @@
/* ceilf function. PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c
index 4c366c8123..18697e52b3 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c
@@ -1,5 +1,5 @@
/* Multiple versions of ceilf.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-float.h>
extern __typeof (__ceilf) __ceilf_ppc64 attribute_hidden;
extern __typeof (__ceilf) __ceilf_power5plus attribute_hidden;
@@ -29,4 +30,4 @@ libc_ifunc (__ceilf,
? __ceilf_power5plus
: __ceilf_ppc64);
-weak_alias (__ceilf, ceilf)
+libm_alias_float (__ceil, ceil)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-power6.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-power6.S
index 9ee298a80e..3ce85ca822 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-power6.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-power6.S
@@ -1,5 +1,5 @@
/* copysign(). PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-ppc64.S
index c253657baa..97fad681e3 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign-ppc64.S
@@ -1,5 +1,5 @@
/* copysign(). PowerPC64 default version.
- Copyright (C) 2010-2016 Free Software Foundation, Inc.
+ Copyright (C) 2010-2018 Free Software Foundation, Inc.
Contributed by Luis Machado <luisgpm@br.ibm.com>.
This file is part of the GNU C Library.
@@ -17,8 +17,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c
index 91c123bc92..74ce097397 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysign.c
@@ -1,5 +1,5 @@
/* Multiple versions of copysign.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,6 +25,7 @@
#undef __copysign
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-double.h>
extern __typeof (__redirect_copysign) __copysign_ppc64 attribute_hidden;
extern __typeof (__redirect_copysign) __copysign_power6 attribute_hidden;
@@ -36,16 +37,8 @@ libc_ifunc (__libm_copysign,
: __copysign_ppc64);
strong_alias (__libm_copysign, __copysign)
-weak_alias (__copysign, copysign)
+libm_alias_double (__copysign, copysign)
-#ifdef NO_LONG_DOUBLE
-weak_alias (__copysign,copysignl)
-strong_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)
+#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
compat_symbol (libc, __copysign, copysignl, GLIBC_2_0);
#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysignf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysignf.c
index 84f22809d0..377a3f814c 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysignf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysignf.c
@@ -1,5 +1,5 @@
/* Multiple versions of copysignf.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,7 @@
#include <math.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-float.h>
/* It's safe to use double-precision implementation for single-precision. */
extern __typeof (__copysignf) __copysign_ppc64 attribute_hidden;
@@ -29,4 +30,4 @@ libc_ifunc (__copysignf,
? __copysign_power6
: __copysign_ppc64);
-weak_alias (__copysignf, copysignf)
+libm_alias_float (__copysign, copysign)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf-power8.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf-power8.S
new file mode 100644
index 0000000000..17adc90ad2
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf-power8.S
@@ -0,0 +1,24 @@
+/* cosf function. PowerPC64/power8 version.
+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#undef weak_alias
+#define weak_alias(a,b)
+
+#define __cosf __cosf_power8
+
+#include <sysdeps/powerpc/powerpc64/power8/fpu/s_cosf.S>
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf-ppc64.c
new file mode 100644
index 0000000000..34e0553b93
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf-ppc64.c
@@ -0,0 +1,24 @@
+/* cosf function. PowerPC64 default version.
+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#undef weak_alias
+#define weak_alias(a, b)
+
+#define __cosf __cosf_ppc64
+
+#include <sysdeps/powerpc/fpu/s_cosf.c>
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf.c
new file mode 100644
index 0000000000..cb12178791
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf.c
@@ -0,0 +1,32 @@
+/* Multiple versions of cosf.
+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <shlib-compat.h>
+#include "init-arch.h"
+#include <libm-alias-float.h>
+
+extern __typeof (__cosf) __cosf_ppc64 attribute_hidden;
+extern __typeof (__cosf) __cosf_power8 attribute_hidden;
+
+libc_ifunc (__cosf,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __cosf_power8
+ : __cosf_ppc64);
+
+libm_alias_float (__cos, cos)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power7.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power7.S
index c0a101feea..d3e9f606bd 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power7.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power7.S
@@ -1,5 +1,5 @@
/* isnan(). PowerPC64/POWER7 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef hidden_def
#define hidden_def(name)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S
index 44e0f6f944..7a200a5c1a 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-power8.S
@@ -1,5 +1,5 @@
/* isnan(). PowerPC64/POWER7 version.
- Copyright (C) 2014-2016 Free Software Foundation, Inc.
+ Copyright (C) 2014-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef hidden_def
#define hidden_def(name)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-ppc64.c
index e6d2029164..2a597fc38d 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite-ppc64.c
@@ -1,5 +1,5 @@
/* finite(). PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
Contributed by Luis Machado <luisgpm@br.ibm.com>.
This file is part of the GNU C Library.
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c
index 067edc2ea6..14c9ea7fef 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finite.c
@@ -1,5 +1,5 @@
/* Multiple versions of finite.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define __finite __redirect___finite
+
+/* The following definitions, although not related to the 'double'
+ version of 'finite', are required to guarantee macro expansions
+ (e.g.: from __finitef to __redirect_finitef) in include/math.h, thus
+ compensating for the unintended macro expansions in
+ math/bits/mathcalls-helper-functions.h. */
+#define __finitef __redirect___finitef
+#define __finitel __redirect___finitel
+#define __finitef128 __redirect___finitef128
+
#include <math.h>
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
@@ -24,13 +35,17 @@
extern __typeof (__finite) __finite_ppc64 attribute_hidden;
extern __typeof (__finite) __finite_power7 attribute_hidden;
extern __typeof (__finite) __finite_power8 attribute_hidden;
+#undef __finite
+#undef __finitef
+#undef __finitel
+#undef __finitef128
-libc_ifunc (__finite,
- (hwcap2 & PPC_FEATURE2_ARCH_2_07)
- ? __finite_power8 :
- (hwcap & PPC_FEATURE_ARCH_2_06)
- ? __finite_power7
- : __finite_ppc64);
+libc_ifunc_redirected (__redirect___finite, __finite,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __finite_power8
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __finite_power7
+ : __finite_ppc64);
weak_alias (__finite, finite)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef-ppc64.c
index e010880f46..0df571cd2e 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef-ppc64.c
@@ -1,5 +1,5 @@
/* finitef(). PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
Contributed by Luis Machado <luisgpm@br.ibm.com>.
This file is part of the GNU C Library.
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c
index e0b4686ced..d2ffdeeb41 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_finitef.c
@@ -1,5 +1,5 @@
/* Multiple versions of finitef.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define __finitef __redirect___finitef
#include <math.h>
#include <shlib-compat.h>
#include "init-arch.h"
@@ -24,12 +25,13 @@ extern __typeof (__finitef) __finitef_ppc64 attribute_hidden;
/* The double-precision version also works for single-precision. */
extern __typeof (__finitef) __finite_power7 attribute_hidden;
extern __typeof (__finitef) __finite_power8 attribute_hidden;
+#undef __finitef
-libc_ifunc (__finitef,
- (hwcap2 & PPC_FEATURE2_ARCH_2_07)
- ? __finite_power8 :
- (hwcap & PPC_FEATURE_ARCH_2_06)
- ? __finite_power7
- : __finitef_ppc64);
+libc_ifunc_redirected (__redirect___finitef, __finitef,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __finite_power8
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __finite_power7
+ : __finitef_ppc64);
weak_alias (__finitef, finitef)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-power5+.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-power5+.S
index a93f3d9183..0c4c97f7a6 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-power5+.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-power5+.S
@@ -1,5 +1,5 @@
/* floor function. PowerPC64/power5+ version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-ppc64.S
index 89be2a5bee..97ec94d733 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor-ppc64.S
@@ -1,5 +1,5 @@
/* floor function. PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor.c
index 6a743fd7ee..d1a21a1d12 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floor.c
@@ -1,5 +1,5 @@
/* Multiple versions of floor.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-double.h>
extern __typeof (__floor) __floor_ppc64 attribute_hidden;
extern __typeof (__floor) __floor_power5plus attribute_hidden;
@@ -29,12 +30,4 @@ libc_ifunc (__floor,
? __floor_power5plus
: __floor_ppc64);
-weak_alias (__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
+libm_alias_double (__floor, floor)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-power5+.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-power5+.S
index 87b9e3caa2..10676569c3 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-power5+.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-power5+.S
@@ -1,5 +1,5 @@
/* floorf function. PowerPC64/power5+ version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-ppc64.S
index f97492d2ef..b207f0cad2 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf-ppc64.S
@@ -1,5 +1,5 @@
/* floorf function. PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,9 +16,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
-
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf.c
index 2ee2048f98..d1bbc14614 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf.c
@@ -1,5 +1,5 @@
/* Multiple versions of floorf.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-float.h>
extern __typeof (__floorf) __floorf_ppc64 attribute_hidden;
extern __typeof (__floorf) __floorf_power5plus attribute_hidden;
@@ -29,4 +30,4 @@ libc_ifunc (__floorf,
? __floorf_power5plus
: __floorf_ppc64);
-weak_alias (__floorf, floorf)
+libm_alias_float (__floor, floor)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power7.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power7.S
index aaa163a914..e644f9605f 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power7.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power7.S
@@ -1,5 +1,5 @@
/* isinf(). PowerPC64/POWER7 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef hidden_def
#define hidden_def(name)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S
index 69341ec162..dc7764d915 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-power8.S
@@ -1,5 +1,5 @@
/* isinf(). PowerPC64/POWER8 version.
- Copyright (C) 2014-2016 Free Software Foundation, Inc.
+ Copyright (C) 2014-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef hidden_def
#define hidden_def(name)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-ppc64.c
index c400a73fa9..c1907980db 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf-ppc64.c
@@ -1,5 +1,5 @@
/* isinf(). PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c
index 07e159d9c1..44f5d0c129 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinf.c
@@ -1,5 +1,5 @@
/* Multiple versions of isinf.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define __isinf __redirect___isinf
+
+/* The following definitions, although not related to the 'double'
+ version of 'isinf', are required to guarantee macro expansions
+ (e.g.: from __isinff to __redirect_isinff) in include/math.h, thus
+ compensating for the unintended macro expansions in
+ math/bits/mathcalls-helper-functions.h. */
+#define __isinff __redirect___isinff
+#define __isinfl __redirect___isinfl
+#define __isinff128 __redirect___isinff128
+
#include <math.h>
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
@@ -24,13 +35,17 @@
extern __typeof (__isinf) __isinf_ppc64 attribute_hidden;
extern __typeof (__isinf) __isinf_power7 attribute_hidden;
extern __typeof (__isinf) __isinf_power8 attribute_hidden;
-
-libc_ifunc (__isinf,
- (hwcap2 & PPC_FEATURE2_ARCH_2_07)
- ? __isinf_power8 :
- (hwcap & PPC_FEATURE_ARCH_2_06)
- ? __isinf_power7
- : __isinf_ppc64);
+#undef __isinf
+#undef __isinff
+#undef __isinfl
+#undef __isinff128
+
+libc_ifunc_redirected (__redirect___isinf, __isinf,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __isinf_power8
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __isinf_power7
+ : __isinf_ppc64);
weak_alias (__isinf, isinf)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff-ppc64.c
index 72775f571d..531f15d822 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff-ppc64.c
@@ -1,5 +1,5 @@
/* isinff(). PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c
index 2cb161b54c..7e29a60713 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isinff.c
@@ -1,5 +1,5 @@
/* Multiple versions of isinf.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define __isinff __redirect___isinff
#include <math.h>
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
@@ -25,12 +26,13 @@ extern __typeof (__isinff) __isinff_ppc64 attribute_hidden;
/* The double-precision version also works for single-precision. */
extern __typeof (__isinff) __isinf_power7 attribute_hidden;
extern __typeof (__isinff) __isinf_power8 attribute_hidden;
+#undef __isinff
-libc_ifunc (__isinff,
- (hwcap2 & PPC_FEATURE2_ARCH_2_07)
- ? __isinf_power8 :
- (hwcap & PPC_FEATURE_ARCH_2_06)
- ? __isinf_power7
- : __isinff_ppc64);
+libc_ifunc_redirected (__redirect___isinff, __isinff,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __isinf_power8
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __isinf_power7
+ : __isinff_ppc64);
weak_alias (__isinff, isinff)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power5.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power5.S
index c61b52618e..749cdbc9fe 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power5.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power5.S
@@ -1,5 +1,5 @@
/* isnan(). PowerPC64/POWER5 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef hidden_def
#define hidden_def(name)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6.S
index c77bb345b6..51cbc6b243 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6.S
@@ -1,5 +1,5 @@
/* isnan(). PowerPC64/POWER6 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef hidden_def
#define hidden_def(name)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6x.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6x.S
index 389008efdd..a2d64dfeb7 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6x.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power6x.S
@@ -1,5 +1,5 @@
/* isnan(). PowerPC64/POWER6X version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef hidden_def
#define hidden_def(name)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power7.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power7.S
index 4e388a4ba7..8585808b51 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power7.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power7.S
@@ -1,5 +1,5 @@
/* isnan(). PowerPC64/POWER7 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef hidden_def
#define hidden_def(name)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S
index 83e3b3eb1a..d501878cb2 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-power8.S
@@ -1,5 +1,5 @@
/* isnan(). PowerPC64/POWER7 version.
- Copyright (C) 2014-2016 Free Software Foundation, Inc.
+ Copyright (C) 2014-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef hidden_def
#define hidden_def(name)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-ppc64.S
index 9a8451a762..82e14d8b2e 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan-ppc64.S
@@ -1,5 +1,5 @@
/* isnan(). PowerPC32 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,17 +16,21 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
#undef strong_alias
#define strong_alias(a,b)
+#undef compat_symbol
+#define compat_symbol(a,b,c,d)
+
#define __isnan __isnan_ppc64
-#undef hidden_def
-#define hidden_def(name) \
- .globl __GI___isnan ; .set __GI___isnan,__isnan_ppc64
+#ifdef SHARED
+ #undef hidden_def
+ #define hidden_def(name) \
+ .globl __GI___isnan ; .set __GI___isnan,__isnan_ppc64
+#endif
#include <sysdeps/powerpc/powerpc64/fpu/s_isnan.S>
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c
index a614f25047..0c155130c6 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnan.c
@@ -1,5 +1,5 @@
/* Multiple versions of isnan.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,6 +16,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#define __isnan __redirect___isnan
+
+/* The following definitions, although not related to the 'double'
+ version of 'isnan', are required to guarantee macro expansions
+ (e.g.: from __isnanf to __redirect_isnanf) in include/math.h, thus
+ compensating for the unintended macro expansions in
+ math/bits/mathcalls-helper-functions.h. */
+#define __isnanf __redirect___isnanf
+#define __isnanl __redirect___isnanl
+#define __isnanf128 __redirect___isnanf128
+
#include <math.h>
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
@@ -27,19 +38,23 @@ extern __typeof (__isnan) __isnan_power6 attribute_hidden;
extern __typeof (__isnan) __isnan_power6x attribute_hidden;
extern __typeof (__isnan) __isnan_power7 attribute_hidden;
extern __typeof (__isnan) __isnan_power8 attribute_hidden;
+#undef __isnan
+#undef __isnanf
+#undef __isnanl
+#undef __isnanf128
-libc_ifunc (__isnan,
- (hwcap2 & PPC_FEATURE2_ARCH_2_07)
- ? __isnan_power8 :
- (hwcap & PPC_FEATURE_ARCH_2_06)
- ? __isnan_power7 :
- (hwcap & PPC_FEATURE_POWER6_EXT)
- ? __isnan_power6x :
- (hwcap & PPC_FEATURE_ARCH_2_05)
- ? __isnan_power6 :
- (hwcap & PPC_FEATURE_POWER5)
- ? __isnan_power5
- : __isnan_ppc64);
+libc_ifunc_redirected (__redirect___isnan, __isnan,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __isnan_power8
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __isnan_power7
+ : (hwcap & PPC_FEATURE_POWER6_EXT)
+ ? __isnan_power6x
+ : (hwcap & PPC_FEATURE_ARCH_2_05)
+ ? __isnan_power6
+ : (hwcap & PPC_FEATURE_POWER5)
+ ? __isnan_power5
+ : __isnan_ppc64);
weak_alias (__isnan, isnan)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c
index acbc131721..e9558d554c 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_isnanf.c
@@ -1,5 +1,5 @@
/* Multiple versions of isnan.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,17 +27,18 @@ extern __typeof (__isnanf) __isnan_power6x attribute_hidden;
extern __typeof (__isnanf) __isnan_power7 attribute_hidden;
extern __typeof (__isnanf) __isnan_power8 attribute_hidden;
-libc_ifunc (__isnanf,
- (hwcap2 & PPC_FEATURE2_ARCH_2_07)
- ? __isnan_power8 :
- (hwcap & PPC_FEATURE_ARCH_2_06)
- ? __isnan_power7 :
- (hwcap & PPC_FEATURE_POWER6_EXT)
- ? __isnan_power6x :
- (hwcap & PPC_FEATURE_ARCH_2_05)
- ? __isnan_power6 :
- (hwcap & PPC_FEATURE_POWER5)
- ? __isnan_power5
- : __isnan_ppc64);
+libc_ifunc_hidden (__isnanf, __isnanf,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __isnan_power8
+ : (hwcap & PPC_FEATURE_ARCH_2_06)
+ ? __isnan_power7
+ : (hwcap & PPC_FEATURE_POWER6_EXT)
+ ? __isnan_power6x
+ : (hwcap & PPC_FEATURE_ARCH_2_05)
+ ? __isnan_power6
+ : (hwcap & PPC_FEATURE_POWER5)
+ ? __isnan_power5
+ : __isnan_ppc64);
+hidden_def (__isnanf)
weak_alias (__isnanf, isnanf)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power6x.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power6x.S
index 7968fb7b78..3de77d5c7a 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power6x.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power6x.S
@@ -1,5 +1,5 @@
/* Round double to long int. PowerPC64/POWER6X default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power8.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power8.S
index b87482e443..619527207f 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power8.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-power8.S
@@ -1,5 +1,5 @@
/* Round double to long int. PowerPC64/POWER6X default version.
- Copyright (C) 2014-2016 Free Software Foundation, Inc.
+ Copyright (C) 2014-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-ppc64.S
index f9c77abf4a..093726628d 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint-ppc64.S
@@ -1,5 +1,5 @@
/* Round double to long int. PowerPC32 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint.c
index 2a21a510e9..59f8c2bd95 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrint.c
@@ -1,5 +1,5 @@
/* Multiple versions of llrint.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,6 +27,7 @@
#undef __lrint
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-double.h>
extern __typeof (__llrint) __llrint_ppc64 attribute_hidden;
extern __typeof (__llrint) __llrint_power6x attribute_hidden;
@@ -39,22 +40,8 @@ libc_ifunc (__llrint,
? __llrint_power6x
: __llrint_ppc64);
-weak_alias (__llrint, llrint)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__llrint, __llrintl)
-weak_alias (__llrint, llrintl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llrint, llrintl, GLIBC_2_1);
-#endif
+libm_alias_double (__llrint, llrint)
/* long has the same width as long long on PowerPC64. */
strong_alias (__llrint, __lrint)
-weak_alias (__lrint, lrint)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__lrint, __lrintl)
-weak_alias (__lrint, lrintl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lrint, lrintl, GLIBC_2_1);
-#endif
+libm_alias_double (__lrint, lrint)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrintf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrintf.c
new file mode 100644
index 0000000000..919b5de03a
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrintf.c
@@ -0,0 +1,47 @@
+/* Multiple versions of llrintf.
+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+/* Redefine lrintf/__lrintf so that the compiler won't complain about the type
+ mismatch with the IFUNC selector in strong_alias below. */
+#define lrintf __hidden_lrintf
+#define __lrintf __hidden___lrintf
+
+#include <math.h>
+#undef lrintf
+#undef __lrintf
+#include "init-arch.h"
+#include <libm-alias-float.h>
+
+extern __typeof (__llrintf) __llrint_ppc64 attribute_hidden;
+extern __typeof (__llrintf) __llrint_power6x attribute_hidden;
+extern __typeof (__llrintf) __llrint_power8 attribute_hidden;
+
+/* The ppc64 ABI passes float and double parameters in 64bit floating point
+ registers (at least up to a point) as IEEE binary64 format, so effectively
+ of "double" type. Both l[l]rint and l[l]rintf return long type. So these
+ functions have identical signatures and functionality, and can use a
+ single implementation. */
+libc_ifunc (__llrintf,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __llrint_power8 :
+ (hwcap & PPC_FEATURE_POWER6_EXT)
+ ? __llrint_power6x
+ : __llrint_ppc64);
+
+libm_alias_float (__llrint, llrint)
+strong_alias (__llrintf, __lrintf)
+libm_alias_float (__lrint, lrint)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power5+.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power5+.S
index 3cb1c0c105..448ec22478 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power5+.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power5+.S
@@ -1,5 +1,5 @@
/* llround(). PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(name, alias)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power6x.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power6x.S
index 21698393fb..9110148419 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power6x.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power6x.S
@@ -1,5 +1,5 @@
/* llround(). PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(name, alias)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power8.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power8.S
index bc3a1e5591..3bbb5924ee 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power8.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-power8.S
@@ -1,5 +1,5 @@
/* llround(). PowerPC64 default version.
- Copyright (C) 2014-2016 Free Software Foundation, Inc.
+ Copyright (C) 2014-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(name, alias)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-ppc64.S
index 85415a0d51..c098210ade 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround-ppc64.S
@@ -1,5 +1,5 @@
/* llround(). PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef compat_symbol
#define compat_symbol(a,b,c,d)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround.c
index 423bdce727..07ae196178 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llround.c
@@ -1,5 +1,5 @@
/* Multiple versions of llround.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,6 +23,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-double.h>
extern __typeof (__llround) __llround_ppc64 attribute_hidden;
extern __typeof (__llround) __llround_power5plus attribute_hidden;
@@ -38,26 +39,10 @@ libc_ifunc (__llround,
? __llround_power5plus
: __llround_ppc64);
-weak_alias (__llround, llround)
-
-#ifdef NO_LONG_DOUBLE
-weak_alias (__llround, llroundl)
-strong_alias (__llround, __llroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __llround, llroundl, GLIBC_2_1);
-compat_symbol (libm, llround, lroundl, GLIBC_2_1);
-#endif
+libm_alias_double (__llround, llround)
/* long has the same width as long long on PPC64. */
#undef lround
#undef __lround
strong_alias (__llround, __lround)
-weak_alias (__llround, lround)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__llround, __llroundl)
-weak_alias (__llround, llroundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)
-compat_symbol (libm, __lround, lroundl, GLIBC_2_1);
-#endif
+libm_alias_double (__lround, lround)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llroundf-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llroundf-ppc64.S
new file mode 100644
index 0000000000..1af420a1d9
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llroundf-ppc64.S
@@ -0,0 +1,31 @@
+/* llroundf(). PowerPC64 default version.
+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <shlib-compat.h>
+
+#undef weak_alias
+#define weak_alias(a,b)
+#undef strong_alias
+#define strong_alias(a,b)
+#undef compat_symbol
+#define compat_symbol(a,b,c,d)
+
+#define __llroundf __llroundf_ppc64
+#define __lroundf __lroundf_ppc64
+
+#include <sysdeps/powerpc/powerpc64/fpu/s_llroundf.S>
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llroundf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llroundf.c
new file mode 100644
index 0000000000..792ae1dc5e
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_llroundf.c
@@ -0,0 +1,47 @@
+/* Multiple versions of llroundf.
+ Copyright (C) 2017-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+/* Redefine lroundf/__lroundf so that the compiler won't complain about
+ the type mismatch with the IFUNC selector in strong_alias below. */
+#define lroundf __hidden_lroundf
+#define __lroundf __hidden___lroundf
+
+#include <math.h>
+#undef lroundf
+#undef __lroundf
+#include "init-arch.h"
+#include <libm-alias-float.h>
+
+extern __typeof (__llroundf) __llroundf_ppc64 attribute_hidden;
+extern __typeof (__llroundf) __llround_power6x attribute_hidden;
+extern __typeof (__llroundf) __llround_power8 attribute_hidden;
+
+/* The ppc64 ABI passes float and double parameters in 64bit floating point
+ registers (at least up to a point) as IEEE binary64 format, so effectively
+ of "double" type. Both l[l]round and l[l]roundf return long type. So these
+ functions have identical signatures and functionality, and can use a
+ single implementation. */
+libc_ifunc (__llroundf,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __llround_power8 :
+ (hwcap & PPC_FEATURE_POWER6_EXT)
+ ? __llround_power6x
+ : __llroundf_ppc64);
+
+libm_alias_float (__llround, llround)
+strong_alias (__llroundf, __lroundf)
+libm_alias_float (__lround, lround)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-power7.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-power7.c
index 769dc2346a..504603a242 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-power7.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-power7.c
@@ -1,5 +1,5 @@
/* logb(). PowerPC64/POWER7 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-ppc64.c
index 1f530b547d..0f1e4fc76b 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-ppc64.c
@@ -1,5 +1,5 @@
/* logb(). PowerPC32/POWER7 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,11 +18,6 @@
#include <math.h>
-#undef weak_alias
-#define weak_alias(a, b)
-#undef strong_alias
-#define strong_alias(a, b)
-
#define __logb __logb_ppc64
#include <sysdeps/ieee754/dbl-64/s_logb.c>
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb.c
index f7bc72d3eb..b4a72c81fd 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb.c
@@ -1,5 +1,5 @@
/* Multiple versions of logb.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-double.h>
extern __typeof (__logb) __logb_ppc64 attribute_hidden;
extern __typeof (__logb) __logb_power7 attribute_hidden;
@@ -29,13 +30,4 @@ libc_ifunc (__logb,
? __logb_power7
: __logb_ppc64);
-weak_alias (__logb, logb)
-
-#ifdef NO_LONG_DOUBLE
-strong_alias (__logb, __logbl)
-weak_alias (__logb, logbl)
-#endif
-
-#if LONG_DOUBLE_COMPAT (libm, GLIBC_2_0)
-compat_symbol (libm, logb, logbl, GLIBC_2_0);
-#endif
+libm_alias_double (__logb, logb)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf-power7.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf-power7.c
index 4c80d7ff4d..fee93e2352 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf-power7.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf-power7.c
@@ -1,5 +1,5 @@
/* logb(). PowerPC64/POWER7 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf-ppc64.c
index 42630633b0..fe197b7e9b 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf-ppc64.c
@@ -1,5 +1,5 @@
/* logbf(). PowerPC64 default implementation.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf.c
index 3fc948b10d..48e7d410e1 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf.c
@@ -1,5 +1,5 @@
/* Multiple versions of logbf.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-float.h>
extern __typeof (__logbf) __logbf_ppc64 attribute_hidden;
extern __typeof (__logbf) __logbf_power7 attribute_hidden;
@@ -29,4 +30,4 @@ libc_ifunc (__logbf,
? __logbf_power7
: __logbf_ppc64);
-weak_alias (__logbf, logbf)
+libm_alias_float (__logb, logb)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl-power7.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl-power7.c
index e04e673056..eb08b5fe5e 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl-power7.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl-power7.c
@@ -1,5 +1,5 @@
/* logb(). PowerPC64/POWER7 version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl-ppc64.c
index e16a721cfc..62d8c95783 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl-ppc64.c
@@ -1,5 +1,5 @@
/* logbl(). PowerPC64/POWER7 version.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl.c
index 4b86b39635..f677c2aa69 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbl.c
@@ -1,5 +1,5 @@
/* Multiple versions of logbl.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf-power5+.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf-power5+.c
index 24fe354860..c7a382445a 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf-power5+.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf-power5+.c
@@ -1,5 +1,5 @@
/* PowerPC/POWER5+ implementation for modf.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf-ppc64.c
index 9758e88d71..c4aabe8f6e 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf-ppc64.c
@@ -1,5 +1,5 @@
/* PowerPC64 default implementation for modf.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,11 +19,6 @@
#include <math.h>
#include <math_ldbl_opt.h>
-#undef weak_alias
-#define weak_alias(a,b)
-#undef strong_alias
-#define strong_alias(a,b)
-
#define __modf __modf_ppc64
#include <sysdeps/ieee754/dbl-64/s_modf.c>
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c
index 2af1959ad5..1fe7408cf3 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modf.c
@@ -1,5 +1,5 @@
/* Multiple versions of modf.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-double.h>
extern __typeof (__modf) __modf_ppc64 attribute_hidden;
extern __typeof (__modf) __modf_power5plus attribute_hidden;
@@ -29,16 +30,8 @@ libc_ifunc (__modf,
? __modf_power5plus
: __modf_ppc64);
-weak_alias (__modf, modf)
+libm_alias_double (__modf, modf)
-#ifdef NO_LONG_DOUBLE
-strong_alias (__modf, __modfl)
-weak_alias (__modf, modfl)
-#endif
-#if IS_IN (libm)
-# if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __modf, modfl, GLIBC_2_0);
-# endif
-#elif LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
+#if LONG_DOUBLE_COMPAT (libc, GLIBC_2_0)
compat_symbol (libc, __modf, modfl, GLIBC_2_0);
#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff-power5+.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff-power5+.c
index cbac75a97b..1c23444a21 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff-power5+.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff-power5+.c
@@ -1,5 +1,5 @@
/* PowerPC/POWER5+ implementation for modff.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff-ppc64.c
index 521bc0841d..0b1b289efd 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff-ppc64.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff-ppc64.c
@@ -1,5 +1,5 @@
/* PowerPC64 default implementation for modff.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff.c
index 1163d1c1cf..efa96a799b 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff.c
@@ -1,5 +1,5 @@
/* Multiple versions of modff.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
#include <math.h>
#include "init-arch.h"
+#include <libm-alias-float.h>
extern __typeof (__modff) __modff_ppc64 attribute_hidden;
extern __typeof (__modff) __modff_power5plus attribute_hidden;
@@ -27,4 +28,4 @@ libc_ifunc (__modff,
? __modff_power5plus
: __modff_ppc64);
-weak_alias (__modff, modff)
+libm_alias_float (__modf, modf)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-power5+.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-power5+.S
index edcc60242f..67c001005a 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-power5+.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-power5+.S
@@ -1,5 +1,5 @@
/* round function. PowerPC64/power5+ version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-ppc64.S
index 3a6bb790d7..43cf13ab38 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round-ppc64.S
@@ -1,5 +1,5 @@
/* round function. PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c
index 0408dc9e0b..bfa4d8119e 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_round.c
@@ -1,5 +1,5 @@
/* Multiple versions of round.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-double.h>
extern __typeof (__round) __round_ppc64 attribute_hidden;
extern __typeof (__round) __round_power5plus attribute_hidden;
@@ -29,12 +30,4 @@ libc_ifunc (__round,
? __round_power5plus
: __round_ppc64);
-weak_alias (__round, round)
-
-#ifdef NO_LONG_DOUBLE
-strong_alias (__round, __roundl)
-weak_alias (__round, roundl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __round, roundl, GLIBC_2_0);
-#endif
+libm_alias_double (__round, round)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-power5+.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-power5+.S
index 970cf7056c..6daf4c9f12 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-power5+.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-power5+.S
@@ -1,5 +1,5 @@
/* roundf function. PowerPC64/power5+ version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-ppc64.S
index ef05017e50..9500b278cf 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf-ppc64.S
@@ -1,5 +1,5 @@
/* roundf function. PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf.c
index 6d33611a88..3d77156846 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf.c
@@ -1,5 +1,5 @@
/* Multiple versions of roundf.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-float.h>
extern __typeof (__roundf) __roundf_ppc64 attribute_hidden;
extern __typeof (__roundf) __roundf_power5plus attribute_hidden;
@@ -29,4 +30,4 @@ libc_ifunc (__roundf,
? __roundf_power5plus
: __roundf_ppc64);
-weak_alias (__roundf, roundf)
+libm_alias_float (__round, round)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf-power8.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf-power8.S
new file mode 100644
index 0000000000..6cc058e93c
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf-power8.S
@@ -0,0 +1,24 @@
+/* sinf(). PowerPC64/POWER8 version.
+ Copyright (C) 2016-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#undef weak_alias
+#define weak_alias(a, b)
+
+#define __sinf __sinf_power8
+
+#include <sysdeps/powerpc/powerpc64/power8/fpu/s_sinf.S>
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf-ppc64.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf-ppc64.c
new file mode 100644
index 0000000000..4f0a09e040
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf-ppc64.c
@@ -0,0 +1,24 @@
+/* sinf(). PowerPC64 default version.
+ Copyright (C) 2016-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#undef weak_alias
+#define weak_alias(a, b)
+
+#define __sinf __sinf_ppc64
+
+#include <sysdeps/powerpc/fpu/s_sinf.c>
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf.c
new file mode 100644
index 0000000000..f1d9a97eea
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf.c
@@ -0,0 +1,32 @@
+/* Multiple versions of sinf.
+ Copyright (C) 2016-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <math.h>
+#include <shlib-compat.h>
+#include "init-arch.h"
+#include <libm-alias-float.h>
+
+extern __typeof (__sinf) __sinf_ppc64 attribute_hidden;
+extern __typeof (__sinf) __sinf_power8 attribute_hidden;
+
+libc_ifunc (__sinf,
+ (hwcap2 & PPC_FEATURE2_ARCH_2_07)
+ ? __sinf_power8
+ : __sinf_ppc64);
+
+libm_alias_float (__sin, sin)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-power5+.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-power5+.S
index 47c9191bc7..c3cb5d3f21 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-power5+.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-power5+.S
@@ -1,5 +1,5 @@
/* trunc function. PowerPC64/power5+ version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-ppc64.S
index b9c25e18cb..1cfe0531e8 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc-ppc64.S
@@ -1,5 +1,5 @@
/* trunc function. PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,7 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c
index 9d6144726d..989ffc9cf4 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_trunc.c
@@ -1,5 +1,5 @@
/* Multiple versions of trunc.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-double.h>
extern __typeof (__trunc) __trunc_ppc64 attribute_hidden;
extern __typeof (__trunc) __trunc_power5plus attribute_hidden;
@@ -29,12 +30,4 @@ libc_ifunc (__trunc,
? __trunc_power5plus
: __trunc_ppc64);
-weak_alias (__trunc, trunc)
-
-#ifdef NO_LONG_DOUBLE
-strong_alias (__trunc, __truncl)
-weak_alias (__trunc, truncl)
-#endif
-#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
-compat_symbol (libm, __trunc, truncl, GLIBC_2_0);
-#endif
+libm_alias_double (__trunc, trunc)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-power5+.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-power5+.S
index 96f08a9631..b40f00dd8e 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-power5+.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-power5+.S
@@ -1,5 +1,5 @@
/* truncf function. PowerPC64/power5+ version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-ppc64.S
index f413b0f74a..b05bbfd1e5 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-ppc64.S
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf-ppc64.S
@@ -1,5 +1,5 @@
/* truncf function. PowerPC64 default version.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,6 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <sysdep.h>
-
#undef weak_alias
#define weak_alias(a,b)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf.c
index f2d99109ae..fc5351b0ca 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf.c
@@ -1,5 +1,5 @@
/* Multiple versions of truncf.
- Copyright (C) 2013-2016 Free Software Foundation, Inc.
+ Copyright (C) 2013-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -20,6 +20,7 @@
#include <math_ldbl_opt.h>
#include <shlib-compat.h>
#include "init-arch.h"
+#include <libm-alias-float.h>
extern __typeof (__truncf) __truncf_ppc64 attribute_hidden;
extern __typeof (__truncf) __truncf_power5plus attribute_hidden;
@@ -29,4 +30,4 @@ libc_ifunc (__truncf,
? __truncf_power5plus
: __truncf_ppc64);
-weak_alias (__truncf, truncf)
+libm_alias_float (__trunc, trunc)
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/w_expf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/w_expf.c
new file mode 100644
index 0000000000..b5fe164520
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/w_expf.c
@@ -0,0 +1 @@
+#include <sysdeps/../math/w_expf.c>