From: Kewen Lin Date: Tue, 25 Jun 2024 05:04:51 +0000 (-0500) Subject: vms: Replace use of LONG_DOUBLE_TYPE_SIZE X-Git-Tag: basepoints/gcc-16~7960 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eddf6e857bc79cfa0bee3b9ad89a7e16a81d1e8;p=thirdparty%2Fgcc.git vms: Replace use of LONG_DOUBLE_TYPE_SIZE Joseph pointed out "floating types should have their mode, not a poorly defined precision value" in the discussion[1], as he and Richi suggested, the existing macros {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE will be replaced with a hook mode_for_floating_type. To be prepared for that, this patch is to replace use of LONG_DOUBLE_TYPE_SIZE in vms port with TYPE_PRECISION of long_double_type_node. [1] https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651209.html gcc/ChangeLog: * config/vms/vms.cc (vms_patch_builtins): Use TYPE_PRECISION of long_double_type_node to replace LONG_DOUBLE_TYPE_SIZE. --- diff --git a/gcc/config/vms/vms.cc b/gcc/config/vms/vms.cc index d468c79e5590..2fcc673c8a91 100644 --- a/gcc/config/vms/vms.cc +++ b/gcc/config/vms/vms.cc @@ -141,6 +141,7 @@ vms_patch_builtins (void) if (builtin_decl_implicit_p (BUILT_IN_FWRITE_UNLOCKED)) set_builtin_decl_implicit_p (BUILT_IN_FWRITE_UNLOCKED, false); + unsigned long_double_type_size = TYPE_PRECISION (long_double_type_node); /* Define aliases for names. */ for (i = 0; i < NBR_CRTL_NAMES; i++) { @@ -179,7 +180,7 @@ vms_patch_builtins (void) vms_add_crtl_xlat (alt, nlen + 1, res, rlen); /* Long double version. */ - res[rlen - 1] = (LONG_DOUBLE_TYPE_SIZE == 128 ? 'X' : 'T'); + res[rlen - 1] = (long_double_type_size == 128 ? 'X' : 'T'); alt[nlen] = 'l'; vms_add_crtl_xlat (alt, nlen + 1, res, rlen); @@ -223,7 +224,7 @@ vms_patch_builtins (void) if (n->flags & VMS_CRTL_FLOAT64) res[rlen++] = 't'; - if ((n->flags & VMS_CRTL_FLOAT128) && LONG_DOUBLE_TYPE_SIZE == 128) + if ((n->flags & VMS_CRTL_FLOAT128) && long_double_type_size == 128) res[rlen++] = 'x'; memcpy (res + rlen, n->name, nlen);