mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Arjan van de Ven <arjanv@redhat.com>
Cc: linux-kernel@vger.kernel.org, torvalds@osdl.org, akpm@osdl.org
Subject: Re: using gcc built-ins for bitops?
Date: Thu, 24 Jun 2004 02:31:09 -0700	[thread overview]
Message-ID: <20040624023109.6213c1ce.pj@sgi.com> (raw)
In-Reply-To: <20040624070936.GB30057@devserv.devel.redhat.com>

I see a list of these gcc bitop builtins at the bottom of the page:

  http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html

Looks like you can find the position of the first 1 bit, the length of
the leading or trailing seq of 0 bits, the hamming weight (popcount) and
the parity, each for int, long and long long.

I just add this for the benefit of others.

As to your primary question - is this worth doing - I don't have
an answer.

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

  parent reply	other threads:[~2004-06-24  9:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-24  7:09 Arjan van de Ven
2004-06-24  9:00 ` Andrew Morton
2004-06-24  9:06   ` Arjan van de Ven
2004-06-24 13:41     ` Ben Collins
2004-06-24  9:17   ` Arjan van de Ven
2004-06-24 11:31   ` Arjan van de Ven
2004-06-24 12:05     ` Jakub Jelinek
2004-06-24 12:35       ` Arjan van de Ven
2004-06-24 15:30         ` Linus Torvalds
2004-06-24  9:31 ` Paul Jackson [this message]
2004-06-24 10:36   ` Jakub Jelinek
2004-06-24 15:25     ` Linus Torvalds
2004-06-24 11:51 ` Gabriel Paubert
2004-06-24 12:21   ` Arjan van de Ven
     [not found] <2awGH-DF-17@gated-at.bofh.it>
2004-06-24 13:46 ` Pascal Schmidt
2004-06-24 13:49   ` Arjan van de Ven
2004-06-24 13:51     ` Pascal Schmidt

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=20040624023109.6213c1ce.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=akpm@osdl.org \
    --cc=arjanv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®