[PATCH] sframe: Fix RA and FP stack recovery comments
Jens Remus
jremus@linux.ibm.com
Fri Nov 6 13:52:21 GMT 2026
On 11/6/2026 9:22 AM, mengqinggang wrote:
> Fix the interpreted typo and change CFA + offset to *(CFA + offset)
> for RA and FP stack recovery.
Looks good to me. But wait for Indu's or a global maintainer's ok to commit.
Would it make sense to improve libsframe/doc/sframe-spec.texi likewise?
> ---
> include/sframe.h | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/sframe.h b/include/sframe.h
> index 2c9019cb64d..1d7bb9f1d86 100644
> --- a/include/sframe.h
> +++ b/include/sframe.h
> @@ -449,14 +449,14 @@ typedef struct sframe_fre_info
> AMD64:
> offset1 (interpreted as CFA = BASE_REG + offset1)
> if FP is being tracked
> - offset2 (intrepreted as FP = CFA + offset2)
> + offset2 (interpreted as FP = *(CFA + offset2))
> fi
>
> AARCH64:
> offset1 (interpreted as CFA = BASE_REG + offset1)
> if FP is being tracked (in other words, if frame record created)
> - offset2 (interpreted as RA = CFA + offset2)
> - offset3 (intrepreted as FP = CFA + offset3)
> + offset2 (interpreted as RA = *(CFA + offset2))
> + offset3 (interpreted as FP = *(CFA + offset3))
> fi
> Note that in AAPCS64, a frame record, if created, will save both FP and
> LR on stack.
> @@ -464,15 +464,15 @@ typedef struct sframe_fre_info
> s390x:
> offset1 (interpreted as CFA = BASE_REG + offset1)
> if RA is being tracked
> - offset2 (interpreted as RA = CFA + offset2; an offset value of
> + offset2 (interpreted as RA = *(CFA + offset2); an offset value of
> SFRAME_FRE_RA_OFFSET_INVALID indicates a dummy padding RA offset
> to represent FP without RA saved on stack)
> if FP is being tracked
> - offset3 (intrepreted as FP = CFA + offset3)
> + offset3 (interpreted as FP = *(CFA + offset3))
> fi
> else
> if FP is being tracked
> - offset2 (intrepreted as FP = CFA + offset2)
> + offset2 (interpreted as FP = *(CFA + offset2))
> fi
> fi
> Note that in s390x, if a FP/RA is to be restored from a register, flex FDEs
Thanks and regards,
Jens
--
Jens Remus
Linux on Z Development (D3303)
jremus@de.ibm.com / jremus@linux.ibm.com
IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Ehningen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/
More information about the Binutils
mailing list