RISC-V: Add 'Sscofpmf' extension with its CSRs
authorTsukasa OI <research_trasio@irq.a4lg.com>
Fri, 24 Jun 2022 02:51:55 +0000 (11:51 +0900)
committerNelson Chu <nelson.chu@sifive.com>
Tue, 28 Jun 2022 01:08:06 +0000 (09:08 +0800)
commit713f370809b523277f8ecc69680ab591ce94da5e
treee2793913827eeee23319a9683ea1ead5f1a553cb
parent6af47b081ec0e93ad1d79c47a7f093db88f7653d
RISC-V: Add 'Sscofpmf' extension with its CSRs

This commit adds Count Overflow and Mode-Based Filtering Extension
(Sscofpmf) and its CSRs.

bfd/ChangeLog:

* elfxx-riscv.c (riscv_supported_std_s_ext): Add 'Sscofpmf'
extension to valid 'S' extension list.

gas/ChangeLog:

* config/tc-riscv.c (enum riscv_csr_class): Add CSR classes for
'Sscofpmf' extension. (riscv_csr_address): Add handling for new
CSR classes.
* testsuite/gas/riscv/csr-dw-regnums.s: Add new CSRs.
* testsuite/gas/riscv/csr-dw-regnums.d: Likewise.
* testsuite/gas/riscv/csr.s: Add new CSRs.
* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.
* testsuite/gas/riscv/csr-version-1p10.d: Likewise.
* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
* testsuite/gas/riscv/csr-version-1p11.d: Likewise.
* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
* testsuite/gas/riscv/csr-version-1p12.d: Likewise.
* testsuite/gas/riscv/csr-version-1p12.l: Likewise.

include/ChangeLog:

* opcode/riscv-opc.h (CSR_SCOUNTOVF, CSR_MHPMEVENT3H,
CSR_MHPMEVENT4H, CSR_MHPMEVENT5H, CSR_MHPMEVENT6H,
CSR_MHPMEVENT7H, CSR_MHPMEVENT8H, CSR_MHPMEVENT9H,
CSR_MHPMEVENT10H, CSR_MHPMEVENT11H, CSR_MHPMEVENT12H,
CSR_MHPMEVENT13H, CSR_MHPMEVENT14H, CSR_MHPMEVENT15H,
CSR_MHPMEVENT16H, CSR_MHPMEVENT17H, CSR_MHPMEVENT18H,
CSR_MHPMEVENT19H, CSR_MHPMEVENT20H, CSR_MHPMEVENT21H,
CSR_MHPMEVENT22H, CSR_MHPMEVENT23H, CSR_MHPMEVENT24H,
CSR_MHPMEVENT25H, CSR_MHPMEVENT26H, CSR_MHPMEVENT27H,
CSR_MHPMEVENT28H, CSR_MHPMEVENT29H, CSR_MHPMEVENT30H,
CSR_MHPMEVENT31H): New CSR macros.
14 files changed:
bfd/elfxx-riscv.c
gas/config/tc-riscv.c
gas/testsuite/gas/riscv/csr-dw-regnums.d
gas/testsuite/gas/riscv/csr-dw-regnums.s
gas/testsuite/gas/riscv/csr-version-1p10.d
gas/testsuite/gas/riscv/csr-version-1p10.l
gas/testsuite/gas/riscv/csr-version-1p11.d
gas/testsuite/gas/riscv/csr-version-1p11.l
gas/testsuite/gas/riscv/csr-version-1p12.d
gas/testsuite/gas/riscv/csr-version-1p12.l
gas/testsuite/gas/riscv/csr-version-1p9p1.d
gas/testsuite/gas/riscv/csr-version-1p9p1.l
gas/testsuite/gas/riscv/csr.s
include/opcode/riscv-opc.h