Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1409036
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/hweight: Get rid of the special calling convention |
| Date | 2016-05-30 14:10 +0200 |
| Message-ID | <rEub8-40L-33@gated-at.bofh.it> (permalink) |
| References | <rEt5o-33J-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, May 30, 2016 at 12:56:27PM +0200, Borislav Petkov wrote:
> From: Borislav Petkov <bp@suse.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@zytor.com>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> Cc: Andy Lutomirski <luto@amacapital.net>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] x86/hweight: Get rid of the special calling convention Borislav Petkov <bp@alien8.de> - 2016-05-30 13:00 +0200 Re: [PATCH] x86/hweight: Get rid of the special calling convention Peter Zijlstra <peterz@infradead.org> - 2016-05-30 14:10 +0200
csiph-web