diff options
author | YunQiang Su <[email protected]> | 2016-05-28 19:30:36 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-05-31 09:05:56 -0700 |
commit | c60a51b640bab61c54f370752750841675730899 (patch) | |
tree | 5792ad8013208601eea0b6f490f64c108f3e24f6 /include | |
parent | b3a22a0a005eef22d696cc77baa26ef80d1bdc0c (diff) |
Add isa_defs for MIPS
GCC for MIPS only defines _LP64 when 64bit,
while no _ILP32 defined when 32bit.
Signed-off-by: YunQiang Su <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #558
Diffstat (limited to 'include')
-rw-r--r-- | include/sys/isa_defs.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 3d474872c..53dead38c 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -145,7 +145,28 @@ #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 |