diff --git a/ChangeLog b/ChangeLog index 9216929..f1372dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-09-05 Richard B. Kreckel + + 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 * benchmarks/timebench2.sh: Multiply all repeat counts by 100. diff --git a/include/cln/config.h.in b/include/cln/config.h.in index a126631..cc06b50 100644 --- a/include/cln/config.h.in +++ b/include/cln/config.h.in @@ -21,9 +21,13 @@ #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 diff --git a/include/cln/modules.h b/include/cln/modules.h index a3b11e7..2f0527e 100644 --- a/include/cln/modules.h +++ b/include/cln/modules.h @@ -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 @@ -126,7 +126,7 @@ #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__) diff --git a/src/base/digitseq/cl_asm.h b/src/base/digitseq/cl_asm.h index 2bf9b95..e2479d7 100644 --- a/src/base/digitseq/cl_asm.h +++ b/src/base/digitseq/cl_asm.h @@ -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 diff --git a/src/base/digitseq/cl_asm_.cc b/src/base/digitseq/cl_asm_.cc index 9b5b417..c6d099b 100644 --- a/src/base/digitseq/cl_asm_.cc +++ b/src/base/digitseq/cl_asm_.cc @@ -21,7 +21,7 @@ #include "cl_asm_i386_.cc" #endif -#if defined(__mips__) +#if defined(__mips__) && !defined(__mipsel__) #include "cl_asm_mips_.cc" #endif