On Wed, Nov 06, 2024 at 05:05:54PM +0100, Uros Bizjak wrote:
> Please see [1]:
> 
> /*
>  * This output constraint should be used for any inline asm which has a "call"
>  * instruction.  Otherwise the asm may be inserted before the frame pointer
>  * gets set up by the containing function.  If you forget to do this, objtool
>  * may print a "call without frame pointer save/setup" warning.
>  */
> register unsigned long current_stack_pointer asm(_ASM_SP);
> #define ASM_CALL_CONSTRAINT "+r" (current_stack_pointer)
> 
> Perhaps HPA can say some more?

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.

        Jakub

Reply via email to