[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160530120849.GC3193@twins.programming.kicks-ass.net>
Date: Mon, 30 May 2016 14:08:49 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Borislav Petkov <bp@...en8.de>
Cc: X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Andy Lutomirski <luto@...capital.net>
Subject: Re: [PATCH] x86/hweight: Get rid of the special calling convention
On Mon, May 30, 2016 at 12:56:27PM +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@...e.de>
>
> People complained about ARCH_HWEIGHT_CFLAGS and how it throws a wrench
> into kcov, lto, etc, experimentations.
>
> Add asm versions for __sw_hweight{32,64}() and do explicit saving and
> restoring of clobbered registers. This gets rid of the special calling
> convention. We get to call those functions on !X86_FEATURE_POPCNT CPUs.
>
> We still need to hardcode POPCNT and register operands as some old gas
> versions which we support, do not know about POPCNT.
>
> Btw, remove redundant REX prefix from 32-bit POPCNT because alternatives
> can do padding now.
>
> Suggested-by: "H. Peter Anvin" <hpa@...or.com>
> Signed-off-by: Borislav Petkov <bp@...e.de>
> Cc: Andy Lutomirski <luto@...capital.net>
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Powered by blists - more mailing lists