From: Indu Bhagat Date: Sun, 25 Jan 2026 03:11:59 +0000 (-0800) Subject: gas: aarch64: i386: s390: sframe: adjust sframe_ra_tracking_p X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9172339d6c5ff4e7911f68e963919a4045f592e2;p=thirdparty%2Fbinutils-gdb.git gas: aarch64: i386: s390: sframe: adjust sframe_ra_tracking_p Like the previous commit b600229503 which adjusted the implementation of flex fde hook, make a similar change for sframe_ra_tracking_p. Simply providing the definition to use boolean value direcly is sufficient for the purpose, and helps generate better code. gas/ * config/tc-aarch64.c (aarch64_sframe_ra_tracking_p): Remove. * config/tc-aarch64.h (aarch64_sframe_ra_tracking_p): Remove. (sframe_ra_tracking_p): Set to true. * config/tc-i386.c (x86_sframe_ra_tracking_p): Remove. * config/tc-i386.h (x86_sframe_ra_tracking_p): Remove. (sframe_ra_tracking_p): Set to false. * config/tc-s390.c (s390_sframe_ra_tracking_p): Remove. * config/tc-s390.h (s390_sframe_ra_tracking_p): Remove. (sframe_ra_tracking_p): Set to true. --- diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index b56535755b1..ca9387dcfd8 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -9313,14 +9313,6 @@ aarch64_support_sframe_p (void) return (aarch64_abi == AARCH64_ABI_LP64); } -/* Whether SFrame return address tracking is needed. */ - -bool -aarch64_sframe_ra_tracking_p (void) -{ - return true; -} - /* The fixed offset from CFA for SFrame to recover the return address. (useful only when SFrame RA tracking is not needed). */ diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h index 7126994c652..d1fb4c9058b 100644 --- a/gas/config/tc-aarch64.h +++ b/gas/config/tc-aarch64.h @@ -327,8 +327,7 @@ extern unsigned int aarch64_sframe_cfa_ra_reg; #define SFRAME_CFA_RA_REG aarch64_sframe_cfa_ra_reg /* 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 +#define sframe_ra_tracking_p() true /* The fixed offset from CFA for SFrame to recover the return address. (useful only when SFrame RA tracking is not needed). */ diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index b317536cc60..ca4523fe2cd 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -12162,16 +12162,6 @@ 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) -{ - /* In AMD64, return address is always stored on the stack at a fixed offset - from the CFA (provided via x86_sframe_cfa_ra_offset ()). - Do not track explicitly via an SFrame Frame Row Entry. */ - return false; -} - /* The fixed offset from CFA for SFrame to recover the return address. (useful only when SFrame RA tracking is not needed). */ offsetT diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index a362851a9eb..b2871b52a95 100644 --- a/gas/config/tc-i386.h +++ b/gas/config/tc-i386.h @@ -465,9 +465,11 @@ extern const unsigned int x86_sframe_cfa_fp_reg; extern const unsigned int x86_sframe_cfa_ra_reg; #define SFRAME_CFA_RA_REG x86_sframe_cfa_ra_reg -/* 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 +/* Whether SFrame return address tracking is needed. + In AMD64, return address is always stored on the stack at a fixed offset + from the CFA (provided via x86_sframe_cfa_ra_offset ()). Do not track + explicitly via the data words in the SFrame Frame Row Entry. */ +#define sframe_ra_tracking_p() false /* The fixed offset from CFA for SFrame to recover the return address. (useful only when SFrame RA tracking is not needed). */ diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c index 4286574ce6e..529610f76fe 100644 --- a/gas/config/tc-s390.c +++ b/gas/config/tc-s390.c @@ -2909,14 +2909,6 @@ s390_support_sframe_p (void) return (s390_arch_size == 64); } -/* Specify if RA tracking is needed. */ - -bool -s390_sframe_ra_tracking_p (void) -{ - return true; -} - /* Specify the fixed offset to recover RA from CFA. (useful only when RA tracking is not needed). */ diff --git a/gas/config/tc-s390.h b/gas/config/tc-s390.h index a9eb618ffe6..3fd37c075bd 100644 --- a/gas/config/tc-s390.h +++ b/gas/config/tc-s390.h @@ -119,8 +119,7 @@ extern const unsigned int s390_sframe_cfa_ra_reg; #define SFRAME_CFA_RA_REG s390_sframe_cfa_ra_reg /* Whether SFrame return address tracking is needed. */ -extern bool s390_sframe_ra_tracking_p (void); -#define sframe_ra_tracking_p s390_sframe_ra_tracking_p +#define sframe_ra_tracking_p() true /* The fixed offset from CFA for SFrame to recover the return address. (useful only when SFrame RA tracking is not needed). */