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 74B973857C58 for ; Tue, 19 Oct 2021 15:59:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 74B973857C58 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19JFAoDl032240 for ; Tue, 19 Oct 2021 11:58:59 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bsuq787xn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 19 Oct 2021 11:58:59 -0400 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19JFDaZl012880 for ; Tue, 19 Oct 2021 11:58:59 -0400 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bsuq787x8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 11:58:59 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19JFlxnM026944; Tue, 19 Oct 2021 15:58:57 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma03wdc.us.ibm.com with ESMTP id 3bqpcb17wc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Oct 2021 15:58:57 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19JFwudP40763820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 19 Oct 2021 15:58:56 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AE75DBE06A; Tue, 19 Oct 2021 15:58:56 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4BCE8BE093; Tue, 19 Oct 2021 15:58:56 +0000 (GMT) Received: from li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com (unknown [9.160.109.161]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTPS; Tue, 19 Oct 2021 15:58:56 +0000 (GMT) Date: Tue, 19 Oct 2021 10:58:53 -0500 From: "Paul A. Clarke" To: Florian Weimer Cc: "Paul A. Clarke via Libc-alpha" Subject: Re: [PATCH] [powerpc] Tighten contraints for asm constant parameters Message-ID: <20211019155853.GB104437@li-24c3614c-2adc-11b2-a85c-85f334518bdb.ibm.com> References: <20211019151413.123039-1-pc@us.ibm.com> <871r4h11eb.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <871r4h11eb.fsf@oldenburg.str.redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 9XIG1-2ADt_o4hsrQBwp3_XLmRgFcCRq X-Proofpoint-GUID: 1O8itLbqQNkJwALjiO2e4vh5Z8nPfjbe X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-19_02,2021-10-19_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 suspectscore=0 adultscore=0 bulkscore=0 phishscore=0 clxscore=1015 spamscore=0 impostorscore=0 mlxscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110190093 X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2021 15:59:01 -0000 On Tue, Oct 19, 2021 at 05:26:36PM +0200, Florian Weimer wrote: > * Paul A. Clarke via Libc-alpha: > > > There are a few places where only constants are acceptable for `asm` > > parameters, yet the constraint "i" is used. "i" is for "any integer" > > including variables. > > > > Use "n" instead of "i" where constant integers are required. > > This doesn't seem to match the GCC documentation: > > | 'i' > | An immediate integer operand (one with constant value) is allowed. > | This includes symbolic constants whose values will be known only at > | assembly time or later. > > And the RS6000 documentation does not override that. I was too loose with my characterization of 'i', in contrast to 'n': | ‘n’ | An immediate integer operand with a known numeric value is allowed. | Many systems cannot support assembly-time constants for operands less | than a word wide. Constraints for these operands should use ‘n’ | rather than ‘i’. The cases changed by the patch require a *known numeric value*, as they are used as immediate values (hardcoded in the generated opcode). I will reword to: There are a few places where only known numeric values are acceptable for `asm` parameters, yet the constraint "i" is used. "i" can include "symbolic constants whose values will be known only at assembly time or later." Use "n" instead of "i" where known numeric values are required. Does that work better? PC