[PATCH 05/34] rs6000: Add available-everywhere and ancient builtins

Segher Boessenkool segher@kernel.crashing.org
Wed Aug 11 10:29:28 GMT 2021

On Tue, Aug 10, 2021 at 04:29:10PM -0500, Bill Schmidt wrote:
> On 8/10/21 12:34 PM, Segher Boessenkool wrote:
> >On Tue, Aug 10, 2021 at 11:17:05AM -0500, will schmidt wrote:
> >>On Thu, 2021-07-29 at 08:30 -0500, Bill Schmidt wrote:
> >>>+; This will break for long double == _Float128.  libgcc history.
> >>>+  const long double __builtin_pack_longdouble (double, double);
> >>>+    PACK_TF packtf {}
> >>Add a few more words to provide bigger hints for future archeological
> >>digs?  (This is perhaps an obvious issue, but I'd need to do some
> >>spelunking)
> >It is for __ibm128 only, not for other long double formats (we have
> >three: plain double, double double, IEEE QP).  So maybe the return type
> >should be changed?  The name of the builtin of course is unfortunate,
> >but it is too late to change :-)
> Yeah...I'm not sure how much flexibility we have here to avoid breaking 
> code in the field, but it's not a big break because whoever may be using 
> it has to be assuming long double = __ibm128, and probably has work to 
> do anyway.

We do have an
  __ibm128 __builtin_pack_ibm128 (double, double);
already, so we just should get people to use that one, make it more
prominent in the documentation?  Or we can also make
__builtin_pack_longdouble warn (or even error) if used when long double
is not double-double.  Maybe an attribute (or what is it called, a
{thing} I mean) in the new description files to say "warn (or error) if
long double is not ibm128"?

> Perhaps I should commit as is for now, and then prepare a separate patch 
> to change this builtin?  There may be test suite fallout, not sure offhand.

Yes, I did approve it already, right?  Reviewing these patches I notice
things that should be improved, but that does not have to be done *now*,
or by you for that matter :-)



More information about the Gcc-patches mailing list