diff options
author | Jason Thorpe <thorpej@wasabisystems.com> | 2002-09-05 16:54:57 +0000 |
---|---|---|
committer | Jason Thorpe <thorpej@gcc.gnu.org> | 2002-09-05 16:54:57 +0000 |
commit | b5b620a4e85314de0ee24d004f2192193d28fe46 (patch) | |
tree | 1c364d52abcdcf105b4d9bc2b732f8c628cfa8c4 | |
parent | dd19d1423e0078f59f5836b5efdfe081545fcdd1 (diff) | |
download | gcc-b5b620a4e85314de0ee24d004f2192193d28fe46.zip gcc-b5b620a4e85314de0ee24d004f2192193d28fe46.tar.gz gcc-b5b620a4e85314de0ee24d004f2192193d28fe46.tar.bz2 |
real.c: Avoid parse error if FLOAT_WORDS_BIG_ENDIAN is not a compile-time constant for...
* real.c: Avoid parse error if FLOAT_WORDS_BIG_ENDIAN is
not a compile-time constant for the non-IBM case.
* config/arm/arm-protos.h (arm_float_words_big_endian): New
prototype.
* config/arm/arm.c (arm_float_words_big_endian): New function.
* config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Define __VFP_FP__
if TARGET_VFP and not TARGET_HARD_FLOAT.
(ARM_FLAG_VFP, TARGET_VFP): Define.
(FLOAT_WORDS_BIG_ENDIAN): Use arm_float_words_big_endian.
[ Missed arm.h in previous checkin, and pasto'd ChangeLog entry, which
is now corrected. ]
From-SVN: r56857
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/arm/arm.h | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3fafcb6..a3ec8a0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -10,8 +10,8 @@ * config/arm/arm-protos.h (arm_float_words_big_endian): New prototype. * config/arm/arm.c (arm_float_words_big_endian): New function. - (TARGET_CPU_CPP_BUILTINS): Define __VFP_FP__ if TARGET_VFP - and not TARGET_HARD_FLOAT. + * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Define __VFP_FP__ + if TARGET_VFP and not TARGET_HARD_FLOAT. (ARM_FLAG_VFP, TARGET_VFP): Define. (FLOAT_WORDS_BIG_ENDIAN): Use arm_float_words_big_endian. diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 8ab8267..5865472 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -58,6 +58,11 @@ Boston, MA 02111-1307, USA. */ if (TARGET_SOFT_FLOAT) \ builtin_define ("__SOFTFP__"); \ \ + /* FIXME: TARGET_HARD_FLOAT currently implies \ + FPA. */ \ + if (TARGET_VFP && !TARGET_HARD_FLOAT) \ + builtin_define ("__VFP_FP__"); \ + \ /* Add a define for interworking. \ Needed when building libgcc.a. */ \ if (TARGET_INTERWORK) \ @@ -365,6 +370,9 @@ Unrecognized value in TARGET_CPU_DEFAULT. destination is non-Thumb aware. */ #define THUMB_FLAG_CALLER_SUPER_INTERWORKING (1 << 20) +/* Nonzero means target uses VFP FP. */ +#define ARM_FLAG_VFP (1 << 21) + #define TARGET_APCS_FRAME (target_flags & ARM_FLAG_APCS_FRAME) #define TARGET_POKE_FUNCTION_NAME (target_flags & ARM_FLAG_POKE) #define TARGET_FPE (target_flags & ARM_FLAG_FPE) @@ -375,6 +383,7 @@ Unrecognized value in TARGET_CPU_DEFAULT. #define TARGET_MMU_TRAPS (target_flags & ARM_FLAG_MMU_TRAPS) #define TARGET_SOFT_FLOAT (target_flags & ARM_FLAG_SOFT_FLOAT) #define TARGET_HARD_FLOAT (! TARGET_SOFT_FLOAT) +#define TARGET_VFP (target_flags & ARM_FLAG_VFP) #define TARGET_BIG_END (target_flags & ARM_FLAG_BIG_END) #define TARGET_INTERWORK (target_flags & ARM_FLAG_INTERWORK) #define TARGET_LITTLE_WORDS (target_flags & ARM_FLAG_LITTLE_WORDS) @@ -666,8 +675,9 @@ extern int arm_is_6_or_7; #endif /* Define this if most significant word of doubles is the lowest numbered. - This is always true, even when in little-endian mode. */ -#define FLOAT_WORDS_BIG_ENDIAN 1 + The rules are different based on whether or not we use FPA-format or + VFP-format doubles. */ +#define FLOAT_WORDS_BIG_ENDIAN (arm_float_words_big_endian ()) #define UNITS_PER_WORD 4 |