qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Alexander Graf" <agraf@suse.de>,
	qemu-ppc@nongnu.org, "Andreas Färber" <afaerber@suse.de>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 5/6] bitops: add BITNR macro
Date: Thu, 14 Nov 2013 16:51:55 +1100	[thread overview]
Message-ID: <528464FB.1050009@ozlabs.ru> (raw)
In-Reply-To: <52836AB8.3020409@redhat.com>

On 11/13/2013 11:04 PM, Paolo Bonzini wrote:
> Il 13/11/2013 03:40, Alexey Kardashevskiy ha scritto:
>> I looked further and did not find any use of ffs/clz so I wonder what did
>> you mean about bitops.h and what did I miss? I am confused.
> 
> It's host-utils.h actually.  The reason for the wrappers is twofold:
> 
> (1) provide 32/64-bit functions instead of int/long/longlong;
> 
> (2) support GCC <3.4.
> 
> The wrappers are not usable where you have constant expressions as in
> your case.  So your original patch is good IMO, except for the __ at the
> beginning of __BITNR.


There are 2 macros, one (BITNR) uses the other (__BITNR). What would the
good name be for BITNR then?


> 
> Paolo
> 
>> So I would suggest the following instead (if I really needed this BITNR but
>> I really do not :) )
>>
>> ===
>>     bitops: add BITNR macro
>>
>>     This adds a macro to calculate the highest single bit set. If more than
>>     one bit is set, returns -1.
> 


-- 
Alexey

  reply	other threads:[~2013-11-14  5:52 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11  7:44 [Qemu-devel] [PATCH v3 0/6] spapr: add "compat" machine option Alexey Kardashevskiy
2013-11-11  7:44 ` [Qemu-devel] [PATCH v3 1/6] cpu: add suboptions support Alexey Kardashevskiy
2013-11-30 10:10   ` Alexey Kardashevskiy
2013-11-30 11:00     ` Paolo Bonzini
2013-11-30 13:08       ` Alexey Kardashevskiy
2013-11-11  7:44 ` [Qemu-devel] [PATCH v3 2/6] target-ppc: make use of new -cpu suboptions handling Alexey Kardashevskiy
2013-11-11  7:44 ` [Qemu-devel] [PATCH v3 3/6] target-ppc: add "compat" CPU option Alexey Kardashevskiy
2013-11-11  7:44 ` [Qemu-devel] [PATCH v3 4/6] qemu-option: support +foo/-foo command line agruments Alexey Kardashevskiy
2013-11-11 12:41   ` Andreas Färber
2013-11-11 12:52     ` Jan Kiszka
2013-11-11 13:23       ` Andreas Färber
2013-11-11 14:25     ` Igor Mammedov
2013-11-11 23:49       ` Alexey Kardashevskiy
2013-11-12  9:58         ` Igor Mammedov
2013-11-12 12:39           ` Alexey Kardashevskiy
2013-11-12 12:45             ` Andreas Färber
2013-11-13  1:51               ` Alexey Kardashevskiy
2013-11-13  9:29               ` Paolo Bonzini
2013-11-12 13:11             ` Igor Mammedov
2013-11-13  2:07               ` Alexey Kardashevskiy
2013-11-13 10:38                 ` Igor Mammedov
2013-11-13  9:20           ` Paolo Bonzini
2013-11-11  7:44 ` [Qemu-devel] [PATCH v3 5/6] bitops: add BITNR macro Alexey Kardashevskiy
2013-11-11 11:57   ` Andreas Färber
2013-11-11 12:09     ` Alexey Kardashevskiy
2013-11-13  2:40     ` Alexey Kardashevskiy
2013-11-13 12:04       ` Paolo Bonzini
2013-11-14  5:51         ` Alexey Kardashevskiy [this message]
2013-11-14  8:54           ` Paolo Bonzini
2013-11-11  7:44 ` [Qemu-devel] [PATCH v3 6/6] target-ppc: demonstrate new "vsx" property Alexey Kardashevskiy
2013-11-11 13:31   ` Andreas Färber
2013-11-14  5:20     ` Alexey Kardashevskiy
2013-11-14 16:04       ` Andreas Färber

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=528464FB.1050009@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@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).