public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: avr@gjlay.de (Georg-Johann Lay)
Cc: gcc@gcc.gnu.org
Subject: Re: [named address] ice-on-valid: in postreload.c:reload_cse_simplify_operands
Date: Thu, 18 Aug 2011 14:38:00 -0000	[thread overview]
Message-ID: <201108181437.p7IEbixY006516@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <4E4BFDB2.7080009@gjlay.de> from "Georg-Johann Lay" at Aug 17, 2011 07:43:14 PM

Georg-Johann Lay wrote:

> http://gcc.gnu.org/ml/gcc/2011-08/msg00131.html
>
> Are you going to install that patch? Or maybe you already installed it?

No, it isn't approved yet (in fact, it isn't even posted for approval).
Usually, patches that add new target macros, or new arguments to target
macros, but do not actually add any *exploiter* of the new features,
are frowned upon ...

Thus, I'd prefer to wait until you have patch ready that exploits this
in the AVR backend, and then submit the whole series.

> Then, I wonder how the following named AS code translates:
> 
> int a = *((__as int*) 1000);
> 
> As const_int don't have a machmode (yet), I guess the above line just 
> reads from generic AS and reading from a specific address from named AS 
> cannot work.

This should work fine.  Address space processing doesn't really depend
on the machine mode; the address space is annotated to the MEM RTX
directly.  Code like the above ought to generate a MEM with either
an immediate CONST_INT operand or one with the immediate loaded into
a register, depending on what the target supports, but in either case
the MEM_ADDR_SPACE will be set correctly.  It's then up the target to
implement the access as appropriate.

> Moreover, INDEX_REG_CLASS, REGNO_OK_FOR_INDEX_P, HAVE_PRE_INCREMENT et 
> al. and maybe others are AS-dependent.

I agree for INDEX_REG_CLASS and REGNO_OK_FOR_INDEX_P.  In fact, I'd
suggest they should first be converted to look similar to base registers
(i.e. add MODE_CODE_INDEX_REG_CLASS and REGNO_MODE_CODE_OK_FOR_INDEX_P)
and then add address space support to those extended macros, so as to
avoid having to change lots of back-ends.   Do you need this for AVR?
I could add that to the patch I posted previously ...

Now for HAVE_PRE_INCREMENT, I don't think we need anything special.
This is used just as a short-cut to bypass pre-increment handling
completely on targets that don't support it at all.  On targets
that *do*, there will always be additional requirement on just
which memory accesses support pre-increment.  Therefore, the
middle-end will still always check the target's legitimate_address
callback to ensure any particular pre-incremented memory access
is actually valid.  This mechanism can already look at the address
space to make its decision ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

  reply	other threads:[~2011-08-18 14:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-04 13:43 Georg-Johann Lay
2011-08-04 16:20 ` Ulrich Weigand
2011-08-04 16:26   ` DJ Delorie
2011-08-04 16:33     ` Ulrich Weigand
2011-08-04 17:28   ` Georg-Johann Lay
2011-08-05 10:19     ` Ulrich Weigand
2011-08-05 12:47       ` Georg-Johann Lay
2011-08-05 13:24         ` Ulrich Weigand
2011-08-05 14:09           ` Michael Matz
2011-08-05 14:29             ` Ulrich Weigand
2011-08-05 20:43     ` Ulrich Weigand
2011-08-05 20:47       ` DJ Delorie
2011-08-05 21:01         ` Ulrich Weigand
2011-08-05 21:08           ` DJ Delorie
2011-08-08 11:38       ` Georg-Johann Lay
2011-08-09 17:16         ` Ulrich Weigand
2011-08-10 14:04           ` Georg-Johann Lay
2011-08-17 17:44             ` Georg-Johann Lay
2011-08-18 14:38               ` Ulrich Weigand [this message]
2011-08-21 16:43                 ` Georg-Johann Lay
2011-08-22 12:39                   ` Ulrich Weigand

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=201108181437.p7IEbixY006516@d06av02.portsmouth.uk.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=avr@gjlay.de \
    --cc=gcc@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: 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).