[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFULd4bir3v7heqdUtPEFGEY66SwqxNkmRXy=uhB_3popS3zDQ@mail.gmail.com>
Date: Wed, 12 Mar 2025 13:12:35 +0100
From: Uros Bizjak <ubizjak@...il.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2] x86/hweight: Fix and improve __arch_hweight{32,64}() assembly
On Wed, Mar 12, 2025 at 1:09 PM Ingo Molnar <mingo@...nel.org> wrote:
>
>
> * Uros Bizjak <ubizjak@...il.com> 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. This unconstrained scheduling might
> > cause objtool to print a "call without frame pointer save/setup"
> > warning. 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.
> >
> > b) Use asm_inline to instruct the compiler that the size of asm()
> > is the minimum size of one instruction, ignoring how many instructions
> > the compiler thinks it is. ALTERNATIVE macro that expands to several
> > pseudo directives causes instruction length estimate to count
> > more than 20 instructions.
> >
> > c) Use named operands in inline asm.
>
> I think this should be a 3-patch series. While it all modifies the same
> code, each change could introduce separate issues, so it's better to be
> individually bisectable IMO ...
Ok, will split and send separate series.
Thanks,
Uros.
Powered by blists - more mailing lists