[COMMITTED] gas: aarch64: i386: s390: sframe: adjust sframe_ra_tracking_p

Indu Bhagat indu.bhagat@oracle.com
Sun Jan 25 03:22:20 GMT 2026


[Committed as obvious, given previous similar patches.]

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.
---
 gas/config/tc-aarch64.c |  8 --------
 gas/config/tc-aarch64.h |  3 +--
 gas/config/tc-i386.c    | 10 ----------
 gas/config/tc-i386.h    |  8 +++++---
 gas/config/tc-s390.c    |  8 --------
 gas/config/tc-s390.h    |  3 +--
 6 files changed, 7 insertions(+), 33 deletions(-)

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).  */
-- 
2.43.0



More information about the Binutils mailing list