[PATCH 3/3] Remove CPU_BIG_ENDIAN and CPU_LITTLE_ENDIAN
Gedare Bloom
gedare at rtems.org
Wed Jan 25 16:35:18 UTC 2017
On Mon, Jan 23, 2017 at 2:14 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> Use de-facto standard BYTE_ORDER instead.
>
Just one nit that de-facto here means glibc right?
> Close #2803.
> ---
> cpukit/score/cpu/arm/rtems/score/cpu.h | 10 --------
> cpukit/score/cpu/bfin/rtems/score/cpu.h | 40 -----------------------------
> cpukit/score/cpu/epiphany/rtems/score/cpu.h | 2 --
> cpukit/score/cpu/i386/rtems/score/cpu.h | 8 ------
> cpukit/score/cpu/lm32/rtems/score/cpu.h | 40 -----------------------------
> cpukit/score/cpu/m32c/rtems/score/cpu.h | 40 -----------------------------
> cpukit/score/cpu/m68k/rtems/score/cpu.h | 8 ------
> cpukit/score/cpu/mips/rtems/score/cpu.h | 16 ------------
> cpukit/score/cpu/moxie/rtems/score/cpu.h | 7 -----
> cpukit/score/cpu/nios2/rtems/score/cpu.h | 4 ---
> cpukit/score/cpu/no_cpu/rtems/score/cpu.h | 40 -----------------------------
> cpukit/score/cpu/or1k/rtems/score/cpu.h | 2 --
> cpukit/score/cpu/powerpc/rtems/score/cpu.h | 13 ----------
> cpukit/score/cpu/sh/rtems/score/cpu.h | 16 ------------
> cpukit/score/cpu/sparc/rtems/score/cpu.h | 16 ------------
> cpukit/score/cpu/sparc64/rtems/score/cpu.h | 8 ------
> cpukit/score/cpu/v850/rtems/score/cpu.h | 40 -----------------------------
> 17 files changed, 310 deletions(-)
>
> diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h
> index 0a9ca26..cdffc9c 100644
> --- a/cpukit/score/cpu/arm/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/arm/rtems/score/cpu.h
> @@ -97,16 +97,6 @@
> */
> /**@{**/
>
> -#if defined(__ARMEL__)
> - #define CPU_BIG_ENDIAN FALSE
> - #define CPU_LITTLE_ENDIAN TRUE
> -#elif defined(__ARMEB__)
> - #define CPU_BIG_ENDIAN TRUE
> - #define CPU_LITTLE_ENDIAN FALSE
> -#else
> - #error "unknown endianness"
> -#endif
> -
> /*
> * The ARM uses the PIC interrupt model.
> */
> diff --git a/cpukit/score/cpu/bfin/rtems/score/cpu.h b/cpukit/score/cpu/bfin/rtems/score/cpu.h
> index 9b54d6c..cdefedf 100644
> --- a/cpukit/score/cpu/bfin/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/bfin/rtems/score/cpu.h
> @@ -280,46 +280,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT
>
> /**
> - * @defgroup CPUEndian Processor Dependent Endianness Support
> - *
> - * This group assists in issues related to processor endianness.
> - *
> - */
> -/**@{**/
> -
> -/**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * @note @a CPU_BIG_ENDIAN and @a CPU_LITTLE_ENDIAN should NOT have the
> - * same values.
> - *
> - * @see CPU_LITTLE_ENDIAN
> - *
> - * Port Specific Information:
> - *
> - * XXX document implementation including references if appropriate
> - */
> -#define CPU_BIG_ENDIAN FALSE
> -
> -/**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * @note @ref CPU_BIG_ENDIAN and @ref CPU_LITTLE_ENDIAN should NOT have the
> - * same values.
> - *
> - * @see CPU_BIG_ENDIAN
> - *
> - * Port Specific Information:
> - *
> - * XXX document implementation including references if appropriate
> - */
> -#define CPU_LITTLE_ENDIAN TRUE
> -
> -/** @} */
> -
> -/**
> * @ingroup CPUInterrupt
> * The following defines the number of bits actually used in the
> * interrupt field of the task mode. How those bits map to the
> diff --git a/cpukit/score/cpu/epiphany/rtems/score/cpu.h b/cpukit/score/cpu/epiphany/rtems/score/cpu.h
> index 4319203..55faefa 100644
> --- a/cpukit/score/cpu/epiphany/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/epiphany/rtems/score/cpu.h
> @@ -261,8 +261,6 @@ extern "C" {
> */
>
> #define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
> -#define CPU_BIG_ENDIAN FALSE
> -#define CPU_LITTLE_ENDIAN TRUE
>
> /*
> * The following defines the number of bits actually used in the
> diff --git a/cpukit/score/cpu/i386/rtems/score/cpu.h b/cpukit/score/cpu/i386/rtems/score/cpu.h
> index c45d914..052e53f 100644
> --- a/cpukit/score/cpu/i386/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/i386/rtems/score/cpu.h
> @@ -114,14 +114,6 @@ extern "C" {
>
> #define CPU_PROVIDES_IDLE_THREAD_BODY FALSE
>
> -/*
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - */
> -
> -#define CPU_BIG_ENDIAN FALSE
> -#define CPU_LITTLE_ENDIAN TRUE
> -
> #define CPU_MAXIMUM_PROCESSORS 32
>
> #define I386_CONTEXT_CONTROL_EFLAGS_OFFSET 0
> diff --git a/cpukit/score/cpu/lm32/rtems/score/cpu.h b/cpukit/score/cpu/lm32/rtems/score/cpu.h
> index e6f6c51..87cfd9e 100644
> --- a/cpukit/score/cpu/lm32/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/lm32/rtems/score/cpu.h
> @@ -274,46 +274,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
>
> /**
> - * @defgroup CPUEndian Processor Dependent Endianness Support
> - *
> - * This group assists in issues related to processor endianness.
> - *
> - */
> -/**@{**/
> -
> -/**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * NOTE: @a CPU_BIG_ENDIAN and @a CPU_LITTLE_ENDIAN should NOT have the
> - * same values.
> - *
> - * @see CPU_LITTLE_ENDIAN
> - *
> - * Port Specific Information:
> - *
> - * XXX document implementation including references if appropriate
> - */
> -#define CPU_BIG_ENDIAN TRUE
> -
> -/**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * NOTE: @ref CPU_BIG_ENDIAN and @ref CPU_LITTLE_ENDIAN should NOT have the
> - * same values.
> - *
> - * @see CPU_BIG_ENDIAN
> - *
> - * Port Specific Information:
> - *
> - * XXX document implementation including references if appropriate
> - */
> -#define CPU_LITTLE_ENDIAN FALSE
> -
> -/** @} */
> -
> -/**
> * @ingroup CPUInterrupt
> * The following defines the number of bits actually used in the
> * interrupt field of the task mode. How those bits map to the
> diff --git a/cpukit/score/cpu/m32c/rtems/score/cpu.h b/cpukit/score/cpu/m32c/rtems/score/cpu.h
> index b1ef486..8dd8c41 100644
> --- a/cpukit/score/cpu/m32c/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/m32c/rtems/score/cpu.h
> @@ -296,46 +296,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
>
> /**
> - * @defgroup CPUEndian Processor Dependent Endianness Support
> - *
> - * This group assists in issues related to processor endianness.
> - *
> - */
> -/**@{**/
> -
> -/**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * NOTE: @a CPU_BIG_ENDIAN and @a CPU_LITTLE_ENDIAN should NOT have the
> - * same values.
> - *
> - * @see CPU_LITTLE_ENDIAN
> - *
> - * Port Specific Information:
> - *
> - * XXX document implementation including references if appropriate
> - */
> -#define CPU_BIG_ENDIAN TRUE
> -
> -/**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * NOTE: @ref CPU_BIG_ENDIAN and @ref CPU_LITTLE_ENDIAN should NOT have the
> - * same values.
> - *
> - * @see CPU_BIG_ENDIAN
> - *
> - * Port Specific Information:
> - *
> - * XXX document implementation including references if appropriate
> - */
> -#define CPU_LITTLE_ENDIAN FALSE
> -
> -/** @} */
> -
> -/**
> * @ingroup CPUInterrupt
> *
> * The following defines the number of bits actually used in the
> diff --git a/cpukit/score/cpu/m68k/rtems/score/cpu.h b/cpukit/score/cpu/m68k/rtems/score/cpu.h
> index 0e3cd81..0b9aa2d 100644
> --- a/cpukit/score/cpu/m68k/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/m68k/rtems/score/cpu.h
> @@ -104,14 +104,6 @@ extern "C" {
>
> #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
>
> -/*
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - */
> -
> -#define CPU_BIG_ENDIAN TRUE
> -#define CPU_LITTLE_ENDIAN FALSE
> -
> #define CPU_MAXIMUM_PROCESSORS 32
>
> #if ( CPU_HARDWARE_FP == TRUE ) && !defined( __mcoldfire__ )
> diff --git a/cpukit/score/cpu/mips/rtems/score/cpu.h b/cpukit/score/cpu/mips/rtems/score/cpu.h
> index 60bec59..9a45d0b 100644
> --- a/cpukit/score/cpu/mips/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/mips/rtems/score/cpu.h
> @@ -269,22 +269,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
>
> /*
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - */
> -
> -/* __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
> * interrupt field of the task mode. How those bits map to the
> * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
> diff --git a/cpukit/score/cpu/moxie/rtems/score/cpu.h b/cpukit/score/cpu/moxie/rtems/score/cpu.h
> index a85b199..b77083d 100644
> --- a/cpukit/score/cpu/moxie/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/moxie/rtems/score/cpu.h
> @@ -246,13 +246,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT
>
> /*
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - */
> -#define CPU_BIG_ENDIAN TRUE
> -#define CPU_LITTLE_ENDIAN FALSE
> -
> -/*
> * The following defines the number of bits actually used in the
> * interrupt field of the task mode. How those bits map to the
> * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
> diff --git a/cpukit/score/cpu/nios2/rtems/score/cpu.h b/cpukit/score/cpu/nios2/rtems/score/cpu.h
> index 902b209..a3f2f03 100644
> --- a/cpukit/score/cpu/nios2/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/nios2/rtems/score/cpu.h
> @@ -67,10 +67,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT \
> RTEMS_SECTION( ".sdata" ) RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
>
> -#define CPU_BIG_ENDIAN FALSE
> -
> -#define CPU_LITTLE_ENDIAN TRUE
> -
> #define CPU_STACK_MINIMUM_SIZE (4 * 1024)
>
> #define CPU_SIZEOF_POINTER 4
> diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
> index 5608147..372b01f 100644
> --- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
> @@ -320,46 +320,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
>
> /**
> - * @defgroup CPUEndian Processor Dependent Endianness Support
> - *
> - * This group assists in issues related to processor endianness.
> - *
> - */
> -/**@{**/
> -
> -/**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * NOTE: @a CPU_BIG_ENDIAN and @a CPU_LITTLE_ENDIAN should NOT have the
> - * same values.
> - *
> - * @see CPU_LITTLE_ENDIAN
> - *
> - * Port Specific Information:
> - *
> - * XXX document implementation including references if appropriate
> - */
> -#define CPU_BIG_ENDIAN TRUE
> -
> -/**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * NOTE: @ref CPU_BIG_ENDIAN and @ref CPU_LITTLE_ENDIAN should NOT have the
> - * same values.
> - *
> - * @see CPU_BIG_ENDIAN
> - *
> - * Port Specific Information:
> - *
> - * XXX document implementation including references if appropriate
> - */
> -#define CPU_LITTLE_ENDIAN FALSE
> -
> -/** @} */
> -
> -/**
> * @ingroup CPUInterrupt
> *
> * The following defines the number of bits actually used in the
> diff --git a/cpukit/score/cpu/or1k/rtems/score/cpu.h b/cpukit/score/cpu/or1k/rtems/score/cpu.h
> index 13dd334..4a643c7 100644
> --- a/cpukit/score/cpu/or1k/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/or1k/rtems/score/cpu.h
> @@ -253,8 +253,6 @@ extern "C" {
> */
>
> #define CPU_HAS_OWN_HOST_TO_NETWORK_ROUTINES FALSE
> -#define CPU_BIG_ENDIAN TRUE
> -#define CPU_LITTLE_ENDIAN FALSE
>
> /*
> * The following defines the number of bits actually used in the
> diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
> index 91f8f63..93d620e 100644
> --- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h
> @@ -87,19 +87,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
>
> /*
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - */
> -
> -#if defined(__BIG_ENDIAN__) || defined(_BIG_ENDIAN)
> -#define CPU_BIG_ENDIAN TRUE
> -#define CPU_LITTLE_ENDIAN FALSE
> -#else
> -#define CPU_BIG_ENDIAN FALSE
> -#define CPU_LITTLE_ENDIAN TRUE
> -#endif
> -
> -/*
> * Does the CPU have hardware floating point?
> *
> * If TRUE, then the RTEMS_FLOATING_POINT task attribute is supported.
> diff --git a/cpukit/score/cpu/sh/rtems/score/cpu.h b/cpukit/score/cpu/sh/rtems/score/cpu.h
> index b4e5532..0ad3829 100644
> --- a/cpukit/score/cpu/sh/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/sh/rtems/score/cpu.h
> @@ -218,22 +218,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
>
> /*
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * NOTE: SHes can be big or little endian, the default is big endian
> - */
> -
> -/* __LITTLE_ENDIAN__ is defined if -ml is given to gcc */
> -#if defined(__LITTLE_ENDIAN__)
> -#define CPU_BIG_ENDIAN FALSE
> -#define CPU_LITTLE_ENDIAN TRUE
> -#else
> -#define CPU_BIG_ENDIAN TRUE
> -#define CPU_LITTLE_ENDIAN FALSE
> -#endif
> -
> -/*
> * The following defines the number of bits actually used in the
> * interrupt field of the task mode. How those bits map to the
> * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
> diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h
> index 1bc4a0e..6d8e1f9 100644
> --- a/cpukit/score/cpu/sparc/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h
> @@ -208,22 +208,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
>
> /**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * The SPARC is big endian.
> - */
> -#define CPU_BIG_ENDIAN TRUE
> -
> -/**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * The SPARC is NOT little endian.
> - */
> -#define CPU_LITTLE_ENDIAN FALSE
> -
> -/**
> * The following defines the number of bits actually used in the
> * interrupt field of the task mode. How those bits map to the
> * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
> diff --git a/cpukit/score/cpu/sparc64/rtems/score/cpu.h b/cpukit/score/cpu/sparc64/rtems/score/cpu.h
> index 4402bde..9926ebb 100644
> --- a/cpukit/score/cpu/sparc64/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/sparc64/rtems/score/cpu.h
> @@ -183,14 +183,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( 16 )
>
> /*
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - */
> -
> -#define CPU_BIG_ENDIAN TRUE
> -#define CPU_LITTLE_ENDIAN FALSE
> -
> -/*
> * The following defines the number of bits actually used in the
> * interrupt field of the task mode. How those bits map to the
> * CPU interrupt levels is defined by the routine _CPU_ISR_Set_level().
> diff --git a/cpukit/score/cpu/v850/rtems/score/cpu.h b/cpukit/score/cpu/v850/rtems/score/cpu.h
> index 8f3fbd9..6c77f51 100644
> --- a/cpukit/score/cpu/v850/rtems/score/cpu.h
> +++ b/cpukit/score/cpu/v850/rtems/score/cpu.h
> @@ -273,46 +273,6 @@ extern "C" {
> #define CPU_STRUCTURE_ALIGNMENT
>
> /**
> - * @defgroup CPUEndian Processor Dependent Endianness Support
> - *
> - * This group assists in issues related to processor endianness.
> - *
> - */
> -/**@{**/
> -
> -/**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * @note @a CPU_BIG_ENDIAN and @a CPU_LITTLE_ENDIAN should NOT have the
> - * same values.
> - *
> - * @see CPU_LITTLE_ENDIAN
> - *
> - * Port Specific Information:
> - *
> - * The v850 is little endian.
> - */
> -#define CPU_BIG_ENDIAN FALSE
> -
> -/**
> - * Define what is required to specify how the network to host conversion
> - * routines are handled.
> - *
> - * @note @ref CPU_BIG_ENDIAN and @ref CPU_LITTLE_ENDIAN should NOT have the
> - * same values.
> - *
> - * @see CPU_BIG_ENDIAN
> - *
> - * Port Specific Information:
> - *
> - * The v850 is little endian.
> - */
> -#define CPU_LITTLE_ENDIAN TRUE
> -
> -/** @} */
> -
> -/**
> * @ingroup CPUInterrupt
> * The following defines the number of bits actually used in the
> * interrupt field of the task mode. How those bits map to the
> --
> 1.8.4.5
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list