diff options
author | Jens Remus <jremus@linux.ibm.com> | 2024-03-07 13:02:29 +0100 |
---|---|---|
committer | Jens Remus <jremus@linux.ibm.com> | 2024-05-16 13:32:22 +0200 |
commit | 15850370ce8fda34d7de5e94015febaa4aa793ae (patch) | |
tree | 2c07db6a77264446a3d5b18e4824fb574ab4ecff | |
parent | af10cd9dbcb9a3c0fdb00979df4767dd9df3f5a3 (diff) | |
download | fsf-binutils-gdb-15850370ce8fda34d7de5e94015febaa4aa793ae.zip fsf-binutils-gdb-15850370ce8fda34d7de5e94015febaa4aa793ae.tar.gz fsf-binutils-gdb-15850370ce8fda34d7de5e94015febaa4aa793ae.tar.bz2 |
gas: Test predicate whether SFrame RA tracking is used
The existence of the macro SFRAME_FRE_RA_TRACKING only ensures the
existence of the macro SFRAME_CFA_RA_REG and the predicate function
sframe_ra_tracking_p. It does not indicate whether SFrame RA tracking
is actually used.
Test the return value of the SFrame RA tracking predicate function
sframe_ra_tracking_p to determine whether RA tracking is used.
This aligns the logic in functions get_fre_num_offsets and
output_sframe_row_entry to the one used in all other places.
gas/
* gen-sframe.c (get_fre_num_offsets, output_sframe_row_entry):
Test predicate to determine whether SFrame RA tracking is used.
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
-rw-r--r-- | gas/gen-sframe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c index 20ba9e0..9e5532b 100644 --- a/gas/gen-sframe.c +++ b/gas/gen-sframe.c @@ -346,7 +346,8 @@ get_fre_num_offsets (struct sframe_row_entry *sframe_fre) if (sframe_fre->bp_loc == SFRAME_FRE_ELEM_LOC_STACK) fre_num_offsets++; #ifdef SFRAME_FRE_RA_TRACKING - if (sframe_fre->ra_loc == SFRAME_FRE_ELEM_LOC_STACK) + if (sframe_ra_tracking_p () + && sframe_fre->ra_loc == SFRAME_FRE_ELEM_LOC_STACK) fre_num_offsets++; #endif return fre_num_offsets; @@ -536,7 +537,8 @@ output_sframe_row_entry (symbolS *fde_start_addr, fre_write_offsets++; #ifdef SFRAME_FRE_RA_TRACKING - if (sframe_fre->ra_loc == SFRAME_FRE_ELEM_LOC_STACK) + if (sframe_ra_tracking_p () + && sframe_fre->ra_loc == SFRAME_FRE_ELEM_LOC_STACK) { fre_offset_func_map[idx].out_func (sframe_fre->ra_offset); fre_write_offsets++; |