mbox series

[0/2] PR target/113652, Fix failed bootstrap on ppc unrecognized opcode: `lfiwzx' with -mcpu=7450

Message ID ZpioOp6Il_igm21P@cowardly-lion.the-meissners.org
Headers show
Series PR target/113652, Fix failed bootstrap on ppc unrecognized opcode: `lfiwzx' with -mcpu=7450 | expand

Message

Michael Meissner July 18, 2024, 5:29 a.m. UTC
Currently, we add -mvsx when building the float128 support in libgcc.  This
allows us to build the float128 support on a big endian system where the
default cpu is power4.  While the libgcc support can be built, given there is
no glibc support for float128 available.

However, adding -mvsx and building the libgcc float128 support causes problems
if you set the default cpu to something like a 7540, which does not have VSX
support.  The assembler complains that when the code does a ".machine 7450", you
cannot use VSX instructions.

There are two patches in this set:

In the first patch, the float128 libgcc support is only built if the default
compiler has VSX support.  If somebody wants to enable the glibc support for
big endian, they would need to set the base cpu to power8 to enable building
the libgcc float128 libraries.

In the second patch, I adjusted the compiler tests so that they would only run
the float128 tests when the compiler enables float128.  I removed setting
options for enabling the VSX instruction set (-mvsx), enabling float128 support
in the compiler (-mfloat128), and enabling float128 hardware support
(-mfloat128-hardware), even if -mcpu=power9 was used.

I built little endian compilers and there were no regressions.

I built big endian compilers with the --with-cpu=power5 configure option, and I
verified that none of the float128 support functions are built.

I also built big endian compilers on a power9 with the --with-cpu=native
configure option, and I verified that the float128 support functions were
built, since the default compiler used the VSX instruction set.

I verified that on both sets of big endian builds, that all of the float128
tests were skipped, since there is no support for float128 in glibc and the GCC
compiler does not enable float128 on those systems.

Can I check these patches into the trunk assuming the original bugzilla author
says they fix the problem?