On Wed, Oct 06, 2021 at 10:17:44AM -0500, Segher Boessenkool 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. > > I don't know what the libraries do, but in GCC it works just fine.
It only has the support if you add the options to enable IEEE 128-bit support when compiling programs. It is off by default. > > So this would only be critical for people on little-endian POWER8 > > who use double double. Hmm... can the POWER8 handle the IEEE QP > > instructions, or would that be trap and emulate? What is the > > plan there? > > The registers used by the QP insns are the VRs. Trying to use the QP > insns on a p8 will trap. There is no kernel emulation for them afaik. > > But, for p8 there is software emulation, that GCC can generate. This > follows the ABI as for p9 and later. If the code is compiled for power8, it always uses the software functions to do the support. Buried inside of libgcc are ifunc functions that use the hardware instructions if the user is running on power9 or power10. It would be nice if any distro that changed the default used power9 as a base, instead of power8. > Converting double-double to IEEE QP should not be hard or slow? There are a lot of corner cases to get it right. IIRC, there are a few values that double double can represent that are not expressable with exact precision in IEEE 128-bit. -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com