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 2688B3948828 for ; Mon, 31 Jan 2022 17:29:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2688B3948828 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 20VHSENe004539; Mon, 31 Jan 2022 11:28:14 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 20VHSDf5004537; Mon, 31 Jan 2022 11:28:13 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 31 Jan 2022 11:28:13 -0600 From: Segher Boessenkool To: Bill Schmidt Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com Subject: Re: [PATCH 3/8] rs6000: Convert built-in constraints to form Message-ID: <20220131172813.GL614@gate.crashing.org> References: <20220128232420.GJ614@gate.crashing.org> <94c9c8b9-bb8c-ffbe-cabd-f85d54b02440@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <94c9c8b9-bb8c-ffbe-cabd-f85d54b02440@linux.ibm.com> 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, T_SCC_BODY_TEXT_LINE 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: Mon, 31 Jan 2022 17:29:17 -0000 On Mon, Jan 31, 2022 at 11:21:32AM -0600, Bill Schmidt wrote: > On 1/28/22 5:24 PM, Segher Boessenkool wrote: > > On Fri, Jan 28, 2022 at 11:50:21AM -0600, Bill Schmidt wrote: > >> When introducing the new built-in support, I tried to match as many > >> existing error messages as possible. One common form was "argument X must > >> be a Y-bit unsigned literal". Another was "argument X must be a literal > >> between X' and Y', inclusive". During reviews, Segher requested that I > >> eventually convert all messages of the first form into the second form for > >> consistency. That's what this patch does, replacing all -form > >> constraints (first form) with -form constraints (second form). > > Well, I asked for the error messages to be clearer and more consistent > > like that. I don't think changing our source code like this is an > > improvement (*we* know what a 5-bit signed number is). Do you think > > after your patch it is clearer and we will make fewer errors? > > No, I don't think the patch is a particular improvement.  It sounds like > I may have misinterpreted what you were looking for here. Please let me > know what I might do differently. > > For example, if we leave the format in place in the source, I could > change the error messages that we produce to calculate the minimum and > maximum allowed values. Then we'd still have the changes to the test > cases, but fewer changes to the source. Thoughts? That is exactly what I asked for, and what I still think is the best option. I haven't tried it out though, so there may be arguments against this :-) Segher