On Thu, Oct 22, 2020 at 06:06:03PM -0400, Michael Meissner wrote:
> This patch adds the various decimal to/from IEEE 128-bit conversions.  I
> had to make some changes to the infrastructure, since that infrastructure
> assumed that there is a sprintf/scanf format modifier to convert floating
> point.  Instead, I used to str* conversion functions.

> --- /dev/null
> +++ b/libgcc/config/rs6000/_dd_to_kf.c

> +/* Decimal64 -> _Float128 conversion.  */
> +#define FINE_GRAINED_LIBRARIES       1

This isn't defined in any other source file (instead, it is put in the
Makefile).  Why should it be different here?

> +# Force the TF mode to/from decimal functions to be compiled with IBM long
> +# double.  Add building the KF mode to/from decimal conversions with explict

(typo, "explicit")

> +#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.

> +/* 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.

(Some libgcc maintainer needs to approve the generic parts, not all of
it can obviously only trigger for us.)


Segher

Reply via email to