about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/le/power9
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabriel@inconstante.eti.br>2018-03-09 16:59:14 -0300
committerGabriel F. T. Gomes <gabriel@inconstante.eti.br>2018-04-27 16:32:01 -0300
commit3a33b0696937d3c8324e517512f8dc952166a7ab (patch)
treebd3db4fedb5ea7b1d996a57335cba9613533c514 /sysdeps/powerpc/powerpc64/le/power9
parenta3fb6b6bc3f2f33e93f4c9575105f3b5f39cb201 (diff)
downloadglibc-3a33b0696937d3c8324e517512f8dc952166a7ab.tar.gz
glibc-3a33b0696937d3c8324e517512f8dc952166a7ab.tar.xz
glibc-3a33b0696937d3c8324e517512f8dc952166a7ab.zip
powerpc64*: fix the order of implied sysdeps directories
The creation of the divergent sysdeps directory for powerpc64le

commit 2f7f3cd8cd302bb10908c86f3f7b349df0a78e6a
Author: Paul E. Murphy <murphyp@linux.vnet.ibm.com>
Date:   Fri Jul 15 18:04:40 2016 -0500

    powerpc64le: Create divergent sysdep directory for powerpc64le.

allowed float128 to be enabled for powerpc64le (little-endian) and not
for powerpc64 (big-endian).  Since the only intended difference between
them was the presence or absence of the float128 interface, the sysdeps
directory for powerpc64le explicitly reused the files from powerpc64
(through the use of Implies files).

Although this works, it also means that files under the powerpc64
directory might be preferred over files under powerpc64le.  For
instance, on a build for powerpc64le with target set to power9, a file
from powerpc64/power5 might get built, even though a file with the same
name exists in powerpc64le/power8.  That happens because the processor
hierarchy was only defined in the sysdeps directory for powerpc64 (and
borrowed by powerpc64le).

This patch fixes this behavior, by creating new subdirectories under
powerpc64 (i.e.: powerpc64/be and powerpc64/le) and creating new Implies
files to provide the hierarchy of processors for powerpc64 and
powerpc64le separately.  These changes have no effect on installed,
stripped binaries (which remain unchanged).

Tested that installed stripped binaries are unchanged and that there are
no regressions on powerpc64 and powerpc64le.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/le/power9')
-rw-r--r--sysdeps/powerpc/powerpc64/le/power9/Implies2
-rw-r--r--sysdeps/powerpc/powerpc64/le/power9/fpu/Implies2
-rw-r--r--sysdeps/powerpc/powerpc64/le/power9/fpu/e_sqrtf128.c36
-rw-r--r--sysdeps/powerpc/powerpc64/le/power9/fpu/multiarch/Implies1
-rw-r--r--sysdeps/powerpc/powerpc64/le/power9/multiarch/Implies1
5 files changed, 42 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/le/power9/Implies b/sysdeps/powerpc/powerpc64/le/power9/Implies
new file mode 100644
index 0000000000..8c0cfd7c2e
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/le/power9/Implies
@@ -0,0 +1,2 @@
+powerpc/powerpc64/power9
+powerpc/powerpc64/le/power8
diff --git a/sysdeps/powerpc/powerpc64/le/power9/fpu/Implies b/sysdeps/powerpc/powerpc64/le/power9/fpu/Implies
new file mode 100644
index 0000000000..8b7c0b4af6
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/le/power9/fpu/Implies
@@ -0,0 +1,2 @@
+powerpc/powerpc64/power9/fpu
+powerpc/powerpc64/le/power8/fpu
diff --git a/sysdeps/powerpc/powerpc64/le/power9/fpu/e_sqrtf128.c b/sysdeps/powerpc/powerpc64/le/power9/fpu/e_sqrtf128.c
new file mode 100644
index 0000000000..76ab451dbb
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/le/power9/fpu/e_sqrtf128.c
@@ -0,0 +1,36 @@
+/* POWER9 sqrt for _Float128
+   Return sqrt(a)
+   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.
+
+   In addition to the permissions in the GNU Lesser General Public
+   License, the Free Software Foundation gives you unlimited
+   permission to link the compiled version of this file into
+   combinations with other programs, and to distribute those
+   combinations without any restriction coming from the use of this
+   file.  (The Lesser General Public License restrictions do apply in
+   other respects; for example, they cover modification of the file,
+   and distribution when not linked into a combine executable.)
+
+   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/>.  */
+
+__float128
+__ieee754_sqrtf128 (__float128 a)
+{
+  __float128 z;
+  asm ("xssqrtqp %0,%1" : "=v" (z) : "v" (a));
+  return z;
+}
+strong_alias (__ieee754_sqrtf128, __sqrtf128_finite)
diff --git a/sysdeps/powerpc/powerpc64/le/power9/fpu/multiarch/Implies b/sysdeps/powerpc/powerpc64/le/power9/fpu/multiarch/Implies
new file mode 100644
index 0000000000..dce5bca13e
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/le/power9/fpu/multiarch/Implies
@@ -0,0 +1 @@
+powerpc/powerpc64/le/power8/fpu/multiarch
diff --git a/sysdeps/powerpc/powerpc64/le/power9/multiarch/Implies b/sysdeps/powerpc/powerpc64/le/power9/multiarch/Implies
new file mode 100644
index 0000000000..98efd68e54
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/le/power9/multiarch/Implies
@@ -0,0 +1 @@
+powerpc/powerpc64/le/power8/multiarch