[binutils-gdb] aarch64: s390: x86_64: sframe: adjust flex fde hook implementation

Indu Bhagat ibhagat@sourceware.org
Wed Jan 21 21:32:05 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b600229503b157c6f043fcaafcc0efe47c89d133

commit b600229503b157c6f043fcaafcc0efe47c89d133
Author: Indu Bhagat <indu.bhagat@oracle.com>
Date:   Tue Jan 20 10:25:49 2026 -0800

    aarch64: s390: x86_64: sframe: adjust flex fde hook implementation
    
    A previous commit added new backend hook sframe_support_flex_fde_p by
    defining a new function for each backend that supports SFrame stack
    trace format:
    
      commit 2f9b3987db53d7e0606f89bfe2527dd3d0915568
      [SFrame-V3] gas: sframe: add new backend hook
      sframe_support_flex_fde_p for FLEX FDEs
    
    As pointed out in a review comment, simply providing the definition to
    use true/false (as applicable) is sufficient for the purpose, and helps
    generate better code.  So do that.
    https://inbox.sourceware.org/binutils/80404871-53b4-4f5c-9d86-7a3a4d0a920e@suse.com/
    
    ChangeLog:
            * gas/config/tc-aarch64.c (aarch64_support_flex_fde_p): Remove.
            * gas/config/tc-aarch64.h (aarch64_support_flex_fde_p): Remove.
            (sframe_support_flex_fde_p): Define to false.
            * gas/config/tc-i386.c (x86_support_flex_fde_p): Remove.
            * gas/config/tc-i386.h (x86_support_flex_fde_p): Remove.
            (sframe_support_flex_fde_p): Define to true.
            * gas/config/tc-s390.c (s390_support_flex_fde_p): Remove.
            * gas/config/tc-s390.h (s390_support_flex_fde_p): Remove.
            (sframe_support_flex_fde_p): Define to true.

Diff:
---
 gas/config/tc-aarch64.c | 8 --------
 gas/config/tc-aarch64.h | 3 +--
 gas/config/tc-i386.c    | 7 -------
 gas/config/tc-i386.h    | 3 +--
 gas/config/tc-s390.c    | 8 --------
 gas/config/tc-s390.h    | 3 +--
 6 files changed, 3 insertions(+), 29 deletions(-)

diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 669e9620a78..9bde2250eeb 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -9292,14 +9292,6 @@ aarch64_sframe_ra_tracking_p (void)
   return true;
 }
 
-/* Whether SFrame FDE of type SFRAME_FDE_TYPE_FLEX be generated.  */
-
-bool
-aarch64_support_flex_fde_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).  */
 
diff --git a/gas/config/tc-aarch64.h b/gas/config/tc-aarch64.h
index 1b7cde747ac..133604a8e07 100644
--- a/gas/config/tc-aarch64.h
+++ b/gas/config/tc-aarch64.h
@@ -340,8 +340,7 @@ unsigned char aarch64_sframe_get_abi_arch (void);
 #define sframe_get_abi_arch aarch64_sframe_get_abi_arch
 
 /* Whether SFrame FDE of type SFRAME_FDE_TYPE_FLEX be generated.  */
-extern bool aarch64_support_flex_fde_p (void);
-#define sframe_support_flex_fde_p aarch64_support_flex_fde_p
+#define sframe_support_flex_fde_p() false
 
 #endif /* OBJ_ELF  */
 
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 98f32049ffb..b317536cc60 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -12172,13 +12172,6 @@ x86_sframe_ra_tracking_p (void)
   return false;
 }
 
-/* Whether SFrame FDE of type SFRAME_FDE_TYPE_FLEX be generated.  */
-bool
-x86_support_flex_fde_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).  */
 offsetT
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index 544064380df..a362851a9eb 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -479,8 +479,7 @@ extern unsigned char x86_sframe_get_abi_arch (void);
 #define sframe_get_abi_arch x86_sframe_get_abi_arch
 
 /* Whether SFrame FDE of type SFRAME_FDE_TYPE_FLEX be generated.  */
-extern bool x86_support_flex_fde_p (void);
-#define sframe_support_flex_fde_p x86_support_flex_fde_p
+#define sframe_support_flex_fde_p() true
 
 #endif
 
diff --git a/gas/config/tc-s390.c b/gas/config/tc-s390.c
index 26a782baaa3..4286574ce6e 100644
--- a/gas/config/tc-s390.c
+++ b/gas/config/tc-s390.c
@@ -2917,14 +2917,6 @@ s390_sframe_ra_tracking_p (void)
   return true;
 }
 
-/* Whether SFrame FDE of type SFRAME_FDE_TYPE_FLEX be generated.  */
-
-bool
-s390_support_flex_fde_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 1511596a330..54f51237e8a 100644
--- a/gas/config/tc-s390.h
+++ b/gas/config/tc-s390.h
@@ -132,8 +132,7 @@ unsigned char s390_sframe_get_abi_arch (void);
 #define sframe_get_abi_arch s390_sframe_get_abi_arch
 
 /* Whether SFrame FDE of type SFRAME_FDE_TYPE_FLEX be generated.  */
-extern bool s390_support_flex_fde_p (void);
-#define sframe_support_flex_fde_p s390_support_flex_fde_p
+#define sframe_support_flex_fde_p() true
 
 /* The target supports Object Attributes.  */
 #define TC_OBJ_ATTR 1


More information about the Binutils-cvs mailing list