]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
powerpc: Refactor powerpc32 lrint/lrintf/llrint/llrintf
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 18 Mar 2019 02:01:03 +0000 (02:01 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 17 Jun 2019 12:27:02 +0000 (09:27 -0300)
This patches consolidates all the powerpc llrint{f} implementations on
the generic sysdeps/powerpc/powerpc32/fpu/s_llrint{f}.

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-cpu and with --with-cpu=power5+
and --disable-multi-arch).

* sysdeps/powerpc/fpu/s_lrintf.S: Remove file.
* sysdeps/powerpc/powerpc64/fpu/s_lrintf.c: Move to ...
* sysdeps/powerpc/fpu/s_lrintf.c: ... here.
* sysdeps/powerpc/powerpc32/fpu/Makefile
[$(subdir) == math] (CFLAGS-s_lrint.c): New rule.
* sysdeps/powerpc/powerpc32/fpu/s_llrint.c (__llrint): Add power4
optimization.
* sysdeps/powerpc/powerpc32/fpu/s_llrintf.c (__llrintf): Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Remove file.
* sysdeps/powerpc/powerpc32/fpu/s_lrint.c: New file.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
(CFLAGS-s_llrintf-power6.c, CFLAGS-s_llrintf-ppc32.c,
CFLAGS-s_llrint-power6.c, CFLAGS-s_llrint-ppc32.c,
CFLAGS-s_lrint-ppc32.c): New rule.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S:
Remove file.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S:
Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S:
Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S:
Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S:
Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S: Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S: Likewise.
* sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S: Likewise.
* sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S: Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.c:
New file.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.c:
Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.c:
Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.c:
Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.c:
Likewise.

Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
23 files changed:
ChangeLog
sysdeps/powerpc/fpu/s_lrintf.S [deleted file]
sysdeps/powerpc/fpu/s_lrintf.c [moved from sysdeps/powerpc/powerpc64/fpu/s_lrintf.c with 100% similarity]
sysdeps/powerpc/powerpc32/fpu/Makefile
sysdeps/powerpc/powerpc32/fpu/s_llrint.c
sysdeps/powerpc/powerpc32/fpu/s_llrintf.c
sysdeps/powerpc/powerpc32/fpu/s_lrint.S [deleted file]
sysdeps/powerpc/powerpc32/fpu/s_lrint.c [new file with mode: 0644]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S [deleted file]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.c [new file with mode: 0644]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S [deleted file]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.c [new file with mode: 0644]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S [deleted file]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.c [new file with mode: 0644]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S [deleted file]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.c [new file with mode: 0644]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S [deleted file]
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.c [new file with mode: 0644]
sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S [deleted file]
sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S [deleted file]
sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S [deleted file]
sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S [deleted file]

index 02c6953e34855b6229547e35fd246ccac2e26b61..1b2848c46cfc101ac21bcc7d2e2697638ab31acf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,44 @@
 2019-06-17  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+       * sysdeps/powerpc/fpu/s_lrintf.S: Remove file.
+       * sysdeps/powerpc/powerpc64/fpu/s_lrintf.c: Move to ...
+       * sysdeps/powerpc/fpu/s_lrintf.c: ... here.
+       * sysdeps/powerpc/powerpc32/fpu/Makefile
+       [$(subdir) == math] (CFLAGS-s_lrint.c): New rule.
+       * sysdeps/powerpc/powerpc32/fpu/s_llrint.c (__llrint): Add power4
+       optimization.
+       * sysdeps/powerpc/powerpc32/fpu/s_llrintf.c (__llrintf): Likewise.
+       * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Remove file.
+       * sysdeps/powerpc/powerpc32/fpu/s_lrint.c: New file.
+       * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
+       (CFLAGS-s_llrintf-power6.c, CFLAGS-s_llrintf-ppc32.c,
+       CFLAGS-s_llrint-power6.c, CFLAGS-s_llrint-ppc32.c,
+       CFLAGS-s_lrint-ppc32.c): New rule.
+       * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S:
+       Remove file.
+       * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S:
+       Likewise.
+       * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S:
+       Likewise.
+       * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S:
+       Likewise.
+       * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S:
+       Likewise.
+       * sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S: Likewise.
+       * sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S: Likewise.
+       * sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S: Likewise.
+       * sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S: Likewise.
+       * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.c:
+       New file.
+       * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.c:
+       Likewise.
+       * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.c:
+       Likewise.
+       * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.c:
+       Likewise.
+       * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.c:
+       Likewise.
+
        * sysdeps/powerpc/powerpc64/be/fpu/multiarch/Makefile
        (libm-sysdep_routines): Add s_llrint-power8, s_llrint-power6x, and
        s_llrint-ppc64.
diff --git a/sysdeps/powerpc/fpu/s_lrintf.S b/sysdeps/powerpc/fpu/s_lrintf.S
deleted file mode 100644 (file)
index e247665..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* __lrintf is in s_lrint.c  */
index e05073970d22b58a319f02823c8180a2c1304bc4..c79b192f60d01880e260ad3be5fc5917d26d793f 100644 (file)
@@ -1,3 +1,9 @@
+ifeq ($(subdir),math)
+# lrint is aliased to lrintf, so suppress compiler builtins to
+# avoid mismatched signatures.
+CFLAGS-s_lrint.c += -fno-builtin-lrintf
+endif
+
 ifeq ($(subdir),misc)
 sysdep_routines += fprsave fprrest
 endif
index 7e91d606c2d40b67292537bcf0ade37bdc2bf851..42558efd46d32d86223c152659a693f61bf5e84d 100644 (file)
 long long int
 __llrint (double x)
 {
+#ifdef _ARCH_PWR4
+  /* Assume powerpc64 instructions availability.  */
+  long long int ret;
+  __asm__ ("fctid %0, %1" : "=d" (ret) : "d" (x));
+  return ret;
+#else
   double rx = rint (x);
   if (HAVE_PPC_FCTIDZ || rx != x)
     return (long long int) rx;
@@ -53,5 +59,8 @@ __llrint (double x)
       else
        return (long long int) (long int) rx << 32;
     }
+#endif
 }
+#ifndef __llrint
 libm_alias_double (__llrint, llrint)
+#endif
index 021a86fadaf68e2a12910cafe23380c40b005c8c..b75655e2c1a75bcda240ff472631a84c53a30190 100644 (file)
 long long int
 __llrintf (float x)
 {
+#ifdef _ARCH_PWR4
+  /* Assume powerpc64 instructions availability.  */
+  long long int ret;
+  __asm__ ("fctid %0, %1" : "=d" (ret) : "d" (x));
+  return ret;
+#else
   float rx = rintf (x);
   if (HAVE_PPC_FCTIDZ || rx != x)
     return (long long int) rx;
@@ -43,5 +49,6 @@ __llrintf (float x)
       mant <<= exponent - 23;
       return (long long int) ((i0 & 0x80000000) != 0 ? -mant : mant);
     }
+#endif
 }
 libm_alias_float (__llrint, llrint)
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_lrint.S b/sysdeps/powerpc/powerpc32/fpu/s_lrint.S
deleted file mode 100644 (file)
index fdad180..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Round double to long int.  PowerPC32 version.
-   Copyright (C) 2004-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 <sysdep.h>
-#include <math_ldbl_opt.h>
-#include <libm-alias-float.h>
-#include <libm-alias-double.h>
-
-/* long int[r3] __lrint (double x[fp1])  */
-ENTRY (__lrint)
-       stwu    r1,-16(r1)
-       fctiw   fp13,fp1
-       stfd    fp13,8(r1)
-       nop     /* Ensure the following load is in a different dispatch group */
-       nop     /* to avoid pipe stall on POWER4&5.  */
-       nop
-       lwz     r3,8+LOWORD(r1)
-       addi    r1,r1,16
-       blr
-       END (__lrint)
-
-libm_alias_double (__lrint, lrint)
-
-strong_alias (__lrint, __lrintf)
-libm_alias_float (__lrint, lrint)
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_lrint.c b/sysdeps/powerpc/powerpc32/fpu/s_lrint.c
new file mode 100644 (file)
index 0000000..21bdc5c
--- /dev/null
@@ -0,0 +1,40 @@
+/* Round to nearest integer.  PowerPC32 version.
+   Copyright (C) 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 Library General Public License as
+   published by the Free Software Foundation; either version 2 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If
+   not, see <http://www.gnu.org/licenses/>.  */
+
+#define NO_MATH_REDIRECT
+#define lrintf __redirect_lrintf
+#define __lrintf __redirect___lrintf
+#include <math.h>
+#undef lrintf
+#undef __lrintf
+#include <fenv_private.h>
+#include <libm-alias-double.h>
+#include <libm-alias-float.h>
+
+long int
+__lrint (double x)
+{
+  long long int ret;
+  __asm__ ("fctiw %0, %1" : "=d" (ret) : "d" (x));
+  return ret;
+}
+#ifndef __lrint
+libm_alias_double (__lrint, lrint)
+strong_alias (__lrint, __lrintf)
+libm_alias_float (__lrint, lrint)
+#endif
index 51b13fe33a89f6526df609d735f8bcd3d39d5c5d..d33d403a1b0bb8e9e5b3c00d9fa08bf12e066a89 100644 (file)
@@ -18,6 +18,11 @@ libm-sysdep_routines += s_llrintf-power6 s_llrintf-ppc32 s_llrint-power6 \
                        s_logbf-power7 s_logbf-ppc32 e_hypot-power7 \
                        e_hypot-ppc32 e_hypotf-power7 e_hypotf-ppc32
 
+CFLAGS-s_llrintf-power6.c += -mcpu=power6
+CFLAGS-s_llrintf-ppc32.c += -mcpu=power4
+CFLAGS-s_llrint-power6.c += -mcpu=power6
+CFLAGS-s_llrint-ppc32.c += -mcpu=power4
+CFLAGS-s_lrint-ppc32.c += -mcpu=power4
 CFLAGS-s_ceil-power5+.c = -mcpu=power5+
 CFLAGS-s_ceilf-power5+.c = -mcpu=power5+
 CFLAGS-s_modf-power5+.c = -mcpu=power5+
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.S
deleted file mode 100644 (file)
index 253a12b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Round double to long int.  PowerPC32/Power6.
-   Copyright (C) 2013-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 <sysdep.h>
-#include <math_ldbl_opt.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 __llrint __llrint_power6
-
-#include <sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S>
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-power6.c
new file mode 100644 (file)
index 0000000..328e118
--- /dev/null
@@ -0,0 +1,2 @@
+#define __llrint __llrint_power6
+#include <sysdeps/powerpc/powerpc32/fpu/s_llrint.c>
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.S
deleted file mode 100644 (file)
index e7bf676..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* llrint function.  PowerPC32 default version.
-   Copyright (C) 2013-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 <sysdep.h>
-#include <math_ldbl_opt.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 __llrint __llrint_ppc32
-
-#include <sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S>
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrint-ppc32.c
new file mode 100644 (file)
index 0000000..8f192ab
--- /dev/null
@@ -0,0 +1,2 @@
+#define __llrint __llrint_ppc32
+#include <sysdeps/powerpc/powerpc32/fpu/s_llrint.c>
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.S
deleted file mode 100644 (file)
index c6b7769..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Round float to long int.  PowerPC32/POWER6 version.
-   Copyright (C) 2013-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 <sysdep.h>
-
-#undef weak_alias
-#define weak_alias(a,b)
-
-#define __llrintf __llrintf_power6
-
-#include <sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S>
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-power6.c
new file mode 100644 (file)
index 0000000..5b1a5a8
--- /dev/null
@@ -0,0 +1,2 @@
+#define __llrintf __llrintf_power6
+#include <sysdeps/powerpc/powerpc32/fpu/s_llrintf.c>
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.S
deleted file mode 100644 (file)
index c592b31..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/* llrintf function.  PowerPC32 default version.
-   Copyright (C) 2013-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 <sysdep.h>
-
-#undef weak_alias
-#define weak_alias(a,b)
-
-#define __llrintf __llrintf_ppc32
-
-#include <sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S>
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf-ppc32.c
new file mode 100644 (file)
index 0000000..061962b
--- /dev/null
@@ -0,0 +1,2 @@
+#define __llrintf __llrintf_ppc32
+#include <sysdeps/powerpc/powerpc32/fpu/s_llrintf.c>
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.S
deleted file mode 100644 (file)
index 617a9a7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Round double to long int.  PowerPC32 default version.
-   Copyright (C) 2013-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 <sysdep.h>
-#include <math_ldbl_opt.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 __lrint __lrint_ppc32
-
-#include <sysdeps/powerpc/powerpc32/fpu/s_lrint.S>
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrint-ppc32.c
new file mode 100644 (file)
index 0000000..ce2764b
--- /dev/null
@@ -0,0 +1,2 @@
+#define __lrint __lrint_ppc32
+#include <sysdeps/powerpc/powerpc32/fpu/s_lrint.c>
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llrint.S
deleted file mode 100644 (file)
index 3fdb5c3..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Round double to long int.  PowerPC32 on PowerPC64 version.
-   Copyright (C) 2004-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 <sysdep.h>
-#include <math_ldbl_opt.h>
-#include <libm-alias-double.h>
-
-/* long long int[r3, r4] __llrint (double x[fp1])  */
-ENTRY (__llrint)
-       CALL_MCOUNT
-       stwu    r1,-16(r1)
-       cfi_adjust_cfa_offset (16)
-       fctid   fp13,fp1
-       stfd    fp13,8(r1)
-       nop     /* Insure the following load is in a different dispatch group */
-       nop     /* to avoid pipe stall on POWER4&5.  */
-       nop
-       lwz     r3,8+HIWORD(r1)
-       lwz     r4,8+LOWORD(r1)
-       addi    r1,r1,16
-       blr
-       END (__llrint)
-
-libm_alias_double (__llrint, llrint)
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S
deleted file mode 100644 (file)
index 3a63642..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Round float to long int.  PowerPC32 on PowerPC64 version.
-   Copyright (C) 2004-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 <sysdep.h>
-#include <libm-alias-float.h>
-
-/* long long int[r3, r4] __llrintf (float x[fp1])  */
-ENTRY (__llrintf)
-       CALL_MCOUNT
-       stwu    r1,-16(r1)
-       cfi_adjust_cfa_offset (16)
-       fctid   fp13,fp1
-       stfd    fp13,8(r1)
-       nop     /* Insure the following load is in a different dispatch group */
-       nop     /* to avoid pipe stall on POWER4&5.  */
-       nop
-       lwz     r3,8+HIWORD(r1)
-       lwz     r4,8+LOWORD(r1)
-       addi    r1,r1,16
-       blr
-       END (__llrintf)
-
-libm_alias_float (__llrint, llrint)
-
diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llrint.S
deleted file mode 100644 (file)
index e8134f7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Round double to long int.  PowerPC32 on PowerPC64 version.
-   Copyright (C) 2004-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 <sysdep.h>
-#include <math_ldbl_opt.h>
-#include <libm-alias-double.h>
-
-/* long long int[r3, r4] __llrint (double x[fp1])  */
-ENTRY (__llrint)
-       CALL_MCOUNT
-       stwu    r1,-16(r1)
-       cfi_adjust_cfa_offset (16)
-       fctid   fp13,fp1
-       stfd    fp13,8(r1)
-/* Insure the following load is in a different dispatch group by
-   inserting "group ending nop".  */
-       ori     r1,r1,0
-       lwz     r3,8+HIWORD(r1)
-       lwz     r4,8+LOWORD(r1)
-       addi    r1,r1,16
-       blr
-       END (__llrint)
-
-libm_alias_double (__llrint, llrint)
diff --git a/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S b/sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S
deleted file mode 100644 (file)
index b4d013f..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/* Round float to long int.  PowerPC32 on PowerPC64 version.
-   Copyright (C) 2004-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 <sysdep.h>
-#include <libm-alias-float.h>
-
-/* long long int[r3, r4] __llrintf (float x[fp1])  */
-ENTRY (__llrintf)
-       CALL_MCOUNT
-       stwu    r1,-16(r1)
-       cfi_adjust_cfa_offset (16)
-       fctid   fp13,fp1
-       stfd    fp13,8(r1)
-/* Insure the following load is in a different dispatch group by
-   inserting "group ending nop".  */
-       ori     r1,r1,0
-       lwz     r3,8+HIWORD(r1)
-       lwz     r4,8+LOWORD(r1)
-       addi    r1,r1,16
-       blr
-       END (__llrintf)
-
-libm_alias_float (__llrint, llrint)
-