On Tue, Feb 15, 2022 at 01:45:06PM -0600, Segher Boessenkool wrote:
> On Tue, Feb 15, 2022 at 12:49:41PM -0500, Michael Meissner wrote:
> > Define __SIZEOF_FLOAT128__ and __SIZEOF_IBM128__.
> > 
> > Define the sizes of the PowerPC specific types __float128 and __ibm128 if 
> > those
> > types are enabled.
> 
> This is very silly of course, both of these are 16 bytes.  Abusing this
> to see if the types exist is at least as silly (there are much better
> mechanisms to do this).

This is just trying to close out the PR that people asked for.

> So, this facilitates bad habits and bad code.  But, whatever, the macros
> are just stating totally obvious and redundant facts, no problem, let's
> just ignore that pepople only want it to abuse it.
> 
> > gcc/
> >     PR target/99708
> >     * config/rs6000/rs6000-c.cc (rs6000_target_modify_macros): Define
> >     __SIZEOF_FLOAT128__ and __SIZEOF_IBM128__ if we have float128
> >     support.
> 
> No.  __SIZEOF_IBM128__ should be defined if and only if __ibm128 is
> defined.

In the current implementation, __ibm128 is only defined if __float128 was
defined.  I did have patches 6 months or so to define __ibm128 on any system
with IBM 128-bit long double.  But those were never applied to the trunk.

> This should be tested directly, it should not depend on that some other
> code did what it does today.  That would also make the code much more
> obvious.

Given __float128 and __ibm128 are defined at the same time, I don't see the
need for a separate target-supports.exp test, and so forth.  But if you want
that, I can easily do it.

-- 
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meiss...@linux.ibm.com

Reply via email to