On Thu, Jul 02, 2026 at 04:08:50PM +0300, Martin Storsj� wrote:
> 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.

If you were restricting yourself to unwinding from function bodies, then there
would also be no need to mark any epilogues, but we probably get that fairly
cheaply in GCC from reusing parts of the x86 implementation.

Alice

> 
> // Martin
> 

Reply via email to