public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Tsukasa OI <research_trasio@irq.a4lg.com>
To: Tsukasa OI <research_trasio@irq.a4lg.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Andrew Waterman <andrew@sifive.com>,
	Jim Wilson <jim.wilson.gcc@gmail.com>,
	Nelson Chu <nelson@rivosinc.com>,
	Kito Cheng <kito.cheng@sifive.com>
Cc: binutils@sourceware.org
Subject: [PATCH 0/2] RISC-V: Add support for indirect CSR access extensions
Date: Mon, 21 Aug 2023 07:27:04 +0000	[thread overview]
Message-ID: <cover.1692602822.git.research_trasio@irq.a4lg.com> (raw)
In-Reply-To: <cover.1691721525.git.research_trasio@irq.a4lg.com>

Hello,

REVIEW ONLY v1:
<https://sourceware.org/pipermail/binutils/2023-August/128973.html>

Because the specification got stable and is approved, I once again submit
this patch set (pretty much *unchanged* from the previous one except the
commit message and the version number per the latest specification status).


This patch set implements two extensions ('Smcsrind' and 'Sscsrind') in
the Indirect CSR Access Architecture Extension specification:
<https://github.com/riscv/riscv-indirect-csr-access/releases/tag/v1.0.0-rc2>

Note that RISC-V AIA and this Indirect CSR Access specifications don't have
any strict superset or subset relations.  Instead, Indirect CSR Access is
based on a subset of RISC-V AIA but with some extensions and intentionally
designed *not* to have dependencies to AIA.

To implement those extensions (PATCH 2), new CSR handling mechanism will be
required because those CSRs are shared with RISC-V AIA ('Smaia' / 'Ssaia').

1.  miselect
2.  mireg
3.  siselect
4.  sireg
5.  vsiselect
6.  vsireg

Complex CSR handling preparation as in PATCH 1 enables separating the
"extension" variable (shared for error message) and actual checking.
It enables checking like (A && B) and (A || B).  In the PATCH 2, the author
used this mechanism to check (Smaia || Smcsrind) and (Ssaia || Sscsrind).

This approach should work until a kind of combinatorial explosion happens.

Thanks,
Tsukasa




Tsukasa OI (2):
  RISC-V: Add complex CSR error handling
  RISC-V: Add indirect CSR Access Extensions and its CSRs

 bfd/elfxx-riscv.c                           |   4 +
 gas/config/tc-riscv.c                       |  38 ++++++-
 gas/testsuite/gas/riscv/csr-dw-regnums.d    |  15 +++
 gas/testsuite/gas/riscv/csr-dw-regnums.s    |  17 ++++
 gas/testsuite/gas/riscv/csr-version-1p10.d  |  30 ++++++
 gas/testsuite/gas/riscv/csr-version-1p10.l  | 104 +++++++++++++++++---
 gas/testsuite/gas/riscv/csr-version-1p11.d  |  30 ++++++
 gas/testsuite/gas/riscv/csr-version-1p11.l  | 104 +++++++++++++++++---
 gas/testsuite/gas/riscv/csr-version-1p12.d  |  30 ++++++
 gas/testsuite/gas/riscv/csr-version-1p12.l  | 104 +++++++++++++++++---
 gas/testsuite/gas/riscv/csr-version-1p9p1.d |  30 ++++++
 gas/testsuite/gas/riscv/csr-version-1p9p1.l | 104 +++++++++++++++++---
 gas/testsuite/gas/riscv/csr.s               |  19 ++++
 include/opcode/riscv-opc.h                  |  46 +++++++--
 14 files changed, 619 insertions(+), 56 deletions(-)


base-commit: 29c0e7512493aa6cdd713024909c352964fe1b1a
-- 
2.41.0


  parent reply	other threads:[~2023-08-21  7:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11  2:39 [REVIEW ONLY 0/2] UNRATIFIED " Tsukasa OI
2023-08-11  2:39 ` [REVIEW ONLY 1/2] RISC-V: Add complex CSR error handling Tsukasa OI
2023-08-11  2:39 ` [REVIEW ONLY 2/2] UNRATIFIED RISC-V: Add indirect CSR Access Extensions and its CSRs Tsukasa OI
2023-08-21  7:27 ` Tsukasa OI [this message]
2023-08-21  7:27   ` [PATCH 1/2] RISC-V: Add complex CSR error handling Tsukasa OI
2023-08-21  7:27   ` [PATCH 2/2] RISC-V: Add indirect CSR Access Extensions and its CSRs Tsukasa OI
2023-08-24  1:28     ` Nelson Chu

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=cover.1692602822.git.research_trasio@irq.a4lg.com \
    --to=research_trasio@irq.a4lg.com \
    --cc=andrew@sifive.com \
    --cc=binutils@sourceware.org \
    --cc=jim.wilson.gcc@gmail.com \
    --cc=kito.cheng@sifive.com \
    --cc=nelson@rivosinc.com \
    --cc=palmer@dabbelt.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).