From 01a76a6f9f30c560f51f35380645291a7e17f82f Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 17 Mar 2006 05:24:30 +0000 Subject: 2006-03-17 Ralf Corsepius * rtems/score/cpu.h: Setup CPU_*_ENDIAN from GCC's__MIPS{EL|EB}__. (Partial merger of submission by Bruce Robinson ). --- cpukit/score/cpu/mips/ChangeLog | 5 +++++ cpukit/score/cpu/mips/rtems/score/cpu.h | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/cpukit/score/cpu/mips/ChangeLog b/cpukit/score/cpu/mips/ChangeLog index 09f6d4331d..6568d6449e 100644 --- a/cpukit/score/cpu/mips/ChangeLog +++ b/cpukit/score/cpu/mips/ChangeLog @@ -1,3 +1,8 @@ +2006-03-17 Ralf Corsepius + + * rtems/score/cpu.h: Setup CPU_*_ENDIAN from GCC's__MIPS{EL|EB}__. + (Partial merger of submission by Bruce Robinson ). + 2006-01-16 Joel Sherrill * rtems/score/cpu.h: Part of a large patch to improve Doxygen output. diff --git a/cpukit/score/cpu/mips/rtems/score/cpu.h b/cpukit/score/cpu/mips/rtems/score/cpu.h index 219047a098..fc78cc7ea8 100644 --- a/cpukit/score/cpu/mips/rtems/score/cpu.h +++ b/cpukit/score/cpu/mips/rtems/score/cpu.h @@ -312,8 +312,17 @@ extern "C" { */ #define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE + +/* __MIPSEB__ or __MIPSEL__ is defined by GCC based on -EB or -EL command line options */ +#if defined(__MIPSEB__) #define CPU_BIG_ENDIAN TRUE #define CPU_LITTLE_ENDIAN FALSE +#elif defined(__MIPSEL__) +#define CPU_BIG_ENDIAN FALSE +#define CPU_LITTLE_ENDIAN TRUE +#else +#error "Unknown endianness" +#endif /* * The following defines the number of bits actually used in the -- cgit v1.2.3