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 60E603858D38 for ; Fri, 30 Sep 2022 12:38:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 60E603858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28UCaK2e009350; Fri, 30 Sep 2022 12:38:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=9Z8ogz8IzzZ4jqXVESgYEok1NbthFqlRyEeWnVuBj/M=; b=rN/94n34ntphwL1apMfDQiLPjQX4acuNsIpdU/HuW2M/WsflVwtb/fj7T0xp5pWwk2TK qyOUGdqC/2LM5u30o4avuJQ17fewJpPaHVrF6Gn/szJRXaFIvJPdjsrx4Jbp4/xl/97V 1mf2OOK5Q2B1w9ui1mKEuMJgvKsWw1GtFbgCQ894z2N0qVr5GT31t9NfTamge8kxudeM 0ufJikjTX0GqclD8zjhpjIDfh8r2rBBIMJbugKwmkVU+Ax4vyF1Yds7jL7GT/0RSd8e9 06hTxPj9nQPPSoXuOdSnFBwvm+yu9Rqp0mYrsLY+N/5A2X4O+jTjdnqikW79LnFLuCyZ Qg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jx0cp8bjs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Sep 2022 12:38:33 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 28UCaTvD010471; Fri, 30 Sep 2022 12:38:33 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3jx0cp8bgy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Sep 2022 12:38:33 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 28UCZonV032563; Fri, 30 Sep 2022 12:38:30 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma06ams.nl.ibm.com with ESMTP id 3jss5j844v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 30 Sep 2022 12:38:30 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 28UCcuFZ47055344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 30 Sep 2022 12:38:56 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3C1EB52050; Fri, 30 Sep 2022 12:38:28 +0000 (GMT) Received: from [9.197.236.39] (unknown [9.197.236.39]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id BEBB75204E; Fri, 30 Sep 2022 12:38:26 +0000 (GMT) Message-ID: <700f7ed5-6fd7-134a-9458-aa5c1a2625d3@linux.ibm.com> Date: Fri, 30 Sep 2022 20:38:25 +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 v4] rs6000: Rework ELFv2 support for -fpatchable-function-entry* [PR99888] Content-Language: en-US To: Segher Boessenkool Cc: GCC Patches , David Edelsohn , AlanM References: <20220928152224.GS25951@gate.crashing.org> From: "Kewen.Lin" In-Reply-To: <20220928152224.GS25951@gate.crashing.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: f7mFrdo-dQjpBNV_joBwrcapXKnq1FCJ X-Proofpoint-GUID: zYTUEK_jZj0DtrTuJ-pFsV_uss1Y0dGF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-30_04,2022-09-29_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 suspectscore=0 mlxscore=0 impostorscore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209300079 X-Spam-Status: No, score=-4.7 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Segher, Thanks for the review comments! on 2022/9/28 23:22, Segher Boessenkool wrote: > Hi! > > On Thu, Aug 25, 2022 at 01:50:28PM +0800, Kewen.Lin wrote: >> --- a/gcc/config/rs6000/rs6000-internal.h >> +++ b/gcc/config/rs6000/rs6000-internal.h >> @@ -183,10 +183,15 @@ extern tree rs6000_fold_builtin (tree fndecl ATTRIBUTE_UNUSED, >> tree *args ATTRIBUTE_UNUSED, >> bool ignore ATTRIBUTE_UNUSED); >> >> +extern void rs6000_print_patchable_function_entry (FILE *, >> + unsigned HOST_WIDE_INT, >> + bool); >> + >> extern bool rs6000_passes_float; >> extern bool rs6000_passes_long_double; >> extern bool rs6000_passes_vector; >> extern bool rs6000_returns_struct; >> extern bool cpu_builtin_p; >> >> + >> #endif > > No new random empty lines please. > >> + point would be 2, 6 and 14. It's possible to support those >> + other counts of nops by not making a local entry point, but >> + we don't have clear user cases for them, so leave them > > "use cases" > >> --- a/gcc/doc/invoke.texi >> +++ b/gcc/doc/invoke.texi >> @@ -16717,9 +16717,13 @@ the area size or to remove it completely on a single function. >> If @code{N=0}, no pad location is recorded. >> >> The NOP instructions are inserted at---and maybe before, depending on >> -@var{M}---the function entry address, even before the prologue. >> +@var{M}---the function entry address, even before the prologue. On >> +PowerPC with the ELFv2 ABI, for one function with dual entry points, >> +the local entry point is taken as the function entry for generation. > > I think "the local entry point is this function entry address" is a bit > clearer. > >> -The maximum value of @var{N} and @var{M} is 65535. >> +The maximum value of @var{N} and @var{M} is 65535. On PowerPC with the >> +ELFv2 ABI, for one function with dual entry points, the supported values >> +for @var{M} are 0, 2, 6 and 14. > > "for a function" > > Okay for trunk with those trivial chnges. Thanks! > Updated as all above comments, re-tested and committed in r13-2984. Thanks! BR, Kewen