[gcc(refs/users/meissner/heads/work098)] Make __float128 use the _Float128 type.
Michael Meissner
meissner@gcc.gnu.org
Fri Aug 19 00:39:20 GMT 2022
https://gcc.gnu.org/g:f31e158c7aa36a870e21db15c89d97249cd1e576
commit f31e158c7aa36a870e21db15c89d97249cd1e576
Author: Michael Meissner <meissner@linux.ibm.com>
Date: Thu Aug 18 20:38:56 2022 -0400
Make __float128 use the _Float128 type.
Currently GCC uses the long double type node for __float128 if long double is
IEEE 128-bit. It did not use the node for _Float128.
This showed up if you call the nansq function to make a signaling NaN (nansq is
mapped to nansf128). Because the type node for _Float128 is different from
__float128, the machine independent code converts signaling NaNs to quiet NaNs
if the types are not compatible. The following tests used to fail when run on
a system where long double is IEEE 128-bit:
gcc.dg/torture/float128-nan.c
gcc.target/powerpc/nan128-1.c
This patch makes both __float128 and _Float128 use the same type node.
2022-08-17 Michael Meissner <meissner@linux.ibm.com>
gcc/
* config/rs6000/rs6000-builtin.cc (rs6000_init_builtins): Always use the
_Float128 type for __float128. Don't use the long double type.
Diff:
---
gcc/config/rs6000/rs6000-builtin.cc | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gcc/config/rs6000/rs6000-builtin.cc b/gcc/config/rs6000/rs6000-builtin.cc
index 70680890415..10abc8463e8 100644
--- a/gcc/config/rs6000/rs6000-builtin.cc
+++ b/gcc/config/rs6000/rs6000-builtin.cc
@@ -733,10 +733,7 @@ rs6000_init_builtins (void)
if (TARGET_FLOAT128_TYPE)
{
- if (TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128)
- ieee128_float_type_node = long_double_type_node;
- else
- ieee128_float_type_node = float128_type_node;
+ ieee128_float_type_node = float128_type_node;
t = build_qualified_type (ieee128_float_type_node, TYPE_QUAL_CONST);
lang_hooks.types.register_builtin_type (ieee128_float_type_node,
"__ieee128");
More information about the Gcc-cvs
mailing list