On Thu, Oct 29, 2020 at 12:56:03PM -0400, Michael Meissner wrote:
> On Wed, Oct 28, 2020 at 04:58:46PM -0500, Segher Boessenkool wrote:
> > > #if defined (__LONG_DOUBLE_128__) && defined (__LONG_DOUBLE_IBM128__)
> > > \
> > > && !(defined (_SOFT_FLOAT) || defined (__NO_FPRS__))
> > > return __builtin_pack_longdouble (dh, dl);
> > > +#elif defined (__LONG_DOUBLE_128__) && defined (__LONG_DOUBLE_IEEE128__)
> > > \
> > > + && !(defined (_SOFT_FLOAT) || defined (__NO_FPRS__))
> > > + return __builtin_pack_ibm128 (dh, dl);
> >
> > Given the above, _SOFT_FLOAT etc. are wrong.
> >
> > Just use some more portable thing to repack? Is __builtin_pack_ibm128
> > not defined always here anyway?
>
> That is the problem. If you build a big endian PowerPC compiler where VSX is
> not default, the __ibm128 stuff is not defined. It is only defined when
> __float128 is a possibility. Hence __builtin_pack_ibm128 and
> __builtin_unpack_ibm128 are not defined.
So fix that? When ibm128 is the only thing supported there is no reason
why __builtin_{un,}pack_ibm128 should not be supported (the ieee128
functions of course not, but there is no reason to not define the normal
names for the one supported thing).
> > /* 128-bit __ibm128 floating point builtins (use -mfloat128 to indicate that
> > __ibm128 is available). */
> > #define BU_IBM128_2(ENUM, NAME, ATTR, ICODE) \
> > RS6000_BUILTIN_2 (MISC_BUILTIN_ ## ENUM, /* ENUM */ \
> > "__builtin_" NAME, /* NAME */ \
> > (RS6000_BTM_HARD_FLOAT /* MASK */ \
> > | RS6000_BTM_FLOAT128), \
> > (RS6000_BTC_ ## ATTR /* ATTR */ \
> > | RS6000_BTC_BINARY), \
> > CODE_FOR_ ## ICODE) /* ICODE */
> >
> > (so just HARD_FLOAT and FLOAT128 are needed)
> >
> > What am I missing?
>
> As I said, the __ibm128 keyword is not enabled on non-VSX systems.
So fix that? It can easily be supported everywhere, after all.
Segher