rs6000: Set up ieee128_float_type_node correctly (PR82625)
We shouldn't init __ieee128 to be the same as long double if the latter is not even a 128-bit type. This also reorders the nearby __ibm128 code so both types use similar logic. PR target/82625 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set ieee128_float_type_node to long_double_type_node unless TARGET_LONG_DOUBLE_128 is set. From-SVN: r262152
This commit is contained in:
parent
4f5b9c803a
commit
54647e7b72
2 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
|||
2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
|
||||
|
||||
PR target/82625
|
||||
* config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
|
||||
ieee128_float_type_node to long_double_type_node unless
|
||||
TARGET_LONG_DOUBLE_128 is set.
|
||||
|
||||
2018-06-26 David Malcolm <dmalcolm@redhat.com>
|
||||
|
||||
* cfgloop.c (get_loop_location): Convert return type from
|
||||
|
|
|
@ -16421,21 +16421,24 @@ rs6000_init_builtins (void)
|
|||
__ieee128. */
|
||||
if (TARGET_FLOAT128_TYPE)
|
||||
{
|
||||
if (TARGET_IEEEQUAD || !TARGET_LONG_DOUBLE_128)
|
||||
if (!TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128)
|
||||
ibm128_float_type_node = long_double_type_node;
|
||||
else
|
||||
{
|
||||
ibm128_float_type_node = make_node (REAL_TYPE);
|
||||
TYPE_PRECISION (ibm128_float_type_node) = 128;
|
||||
SET_TYPE_MODE (ibm128_float_type_node, IFmode);
|
||||
layout_type (ibm128_float_type_node);
|
||||
}
|
||||
else
|
||||
ibm128_float_type_node = long_double_type_node;
|
||||
|
||||
lang_hooks.types.register_builtin_type (ibm128_float_type_node,
|
||||
"__ibm128");
|
||||
|
||||
ieee128_float_type_node
|
||||
= TARGET_IEEEQUAD ? long_double_type_node : float128_type_node;
|
||||
if (TARGET_IEEEQUAD && TARGET_LONG_DOUBLE_128)
|
||||
ieee128_float_type_node = long_double_type_node;
|
||||
else
|
||||
ieee128_float_type_node = float128_type_node;
|
||||
|
||||
lang_hooks.types.register_builtin_type (ieee128_float_type_node,
|
||||
"__ieee128");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue