Hi!

On Fri, Jan 28, 2022 at 10:47:06PM -0500, Michael Meissner wrote:
> Use correct names for __ibm128 if long double is IEEE 128-bit.
> 
> If you are on a PowerPC system where the default long double is IEEE
> 128-bit, GCC will use the wrong names for some of the conversion functions
> for the __ibm128 type.

It uses the wrong functions, yes.

> What is happening is when the defult long double is IEEE 128-bit, the

(default)

> various convert, truncation, and extend functions did not specify a
> default name for the conversion.  The machine indepentent portions of the

(independent)

> compiler would construct a call with an 'if' name (IFmode being the mode
> for IBM 128-bit floating point).  This patch specifies to use the
> tradiational 'tf' name for these conversion functions.

(traditional)

> 2022-01-28  Michael Meissner  <meiss...@the-meissners.org>
> 
> gcc/
>       PR target/104253
>       * config/rs6000/rs6000.cc (init_float128_ibm): Use the TF names
>       for builtin conversions between __ibm128 and DImode when long
>       double uses the IEEE 128-bit format.

Please rephrase this?  It should say "*also* when long double is IEEE
QP".  And it is not about the names in the first place.

In the code it says
  /* Add various conversions for IFmode to use the traditional TFmode
     names.  */
which is both clearer and more correct :-)

> gcc/testsuite/
>       PR target/104253
>       * gcc.target/powerpc/pr104253.c: New test.

> +/* { require-effective-target ppc_float128_sw } */

The documentation for this selector is wrong, btw: it says it tests
whether this is emulated in software!  But instead it just tests if it
works, soft float, emulated, and hardware are all fine.

The patch is okay for trunk, and backports later.  Thanks!


Segher

Reply via email to