From: Theodore Ts'o <tytso@mit.edu>
To: "Cristian Rodríguez" <crrodriguez@opensuse.org>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] lib/ext2fs: Use __builtin_popcount when available Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
Date: Sun, 6 Jan 2013 20:56:07 -0500 [thread overview]
Message-ID: <20130107015607.GC12838@thunk.org> (raw)
In-Reply-To: <50EA28FA.8040205@opensuse.org>
On Sun, Jan 06, 2013 at 10:46:34PM -0300, Cristian Rodríguez wrote:
>
> with a recent compiler it goes something like this..
Actually, that's less ugly than I feared... if we wanted to pretty it
up a little, we could simply omit the __get_cpuid() bit, since that's
x86 specific, and just use the __builtin_cpu_supports() if it is
available on gcc 4.8 and newer. If it is not available, we could just
always use the software version of popcnt, since it's really not that
bad.
What about the people who prefer to use clang instad of gcc; does
clang have support for any of this magic?
Cheers,
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2013-01-07 1:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-06 15:04 [PATCH] lib/ext2fs: Use __builtin_popcount when available Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org> Cristian Rodríguez
2013-01-06 22:20 ` Theodore Ts'o
2013-01-07 0:53 ` Cristian Rodríguez
2013-01-07 1:31 ` Theodore Ts'o
2013-01-07 1:46 ` Cristian Rodríguez
2013-01-07 1:56 ` Theodore Ts'o [this message]
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=20130107015607.GC12838@thunk.org \
--to=tytso@mit.edu \
--cc=crrodriguez@opensuse.org \
--cc=linux-ext4@vger.kernel.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).