public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "marc.glisse at normalesup dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/50481] New: builtin to reverse the bit order Date: Thu, 22 Sep 2011 10:33:00 -0000 [thread overview] Message-ID: <bug-50481-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50481 Bug #: 50481 Summary: builtin to reverse the bit order Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: middle-end AssignedTo: unassigned@gcc.gnu.org ReportedBy: marc.glisse@normalesup.org It would be useful if gcc provided a builtin to reverse the order of the bits (turn abcdefgh into hgfedcba) in objects of all sizes from a byte to an unsigned long long. According to Joseph: "Various processors have an instruction to reverse the bit order in a word (ARMv6T2 and later have RBIT, for example, and C6X has BITR on C64X and above)." This kind of bit manipulation also has various optimizations depending on the architecture (mirroring a byte can be implemented using a 64bit multiplication). It is thus well suited to a builtin with different platform-specific implementations. Such a builtin could be used for instance for Bug 50160.
next reply other threads:[~2011-09-22 10:29 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-09-22 10:33 marc.glisse at normalesup dot org [this message] 2011-09-22 15:10 ` [Bug middle-end/50481] " paolo.carlini at oracle dot com 2011-09-23 15:47 ` devel@the-user.org 2012-03-29 10:51 ` ptim034 at gmail dot com 2021-11-05 13:37 ` f.boesing at gmx dot de 2022-10-25 12:26 ` carlo at gcc dot gnu.org 2023-10-02 11:17 ` xry111 at gcc dot gnu.org 2024-05-21 15:22 ` pinskia at gcc dot gnu.org 2024-05-21 15:24 ` pinskia at gcc dot gnu.org 2024-05-21 15:29 ` pinskia at gcc dot gnu.org
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=bug-50481-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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: linkBe 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 read-only IMAP folder(s) and NNTP newsgroup(s).