summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/bits
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/bits')
-rw-r--r--sysdeps/powerpc/bits/endian.h4
-rw-r--r--sysdeps/powerpc/bits/fenv.h20
-rw-r--r--sysdeps/powerpc/bits/setjmp.h18
3 files changed, 25 insertions, 17 deletions
diff --git a/sysdeps/powerpc/bits/endian.h b/sysdeps/powerpc/bits/endian.h
index d3ff74f12f..9259da8039 100644
--- a/sysdeps/powerpc/bits/endian.h
+++ b/sysdeps/powerpc/bits/endian.h
@@ -18,6 +18,10 @@
/* PowerPC can be little or big endian. Hopefully gcc will know... */
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
#if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN
# if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN
# error Please fix sysdeps/powerpc/bits/endian.h (compiling bi-endian?).
diff --git a/sysdeps/powerpc/bits/fenv.h b/sysdeps/powerpc/bits/fenv.h
index 9bb6600324..14fbda8db0 100644
--- a/sysdeps/powerpc/bits/fenv.h
+++ b/sysdeps/powerpc/bits/fenv.h
@@ -52,44 +52,44 @@ enum
/* Operation with SNaN. */
FE_INVALID_SNAN = 1 << 31-7,
-#define FE_INVALID_SNAN FE_INVALID_SNAN
+# define FE_INVALID_SNAN FE_INVALID_SNAN
/* Inf - Inf */
FE_INVALID_ISI = 1 << 31-8,
-#define FE_INVALID_ISI FE_INVALID_ISI
+# define FE_INVALID_ISI FE_INVALID_ISI
/* Inf / Inf */
FE_INVALID_IDI = 1 << 31-9,
-#define FE_INVALID_IDI FE_INVALID_IDI
+# define FE_INVALID_IDI FE_INVALID_IDI
/* 0 / 0 */
FE_INVALID_ZDZ = 1 << 31-10,
-#define FE_INVALID_ZDZ FE_INVALID_ZDZ
+# define FE_INVALID_ZDZ FE_INVALID_ZDZ
/* Inf * 0 */
FE_INVALID_IMZ = 1 << 31-11,
-#define FE_INVALID_IMZ FE_INVALID_IMZ
+# define FE_INVALID_IMZ FE_INVALID_IMZ
/* Comparison with NaN or SNaN. */
FE_INVALID_COMPARE = 1 << 31-12,
-#define FE_INVALID_COMPARE FE_INVALID_COMPARE
+# define FE_INVALID_COMPARE FE_INVALID_COMPARE
/* Invalid operation flag for software (not set by hardware). */
/* Note that some chips don't have this implemented, presumably
because no-one expected anyone to write software for them %-). */
FE_INVALID_SOFTWARE = 1 << 31-21,
-#define FE_INVALID_SOFTWARE FE_INVALID_SOFTWARE
+# define FE_INVALID_SOFTWARE FE_INVALID_SOFTWARE
/* Square root of negative number (including -Inf). */
/* Note that some chips don't have this implemented. */
FE_INVALID_SQRT = 1 << 31-22,
-#define FE_INVALID_SQRT FE_INVALID_SQRT
+# define FE_INVALID_SQRT FE_INVALID_SQRT
/* Conversion-to-integer of a NaN or a number too large or too small. */
FE_INVALID_INTEGER_CONVERSION = 1 << 31-23,
-#define FE_INVALID_INTEGER_CONVERSION FE_INVALID_INTEGER_CONVERSION
+# define FE_INVALID_INTEGER_CONVERSION FE_INVALID_INTEGER_CONVERSION
-#define FE_ALL_INVALID \
+# define FE_ALL_INVALID \
(FE_INVALID_SNAN | FE_INVALID_ISI | FE_INVALID_IDI | FE_INVALID_ZDZ \
| FE_INVALID_IMZ | FE_INVALID_COMPARE | FE_INVALID_SOFTWARE \
| FE_INVALID_SQRT | FE_INVALID_INTEGER_CONVERSION)
diff --git a/sysdeps/powerpc/bits/setjmp.h b/sysdeps/powerpc/bits/setjmp.h
index a9cab03fc6..7bb654c0bc 100644
--- a/sysdeps/powerpc/bits/setjmp.h
+++ b/sysdeps/powerpc/bits/setjmp.h
@@ -1,17 +1,21 @@
/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
+#ifndef _SETJMP_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
/* The previous bits/setjmp.h had __jmp_buf defined as a structure.
We use an array of 'long int' instead, to make writing the
assembler easier. Naturally, user code should not depend on
either representation. */
-#if defined (__USE_MISC) || defined (_ASM)
-#define JB_GPR1 0 /* also known as the stack pointer */
-#define JB_GPR2 1
-#define JB_LR 2
-#define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total */
-#define JB_UNUSED 21 /* it's sometimes faster to store doubles word-aligned */
-#define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total */
+#if defined __USE_MISC || defined _ASM
+# define JB_GPR1 0 /* also known as the stack pointer */
+# define JB_GPR2 1
+# define JB_LR 2
+# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total */
+# define JB_UNUSED 21 /* it's sometimes faster to store doubles word-aligned */
+# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total */
#endif
#ifndef _ASM