Hi! On Mon, Dec 13, 2021 at 09:55:17AM -0600, Bill Schmidt wrote: > PR103623 shows that we ICE if __builtin_pack_longdouble or > __builtin_unpack_longdouble > is used when long double is not defined to be the IBM-128 (double-double) > format. > To solve this, I introduce a new built-in function attribute "ibmld" that > enforces > this requirement.
Good call. > @@ -215,13 +216,8 @@ > double __builtin_mffsl (); > MFFSL rs6000_mffsl {} > > -; This thing really assumes long double == __ibm128, and I'm told it has > -; been used as such within libgcc. Given that __builtin_pack_ibm128 > -; exists for the same purpose, this should really not be used at all. > -; TODO: Consider adding special handling for this to warn whenever > -; long double is not __ibm128. > const long double __builtin_pack_longdouble (double, double); > - PACK_TF packtf {} > + PACK_TF packtf {ibmld} You removed a bit much of the comment. Please retain the part about __builtin_pack_ibm128 being better to use, less antiquated. > -; See above comments for __builtin_pack_longdouble. > const double __builtin_unpack_longdouble (long double, const int<1>); > - UNPACK_TF unpacktf {} > + UNPACK_TF unpacktf {ibmld} And that comment :-) (Or just copy the short comment from there). Okay for trunk with that tweaked (and Martin's quoting thing taken care of). Thanks! Segher