From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 91E4B3857815 for ; Mon, 31 Jan 2022 17:21:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 91E4B3857815 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20VGcSEX027110; Mon, 31 Jan 2022 17:21:38 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dxj33um8k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jan 2022 17:21:37 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 20VHHLVq029527; Mon, 31 Jan 2022 17:21:37 GMT Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 3dxj33um88-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jan 2022 17:21:37 +0000 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 20VHIPIV018891; Mon, 31 Jan 2022 17:21:36 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma01dal.us.ibm.com with ESMTP id 3dvw7aqs5x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jan 2022 17:21:36 +0000 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 20VHLYNX9110020 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 31 Jan 2022 17:21:34 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 767EEB2074; Mon, 31 Jan 2022 17:21:34 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DC44EB206C; Mon, 31 Jan 2022 17:21:33 +0000 (GMT) Received: from [9.211.95.53] (unknown [9.211.95.53]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Mon, 31 Jan 2022 17:21:33 +0000 (GMT) Message-ID: <94c9c8b9-bb8c-ffbe-cabd-f85d54b02440@linux.ibm.com> Date: Mon, 31 Jan 2022 11:21:32 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Reply-To: wschmidt@linux.ibm.com Subject: Re: [PATCH 3/8] rs6000: Convert built-in constraints to form To: Segher Boessenkool Cc: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com References: <20220128232420.GJ614@gate.crashing.org> From: Bill Schmidt In-Reply-To: <20220128232420.GJ614@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: H75OMTEI3qFXak3oiRSPRQtI6y9amzO- X-Proofpoint-GUID: jgjjxEdCrIXFAT0d7TfsOWUC5zItab2L X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-01-31_07,2022-01-31_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 bulkscore=0 impostorscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2201310111 X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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:21:40 -0000 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? Thanks, Bill > > Segher