From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id BC51B3858415; Wed, 6 Oct 2021 16:20:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BC51B3858415 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 196GJBmj018587; Wed, 6 Oct 2021 11:19:11 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 196GJAVt018576; Wed, 6 Oct 2021 11:19:10 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 6 Oct 2021 11:19:10 -0500 From: Segher Boessenkool To: David Edelsohn Cc: Thomas Koenig , Jakub Jelinek , GCC Development , Michael Meissner , Fortran List , Tobias Burnus , Jonathan Wakely Subject: Re: libgfortran.so SONAME and powerpc64le-linux ABI changes Message-ID: <20211006161910.GH10333@gate.crashing.org> References: <20211004100754.GL304296@tucnak> <20211004141410.GP304296@tucnak> <6d845542-536e-1a0f-70e9-d05eea98aae7@netcologne.de> <20211005215450.GC10333@gate.crashing.org> <90df1250-9b3f-4a55-bc67-e3e05e54f7ef@netcologne.de> <20211006151744.GE10333@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2021 16:20:16 -0000 On Wed, Oct 06, 2021 at 11:42:17AM -0400, David Edelsohn wrote: > On Wed, Oct 6, 2021 at 11:19 AM 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. > > 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 Segher