public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Richard Biener <rguenther@suse.de>,
	Jiufu Guo <guojiufu@linux.ibm.com>,
	gcc-patches@gcc.gnu.org, dje.gcc@gmail.com, linkw@gcc.gnu.org,
	bergner@linux.ibm.com, richard.sandiford@arm.com,
	jeffreyalaw@gmail.com
Subject: Re: [PATCH] rs6000: replace '(const_int 0)' to 'unspec:BLK [(const_int 0)]' for stack_tie
Date: Wed, 14 Jun 2023 12:03:53 -0500	[thread overview]
Message-ID: <20230614170353.GC19790@gate.crashing.org> (raw)
In-Reply-To: <DFAECB77-037A-496B-806D-84369AB93266@gmail.com>

On Wed, Jun 14, 2023 at 06:25:10PM +0200, Richard Biener wrote:
> > Form rs6000.md:
> > ; This is to explain that changes to the stack pointer should
> > ; not be moved over loads from or stores to stack memory.
> > (define_insn "stack_tie"
> 
> That suggests it’s the hard register value that‘s protected, not the memory pointed to.  I suppose that means an unspec volatile with the reg as input would serve the same?

No?  It says what it says.  That is pretty vague language, of course,
not entirely by accident no doubt.

> Or maybe that’s not the whole story.
> 
> 
> > and from rs6000-logue.cc:
> > /* This ties together stack memory (MEM with an alias set of frame_alias_set)
> >   and the change to the stack pointer.  */
> > static void
> > rs6000_emit_stack_tie (rtx fp, bool hard_frame_needed)
> 
> I cannot make sense of that comment, but not sure if I really want to know …

It really is the same thing: this is a bloody heavy hammer keeping the
change to the stack pointer (or "hard" frame pointer) in place wrt any
accesses to the stack memory.

If there was a nice portable way to avoid needing this we haven't found
it yet -- or a non-portable way even, and it doesn't have to be all that
nice either come to think of it :-)


Segher

  reply	other threads:[~2023-06-14 17:04 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 12:23 Jiufu Guo
2023-06-13 12:48 ` Xi Ruoyao
2023-06-14  1:55   ` Jiufu Guo
2023-06-14  9:18     ` Xi Ruoyao
2023-06-14 15:05       ` Segher Boessenkool
2023-06-15  7:59         ` Jiufu Guo
2023-06-13 18:33 ` Segher Boessenkool
2023-06-14  4:06   ` Jiufu Guo
2023-06-14  7:59     ` Richard Biener
2023-06-14  9:04       ` Richard Sandiford
2023-06-14  9:22         ` Richard Biener
2023-06-14  9:43           ` Richard Sandiford
2023-06-14  9:52             ` Richard Biener
2023-06-14 10:02               ` Richard Sandiford
2023-06-14 16:08               ` Segher Boessenkool
2023-06-14 16:32           ` Segher Boessenkool
2023-06-14  9:29         ` Jiufu Guo
2023-06-14 16:38         ` Segher Boessenkool
2023-06-14  9:26       ` Jiufu Guo
2023-06-14 15:45         ` Segher Boessenkool
2023-06-14 15:38       ` Segher Boessenkool
2023-06-14 16:25         ` Richard Biener
2023-06-14 17:03           ` Segher Boessenkool [this message]
2023-06-14 15:15     ` Segher Boessenkool
2023-06-15  7:00       ` Jiufu Guo
2023-06-15 16:30         ` Segher Boessenkool
2023-06-16  2:24           ` Jiufu Guo
  -- strict thread matches above, loose matches on Subject: below --
2023-06-12 13:19 Jiufu Guo
2023-06-13  0:24 ` David Edelsohn
2023-06-13  2:15   ` Jiufu Guo
2023-06-13 18:14     ` Segher Boessenkool
2023-06-13 18:59       ` David Edelsohn
2023-06-14  3:00         ` Jiufu Guo

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=20230614170353.GC19790@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=guojiufu@linux.ibm.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=linkw@gcc.gnu.org \
    --cc=rguenther@suse.de \
    --cc=richard.guenther@gmail.com \
    --cc=richard.sandiford@arm.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).