From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Georg-Johann Lay <avr@gjlay.de>
Cc: gcc-patches@gcc.gnu.org, Denis Chertykov <chertykov@gmail.com>,
Anatoly Sokolov <aesok@post.ru>,
"Eric B. Weddington" <eric.weddington@atmel.com>,
Richard Henderson <rth@redhat.com>
Subject: Re: [Patch, AVR]: QI builtins for parity, popcount, 1<< n
Date: Mon, 20 Jun 2011 10:53:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1106200957250.9594@digraph.polyomino.org.uk> (raw)
In-Reply-To: <4DFB9DD9.9070700@gjlay.de>
On Fri, 17 Jun 2011, Georg-Johann Lay wrote:
> So here is my question: Would it be big deal to teach optabs to expand
> plus:di, minus:di as libcall? Maybe even compare is feasible? Like so:
I don't know what the best approach would be, but for just about any
operation supported by GCC it makes sense to support expanding it as a
libcall if that's the most efficient approach for a given target.
Some of the generic optabs code could probably do with having target hooks
added to make it work better for the less common targets. In particular,
there are hardcoded references to SImode on the basis that some libcalls
only exist for SImode and wider. Those may not be optimal for 8-bit and
16-bit targets, and certainly would be bad if any targets with bytes
wider than 8 bits (so SImode, which is always four bytes, wider than 32
bits) get added in future. Changing that might require changes to how
libgcc is built, to build extra functions, as well as to the optabs code.
(In general *any* hardcoded reference to a machine mode other than QImode
is suspect and likely to need fixing for non-8-bit-byte targets as well as
potentially being suboptimal for 8-bit and 16-bit targets. I don't know
how many different target hooks would be needed to replace such
hardcoding; that needs careful thought and a clear conceptual
understanding of the purpose of each such hardcoded mode reference.)
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2011-06-20 10:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-16 16:08 Georg-Johann Lay
2011-06-16 17:08 ` Joseph S. Myers
2011-06-17 11:04 ` Georg-Johann Lay
2011-06-17 13:06 ` Joseph S. Myers
2011-06-17 19:03 ` Georg-Johann Lay
2011-06-17 19:14 ` Georg-Johann Lay
2011-06-20 10:53 ` Joseph S. Myers [this message]
2011-06-20 14:31 ` Georg-Johann Lay
2011-06-20 15:39 ` Richard Henderson
2011-06-20 16:52 ` Georg-Johann Lay
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=Pine.LNX.4.64.1106200957250.9594@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=aesok@post.ru \
--cc=avr@gjlay.de \
--cc=chertykov@gmail.com \
--cc=eric.weddington@atmel.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rth@redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).