Explorar el Código

KWIML: Teach ABI.h that MIPS is biendian

MIPS machines are biendian hence they can run both big endian kernels
e.g. Debian mips architecture, and little endian kernels e.g. Debian
mipsel architecture.  Use predefined macros to distinguish them.
Modestas Vainius hace 14 años
padre
commit
aabf65a073
Se han modificado 1 ficheros con 9 adiciones y 1 borrados
  1. 9 1
      ABI.h.in

+ 9 - 1
ABI.h.in

@@ -380,7 +380,15 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined.
 #elif defined(__m68k__) || defined(M68000)
 #elif defined(__m68k__) || defined(M68000)
 # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
 # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
 
 
-/* MIPS */
+/* MIPSel (MIPS little endian) */
+#elif defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL)
+# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_LITTLE
+
+/* MIPSeb (MIPS big endian) */
+#elif defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB)
+# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
+
+/* MIPS (fallback, big endian) */
 #elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
 #elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
 # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
 # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG