Skip to content

Commit 41e1190

Browse files
committed
UNRATIFIED RISC-V: Add indirect CSR Access Extensions and its CSRs
[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.
1 parent 6c512c1 commit 41e1190

File tree

14 files changed

+613
-54
lines changed

14 files changed

+613
-54
lines changed

bfd/elfxx-riscv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,10 +1223,12 @@ static riscv_implicit_subset_t riscv_implicit_subsets[] =
12231223
{"zihpm", "zicsr", check_implicit_compat_counter_to_zicsr},
12241224
{"smaia", "ssaia", check_implicit_always},
12251225
{"smcntrpmf", "zicsr", check_implicit_always},
1226+
{"smcsrind", "zicsr", check_implicit_always},
12261227
{"smstateen", "ssstateen", check_implicit_always},
12271228
{"smepmp", "zicsr", check_implicit_always},
12281229
{"ssaia", "zicsr", check_implicit_always},
12291230
{"sscofpmf", "zicsr", check_implicit_always},
1231+
{"sscsrind", "zicsr", check_implicit_always},
12301232
{"ssstateen", "zicsr", check_implicit_always},
12311233
{"sstc", "zicsr", check_implicit_always},
12321234
{"svadu", "zicsr", check_implicit_always},
@@ -1378,10 +1380,12 @@ static struct riscv_supported_ext riscv_supported_std_s_ext[] =
13781380
{
13791381
{"smaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13801382
{"smcntrpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
1383+
{"smcsrind", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13811384
{"smepmp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13821385
{"smstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13831386
{"ssaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13841387
{"sscofpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
1388+
{"sscsrind", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13851389
{"ssstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13861390
{"sstc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13871391
{"svadu", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },

gas/config/tc-riscv.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,20 @@ enum riscv_csr_class
7878
CSR_CLASS_H_32, /* hypervisor, rv32 only */
7979
CSR_CLASS_SMAIA, /* Smaia */
8080
CSR_CLASS_SMAIA_32, /* Smaia, rv32 only */
81+
CSR_CLASS_SMAIA_OR_SMCSRIND, /* Smaia or Smcsrind */
8182
CSR_CLASS_SMCNTRPMF, /* Smcntrpmf */
8283
CSR_CLASS_SMCNTRPMF_32, /* Smcntrpmf, rv32 only */
84+
CSR_CLASS_SMCSRIND, /* Smcsrind */
8385
CSR_CLASS_SMSTATEEN, /* Smstateen only */
8486
CSR_CLASS_SMSTATEEN_32, /* Smstateen RV32 only */
8587
CSR_CLASS_SSAIA, /* Ssaia */
8688
CSR_CLASS_SSAIA_AND_H, /* Ssaia with H */
8789
CSR_CLASS_SSAIA_32, /* Ssaia, rv32 only */
8890
CSR_CLASS_SSAIA_AND_H_32, /* Ssaia with H, rv32 only */
91+
CSR_CLASS_SSAIA_OR_SSCSRIND, /* Ssaia or Sscsrind */
92+
CSR_CLASS_SSAIA_OR_SSCSRIND_AND_H, /* Ssaia or Sscsrind (with H) */
93+
CSR_CLASS_SSCSRIND, /* Sscsrind */
94+
CSR_CLASS_SSCSRIND_AND_H, /* Sscsrind (with H) */
8995
CSR_CLASS_SSSTATEEN, /* S[ms]stateen only */
9096
CSR_CLASS_SSSTATEEN_AND_H, /* S[ms]stateen only (with H) */
9197
CSR_CLASS_SSSTATEEN_AND_H_32, /* S[ms]stateen RV32 only (with H) */
@@ -1072,13 +1078,22 @@ riscv_csr_address (const char *csr_name,
10721078
case CSR_CLASS_SMAIA:
10731079
extension = "smaia";
10741080
break;
1081+
case CSR_CLASS_SMAIA_OR_SMCSRIND:
1082+
is_csr_req_complex = true;
1083+
extension = _ ("smaia' or `smcsrind");
1084+
csr_ok = (riscv_subset_supports (&riscv_rps_as, "smaia")
1085+
|| riscv_subset_supports (&riscv_rps_as, "smcsrind"));
1086+
break;
10751087
case CSR_CLASS_SMCNTRPMF_32:
10761088
is_rv32_only = true;
10771089
/* Fall through. */
10781090
case CSR_CLASS_SMCNTRPMF:
10791091
need_check_version = true;
10801092
extension = "smcntrpmf";
10811093
break;
1094+
case CSR_CLASS_SMCSRIND:
1095+
extension = "smcsrind";
1096+
break;
10821097
case CSR_CLASS_SMSTATEEN_32:
10831098
is_rv32_only = true;
10841099
/* Fall through. */
@@ -1110,6 +1125,21 @@ riscv_csr_address (const char *csr_name,
11101125
case CSR_CLASS_SSCOFPMF:
11111126
extension = "sscofpmf";
11121127
break;
1128+
case CSR_CLASS_SSAIA_OR_SSCSRIND_AND_H:
1129+
is_h_required = true;
1130+
/* Fall through. */
1131+
case CSR_CLASS_SSAIA_OR_SSCSRIND:
1132+
is_csr_req_complex = true;
1133+
extension = _ ("ssaia' or `sscsrind");
1134+
csr_ok = (riscv_subset_supports (&riscv_rps_as, "ssaia")
1135+
|| riscv_subset_supports (&riscv_rps_as, "sscsrind"));
1136+
break;
1137+
case CSR_CLASS_SSCSRIND_AND_H:
1138+
is_h_required = true;
1139+
/* Fall through. */
1140+
case CSR_CLASS_SSCSRIND:
1141+
extension = "sscsrind";
1142+
break;
11131143
case CSR_CLASS_SSTC:
11141144
case CSR_CLASS_SSTC_AND_H:
11151145
case CSR_CLASS_SSTC_32:

gas/testsuite/gas/riscv/csr-dw-regnums.d

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,11 @@ Contents of the .* section:
328328
DW_CFA_offset_extended_sf: r4898 \(minstretcfg\) at cfa\+3208
329329
DW_CFA_offset_extended_sf: r5921 \(mcyclecfgh\) at cfa\+7300
330330
DW_CFA_offset_extended_sf: r5922 \(minstretcfgh\) at cfa\+7304
331+
DW_CFA_offset_extended_sf: r4946 \(mireg2\) at cfa\+3400
332+
DW_CFA_offset_extended_sf: r4947 \(mireg3\) at cfa\+3404
333+
DW_CFA_offset_extended_sf: r4949 \(mireg4\) at cfa\+3412
334+
DW_CFA_offset_extended_sf: r4950 \(mireg5\) at cfa\+3416
335+
DW_CFA_offset_extended_sf: r4951 \(mireg6\) at cfa\+3420
331336
DW_CFA_offset_extended_sf: r4876 \(mstateen0\) at cfa\+3120
332337
DW_CFA_offset_extended_sf: r4877 \(mstateen1\) at cfa\+3124
333338
DW_CFA_offset_extended_sf: r4878 \(mstateen2\) at cfa\+3128
@@ -399,6 +404,16 @@ Contents of the .* section:
399404
DW_CFA_offset_extended_sf: r5949 \(mhpmevent29h\) at cfa\+7412
400405
DW_CFA_offset_extended_sf: r5950 \(mhpmevent30h\) at cfa\+7416
401406
DW_CFA_offset_extended_sf: r5951 \(mhpmevent31h\) at cfa\+7420
407+
DW_CFA_offset_extended_sf: r4434 \(sireg2\) at cfa\+1352
408+
DW_CFA_offset_extended_sf: r4435 \(sireg3\) at cfa\+1356
409+
DW_CFA_offset_extended_sf: r4437 \(sireg4\) at cfa\+1364
410+
DW_CFA_offset_extended_sf: r4438 \(sireg5\) at cfa\+1368
411+
DW_CFA_offset_extended_sf: r4439 \(sireg6\) at cfa\+1372
412+
DW_CFA_offset_extended_sf: r4690 \(vsireg2\) at cfa\+2376
413+
DW_CFA_offset_extended_sf: r4691 \(vsireg3\) at cfa\+2380
414+
DW_CFA_offset_extended_sf: r4693 \(vsireg4\) at cfa\+2388
415+
DW_CFA_offset_extended_sf: r4694 \(vsireg5\) at cfa\+2392
416+
DW_CFA_offset_extended_sf: r4695 \(vsireg6\) at cfa\+2396
402417
DW_CFA_offset_extended_sf: r4429 \(stimecmp\) at cfa\+1332
403418
DW_CFA_offset_extended_sf: r4445 \(stimecmph\) at cfa\+1396
404419
DW_CFA_offset_extended_sf: r4685 \(vstimecmp\) at cfa\+2356

gas/testsuite/gas/riscv/csr-dw-regnums.s

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,12 @@ _start:
326326
.cfi_offset minstretcfg, 3208
327327
.cfi_offset mcyclecfgh, 7300
328328
.cfi_offset minstretcfgh, 7304
329+
# Smcsrind extension (except miselect/mireg in Smaia)
330+
.cfi_offset mireg2, 3400
331+
.cfi_offset mireg3, 3404
332+
.cfi_offset mireg4, 3412
333+
.cfi_offset mireg5, 3416
334+
.cfi_offset mireg6, 3420
329335
# Smstateen extension
330336
.cfi_offset mstateen0, 3120
331337
.cfi_offset mstateen1, 3124
@@ -400,6 +406,17 @@ _start:
400406
.cfi_offset mhpmevent29h, 7412
401407
.cfi_offset mhpmevent30h, 7416
402408
.cfi_offset mhpmevent31h, 7420
409+
# Sscsrind extension (except {v,}si{select,reg} in Ssaia)
410+
.cfi_offset sireg2, 1352
411+
.cfi_offset sireg3, 1356
412+
.cfi_offset sireg4, 1364
413+
.cfi_offset sireg5, 1368
414+
.cfi_offset sireg6, 1372
415+
.cfi_offset vsireg2, 2376
416+
.cfi_offset vsireg3, 2380
417+
.cfi_offset vsireg4, 2388
418+
.cfi_offset vsireg5, 2392
419+
.cfi_offset vsireg6, 2396
403420
# Sstc extension
404421
.cfi_offset stimecmp, 1332
405422
.cfi_offset stimecmph, 1396

gas/testsuite/gas/riscv/csr-version-1p10.d

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,16 @@ Disassembly of section .text:
631631
[ ]+[0-9a-f]+:[ ]+72159073[ ]+csrw[ ]+mcyclecfgh,a1
632632
[ ]+[0-9a-f]+:[ ]+72202573[ ]+csrr[ ]+a0,minstretcfgh
633633
[ ]+[0-9a-f]+:[ ]+72259073[ ]+csrw[ ]+minstretcfgh,a1
634+
[ ]+[0-9a-f]+:[ ]+35202573[ ]+csrr[ ]+a0,mireg2
635+
[ ]+[0-9a-f]+:[ ]+35259073[ ]+csrw[ ]+mireg2,a1
636+
[ ]+[0-9a-f]+:[ ]+35302573[ ]+csrr[ ]+a0,mireg3
637+
[ ]+[0-9a-f]+:[ ]+35359073[ ]+csrw[ ]+mireg3,a1
638+
[ ]+[0-9a-f]+:[ ]+35502573[ ]+csrr[ ]+a0,mireg4
639+
[ ]+[0-9a-f]+:[ ]+35559073[ ]+csrw[ ]+mireg4,a1
640+
[ ]+[0-9a-f]+:[ ]+35602573[ ]+csrr[ ]+a0,mireg5
641+
[ ]+[0-9a-f]+:[ ]+35659073[ ]+csrw[ ]+mireg5,a1
642+
[ ]+[0-9a-f]+:[ ]+35702573[ ]+csrr[ ]+a0,mireg6
643+
[ ]+[0-9a-f]+:[ ]+35759073[ ]+csrw[ ]+mireg6,a1
634644
[ ]+[0-9a-f]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
635645
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
636646
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
@@ -773,6 +783,26 @@ Disassembly of section .text:
773783
[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1
774784
[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h
775785
[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1
786+
[ ]+[0-9a-f]+:[ ]+15202573[ ]+csrr[ ]+a0,sireg2
787+
[ ]+[0-9a-f]+:[ ]+15259073[ ]+csrw[ ]+sireg2,a1
788+
[ ]+[0-9a-f]+:[ ]+15302573[ ]+csrr[ ]+a0,sireg3
789+
[ ]+[0-9a-f]+:[ ]+15359073[ ]+csrw[ ]+sireg3,a1
790+
[ ]+[0-9a-f]+:[ ]+15502573[ ]+csrr[ ]+a0,sireg4
791+
[ ]+[0-9a-f]+:[ ]+15559073[ ]+csrw[ ]+sireg4,a1
792+
[ ]+[0-9a-f]+:[ ]+15602573[ ]+csrr[ ]+a0,sireg5
793+
[ ]+[0-9a-f]+:[ ]+15659073[ ]+csrw[ ]+sireg5,a1
794+
[ ]+[0-9a-f]+:[ ]+15702573[ ]+csrr[ ]+a0,sireg6
795+
[ ]+[0-9a-f]+:[ ]+15759073[ ]+csrw[ ]+sireg6,a1
796+
[ ]+[0-9a-f]+:[ ]+25202573[ ]+csrr[ ]+a0,vsireg2
797+
[ ]+[0-9a-f]+:[ ]+25259073[ ]+csrw[ ]+vsireg2,a1
798+
[ ]+[0-9a-f]+:[ ]+25302573[ ]+csrr[ ]+a0,vsireg3
799+
[ ]+[0-9a-f]+:[ ]+25359073[ ]+csrw[ ]+vsireg3,a1
800+
[ ]+[0-9a-f]+:[ ]+25502573[ ]+csrr[ ]+a0,vsireg4
801+
[ ]+[0-9a-f]+:[ ]+25559073[ ]+csrw[ ]+vsireg4,a1
802+
[ ]+[0-9a-f]+:[ ]+25602573[ ]+csrr[ ]+a0,vsireg5
803+
[ ]+[0-9a-f]+:[ ]+25659073[ ]+csrw[ ]+vsireg5,a1
804+
[ ]+[0-9a-f]+:[ ]+25702573[ ]+csrr[ ]+a0,vsireg6
805+
[ ]+[0-9a-f]+:[ ]+25759073[ ]+csrw[ ]+vsireg6,a1
776806
[ ]+[0-9a-f]+:[ ]+14d02573[ ]+csrr[ ]+a0,stimecmp
777807
[ ]+[0-9a-f]+:[ ]+14d59073[ ]+csrw[ ]+stimecmp,a1
778808
[ ]+[0-9a-f]+:[ ]+15d02573[ ]+csrr[ ]+a0,stimecmph

gas/testsuite/gas/riscv/csr-version-1p10.l

Lines changed: 92 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -823,13 +823,13 @@
823823
.*Info: macro .*
824824
.*Warning: invalid CSR `vsatp', needs `h' extension
825825
.*Info: macro .*
826-
.*Warning: invalid CSR `miselect', needs `smaia' extension
826+
.*Warning: invalid CSR `miselect', needs `smaia' or `smcsrind' extension
827827
.*Info: macro .*
828-
.*Warning: invalid CSR `miselect', needs `smaia' extension
828+
.*Warning: invalid CSR `miselect', needs `smaia' or `smcsrind' extension
829829
.*Info: macro .*
830-
.*Warning: invalid CSR `mireg', needs `smaia' extension
830+
.*Warning: invalid CSR `mireg', needs `smaia' or `smcsrind' extension
831831
.*Info: macro .*
832-
.*Warning: invalid CSR `mireg', needs `smaia' extension
832+
.*Warning: invalid CSR `mireg', needs `smaia' or `smcsrind' extension
833833
.*Info: macro .*
834834
.*Warning: invalid CSR `mtopei', needs `smaia' extension
835835
.*Info: macro .*
@@ -913,6 +913,26 @@
913913
.*Info: macro .*
914914
.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
915915
.*Info: macro .*
916+
.*Warning: invalid CSR `mireg2', needs `smcsrind' extension
917+
.*Info: macro .*
918+
.*Warning: invalid CSR `mireg2', needs `smcsrind' extension
919+
.*Info: macro .*
920+
.*Warning: invalid CSR `mireg3', needs `smcsrind' extension
921+
.*Info: macro .*
922+
.*Warning: invalid CSR `mireg3', needs `smcsrind' extension
923+
.*Info: macro .*
924+
.*Warning: invalid CSR `mireg4', needs `smcsrind' extension
925+
.*Info: macro .*
926+
.*Warning: invalid CSR `mireg4', needs `smcsrind' extension
927+
.*Info: macro .*
928+
.*Warning: invalid CSR `mireg5', needs `smcsrind' extension
929+
.*Info: macro .*
930+
.*Warning: invalid CSR `mireg5', needs `smcsrind' extension
931+
.*Info: macro .*
932+
.*Warning: invalid CSR `mireg6', needs `smcsrind' extension
933+
.*Info: macro .*
934+
.*Warning: invalid CSR `mireg6', needs `smcsrind' extension
935+
.*Info: macro .*
916936
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
917937
.*Info: macro .*
918938
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
@@ -1057,13 +1077,13 @@
10571077
.*Info: macro .*
10581078
.*Warning: invalid CSR `hstateen3h', needs `ssstateen' extension
10591079
.*Info: macro .*
1060-
.*Warning: invalid CSR `siselect', needs `ssaia' extension
1080+
.*Warning: invalid CSR `siselect', needs `ssaia' or `sscsrind' extension
10611081
.*Info: macro .*
1062-
.*Warning: invalid CSR `siselect', needs `ssaia' extension
1082+
.*Warning: invalid CSR `siselect', needs `ssaia' or `sscsrind' extension
10631083
.*Info: macro .*
1064-
.*Warning: invalid CSR `sireg', needs `ssaia' extension
1084+
.*Warning: invalid CSR `sireg', needs `ssaia' or `sscsrind' extension
10651085
.*Info: macro .*
1066-
.*Warning: invalid CSR `sireg', needs `ssaia' extension
1086+
.*Warning: invalid CSR `sireg', needs `ssaia' or `sscsrind' extension
10671087
.*Info: macro .*
10681088
.*Warning: invalid CSR `stopei', needs `ssaia' extension
10691089
.*Info: macro .*
@@ -1125,19 +1145,19 @@
11251145
.*Info: macro .*
11261146
.*Warning: invalid CSR `vsiselect', needs `h' extension
11271147
.*Info: macro .*
1128-
.*Warning: invalid CSR `vsiselect', needs `ssaia' extension
1148+
.*Warning: invalid CSR `vsiselect', needs `ssaia' or `sscsrind' extension
11291149
.*Info: macro .*
11301150
.*Warning: invalid CSR `vsiselect', needs `h' extension
11311151
.*Info: macro .*
1132-
.*Warning: invalid CSR `vsiselect', needs `ssaia' extension
1152+
.*Warning: invalid CSR `vsiselect', needs `ssaia' or `sscsrind' extension
11331153
.*Info: macro .*
11341154
.*Warning: invalid CSR `vsireg', needs `h' extension
11351155
.*Info: macro .*
1136-
.*Warning: invalid CSR `vsireg', needs `ssaia' extension
1156+
.*Warning: invalid CSR `vsireg', needs `ssaia' or `sscsrind' extension
11371157
.*Info: macro .*
11381158
.*Warning: invalid CSR `vsireg', needs `h' extension
11391159
.*Info: macro .*
1140-
.*Warning: invalid CSR `vsireg', needs `ssaia' extension
1160+
.*Warning: invalid CSR `vsireg', needs `ssaia' or `sscsrind' extension
11411161
.*Info: macro .*
11421162
.*Warning: invalid CSR `vstopei', needs `h' extension
11431163
.*Info: macro .*
@@ -1479,6 +1499,66 @@
14791499
.*Info: macro .*
14801500
.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension
14811501
.*Info: macro .*
1502+
.*Warning: invalid CSR `sireg2', needs `sscsrind' extension
1503+
.*Info: macro .*
1504+
.*Warning: invalid CSR `sireg2', needs `sscsrind' extension
1505+
.*Info: macro .*
1506+
.*Warning: invalid CSR `sireg3', needs `sscsrind' extension
1507+
.*Info: macro .*
1508+
.*Warning: invalid CSR `sireg3', needs `sscsrind' extension
1509+
.*Info: macro .*
1510+
.*Warning: invalid CSR `sireg4', needs `sscsrind' extension
1511+
.*Info: macro .*
1512+
.*Warning: invalid CSR `sireg4', needs `sscsrind' extension
1513+
.*Info: macro .*
1514+
.*Warning: invalid CSR `sireg5', needs `sscsrind' extension
1515+
.*Info: macro .*
1516+
.*Warning: invalid CSR `sireg5', needs `sscsrind' extension
1517+
.*Info: macro .*
1518+
.*Warning: invalid CSR `sireg6', needs `sscsrind' extension
1519+
.*Info: macro .*
1520+
.*Warning: invalid CSR `sireg6', needs `sscsrind' extension
1521+
.*Info: macro .*
1522+
.*Warning: invalid CSR `vsireg2', needs `h' extension
1523+
.*Info: macro .*
1524+
.*Warning: invalid CSR `vsireg2', needs `sscsrind' extension
1525+
.*Info: macro .*
1526+
.*Warning: invalid CSR `vsireg2', needs `h' extension
1527+
.*Info: macro .*
1528+
.*Warning: invalid CSR `vsireg2', needs `sscsrind' extension
1529+
.*Info: macro .*
1530+
.*Warning: invalid CSR `vsireg3', needs `h' extension
1531+
.*Info: macro .*
1532+
.*Warning: invalid CSR `vsireg3', needs `sscsrind' extension
1533+
.*Info: macro .*
1534+
.*Warning: invalid CSR `vsireg3', needs `h' extension
1535+
.*Info: macro .*
1536+
.*Warning: invalid CSR `vsireg3', needs `sscsrind' extension
1537+
.*Info: macro .*
1538+
.*Warning: invalid CSR `vsireg4', needs `h' extension
1539+
.*Info: macro .*
1540+
.*Warning: invalid CSR `vsireg4', needs `sscsrind' extension
1541+
.*Info: macro .*
1542+
.*Warning: invalid CSR `vsireg4', needs `h' extension
1543+
.*Info: macro .*
1544+
.*Warning: invalid CSR `vsireg4', needs `sscsrind' extension
1545+
.*Info: macro .*
1546+
.*Warning: invalid CSR `vsireg5', needs `h' extension
1547+
.*Info: macro .*
1548+
.*Warning: invalid CSR `vsireg5', needs `sscsrind' extension
1549+
.*Info: macro .*
1550+
.*Warning: invalid CSR `vsireg5', needs `h' extension
1551+
.*Info: macro .*
1552+
.*Warning: invalid CSR `vsireg5', needs `sscsrind' extension
1553+
.*Info: macro .*
1554+
.*Warning: invalid CSR `vsireg6', needs `h' extension
1555+
.*Info: macro .*
1556+
.*Warning: invalid CSR `vsireg6', needs `sscsrind' extension
1557+
.*Info: macro .*
1558+
.*Warning: invalid CSR `vsireg6', needs `h' extension
1559+
.*Info: macro .*
1560+
.*Warning: invalid CSR `vsireg6', needs `sscsrind' extension
1561+
.*Info: macro .*
14821562
.*Warning: invalid CSR `stimecmp', needs `sstc' extension
14831563
.*Info: macro .*
14841564
.*Warning: invalid CSR `stimecmp', needs `sstc' extension

gas/testsuite/gas/riscv/csr-version-1p11.d

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,16 @@ Disassembly of section .text:
631631
[ ]+[0-9a-f]+:[ ]+72159073[ ]+csrw[ ]+mcyclecfgh,a1
632632
[ ]+[0-9a-f]+:[ ]+72202573[ ]+csrr[ ]+a0,minstretcfgh
633633
[ ]+[0-9a-f]+:[ ]+72259073[ ]+csrw[ ]+minstretcfgh,a1
634+
[ ]+[0-9a-f]+:[ ]+35202573[ ]+csrr[ ]+a0,mireg2
635+
[ ]+[0-9a-f]+:[ ]+35259073[ ]+csrw[ ]+mireg2,a1
636+
[ ]+[0-9a-f]+:[ ]+35302573[ ]+csrr[ ]+a0,mireg3
637+
[ ]+[0-9a-f]+:[ ]+35359073[ ]+csrw[ ]+mireg3,a1
638+
[ ]+[0-9a-f]+:[ ]+35502573[ ]+csrr[ ]+a0,mireg4
639+
[ ]+[0-9a-f]+:[ ]+35559073[ ]+csrw[ ]+mireg4,a1
640+
[ ]+[0-9a-f]+:[ ]+35602573[ ]+csrr[ ]+a0,mireg5
641+
[ ]+[0-9a-f]+:[ ]+35659073[ ]+csrw[ ]+mireg5,a1
642+
[ ]+[0-9a-f]+:[ ]+35702573[ ]+csrr[ ]+a0,mireg6
643+
[ ]+[0-9a-f]+:[ ]+35759073[ ]+csrw[ ]+mireg6,a1
634644
[ ]+[0-9a-f]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
635645
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
636646
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
@@ -773,6 +783,26 @@ Disassembly of section .text:
773783
[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1
774784
[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h
775785
[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1
786+
[ ]+[0-9a-f]+:[ ]+15202573[ ]+csrr[ ]+a0,sireg2
787+
[ ]+[0-9a-f]+:[ ]+15259073[ ]+csrw[ ]+sireg2,a1
788+
[ ]+[0-9a-f]+:[ ]+15302573[ ]+csrr[ ]+a0,sireg3
789+
[ ]+[0-9a-f]+:[ ]+15359073[ ]+csrw[ ]+sireg3,a1
790+
[ ]+[0-9a-f]+:[ ]+15502573[ ]+csrr[ ]+a0,sireg4
791+
[ ]+[0-9a-f]+:[ ]+15559073[ ]+csrw[ ]+sireg4,a1
792+
[ ]+[0-9a-f]+:[ ]+15602573[ ]+csrr[ ]+a0,sireg5
793+
[ ]+[0-9a-f]+:[ ]+15659073[ ]+csrw[ ]+sireg5,a1
794+
[ ]+[0-9a-f]+:[ ]+15702573[ ]+csrr[ ]+a0,sireg6
795+
[ ]+[0-9a-f]+:[ ]+15759073[ ]+csrw[ ]+sireg6,a1
796+
[ ]+[0-9a-f]+:[ ]+25202573[ ]+csrr[ ]+a0,vsireg2
797+
[ ]+[0-9a-f]+:[ ]+25259073[ ]+csrw[ ]+vsireg2,a1
798+
[ ]+[0-9a-f]+:[ ]+25302573[ ]+csrr[ ]+a0,vsireg3
799+
[ ]+[0-9a-f]+:[ ]+25359073[ ]+csrw[ ]+vsireg3,a1
800+
[ ]+[0-9a-f]+:[ ]+25502573[ ]+csrr[ ]+a0,vsireg4
801+
[ ]+[0-9a-f]+:[ ]+25559073[ ]+csrw[ ]+vsireg4,a1
802+
[ ]+[0-9a-f]+:[ ]+25602573[ ]+csrr[ ]+a0,vsireg5
803+
[ ]+[0-9a-f]+:[ ]+25659073[ ]+csrw[ ]+vsireg5,a1
804+
[ ]+[0-9a-f]+:[ ]+25702573[ ]+csrr[ ]+a0,vsireg6
805+
[ ]+[0-9a-f]+:[ ]+25759073[ ]+csrw[ ]+vsireg6,a1
776806
[ ]+[0-9a-f]+:[ ]+14d02573[ ]+csrr[ ]+a0,stimecmp
777807
[ ]+[0-9a-f]+:[ ]+14d59073[ ]+csrw[ ]+stimecmp,a1
778808
[ ]+[0-9a-f]+:[ ]+15d02573[ ]+csrr[ ]+a0,stimecmph

0 commit comments

Comments
 (0)