Define __SIZEOF_FLOAT128__ and __SIZEOF_IBM128__.
authorMichael Meissner <meissner@linux.ibm.com>
Thu, 17 Feb 2022 03:00:00 +0000 (22:00 -0500)
committerMichael Meissner <meissner@linux.ibm.com>
Thu, 17 Feb 2022 03:00:00 +0000 (22:00 -0500)
commit687e57d7ac741d1c48ac030f87041aa56b888532
treee1df40a1a9996fb9ade858a29ce67ab994ed85bf
parent5fbcbcaff7248604e04b39464f4fbd64fbf6e43b
Define __SIZEOF_FLOAT128__ and __SIZEOF_IBM128__.

Define the sizes of the PowerPC specific types __float128 and __ibm128 if those
types are enabled.

This patch will define __SIZEOF_IBM128__ and __SIZEOF_FLOAT128__ if their
respective types are created in the compiler.  Currently, this means both of
these will be defined if float128 support is enabled.  But at some point in
the future, __ibm128 could be enabled without enabling float128 support and
__SIZEOF_IBM128__ would be defined.

2022-02-16  Michael Meissner  <meissner@the-meissners.org>

gcc/
PR target/99708
* config/rs6000/rs6000-c.cc (rs6000_cpu_cpp_builtins): Define
__SIZEOF_IBM128__ if the IBM 128-bit long double type is created.
Define __SIZEOF_FLOAT128__ if the IEEE 128-bit floating point type
is created.

gcc/testsuite/
PR target/99708
* gcc.target/powerpc/pr99708.c: New test.
gcc/config/rs6000/rs6000-c.cc
gcc/testsuite/gcc.target/powerpc/pr99708.c [new file with mode: 0644]