Re: [PATCH] x86/hweight: Fix and improve __arch_hweight{32,64}() assembly
From: Ingo Molnar
Date: Mon Mar 10 2025 - 16:42:12 EST
* Uros Bizjak <ubizjak@xxxxxxxxx> wrote:
> On Mon, Mar 10, 2025 at 9:12 PM Borislav Petkov <bp@xxxxxxxxx> wrote:
> >
> > On Mon, Mar 10, 2025 at 09:08:04PM +0100, Uros Bizjak wrote:
> > > a) Use ASM_CALL_CONSTRAINT to prevent inline asm that includes call
> > > instruction from being scheduled before the frame pointer gets set
> > > up by the containing function, causing objtool to print a "call
> > > without frame pointer save/setup" warning.
> >
> > The other two are ok but this is new. How do you trigger this? I've never seen
> > it in my randconfig builds...
>
> It is not triggered now, but without this constraint, nothing prevents
> the compiler from scheduling the insn in front of frame creation.
Please add:
'Current versions of compilers don't seem to trigger this condition,
but without this constraint there's nothing to prevent the compiler
from scheduling the insn in front of frame creation.'
Thanks,
Ingo