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 EB2EC3857C60 for ; Wed, 24 Nov 2021 21:34:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EB2EC3857C60 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 1AOLX0T9011625; Wed, 24 Nov 2021 15:33:01 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 1AOLWxXd011624; Wed, 24 Nov 2021 15:32:59 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 24 Nov 2021 15:32:59 -0600 From: Segher Boessenkool To: Joseph Myers , gcc-patches@gcc.gnu.org, jakub@redhat.com, rguenther@suse.de, hp@bitrange.com, law@redhat.com, will_schmidt@vnet.ibm.com Subject: Re: [PATCH v6] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193] Message-ID: <20211124213259.GL614@gate.crashing.org> References: <20211017000415.vqt5yyrq7j7kg5c4@work-tp> <20211124202257.qhecwwcblgihby3b@work-tp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211124202257.qhecwwcblgihby3b@work-tp> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.5 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-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 21:34:06 -0000 On Wed, Nov 24, 2021 at 05:22:57PM -0300, Raoni Fassina Firmino wrote: > Hi Joseph, > > Thanks for the detailed review and explanations. >From me as well :-) > On Mon, Oct 18, 2021 at 03:54:53PM +0000, Joseph Myers wrote: > > However, it's better to get things right automatically without needing any > > macros or other header additions at all. That is, define feclearexcept as > > a built-in function, *without* the extra arguments, and with the back end > > knowing about the FE_* values for the target libc. Then you can simply > > avoid expanding the function inline when the back end doesn't know both > > the FE_* values and how to use them. > > I took this part to heart, I agree that an approach in molds of the v5 > sounds more like it, something that will "just works" or fallback > gracefully. And who knew, with your insight I think I find just > the thing, I am finishing a v7 and I hope it address the previews > consernings and sidestep all this complications with the v6 aproach. What you will lose this way is that it will not work on any C library that doesn't have explicit support. Which is a shame, but it seems we cannot avoid this. Especially the "fesetround should be a function, not a macro" argument is a showstopper :-/ Thanks, Segher