From: Peter Zijlstra <peterz@infradead.org>
To: Borislav Petkov <bp@alien8.de>
Cc: X86 ML <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
Andy Lutomirski <luto@amacapital.net>
Subject: Re: [PATCH] x86/hweight: Get rid of the special calling convention
Date: Mon, 30 May 2016 14:08:49 +0200 [thread overview]
Message-ID: <20160530120849.GC3193@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1464605787-20603-1-git-send-email-bp@alien8.de>
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>
next prev parent reply other threads:[~2016-05-30 12:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-30 10:56 [PATCH] x86/hweight: Get rid of the special calling convention Borislav Petkov
2016-05-30 12:08 ` Peter Zijlstra [this message]
2016-06-08 14:23 ` [tip:x86/asm] " tip-bot for Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160530120849.GC3193@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox