]> gcc.gnu.org Git - gcc.git/commit
Allow __ibm128 on older PowerPC systems.
authorMichael Meissner <meissner@linux.ibm.com>
Thu, 29 Apr 2021 00:32:27 +0000 (20:32 -0400)
committerMichael Meissner <meissner@linux.ibm.com>
Thu, 29 Apr 2021 00:32:27 +0000 (20:32 -0400)
commit47375deda1d5897f93476fbcd8bfbd8bd5530820
tree530a012f3acbb5bff4a92ddb1407c53924d0e636
parent0aedb0c4b1b80e3a05fa8363c09caf4383da5c35
Allow __ibm128 on older PowerPC systems.

In a previous patch, I added code to ibm-ldouble.c to use __builtin_pack_ibm128
if long double is IEEE 128-bit and continue to use __builtin_pack_longdouble
if long double is IBM extended double.  This code was needed because
__builtin_pack_ibm128 is not available unless the __ibm128 keyword is
availabe.  In the current code, __ibm128 is only enabled if we have support for
both IBM and IEEE 128-bit long double.

Segher suggested that instead I should make __ibm128, __builtin_pack_ibm128,
and __builtin_unpack_ibm128 available on older systems that don't support IEEE
128-bit floating point but does support the IBM extended double floating point.

This patch changes the code so that __ibm128 is now exported if either
long double uses the IBM extended double format, or IEEE 128-bit floating
point is available.

I changed the internal built-in types from float128 to ibm128, since the
only built-in functions that use this are __builtin_pack_ibm128 and
__builtin_unpack_ibm128, and the new name matches the function.

gcc/
2021-04-28  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/rs6000-builtin.def (BU_IBM128_2): Rename
RS6000_BTM_IBM128 from RS6000_BTM_FLOAT128.
* config/rs6000/rs6000-call.c (rs6000_invalid_builtin): Update
error message for __ibm128 built-in functions.
(rs6000_init_builtins): Create the __ibm128 keyword on older
systems where long double uses the IBM extended double format,
even if they don't support IEEE 128-bit floating point.
* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Rename
RS6000_BTM_IBM128 from RS6000_BTM_FLOAT128.
(rs6000_builtin_mask_names): Rename RS6000_BTM_IBM128 from
RS6000_BTM_FLOAT128.
* config/rs6000/rs6000.h (TARGET_IBM128): New macro.
(RS6000_BTM_IBM128): Rename from RS6000_BTM_FLOAT128.
(RS6000_BTM_COMMON): Rename RS6000_BTM_IBM128 from
RS6000_BTM_FLOAT128.
gcc/config/rs6000/rs6000-builtin.def
gcc/config/rs6000/rs6000-call.c
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.h
This page took 0.067461 seconds and 6 git commands to generate.