Browse Source

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.
master
Richard Kreckel 21 years ago
parent
commit
abbb561b2c
  1. 8
      ChangeLog
  2. 4
      include/cln/config.h.in
  3. 4
      include/cln/modules.h
  4. 2
      src/base/digitseq/cl_asm.h
  5. 2
      src/base/digitseq/cl_asm_.cc

8
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> 2004-08-30 Bruno Haible <bruno@clisp.org>
* benchmarks/timebench2.sh: Multiply all repeat counts by 100. * benchmarks/timebench2.sh: Multiply all repeat counts by 100.

4
include/cln/config.h.in

@ -21,9 +21,13 @@
#ifndef __m68k__ #ifndef __m68k__
#undef __m68k__ #undef __m68k__
#endif #endif
// NB: GCC def's __mips__ both on big-endian and little-endian systems.
#ifndef __mips__ #ifndef __mips__
#undef __mips__ #undef __mips__
#endif #endif
#ifndef __mipsel__
#undef __mipsel__
#endif
#ifndef __mips64__ #ifndef __mips64__
#undef __mips64__ #undef __mips64__
#endif #endif

4
include/cln/modules.h

@ -64,7 +64,7 @@
#endif #endif
// Globalize a label defined in the same translation unit. // Globalize a label defined in the same translation unit.
// See macro ASM_GLOBALIZE_LABEL in the gcc sources. // 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"... // Some m68k systems use "xdef" or "global" or ".global"...
#define CL_GLOBALIZE_LABEL(label) __asm__("\t.globl " label); #define CL_GLOBALIZE_LABEL(label) __asm__("\t.globl " label);
#endif #endif
@ -126,7 +126,7 @@
#if defined(__m68k__) #if defined(__m68k__)
#define CL_JUMP_TO(addr) ASM_VOLATILE("jmp %0@" : : "a" ((void*)(addr))) #define CL_JUMP_TO(addr) ASM_VOLATILE("jmp %0@" : : "a" ((void*)(addr)))
#endif #endif
#if defined(__mips__)
#if defined(__mips__) || defined(__mipsel__)
#define CL_JUMP_TO(addr) ASM_VOLATILE("%*j %0" : : "d" ((void*)(addr))) #define CL_JUMP_TO(addr) ASM_VOLATILE("%*j %0" : : "d" ((void*)(addr)))
#endif #endif
#if defined(__sparc__) || defined(__sparc64__) #if defined(__sparc__) || defined(__sparc64__)

2
src/base/digitseq/cl_asm.h

@ -21,7 +21,7 @@
#include "cl_asm_i386.h" #include "cl_asm_i386.h"
#endif #endif
#if defined(__mips__) && !defined(__mips64__) && (intDsize==32)
#if defined(__mips__) && !defined(__mips64__) && !defined(__mipsel__) && (intDsize==32)
#include "cl_asm_mips.h" #include "cl_asm_mips.h"
#endif #endif

2
src/base/digitseq/cl_asm_.cc

@ -21,7 +21,7 @@
#include "cl_asm_i386_.cc" #include "cl_asm_i386_.cc"
#endif #endif
#if defined(__mips__)
#if defined(__mips__) && !defined(__mipsel__)
#include "cl_asm_mips_.cc" #include "cl_asm_mips_.cc"
#endif #endif

Loading…
Cancel
Save