From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] microblaze: Add support for the clz insn
Date: Tue, 10 Jan 2012 16:41:12 +0100 [thread overview]
Message-ID: <20120110154112.GF7565@edde.se.axis.com> (raw)
In-Reply-To: <CAFEAcA86J=P1FUb7AmSNarsD7wWbOzXXxP-5owLo1SFz7xmSeg@mail.gmail.com>
On Tue, Jan 10, 2012 at 03:37:51PM +0000, Peter Maydell wrote:
> On 10 January 2012 10:27, Edgar E. Iglesias <edgar.iglesias@gmail.com> wrote:
> > +uint32_t helper_clz(uint32_t t0)
> > +{
> > + if (t0 == 0) {
> > + return 32;
> > + }
> > + if (t0 == ~0) {
> > + return 0;
> > + }
> > + return clz32(t0);
> > +}
>
> I think clz32() handles both the 0 and 0xffffffff cases correctly,
> so they don't need special-casing.
That seems to be the case, I'll fix that, thanks.
Cheers
next prev parent reply other threads:[~2012-01-10 15:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-10 10:27 [Qemu-devel] [PATCH] microblaze: Add support for the clz insn Edgar E. Iglesias
2012-01-10 10:27 ` [Qemu-devel] [PATCH] microblaze: Emulate the hw stackprotector Edgar E. Iglesias
2012-01-10 10:27 ` [Qemu-devel] [PATCH] microblaze: Break the tb at memory barriers Edgar E. Iglesias
2012-01-10 10:27 ` [Qemu-devel] [PATCH] etraxfs-dma: Model metadata and eop Edgar E. Iglesias
2012-01-10 15:16 ` Edgar E. Iglesias
2012-01-10 15:37 ` [Qemu-devel] [PATCH] microblaze: Add support for the clz insn Peter Maydell
2012-01-10 15:41 ` Edgar E. Iglesias [this message]
2012-01-10 23:19 ` Richard Henderson
2012-01-10 23:20 ` Edgar E. Iglesias
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=20120110154112.GF7565@edde.se.axis.com \
--to=edgar.iglesias@gmail.com \
--cc=peter.maydell@linaro.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).