From: Eric Botcazou Date: Sat, 4 Jul 2026 08:03:34 +0000 (+0200) Subject: Remove left-overs of WIDEST_HARDWARE_FP_SIZE X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cc7df8e83417dd495ff124cb6e6560b300ca17e;p=thirdparty%2Fgcc.git Remove left-overs of WIDEST_HARDWARE_FP_SIZE This removes the single remaining use of WIDEST_HARDWARE_FP_SIZE in GCC, which has been anectodal for a long time, and all the associated bits. gcc/ * config/aarch64/aarch64.h (WIDEST_HARDWARE_FP_SIZE): Delete. * config/alpha/alpha.h (WIDEST_HARDWARE_FP_SIZE): Likewise. * config/i386/i386.h (WIDEST_HARDWARE_FP_SIZE): Likewise. * config/ia64/vms.h (WIDEST_HARDWARE_FP_SIZE): Likewise. * config/pa/pa.h (WIDEST_HARDWARE_FP_SIZE): Likewise. * config/rs6000/rs6000.h (WIDEST_HARDWARE_FP_SIZE): Likewise. * config/s390/s390.h (WIDEST_HARDWARE_FP_SIZE): Likewise. * config/sparc/sparc.h (WIDEST_HARDWARE_FP_SIZE): Likewise. * config/visium/visium.h (WIDEST_HARDWARE_FP_SIZE): Likewise. * doc/tm.texi.in (WIDEST_HARDWARE_FP_SIZE): Likewise. * doc/tm.texi: Regenerate. * system.h (WIDEST_HARDWARE_FP_SIZE): Poison. gcc/ada/ * gcc-interface/decl.cc (gnat_to_gnu_entity): Use the precision of longest_float_type_node to compute the maximum size of FP types. --- diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc index e569eb1bddf..be2df77fcff 100644 --- a/gcc/ada/gcc-interface/decl.cc +++ b/gcc/ada/gcc-interface/decl.cc @@ -543,12 +543,16 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition) esize = UI_To_Int (Esize (gnat_entity)); if (IN (kind, Float_Kind)) -#ifdef WIDEST_HARDWARE_FP_SIZE - max_esize = fp_prec_to_size (WIDEST_HARDWARE_FP_SIZE); -#else - max_esize - = fp_prec_to_size (TYPE_PRECISION (long_double_type_node)); -#endif + { + /* This block is executed the first time to translate the GNAT + node corresponding to Gigi's longest_float_type_node, so the + tree is not yet saved at this time. */ + if (longest_float_type_node) + max_esize + = fp_prec_to_size (TYPE_PRECISION (longest_float_type_node)); + else + max_esize = esize; + } else if (IN (kind, Access_Kind)) max_esize = POINTER_SIZE * 2; else diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 9031d67b50d..26db4958a80 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -96,8 +96,6 @@ #define LONG_LONG_TYPE_SIZE 64 -#define WIDEST_HARDWARE_FP_SIZE 64 - /* This value is the amount of bytes a caller is allowed to drop the stack before probing has to be done for stack clash protection. */ #define STACK_CLASH_CALLER_GUARD 1024 diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 47422032b7b..1a1abfe99b4 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -195,9 +195,6 @@ extern enum alpha_fp_trap_mode alpha_fptm; /* Define the size of `long long'. The default is the twice the word size. */ #define LONG_LONG_TYPE_SIZE 64 -/* Work around target_flags dependency in ada/targtyps.cc. */ -#define WIDEST_HARDWARE_FP_SIZE 64 - #define WCHAR_TYPE "unsigned int" #define WCHAR_TYPE_SIZE 32 diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 1b8785d7872..f2e8fd2447f 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -743,8 +743,6 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define POINTER_SIZE (TARGET_X32 ? 32 : BITS_PER_WORD) #define LONG_LONG_TYPE_SIZE 64 -#define WIDEST_HARDWARE_FP_SIZE 80 - #if defined (TARGET_BI_ARCH) || TARGET_64BIT_DEFAULT #define MAX_BITS_PER_WORD 64 #else diff --git a/gcc/config/ia64/vms.h b/gcc/config/ia64/vms.h index 3ab01037643..ae07ffd292a 100644 --- a/gcc/config/ia64/vms.h +++ b/gcc/config/ia64/vms.h @@ -33,10 +33,6 @@ along with GCC; see the file COPYING3. If not see #undef MAX_OFILE_ALIGNMENT #define MAX_OFILE_ALIGNMENT 524288 /* 8 x 2^16 by DEC Ada Test CD40VRA */ -/* Widest floating-point type efficiently supported by hardware and OS. */ -#undef WIDEST_HARDWARE_FP_SIZE -#define WIDEST_HARDWARE_FP_SIZE 64 - /* The structure return address arrives as an "argument" on VMS. */ #undef PCC_STATIC_STRUCT_RETURN diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index f62361f0d69..f2fda4140ee 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -269,11 +269,6 @@ typedef struct GTY(()) machine_function #define MIN_UNITS_PER_WORD 4 #endif -/* The widest floating point format supported by the hardware. Note that - setting this influences some Ada floating point type sizes, currently - required for GNAT to operate properly. */ -#define WIDEST_HARDWARE_FP_SIZE 64 - /* Allocation boundary (in *bits*) for storing arguments in argument list. */ #define PARM_BOUNDARY BITS_PER_WORD diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 401f50ead4f..8235e095bcc 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -691,9 +691,6 @@ extern unsigned char rs6000_recip_bits[]; words. */ #define LONG_LONG_TYPE_SIZE 64 -/* Work around rs6000_long_double_type_size dependency in ada/targtyps.cc. */ -#define WIDEST_HARDWARE_FP_SIZE 64 - /* Width in bits of a pointer. See also the macro `Pmode' defined below. */ extern unsigned rs6000_pointer_size; diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index 6df691c4692..4764a87c7a6 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -386,9 +386,6 @@ extern const char *s390_host_detect_local_cpu (int argc, const char **argv); #define LONG_TYPE_SIZE (TARGET_64BIT ? 64 : 32) #define LONG_LONG_TYPE_SIZE 64 -/* Work around target_flags dependency in ada/targtyps.cc. */ -#define WIDEST_HARDWARE_FP_SIZE 64 - /* We use "unsigned char" as default. */ #define DEFAULT_SIGNED_CHAR 0 diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 16e31901ca6..43174c5d475 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -495,10 +495,7 @@ along with GCC; see the file COPYING3. If not see /* SPARC_LONG_DOUBLE_TYPE_SIZE is defined per OS even though the SPARC ABI says that it is 128-bit wide. LONG_DOUBLE_TYPE_SIZE get poisoned, so add SPARC_ prefix. */ -/* #define SPARC_LONG_DOUBLE_TYPE_SIZE 128 */ - -/* The widest floating-point format really supported by the hardware. */ -#define WIDEST_HARDWARE_FP_SIZE 64 +#define SPARC_LONG_DOUBLE_TYPE_SIZE 128 /* Width in bits of a pointer. This is the size of ptr_mode. */ #define POINTER_SIZE (TARGET_PTR64 ? 64 : 32) diff --git a/gcc/config/visium/visium.h b/gcc/config/visium/visium.h index 245f71e8396..f63d5ad594f 100644 --- a/gcc/config/visium/visium.h +++ b/gcc/config/visium/visium.h @@ -330,17 +330,6 @@ it is rounded up to one unit.) */ #define CHAR_TYPE_SIZE 8 -/* `WIDEST_HARDWARE_FP_SIZE' - - A C expression for the size in bits of the widest floating-point - format supported by the hardware. If you define this macro, you - must specify a value less than or equal to mode precision of the - mode used for C type long double (from hook - targetm.c.mode_for_floating_type with tree_index - TI_LONG_DOUBLE_TYPE). If you do not define this macro, mode - precision of the mode used for C type long double is the - default. */ - /* `DEFAULT_SIGNED_CHAR' An expression whose value is 1 or 0, according to whether the type diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 6178db74d2f..a5785b93720 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -1711,16 +1711,6 @@ uses this macro should also arrange to use @file{t-gnu-prefix} in the libgcc @file{config.host}. @end defmac -@defmac WIDEST_HARDWARE_FP_SIZE -A C expression for the size in bits of the widest floating-point format -supported by the hardware. If you define this macro, you must specify a -value less than or equal to mode precision of the mode used for C type -@code{long double} (from hook @code{targetm.c.mode_for_floating_type} -with argument @code{TI_LONG_DOUBLE_TYPE}). If you do not define this -macro, mode precision of the mode used for C type @code{long double} is -the default. -@end defmac - @defmac DEFAULT_SIGNED_CHAR An expression whose value is 1 or 0, according to whether the type @code{char} should be signed or unsigned by default. The user can diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 0a97b0fa2e4..3d295eb5b49 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -1446,16 +1446,6 @@ uses this macro should also arrange to use @file{t-gnu-prefix} in the libgcc @file{config.host}. @end defmac -@defmac WIDEST_HARDWARE_FP_SIZE -A C expression for the size in bits of the widest floating-point format -supported by the hardware. If you define this macro, you must specify a -value less than or equal to mode precision of the mode used for C type -@code{long double} (from hook @code{targetm.c.mode_for_floating_type} -with argument @code{TI_LONG_DOUBLE_TYPE}). If you do not define this -macro, mode precision of the mode used for C type @code{long double} is -the default. -@end defmac - @defmac DEFAULT_SIGNED_CHAR An expression whose value is 1 or 0, according to whether the type @code{char} should be signed or unsigned by default. The user can diff --git a/gcc/system.h b/gcc/system.h index c00995ccb17..36f73a70f70 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -1066,7 +1066,7 @@ extern void fancy_abort (const char *, int, const char *) STANDARD_INCLUDE_DIR STANDARD_INCLUDE_COMPONENT \ LINK_ELIMINATE_DUPLICATE_LDIRECTORIES MIPS_DEBUGGING_INFO \ IDENT_ASM_OP ALL_COP_ADDITIONAL_REGISTER_NAMES \ - RANGE_TEST_NON_SHORT_CIRCUIT \ + RANGE_TEST_NON_SHORT_CIRCUIT EXTENDED_SDB_BASIC_TYPES \ REAL_VALUE_TRUNCATE REVERSE_CONDEXEC_PREDICATES_P \ TARGET_ALIGN_ANON_BITFIELDS TARGET_NARROW_VOLATILE_BITFIELDS \ IDENT_ASM_OP UNALIGNED_SHORT_ASM_OP UNALIGNED_INT_ASM_OP \ @@ -1086,7 +1086,8 @@ extern void fancy_abort (const char *, int, const char *) EH_FRAME_IN_DATA_SECTION TARGET_FLT_EVAL_METHOD_NON_DEFAULT \ JCR_SECTION_NAME TARGET_USE_JCR_SECTION SDB_DEBUGGING_INFO \ SDB_DEBUG NO_IMPLICIT_EXTERN_C NOTICE_UPDATE_CC \ - CC_STATUS_MDEP_INIT CC_STATUS_MDEP CC_STATUS SLOW_SHORT_ACCESS + CC_STATUS_MDEP_INIT CC_STATUS_MDEP CC_STATUS SLOW_SHORT_ACCESS \ + WIDEST_HARDWARE_FP_SIZE /* Hooks that are no longer used. */ #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \ @@ -1103,7 +1104,7 @@ extern void fancy_abort (const char *, int, const char *) TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN \ TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD \ TARGET_MD_ASM_CLOBBERS TARGET_RELAXED_ORDERING \ - EXTENDED_SDB_BASIC_TYPES TARGET_INVALID_PARAMETER_TYPE \ + TARGET_INVALID_PARAMETER_TYPE \ TARGET_INVALID_RETURN_TYPE /* Arrays that were deleted in favor of a functional interface. */