aboutsummaryrefslogtreecommitdiff
path: root/gprofng/src
diff options
context:
space:
mode:
authorJens Remus <jremus@linux.ibm.com>2024-07-04 10:34:12 +0200
committerJens Remus <jremus@linux.ibm.com>2024-07-04 10:34:12 +0200
commit42e6e6904bd9f49231045b62e0d1eb6a8ac9d176 (patch)
tree241b9b8d1c94e8933b144503036bf11dedaff176 /gprofng/src
parentdf174a6b760ac5c66ee62ecb872c760ae21fd4cd (diff)
downloadbinutils-42e6e6904bd9f49231045b62e0d1eb6a8ac9d176.zip
binutils-42e6e6904bd9f49231045b62e0d1eb6a8ac9d176.tar.gz
binutils-42e6e6904bd9f49231045b62e0d1eb6a8ac9d176.tar.bz2
gas: Don't skip SFrame FDE if .cfi_register specifies SP register
Neither ".cfi_offset SP, <offset>", ".cfi_register SP, <regno>", nor ".cfi_val_offset SP, <offset>" alter the tracking information to recover the stack pointer (SP). Doing so would need an explicit .cfi_def_cfa, which SFrame tracks. The stack pointer (SP) register contents on entry can be reconstructed from the SFrame CFA tracking information using information from the current and initial SFrame FREs of the SFrame FDE: 1. Compute CFA from the current CFA base register (SP or FP) and CFA offset from the SFrame CFA tracking information from the SFrame FRE for the current instruction address: CFA = <current_base_reg> + <current_cfa_offset> 2. Compute SP from the current CFA and the CFA offset from the SFrame CFA tracking information from the initial SFrame FRE of the FDE: SP = CFA - <initial_cfa_offset> While at it add comments to the processing of .cfi_offset and .cfi_val_offset that the SP can be reconstructed from the CFA tracking information. gas/ * gen-sframe.c (sframe_xlate_do_register): Do not skip SFrame FDE if .cfi_register specifies SP register. (sframe_xlate_do_offset,sframe_xlate_do_val_offset): Add comment that this is likewise. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Diffstat (limited to 'gprofng/src')
0 files changed, 0 insertions, 0 deletions