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 6FAFC3865474 for ; Thu, 14 Jan 2021 17:41:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6FAFC3865474 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@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 10EHe2Eb010085; Thu, 14 Jan 2021 11:40:02 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 10EHe0cs010078; Thu, 14 Jan 2021 11:40:00 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 14 Jan 2021 11:40:00 -0600 From: Segher Boessenkool To: Jeff Law , Richard Biener , gcc-patches@gcc.gnu.org, joseph@codesourcery.com, jakub@redhat.com, hp@bitrange.com, will_schmidt@vnet.ibm.com Subject: Re: [PATCH v5] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193] Message-ID: <20210114174000.GV30983@gate.crashing.org> References: <20201103231150.zlqccshb3qw63bdv@work-tp> <20201104151049.psotxu7xarcxmv5g@work-tp> <0341a102-6c1d-ceb1-ff4a-c9857ad2ec0f@redhat.com> <20210107142039.iypqohea4fbwznqw@work-tp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210107142039.iypqohea4fbwznqw@work-tp> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Thu, 14 Jan 2021 17:41:11 -0000 On Thu, Jan 07, 2021 at 11:20:39AM -0300, Raoni Fassina Firmino wrote: > On Wed, Nov 18, 2020 at 06:38:22AM -0600, Segher Boessenkool wrote: > > We can handle the constants issue similarly to what we do for > > __builtin_fpclassify, too. > > I think that if we must safe-guard for future or unforeseen libc > implementations doing what __builtin_fpclassify does is the way to go. > I don't know what is the GCC police here, but IMHO I don't think we > should add complexity before it is needed in this case. And looking at > __builtin_fpclassify, it seems a lot, IIUC this solution needs > fixinclude to work, seems to me too much add maintenance for something > that is not needed yet, because SPARC don't have this expands, none has > for now. This way the compiler does not need to know the values of the macros *at all*, that is the whole point! You simply pass all the standard values to the builtin as extra arguments. This may seem inconvenient to use, but you put the whole thing in a header file anyway, all is hidden. Segher