|
|
a2cf7d |
commit 6cac323c8dd78668e65aaa29f044cbd33c1a66a5
|
|
|
a2cf7d |
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
a2cf7d |
Date: Fri Mar 15 18:42:00 2019 +0000
|
|
|
a2cf7d |
|
|
|
a2cf7d |
powerpc: ceil/ceilf refactor
|
|
|
a2cf7d |
|
|
|
a2cf7d |
This patches consolidates all the powerpc ceil{f} implementations on
|
|
|
a2cf7d |
the generic sysdeps/powerpc/fpu/s_ceil{f}. The generic implementation
|
|
|
a2cf7d |
uses either the compiler builts for ISA 2.03+ (which generates the frip
|
|
|
a2cf7d |
instruction) or a generic implementation which uses FP only operations.
|
|
|
a2cf7d |
|
|
|
a2cf7d |
It adds a generic implementation (round_to_integer.h) which is shared
|
|
|
a2cf7d |
with other rounding to integer routines. The resulting code should be
|
|
|
a2cf7d |
similar in term os performance to previous assembly one.
|
|
|
a2cf7d |
|
|
|
a2cf7d |
The IFUNC organization for powerpc64 is also change to be enabled only
|
|
|
a2cf7d |
for powerpc64 and not for powerpc64le (since minium ISA of 2.08 does not
|
|
|
a2cf7d |
require the fallback generic implementation).
|
|
|
a2cf7d |
|
|
|
a2cf7d |
Checked on powerpc-linux-gnu (built without --with-cpu, with
|
|
|
a2cf7d |
--with-cpu=power4 and with --with-cpu=power5+ and --disable-multi-arch),
|
|
|
a2cf7d |
powerpc64-linux-gnu (built without --with-cp and with --with-cpu=power5+
|
|
|
a2cf7d |
and --disable-multi-arch).
|
|
|
a2cf7d |
|
|
|
a2cf7d |
* sysdeps/powerpc/fpu/fenv_libc.h (__fesetround_inline_nocheck): New
|
|
|
a2cf7d |
function.
|
|
|
a2cf7d |
* sysdeps/powerpc/fpu/round_to_integer.h: New file.
|
|
|
a2cf7d |
* sysdeps/powerpc/fpu/s_ceil.c: Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/fpu/s_ceilf.c: Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Remove file.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/fpu/s_ceilf.S: Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
|
|
|
a2cf7d |
(CFLAGS-s_ceil-power5+.c, CFLAGS-s_ceilf-power5+.c): New rule.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.S:
|
|
|
a2cf7d |
Remove file.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.S:
|
|
|
a2cf7d |
Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.S:
|
|
|
a2cf7d |
Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.S:
|
|
|
a2cf7d |
Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.c:
|
|
|
a2cf7d |
New file.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.c:
|
|
|
a2cf7d |
Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.c:
|
|
|
a2cf7d |
Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.c:
|
|
|
a2cf7d |
Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S: Remove file.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S: Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/be/fpu/multiarch/Makefile: New file.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil-power5+.c:
|
|
|
a2cf7d |
Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil-ppc64.c:
|
|
|
a2cf7d |
Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c: Move to ...
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil.c: ... here.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf-power5+.c: New
|
|
|
a2cf7d |
file.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf-ppc64.c:
|
|
|
a2cf7d |
Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c: Move to ...
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf.c: ...
|
|
|
a2cf7d |
* here.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
|
|
|
a2cf7d |
(libm-sysdep_routines): Remove s_ceil-power5+, s_ceil-ppc64,
|
|
|
a2cf7d |
s_ceilf-power5+, and s_ceilf-ppc64.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-power5+.S: Remove
|
|
|
a2cf7d |
file.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-ppc64.S: Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-power5+.S: Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-ppc64.S: Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S: Likewise.
|
|
|
a2cf7d |
* sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S: Likewise.
|
|
|
a2cf7d |
|
|
|
a2cf7d |
Reviewed-by: Gabriel F. T. Gomes <gabriel@inconstante.eti.br>
|
|
|
a2cf7d |
|
|
|
a2cf7d |
Conflicts:
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc32/fpu/s_ceil.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc32/fpu/s_ceilf.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-power5+.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-ppc64.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-power5+.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-ppc64.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc64/fpu/s_ceil.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc64/fpu/s_ceilf.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S
|
|
|
a2cf7d |
sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S
|
|
|
a2cf7d |
(Removal after the copyright year header change upstream.)
|
|
|
a2cf7d |
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/fpu/fenv_libc.h b/sysdeps/powerpc/fpu/fenv_libc.h
|
|
|
a2cf7d |
index 4c19d12b0b31c1f9..a0128c66444a3e46 100644
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/fpu/fenv_libc.h
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/fpu/fenv_libc.h
|
|
|
a2cf7d |
@@ -98,6 +98,14 @@ __fesetround_inline (int round)
|
|
|
a2cf7d |
return 0;
|
|
|
a2cf7d |
}
|
|
|
a2cf7d |
|
|
|
a2cf7d |
+/* Same as __fesetround_inline, however without runtime check to use DFP
|
|
|
a2cf7d |
+ mtfsfi syntax (as relax_fenv_state) or if round value is valid. */
|
|
|
a2cf7d |
+static inline void
|
|
|
a2cf7d |
+__fesetround_inline_nocheck (const int round)
|
|
|
a2cf7d |
+{
|
|
|
a2cf7d |
+ asm volatile ("mtfsfi 7,%0" : : "i" (round));
|
|
|
a2cf7d |
+}
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
/* Definitions of all the FPSCR bit numbers */
|
|
|
a2cf7d |
enum {
|
|
|
a2cf7d |
FPSCR_FX = 0, /* exception summary */
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/fpu/round_to_integer.h b/sysdeps/powerpc/fpu/round_to_integer.h
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..c70afbb10f600d81
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/fpu/round_to_integer.h
|
|
|
a2cf7d |
@@ -0,0 +1,105 @@
|
|
|
a2cf7d |
+/* Round to integer generic implementation.
|
|
|
a2cf7d |
+ Copyright (C) 2019 Free Software Foundation, Inc.
|
|
|
a2cf7d |
+ This file is part of the GNU C Library
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
+ modify it under the terms of the GNU Library General Public License as
|
|
|
a2cf7d |
+ published by the Free Software Foundation; either version 2 of the
|
|
|
a2cf7d |
+ License, or (at your option) any later version.
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
+ Library General Public License for more details.
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ You should have received a copy of the GNU Library General Public
|
|
|
a2cf7d |
+ License along with the GNU C Library; see the file COPYING.LIB. If
|
|
|
a2cf7d |
+ not, see <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+#ifndef _ROUND_TO_INTEGER_H
|
|
|
a2cf7d |
+#define _ROUND_TO_INTEGER_H
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+#include <fenv_private.h>
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+enum round_mode
|
|
|
a2cf7d |
+{
|
|
|
a2cf7d |
+ CEIL
|
|
|
a2cf7d |
+};
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+static inline void
|
|
|
a2cf7d |
+set_fenv_mode (enum round_mode mode)
|
|
|
a2cf7d |
+{
|
|
|
a2cf7d |
+ int rmode;
|
|
|
a2cf7d |
+ switch (mode)
|
|
|
a2cf7d |
+ {
|
|
|
a2cf7d |
+ case CEIL: rmode = FE_UPWARD; break;
|
|
|
a2cf7d |
+ default: rmode = FE_TONEAREST; break;
|
|
|
a2cf7d |
+ }
|
|
|
a2cf7d |
+ __fesetround_inline_nocheck (rmode);
|
|
|
a2cf7d |
+}
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+static inline float
|
|
|
a2cf7d |
+round_to_integer_float (enum round_mode mode, float x)
|
|
|
a2cf7d |
+{
|
|
|
a2cf7d |
+ /* Ensure sNaN input is converted to qNaN. */
|
|
|
a2cf7d |
+ if (__glibc_unlikely (isnan (x)))
|
|
|
a2cf7d |
+ return x + x;
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ if (fabs (x) > 0x1p+23)
|
|
|
a2cf7d |
+ return x;
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ float r = x;
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ /* Save current FPU rounding mode and inexact state. */
|
|
|
a2cf7d |
+ fenv_t fe = fegetenv_register ();
|
|
|
a2cf7d |
+ set_fenv_mode (mode);
|
|
|
a2cf7d |
+ if (x > 0.0)
|
|
|
a2cf7d |
+ {
|
|
|
a2cf7d |
+ r += 0x1p+23;
|
|
|
a2cf7d |
+ r -= 0x1p+23;
|
|
|
a2cf7d |
+ r = fabs (r);
|
|
|
a2cf7d |
+ }
|
|
|
a2cf7d |
+ else if (x < 0.0)
|
|
|
a2cf7d |
+ {
|
|
|
a2cf7d |
+ r -= 0x1p+23;
|
|
|
a2cf7d |
+ r += 0x1p+23;
|
|
|
a2cf7d |
+ r = -fabs (r);
|
|
|
a2cf7d |
+ }
|
|
|
a2cf7d |
+ __builtin_mtfsf (0xff, fe);
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ return r;
|
|
|
a2cf7d |
+}
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+static inline double
|
|
|
a2cf7d |
+round_to_integer_double (enum round_mode mode, double x)
|
|
|
a2cf7d |
+{
|
|
|
a2cf7d |
+ /* Ensure sNaN input is converted to qNaN. */
|
|
|
a2cf7d |
+ if (__glibc_unlikely (isnan (x)))
|
|
|
a2cf7d |
+ return x + x;
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ if (fabs (x) > 0x1p+52)
|
|
|
a2cf7d |
+ return x;
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ double r = x;
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ /* Save current FPU rounding mode and inexact state. */
|
|
|
a2cf7d |
+ fenv_t fe = fegetenv_register ();
|
|
|
a2cf7d |
+ set_fenv_mode (mode);
|
|
|
a2cf7d |
+ if (x > 0.0)
|
|
|
a2cf7d |
+ {
|
|
|
a2cf7d |
+ r += 0x1p+52;
|
|
|
a2cf7d |
+ r -= 0x1p+52;
|
|
|
a2cf7d |
+ r = fabs (r);
|
|
|
a2cf7d |
+ }
|
|
|
a2cf7d |
+ else if (x < 0.0)
|
|
|
a2cf7d |
+ {
|
|
|
a2cf7d |
+ r -= 0x1p+52;
|
|
|
a2cf7d |
+ r += 0x1p+52;
|
|
|
a2cf7d |
+ r = -fabs (r);
|
|
|
a2cf7d |
+ }
|
|
|
a2cf7d |
+ __builtin_mtfsf (0xff, fe);
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ return r;
|
|
|
a2cf7d |
+}
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+#endif
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/fpu/s_ceil.c b/sysdeps/powerpc/fpu/s_ceil.c
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..49008c7af87d6d55
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/fpu/s_ceil.c
|
|
|
a2cf7d |
@@ -0,0 +1,35 @@
|
|
|
a2cf7d |
+/* Smallest integral value not less than argument. PowerPC version.
|
|
|
a2cf7d |
+ Copyright (C) 2019 Free Software Foundation, Inc.
|
|
|
a2cf7d |
+ This file is part of the GNU C Library
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
+ modify it under the terms of the GNU Library General Public License as
|
|
|
a2cf7d |
+ published by the Free Software Foundation; either version 2 of the
|
|
|
a2cf7d |
+ License, or (at your option) any later version.
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
+ Library General Public License for more details.
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ You should have received a copy of the GNU Library General Public
|
|
|
a2cf7d |
+ License along with the GNU C Library; see the file COPYING.LIB. If
|
|
|
a2cf7d |
+ not, see <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+#define NO_MATH_REDIRECT
|
|
|
a2cf7d |
+#include <math.h>
|
|
|
a2cf7d |
+#include <libm-alias-double.h>
|
|
|
a2cf7d |
+#include <round_to_integer.h>
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+double
|
|
|
a2cf7d |
+__ceil (double x)
|
|
|
a2cf7d |
+{
|
|
|
a2cf7d |
+#ifdef _ARCH_PWR5X
|
|
|
a2cf7d |
+ return __builtin_ceil (x);
|
|
|
a2cf7d |
+#else
|
|
|
a2cf7d |
+ return round_to_integer_double (CEIL, x);
|
|
|
a2cf7d |
+#endif
|
|
|
a2cf7d |
+}
|
|
|
a2cf7d |
+#ifndef __ceil
|
|
|
a2cf7d |
+libm_alias_double (__ceil, ceil)
|
|
|
a2cf7d |
+#endif
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/fpu/s_ceilf.c b/sysdeps/powerpc/fpu/s_ceilf.c
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..8c86bf30a34df4cf
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/fpu/s_ceilf.c
|
|
|
a2cf7d |
@@ -0,0 +1,35 @@
|
|
|
a2cf7d |
+/* Smallest integral value not less than argument. PowerPC version.
|
|
|
a2cf7d |
+ Copyright (C) 2019 Free Software Foundation, Inc.
|
|
|
a2cf7d |
+ This file is part of the GNU C Library
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
+ modify it under the terms of the GNU Library General Public License as
|
|
|
a2cf7d |
+ published by the Free Software Foundation; either version 2 of the
|
|
|
a2cf7d |
+ License, or (at your option) any later version.
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
+ Library General Public License for more details.
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+ You should have received a copy of the GNU Library General Public
|
|
|
a2cf7d |
+ License along with the GNU C Library; see the file COPYING.LIB. If
|
|
|
a2cf7d |
+ not, see <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+#define NO_MATH_REDIRECT
|
|
|
a2cf7d |
+#include <math.h>
|
|
|
a2cf7d |
+#include <libm-alias-float.h>
|
|
|
a2cf7d |
+#include <round_to_integer.h>
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+float
|
|
|
a2cf7d |
+__ceilf (float x)
|
|
|
a2cf7d |
+{
|
|
|
a2cf7d |
+#ifdef _ARCH_PWR5X
|
|
|
a2cf7d |
+ return __builtin_ceilf (x);
|
|
|
a2cf7d |
+#else
|
|
|
a2cf7d |
+ return round_to_integer_float (CEIL, x);
|
|
|
a2cf7d |
+#endif
|
|
|
a2cf7d |
+}
|
|
|
a2cf7d |
+#ifndef __ceilf
|
|
|
a2cf7d |
+libm_alias_float (__ceil, ceil)
|
|
|
a2cf7d |
+#endif
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_ceil.S b/sysdeps/powerpc/powerpc32/fpu/s_ceil.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index 7f2f97ada1a14a52..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc32/fpu/s_ceil.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,76 +0,0 @@
|
|
|
a2cf7d |
-/* ceil function. PowerPC32 version.
|
|
|
a2cf7d |
- Copyright (C) 2004-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-#include <math_ldbl_opt.h>
|
|
|
a2cf7d |
-#include <libm-alias-double.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- .section .rodata.cst4,"aM",@progbits,4
|
|
|
a2cf7d |
- .align 2
|
|
|
a2cf7d |
-.LC0: /* 2**52 */
|
|
|
a2cf7d |
- .long 0x59800000
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- .section ".text"
|
|
|
a2cf7d |
-ENTRY (__ceil)
|
|
|
a2cf7d |
-#ifdef SHARED
|
|
|
a2cf7d |
- mflr r11
|
|
|
a2cf7d |
- cfi_register(lr,r11)
|
|
|
a2cf7d |
- SETUP_GOT_ACCESS(r9,got_label)
|
|
|
a2cf7d |
- addis r9,r9,.LC0-got_label@ha
|
|
|
a2cf7d |
- lfs fp13,.LC0-got_label@l(r9)
|
|
|
a2cf7d |
- mtlr r11
|
|
|
a2cf7d |
- cfi_same_value (lr)
|
|
|
a2cf7d |
-#else
|
|
|
a2cf7d |
- lis r9,.LC0@ha
|
|
|
a2cf7d |
- lfs fp13,.LC0@l(r9)
|
|
|
a2cf7d |
-#endif
|
|
|
a2cf7d |
- fabs fp0,fp1
|
|
|
a2cf7d |
- fsub fp12,fp13,fp13 /* generate 0.0 */
|
|
|
a2cf7d |
- fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */
|
|
|
a2cf7d |
- mffs fp11 /* Save current FPU rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
|
|
|
a2cf7d |
- bnl- cr7,.L10
|
|
|
a2cf7d |
- mtfsfi 7,2 /* Set rounding mode toward +inf. */
|
|
|
a2cf7d |
- ble- cr6,.L4
|
|
|
a2cf7d |
- fadd fp1,fp1,fp13 /* x+= TWO52; */
|
|
|
a2cf7d |
- fsub fp1,fp1,fp13 /* x-= TWO52; */
|
|
|
a2cf7d |
- fabs fp1,fp1 /* if (x == 0.0) */
|
|
|
a2cf7d |
- /* x = 0.0; */
|
|
|
a2cf7d |
- mtfsf 0xff,fp11 /* Restore previous rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
-.L4:
|
|
|
a2cf7d |
- bge- cr6,.L9 /* if (x < 0.0) */
|
|
|
a2cf7d |
- fsub fp1,fp1,fp13 /* x-= TWO52; */
|
|
|
a2cf7d |
- fadd fp1,fp1,fp13 /* x+= TWO52; */
|
|
|
a2cf7d |
- fnabs fp1,fp1 /* if (x == 0.0) */
|
|
|
a2cf7d |
- /* x = -0.0; */
|
|
|
a2cf7d |
-.L9:
|
|
|
a2cf7d |
- mtfsf 0xff,fp11 /* Restore previous rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
-.L10:
|
|
|
a2cf7d |
- /* Ensure sNaN input is converted to qNaN. */
|
|
|
a2cf7d |
- fcmpu cr7,fp1,fp1
|
|
|
a2cf7d |
- beqlr cr7
|
|
|
a2cf7d |
- fadd fp1,fp1,fp1
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
- END (__ceil)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-libm_alias_double (__ceil, ceil)
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc32/fpu/s_ceilf.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index 3f5949004fa51baf..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc32/fpu/s_ceilf.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,76 +0,0 @@
|
|
|
a2cf7d |
-/* float ceil function. PowerPC32 version.
|
|
|
a2cf7d |
- Copyright (C) 2004-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-#include <libm-alias-float.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- .section .rodata.cst4,"aM",@progbits,4
|
|
|
a2cf7d |
- .align 2
|
|
|
a2cf7d |
-.LC0: /* 2**23 */
|
|
|
a2cf7d |
- .long 0x4b000000
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- .section ".text"
|
|
|
a2cf7d |
-ENTRY (__ceilf)
|
|
|
a2cf7d |
-#ifdef SHARED
|
|
|
a2cf7d |
- mflr r11
|
|
|
a2cf7d |
- cfi_register(lr,r11)
|
|
|
a2cf7d |
- SETUP_GOT_ACCESS(r9,got_label)
|
|
|
a2cf7d |
- addis r9,r9,.LC0-got_label@ha
|
|
|
a2cf7d |
- lfs fp13,.LC0-got_label@l(r9)
|
|
|
a2cf7d |
- mtlr r11
|
|
|
a2cf7d |
- cfi_same_value (lr)
|
|
|
a2cf7d |
-#else
|
|
|
a2cf7d |
- lis r9,.LC0@ha
|
|
|
a2cf7d |
- lfs fp13,.LC0@l(r9)
|
|
|
a2cf7d |
-#endif
|
|
|
a2cf7d |
- fabs fp0,fp1
|
|
|
a2cf7d |
- fsubs fp12,fp13,fp13 /* generate 0.0 */
|
|
|
a2cf7d |
- fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23) */
|
|
|
a2cf7d |
- mffs fp11 /* Save current FPU rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
|
|
|
a2cf7d |
- bnl- cr7,.L10
|
|
|
a2cf7d |
- mtfsfi 7,2 /* Set rounding mode toward +inf. */
|
|
|
a2cf7d |
- ble- cr6,.L4
|
|
|
a2cf7d |
- fadds fp1,fp1,fp13 /* x+= TWO23; */
|
|
|
a2cf7d |
- fsubs fp1,fp1,fp13 /* x-= TWO23; */
|
|
|
a2cf7d |
- fabs fp1,fp1 /* if (x == 0.0) */
|
|
|
a2cf7d |
- /* x = 0.0; */
|
|
|
a2cf7d |
- mtfsf 0xff,fp11 /* Restore previous rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
-.L4:
|
|
|
a2cf7d |
- bge- cr6,.L9 /* if (x < 0.0) */
|
|
|
a2cf7d |
- fsubs fp1,fp1,fp13 /* x-= TWO23; */
|
|
|
a2cf7d |
- fadds fp1,fp1,fp13 /* x+= TWO23; */
|
|
|
a2cf7d |
- fnabs fp1,fp1 /* if (x == 0.0) */
|
|
|
a2cf7d |
- /* x = -0.0; */
|
|
|
a2cf7d |
-.L9:
|
|
|
a2cf7d |
- mtfsf 0xff,fp11 /* Restore previous rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
-.L10:
|
|
|
a2cf7d |
- /* Ensure sNaN input is converted to qNaN. */
|
|
|
a2cf7d |
- fcmpu cr7,fp1,fp1
|
|
|
a2cf7d |
- beqlr cr7
|
|
|
a2cf7d |
- fadds fp1,fp1,fp1
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
- END (__ceilf)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-libm_alias_float (__ceil, ceil)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
|
|
|
a2cf7d |
index 4e85021d50831eb6..cf38e347f2da74e9 100644
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/Makefile
|
|
|
a2cf7d |
@@ -26,6 +26,8 @@ libm-sysdep_routines += s_llrintf-power6 s_llrintf-ppc32 s_llrint-power6 \
|
|
|
a2cf7d |
s_logbf-power7 s_logbf-ppc32 e_hypot-power7 \
|
|
|
a2cf7d |
e_hypot-ppc32 e_hypotf-power7 e_hypotf-ppc32
|
|
|
a2cf7d |
|
|
|
a2cf7d |
+CFLAGS-s_ceil-power5+.c = -mcpu=power5+
|
|
|
a2cf7d |
+CFLAGS-s_ceilf-power5+.c = -mcpu=power5+
|
|
|
a2cf7d |
CFLAGS-s_modf-power5+.c = -mcpu=power5+
|
|
|
a2cf7d |
CFLAGS-s_modff-power5+.c = -mcpu=power5+
|
|
|
a2cf7d |
CFLAGS-s_logbl-power7.c = -mcpu=power7
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index b8181585a869bd8a..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,33 +0,0 @@
|
|
|
a2cf7d |
-/* ceil function. PowerPC32/power5+ version.
|
|
|
a2cf7d |
- Copyright (C) 2013-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-#include <math_ldbl_opt.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#undef hidden_def
|
|
|
a2cf7d |
-#define hidden_def(name)
|
|
|
a2cf7d |
-#undef weak_alias
|
|
|
a2cf7d |
-#define weak_alias(name, alias)
|
|
|
a2cf7d |
-#undef strong_alias
|
|
|
a2cf7d |
-#define strong_alias(name, alias)
|
|
|
a2cf7d |
-#undef compat_symbol
|
|
|
a2cf7d |
-#define compat_symbol(lib, name, alias, ver)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#define __ceil __ceil_power5plus
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.c
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..87bc66cdb0322c59
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-power5+.c
|
|
|
a2cf7d |
@@ -0,0 +1,3 @@
|
|
|
a2cf7d |
+#include <math.h>
|
|
|
a2cf7d |
+#define __ceil __ceil_power5plus
|
|
|
a2cf7d |
+#include <sysdeps/powerpc/fpu/s_ceil.c>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index cd2bc69b677e76db..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,31 +0,0 @@
|
|
|
a2cf7d |
-/* ceil function. PowerPC32 default version.
|
|
|
a2cf7d |
- Copyright (C) 2013-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-#include <math_ldbl_opt.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#undef weak_alias
|
|
|
a2cf7d |
-#define weak_alias(a,b)
|
|
|
a2cf7d |
-#undef strong_alias
|
|
|
a2cf7d |
-#define strong_alias(a,b)
|
|
|
a2cf7d |
-#undef compat_symbol
|
|
|
a2cf7d |
-#define compat_symbol(a,b,c,d)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#define __ceil __ceil_ppc32
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdeps/powerpc/powerpc32/fpu/s_ceil.S>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.c
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..93c098476b915f9d
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceil-ppc32.c
|
|
|
a2cf7d |
@@ -0,0 +1,3 @@
|
|
|
a2cf7d |
+#include <math.h>
|
|
|
a2cf7d |
+#define __ceil __ceil_ppc32
|
|
|
a2cf7d |
+#include <sysdeps/powerpc/fpu/s_ceil.c>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index d01aa6e7db3d0b9d..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,26 +0,0 @@
|
|
|
a2cf7d |
-/* ceilf function. PowerPC32/power5+ version.
|
|
|
a2cf7d |
- Copyright (C) 2013-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#undef weak_alias
|
|
|
a2cf7d |
-#define weak_alias(name, alias)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#define __ceilf __ceilf_power5plus
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.c
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..a5bfa98535c088a0
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-power5+.c
|
|
|
a2cf7d |
@@ -0,0 +1,3 @@
|
|
|
a2cf7d |
+#include <math.h>
|
|
|
a2cf7d |
+#define __ceilf __ceilf_power5plus
|
|
|
a2cf7d |
+#include <sysdeps/powerpc/fpu/s_ceilf.c>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.S b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index 264e032b3b27f9b3..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,27 +0,0 @@
|
|
|
a2cf7d |
-/* ceilf function. PowerPC32 default version.
|
|
|
a2cf7d |
- Copyright (C) 2013-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-#include <math_ldbl_opt.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#undef weak_alias
|
|
|
a2cf7d |
-#define weak_alias(a,b)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#define __ceilf __ceilf_ppc32
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdeps/powerpc/powerpc32/fpu/s_ceilf.S>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.c b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.c
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..a4dcdcb4069289d6
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf-ppc32.c
|
|
|
a2cf7d |
@@ -0,0 +1,3 @@
|
|
|
a2cf7d |
+#include <math.h>
|
|
|
a2cf7d |
+#define __ceilf __ceilf_ppc32
|
|
|
a2cf7d |
+#include <sysdeps/powerpc/fpu/s_ceilf.c>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index 356c7a79edf79940..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceil.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,29 +0,0 @@
|
|
|
a2cf7d |
-/* ceil function. PowerPC32/power5+ version.
|
|
|
a2cf7d |
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-#include <math_ldbl_opt.h>
|
|
|
a2cf7d |
-#include <libm-alias-double.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- .machine "power5"
|
|
|
a2cf7d |
-EALIGN (__ceil, 4, 0)
|
|
|
a2cf7d |
- frip fp1, fp1
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
- END (__ceil)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-libm_alias_double (__ceil, ceil)
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index a0bcda17fde0c0f6..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,30 +0,0 @@
|
|
|
a2cf7d |
-/* ceilf function. PowerPC32/power5+ version.
|
|
|
a2cf7d |
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-#include <libm-alias-float.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- .machine "power5"
|
|
|
a2cf7d |
-EALIGN (__ceilf, 4, 0)
|
|
|
a2cf7d |
- frip fp1, fp1 /* The rounding instructions are double. */
|
|
|
a2cf7d |
- frsp fp1, fp1 /* But we need to set ooverflow for float. */
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
- END (__ceilf)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-libm_alias_float (__ceil, ceil)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/Makefile
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..932c3c7e6c6ad27e
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/Makefile
|
|
|
a2cf7d |
@@ -0,0 +1,9 @@
|
|
|
a2cf7d |
+ifeq ($(subdir),math)
|
|
|
a2cf7d |
+libm-sysdep_routines += s_ceil-power5+ \
|
|
|
a2cf7d |
+ s_ceil-ppc64 \
|
|
|
a2cf7d |
+ s_ceilf-power5+ \
|
|
|
a2cf7d |
+ s_ceilf-ppc64
|
|
|
a2cf7d |
+
|
|
|
a2cf7d |
+CFLAGS-s_ceil-power5+.c = -mcpu=power5+
|
|
|
a2cf7d |
+CFLAGS-s_ceilf-power5+.c = -mcpu=power5+
|
|
|
a2cf7d |
+endif
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil-power5+.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil-power5+.c
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..87bc66cdb0322c59
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil-power5+.c
|
|
|
a2cf7d |
@@ -0,0 +1,3 @@
|
|
|
a2cf7d |
+#include <math.h>
|
|
|
a2cf7d |
+#define __ceil __ceil_power5plus
|
|
|
a2cf7d |
+#include <sysdeps/powerpc/fpu/s_ceil.c>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil-ppc64.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil-ppc64.c
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..8711ff3229467026
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil-ppc64.c
|
|
|
a2cf7d |
@@ -0,0 +1,3 @@
|
|
|
a2cf7d |
+#include <math.h>
|
|
|
a2cf7d |
+#define __ceil __ceil_ppc64
|
|
|
a2cf7d |
+#include <sysdeps/powerpc/fpu/s_ceil.c>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil.c
|
|
|
a2cf7d |
similarity index 95%
|
|
|
a2cf7d |
rename from sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c
|
|
|
a2cf7d |
rename to sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil.c
|
|
|
a2cf7d |
index 5cde4eb46f26ec82..1abca7ef63d6a852 100644
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil.c
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceil.c
|
|
|
a2cf7d |
@@ -17,10 +17,8 @@
|
|
|
a2cf7d |
<http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
|
|
|
a2cf7d |
#include <math.h>
|
|
|
a2cf7d |
-#include <math_ldbl_opt.h>
|
|
|
a2cf7d |
-#include <shlib-compat.h>
|
|
|
a2cf7d |
-#include "init-arch.h"
|
|
|
a2cf7d |
#include <libm-alias-double.h>
|
|
|
a2cf7d |
+#include "init-arch.h"
|
|
|
a2cf7d |
|
|
|
a2cf7d |
extern __typeof (__ceil) __ceil_ppc64 attribute_hidden;
|
|
|
a2cf7d |
extern __typeof (__ceil) __ceil_power5plus attribute_hidden;
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf-power5+.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf-power5+.c
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..a5bfa98535c088a0
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf-power5+.c
|
|
|
a2cf7d |
@@ -0,0 +1,3 @@
|
|
|
a2cf7d |
+#include <math.h>
|
|
|
a2cf7d |
+#define __ceilf __ceilf_power5plus
|
|
|
a2cf7d |
+#include <sysdeps/powerpc/fpu/s_ceilf.c>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf-ppc64.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf-ppc64.c
|
|
|
a2cf7d |
new file mode 100644
|
|
|
a2cf7d |
index 0000000000000000..086251dc0937acfa
|
|
|
a2cf7d |
--- /dev/null
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf-ppc64.c
|
|
|
a2cf7d |
@@ -0,0 +1,3 @@
|
|
|
a2cf7d |
+#include <math.h>
|
|
|
a2cf7d |
+#define __ceilf __ceilf_ppc64
|
|
|
a2cf7d |
+#include <sysdeps/powerpc/fpu/s_ceilf.c>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf.c
|
|
|
a2cf7d |
similarity index 95%
|
|
|
a2cf7d |
rename from sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c
|
|
|
a2cf7d |
rename to sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf.c
|
|
|
a2cf7d |
index 18697e52b3ac1616..33245968a86ddcf5 100644
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_ceilf.c
|
|
|
a2cf7d |
@@ -17,10 +17,8 @@
|
|
|
a2cf7d |
<http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
|
|
|
a2cf7d |
#include <math.h>
|
|
|
a2cf7d |
-#include <math_ldbl_opt.h>
|
|
|
a2cf7d |
-#include <shlib-compat.h>
|
|
|
a2cf7d |
-#include "init-arch.h"
|
|
|
a2cf7d |
#include <libm-alias-float.h>
|
|
|
a2cf7d |
+#include "init-arch.h"
|
|
|
a2cf7d |
|
|
|
a2cf7d |
extern __typeof (__ceilf) __ceilf_ppc64 attribute_hidden;
|
|
|
a2cf7d |
extern __typeof (__ceilf) __ceilf_power5plus attribute_hidden;
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
|
|
|
a2cf7d |
index 73f2f693771027a9..2805e4e0d66f3175 100644
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
|
|
|
a2cf7d |
+++ b/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
|
|
|
a2cf7d |
@@ -14,8 +14,7 @@ sysdep_calls := s_copysign-power6 s_copysign-ppc64 \
|
|
|
a2cf7d |
|
|
|
a2cf7d |
sysdep_routines += $(sysdep_calls)
|
|
|
a2cf7d |
libm-sysdep_routines += s_llround-power6x \
|
|
|
a2cf7d |
- s_llround-power5+ s_llround-ppc64 s_ceil-power5+ \
|
|
|
a2cf7d |
- s_ceil-ppc64 s_ceilf-power5+ s_ceilf-ppc64 \
|
|
|
a2cf7d |
+ s_llround-power5+ s_llround-ppc64 \
|
|
|
a2cf7d |
s_floor-power5+ s_floor-ppc64 s_floorf-power5+ \
|
|
|
a2cf7d |
s_floorf-ppc64 s_round-power5+ s_round-ppc64 \
|
|
|
a2cf7d |
s_roundf-power5+ s_roundf-ppc64 s_trunc-power5+ \
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-power5+.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-power5+.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index 76651b694c251bb4..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-power5+.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,30 +0,0 @@
|
|
|
a2cf7d |
-/* ceil function. PowerPC64/power5+ version.
|
|
|
a2cf7d |
- Copyright (C) 2013-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <shlib-compat.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#undef weak_alias
|
|
|
a2cf7d |
-#define weak_alias(a,b)
|
|
|
a2cf7d |
-#undef strong_alias
|
|
|
a2cf7d |
-#define strong_alias(a,b)
|
|
|
a2cf7d |
-#undef compat_symbol
|
|
|
a2cf7d |
-#define compat_symbol(a,b,c,d)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#define __ceil __ceil_power5plus
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-ppc64.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index c75c66ba3bbf49c8..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceil-ppc64.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,30 +0,0 @@
|
|
|
a2cf7d |
-/* ceil function. PowerPC64 default version.
|
|
|
a2cf7d |
- Copyright (C) 2013-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <shlib-compat.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#undef weak_alias
|
|
|
a2cf7d |
-#define weak_alias(a,b)
|
|
|
a2cf7d |
-#undef strong_alias
|
|
|
a2cf7d |
-#define strong_alias(a,b)
|
|
|
a2cf7d |
-#undef compat_symbol
|
|
|
a2cf7d |
-#define compat_symbol(a,b,c,d)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#define __ceil __ceil_ppc64
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdeps/powerpc/powerpc64/fpu/s_ceil.S>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-power5+.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-power5+.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index b9c9e14fba6ee134..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-power5+.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,24 +0,0 @@
|
|
|
a2cf7d |
-/* ceilf function. PowerPC64/power5+ version.
|
|
|
a2cf7d |
- Copyright (C) 2013-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#undef weak_alias
|
|
|
a2cf7d |
-#define weak_alias(a,b)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#define __ceilf __ceilf_power5plus
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-ppc64.S b/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-ppc64.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index ce5cc49770fdfdee..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf-ppc64.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,24 +0,0 @@
|
|
|
a2cf7d |
-/* ceilf function. PowerPC64 default version.
|
|
|
a2cf7d |
- Copyright (C) 2013-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#undef weak_alias
|
|
|
a2cf7d |
-#define weak_alias(a,b)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#define __ceilf __ceilf_ppc64
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdeps/powerpc/powerpc64/fpu/s_ceilf.S>
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_ceil.S b/sysdeps/powerpc/powerpc64/fpu/s_ceil.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index 252d94f51ea1a167..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc64/fpu/s_ceil.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,65 +0,0 @@
|
|
|
a2cf7d |
-/* ceil function. PowerPC64 version.
|
|
|
a2cf7d |
- Copyright (C) 2004-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-#include <math_ldbl_opt.h>
|
|
|
a2cf7d |
-#include <libm-alias-double.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- .section ".toc","aw"
|
|
|
a2cf7d |
-.LC0: /* 2**52 */
|
|
|
a2cf7d |
- .tc FD_43300000_0[TC],0x4330000000000000
|
|
|
a2cf7d |
- .section ".text"
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-ENTRY (__ceil, 4)
|
|
|
a2cf7d |
- CALL_MCOUNT 0
|
|
|
a2cf7d |
- lfd fp13,.LC0@toc(2)
|
|
|
a2cf7d |
- fabs fp0,fp1
|
|
|
a2cf7d |
- fsub fp12,fp13,fp13 /* generate 0.0 */
|
|
|
a2cf7d |
- fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */
|
|
|
a2cf7d |
- mffs fp11 /* Save current FPU rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
|
|
|
a2cf7d |
- bnl- cr7,.L10
|
|
|
a2cf7d |
- mtfsfi 7,2 /* Set rounding mode toward +inf. */
|
|
|
a2cf7d |
- ble- cr6,.L4
|
|
|
a2cf7d |
- fadd fp1,fp1,fp13 /* x+= TWO52; */
|
|
|
a2cf7d |
- fsub fp1,fp1,fp13 /* x-= TWO52; */
|
|
|
a2cf7d |
- fabs fp1,fp1 /* if (x == 0.0) */
|
|
|
a2cf7d |
- /* x = 0.0; */
|
|
|
a2cf7d |
- mtfsf 0xff,fp11 /* Restore previous rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
-.L4:
|
|
|
a2cf7d |
- bge- cr6,.L9 /* if (x < 0.0) */
|
|
|
a2cf7d |
- fsub fp1,fp1,fp13 /* x-= TWO52; */
|
|
|
a2cf7d |
- fadd fp1,fp1,fp13 /* x+= TWO52; */
|
|
|
a2cf7d |
- fnabs fp1,fp1 /* if (x == 0.0) */
|
|
|
a2cf7d |
- /* x = -0.0; */
|
|
|
a2cf7d |
-.L9:
|
|
|
a2cf7d |
- mtfsf 0xff,fp11 /* Restore previous rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
-.L10:
|
|
|
a2cf7d |
- /* Ensure sNaN input is converted to qNaN. */
|
|
|
a2cf7d |
- fcmpu cr7,fp1,fp1
|
|
|
a2cf7d |
- beqlr cr7
|
|
|
a2cf7d |
- fadd fp1,fp1,fp1
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
- END (__ceil)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-libm_alias_double (__ceil, ceil)
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index 3c62077c143eeced..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,67 +0,0 @@
|
|
|
a2cf7d |
-/* float ceil function. PowerPC64 version.
|
|
|
a2cf7d |
- Copyright (C) 2004-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-#include <libm-alias-float.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- .section ".toc","aw"
|
|
|
a2cf7d |
- .p2align 3
|
|
|
a2cf7d |
-.LC0: /* 2**23 */
|
|
|
a2cf7d |
- .long 0x4b000000
|
|
|
a2cf7d |
- .long 0x0
|
|
|
a2cf7d |
- .section ".text"
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-ENTRY (__ceilf, 4)
|
|
|
a2cf7d |
- CALL_MCOUNT 0
|
|
|
a2cf7d |
- lfs fp13,.LC0@toc(2)
|
|
|
a2cf7d |
- fabs fp0,fp1
|
|
|
a2cf7d |
- fsubs fp12,fp13,fp13 /* generate 0.0 */
|
|
|
a2cf7d |
- fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23) */
|
|
|
a2cf7d |
- mffs fp11 /* Save current FPU rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
|
|
|
a2cf7d |
- bnl- cr7,.L10
|
|
|
a2cf7d |
- mtfsfi 7,2 /* Set rounding mode toward +inf. */
|
|
|
a2cf7d |
- ble- cr6,.L4
|
|
|
a2cf7d |
- fadds fp1,fp1,fp13 /* x+= TWO23; */
|
|
|
a2cf7d |
- fsubs fp1,fp1,fp13 /* x-= TWO23; */
|
|
|
a2cf7d |
- fabs fp1,fp1 /* if (x == 0.0) */
|
|
|
a2cf7d |
- /* x = 0.0; */
|
|
|
a2cf7d |
- mtfsf 0xff,fp11 /* Restore previous rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
-.L4:
|
|
|
a2cf7d |
- bge- cr6,.L9 /* if (x < 0.0) */
|
|
|
a2cf7d |
- fsubs fp1,fp1,fp13 /* x-= TWO23; */
|
|
|
a2cf7d |
- fadds fp1,fp1,fp13 /* x+= TWO23; */
|
|
|
a2cf7d |
- fnabs fp1,fp1 /* if (x == 0.0) */
|
|
|
a2cf7d |
- /* x = -0.0; */
|
|
|
a2cf7d |
-.L9:
|
|
|
a2cf7d |
- mtfsf 0xff,fp11 /* Restore previous rounding mode and
|
|
|
a2cf7d |
- "inexact" state. */
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
-.L10:
|
|
|
a2cf7d |
- /* Ensure sNaN input is converted to qNaN. */
|
|
|
a2cf7d |
- fcmpu cr7,fp1,fp1
|
|
|
a2cf7d |
- beqlr cr7
|
|
|
a2cf7d |
- fadds fp1,fp1,fp1
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
- END (__ceilf)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-libm_alias_float (__ceil, ceil)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index e500932573c07503..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,30 +0,0 @@
|
|
|
a2cf7d |
-/* ceil function. PowerPC64/power5+ version.
|
|
|
a2cf7d |
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-#include <math_ldbl_opt.h>
|
|
|
a2cf7d |
-#include <libm-alias-double.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- .machine "power5"
|
|
|
a2cf7d |
-ENTRY_TOCLESS (__ceil, 4)
|
|
|
a2cf7d |
- CALL_MCOUNT 0
|
|
|
a2cf7d |
- frip fp1, fp1
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
- END (__ceil)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-libm_alias_double (__ceil, ceil)
|
|
|
a2cf7d |
diff --git a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S
|
|
|
a2cf7d |
deleted file mode 100644
|
|
|
a2cf7d |
index d0b2118c2a3f81be..0000000000000000
|
|
|
a2cf7d |
--- a/sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S
|
|
|
a2cf7d |
+++ /dev/null
|
|
|
a2cf7d |
@@ -1,31 +0,0 @@
|
|
|
a2cf7d |
-/* ceilf function. PowerPC64/power5+ version.
|
|
|
a2cf7d |
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
|
|
|
a2cf7d |
- This file is part of the GNU C Library.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is free software; you can redistribute it and/or
|
|
|
a2cf7d |
- modify it under the terms of the GNU Lesser General Public
|
|
|
a2cf7d |
- License as published by the Free Software Foundation; either
|
|
|
a2cf7d |
- version 2.1 of the License, or (at your option) any later version.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- The GNU C Library is distributed in the hope that it will be useful,
|
|
|
a2cf7d |
- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
a2cf7d |
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
a2cf7d |
- Lesser General Public License for more details.
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- You should have received a copy of the GNU Lesser General Public
|
|
|
a2cf7d |
- License along with the GNU C Library; if not, see
|
|
|
a2cf7d |
- <http://www.gnu.org/licenses/>. */
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-#include <sysdep.h>
|
|
|
a2cf7d |
-#include <libm-alias-float.h>
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
- .machine "power5"
|
|
|
a2cf7d |
-ENTRY_TOCLESS (__ceilf, 4)
|
|
|
a2cf7d |
- CALL_MCOUNT 0
|
|
|
a2cf7d |
- frip fp1, fp1 /* The rounding instructions are double. */
|
|
|
a2cf7d |
- frsp fp1, fp1 /* But we need to set ooverflow for float. */
|
|
|
a2cf7d |
- blr
|
|
|
a2cf7d |
- END (__ceilf)
|
|
|
a2cf7d |
-
|
|
|
a2cf7d |
-libm_alias_float (__ceil, ceil)
|
|
|
a2cf7d |
-
|