This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/58872] RFC: more builtins for bit manipulation
- From: "yann at droneaud dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 25 Oct 2013 12:46:15 +0000
- Subject: [Bug c/58872] RFC: more builtins for bit manipulation
- Auto-submitted: auto-generated
- References: <bug-58872-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58872
Yann Droneaud <yann at droneaud dot fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yann at droneaud dot fr
--- Comment #2 from Yann Droneaud <yann at droneaud dot fr> ---
(In reply to Marc Glisse from comment #1)
> What do the arguments of brev mean?
> Related to PR 50481.
The prototype for the reverse bit string builtin was designed to be useful to
reverse bits in a subset of a integer value, starting at "index" with "count"
bits.
The general use case is likely to reverse all bits in a variable, (uint64_t for
example):
uint64_t v;
__builtin_brev64(v, 0, sizeof(v) * 8);
But I thought it might be interesting to have a "more" general purpose builtin.
Actually, the builtin arguments for reverse should probably match what's
currently available on modern hardware.