All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Kevin Diggs <kevdig@hypersurf.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: cntlzw
Date: Tue, 03 Jun 2008 15:11:10 -0500	[thread overview]
Message-ID: <4845A55E.2030503@freescale.com> (raw)
In-Reply-To: <4845A44D.20404@hypersurf.com>

Kevin Diggs wrote:
> Hi,
> 
>     x86 has bsf and bsr. PPC has cntlzw which I think is equivalent to 
> bsr. Anyone know of a sneaky algorithm to do bsf?

wordsize - 1 - cntlzw(x & ~(x - 1));

-Scott

  reply	other threads:[~2008-06-03 20:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-03 20:06 cntlzw Kevin Diggs
2008-06-03 20:11 ` Scott Wood [this message]
2008-06-06  9:53   ` cntlzw Matt Sealey

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=4845A55E.2030503@freescale.com \
    --to=scottwood@freescale.com \
    --cc=kevdig@hypersurf.com \
    --cc=linuxppc-dev@ozlabs.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.