On Wed, Nov 06, 2024 at 05:31:53PM +0100, Uros Bizjak wrote:
> > So workaround about issues in some kernel tool?
> > Not sure if gcc needs to provide workaround for that.
> > Just do the call in a separate .subsection or add some magic labels around
> > it that the tool can check and disable the warning.  Perhaps just a label
> > at the start of the call insn with some special prefix followed by %=
> > that the tool can use to find out calls coming from inline asm vs. calls
> > from C code.
> 
> Maybe even prefix the call with "cs;" prefix.

I'd think the "redzone" constraint would actually also likely prevent moving
the asm across stack pointer changing instructions as it has a stack pointer
+ offset based MEM.
Of course, for ia32 or other targets the "redzone" clobber won't be
supported or will do nothing, but then say "=m" (dummy) or "m" (dummy) for
char dummy; automatic var or something similar could prevent the moving as
well.

        Jakub

Reply via email to