public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [REVIEW ONLY 0/2] UNRATIFIED RISC-V: Add support for indirect CSR access extensions
@ 2023-08-11  2:39 Tsukasa OI
  2023-08-11  2:39 ` [REVIEW ONLY 1/2] RISC-V: Add complex CSR error handling Tsukasa OI
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tsukasa OI @ 2023-08-11  2:39 UTC (permalink / raw)
  To: Tsukasa OI, Palmer Dabbelt, Andrew Waterman, Jim Wilson,
	Nelson Chu, Kito Cheng
  Cc: binutils

Hello,

This patch set demonstrates two extensions ('Smcsrind' and 'Sscsrind') in
the Indirect CSR Access Architecture Extension specification:
<https://docs.google.com/document/d/1ZxTSUWX_9_VafWeA0l1ci9RFjmivLuZn-US9IbFOEWY>

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.

PATCH 1 may be merged without PATCH 2 but since PATCH 2 contains two
unratified extensions, this patch set as whole is considered RFC.

Thanks,
Tsukasa




Tsukasa OI (2):
  RISC-V: Add complex CSR error handling
  UNRATIFIED 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: 5b576ed1434dfe9d80b7f0a4490c9faca94c0ed0
-- 
2.41.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-08-24  1:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-11  2:39 [REVIEW ONLY 0/2] UNRATIFIED RISC-V: Add support for indirect CSR access extensions 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 ` [PATCH 0/2] RISC-V: Add support for indirect CSR access extensions Tsukasa OI
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

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).