On Thu, 2 Jul 2026, Evgeny Karpov wrote:

On Wed, 01 Jul 2026, Alice Carlotti wrote:
A general remark: there are several places in this patch in which you detect an
irrelevant instruction in the prologue/epilogue and don't emit a directive.
This seems wrong to me, because the unwind codes should map 1:1 to the
instructions in a prologue or epilogue, so I would expect .seh_nop to be
emitted for any irrelevant instructions in the middle of the prologue/epilogue.

It is not necessary to map 1:1 all instructions in prolog.
Irrelevant instructions for unwinding can be skipped.

This depends on your ambition level.

The aarch64 SEH unwind info is defined to map 1:1 to instructions, to allow accurate unwinding through a partial prologues - not just from the function body.

It's of course perfectly valid to not care about this and just care about correct unwinding from function bodies as the initial implementation, but the format itself is designed to care about details like that.

// Martin

Reply via email to