From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 96B57385781A for ; Tue, 16 Nov 2021 19:42:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 96B57385781A Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1AGIJ6KF019470; Tue, 16 Nov 2021 19:42:20 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3cchtb1h7a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 19:42:19 +0000 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1AGJ1NFr009984; Tue, 16 Nov 2021 19:42:19 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 3cchtb1h70-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 19:42:19 +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 1AGJWlSA030632; Tue, 16 Nov 2021 19:42:18 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma01dal.us.ibm.com with ESMTP id 3ca50btbga-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Nov 2021 19:42:18 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1AGJgHT628901896 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 Nov 2021 19:42:17 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 57F1CC6059; Tue, 16 Nov 2021 19:42:17 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EE25DC6055; Tue, 16 Nov 2021 19:42:16 +0000 (GMT) Received: from linux.ibm.com (unknown [9.163.78.59]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 16 Nov 2021 19:42:16 +0000 (GMT) From: Tulio Magno Quites Machado Filho To: Alan Modra , Adhemerval Zanella Cc: Nemanja Ivanovic , libc-alpha@sourceware.org, Fangrui Song Subject: Re: [PATCH] powerpc: Define USE_PPC64_NOTOC iff compiler and linker also supports it In-Reply-To: References: <20211108113316.8867-1-adhemerval.zanella@linaro.org> <20211108224808.iqpddl4vgnx2gwol@google.com> User-Agent: Notmuch/0.33.1 (http://notmuchmail.org) Emacs/27.2 (x86_64-redhat-linux-gnu) Date: Tue, 16 Nov 2021 16:42:15 -0300 Message-ID: <87zgq33n1k.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 1k9lhUpbTzxmMrnF_rXE2cv9wleu94UH X-Proofpoint-ORIG-GUID: WkRQCL8ZKmNyti1XruoXpXnx3rrk8U-3 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_04,2021-11-16_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 bulkscore=0 mlxlogscore=703 clxscore=1015 priorityscore=1501 suspectscore=0 adultscore=0 malwarescore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111160093 X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, 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 19:42:21 -0000 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: - Local call method - nop is not needed - Relocation is R_PPC64_REL24_NOTOC. If this interpretation is incorrect, what is the recommended solution for this case? Use ENTRY_TOCLESS? -- Tulio Magno