[REVIEW,ONLY,v2,0/1] UNRATIFIED RISC-V: Add support for Core-Local Interrupt Controller (CLIC) extensions and their CSRs

Message ID cover.1694482743.git.research_trasio@irq.a4lg.com
Headers
Series UNRATIFIED RISC-V: Add support for Core-Local Interrupt Controller (CLIC) extensions and their CSRs |

Message

Tsukasa OI Sept. 12, 2023, 1:39 a.m. UTC
  *** WAIT FOR SPECIFICATION FREEZE ***
This is an implementation for unratified and not frozen RISC-V extension
and not intended to be merged for now.
The only intent to submit this patchset is to test new instructions for
your (possibly virtual) environment and early review for fast adoption
after ratification.

It's long since I submitted the previous version and it's a good time to
submit new REVIEW ONLY one, knowing if it's unratified.


Changes: v1 -> v2
*   Rebased against the latest master.
*   Added support for 'Smclicconfig', 'Smclicshv' and 'Ssclic' extensions
    (following the latest CLIC specification).
*   Added diagnostics-only support for the 'Suclic' extension (likewise).


This patchset adds following unratified extensions to GNU Binutils from the
Core-Local Interrupt Controller (CLIC) RISC-V Privileged Architecture
Extensions:

1.  'Smclic'
2.  'Smclicconfig'
3.  'Smclicshv'
4.  'Ssclic'
5.  'Suclic'
    (because 'N' extension support is now dropped by GNU Binutils,
     this extension is only supported to generate correct diagnostics
     that's why this extension is *not* in riscv_supported_std_s_ext).

that add 18 CSRs in total.

These extensions are software side of Core-Local Interrupt Controller (CLIC)
which provides lower latency local interrupts.


This is based on the specification document, version 0.9-draft:
<https://github.com/riscv/riscv-fast-interrupt/blob/894a16ce89dcf2c084dd951866448c2e756d3efa/clic.pdf>


Although that 18 CSRs are assigned with actual numbers (this is why I'm not
attaching "CSR instantiation" script in this patchset), it may be changed
before ratification.  Be careful.

Thanks,
Tsukasa




Tsukasa OI (1):
  UNRATIFIED RISC-V: Add CLIC extensions with CSRs

 bfd/elfxx-riscv.c                           | 10 ++-
 gas/config/tc-riscv.c                       | 12 ++++
 gas/testsuite/gas/riscv/csr-dw-regnums.d    | 17 +++++
 gas/testsuite/gas/riscv/csr-dw-regnums.s    | 18 +++++
 gas/testsuite/gas/riscv/csr-version-1p10.d  | 34 ++++++++++
 gas/testsuite/gas/riscv/csr-version-1p10.l  | 74 +++++++++++++++++++++
 gas/testsuite/gas/riscv/csr-version-1p11.d  | 34 ++++++++++
 gas/testsuite/gas/riscv/csr-version-1p11.l  | 74 +++++++++++++++++++++
 gas/testsuite/gas/riscv/csr-version-1p12.d  | 34 ++++++++++
 gas/testsuite/gas/riscv/csr-version-1p12.l  | 74 +++++++++++++++++++++
 gas/testsuite/gas/riscv/csr-version-1p9p1.d | 34 ++++++++++
 gas/testsuite/gas/riscv/csr-version-1p9p1.l | 74 +++++++++++++++++++++
 gas/testsuite/gas/riscv/csr.s               | 19 ++++++
 include/opcode/riscv-opc.h                  | 36 ++++++++++
 14 files changed, 543 insertions(+), 1 deletion(-)


base-commit: 318d3bda5cad124bd11eebb0349d0f183ba625b1