From bdcf2d689cb798cfc98351a788d603ac57236ba6 Mon Sep 17 00:00:00 2001 From: thorpej Date: Thu, 5 Sep 2002 16:54:57 +0000 Subject: [PATCH] * 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. ] git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56857 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++-- gcc/config/arm/arm.h | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3fafcb6b257..a3ec8a0d4a2 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 8ab82671636..58654729884 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 -- 2.11.4.GIT