]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Add isa_defs for MIPS
authorYunQiang Su <syq@debian.org>
Sat, 28 May 2016 11:30:36 +0000 (19:30 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 31 May 2016 16:05:56 +0000 (09:05 -0700)
GCC for MIPS only defines _LP64 when 64bit,
while no _ILP32 defined when 32bit.

Signed-off-by: YunQiang Su <syq@debian.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #558

include/sys/isa_defs.h

index 3d474872cb0b846353972d520ab6f70919c05efb..53dead38c19b897bf67b8bd909d8eee2e2258ed6 100644 (file)
 
 #define        _BIG_ENDIAN
 
-#else /* Currently x86_64, i386, arm, powerpc, s390, and sparc are supported */
+/* MIPS arch specific defines */
+#elif defined(__mips__)
+
+#if defined(__MIPSEB__)
+#define        _BIG_ENDIAN
+#elif defined(__MIPSEL__)
+#define        _LITTLE_ENDIAN
+#else
+#error MIPS no endian specified
+#endif
+
+#ifndef _LP64
+#define        _ILP32
+#endif
+
+#define        _SUNOS_VTOC_16
+
+#else
+/*
+ * Currently supported:
+ * x86_64, i386, arm, powerpc, s390, sparc, and mips
+ */
 #error "Unsupported ISA type"
 #endif