qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Alexander Graf <agraf@suse.de>
Cc: paulus@samba.org, qemu-devel@nongnu.org,
	Aurelien Jarno <aurelien@aurel32.net>,
	anton@samba.org
Subject: Re: [Qemu-devel] [PATCH 06/27] Correct ppc popcntb logic, implement popcntw and popcntd
Date: Mon, 4 Apr 2011 12:56:56 +1000	[thread overview]
Message-ID: <20110404025656.GB3172@yookeroo> (raw)
In-Reply-To: <FF3B009C-E50F-4EF5-A213-427A2E73022F@suse.de>

On Fri, Apr 01, 2011 at 08:02:24PM +0200, Alexander Graf wrote:
> On 01.04.2011, at 19:58, Aurelien Jarno wrote:
> > On Fri, Apr 01, 2011 at 03:15:13PM +1100, David Gibson wrote:
[snip]
> >> +target_ulong helper_popcntd (target_ulong val)
> >> +{
> >> +    val = (val & 0x5555555555555555ULL) + ((val >>  1) &
> >> +                                           0x5555555555555555ULL);
> >> +    val = (val & 0x3333333333333333ULL) + ((val >>  2) &
> >> +                                           0x3333333333333333ULL);
> >> +    val = (val & 0x0f0f0f0f0f0f0f0fULL) + ((val >>  4) &
> >> +                                           0x0f0f0f0f0f0f0f0fULL);
> >> +    val = (val & 0x00ff00ff00ff00ffULL) + ((val >>  8) &
> >> +                                           0x00ff00ff00ff00ffULL);
> >> +    val = (val & 0x0000ffff0000ffffULL) + ((val >> 16) &
> >> +                                           0x0000ffff0000ffffULL);
> >> +    val = (val & 0x00000000ffffffffULL) + ((val >> 32) &
> >> +                                           0x00000000ffffffffULL);
> >> +    return val;
> >> +}
> > 
> > I probably arrive a bit late, but note that for this one you can use
> > ctpop64() (from host-utils.h), which also uses a GCC builtin when
> > available.
> 
> Ah, nice. David - sounds like a good chance for a follow-up patch :)

Done.  I'll send it when I next send a batch for merging.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  reply	other threads:[~2011-04-04  2:57 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-01  4:15 [Qemu-devel] [0/27] Implement emulation of pSeries logical partitions (v6) David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 01/27] Clean up PowerPC SLB handling code David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 02/27] Allow qemu_devtree_setprop() to take arbitrary values David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 03/27] Add a hook to allow hypercalls to be emulated on PowerPC David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 04/27] Implement PowerPC slbmfee and slbmfev instructions David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 05/27] Implement missing parts of the logic for the POWER PURR David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 06/27] Correct ppc popcntb logic, implement popcntw and popcntd David Gibson
2011-04-01 17:58   ` Aurelien Jarno
2011-04-01 18:02     ` Alexander Graf
2011-04-04  2:56       ` David Gibson [this message]
2011-04-01  4:15 ` [Qemu-devel] [PATCH 07/27] Clean up slb_lookup() function David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 08/27] Parse SDR1 on mtspr instead of at translate time David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 09/27] Use "hash" more consistently in ppc mmu code David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 10/27] Better factor the ppc hash translation path David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 11/27] Support 1T segments on ppc David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 12/27] Add POWER7 support for ppc David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 13/27] Start implementing pSeries logical partition machine David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 14/27] Implement the bus structure for PAPR virtual IO David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 15/27] Virtual hash page table handling on pSeries machine David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 16/27] Implement hcall based RTAS for pSeries machines David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 17/27] Implement assorted pSeries hcalls and RTAS methods David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 18/27] Implement the PAPR (pSeries) virtualized interrupt controller (xics) David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 19/27] Add PAPR H_VIO_SIGNAL hypercall and infrastructure for VIO interrupts David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 20/27] Add (virtual) interrupt to PAPR virtual tty device David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 21/27] Implement TCE translation for sPAPR VIO David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 22/27] Implement sPAPR Virtual LAN (ibmveth) David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 23/27] Implement PAPR CRQ hypercalls David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 24/27] Implement PAPR virtual SCSI interface (ibmvscsi) David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 25/27] Add a PAPR TCE-bypass mechanism for the pSeries machine David Gibson
2011-04-01  4:15 ` [Qemu-devel] [PATCH 26/27] Implement PAPR VPA functions for pSeries shared processor partitions David Gibson
2011-04-01 16:18 ` [Qemu-devel] Re: [0/27] Implement emulation of pSeries logical partitions (v6) Alexander Graf
2011-04-01 16:22   ` Anthony Liguori
2011-04-01 16:30     ` Alexander Graf
2011-04-01 17:28 ` [Qemu-devel] " Anthony Liguori
2011-04-01 18:01   ` Alexander Graf
2011-04-01 19:20     ` Anthony Liguori
2011-04-01 23:20       ` Alexander Graf
2011-04-01 19:22     ` Anthony Liguori
2011-04-01 23:21       ` Alexander Graf
2011-04-02  0:06         ` Alexander Graf
2011-04-02  0:09           ` Anthony Liguori
2011-04-02  0:21             ` Alexander Graf
  -- strict thread matches above, loose matches on Subject: below --
2011-03-25  3:21 [Qemu-devel] [0/27] Implement emulation of pSeries logical partitions (v5) David Gibson
2011-03-25  3:21 ` [Qemu-devel] [PATCH 06/27] Correct ppc popcntb logic, implement popcntw and popcntd David Gibson
2011-03-23  5:30 [Qemu-devel] [0/27] Implement emulation of pSeries logical partitions (v4) David Gibson
2011-03-23  5:30 ` [Qemu-devel] [PATCH 06/27] Correct ppc popcntb logic, implement popcntw and popcntd David Gibson

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=20110404025656.GB3172@yookeroo \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=anton@samba.org \
    --cc=aurelien@aurel32.net \
    --cc=paulus@samba.org \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).