[PATCH 0/6] RISC-V: Add Privileged Arch 1.12 and More CSRs

Tsukasa OI research_trasio@irq.a4lg.com
Tue Jan 11 10:59:12 GMT 2022


This patchset adds new CSRs with corresponding extensions:

-   Privileged Architecture, version 1.12
-   Smstateen (State Enable Extension)
-   Sscofpmf (Count Overflow and Mode-Based Filtering Extension)
-   Sstc ("stimecmp / vstimecmp" Extension)

It excludes new "mscontext" and moved "scontext" registers because it's
a part of unratified Debug Specification, version 1.0.

This patchset also reorganizes csr-dw-regnums.[sd] to test all CSRs as
tested on csr.s with the same order.


[Privileged Architecture versions on CSRs]

-   Privileged Architecture, version 1.12
    1.12
-   Smstateen
    1.12 (hypervisor), 1.9.1 (others)
    It seems base portions of Smstateen extension is independent from
    privileged architecture and set to oldest supported version
    (except hypervisor-related CSRs that require version 1.12).
-   Sscofpmf / Sstc
    1.12 (hypervisor), 1.11 (others)
    Because those specifications are written as deltas from the Privileged
    Architecture, version 1.11 and 1.12, base version is set to 1.11
    (tentatively). It could be a bit older than that but can be discussed.




Tsukasa OI (6):
  RISC-V: Reorganize testcases for CFI directives
  RISC-V: Add Privileged Architecture 1.12 CSRs
  RISC-V: Add Privileged Arch 1.12 CSR testcases
  RISC-V: Add 'Smstateen' extension and its CSRs
  RISC-V: Add 'Sscofpmf' extension with its CSRs
  RISC-V: Add 'Sstc' extension and its CSRs

 bfd/elfxx-riscv.c                           |   3 +
 gas/config/tc-riscv.c                       |  24 ++
 gas/testsuite/gas/riscv/csr-dw-regnums.d    | 171 +++++++++-
 gas/testsuite/gas/riscv/csr-dw-regnums.s    | 177 +++++++++-
 gas/testsuite/gas/riscv/csr-version-1p10.d  | 246 ++++++++++++++
 gas/testsuite/gas/riscv/csr-version-1p10.l  | 350 ++++++++++++++++++++
 gas/testsuite/gas/riscv/csr-version-1p11.d  | 246 ++++++++++++++
 gas/testsuite/gas/riscv/csr-version-1p11.l  | 286 ++++++++++++++++
 gas/testsuite/gas/riscv/csr-version-1p12.d  | 246 ++++++++++++++
 gas/testsuite/gas/riscv/csr-version-1p12.l  | 128 +++++++
 gas/testsuite/gas/riscv/csr-version-1p9p1.d | 246 ++++++++++++++
 gas/testsuite/gas/riscv/csr-version-1p9p1.l | 350 ++++++++++++++++++++
 gas/testsuite/gas/riscv/csr.s               | 129 ++++++++
 include/opcode/riscv-opc.h                  | 252 ++++++++++++++
 14 files changed, 2841 insertions(+), 13 deletions(-)


base-commit: 9ed5be5650ba7c315cd7cfacccc9208de2f555df
-- 
2.32.0



More information about the Binutils mailing list