public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jeff Law <jeffreyalaw@gmail.com>
Cc: stefan@franke.ms, gcc-help@gcc.gnu.org
Subject: Re: setmemsi, movmemsi and post_inc
Date: Fri, 26 Mar 2021 17:32:52 -0500	[thread overview]
Message-ID: <20210326223252.GL16691@gate.crashing.org> (raw)
In-Reply-To: <20210326221530.GK16691@gate.crashing.org>

On Fri, Mar 26, 2021 at 05:15:30PM -0500, Segher Boessenkool wrote:
> On Thu, Mar 25, 2021 at 08:44:07AM -0600, Jeff Law via Gcc-help wrote:
> > I'm also not aware of a target where an autoinc happens in contexts 
> > other than in a MEM.
> 
> See arm's "lazy_load_multiple_insn" for example.  Well it looks like
> this is the only example in the current compiler :-)

And I'm not sure how it is supposed to work even?  Without an enclosing
mem, it isn't clear to increment by how much?

In that arm example there is another parallel arm that *does* have a
mem with that same operand as address, but that looks to tricky to
work reliably.

rtl.def says

/* These unary operations are used to represent incrementation
   and decrementation as they occur in memory addresses.
   The amount of increment or decrement are not represented
   because they can be understood from the machine-mode of the
   containing MEM.  These operations exist in only two cases:
   1. pushes onto the stack.
   2. created automatically by the auto-inc-dec pass.  */
DEF_RTL_EXPR(PRE_DEC, "pre_dec", "e", RTX_AUTOINC)
DEF_RTL_EXPR(PRE_INC, "pre_inc", "e", RTX_AUTOINC)
DEF_RTL_EXPR(POST_DEC, "post_dec", "e", RTX_AUTOINC)
DEF_RTL_EXPR(POST_INC, "post_inc", "e", RTX_AUTOINC)


Segher

  reply	other threads:[~2021-03-26 22:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 14:21 Stefan Franke
2021-03-25 14:44 ` Jeff Law
     [not found]   ` <011601d72186$41fad1d0$c5f07570$@franke.ms>
     [not found]     ` <ab775f47-3181-a4b7-aecb-b82c6bf52e5b@gmail.com>
2021-03-25 20:16       ` AW: AW: " Stefan Franke
2021-03-26  1:25         ` Jeff Law
2021-03-26  6:47           ` AW: " Stefan Franke
2021-03-26 14:08             ` Jeff Law
2021-03-26 14:33               ` AW: " Stefan Franke
     [not found]       ` <013901d721b3$cc9cce10$65d66a30$@franke.ms>
2021-03-28 11:58         ` Stefan Franke
2021-03-26 22:15   ` Segher Boessenkool
2021-03-26 22:32     ` Segher Boessenkool [this message]
2021-03-26 22:09 ` Segher Boessenkool
2021-03-27  7:42   ` AW: " Stefan Franke

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=20210326223252.GL16691@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=stefan@franke.ms \
    /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).