From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id BD8B83858D28 for ; Fri, 19 Aug 2022 02:40:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BD8B83858D28 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27J2T9UW027996; Fri, 19 Aug 2022 02:40:19 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3j21s8r648-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Aug 2022 02:40:19 +0000 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 27J2UkTe032626; Fri, 19 Aug 2022 02:40:18 GMT Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3j21s8r63n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Aug 2022 02:40:18 +0000 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27J2KkDB026964; Fri, 19 Aug 2022 02:40:16 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma01fra.de.ibm.com with ESMTP id 3hx3k94ymw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Aug 2022 02:40:16 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27J2eE1227590958 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Aug 2022 02:40:14 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 387F24C040; Fri, 19 Aug 2022 02:40:14 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B50984C044; Fri, 19 Aug 2022 02:40:12 +0000 (GMT) Received: from [9.200.39.241] (unknown [9.200.39.241]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 19 Aug 2022 02:40:12 +0000 (GMT) Message-ID: Date: Fri, 19 Aug 2022 10:40:10 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH v3] rs6000: Rework ELFv2 support for -fpatchable-function-entry* [PR99888] Content-Language: en-US To: Segher Boessenkool Cc: GCC Patches , David Edelsohn , AlanM References: <20220818173435.GN25951@gate.crashing.org> From: "Kewen.Lin" In-Reply-To: <20220818173435.GN25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: BpLZh-zcF6khuq6bRIa9hTi3_V1lzkz7 X-Proofpoint-GUID: 6CgM7fH1PSpZhn2DVmYLtruM7IWzPggV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-18_18,2022-08-18_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 priorityscore=1501 spamscore=0 mlxscore=0 impostorscore=0 clxscore=1015 mlxlogscore=634 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208190008 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Fri, 19 Aug 2022 02:40:21 -0000 Hi Segher, Thanks for the review! on 2022/8/19 01:34, Segher Boessenkool wrote: > Hi! > > On Thu, Aug 18, 2022 at 10:12:48AM +0800, Kewen.Lin wrote: >> As PR99888 and its related show, the current support for >> -fpatchable-function-entry on powerpc ELFv2 doesn't work >> well with global entry existence. > >> + /* Emit the NOPs after local entry. */ > > Please do not say "NOPs". It is not an acronym. I know some of our > documentation has this bug already, but please do not spread it further. > > The machine instruction is "nop", lowercase. > > Please fix this. Whoops, I thought it's only used in commit log mistakenly, will fix! > > So, this patch overloads the meaning of the two parameters here to have > more meaning than explained in the documentation for the option. There > isn't much that can be done about this, so adding some new option would > only be extra work for everyone. But, could you add a line or two in > the documentation? "For PowerPC with the ELFv2 ABI, there will be M > nops before the local entry point, and N-M after", something like that? > Since you proposed to update the documentation, I'm thinking if we can reconsider Fangrui's proposal in the PR which Alan seconded: Put preceding nops before GEP and succeeding nops after LEP. Previously I had the concern that the nops inserted doesn't respect to a same function entry, it looks inconsistent to the documentation, and you also noted that "The nops have to be consecutive". If we want to update the documentation, could we reword it for PowerPC ELFv2 ABI? What's your opinion? BR, Kewen