summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/fpu/multiarch
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-03-13 17:55:03 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-06-26 14:33:58 -0300
commitaa32f5bf0cfd73525fa5d7142e7abf5def87bb08 (patch)
tree90938f6917666cd16b28c6be292828cc20f91556 /sysdeps/powerpc/powerpc64/fpu/multiarch
parent9d5d214e86db30633e905907f7b3cf56b8fee16e (diff)
downloadglibc-aa32f5bf0cfd73525fa5d7142e7abf5def87bb08.tar.gz
glibc-aa32f5bf0cfd73525fa5d7142e7abf5def87bb08.tar.xz
glibc-aa32f5bf0cfd73525fa5d7142e7abf5def87bb08.zip
powerpc: Use generic e_expf
Generic implementation is faster on both power8 and power9:

POWER9:
- sysdeps/ieee754/flt-32/e_expf.c
  "expf": {
   "workload-spec2017.wrf": {
    "duration": 5.1236e+09,
    "iterations": 7.53344e+08,
    "reciprocal-throughput": 5.9436,
    "latency": 7.65869,
    "max-throughput": 1.68248e+08,
    "min-throughput": 1.30571e+08
   }
  }

- sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S
  "expf": {
   "workload-spec2017.wrf": {
    "duration": 5.14429e+09,
    "iterations": 5.29248e+08,
    "reciprocal-throughput": 8.05372,
    "latency": 11.3863,
    "max-throughput": 1.24166e+08,
    "min-throughput": 8.78249e+07
   }
  }

Checked on powerpc-linux-gnu (built without --with-cpu, with
--with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch),
powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+
and --disable-multi-arch).

	* sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
	(libm-sysdep_routines): Remove e_expf-power8 and expf-ppc64.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-power8.S: Remove
	file.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-ppc64.c: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c: Likewise.
	* sysdeps/powerpc/powerpc64/fpu/multiarch/w_expf.c: Likewise.
	* sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S: Likewise.
	* sysdeps/powerpc/powerpc64/power8/fpu/w_expf.c: Likewise.

Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
Diffstat (limited to 'sysdeps/powerpc/powerpc64/fpu/multiarch')
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile1
-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/w_expf.c1
5 files changed, 0 insertions, 79 deletions
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
index 48cf8dca3b..118865a1a9 100644
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
@@ -10,7 +10,6 @@ libm-sysdep_routines += s_logb-power7 s_logbf-power7 \
 			s_logbl-power7 s_logb-ppc64 s_logbf-ppc64 \
 			s_logbl-ppc64 e_hypot-ppc64 \
 			e_hypot-power7 e_hypotf-ppc64 e_hypotf-power7 \
-			e_expf-power8 e_expf-ppc64 \
 			$(sysdep_calls:s_%=m_%)
 
 CFLAGS-s_logbf-power7.c = -mcpu=power7
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-power8.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-power8.S
deleted file mode 100644
index e0e14c2a47..0000000000
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-power8.S
+++ /dev/null
@@ -1,24 +0,0 @@
-/* __ieee754_expf() POWER8 version.
-   Copyright (C) 2016-2019 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
deleted file mode 100644
index 00c2006d41..0000000000
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf-ppc64.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* __ieee_expf() PowerPC64 version.
-   Copyright (C) 2016-2019 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
deleted file mode 100644
index dc0023c244..0000000000
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/e_expf.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Multiple versions of ieee754_expf.
-   Copyright (C) 2016-2019 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/w_expf.c b/sysdeps/powerpc/powerpc64/fpu/multiarch/w_expf.c
deleted file mode 100644
index b5fe164520..0000000000
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/w_expf.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/../math/w_expf.c>