aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/include/powerpc-linux-gnu
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/include/powerpc-linux-gnu')
-rw-r--r--lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h102
-rw-r--r--lib/libc/include/powerpc-linux-gnu/bits/hwcap.h4
-rw-r--r--lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h2
-rw-r--r--lib/libc/include/powerpc-linux-gnu/bits/long-double.h2
-rw-r--r--lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h26
-rw-r--r--lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h26
-rw-r--r--lib/libc/include/powerpc-linux-gnu/bits/semaphore.h5
-rw-r--r--lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h28
-rw-r--r--lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h2
-rw-r--r--lib/libc/include/powerpc-linux-gnu/ieee754.h68
10 files changed, 73 insertions, 192 deletions
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h b/lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h
deleted file mode 100644
index 695d3a395d..0000000000
--- a/lib/libc/include/powerpc-linux-gnu/bits/fenvinline.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Inline floating-point environment handling functions for powerpc.
- Copyright (C) 1995-2020 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
- <https://www.gnu.org/licenses/>. */
-
-#if defined __GNUC__ && !defined _SOFT_FLOAT && !defined __NO_FPRS__
-
-/* Inline definitions for fegetround. */
-# define __fegetround_ISA300() \
- (__extension__ ({ \
- union { double __d; unsigned long long __ll; } __u; \
- __asm__ __volatile__ ( \
- ".machine push; .machine \"power9\"; mffsl %0; .machine pop" \
- : "=f" (__u.__d)); \
- __u.__ll & 0x0000000000000003LL; \
- }))
-
-# define __fegetround_ISA2() \
- (__extension__ ({ \
- int __fegetround_result; \
- __asm__ __volatile__ ("mcrfs 7,7 ; mfcr %0" \
- : "=r"(__fegetround_result) : : "cr7"); \
- __fegetround_result & 3; \
- }))
-
-# ifdef _ARCH_PWR9
-# define __fegetround() __fegetround_ISA300()
-# elif defined __BUILTIN_CPU_SUPPORTS__
-# define __fegetround() \
- (__glibc_likely (__builtin_cpu_supports ("arch_3_00")) \
- ? __fegetround_ISA300() \
- : __fegetround_ISA2() \
- )
-# else
-# define __fegetround() __fegetround_ISA2()
-# endif
-
-# define fegetround() __fegetround ()
-
-# ifndef __NO_MATH_INLINES
-/* The weird 'i#*X' constraints on the following suppress a gcc
- warning when __excepts is not a constant. Otherwise, they mean the
- same as just plain 'i'. */
-
-# if __GNUC_PREREQ(3, 4)
-
-/* Inline definition for feraiseexcept. */
-# define feraiseexcept(__excepts) \
- (__extension__ ({ \
- int __e = __excepts; \
- int __ret; \
- if (__builtin_constant_p (__e) \
- && (__e & (__e - 1)) == 0 \
- && __e != FE_INVALID) \
- { \
- if (__e != 0) \
- __asm__ __volatile__ ("mtfsb1 %0" \
- : : "i#*X" (__builtin_clz (__e))); \
- __ret = 0; \
- } \
- else \
- __ret = feraiseexcept (__e); \
- __ret; \
- }))
-
-/* Inline definition for feclearexcept. */
-# define feclearexcept(__excepts) \
- (__extension__ ({ \
- int __e = __excepts; \
- int __ret; \
- if (__builtin_constant_p (__e) \
- && (__e & (__e - 1)) == 0 \
- && __e != FE_INVALID) \
- { \
- if (__e != 0) \
- __asm__ __volatile__ ("mtfsb0 %0" \
- : : "i#*X" (__builtin_clz (__e))); \
- __ret = 0; \
- } \
- else \
- __ret = feclearexcept (__e); \
- __ret; \
- }))
-
-# endif /* __GNUC_PREREQ(3, 4). */
-
-# endif /* !__NO_MATH_INLINES. */
-
-#endif /* __GNUC__ && !_SOFT_FLOAT && !__NO_FPRS__ */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h b/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h
index 335efbd0aa..5719e16ac2 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/hwcap.h
@@ -73,4 +73,6 @@
#define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */
#define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */
#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended
- state. */ \ No newline at end of file
+ state. */
+#define PPC_FEATURE2_ARCH_3_1 0x00040000 /* ISA 3.1. */
+#define PPC_FEATURE2_MMA 0x00020000 /* Matrix-Multiply Assist. */ \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h b/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h
index 8818d6fa08..c94a446c49 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/iscanonical.h
@@ -20,7 +20,7 @@
# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
#endif
-#ifdef __NO_LONG_DOUBLE_MATH
+#if defined (__NO_LONG_DOUBLE_MATH) || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
# define iscanonical(x) ((void) (__typeof (x)) (x), 1)
#else
extern int __iscanonicall (long double __x)
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/long-double.h b/lib/libc/include/powerpc-linux-gnu/bits/long-double.h
index 391f7d62fe..b37f1929bd 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/long-double.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/long-double.h
@@ -22,4 +22,4 @@
# define __NO_LONG_DOUBLE_MATH 1
# endif
#endif
-#define __LONG_DOUBLE_USES_FLOAT128 0 \ No newline at end of file
+#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h b/lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h
deleted file mode 100644
index c72a8507da..0000000000
--- a/lib/libc/include/powerpc-linux-gnu/bits/msq-pad.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Define where padding goes in struct msqid_ds. PowerPC version.
- Copyright (C) 2018-2020 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
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_MSG_H
-# error "Never use <bits/msq-pad.h> directly; include <sys/msg.h> instead."
-#endif
-
-#include <bits/timesize.h>
-
-#define __MSQ_PAD_AFTER_TIME 0
-#define __MSQ_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h b/lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h
deleted file mode 100644
index e6aca78279..0000000000
--- a/lib/libc/include/powerpc-linux-gnu/bits/sem-pad.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Define where padding goes in struct semid_ds. PowerPC version.
- Copyright (C) 2018-2020 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
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_SEM_H
-# error "Never use <bits/sem-pad.h> directly; include <sys/sem.h> instead."
-#endif
-
-#include <bits/timesize.h>
-
-#define __SEM_PAD_AFTER_TIME 0
-#define __SEM_PAD_BEFORE_TIME (__TIMESIZE == 32) \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/semaphore.h b/lib/libc/include/powerpc-linux-gnu/bits/semaphore.h
index d8dd45053b..97292723c8 100644
--- a/lib/libc/include/powerpc-linux-gnu/bits/semaphore.h
+++ b/lib/libc/include/powerpc-linux-gnu/bits/semaphore.h
@@ -1,7 +1,6 @@
-/* Machine-specific POSIX semaphore type layouts. PowerPC version.
- Copyright (C) 2003-2020 Free Software Foundation, Inc.
+/* Generic POSIX semaphore type layout
+ Copyright (C) 1995-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h b/lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h
deleted file mode 100644
index 950fc7d5b5..0000000000
--- a/lib/libc/include/powerpc-linux-gnu/bits/shm-pad.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Define where padding goes in struct shmid_ds. PowerPC version.
- Copyright (C) 2018-2020 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
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _SYS_SHM_H
-# error "Never use <bits/shm-pad.h> directly; include <sys/shm.h> instead."
-#endif
-
-#include <bits/timesize.h>
-
-#define __SHM_PAD_AFTER_TIME 0
-#define __SHM_PAD_BEFORE_TIME (__TIMESIZE == 32)
-#define __SHM_SEGSZ_AFTER_TIME 1
-#define __SHM_PAD_BETWEEN_TIME_AND_SEGSZ (__TIMESIZE == 32) \ No newline at end of file
diff --git a/lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h b/lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h
index 762a5673fb..f4db4285af 100644
--- a/lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h
+++ b/lib/libc/include/powerpc-linux-gnu/gnu/lib-names-32.h
@@ -19,8 +19,6 @@
#define LIBNSS_FILES_SO "libnss_files.so.2"
#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
-#define LIBNSS_NISPLUS_SO "libnss_nisplus.so.2"
-#define LIBNSS_NIS_SO "libnss_nis.so.2"
#define LIBNSS_TEST1_SO "libnss_test1.so.2"
#define LIBNSS_TEST2_SO "libnss_test2.so.2"
#define LIBPTHREAD_SO "libpthread.so.0"
diff --git a/lib/libc/include/powerpc-linux-gnu/ieee754.h b/lib/libc/include/powerpc-linux-gnu/ieee754.h
index dcdca2eb78..9f9206f008 100644
--- a/lib/libc/include/powerpc-linux-gnu/ieee754.h
+++ b/lib/libc/include/powerpc-linux-gnu/ieee754.h
@@ -21,6 +21,7 @@
#include <features.h>
#include <bits/endian.h>
+#include <bits/floatn.h>
__BEGIN_DECLS
@@ -111,6 +112,65 @@ union ieee754_double
#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
+#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
+/* long double is IEEE 128 bit */
+union ieee854_long_double
+ {
+ long double d;
+
+ /* This is the IEEE 854 quad-precision format. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:15;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:16;
+ unsigned int mantissa1:32;
+ unsigned int mantissa2:32;
+ unsigned int mantissa3:32;
+#endif /* Big endian. */
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa3:32;
+ unsigned int mantissa2:32;
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:16;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+#endif /* Little endian. */
+ } ieee;
+
+ /* This format makes it easier to see if a NaN is a signalling NaN. */
+ struct
+ {
+#if __BYTE_ORDER == __BIG_ENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:15;
+ unsigned int quiet_nan:1;
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa0:15;
+ unsigned int mantissa1:32;
+ unsigned int mantissa2:32;
+ unsigned int mantissa3:32;
+#else
+ /* Together these comprise the mantissa. */
+ unsigned int mantissa3:32;
+ unsigned int mantissa2:32;
+ unsigned int mantissa1:32;
+ unsigned int mantissa0:15;
+ unsigned int quiet_nan:1;
+ unsigned int exponent:15;
+ unsigned int negative:1;
+#endif
+ } ieee_nan;
+ };
+
+#define IEEE854_LONG_DOUBLE_BIAS 0x3fff /* Added to exponent. */
+#endif
+
+
+#if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0 || __GNUC_PREREQ (7, 0)
/* IBM extended format for long double.
Each long double is made up of two IEEE doubles. The value of the
@@ -121,12 +181,16 @@ union ieee754_double
-0.0. No other requirements are made; so, for example, 1.0 may be
represented as (1.0, +0.0) or (1.0, -0.0), and the low part of a
NaN is don't-care. */
-
union ibm_extended_long_double
{
- long double ld;
+# if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1 && __GNUC_PREREQ (7, 0)
+ __ibm128 ld;
+# else
+ long double ld;
+# endif
union ieee754_double d[2];
};
+#endif
__END_DECLS