about summary refs log tree commit diff
path: root/sysdeps/powerpc/powerpc64/be
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc64/be')
-rw-r--r--sysdeps/powerpc/powerpc64/be/fpu/multiarch/Makefile10
-rw-r--r--sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb-power7.c20
-rw-r--r--sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb-ppc64.c23
-rw-r--r--sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb.c33
-rw-r--r--sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf-power7.c20
-rw-r--r--sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf-ppc64.c26
-rw-r--r--sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf.c33
-rw-r--r--sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl-power7.c20
-rw-r--r--sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl-ppc64.c21
-rw-r--r--sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl.c32
10 files changed, 238 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/Makefile b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/Makefile
index f5fa357d57..b27bad3ba4 100644
--- a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/Makefile
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/Makefile
@@ -32,6 +32,12 @@ libm-sysdep_routines += s_ceil-power5+ \
 			s_llround-power5+ \
 			s_llround-ppc64 \
 			s_llroundf-ppc64 \
+			s_logb-power7 \
+			s_logbf-power7 \
+			s_logbl-power7 \
+			s_logb-ppc64 \
+			s_logbf-ppc64 \
+			s_logbl-ppc64 \
 			$(sysdep_calls:s_%=m_%)
 
 CFLAGS-s_ceil-power5+.c = -mcpu=power5+
@@ -50,6 +56,10 @@ CFLAGS-s_llround-power5+.c += -mcpu=power5+
 
 CFLAGS-s_modf-power5+.c += -mcpu=power5+
 CFLAGS-s_modff-power5+.c += -mcpu=power5+
+CFLAGS-s_logbf-power7.c = -mcpu=power7
+CFLAGS-s_logbl-power7.c = -mcpu=power7
+CFLAGS-s_logb-power7.c = -mcpu=power7
+
 # These files quiet sNaNs in a way that is optimized away without
 # -fsignaling-nans.
 CFLAGS-s_modf-ppc64.c += -fsignaling-nans
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb-power7.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb-power7.c
new file mode 100644
index 0000000000..807bf58eeb
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb-power7.c
@@ -0,0 +1,20 @@
+/* logb().  PowerPC64/POWER7 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/>.  */
+
+#define __logb __logb_power7
+#include <sysdeps/powerpc/fpu/s_logb.c>
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb-ppc64.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb-ppc64.c
new file mode 100644
index 0000000000..8aae1e8f12
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb-ppc64.c
@@ -0,0 +1,23 @@
+/* logb(). PowerPC32/POWER7 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 <math.h>
+
+#define __logb __logb_ppc64
+
+#include <sysdeps/ieee754/dbl-64/s_logb.c>
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb.c
new file mode 100644
index 0000000000..b6d7225112
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logb.c
@@ -0,0 +1,33 @@
+/* Multiple versions of logb.
+   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 <math.h>
+#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
+#include "init-arch.h"
+#include <libm-alias-double.h>
+
+extern __typeof (__logb) __logb_ppc64 attribute_hidden;
+extern __typeof (__logb) __logb_power7 attribute_hidden;
+
+libc_ifunc (__logb,
+	    (hwcap & PPC_FEATURE_ARCH_2_06)
+	    ? __logb_power7
+            : __logb_ppc64);
+
+libm_alias_double (__logb, logb)
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf-power7.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf-power7.c
new file mode 100644
index 0000000000..4fee11dd84
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf-power7.c
@@ -0,0 +1,20 @@
+/* logb().  PowerPC64/POWER7 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/>.  */
+
+#define __logbf __logbf_power7
+#include <sysdeps/powerpc/fpu/s_logbf.c>
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf-ppc64.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf-ppc64.c
new file mode 100644
index 0000000000..727fabc03c
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf-ppc64.c
@@ -0,0 +1,26 @@
+/* logbf().  PowerPC64 default implementation.
+   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 <math.h>
+
+#undef weak_alias
+#define weak_alias(a, b)
+
+#define __logbf __logbf_ppc64
+
+#include <sysdeps/ieee754/flt-32/s_logbf.c>
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf.c
new file mode 100644
index 0000000000..46875dcde2
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbf.c
@@ -0,0 +1,33 @@
+/* Multiple versions of logbf.
+   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 <math.h>
+#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
+#include "init-arch.h"
+#include <libm-alias-float.h>
+
+extern __typeof (__logbf) __logbf_ppc64 attribute_hidden;
+extern __typeof (__logbf) __logbf_power7 attribute_hidden;
+
+libc_ifunc (__logbf,
+	    (hwcap & PPC_FEATURE_ARCH_2_06)
+	    ? __logbf_power7
+            : __logbf_ppc64);
+
+libm_alias_float (__logb, logb)
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl-power7.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl-power7.c
new file mode 100644
index 0000000000..c413d6e50d
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl-power7.c
@@ -0,0 +1,20 @@
+/* logb().  PowerPC64/POWER7 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/>.  */
+
+#define __logbl __logbl_power7
+#include <sysdeps/powerpc/fpu/s_logbl.c>
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl-ppc64.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl-ppc64.c
new file mode 100644
index 0000000000..ffe6e17d5e
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl-ppc64.c
@@ -0,0 +1,21 @@
+/* logbl(). PowerPC64/POWER7 version.
+   Copyright (C) 2012-2019 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#define __logbl __logbl_ppc64
+
+#include <sysdeps/ieee754/ldbl-128ibm/s_logbl.c>
diff --git a/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl.c b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl.c
new file mode 100644
index 0000000000..d44122a12b
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/be/fpu/multiarch/s_logbl.c
@@ -0,0 +1,32 @@
+/* Multiple versions of logbl.
+   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 <math.h>
+#include <math_ldbl_opt.h>
+#include <shlib-compat.h>
+#include "init-arch.h"
+
+extern __typeof (__logbl) __logbl_ppc64 attribute_hidden;
+extern __typeof (__logbl) __logbl_power7 attribute_hidden;
+
+libc_ifunc (__logbl,
+	    (hwcap & PPC_FEATURE_ARCH_2_06)
+	    ? __logbl_power7
+            : __logbl_ppc64);
+
+long_double_symbol (libm, __logbl, logbl);