public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Sandiford <richard.sandiford@linaro.org>
To: Hans-Peter Nilsson <hp@bitrange.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Committed: fix PR49285, breakage building libgcc2 for MMIX
Date: Tue, 07 Jun 2011 14:24:00 -0000	[thread overview]
Message-ID: <g4aadtlnzm.fsf@linaro.org> (raw)
In-Reply-To: <alpine.BSF.2.00.1106060006270.49583@dair.pair.com> (Hans-Peter	Nilsson's message of "Mon, 6 Jun 2011 00:09:48 -0400 (EDT)")

Hans-Peter Nilsson <hp@bitrange.com> writes:
> I needed a baseline for PR48542 (problems with setjmp/longjmp), but
> building MMIX was broken on trunk.  It was "bitten" by the fixups to
> predicate matching done recentlish.  The comment above the MMIX
> truncdfsf2 expander complains about having to use an expander to
> force an operand to memory - and then goes on and uses memory_operand
> for that operand anyway!  That accidentally worked before the fixup,
> because after copying the failing operand to a new pseudo, the
> expander was called without the optabs machinery doublechecking the
> new pseudo against the predicate.  While I stand by the comment and
> still think the optabs machinery could automatically fix up operands
> as needed to force an operand into memory when the predicate says so,
> it hasn't worked like that before, and I guess it's no use adding
> something like that just for one port, where an expander will do.

FWIW, having a target-independent feature sounds like a good idea to me.
It's similar in spirit to the new code that tries to force addresses
into registers if a memory predicate rejects a mem.  That too is something
that was often handled by expanders, but which is nicer without.

The implementation could be along the same lines.  Have an allows_reg
field in recog_data that says whether the predicate allows registers.
If it doesn't, try forcing to a stack slot instead of to registers.

Richard

      reply	other threads:[~2011-06-07 14:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06  4:10 Hans-Peter Nilsson
2011-06-07 14:24 ` Richard Sandiford [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=g4aadtlnzm.fsf@linaro.org \
    --to=richard.sandiford@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hp@bitrange.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).