Skip to content

Commit

Permalink
UNRATIFIED RISC-V: Add indirect CSR Access Extensions and its CSRs
Browse files Browse the repository at this point in the history
[DO NOT MERGE]
Until the Indirect CSR Access Architecture Extension is frozen/ratified and
final version number is determined, this patch should not be merged
upstream.  This commit uses placeholder version 0.1 because there's no
version number in the current documentation.

This commit adds indirect CSR access extensions (Smcsrind / Sscsrind) and
their CSRs based on the latest documentation (as of 2023-08-07):
<https://docs.google.com/document/d/1ZxTSUWX_9_VafWeA0l1ci9RFjmivLuZn-US9IbFOEWY>

Because six CSRs are duplicates of 'Smaia' / 'Ssaia' extensions, it adds
complex CSR handling for those.

bfd/ChangeLog:

	* elfxx-riscv.c (riscv_implicit_subsets): Add implications
	'Smcsrind' / 'Sscsrind' -> 'Zicsr'.
	(riscv_supported_std_s_ext): Add 'Smcsrind' and 'Sscsrind'
	extensions to the valid 'S' extension list.

gas/ChangeLog:

	* config/tc-riscv.c (enum riscv_csr_class): Add CSR classes for
	the 'S[ms]csrind' extensions. (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-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.
	* testsuite/gas/riscv/csr-version-1p9p1.d: Likewise.
	* testsuite/gas/riscv/csr-version-1p9p1.l: Likewise.

include/ChangeLog:

	* opcode/riscv-opc.h: Recategory miselect, mireg, siselect, sireg,
	vsiselect and vsireg CSRs. (CSR_MIREG2, CSR_MIREG3, CSR_MIREG4,
	CSR_MIREG5, CSR_MIREG6, CSR_SIREG2, CSR_SIREG3, CSR_SIREG4,
	CSR_SIREG5, CSR_SIREG6, CSR_VSIREG2, CSR_VSIREG3, CSR_VSIREG3,
	CSR_VSIREG5, CSR_VSIREG6): Add new.
  • Loading branch information
a4lg committed Aug 15, 2023
1 parent 27bf4bf commit dc123cb
Show file tree
Hide file tree
Showing 14 changed files with 613 additions and 54 deletions.
4 changes: 4 additions & 0 deletions bfd/elfxx-riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,10 +1222,12 @@ static riscv_implicit_subset_t riscv_implicit_subsets[] =
{"zicntr", "zicsr", check_implicit_compat_counter_to_zicsr},
{"zihpm", "zicsr", check_implicit_compat_counter_to_zicsr},
{"smaia", "ssaia", check_implicit_always},
{"smcsrind", "zicsr", check_implicit_always},
{"smstateen", "ssstateen", check_implicit_always},
{"smepmp", "zicsr", check_implicit_always},
{"ssaia", "zicsr", check_implicit_always},
{"sscofpmf", "zicsr", check_implicit_always},
{"sscsrind", "zicsr", check_implicit_always},
{"ssstateen", "zicsr", check_implicit_always},
{"sstc", "zicsr", check_implicit_always},
{NULL, NULL, NULL}
Expand Down Expand Up @@ -1374,10 +1376,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, 0, 1, 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 },
{"sscofpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"sscsrind", ISA_SPEC_CLASS_DRAFT, 0, 1, 0 },
{"ssstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"sstc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"svinval", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
Expand Down
30 changes: 30 additions & 0 deletions gas/config/tc-riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,18 @@ 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 or Smcsrind */
CSR_CLASS_SMCSRIND, /* Smcsrind */
CSR_CLASS_SMSTATEEN, /* Smstateen only */
CSR_CLASS_SMSTATEEN_32, /* Smstateen RV32 only */
CSR_CLASS_SSAIA, /* Ssaia */
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 or Sscsrind */
CSR_CLASS_SSAIA_OR_SSCSRIND_AND_H, /* Ssaia or Sscsrind (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) */
Expand Down Expand Up @@ -1070,6 +1076,15 @@ riscv_csr_address (const char *csr_name,
case CSR_CLASS_SMAIA:
extension = "smaia";
break;
case CSR_CLASS_SMAIA_OR_SMCSRIND:
is_csr_req_complex = true;
extension = _ ("smaia' or `smcsrind");
csr_ok = (riscv_subset_supports (&riscv_rps_as, "smaia")
|| riscv_subset_supports (&riscv_rps_as, "smcsrind"));
break;
case CSR_CLASS_SMCSRIND:
extension = "smcsrind";
break;
case CSR_CLASS_SMSTATEEN_32:
is_rv32_only = true;
/* Fall through. */
Expand Down Expand Up @@ -1101,6 +1116,21 @@ riscv_csr_address (const char *csr_name,
case CSR_CLASS_SSCOFPMF:
extension = "sscofpmf";
break;
case CSR_CLASS_SSAIA_OR_SSCSRIND_AND_H:
is_h_required = true;
/* Fall through. */
case CSR_CLASS_SSAIA_OR_SSCSRIND:
is_csr_req_complex = true;
extension = _ ("ssaia' or `sscsrind");
csr_ok = (riscv_subset_supports (&riscv_rps_as, "ssaia")
|| riscv_subset_supports (&riscv_rps_as, "sscsrind"));
break;
case CSR_CLASS_SSCSRIND_AND_H:
is_h_required = true;
/* Fall through. */
case CSR_CLASS_SSCSRIND:
extension = "sscsrind";
break;
case CSR_CLASS_SSTC:
case CSR_CLASS_SSTC_AND_H:
case CSR_CLASS_SSTC_32:
Expand Down
15 changes: 15 additions & 0 deletions gas/testsuite/gas/riscv/csr-dw-regnums.d
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ Contents of the .* section:
DW_CFA_offset_extended_sf: r4888 \(mvienh\) at cfa\+3168
DW_CFA_offset_extended_sf: r4889 \(mviph\) at cfa\+3172
DW_CFA_offset_extended_sf: r4948 \(miph\) at cfa\+3408
DW_CFA_offset_extended_sf: r4946 \(mireg2\) at cfa\+3400
DW_CFA_offset_extended_sf: r4947 \(mireg3\) at cfa\+3404
DW_CFA_offset_extended_sf: r4949 \(mireg4\) at cfa\+3412
DW_CFA_offset_extended_sf: r4950 \(mireg5\) at cfa\+3416
DW_CFA_offset_extended_sf: r4951 \(mireg6\) at cfa\+3420
DW_CFA_offset_extended_sf: r4876 \(mstateen0\) at cfa\+3120
DW_CFA_offset_extended_sf: r4877 \(mstateen1\) at cfa\+3124
DW_CFA_offset_extended_sf: r4878 \(mstateen2\) at cfa\+3128
Expand Down Expand Up @@ -395,6 +400,16 @@ Contents of the .* section:
DW_CFA_offset_extended_sf: r5949 \(mhpmevent29h\) at cfa\+7412
DW_CFA_offset_extended_sf: r5950 \(mhpmevent30h\) at cfa\+7416
DW_CFA_offset_extended_sf: r5951 \(mhpmevent31h\) at cfa\+7420
DW_CFA_offset_extended_sf: r4434 \(sireg2\) at cfa\+1352
DW_CFA_offset_extended_sf: r4435 \(sireg3\) at cfa\+1356
DW_CFA_offset_extended_sf: r4437 \(sireg4\) at cfa\+1364
DW_CFA_offset_extended_sf: r4438 \(sireg5\) at cfa\+1368
DW_CFA_offset_extended_sf: r4439 \(sireg6\) at cfa\+1372
DW_CFA_offset_extended_sf: r4690 \(vsireg2\) at cfa\+2376
DW_CFA_offset_extended_sf: r4691 \(vsireg3\) at cfa\+2380
DW_CFA_offset_extended_sf: r4693 \(vsireg4\) at cfa\+2388
DW_CFA_offset_extended_sf: r4694 \(vsireg5\) at cfa\+2392
DW_CFA_offset_extended_sf: r4695 \(vsireg6\) at cfa\+2396
DW_CFA_offset_extended_sf: r4429 \(stimecmp\) at cfa\+1332
DW_CFA_offset_extended_sf: r4445 \(stimecmph\) at cfa\+1396
DW_CFA_offset_extended_sf: r4685 \(vstimecmp\) at cfa\+2356
Expand Down
17 changes: 17 additions & 0 deletions gas/testsuite/gas/riscv/csr-dw-regnums.s
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,12 @@ _start:
.cfi_offset mvienh, 3168
.cfi_offset mviph, 3172
.cfi_offset miph, 3408
# Smcsrind extension (except miselect/mireg in Smaia)
.cfi_offset mireg2, 3400
.cfi_offset mireg3, 3404
.cfi_offset mireg4, 3412
.cfi_offset mireg5, 3416
.cfi_offset mireg6, 3420
# Smstateen extension
.cfi_offset mstateen0, 3120
.cfi_offset mstateen1, 3124
Expand Down Expand Up @@ -395,6 +401,17 @@ _start:
.cfi_offset mhpmevent29h, 7412
.cfi_offset mhpmevent30h, 7416
.cfi_offset mhpmevent31h, 7420
# Sscsrind extension (except {v,}si{select,reg} in Ssaia)
.cfi_offset sireg2, 1352
.cfi_offset sireg3, 1356
.cfi_offset sireg4, 1364
.cfi_offset sireg5, 1368
.cfi_offset sireg6, 1372
.cfi_offset vsireg2, 2376
.cfi_offset vsireg3, 2380
.cfi_offset vsireg4, 2388
.cfi_offset vsireg5, 2392
.cfi_offset vsireg6, 2396
# Sstc extension
.cfi_offset stimecmp, 1332
.cfi_offset stimecmph, 1396
Expand Down
30 changes: 30 additions & 0 deletions gas/testsuite/gas/riscv/csr-version-1p10.d
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,16 @@ 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]+:[ ]+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]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
Expand Down Expand Up @@ -765,6 +775,26 @@ Disassembly of section .text:
[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1
[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h
[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,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]+:[ ]+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]+:[ ]+14d02573[ ]+csrr[ ]+a0,stimecmp
[ ]+[0-9a-f]+:[ ]+14d59073[ ]+csrw[ ]+stimecmp,a1
[ ]+[0-9a-f]+:[ ]+15d02573[ ]+csrr[ ]+a0,stimecmph
Expand Down
104 changes: 92 additions & 12 deletions gas/testsuite/gas/riscv/csr-version-1p10.l
Original file line number Diff line number Diff line change
Expand Up @@ -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 .*
Expand Down Expand Up @@ -889,6 +889,26 @@
.*Info: macro .*
.*Warning: invalid CSR `miph', needs `smaia' 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 `mstateen0', needs `smstateen' extension
.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
Expand Down Expand Up @@ -1033,13 +1053,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 .*
Expand Down Expand Up @@ -1101,19 +1121,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 .*
Expand Down Expand Up @@ -1455,6 +1475,66 @@
.*Info: macro .*
.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' 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 `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 `stimecmp', needs `sstc' extension
.*Info: macro .*
.*Warning: invalid CSR `stimecmp', needs `sstc' extension
Expand Down
30 changes: 30 additions & 0 deletions gas/testsuite/gas/riscv/csr-version-1p11.d
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,16 @@ 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]+:[ ]+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]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
Expand Down Expand Up @@ -765,6 +775,26 @@ Disassembly of section .text:
[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1
[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h
[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,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]+:[ ]+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]+:[ ]+14d02573[ ]+csrr[ ]+a0,stimecmp
[ ]+[0-9a-f]+:[ ]+14d59073[ ]+csrw[ ]+stimecmp,a1
[ ]+[0-9a-f]+:[ ]+15d02573[ ]+csrr[ ]+a0,stimecmph
Expand Down
Loading

0 comments on commit dc123cb

Please sign in to comment.