On Wed, Nov 06, 2024 at 06:04:43PM +0100, Jan Hubicka wrote:
> LGTM, though if asm needs temporary memory it can ask for it explicitly.

Sure, but the "redzone" is not about needing extra temporary memory, but
about asking the compiler not to put any of its own temporaries in the red
zone.  The temporary memory could be a hack to avoid moving inline asm with
call into the prologue or epilogue.

> I guess this can be practical to hide actual call in the asm statement
> (which will break unwinding I guess).

When using .cfi_* directives, inline asm can be written such that it has
accurate unwind info.  When not using .cfi_* directives, the inline asm
could e.g. jump to a subsection, do call there with hand written .eh_frame
section for it and then jump back.
I guess Linux kernel doesn't care, for whatever reason they hate DWARF.

        Jakub

Reply via email to