All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH v2] x86: use POPCNT for hweight<N>() when available
Date: Fri, 17 Mar 2023 12:22:02 +0100	[thread overview]
Message-ID: <ZBRNWhExetXH1OaS@Air-de-Roger> (raw)
In-Reply-To: <55a4a24d-7fac-527c-6bcf-8d689136bac2@suse.com>

On Mon, Jul 15, 2019 at 02:39:04PM +0000, Jan Beulich wrote:
> This is faster than using the software implementation, and the insn is
> available on all half-way recent hardware. Therefore convert
> generic_hweight<N>() to out-of-line functions (without affecting Arm)
> and use alternatives patching to replace the function calls.
> 
> Note that the approach doesn#t work for clang, due to it not recognizing
> -ffixed-*.

I've been giving this a look, and I wonder if it would be fine to
simply push and pop the scratch registers in the 'call' path of the
alternative, as that won't require any specific compiler option.

Thanks, Roger.


  parent reply	other threads:[~2023-03-17 11:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-15 14:39 [Xen-devel] [PATCH v2] x86: use POPCNT for hweight<N>() when available Jan Beulich
2020-05-14 14:05 ` Roger Pau Monné
2020-05-20  8:31   ` Jan Beulich
2020-05-20  9:31     ` Roger Pau Monné
2020-05-20 10:17       ` Jan Beulich
2020-05-20 10:28         ` Roger Pau Monné
2020-05-20 10:57           ` Jan Beulich
2020-05-20 11:43             ` Roger Pau Monné
2020-05-20 13:12               ` Jan Beulich
2020-05-20 17:18                 ` Roger Pau Monné
2020-05-22  9:58                   ` Jan Beulich
2020-05-22 10:19                     ` Roger Pau Monné
2023-03-17 11:22 ` Roger Pau Monné [this message]
2023-03-17 12:26   ` Andrew Cooper
2023-03-20  9:48     ` Jan Beulich
2023-03-21 14:57       ` Roger Pau Monné
2023-03-21 15:35         ` Jan Beulich
2023-03-21 15:44           ` Juergen Gross
2023-03-21 16:31           ` Roger Pau Monné
2023-03-21 16:41             ` Jan Beulich
2023-03-21 17:02               ` Roger Pau Monné

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=ZBRNWhExetXH1OaS@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.