Hi! On Thu, Oct 29, 2020 at 12:45:15PM -0400, Michael Meissner wrote: > On Wed, Oct 28, 2020 at 07:04:31PM -0500, Segher Boessenkool wrote: > > > +#if HAVE_KF_MODE > > > + strfromf128 (buf, BUFMAX, BFP_FMT, (BFP_VIA_TYPE) x); > > > +#else > > > sprintf (buf, BFP_FMT, (BFP_VIA_TYPE) x); > > > +#endif > > > > Does strfromf128 exist everywhere we build this? It isn't a standard > > function. > > Yes, it is in ISO/IEC TS 18661-3, which is the document that describes most of > the *f128 functions.
But this means it does *not* exist most places we build this? Not the whole world is Linux (and even then, it is probably a too recent addition). Does it need something in libibiberty maybe? At least _doprnt handles long double (whatever type it uses for that, but that can be fixed :-) ) (_doprint is used by all the libiberty versions of the printf family, and it handles %lf etc. for long double.) > We have to use str* instead of sprintf or scanf, because I don't believe their > is a float128 format specifier. No standard one at least, yes. > > > +/* Support PowerPC KF mode, which is __float128 when long double is > > > + IBM extended double. */ > > > +#if defined (L_sd_to_kf) || defined (L_dd_to_kf) || defined (L_td_to_kf) > > > \ > > > + || defined (L_kf_to_sd) || defined (L_kf_to_dd) || defined (L_kf_to_td) > > > +#define HAVE_KF_MODE 1 > > > +#endif > > > > This might want a better name, other targets can have a KFmode as well, > > for some completely different purpose, since it is not a standard mode. > > Given everything else uses *F, including XF on the x86, I figured it was > easier > than creating a new name. I mean the name for the macro. "HAVE_KF_MODE" is not great. Anyway, some libgcc maintainer needs to review this, you may be lucky with this ;-) Segher