How to update .debug_frame CFA offset for function epilogues?
Segher Boessenkool
segher@kernel.crashing.org
Tue Mar 31 21:49:53 GMT 2020
Hi Jozef,
On Thu, Mar 26, 2020 at 12:33:38PM +0000, Jozef Lawrynowicz wrote:
> In some cases, I can fix the CFA offset by marking these epilogue insns as
> frame_related anyway, and adding reg notes which describe the stack pointer
> operations. For some other epilogue insns, marking them frame_related results in
> an ICE, which I'm assuming comes back to the fact that epilogue insns shouldn't
> be marked frame related.
> What is the standard way for updating the CFA offset in the epilogue?
What you already say you do: add notes, and often frame_related is set
as well. I agree that shouldn't be done, but it often is harmless.
You need reg_notes for more than just the stack updates: importantly,
also for the restores of any saved register.
Segher
More information about the Gcc
mailing list