diff options
author | Jiawei <jiawei@iscas.ac.cn> | 2024-06-11 21:59:00 +0800 |
---|---|---|
committer | Nelson Chu <nelson@rivosinc.com> | 2024-06-12 08:47:19 +0800 |
commit | b7641ae1afaa39e31e70114f0ee9a295820709aa (patch) | |
tree | e01560828128115c52b90614ef7cf0e60a34d446 | |
parent | a3d147a45447c4431ea66dd37911ac9415cb4fd8 (diff) | |
download | gdb-b7641ae1afaa39e31e70114f0ee9a295820709aa.zip gdb-b7641ae1afaa39e31e70114f0ee9a295820709aa.tar.gz gdb-b7641ae1afaa39e31e70114f0ee9a295820709aa.tar.bz2 |
RISC-V: Support S[sm]csrind extension csrs.
This patch supports RISC-V Smcsrind/Sscsrind privilege extension csrs.
Reuse csr 'smselect/siselect', 'mireg/sireg' and 'vsiselect,vsireg' csrs
in Smaia/Ssaia extension.
bfd/ChangeLog:
* elfxx-riscv.c: New extensions.
gas/ChangeLog:
* NEWS: Updated.
* config/tc-riscv.c (enum riscv_csr_class): New extensions.
(riscv_csr_address): Ditto.
* testsuite/gas/riscv/csr-version-1p10.d: New csrs.
* testsuite/gas/riscv/csr-version-1p10.l: Ditto.
* testsuite/gas/riscv/csr-version-1p11.d: Ditto.
* testsuite/gas/riscv/csr-version-1p11.l: Ditto.
* testsuite/gas/riscv/csr-version-1p12.d: Ditto.
* testsuite/gas/riscv/csr-version-1p12.l: Ditto.
* testsuite/gas/riscv/csr.s: Ditto.
* testsuite/gas/riscv/march-help.l: New extensions.
include/ChangeLog:
* opcode/riscv-opc.h (CSR_MIREG2): New csr.
(CSR_MIREG3): Ditto.
(CSR_MIREG4): Ditto.
(CSR_MIREG5): Ditto.
(CSR_MIREG6): Ditto.
(CSR_SIREG2): Ditto.
(CSR_SIREG3): Ditto.
(CSR_SIREG4): Ditto.
(CSR_SIREG5): Ditto.
(CSR_SIREG6): Ditto.
(CSR_VSIREG2): Ditto.
(CSR_VSIREG3): Ditto.
(CSR_VSIREG4): Ditto.
(CSR_VSIREG5): Ditto.
(CSR_VSIREG6): Ditto.
(DECLARE_CSR): Ditto.
-rw-r--r-- | bfd/elfxx-riscv.c | 4 | ||||
-rw-r--r-- | gas/NEWS | 2 | ||||
-rw-r--r-- | gas/config/tc-riscv.c | 22 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/csr-version-1p10.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/csr-version-1p10.l | 136 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/csr-version-1p11.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/csr-version-1p11.l | 136 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/csr-version-1p12.d | 42 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/csr-version-1p12.l | 136 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/csr.s | 25 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/march-help.l | 2 | ||||
-rw-r--r-- | include/opcode/riscv-opc.h | 46 |
12 files changed, 593 insertions, 42 deletions
diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index 1fe7e5d..297d565 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -1273,10 +1273,12 @@ static struct riscv_implicit_subset riscv_implicit_subsets[] = {"zcb", "zca", check_implicit_always}, {"zcmp", "zca", check_implicit_always}, {"smaia", "ssaia", check_implicit_always}, + {"smscrind", "sscsrind", check_implicit_always}, {"smcntrpmf", "zicsr", check_implicit_always}, {"smstateen", "ssstateen", check_implicit_always}, {"smepmp", "zicsr", check_implicit_always}, {"ssaia", "zicsr", check_implicit_always}, + {"sscsrind", "zicsr", check_implicit_always}, {"sscofpmf", "zicsr", check_implicit_always}, {"ssstateen", "zicsr", check_implicit_always}, {"sstc", "zicsr", check_implicit_always}, @@ -1438,10 +1440,12 @@ static struct riscv_supported_ext riscv_supported_std_z_ext[] = static struct riscv_supported_ext riscv_supported_std_s_ext[] = { {"smaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, + {"smcsrind", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"smcntrpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"smepmp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"smstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"ssaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, + {"sscsrind", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"sscofpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"ssstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {"sstc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, @@ -27,6 +27,8 @@ * Add support for RISC-V Zvfbfwma extension with version 1.0. +* Add support for RISC-V Smcsrind/Sscsrind extension with version 1.0. + * The base register operand in D(X,B) and D(L,B) may be explicitly omitted in assembly on s390. It can now be coded as D(X,) or D(L,) instead of D(X,0) D(X,%r0), D(L,0), and D(L,%r0). diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index ccc073a..e008370 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -77,6 +77,8 @@ enum riscv_csr_class CSR_CLASS_H_32, /* hypervisor, rv32 only */ CSR_CLASS_SMAIA, /* Smaia */ CSR_CLASS_SMAIA_32, /* Smaia, rv32 only */ + CSR_CLASS_SMAIA_OR_SMCSRIND, /* Smaia/Smcsrind */ + CSR_CLASS_SMCSRIND, /* Smcsrind */ CSR_CLASS_SMCNTRPMF, /* Smcntrpmf */ CSR_CLASS_SMCNTRPMF_32, /* Smcntrpmf, rv32 only */ CSR_CLASS_SMSTATEEN, /* Smstateen only */ @@ -85,6 +87,10 @@ enum riscv_csr_class CSR_CLASS_SSAIA_AND_H, /* Ssaia with H */ CSR_CLASS_SSAIA_32, /* Ssaia, rv32 only */ CSR_CLASS_SSAIA_AND_H_32, /* Ssaia with H, rv32 only */ + CSR_CLASS_SSAIA_OR_SSCSRIND, /* Ssaia/Smcsrind */ + CSR_CLASS_SSAIA_OR_SSCSRIND_AND_H, /* Ssaia/Smcsrind with H */ + CSR_CLASS_SSCSRIND, /* Sscsrind */ + CSR_CLASS_SSCSRIND_AND_H, /* Sscsrind with H */ CSR_CLASS_SSSTATEEN, /* S[ms]stateen only */ CSR_CLASS_SSSTATEEN_AND_H, /* S[ms]stateen only (with H) */ CSR_CLASS_SSSTATEEN_AND_H_32, /* S[ms]stateen RV32 only (with H) */ @@ -1059,6 +1065,12 @@ riscv_csr_address (const char *csr_name, case CSR_CLASS_SMAIA: extension = "smaia"; break; + case CSR_CLASS_SMAIA_OR_SMCSRIND: + extension = "smaia or smcsrind"; + break; + case CSR_CLASS_SMCSRIND: + extension = "smcsrind"; + break; case CSR_CLASS_SMCNTRPMF_32: is_rv32_only = true; /* Fall through. */ @@ -1082,6 +1094,16 @@ riscv_csr_address (const char *csr_name, || csr_class == CSR_CLASS_SSAIA_AND_H_32); extension = "ssaia"; break; + case CSR_CLASS_SSAIA_OR_SSCSRIND: + case CSR_CLASS_SSAIA_OR_SSCSRIND_AND_H: + is_h_required = (csr_class == CSR_CLASS_SSAIA_OR_SSCSRIND_AND_H); + extension = "ssaia or sscsrind"; + break; + case CSR_CLASS_SSCSRIND: + case CSR_CLASS_SSCSRIND_AND_H: + is_h_required = (csr_class == CSR_CLASS_SSCSRIND_AND_H); + extension = "sscsrind"; + break; case CSR_CLASS_SSSTATEEN_AND_H_32: is_rv32_only = true; /* Fall through. */ diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.d b/gas/testsuite/gas/riscv/csr-version-1p10.d index 2ee4ee5..5165f4b 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p10.d +++ b/gas/testsuite/gas/riscv/csr-version-1p10.d @@ -623,6 +623,20 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1 [ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph [ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1 +[ ]+[0-9a-f]+:[ ]+35002573[ ]+csrr[ ]+a0,miselect +[ ]+[0-9a-f]+:[ ]+35059073[ ]+csrw[ ]+miselect,a1 +[ ]+[0-9a-f]+:[ ]+35102573[ ]+csrr[ ]+a0,mireg +[ ]+[0-9a-f]+:[ ]+35159073[ ]+csrw[ ]+mireg,a1 +[ ]+[0-9a-f]+:[ ]+35202573[ ]+csrr[ ]+a0,mireg2 +[ ]+[0-9a-f]+:[ ]+35259073[ ]+csrw[ ]+mireg2,a1 +[ ]+[0-9a-f]+:[ ]+35302573[ ]+csrr[ ]+a0,mireg3 +[ ]+[0-9a-f]+:[ ]+35359073[ ]+csrw[ ]+mireg3,a1 +[ ]+[0-9a-f]+:[ ]+35502573[ ]+csrr[ ]+a0,mireg4 +[ ]+[0-9a-f]+:[ ]+35559073[ ]+csrw[ ]+mireg4,a1 +[ ]+[0-9a-f]+:[ ]+35602573[ ]+csrr[ ]+a0,mireg5 +[ ]+[0-9a-f]+:[ ]+35659073[ ]+csrw[ ]+mireg5,a1 +[ ]+[0-9a-f]+:[ ]+35702573[ ]+csrr[ ]+a0,mireg6 +[ ]+[0-9a-f]+:[ ]+35759073[ ]+csrw[ ]+mireg6,a1 [ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg [ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1 [ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg @@ -713,6 +727,34 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+21459073[ ]+csrw[ ]+vsieh,a1 [ ]+[0-9a-f]+:[ ]+25402573[ ]+csrr[ ]+a0,vsiph [ ]+[0-9a-f]+:[ ]+25459073[ ]+csrw[ ]+vsiph,a1 +[ ]+[0-9a-f]+:[ ]+15002573[ ]+csrr[ ]+a0,siselect +[ ]+[0-9a-f]+:[ ]+15059073[ ]+csrw[ ]+siselect,a1 +[ ]+[0-9a-f]+:[ ]+15102573[ ]+csrr[ ]+a0,sireg +[ ]+[0-9a-f]+:[ ]+15159073[ ]+csrw[ ]+sireg,a1 +[ ]+[0-9a-f]+:[ ]+15202573[ ]+csrr[ ]+a0,sireg2 +[ ]+[0-9a-f]+:[ ]+15259073[ ]+csrw[ ]+sireg2,a1 +[ ]+[0-9a-f]+:[ ]+15302573[ ]+csrr[ ]+a0,sireg3 +[ ]+[0-9a-f]+:[ ]+15359073[ ]+csrw[ ]+sireg3,a1 +[ ]+[0-9a-f]+:[ ]+15502573[ ]+csrr[ ]+a0,sireg4 +[ ]+[0-9a-f]+:[ ]+15559073[ ]+csrw[ ]+sireg4,a1 +[ ]+[0-9a-f]+:[ ]+15602573[ ]+csrr[ ]+a0,sireg5 +[ ]+[0-9a-f]+:[ ]+15659073[ ]+csrw[ ]+sireg5,a1 +[ ]+[0-9a-f]+:[ ]+15702573[ ]+csrr[ ]+a0,sireg6 +[ ]+[0-9a-f]+:[ ]+15759073[ ]+csrw[ ]+sireg6,a1 +[ ]+[0-9a-f]+:[ ]+25002573[ ]+csrr[ ]+a0,vsiselect +[ ]+[0-9a-f]+:[ ]+25059073[ ]+csrw[ ]+vsiselect,a1 +[ ]+[0-9a-f]+:[ ]+25102573[ ]+csrr[ ]+a0,vsireg +[ ]+[0-9a-f]+:[ ]+25159073[ ]+csrw[ ]+vsireg,a1 +[ ]+[0-9a-f]+:[ ]+25202573[ ]+csrr[ ]+a0,vsireg2 +[ ]+[0-9a-f]+:[ ]+25259073[ ]+csrw[ ]+vsireg2,a1 +[ ]+[0-9a-f]+:[ ]+25302573[ ]+csrr[ ]+a0,vsireg3 +[ ]+[0-9a-f]+:[ ]+25359073[ ]+csrw[ ]+vsireg3,a1 +[ ]+[0-9a-f]+:[ ]+25502573[ ]+csrr[ ]+a0,vsireg4 +[ ]+[0-9a-f]+:[ ]+25559073[ ]+csrw[ ]+vsireg4,a1 +[ ]+[0-9a-f]+:[ ]+25602573[ ]+csrr[ ]+a0,vsireg5 +[ ]+[0-9a-f]+:[ ]+25659073[ ]+csrw[ ]+vsireg5,a1 +[ ]+[0-9a-f]+:[ ]+25702573[ ]+csrr[ ]+a0,vsireg6 +[ ]+[0-9a-f]+:[ ]+25759073[ ]+csrw[ ]+vsireg6,a1 [ ]+[0-9a-f]+:[ ]+da002573[ ]+csrr[ ]+a0,scountovf [ ]+[0-9a-f]+:[ ]+da059073[ ]+csrw[ ]+scountovf,a1 [ ]+[0-9a-f]+:[ ]+72302573[ ]+csrr[ ]+a0,mhpmevent3h diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.l b/gas/testsuite/gas/riscv/csr-version-1p10.l index 63991d5..17a8bb6 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p10.l +++ b/gas/testsuite/gas/riscv/csr-version-1p10.l @@ -823,13 +823,13 @@ .*Info: macro .* .*Warning: invalid CSR `vsatp', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `miselect', needs `smaia' extension +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension .*Info: macro .* -.*Warning: invalid CSR `miselect', needs `smaia' extension +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension .*Info: macro .* -.*Warning: invalid CSR `mireg', needs `smaia' extension +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension .*Info: macro .* -.*Warning: invalid CSR `mireg', needs `smaia' extension +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension .*Info: macro .* .*Warning: invalid CSR `mtopei', needs `smaia' extension .*Info: macro .* @@ -889,6 +889,34 @@ .*Info: macro .* .*Warning: invalid CSR `miph', needs `smaia' extension .*Info: macro .* +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg2', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg2', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg3', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg3', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg4', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg4', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg5', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg5', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg6', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg6', needs `smcsrind' extension +.*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension .*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension @@ -1057,13 +1085,13 @@ .*Info: macro .* .*Warning: invalid CSR `hstateen3h', needs `ssstateen' extension .*Info: macro .* -.*Warning: invalid CSR `siselect', needs `ssaia' extension +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension .*Info: macro .* -.*Warning: invalid CSR `siselect', needs `ssaia' extension +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension .*Info: macro .* -.*Warning: invalid CSR `sireg', needs `ssaia' extension +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension .*Info: macro .* -.*Warning: invalid CSR `sireg', needs `ssaia' extension +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `stopei', needs `ssaia' extension .*Info: macro .* @@ -1125,19 +1153,19 @@ .*Info: macro .* .*Warning: invalid CSR `vsiselect', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsiselect', needs `ssaia' extension +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vsiselect', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsiselect', needs `ssaia' extension +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vsireg', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsireg', needs `ssaia' extension +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vsireg', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsireg', needs `ssaia' extension +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vstopei', needs `h' extension .*Info: macro .* @@ -1241,6 +1269,90 @@ .*Info: macro .* .*Warning: invalid CSR `vsiph', needs `ssaia' extension .*Info: macro .* +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg6', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg6', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `sscsrind' extension +.*Info: macro .* .*Warning: invalid CSR `scountovf', needs `sscofpmf' extension .*Info: macro .* .*Warning: invalid CSR `scountovf', needs `sscofpmf' extension diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.d b/gas/testsuite/gas/riscv/csr-version-1p11.d index 836dede..1cb5a91 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p11.d +++ b/gas/testsuite/gas/riscv/csr-version-1p11.d @@ -623,6 +623,20 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1 [ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph [ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1 +[ ]+[0-9a-f]+:[ ]+35002573[ ]+csrr[ ]+a0,miselect +[ ]+[0-9a-f]+:[ ]+35059073[ ]+csrw[ ]+miselect,a1 +[ ]+[0-9a-f]+:[ ]+35102573[ ]+csrr[ ]+a0,mireg +[ ]+[0-9a-f]+:[ ]+35159073[ ]+csrw[ ]+mireg,a1 +[ ]+[0-9a-f]+:[ ]+35202573[ ]+csrr[ ]+a0,mireg2 +[ ]+[0-9a-f]+:[ ]+35259073[ ]+csrw[ ]+mireg2,a1 +[ ]+[0-9a-f]+:[ ]+35302573[ ]+csrr[ ]+a0,mireg3 +[ ]+[0-9a-f]+:[ ]+35359073[ ]+csrw[ ]+mireg3,a1 +[ ]+[0-9a-f]+:[ ]+35502573[ ]+csrr[ ]+a0,mireg4 +[ ]+[0-9a-f]+:[ ]+35559073[ ]+csrw[ ]+mireg4,a1 +[ ]+[0-9a-f]+:[ ]+35602573[ ]+csrr[ ]+a0,mireg5 +[ ]+[0-9a-f]+:[ ]+35659073[ ]+csrw[ ]+mireg5,a1 +[ ]+[0-9a-f]+:[ ]+35702573[ ]+csrr[ ]+a0,mireg6 +[ ]+[0-9a-f]+:[ ]+35759073[ ]+csrw[ ]+mireg6,a1 [ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg [ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1 [ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg @@ -713,6 +727,34 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+21459073[ ]+csrw[ ]+vsieh,a1 [ ]+[0-9a-f]+:[ ]+25402573[ ]+csrr[ ]+a0,vsiph [ ]+[0-9a-f]+:[ ]+25459073[ ]+csrw[ ]+vsiph,a1 +[ ]+[0-9a-f]+:[ ]+15002573[ ]+csrr[ ]+a0,siselect +[ ]+[0-9a-f]+:[ ]+15059073[ ]+csrw[ ]+siselect,a1 +[ ]+[0-9a-f]+:[ ]+15102573[ ]+csrr[ ]+a0,sireg +[ ]+[0-9a-f]+:[ ]+15159073[ ]+csrw[ ]+sireg,a1 +[ ]+[0-9a-f]+:[ ]+15202573[ ]+csrr[ ]+a0,sireg2 +[ ]+[0-9a-f]+:[ ]+15259073[ ]+csrw[ ]+sireg2,a1 +[ ]+[0-9a-f]+:[ ]+15302573[ ]+csrr[ ]+a0,sireg3 +[ ]+[0-9a-f]+:[ ]+15359073[ ]+csrw[ ]+sireg3,a1 +[ ]+[0-9a-f]+:[ ]+15502573[ ]+csrr[ ]+a0,sireg4 +[ ]+[0-9a-f]+:[ ]+15559073[ ]+csrw[ ]+sireg4,a1 +[ ]+[0-9a-f]+:[ ]+15602573[ ]+csrr[ ]+a0,sireg5 +[ ]+[0-9a-f]+:[ ]+15659073[ ]+csrw[ ]+sireg5,a1 +[ ]+[0-9a-f]+:[ ]+15702573[ ]+csrr[ ]+a0,sireg6 +[ ]+[0-9a-f]+:[ ]+15759073[ ]+csrw[ ]+sireg6,a1 +[ ]+[0-9a-f]+:[ ]+25002573[ ]+csrr[ ]+a0,vsiselect +[ ]+[0-9a-f]+:[ ]+25059073[ ]+csrw[ ]+vsiselect,a1 +[ ]+[0-9a-f]+:[ ]+25102573[ ]+csrr[ ]+a0,vsireg +[ ]+[0-9a-f]+:[ ]+25159073[ ]+csrw[ ]+vsireg,a1 +[ ]+[0-9a-f]+:[ ]+25202573[ ]+csrr[ ]+a0,vsireg2 +[ ]+[0-9a-f]+:[ ]+25259073[ ]+csrw[ ]+vsireg2,a1 +[ ]+[0-9a-f]+:[ ]+25302573[ ]+csrr[ ]+a0,vsireg3 +[ ]+[0-9a-f]+:[ ]+25359073[ ]+csrw[ ]+vsireg3,a1 +[ ]+[0-9a-f]+:[ ]+25502573[ ]+csrr[ ]+a0,vsireg4 +[ ]+[0-9a-f]+:[ ]+25559073[ ]+csrw[ ]+vsireg4,a1 +[ ]+[0-9a-f]+:[ ]+25602573[ ]+csrr[ ]+a0,vsireg5 +[ ]+[0-9a-f]+:[ ]+25659073[ ]+csrw[ ]+vsireg5,a1 +[ ]+[0-9a-f]+:[ ]+25702573[ ]+csrr[ ]+a0,vsireg6 +[ ]+[0-9a-f]+:[ ]+25759073[ ]+csrw[ ]+vsireg6,a1 [ ]+[0-9a-f]+:[ ]+da002573[ ]+csrr[ ]+a0,scountovf [ ]+[0-9a-f]+:[ ]+da059073[ ]+csrw[ ]+scountovf,a1 [ ]+[0-9a-f]+:[ ]+72302573[ ]+csrr[ ]+a0,mhpmevent3h diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.l b/gas/testsuite/gas/riscv/csr-version-1p11.l index 6caec9f..8b797e8 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p11.l +++ b/gas/testsuite/gas/riscv/csr-version-1p11.l @@ -819,13 +819,13 @@ .*Info: macro .* .*Warning: invalid CSR `vsatp', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `miselect', needs `smaia' extension +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension .*Info: macro .* -.*Warning: invalid CSR `miselect', needs `smaia' extension +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension .*Info: macro .* -.*Warning: invalid CSR `mireg', needs `smaia' extension +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension .*Info: macro .* -.*Warning: invalid CSR `mireg', needs `smaia' extension +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension .*Info: macro .* .*Warning: invalid CSR `mtopei', needs `smaia' extension .*Info: macro .* @@ -885,6 +885,34 @@ .*Info: macro .* .*Warning: invalid CSR `miph', needs `smaia' extension .*Info: macro .* +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg2', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg2', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg3', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg3', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg4', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg4', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg5', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg5', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg6', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg6', needs `smcsrind' extension +.*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension .*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension @@ -1053,13 +1081,13 @@ .*Info: macro .* .*Warning: invalid CSR `hstateen3h', needs `ssstateen' extension .*Info: macro .* -.*Warning: invalid CSR `siselect', needs `ssaia' extension +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension .*Info: macro .* -.*Warning: invalid CSR `siselect', needs `ssaia' extension +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension .*Info: macro .* -.*Warning: invalid CSR `sireg', needs `ssaia' extension +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension .*Info: macro .* -.*Warning: invalid CSR `sireg', needs `ssaia' extension +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `stopei', needs `ssaia' extension .*Info: macro .* @@ -1121,19 +1149,19 @@ .*Info: macro .* .*Warning: invalid CSR `vsiselect', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsiselect', needs `ssaia' extension +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vsiselect', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsiselect', needs `ssaia' extension +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vsireg', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsireg', needs `ssaia' extension +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vsireg', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsireg', needs `ssaia' extension +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vstopei', needs `h' extension .*Info: macro .* @@ -1237,6 +1265,90 @@ .*Info: macro .* .*Warning: invalid CSR `vsiph', needs `ssaia' extension .*Info: macro .* +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg6', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg6', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `sscsrind' extension +.*Info: macro .* .*Warning: invalid CSR `scountovf', needs `sscofpmf' extension .*Info: macro .* .*Warning: invalid CSR `scountovf', needs `sscofpmf' extension diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.d b/gas/testsuite/gas/riscv/csr-version-1p12.d index beeec9a..ac88d93 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p12.d +++ b/gas/testsuite/gas/riscv/csr-version-1p12.d @@ -623,6 +623,20 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1 [ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph [ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1 +[ ]+[0-9a-f]+:[ ]+35002573[ ]+csrr[ ]+a0,miselect +[ ]+[0-9a-f]+:[ ]+35059073[ ]+csrw[ ]+miselect,a1 +[ ]+[0-9a-f]+:[ ]+35102573[ ]+csrr[ ]+a0,mireg +[ ]+[0-9a-f]+:[ ]+35159073[ ]+csrw[ ]+mireg,a1 +[ ]+[0-9a-f]+:[ ]+35202573[ ]+csrr[ ]+a0,mireg2 +[ ]+[0-9a-f]+:[ ]+35259073[ ]+csrw[ ]+mireg2,a1 +[ ]+[0-9a-f]+:[ ]+35302573[ ]+csrr[ ]+a0,mireg3 +[ ]+[0-9a-f]+:[ ]+35359073[ ]+csrw[ ]+mireg3,a1 +[ ]+[0-9a-f]+:[ ]+35502573[ ]+csrr[ ]+a0,mireg4 +[ ]+[0-9a-f]+:[ ]+35559073[ ]+csrw[ ]+mireg4,a1 +[ ]+[0-9a-f]+:[ ]+35602573[ ]+csrr[ ]+a0,mireg5 +[ ]+[0-9a-f]+:[ ]+35659073[ ]+csrw[ ]+mireg5,a1 +[ ]+[0-9a-f]+:[ ]+35702573[ ]+csrr[ ]+a0,mireg6 +[ ]+[0-9a-f]+:[ ]+35759073[ ]+csrw[ ]+mireg6,a1 [ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg [ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1 [ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg @@ -713,6 +727,34 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+21459073[ ]+csrw[ ]+vsieh,a1 [ ]+[0-9a-f]+:[ ]+25402573[ ]+csrr[ ]+a0,vsiph [ ]+[0-9a-f]+:[ ]+25459073[ ]+csrw[ ]+vsiph,a1 +[ ]+[0-9a-f]+:[ ]+15002573[ ]+csrr[ ]+a0,siselect +[ ]+[0-9a-f]+:[ ]+15059073[ ]+csrw[ ]+siselect,a1 +[ ]+[0-9a-f]+:[ ]+15102573[ ]+csrr[ ]+a0,sireg +[ ]+[0-9a-f]+:[ ]+15159073[ ]+csrw[ ]+sireg,a1 +[ ]+[0-9a-f]+:[ ]+15202573[ ]+csrr[ ]+a0,sireg2 +[ ]+[0-9a-f]+:[ ]+15259073[ ]+csrw[ ]+sireg2,a1 +[ ]+[0-9a-f]+:[ ]+15302573[ ]+csrr[ ]+a0,sireg3 +[ ]+[0-9a-f]+:[ ]+15359073[ ]+csrw[ ]+sireg3,a1 +[ ]+[0-9a-f]+:[ ]+15502573[ ]+csrr[ ]+a0,sireg4 +[ ]+[0-9a-f]+:[ ]+15559073[ ]+csrw[ ]+sireg4,a1 +[ ]+[0-9a-f]+:[ ]+15602573[ ]+csrr[ ]+a0,sireg5 +[ ]+[0-9a-f]+:[ ]+15659073[ ]+csrw[ ]+sireg5,a1 +[ ]+[0-9a-f]+:[ ]+15702573[ ]+csrr[ ]+a0,sireg6 +[ ]+[0-9a-f]+:[ ]+15759073[ ]+csrw[ ]+sireg6,a1 +[ ]+[0-9a-f]+:[ ]+25002573[ ]+csrr[ ]+a0,vsiselect +[ ]+[0-9a-f]+:[ ]+25059073[ ]+csrw[ ]+vsiselect,a1 +[ ]+[0-9a-f]+:[ ]+25102573[ ]+csrr[ ]+a0,vsireg +[ ]+[0-9a-f]+:[ ]+25159073[ ]+csrw[ ]+vsireg,a1 +[ ]+[0-9a-f]+:[ ]+25202573[ ]+csrr[ ]+a0,vsireg2 +[ ]+[0-9a-f]+:[ ]+25259073[ ]+csrw[ ]+vsireg2,a1 +[ ]+[0-9a-f]+:[ ]+25302573[ ]+csrr[ ]+a0,vsireg3 +[ ]+[0-9a-f]+:[ ]+25359073[ ]+csrw[ ]+vsireg3,a1 +[ ]+[0-9a-f]+:[ ]+25502573[ ]+csrr[ ]+a0,vsireg4 +[ ]+[0-9a-f]+:[ ]+25559073[ ]+csrw[ ]+vsireg4,a1 +[ ]+[0-9a-f]+:[ ]+25602573[ ]+csrr[ ]+a0,vsireg5 +[ ]+[0-9a-f]+:[ ]+25659073[ ]+csrw[ ]+vsireg5,a1 +[ ]+[0-9a-f]+:[ ]+25702573[ ]+csrr[ ]+a0,vsireg6 +[ ]+[0-9a-f]+:[ ]+25759073[ ]+csrw[ ]+vsireg6,a1 [ ]+[0-9a-f]+:[ ]+da002573[ ]+csrr[ ]+a0,scountovf [ ]+[0-9a-f]+:[ ]+da059073[ ]+csrw[ ]+scountovf,a1 [ ]+[0-9a-f]+:[ ]+72302573[ ]+csrr[ ]+a0,mhpmevent3h diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.l b/gas/testsuite/gas/riscv/csr-version-1p12.l index b83a001..81a7aba 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p12.l +++ b/gas/testsuite/gas/riscv/csr-version-1p12.l @@ -543,13 +543,13 @@ .*Info: macro .* .*Warning: invalid CSR `vsatp', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `miselect', needs `smaia' extension +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension .*Info: macro .* -.*Warning: invalid CSR `miselect', needs `smaia' extension +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension .*Info: macro .* -.*Warning: invalid CSR `mireg', needs `smaia' extension +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension .*Info: macro .* -.*Warning: invalid CSR `mireg', needs `smaia' extension +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension .*Info: macro .* .*Warning: invalid CSR `mtopei', needs `smaia' extension .*Info: macro .* @@ -609,6 +609,34 @@ .*Info: macro .* .*Warning: invalid CSR `miph', needs `smaia' extension .*Info: macro .* +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `miselect', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg', needs `smaia or smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg2', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg2', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg3', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg3', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg4', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg4', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg5', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg5', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg6', needs `smcsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `mireg6', needs `smcsrind' extension +.*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension .*Info: macro .* .*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension @@ -777,13 +805,13 @@ .*Info: macro .* .*Warning: invalid CSR `hstateen3h', needs `ssstateen' extension .*Info: macro .* -.*Warning: invalid CSR `siselect', needs `ssaia' extension +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension .*Info: macro .* -.*Warning: invalid CSR `siselect', needs `ssaia' extension +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension .*Info: macro .* -.*Warning: invalid CSR `sireg', needs `ssaia' extension +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension .*Info: macro .* -.*Warning: invalid CSR `sireg', needs `ssaia' extension +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `stopei', needs `ssaia' extension .*Info: macro .* @@ -845,19 +873,19 @@ .*Info: macro .* .*Warning: invalid CSR `vsiselect', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsiselect', needs `ssaia' extension +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vsiselect', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsiselect', needs `ssaia' extension +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vsireg', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsireg', needs `ssaia' extension +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vsireg', needs `h' extension .*Info: macro .* -.*Warning: invalid CSR `vsireg', needs `ssaia' extension +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension .*Info: macro .* .*Warning: invalid CSR `vstopei', needs `h' extension .*Info: macro .* @@ -961,6 +989,90 @@ .*Info: macro .* .*Warning: invalid CSR `vsiph', needs `ssaia' extension .*Info: macro .* +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `siselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg6', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `sireg6', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsiselect', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg', needs `ssaia or sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg2', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg3', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg4', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg5', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `sscsrind' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `h' extension +.*Info: macro .* +.*Warning: invalid CSR `vsireg6', needs `sscsrind' extension +.*Info: macro .* .*Warning: invalid CSR `scountovf', needs `sscofpmf' extension .*Info: macro .* .*Warning: invalid CSR `scountovf', needs `sscofpmf' extension diff --git a/gas/testsuite/gas/riscv/csr.s b/gas/testsuite/gas/riscv/csr.s index 42bb158..378caef 100644 --- a/gas/testsuite/gas/riscv/csr.s +++ b/gas/testsuite/gas/riscv/csr.s @@ -350,6 +350,15 @@ csr mviph csr miph + # Smcsrind + csr miselect + csr mireg + csr mireg2 + csr mireg3 + csr mireg4 + csr mireg5 + csr mireg6 + # Smcntrpmf extension csr mcyclecfg csr minstretcfg @@ -401,6 +410,22 @@ csr vsieh csr vsiph + # Sscsrind + csr siselect + csr sireg + csr sireg2 + csr sireg3 + csr sireg4 + csr sireg5 + csr sireg6 + csr vsiselect + csr vsireg + csr vsireg2 + csr vsireg3 + csr vsireg4 + csr vsireg5 + csr vsireg6 + # Sscofpmf extension csr scountovf csr mhpmevent3h diff --git a/gas/testsuite/gas/riscv/march-help.l b/gas/testsuite/gas/riscv/march-help.l index dd82752..d2b9838 100644 --- a/gas/testsuite/gas/riscv/march-help.l +++ b/gas/testsuite/gas/riscv/march-help.l @@ -95,10 +95,12 @@ All available -march extensions for RISC-V: zcd 1.0 zcmp 1.0 smaia 1.0 + smcsrind 1.0 smcntrpmf 1.0 smepmp 1.0 smstateen 1.0 ssaia 1.0 + sscsrind 1.0 sscofpmf 1.0 ssstateen 1.0 sstc 1.0 diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h index e8c08e8..511895e 100644 --- a/include/opcode/riscv-opc.h +++ b/include/opcode/riscv-opc.h @@ -3471,6 +3471,12 @@ #define CSR_MVIENH 0x318 #define CSR_MVIPH 0x319 #define CSR_MIPH 0x354 +/*Smcsrind extension */ +#define CSR_MIREG2 0x352 +#define CSR_MIREG3 0x353 +#define CSR_MIREG4 0x355 +#define CSR_MIREG5 0x356 +#define CSR_MIREG6 0x357 /* Smcntrpmf extension. */ #define CSR_MCYCLECFG 0x321 #define CSR_MINSTRETCFG 0x322 @@ -3519,6 +3525,17 @@ #define CSR_HVIPRIO2H 0x657 #define CSR_VSIEH 0x214 #define CSR_VSIPH 0x254 +/* Sscsrind extension */ +#define CSR_SIREG2 0x152 +#define CSR_SIREG3 0x153 +#define CSR_SIREG4 0x155 +#define CSR_SIREG5 0x156 +#define CSR_SIREG6 0x157 +#define CSR_VSIREG2 0x252 +#define CSR_VSIREG3 0x253 +#define CSR_VSIREG4 0x255 +#define CSR_VSIREG5 0x256 +#define CSR_VSIREG6 0x257 /* Sscofpmf extension */ #define CSR_SCOUNTOVF 0xda0 #define CSR_MHPMEVENT3H 0x723 @@ -4483,8 +4500,8 @@ DECLARE_CSR(vstval, CSR_VSTVAL, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLA DECLARE_CSR(vsip, CSR_VSIP, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(vsatp, CSR_VSATP, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) /* Smaia extension */ -DECLARE_CSR(miselect, CSR_MISELECT, CSR_CLASS_SMAIA, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) -DECLARE_CSR(mireg, CSR_MIREG, CSR_CLASS_SMAIA, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(miselect, CSR_MISELECT, CSR_CLASS_SMAIA_OR_SMCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mireg, CSR_MIREG, CSR_CLASS_SMAIA_OR_SMCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(mtopei, CSR_MTOPEI, CSR_CLASS_SMAIA, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(mtopi, CSR_MTOPI, CSR_CLASS_SMAIA, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(mvien, CSR_MVIEN, CSR_CLASS_SMAIA, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) @@ -4494,6 +4511,12 @@ DECLARE_CSR(mieh, CSR_MIEH, CSR_CLASS_SMAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_ DECLARE_CSR(mvienh, CSR_MVIENH, CSR_CLASS_SMAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(mviph, CSR_MVIPH, CSR_CLASS_SMAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(miph, CSR_MIPH, CSR_CLASS_SMAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +/* Smcsrind extension */ +DECLARE_CSR(mireg2, CSR_MIREG2, CSR_CLASS_SMCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mireg3, CSR_MIREG3, CSR_CLASS_SMCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mireg4, CSR_MIREG4, CSR_CLASS_SMCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mireg5, CSR_MIREG5, CSR_CLASS_SMCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(mireg6, CSR_MIREG6, CSR_CLASS_SMCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) /* Smcntrpmf extension (incompatible with the privileged spec v1.9.1). */ DECLARE_CSR(mcyclecfg, CSR_MCYCLECFG, CSR_CLASS_SMCNTRPMF, PRIV_SPEC_CLASS_1P10, PRIV_SPEC_CLASS_DRAFT) DECLARE_CSR(minstretcfg, CSR_MINSTRETCFG, CSR_CLASS_SMCNTRPMF, PRIV_SPEC_CLASS_1P10, PRIV_SPEC_CLASS_DRAFT) @@ -4521,8 +4544,8 @@ DECLARE_CSR(hstateen1h, CSR_HSTATEEN1H, CSR_CLASS_SSSTATEEN_AND_H_32, PRIV_SPEC_ DECLARE_CSR(hstateen2h, CSR_HSTATEEN2H, CSR_CLASS_SSSTATEEN_AND_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(hstateen3h, CSR_HSTATEEN3H, CSR_CLASS_SSSTATEEN_AND_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) /* Ssaia extension */ -DECLARE_CSR(siselect, CSR_SISELECT, CSR_CLASS_SSAIA, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) -DECLARE_CSR(sireg, CSR_SIREG, CSR_CLASS_SSAIA, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(siselect, CSR_SISELECT, CSR_CLASS_SSAIA_OR_SSCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(sireg, CSR_SIREG, CSR_CLASS_SSAIA_OR_SSCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(stopei, CSR_STOPEI, CSR_CLASS_SSAIA, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(stopi, CSR_STOPI, CSR_CLASS_SSAIA, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(sieh, CSR_SIEH, CSR_CLASS_SSAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) @@ -4531,8 +4554,8 @@ DECLARE_CSR(hvien, CSR_HVIEN, CSR_CLASS_SSAIA_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_ DECLARE_CSR(hvictl, CSR_HVICTL, CSR_CLASS_SSAIA_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(hviprio1, CSR_HVIPRIO1, CSR_CLASS_SSAIA_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(hviprio2, CSR_HVIPRIO2, CSR_CLASS_SSAIA_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) -DECLARE_CSR(vsiselect, CSR_VSISELECT, CSR_CLASS_SSAIA_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) -DECLARE_CSR(vsireg, CSR_VSIREG, CSR_CLASS_SSAIA_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsiselect, CSR_VSISELECT, CSR_CLASS_SSAIA_OR_SSCSRIND_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsireg, CSR_VSIREG, CSR_CLASS_SSAIA_OR_SSCSRIND_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(vstopei, CSR_VSTOPEI, CSR_CLASS_SSAIA_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(vstopi, CSR_VSTOPI, CSR_CLASS_SSAIA_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(hidelegh, CSR_HIDELEGH, CSR_CLASS_SSAIA_AND_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) @@ -4542,6 +4565,17 @@ DECLARE_CSR(hviprio1h, CSR_HVIPRIO1H, CSR_CLASS_SSAIA_AND_H_32, PRIV_SPEC_CLASS_ DECLARE_CSR(hviprio2h, CSR_HVIPRIO2H, CSR_CLASS_SSAIA_AND_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(vsieh, CSR_VSIEH, CSR_CLASS_SSAIA_AND_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(vsiph, CSR_VSIPH, CSR_CLASS_SSAIA_AND_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +/* Sscsrind extension */ +DECLARE_CSR(sireg2, CSR_SIREG2, CSR_CLASS_SSCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(sireg3, CSR_SIREG3, CSR_CLASS_SSCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(sireg4, CSR_SIREG4, CSR_CLASS_SSCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(sireg5, CSR_SIREG5, CSR_CLASS_SSCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(sireg6, CSR_SIREG6, CSR_CLASS_SSCSRIND, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsireg2, CSR_VSIREG2, CSR_CLASS_SSCSRIND_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsireg3, CSR_VSIREG3, CSR_CLASS_SSCSRIND_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsireg4, CSR_VSIREG4, CSR_CLASS_SSCSRIND_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsireg5, CSR_VSIREG5, CSR_CLASS_SSCSRIND_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsireg6, CSR_VSIREG6, CSR_CLASS_SSCSRIND_AND_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) /* Sscofpmf extension */ DECLARE_CSR(scountovf, CSR_SCOUNTOVF, CSR_CLASS_SSCOFPMF, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) DECLARE_CSR(mhpmevent3h, CSR_MHPMEVENT3H, CSR_CLASS_SSCOFPMF_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) |