Hi!

On Mon, Oct 04, 2021 at 04:14:10PM +0200, Jakub Jelinek wrote:
> Based on some IRC discussion, yet another option would be bump libgfortran
> SONAME (on all arches), make real(kind=16) on powerpc64le-linux mean
> always IEEE quad (starting with GCC 12) and if wanted add support for
> real(kind=15) meaning double double.
> libgfortran would then on powerpc64le-linux use -mabi=ieeelongdouble to make
> sure that regardless of the long double choice for C/C++ (whether default
> configure time selection or explicit -mabi=*) GFC_REAL_16 is the __float128
> long double.
> One problem with that is that I think IEEE quad long double support relies
> on glibc 2.32 or later, so not sure what exactly would be done if gcc is
> built against older glibc when it needs to call libm routines.  Perhaps
> convert to __ibm128, call the __ibm128 sinl etc. and convert back (big loss
> of precision and range, but at least something).

Eventually we should get a world where kind=16 is IEEE QP float
everywhere, and kind=17 (or whatever) is double-double.

Some current Power GCC targets support neither.  Some support only
double-double.  Making IEEE QP float work on those (that is, those that
are < power8) will require some work still: it should use libquadmath or
similar, but that needs to be put into the ABIs, to define how parameter
passing works for those types.  Just treating it like a struct or an
array of ints will work fine, but it needs to be written down.  This is
more than just Fortran.

Mike?


Segher

Reply via email to