]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove left-overs of WIDEST_HARDWARE_FP_SIZE
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 4 Jul 2026 08:03:34 +0000 (10:03 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Mon, 6 Jul 2026 08:43:44 +0000 (10:43 +0200)
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.

13 files changed:
gcc/ada/gcc-interface/decl.cc
gcc/config/aarch64/aarch64.h
gcc/config/alpha/alpha.h
gcc/config/i386/i386.h
gcc/config/ia64/vms.h
gcc/config/pa/pa.h
gcc/config/rs6000/rs6000.h
gcc/config/s390/s390.h
gcc/config/sparc/sparc.h
gcc/config/visium/visium.h
gcc/doc/tm.texi
gcc/doc/tm.texi.in
gcc/system.h

index e569eb1bddf115aa16796790006200b3fe570f48..be2df77fcfffbc92b40aa932966a447e5987c19a 100644 (file)
@@ -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
index 9031d67b50d1031b87ef143c00f2595dc2159950..26db4958a80f26ed10a1bb920ef06810c2bd5d78 100644 (file)
@@ -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
index 47422032b7b38d2bed1043282801020f3347c646..1a1abfe99b4e11567f033360713d18eca6fb9b68 100644 (file)
@@ -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
 
index 1b8785d787225e446b1b89d5fd59a07e71060129..f2e8fd2447f4949c0d1383f6bff182a6bb6a6df4 100644 (file)
@@ -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
index 3ab0103764373f59692530efc7efa37ca6246819..ae07ffd292a1e2e67b02f044a27b3d8364086c96 100644 (file)
@@ -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
 
index f62361f0d6921446fc66e5668909d6257c00f508..f2fda4140eeebd52c2e0c310d2a5d293cf456a0c 100644 (file)
@@ -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
 
index 401f50ead4f4eb6a815ec6570190ee1e7ce1120c..8235e095bcce6459652e2558853b7a9b594990eb 100644 (file)
@@ -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;
index 6df691c4692d1e6423288c7e7a7e544edb0b2a16..4764a87c7a6b2943ee7c6a2079f550ac15edfb82 100644 (file)
@@ -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
 
index 16e31901ca6b4714fdb8b89ed74163d35fc0e589..43174c5d4756aab413f8ac8c69f3485490a1beed 100644 (file)
@@ -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)
index 245f71e839685248d4707815582c95ebcffab82f..f63d5ad594f5bcd3d02d138844fda5f4a924c8a0 100644 (file)
    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
index 6178db74d2fc5d14e8618ee655de05739cb3207c..a5785b93720cfcb2789268d851ed2c4d34e4daf2 100644 (file)
@@ -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
index 0a97b0fa2e44014fa9e27d07a06d407a25e1ecc4..3d295eb5b49e60d4d0047b02e8251c0dd7a870c6 100644 (file)
@@ -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
index c00995ccb17224a15e5b3d8f4bbc05f9a2f448f2..36f73a70f70851c3010fa317d9557fa973155c68 100644 (file)
@@ -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.  */