public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Andrew Waterman <andrew@sifive.com>
Cc: Palmer Dabbelt <palmer@rivosinc.com>,
	 Kito Cheng <kito.cheng@gmail.com>,
	 gcc-patches@gcc.gnu.org,  Greg Favor <gfavor@ventanamicro.com>
Subject: Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate
Date: Sat, 17 Dec 2022 11:21:51 +0100	[thread overview]
Message-ID: <87mt7mpby8.fsf@linux-m68k.org> (raw)
In-Reply-To: <CA++6G0BU+mmUzQ8vETwjKWoq=ogAHCDSe=iZhfU3FgnVvujE_w@mail.gmail.com> (Andrew Waterman's message of "Sat, 17 Dec 2022 02:16:08 -0800")

On Dez 17 2022, Andrew Waterman wrote:

> On Sat, Dec 17, 2022 at 2:10 AM Andreas Schwab <schwab@linux-m68k.org> wrote:
>>
>> On Dez 17 2022, Andrew Waterman wrote:
>>
>> > It took me a few minutes to understand the purpose of this chicanery, but
>> > there's indeed a contradiction in the ISA spec.  HINT instructions _do_
>> > affect architectural state in a limited fashion--namely, updating the PC.
>>
>> How can an insn _not_ affect the PC? (Other than the trivial infinite
>> loop.)
>
> Heh, yeah, that's roughly what I meant by "common-sense reading" (and
> that's my rationale for simply clarifying the spec and nuking this
> Xgnuzihintpausestate extension).

My point is that the implicit update of the PC cannot be part of the
architectural state in the first place.  Even the trivial infinite loop
has this, before the actual state change (setting PC back) is performed.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

  reply	other threads:[~2022-12-17 10:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18  4:27 Palmer Dabbelt
2022-11-18  6:59 ` Kito Cheng
2022-11-18 17:01   ` Palmer Dabbelt
2022-11-28 18:45     ` Palmer Dabbelt
2022-12-16 16:48       ` Palmer Dabbelt
2022-12-17  9:40         ` Andrew Waterman
2022-12-17 10:10           ` Andreas Schwab
2022-12-17 10:16             ` Andrew Waterman
2022-12-17 10:21               ` Andreas Schwab [this message]
2022-12-17 10:39                 ` Andrew Waterman

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=87mt7mpby8.fsf@linux-m68k.org \
    --to=schwab@linux-m68k.org \
    --cc=andrew@sifive.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gfavor@ventanamicro.com \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@rivosinc.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).