diff options
author | Richard Earnshaw <erich@gnu.org> | 1996-02-12 16:51:37 +0000 |
---|---|---|
committer | Richard Earnshaw <erich@gnu.org> | 1996-02-12 16:51:37 +0000 |
commit | ddee6abad9055f8747b9d228330e9921d8cdec4b (patch) | |
tree | 0c6acb1765b9146945bb5f25b82ba1eee5d45fdd /gcc | |
parent | c1c2bc04042f67a0e240865b919220be91c58898 (diff) | |
download | gcc-ddee6abad9055f8747b9d228330e9921d8cdec4b.zip gcc-ddee6abad9055f8747b9d228330e9921d8cdec4b.tar.gz gcc-ddee6abad9055f8747b9d228330e9921d8cdec4b.tar.bz2 |
arm.h: (CPP_SPEC): Define __ARMEB__...
* arm/arm.h: (CPP_SPEC): Define __ARMEB__, __ARMEL__, and
__ARMWEL__ depending on the endian flags passed to the compiler.
(ARM_FLAG_LITTLE_WORDS): Define.
(TARGET_SWITCHES): Add option -mwords-little-endian.
(TARGET_LITTLE_WORDS): Define.
(WORDS_BIG_ENDIAN): Select based on the endian switches.
(LIBGCC2_WORDS_BIG_ENDIAN): Define based on run-time endian
defines.
From-SVN: r11211
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/arm/arm.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 2eef03d..b2cab46 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -61,6 +61,9 @@ extern int frame_pointer_needed; %{msoft-float:-D__SOFTFP__} \ %{mhard-float:-U__SOFTFP__} \ %{!mhard-float: %{!msoft-float:-U__SOFTFP__}} \ +%{mbig-endian:-D__ARMEB__ %{mwords-little-endian:-D__ARMWEL__}} \ +%{mbe:-D__ARMEB__ %{mwords-little-endian:-D__ARMWEL__}} \ +%{!mbe: %{!mbig-endian:-D__ARMEL__}} \ " #endif @@ -131,6 +134,10 @@ extern char *target_fpe_name; /* Nonzero if we should compile for Thumb interworking. */ #define ARM_FLAG_THUMB (0x1000) +/* Nonzero if we should have little-endian words even when compiling for + big-endian (for backwards compatibility with older versions of GCC). */ +#define ARM_FLAG_LITTLE_WORDS (0x2000) + #define TARGET_APCS (target_flags & ARM_FLAG_APCS_FRAME) #define TARGET_POKE_FUNCTION_NAME (target_flags & ARM_FLAG_POKE) #define TARGET_FPE (target_flags & ARM_FLAG_FPE) @@ -145,6 +152,7 @@ extern char *target_fpe_name; #define TARGET_HARD_FLOAT (! TARGET_SOFT_FLOAT) #define TARGET_BIG_END (target_flags & ARM_FLAG_BIG_END) #define TARGET_THUMB_INTERWORK (target_flags & ARM_FLAG_THUMB) +#define TARGET_LITTLE_WORDS (target_flags & ARM_FLAG_LITTLE_WORDS) /* SUBTARGET_SWITCHES is used to add flags on a per-config basis. Bit 31 is reserved. See riscix.h. */ @@ -182,6 +190,7 @@ extern char *target_fpe_name; {"le", -ARM_FLAG_BIG_END}, \ {"thumb-interwork", ARM_FLAG_THUMB}, \ {"no-thumb-interwork", -ARM_FLAG_THUMB}, \ + {"words-little-endian", ARM_FLAG_LITTLE_WORDS}, \ SUBTARGET_SWITCHES \ {"", TARGET_DEFAULT } \ } @@ -318,7 +327,15 @@ extern int arm_arch4; /* Define this if most significant word of a multiword number is the lowest numbered. This is always false, even when in big-endian mode. */ -#define WORDS_BIG_ENDIAN 0 +#define WORDS_BIG_ENDIAN (BYTES_BIG_ENDIAN && ! TARGET_LITTLE_WORDS) + +/* LIBGCC2_WORDS_BIG_ENDIAN has to be a constant, so we define this based + on processor pre-defineds when compiling libgcc2.c. */ +#if defined(__ARMEB__) && !defined(__ARMWEL__) +#define LIBGCC2_WORDS_BIG_ENDIAN 1 +#else +#define LIBGCC2_WORDS_BIG_ENDIAN 0 +#endif /* Define this if most significant word of doubles is the lowest numbered. This is always true, even when in little-endian mode. */ |