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 EB2D7385803F for ; Tue, 16 Nov 2021 22:46:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EB2D7385803F Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AGMDkDA016460 for ; Tue, 16 Nov 2021 22:46:44 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ccn8d0gxp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 16 Nov 2021 22:46:44 +0000 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1AGMkhJd016273 for ; Tue, 16 Nov 2021 22:46:43 GMT Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com with ESMTP id 3ccn8d0gxb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 22:46:43 +0000 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1AGMch33005346; Tue, 16 Nov 2021 22:46:42 GMT Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma05wdc.us.ibm.com with ESMTP id 3ca50beemp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 22:46:42 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1AGMkeLu55378340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Nov 2021 22:46:40 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 34FE97805F; Tue, 16 Nov 2021 22:46:40 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BFD9778068; Tue, 16 Nov 2021 22:46:39 +0000 (GMT) Received: from [9.211.84.243] (unknown [9.211.84.243]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 16 Nov 2021 22:46:39 +0000 (GMT) Message-ID: <28cb0f50-b742-939b-b35b-efdec78dcbf2@linux.ibm.com> Date: Tue, 16 Nov 2021 16:46:39 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Reply-To: wschmidt@linux.ibm.com Subject: Re: [PATCH] powerpc: Define USE_PPC64_NOTOC iff compiler and linker also supports it To: Florian Weimer , Tulio Magno Quites Machado Filho via Libc-alpha Cc: Nemanja Ivanovic , Tulio Magno Quites Machado Filho , Alan Modra References: <20211108113316.8867-1-adhemerval.zanella@linaro.org> <20211108224808.iqpddl4vgnx2gwol@google.com> <87zgq33n1k.fsf@linux.ibm.com> <87wnl73la2.fsf@linux.ibm.com> <87tugbakst.fsf@oldenburg.str.redhat.com> From: Bill Schmidt In-Reply-To: <87tugbakst.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: wQ551PfeZ4pcWdfLUMR-CfoARkQxLlnM X-Proofpoint-GUID: GlNWuZkaHa8oxUlkBD9GuNLebbYEOoXm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-16_07,2021-11-16_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=899 priorityscore=1501 mlxscore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 malwarescore=0 impostorscore=0 adultscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111160099 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, 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, 16 Nov 2021 22:46:46 -0000 On 11/16/21 2:48 PM, Florian Weimer via Libc-alpha wrote: > * Tulio Magno Quites Machado Filho via Libc-alpha: > >> Tulio Magno Quites Machado Filho via Libc-alpha writes: >> >>> Alan Modra via Libc-alpha writes: >>> >>>> I have a question about powerpc64/ppc-mcount.S. Why is the assembly >>>> wrapper using ENTRY and a NOTOC call? By using ENTRY you are saying >>>> that calls to _mcount must have r2 valid. Given that r2 is valid, why >>>> then use NOTOC? >>> I wouldn't be surprised if that was a misinterpretation of the ABI on my part. >>> >>> Looking at table 2.20 "Protocols for Local Function Calls", I think this is a >>> scenario that falls to the last row of this table, where we have: >> OK, I should be looking at table 2.19 because this is not a call within the >> same compilation unit. > I'm not entirely sure about that. I think “local” in this context means > “the caller has complete information about the callee”, and this is true > for most direct calls within libc.so.6. It's also necessary to make > LTO-based calling convention optimizations effective. See the text preceding these tables. "A local function call is one where the callee is known and visible within the unit of code being compiled or assembled." Some optimizations may occur when program portions are statically linked, but this is the rule the compiler and/or assembly writer should follow. Bill > > Thanks, > Florian >