public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "david.meggy at icron dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/50110] Endian reversal when adding extzv instruction Date: Tue, 10 Jan 2012 19:16:00 -0000 [thread overview] Message-ID: <bug-50110-4-CuPTn49BKr@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-50110-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50110 David Meggy <david.meggy at icron dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID --- Comment #5 from David Meggy <david.meggy at icron dot com> 2012-01-10 19:16:15 UTC --- Let me sum up this bug. It boiled down to a misunderstanding of how bit field extract works on a big endian processor (I don't know if anyone else has implemented this on a big endian processor). Since we have implemented the starting bit in our hardware from the least significant bit, I've just modified the output instruction to change the start bit to the least significant bit. (define_insn "extzvsi" [(set (match_operand:SI 0 "register_operand" "=r") (zero_extract:SI (match_operand:SI 1 "register_operand" "r") (match_operand 2 "const_int_operand" "") (match_operand 3 "const_int_operand" "")))] "" "ext\t%1,%2,32 - %2 - %3,%0" ) This works quite well for us, and is giving us the code space savings we were looking for, an ~1% code space reduction. Not bad for a tiny GCC patch, tiny binutils patch, and a minor CPU opcode addition. This bug can be closed. Marking as RESOLVED - INVALID, as it isn't a real bug, but a documentation misunderstanding
prev parent reply other threads:[~2012-01-10 19:16 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-08-17 19:17 [Bug rtl-optimization/50110] New: " david.meggy at icron dot com 2011-08-17 19:23 ` [Bug rtl-optimization/50110] " david.meggy at icron dot com 2011-08-17 19:32 ` pinskia at gcc dot gnu.org 2011-08-17 20:35 ` david.meggy at icron dot com 2011-08-18 2:24 ` david.meggy at icron dot com 2012-01-10 19:16 ` david.meggy at icron dot com [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=bug-50110-4-CuPTn49BKr@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).