]> www.ginac.de Git - cln.git/commitdiff
Support for little-endian Mips
authorRichard Kreckel <kreckel@ginac.de>
Sun, 5 Sep 2004 21:41:35 +0000 (21:41 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Sun, 5 Sep 2004 21:41:35 +0000 (21:41 +0000)
        * include/cln/config.h.in: Add __mipsel__.
        * include/cln/modules.h: For Mips, this is endianness-agnostic.
        * src/base/digitseq/cl_asm_.cc, src/base/digitseq/cl_asm.h:
        Mask out assembler for little-endian Mips.

ChangeLog
include/cln/config.h.in
include/cln/modules.h
src/base/digitseq/cl_asm.h
src/base/digitseq/cl_asm_.cc

index 92169293f13fa7bdb477bf8afa4755341557e458..f1372dd0f77164abed3efb949f58c249c7ac3fde 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-09-05  Richard B. Kreckel  <kreckel@ginac.de>
+
+       Support for little-endian Mips
+       * include/cln/config.h.in: Add __mipsel__.
+       * include/cln/modules.h: For Mips, this is endianness-agnostic.
+       * src/base/digitseq/cl_asm_.cc, src/base/digitseq/cl_asm.h:
+       Mask out assembler for little-endian Mips.
+
 2004-08-30  Bruno Haible  <bruno@clisp.org>
 
        * benchmarks/timebench2.sh: Multiply all repeat counts by 100.
index a126631dbbe1b7ae8ffa8e7a381036971d142600..cc06b50db7f7c08cce705eb2210de9a72bd9d2c9 100644 (file)
 #ifndef __m68k__
 #undef __m68k__
 #endif
+// NB: GCC def's __mips__ both on big-endian and little-endian systems.
 #ifndef __mips__
 #undef __mips__
 #endif
+#ifndef __mipsel__
+#undef __mipsel__
+#endif
 #ifndef __mips64__
 #undef __mips64__
 #endif
index a3b11e7c6906a764014824fed419ec0d60d57d32..2f0527e729077aeeb557b1e9e0200ffb8c705f34 100644 (file)
@@ -64,7 +64,7 @@
   #endif
   // Globalize a label defined in the same translation unit.
   // See macro ASM_GLOBALIZE_LABEL in the gcc sources.
-  #if defined(__i386__) || defined(__m68k__) || defined(__mips__) || defined(__mips64__) || defined(__alpha__) || defined(__rs6000__) || defined(__x86_64__) || defined(__s390__)
+  #if defined(__i386__) || defined(__m68k__) || defined(__mips__) || defined(__mipsel__) || defined(__mips64__) || defined(__alpha__) || defined(__rs6000__) || defined(__x86_64__) || defined(__s390__)
     // Some m68k systems use "xdef" or "global" or ".global"...
     #define CL_GLOBALIZE_LABEL(label)  __asm__("\t.globl " label);
   #endif
   #if defined(__m68k__)
     #define CL_JUMP_TO(addr)  ASM_VOLATILE("jmp %0@" : : "a" ((void*)(addr)))
   #endif
-  #if defined(__mips__)
+  #if defined(__mips__) || defined(__mipsel__)
     #define CL_JUMP_TO(addr)  ASM_VOLATILE("%*j %0" : : "d" ((void*)(addr)))
   #endif
   #if defined(__sparc__) || defined(__sparc64__)
index 2bf9b95c7f119bf3ab86a171a74dc1c50a7c55d8..e2479d7bb53bfb67812d9d5e3b54ddf7cc307db9 100644 (file)
@@ -21,7 +21,7 @@
   #include "cl_asm_i386.h"
 #endif
 
-#if defined(__mips__) && !defined(__mips64__) && (intDsize==32)
+#if defined(__mips__) && !defined(__mips64__) && !defined(__mipsel__) && (intDsize==32)
   #include "cl_asm_mips.h"
 #endif
 
index 9b5b41701cdd3d17ef2d5619bad838a6ed6e29f9..c6d099b70f18c7271646d1d4cecb65280c9ba1ca 100644 (file)
@@ -21,7 +21,7 @@
   #include "cl_asm_i386_.cc"
 #endif
 
-#if defined(__mips__)
+#if defined(__mips__) && !defined(__mipsel__)
   #include "cl_asm_mips_.cc"
 #endif