]> git.ipfire.org Git - people/ms/gcc.git/commit
Rework 128-bit complex multiply and divide.
authorMichael Meissner <meissner@linux.ibm.com>
Mon, 20 Mar 2023 18:48:06 +0000 (14:48 -0400)
committerMichael Meissner <meissner@linux.ibm.com>
Mon, 20 Mar 2023 18:48:06 +0000 (14:48 -0400)
commitc67f312d20e15e5aa18c587693b4ab7e131596c1
tree8249ecffa76f724bc6fb500d08a2cf5b44934d29
parent4410a08b80cc40342eeaa5b6af824cd4352b218c
Rework 128-bit complex multiply and divide.

This patch reworks how the complex multiply and divide built-in functions are
done.  Previously GCC created built-in declarations for doing long double complex
multiply and divide when long double is IEEE 128-bit.  However, it did not
support __ibm128 complex multiply and divide if long double is IEEE 128-bit.

This code does not create the built-in declaration with the changed name.
Instead, it uses the TARGET_MANGLE_DECL_ASSEMBLER_NAME hook to change the name
before it is written out to the assembler file like it now does for all of the
other long double built-in functions.

2023-03-20   Michael Meissner  <meissner@linux.ibm.com>

gcc/

PR target/109067
* 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.

gcc/testsuite/

PR target/109067
* gcc.target/powerpc/divic3-1.c: New test.
* gcc.target/powerpc/divic3-2.c: Likewise.
* gcc.target/powerpc/mulic3-1.c: Likewise.
* gcc.target/powerpc/mulic3-2.c: Likewise.
gcc/config/rs6000/rs6000.cc
gcc/testsuite/gcc.target/powerpc/divic3-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/divic3-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/mulic3-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/mulic3-2.c [new file with mode: 0644]