public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Indu Bhagat <indu.bhagat@oracle.com>
To: Jens Remus <jremus@linux.ibm.com>, binutils@sourceware.org
Cc: Andreas Krebbel <krebbel@linux.ibm.com>
Subject: Re: [PATCH v3 02/15] gas: Enhance arch-specific SFrame configuration descriptions
Date: Thu, 18 Apr 2024 00:39:43 -0700	[thread overview]
Message-ID: <888015cf-de85-4ac3-9709-4c797e65ad00@oracle.com> (raw)
In-Reply-To: <20240412144718.4191286-3-jremus@linux.ibm.com>

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 <jremus@linux.ibm.com>
> ---
> 
> 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.

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.

>   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
>   


  reply	other threads:[~2024-04-18  7:40 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 14:47 [PATCH v3 00/15] sframe: Enhancements to SFrame info generation Jens Remus
2024-04-12 14:47 ` [PATCH v3 01/15] x86: Remove unused SFrame CFI RA register variable Jens Remus
2024-04-12 14:47 ` [PATCH v3 02/15] gas: Enhance arch-specific SFrame configuration descriptions Jens Remus
2024-04-18  7:39   ` Indu Bhagat [this message]
2024-05-03 12:30     ` Jens Remus
2024-04-12 14:47 ` [PATCH v3 03/15] readelf/objdump: Dump SFrame CFA fixed FP and RA offsets Jens Remus
2024-04-18  7:39   ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 04/15] readelf/objdump: Display SFrame fixed RA offset as 'f' in dump Jens Remus
2024-04-18  7:40   ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 05/15] gas: Print DWARF call frame insn name in SFrame warning message Jens Remus
2024-04-18  7:40   ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 06/15] gas: Skip SFrame FDE if CFI specifies non-FP/SP base register Jens Remus
2024-04-18  7:40   ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 07/15] gas: Warn if SFrame FDE is skipped due to non-default return column Jens Remus
2024-04-18  7:40   ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 08/15] gas: Refactor SFrame CFI opcode DW_CFA_register processing Jens Remus
2024-04-18  7:40   ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 09/15] gas: User readable warnings if SFrame FDE is not generated Jens Remus
2024-04-18 20:33   ` Indu Bhagat
2024-05-03 12:30     ` Jens Remus
2024-05-03 23:41       ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 10/15] gas: Skip SFrame FDE if FP without RA on stack Jens Remus
2024-04-16 13:14   ` Jens Remus
2024-04-17 23:56     ` Indu Bhagat
2024-04-18 10:27       ` Jens Remus
2024-04-18 20:35   ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 11/15] gas: Skip SFrame FDE if .cfi_window_save Jens Remus
2024-04-18 20:36   ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 12/15] gas: Don't skip SFrame FDE if .cfi_register specifies RA w/o tracking Jens Remus
2024-04-18 20:36   ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 13/15] gas: Don't skip SFrame FDE if .cfi_register specifies SP register Jens Remus
2024-04-18 20:37   ` Indu Bhagat
2024-04-19 13:13     ` Jens Remus
2024-04-23  8:15       ` Indu Bhagat
2024-04-25 22:22         ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 14/15] gas: Test predicate whether SFrame RA tracking is used Jens Remus
2024-04-18 20:37   ` Indu Bhagat
2024-04-12 14:47 ` [PATCH v3 15/15] gas: Validate SFrame RA tracking and fixed RA offset Jens Remus
2024-04-18 20:38   ` Indu Bhagat
2024-05-03 16:40     ` Jens Remus
2024-05-04  0:22       ` Indu Bhagat
2024-05-06 11:41         ` Jens Remus
2024-05-06 14:39           ` Jens Remus
2024-05-16 20:45             ` Indu Bhagat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=888015cf-de85-4ac3-9709-4c797e65ad00@oracle.com \
    --to=indu.bhagat@oracle.com \
    --cc=binutils@sourceware.org \
    --cc=jremus@linux.ibm.com \
    --cc=krebbel@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).