aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Remus <jremus@linux.ibm.com>2025-02-04 15:13:24 +0100
committerJens Remus <jremus@linux.ibm.com>2025-02-04 15:13:24 +0100
commit0e9555a011e8c5309efcc85b1a01a01496e2bbe3 (patch)
tree201a62544da4f6833ce33df1b863b3969da272c4
parent13dad2fefb26f1972145084d58d013f12d98c5d0 (diff)
downloadbinutils-0e9555a011e8c5309efcc85b1a01a01496e2bbe3.zip
binutils-0e9555a011e8c5309efcc85b1a01a01496e2bbe3.tar.gz
binutils-0e9555a011e8c5309efcc85b1a01a01496e2bbe3.tar.bz2
gas: sframe: Use appropriate struct cfi_insn_data union members
Use the appropriate struct cfi_insn_data union members to access fields when generating SFrame information from CFI directives. gas/ * gen-sframe.c (sframe_xlate_do_def_cfa, sframe_xlate_do_offset, sframe_xlate_do_val_offset): Access ri fields, as .cfi_def_cfa, .cfi_offset, and .cfi_val_offset define a register and offset value. * (sframe_xlate_do_def_cfa_register): Access r field, as .cfi_def_cfa_register defines a register. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
-rw-r--r--gas/gen-sframe.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c
index 85d2f03..e7397e0 100644
--- a/gas/gen-sframe.c
+++ b/gas/gen-sframe.c
@@ -1003,11 +1003,11 @@ sframe_xlate_do_def_cfa (struct sframe_xlate_ctx *xlate_ctx,
/* Define the current CFA rule to use the provided register and
offset. However, if the register is not FP/SP, skip creating
SFrame stack trace info for the function. */
- if (cfi_insn->u.r != SFRAME_CFA_SP_REG
- && cfi_insn->u.r != SFRAME_CFA_FP_REG)
+ if (cfi_insn->u.ri.reg != SFRAME_CFA_SP_REG
+ && cfi_insn->u.ri.reg != SFRAME_CFA_FP_REG)
{
as_warn (_("skipping SFrame FDE; non-SP/FP register %u in .cfi_def_cfa"),
- cfi_insn->u.r);
+ cfi_insn->u.ri.reg);
return SFRAME_XLATE_ERR_NOTREPRESENTED; /* Not represented. */
}
sframe_fre_set_cfa_base_reg (cur_fre, cfi_insn->u.ri.reg);
@@ -1040,7 +1040,7 @@ sframe_xlate_do_def_cfa_register (struct sframe_xlate_ctx *xlate_ctx,
cfi_insn->u.r);
return SFRAME_XLATE_ERR_NOTREPRESENTED; /* Not represented. */
}
- sframe_fre_set_cfa_base_reg (cur_fre, cfi_insn->u.ri.reg);
+ sframe_fre_set_cfa_base_reg (cur_fre, cfi_insn->u.r);
sframe_fre_set_cfa_offset (cur_fre, last_fre->cfa_offset);
cur_fre->merge_candidate = false;
@@ -1097,7 +1097,7 @@ sframe_xlate_do_offset (struct sframe_xlate_ctx *xlate_ctx,
/* Change the rule for the register indicated by the register number to
be the specified offset. */
/* Ignore SP reg, as it can be recovered from the CFA tracking info. */
- if (cfi_insn->u.r == SFRAME_CFA_FP_REG)
+ if (cfi_insn->u.ri.reg == SFRAME_CFA_FP_REG)
{
gas_assert (!cur_fre->base_reg);
sframe_fre_set_bp_track (cur_fre, cfi_insn->u.ri.offset);
@@ -1105,7 +1105,7 @@ sframe_xlate_do_offset (struct sframe_xlate_ctx *xlate_ctx,
}
#ifdef SFRAME_FRE_RA_TRACKING
else if (sframe_ra_tracking_p ()
- && cfi_insn->u.r == SFRAME_CFA_RA_REG)
+ && cfi_insn->u.ri.reg == SFRAME_CFA_RA_REG)
{
sframe_fre_set_ra_track (cur_fre, cfi_insn->u.ri.offset);
cur_fre->merge_candidate = false;
@@ -1127,15 +1127,15 @@ sframe_xlate_do_val_offset (struct sframe_xlate_ctx *xlate_ctx ATTRIBUTE_UNUSED,
register is not interesting (FP or RA reg), the current DW_CFA_val_offset
instruction can be safely skipped without sacrificing the asynchronicity of
stack trace information. */
- if (cfi_insn->u.r == SFRAME_CFA_FP_REG
+ if (cfi_insn->u.ri.reg == SFRAME_CFA_FP_REG
#ifdef SFRAME_FRE_RA_TRACKING
- || (sframe_ra_tracking_p () && cfi_insn->u.r == SFRAME_CFA_RA_REG)
+ || (sframe_ra_tracking_p () && cfi_insn->u.ri.reg == SFRAME_CFA_RA_REG)
#endif
/* Ignore SP reg, as it can be recovered from the CFA tracking info. */
)
{
as_warn (_("skipping SFrame FDE; %s register %u in .cfi_val_offset"),
- sframe_register_name (cfi_insn->u.r), cfi_insn->u.r);
+ sframe_register_name (cfi_insn->u.ri.reg), cfi_insn->u.ri.reg);
return SFRAME_XLATE_ERR_NOTREPRESENTED; /* Not represented. */
}