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 38D4A385841A for ; Thu, 2 Mar 2023 20:27:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 38D4A385841A 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 322KQ9Kg025524; Thu, 2 Mar 2023 14:26:09 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 322KQ8Ht025519; Thu, 2 Mar 2023 14:26:08 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 2 Mar 2023 14:26:08 -0600 From: Segher Boessenkool To: Michael Meissner , gcc-patches@gcc.gnu.org, "Kewen.Lin" , David Edelsohn , Peter Bergner , Will Schmidt Subject: Re: [PATCH, V3] PR 107299, GCC does not build on PowerPC when long double is IEEE 128-bit Message-ID: <20230302202608.GG25951@gate.crashing.org> References: 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=-2.9 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi! On Wed, Dec 14, 2022 at 03:29:02PM -0500, Michael Meissner wrote: > These 3 patches fix the problems with building GCC on PowerPC systems when long > double is configured to use the IEEE 128-bit format. If you are strictly trying to fix a bootstrap problem, you should say so: it should be very prominent in the proposed commit message, and that message should be not much more than that. And the patch should do nothing else. *Every* patch should do just one thing, but for fixes it is even more important (how will we ever get into any stable state if we always do random stuff?) > The basic issue is internally within GCC there are several types for 128-bit > floating point. The types are: There also are three *modes*, but there should be only IFmode and KFmode, and TFmode should be just a #define that resolves to either, not a separate mode. This simplifies things a lot. It should have always been that way, as we talked about way back when already. But you didn't want to implement things that way. This is on my plate now (for GCC 14). > 3) The type for _Float128. This type is always IEEE 128-bit if it exists. And if there is no IEEE QP type? What should _Float128 be then? Largely academic, because there always *should* be a QP type (and mode). This is a long-standing shortcoming as well. I will finally fix that myself for GCC 14 as well, simplifying many things. > Like __ibm128, it uses the long double type if > long double is IEEE 128-bit, Which is completely upside down, of course. The basic types should be basic and always exist. Things like long double can use some indirection and/or copy stuff over. Anything else is just a maze of twisty little passages. A fun game if you like that sort of thing, maybe, but instead of solving problems it causes more :-( > After these patches, there are 3 specific tests and 1 set of tests that fail > when using IEEE 128-bit long double: > > 1) fp128_conversions.c: I haven't looked at yet; That needs to be looked at before these patches can be approved. > 2) pr105334.c: This is a bug that __ibm128 doesn't work if the default > long double is IEEE 128-bit and you use the options: -mlong-double-128 > -msoft-float (i.e. no -mabi=ibmlongdouble). I believe I have patches > for this floating around. Ditto. > 3) The g++.dg/cpp23/ext-floating1.C test is failing. I believe we need to > dig in to fix PowerPC specific ISO C/C++ 2x _Float128 support. I have > looked at it yet. Ditto. > 4) All/some of the G++ modules tests fail. This is PR 98645, and it is > assigned to Nathan Sidwell. And this one too. Any new failures need analysis. Always. This is why we have regression tests at all! Segher