]> git.ipfire.org Git - thirdparty/gcc.git/commit
rs6000: Remove GCC 8.1 U10__float128 mangling compatibility [PR104172]
authorJakub Jelinek <jakub@redhat.com>
Tue, 25 Jan 2022 04:49:05 +0000 (05:49 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 25 Jan 2022 04:49:05 +0000 (05:49 +0100)
commitf4ee27d3262fc4fc3e5d3535f195fdcf87d7ec77
tree0859d07ff7c7414ad762bf5e746285bf6b9ef8b7
parentbb99171b9b0f01a46bfca2d3cbd52fc6faf6cbaa
rs6000: Remove GCC 8.1 U10__float128 mangling compatibility [PR104172]

In GCC 7.x and earlier, while it had -mabi=ieeelongdouble option, that option
was undocumented and unsupported.
In GCC 8.1 that option got documented and -mabi=ieeelongdouble long double started
to be mangled as U10__float128.
In GCC 9 and backported to before 8.2 release, that mangling changed to
u9__ieee128 and a support for emitting compatibility mangling aliases have
been added.
Unfortunately, as mentioned in the PR, those don't really work well in many
cases, the free_lang_data pass throws away important trees, so e.g. with
-flto -ffat-lto-objects the compiler often ICEs on templates that involve
IEEE quad long double arguments etc. because the mangling was done too late
(at final time).
Furthermore, lto1's mangler is not the C++ mangler, so with -flto it would
often emit as "mangled identifiers" something that wasn't a valid assembler
identifier, e.g. operator+ etc.
While it is possible to do such mangling earlier, e.g. at the same time when
the C++ FE emits its mangling aliases and untested proof of concept is in
the PR, there seems to be agreement that we shouldn't bother with this
ABI compatibility with something that probably nobody really used.
GCC 8.2 already uses the new mangling, it was just a few months, but more
importantly, libstdc++ support for IEEE quad long double on
powerpc64le-linux was only added in GCC 11, and glibc support for that some
weeks after 8.2 got released.

So, the following patch just drops those aliases.

2022-01-25  Jakub Jelinek  <jakub@redhat.com>

PR target/104172
gcc/
* config/rs6000/rs6000-internal.h (rs6000_passes_ieee128): Don't
declare.
* config/rs6000/rs6000.cc (rs6000_passes_ieee128,
ieee128_mangling_gcc_8_1): Remove.
(TARGET_ASM_GLOBALIZE_DECL_NAME): Don't redefine.
(rs6000_mangle_type): Return "u9__ieee128" instead of
ieee128_mangling_gcc_8_1 ? "U10__float128" : "u9__ieee128".
(rs6000_globalize_decl_name): Remove.
* config/rs6000/rs6000-call.cc (init_cumulative_args,
rs6000_function_arg_advance_1): Don't set rs6000_passes_ieee128.
gcc/config/rs6000/rs6000-call.cc
gcc/config/rs6000/rs6000-internal.h
gcc/config/rs6000/rs6000.cc