]> gcc.gnu.org Git - gcc.git/commit
Rework 128-bit complex multiply and divide.
authorMichael Meissner <meissner@linux.ibm.com>
Tue, 9 Aug 2022 21:05:20 +0000 (17:05 -0400)
committerMichael Meissner <meissner@linux.ibm.com>
Tue, 9 Aug 2022 21:05:20 +0000 (17:05 -0400)
commit7e5821e3bd54982ecb191803b6ef35074143f55c
tree65c9be1a4a7a88b2a77e8781f18bd0bf9e2d802d
parentea4e99013f4e49199cb35cd13d0a4d06cb90e70d
Rework 128-bit complex multiply and divide.

This function reworks how the complex multiply and divide built-in functions are
done.  Previously we created built-in declarations for doing long double complex
multiply and divide when long double is IEEE 128-bit.  The old code also did not
support __ibm128 complex multiply and divide if long double is IEEE 128-bit.

One of the problems with this approach is that the add_builtin_function would
abort if we used the same name for two different built-in functions.

This code does not create the built-in declaration.  Instead, it uses the
TARGET_MANGLE_DECL_ASSEMBLER_NAME hook to change the name before it is written
out to the assembler file.

2022-08-09   Michael Meissner  <meissner@linux.ibm.com>

gcc/

* config/rs6000/rs6000-c.cc (rs6000_cpu_cpp_builtins): Set
building_libgcc.
* config/rs6000/rs6000.cc (create_complex_muldiv): Delete.
(init_float128_ieee): Delete code to switch complex multiply and divide
for long double.
(complex_multiply_builtin_code): New helper function.
(complex_divide_builtin_code): Likewise.
(rs6000_mangle_decl_assembler_name): Add support for mangling the name
of complex 128-bit multiply and divide built-in functions.
* config/rs6000/rs6000.opt (building_libgcc): New target variable.
gcc/config/rs6000/rs6000-c.cc
gcc/config/rs6000/rs6000.cc
gcc/config/rs6000/rs6000.opt
This page took 0.055765 seconds and 6 git commands to generate.