public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
To: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: YunQiang Su <yunqiang.su@cipunited.com>,
	 Richard Sandiford <richard.sandiford@arm.com>,
	gcc-patches@gcc.gnu.org,  YunQiang Su <syq@debian.org>
Subject: Re: [PATCH v2] MIPS: add speculation_barrier support
Date: Sun, 7 May 2023 20:16:13 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2305072001480.54316@angie.orcam.me.uk> (raw)
In-Reply-To: <EC557C8F-4487-456F-9BD1-ACE9EBB7453A@flygoat.com>

On Sun, 7 May 2023, Jiaxun Yang wrote:

> > Both EHB and J[AL]R.HB are backwards compatible however (except for an 
> > obscure 4Kc J[AL]R.HB erratum I came across once and which may be no 
> > longer relevant), so I think the legacy sequence ought to just return via 
> > JR.HB as well, therefore providing the required semantics with newer 
> > hardware.  If it does trap for 4Kc, then the OS can emulate it (and we can 
> > ignore it for bare metal, deferring to whoever might be interested for a 
> > workaround).
> 
> Hmm, I just checked MIPS-IV manual, it seems like HB bit (bit 10) is defined as
> zero for both JR and JALR.
> 
> Is it actually omitted in implementation?

 What has become the hint field was supposed not to be decoded in earlier 
silicon, which is why such encodings were chosen for JR.HB and JALR.HB.  
I was told it was actually verified across existing silicon at the time 
the instructions were being defined with MIPSr1 (i.e. when the hint field 
was added to the ISA).  The issue with the 4Kc was an unfortunate mistake.

 Many instructions are not fully decoded causing encoding aliases, MFHI, 
etc. comes to mind.

  Maciej

  reply	other threads:[~2023-05-07 19:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28 12:33 [PATCH] " YunQiang Su
2023-04-28 12:36 ` Jiaxun Yang
2023-04-28 13:07   ` YunQiang Su
2023-04-28 13:12 ` [PATCH v2] " YunQiang Su
2023-05-03 18:29   ` Richard Sandiford
2023-05-03 21:04     ` Maciej W. Rozycki
2023-05-03 22:12       ` Jiaxun Yang
2023-05-07 17:34         ` Maciej W. Rozycki
2023-05-07 18:47           ` Jiaxun Yang
2023-05-07 19:16             ` Maciej W. Rozycki [this message]
2023-05-12 10:03   ` [PATCH v3] " YunQiang Su
2023-05-12 10:30     ` [PATCH v4] " YunQiang Su
2023-05-31  9:43       ` YunQiang Su
2023-05-31 10:35         ` Maciej W. Rozycki
2023-06-01  4:26           ` [PATCH v5] MIPS: Add " YunQiang Su
2023-06-08 12:35             ` Richard Earnshaw (lists)
2023-06-16  7:53               ` YunQiang Su
2023-06-16  8:38                 ` Xi Ruoyao

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=alpine.DEB.2.21.2305072001480.54316@angie.orcam.me.uk \
    --to=macro@orcam.me.uk \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=richard.sandiford@arm.com \
    --cc=syq@debian.org \
    --cc=yunqiang.su@cipunited.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).