[PATCH, V2 06/14] include: sframe: add SFRAME_V2_ prefixed macro names for FDE

Jens Remus jremus@linux.ibm.com
Tue Dec 16 12:20:51 GMT 2025


On 12/9/2025 9:59 AM, Indu Bhagat via Binutils wrote:
> Such a change for readability only.  SFrame V1 is now obsolete, and with
> newer versions like V3 or later, its likely better to have macro names
> reflect the applicable version.
> 
> Add new macro names for FDE information related macros.
> 
> include/
>         * sframe.h (SFRAME_V2_FUNC_INFO): New definition.
>         (SFRAME_V2_FUNC_FRE_TYPE): Likewise.
>         (SFRAME_V2_FUNC_FDE_TYPE): Likewise.
>         (SFRAME_V2_FUNC_PAUTH_KEY): Likewise.
>         (SFRAME_V2_FUNC_INFO_UPDATE_PAUTH_KEY): Likewise.
> ---
> [Changes in V2]
>   - Adjusted commit message to reflect change for FDE only.
> [End of changes in V2]
> ---
>  include/sframe.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)

Reviewed-by: Jens Remus <jremus@linux.ibm.com>


> diff --git a/include/sframe.h b/include/sframe.h

> @@ -227,6 +227,18 @@ typedef struct sframe_func_desc_entry_v2
>  #define SFRAME_V1_FUNC_INFO_UPDATE_PAUTH_KEY(pauth_key, fde_info) \
>    ((((pauth_key) & 0x1) << 5) | ((fde_info) & 0xdf))
>  
> +/* SFrame V2 has similar SFrame FDE representation as SFrame V1.  */
> +
> +#define SFRAME_V2_FUNC_INFO(fde_type, fre_enc_type) \
> +  (SFRAME_V1_FUNC_INFO (fde_type, fre_enc_type))
> +
> +#define SFRAME_V2_FUNC_FRE_TYPE(data)    (SFRAME_V1_FUNC_FRE_TYPE (data))
> +#define SFRAME_V2_FUNC_FDE_TYPE(data)    (SFRAME_V1_FUNC_FDE_TYPE (data))
> +#define SFRAME_V2_FUNC_PAUTH_KEY(data)   (SFRAME_V1_FUNC_PAUTH_KEY (data))
> +
> +#define SFRAME_V2_FUNC_INFO_UPDATE_PAUTH_KEY(pauth_key, fde_info) \
> +  SFRAME_V1_FUNC_INFO_UPDATE_PAUTH_KEY (pauth_key, fde_info)
> +

Wouln't it then also make sense to do the same for the FRE-related
macros (in this or a separate patch)?

SFRAME_V1_FRE_CFA_BASE_REG_ID
SFRAME_V1_FRE_OFFSET_COUNT
SFRAME_V1_FRE_OFFSET_SIZE
SFRAME_V1_FRE_MANGLED_RA_P

>  /* Size of stack frame offsets in an SFrame Frame Row Entry.  A single
>     SFrame FRE has all offsets of the same size.  Offset size may vary
>     across frame row entries.  */

Regards,
Jens
-- 
Jens Remus
Linux on Z Development (D3303)
+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/



More information about the Binutils mailing list