On Wed, Oct 6, 2021 at 12:21 PM Segher Boessenkool <seg...@kernel.crashing.org> wrote: > > On Wed, Oct 06, 2021 at 11:42:17AM -0400, David Edelsohn wrote: > > On Wed, Oct 6, 2021 at 11:19 AM Segher Boessenkool > > <seg...@kernel.crashing.org> wrote: > > > > > > On Wed, Oct 06, 2021 at 08:59:53AM +0200, Thomas Koenig wrote: > > > > On 05.10.21 23:54, Segher Boessenkool wrote: > > > > >>There is also the issue of binary data. If some user has written > > > > >>out data in double double and wants to read it in as IEEE quad, > > > > >>the results are going to be garbage. Another option for CONVERT > > > > >>might be the solution to that, or, as you wrote, having a > > > > >>REAL(KIND=15). It should be inaccessible via SELECTED_REAL_KIND, > > > > >>though. > > > > > > > > > >That means flipping the default on all PowerPC to no longer be double- > > > > >double. This means that you should have IEEE QP work everywhere, or > > > > >the > > > > >people who do need more than double precision will have no recourse. > > > > > > > > I think we can exclude big-endian POWER from this - they do not have > > > > IEEE QP support, correct? So, exclude that from the SONAME change. > > > > > > Not correct, no. IEEE QP works fine in either endianness. > > > > This needs to be described with more granularity. IEEE QP > > instructions work with either endianness. > > > > IEEE QP is enabled and supported for PPC64 LE Linux on Power. The > > transition is under discussion. > > IEEE QP insns are enabled for BE as well: > > powerpc64-linux-gcc -Wall -W -O2 -S qp.c -mcpu=power9 > > === qp.c === > #define QP _Float128 > QP f(QP x) { return x*x; } > === > > results in > > .L.f: > xsmulqp 2,2,2 > blr > > > PPC64 BE Linux on Power does not define IEEE QP. The ABI could be > > updated and IEEE QP could be enabled, but PPC64 BE is not planning > > future releases from Linux distros. > > This is a different thing: on BE (and on LE by default as well) we use > double-double for long double. > > > IEEE QP for PPC64 FreeBSD on Power is an open question for the FreeBSD > > community. > > Yes. > > > AIX on Power will continue to use double-double long double format. > > GCC, LLVM, IBM Open XL and IBM XL compilers will continue to implement > > and support the double-double format on AIX. > > Yes. But this wasn't about what to use for long double -- it was about > Fortran even :-) > > The actual IEEE QP float types work fine on BE. I suspect they do on > AIX as well for that matter? > > Fwiw, with -mcpu=power8 we get > > .L.f: > mflr 0 > xxlor 35,34,34 > std 0,16(1) > stdu 1,-112(1) > bl __mulkf3 > nop > addi 1,1,112 > ld 0,16(1) > mtlr 0 > blr
GCC can generate the IEEE QP instructions on AIX. The AIX Assembler is aware of the instructions. libquadmath is neither built nor installed on AIX. The AIX C library and AIX Math library are not aware of the IEEE QP type nor how to work with it, e.g., printf. Thanks, David