aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sh/sh4/bits/endian.h')
-rw-r--r--sysdeps/sh/sh4/bits/endian.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sysdeps/sh/sh4/bits/endian.h b/sysdeps/sh/sh4/bits/endian.h
new file mode 100644
index 0000000000..1fef1ff938
--- /dev/null
+++ b/sysdeps/sh/sh4/bits/endian.h
@@ -0,0 +1,13 @@
+/* SH is bi-endian but with a big-endian FPU. */
+
+#ifndef _ENDIAN_H
+# error "Never use <bits/endian.h> directly; include <endian.h> instead."
+#endif
+
+#ifdef __LITTLE_ENDIAN__
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#define __FLOAT_WORD_ORDER __LITTLE_ENDIAN
+#else
+#define __BYTE_ORDER __BIG_ENDIAN
+#define __FLOAT_WORD_ORDER __BIG_ENDIAN
+#endif