[PATCH] sframe: Fix RA and FP stack recovery comments
mengqinggang
mengqinggang@loongson.cn
Fri Nov 6 08:22:26 GMT 2026
Fix the interpreted typo and change CFA + offset to *(CFA + offset)
for RA and FP stack recovery.
---
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
--
2.34.1
More information about the Binutils
mailing list