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 10C523846024 for ; Fri, 3 May 2024 12:31:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 10C523846024 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 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 10C523846024 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714739465; cv=none; b=q8oob2sPteHzk6/S2ihCSRQ4J6muq4y2FtjIDjz+5Mox1lOhh7HYuLhZLKV1/dUNPkyifI4G63hyDMi1eEXvQKdOqlPfOeKzsYIk6g+1Sbyu1Xv9qKTu4+VtjfB+QkQY/jS8VS+86RLKCGOA2RPcc7V0eHeICX/YSOsiQNnd8Nk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714739465; c=relaxed/simple; bh=qR2hR+Vzhdo4BAsWsoDtKDlMNCiNSrZOCASLNma5P3U=; h=DKIM-Signature:Message-ID:Date:From:Subject:To:MIME-Version; b=kO1pp0kc4MgnXWHqYi22FDuNVCTVPH3tBwrsXmfCR4QCEhEFcziGCLRe1KiVedJsiS66v2yPxWxOIFW22Ec/rtw8YUHIWVDV/pw83fZzNSkZCW1n9plE8TJpJ9yYpFf3FdBUJKE1vSPvzlb5XiS576eEwc22IINLnx1dpBKdykA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 443CM0Ef029649; Fri, 3 May 2024 12:31:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : from : subject : to : cc : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=d3EgQsR4mnxoawThKafLHhCgJKWLIHFYbhsFq5M8Wpo=; b=aFUYACR25cQexhZ3cNgv5MFpZSXy6jBes07x97mm9ozxlR1ZiX6+tBTSKpojwgbV0pKp F2SoMxNAKT6qFpgzj5dG5gaCHUxDY1bSk2pvdZ2/snwqKrTWxHjNXWvesGYnwi5Cwmbr jATAcR1nMFavNWtccBflcEi88oAkpfYT+pJivIp0z9m7KMVse5m/xrgNK4DNT4fwvHE+ xU2NNsVfPu38+nuhf29jA0io2jGJTopnvwbm8Ue3/qkxlc7dN86MylnIW2np+TwYtjl1 ibUQYfQ5zq9LoQ+TDsxdkxQWRap3jHd5MyAtuUkB3J+PmeMVN9/H+o6Bp9ggyns6kAqI qg== Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xvyuqg0q6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 May 2024 12:31:00 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 443BroUw015545; Fri, 3 May 2024 12:30:59 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3xsed3d67c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 May 2024 12:30:59 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 443CUs7i53018950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 May 2024 12:30:56 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 853C92004E; Fri, 3 May 2024 12:30:54 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1F40720043; Fri, 3 May 2024 12:30:54 +0000 (GMT) Received: from [9.171.46.7] (unknown [9.171.46.7]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Fri, 3 May 2024 12:30:54 +0000 (GMT) Message-ID: Date: Fri, 3 May 2024 14:30:54 +0200 User-Agent: Mozilla Thunderbird From: Jens Remus Subject: Re: [PATCH v3 02/15] gas: Enhance arch-specific SFrame configuration descriptions To: Indu Bhagat , binutils@sourceware.org Cc: Andreas Krebbel References: <20240412144718.4191286-1-jremus@linux.ibm.com> <20240412144718.4191286-3-jremus@linux.ibm.com> <888015cf-de85-4ac3-9709-4c797e65ad00@oracle.com> Content-Language: en-US Organization: IBM Deutschland Research & Development GmbH In-Reply-To: <888015cf-de85-4ac3-9709-4c797e65ad00@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 2IgMiF2sZ7vfpID6H096Vsl0SKoAqIP7 X-Proofpoint-GUID: 2IgMiF2sZ7vfpID6H096Vsl0SKoAqIP7 Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-03_08,2024-05-03_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 phishscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 spamscore=0 adultscore=0 priorityscore=1501 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2405030090 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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: Am 18.04.2024 um 09:39 schrieb Indu Bhagat: > On 4/12/24 07:47, Jens Remus wrote: >> Explicitly mention "SFrame" in the descriptions for the architecture- >> specific SFrame configuration macros, variables, and functions. >> >> Use the term "frame pointer" (FP) instead of "base pointer". This aligns >> with the terminology used in the SFrame specification. Additionally it >> helps not to confuse "base-pointer register" with the term "BASE_REG" >> used in the specification to denote either the SP or FP register. >> >> Specify what the SFRAME_CFA_*_REG register numbers are used for: >> - SP (stack pointer): CFA tracking >> - FP (frame pointer): CFA and FP tracking >> - RA (return address): RA tracking >> >> Align the descriptions for definitions in the source files to the >> declarations in the header files. >> >> gas/ >>     * config/tc-aarch64.h: Enhance architecture-specific SFrame >>     configuration descriptions. >>     * config/tc-aarch64.c: Likewise. >>     * config/tc-i386.h: Likewise. >>     * config/tc-i386.c: Likewise. >> >> Signed-off-by: Jens Remus >> --- >> >> Notes (jremus): >>      Changes v2 -> v3: >>      - Add "SFrame" to architecture-specific SFrame macro, variable, and >>        function descriptions as suggested by Indu. Do so for all and not >>        only those previously touched. >>      - Reword further SFrame macro, variable, and function descriptions >>        to align with those previously touched. >>      - Align description of definition in source with declaration in >> header. >>      - Corrected formatting of ChangeLog in commit message. >>      - Changed commit subject prefix from "sframe" to "gas". >> >>   gas/config/tc-aarch64.c |  6 +++--- >>   gas/config/tc-aarch64.h | 12 ++++++------ >>   gas/config/tc-i386.c    |  5 +++++ >>   gas/config/tc-i386.h    | 10 +++++----- >>   4 files changed, 19 insertions(+), 14 deletions(-) >> >> diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c >> index 6ad4fae8b0ec..077cbd485979 100644 >> --- a/gas/config/tc-aarch64.c >> +++ b/gas/config/tc-aarch64.c >> @@ -8870,7 +8870,7 @@ aarch64_support_sframe_p (void) >>     return (aarch64_abi == AARCH64_ABI_LP64); >>   } >> -/* Specify if RA tracking is needed.  */ >> +/* Whether SFrame return-address tracking is needed.  */ > > Nit.  But then given the nature of this commit: I see that this commit > uses both "return-address" and "return address" keywords. I wrongly assumed them to be compound adjectives [1], which usually require a dash, when used in conjunction with e.g. "register". That is why I differentiated between e.g. "stack pointer" (noun) and "stack-pointer register" (falsely assumed "stack-pointer" to be a compound adjective). I just learned that they are compound nouns [2] and thus are always written without dash. [1] https://www.grammarly.com/blog/compound-adjectives/ [2] https://www.grammarly.com/blog/compound-nouns/ > > Also, the code already was already using "stack-pointer" and > "frame-pointer" (my bad), lets use the same style, and use >  - "frame pointer" >  - "stack pointer" >  - "return address" > > OK with that change. > > Thanks for your patch. Done. > >>   bool >>   aarch64_sframe_ra_tracking_p (void) >> @@ -8878,8 +8878,8 @@ aarch64_sframe_ra_tracking_p (void) >>     return true; >>   } >> -/* Specify the fixed offset to recover RA from CFA. >> -   (useful only when RA tracking is not needed).  */ >> +/* The fixed offset from CFA for SFrame to recover the return address. >> +   (useful only when SFrame RA tracking is not needed).  */ >>   offsetT >>   aarch64_sframe_cfa_ra_offset (void) >> diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h >> index 1b8badad9fdc..63acbd46a379 100644 >> --- a/gas/config/tc-aarch64.h >> +++ b/gas/config/tc-aarch64.h >> @@ -267,24 +267,24 @@ extern void aarch64_after_parse_args (void); >>   extern bool aarch64_support_sframe_p (void); >>   #define support_sframe_p aarch64_support_sframe_p >> -/* The stack-pointer register number for SFrame stack trace info.  */ >> +/* The stack-pointer DWARF register number for SFrame CFA tracking.  */ >>   extern unsigned int aarch64_sframe_cfa_sp_reg; >>   #define SFRAME_CFA_SP_REG aarch64_sframe_cfa_sp_reg >> -/* The base-pointer register number for CFA stack trace info.  */ >> +/* The frame-pointer DWARF register number for SFrame CFA and FP >> tracking.  */ >>   extern unsigned int aarch64_sframe_cfa_fp_reg; >>   #define SFRAME_CFA_FP_REG aarch64_sframe_cfa_fp_reg >> -/* The return address register number for CFA stack trace info.  */ >> +/* The return-address DWARF register number for SFrame RA tracking.  */ >>   extern unsigned int aarch64_sframe_cfa_ra_reg; >>   #define SFRAME_CFA_RA_REG aarch64_sframe_cfa_ra_reg >> -/* Specify if RA tracking is needed.  */ >> +/* Whether SFrame return-address tracking is needed.  */ >>   extern bool aarch64_sframe_ra_tracking_p (void); >>   #define sframe_ra_tracking_p aarch64_sframe_ra_tracking_p >> -/* Specify the fixed offset to recover RA from CFA. >> -   (useful only when RA tracking is not needed).  */ >> +/* The fixed offset from CFA for SFrame to recover the return address. >> +   (useful only when SFrame RA tracking is not needed).  */ >>   extern offsetT aarch64_sframe_cfa_ra_offset (void); >>   #define sframe_cfa_ra_offset aarch64_sframe_cfa_ra_offset >> diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c >> index cd20e0c9415e..08a8eb2aeb69 100644 >> --- a/gas/config/tc-i386.c >> +++ b/gas/config/tc-i386.c >> @@ -11181,6 +11181,7 @@ x86_cleanup (void) >>       subseg_set (seg, subseg); >>   } >> +/* Whether SFrame stack trace info is supported.  */ >>   bool >>   x86_support_sframe_p (void) >>   { >> @@ -11188,6 +11189,7 @@ x86_support_sframe_p (void) >>     return (x86_elf_abi == X86_64_ABI); >>   } >> +/* Whether SFrame return-address tracking is needed.  */ >>   bool >>   x86_sframe_ra_tracking_p (void) >>   { >> @@ -11197,6 +11199,8 @@ x86_sframe_ra_tracking_p (void) >>     return false; >>   } >> +/* The fixed offset from CFA for SFrame to recover the return address. >> +   (useful only when SFrame RA tracking is not needed).  */ >>   offsetT >>   x86_sframe_cfa_ra_offset (void) >>   { >> @@ -11204,6 +11208,7 @@ x86_sframe_cfa_ra_offset (void) >>     return (offsetT) -8; >>   } >> +/* The abi/arch indentifier for SFrame.  */ >>   unsigned char >>   x86_sframe_get_abi_arch (void) >>   { >> diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h >> index 7aae7a33dc14..e98362111698 100644 >> --- a/gas/config/tc-i386.h >> +++ b/gas/config/tc-i386.h >> @@ -441,20 +441,20 @@ extern bool x86_scfi_callee_saved_p (uint32_t >> dw2reg_num); >>   extern bool x86_support_sframe_p (void); >>   #define support_sframe_p x86_support_sframe_p >> -/* The stack-pointer register number for SFrame stack trace info.  */ >> +/* The stack-pointer DWARF register number for SFrame CFA tracking.  */ >>   extern unsigned int x86_sframe_cfa_sp_reg; >>   #define SFRAME_CFA_SP_REG x86_sframe_cfa_sp_reg >> -/* The frame-pointer register number for SFrame stack trace info.  */ >> +/* The frame-pointer DWARF register number for SFrame CFA and FP >> tracking.  */ >>   extern unsigned int x86_sframe_cfa_fp_reg; >>   #define SFRAME_CFA_FP_REG x86_sframe_cfa_fp_reg >> -/* Specify if RA tracking is needed.  */ >> +/* Whether SFrame return-address tracking is needed.  */ >>   extern bool x86_sframe_ra_tracking_p (void); >>   #define sframe_ra_tracking_p x86_sframe_ra_tracking_p >> -/* Specify the fixed offset to recover RA from CFA. >> -   (useful only when RA tracking is not needed).  */ >> +/* The fixed offset from CFA for SFrame to recover the return address. >> +   (useful only when SFrame RA tracking is not needed).  */ >>   extern offsetT x86_sframe_cfa_ra_offset (void); >>   #define sframe_cfa_ra_offset x86_sframe_cfa_ra_offset > Regards, Jens -- Jens Remus Linux on Z Development (D3303) and z/VSE Support +49-7031-16-1128 Office jremus@de.ibm.com IBM IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294 IBM Data Privacy Statement: https://www.ibm.com/privacy/