Skip to content

Commit f91fa2f

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 version 0.1 as placeholder 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 beb3c11 commit f91fa2f

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
@@ -1183,10 +1183,12 @@ static struct riscv_implicit_subset riscv_implicit_subsets[] =
11831183
{"zcd", "zca", check_implicit_always},
11841184
{"zcb", "zca", check_implicit_always},
11851185
{"smaia", "ssaia", check_implicit_always},
1186+
{"smcsrind", "zicsr", check_implicit_always},
11861187
{"smstateen", "ssstateen", check_implicit_always},
11871188
{"smepmp", "zicsr", check_implicit_always},
11881189
{"ssaia", "zicsr", check_implicit_always},
11891190
{"sscofpmf", "zicsr", check_implicit_always},
1191+
{"sscsrind", "zicsr", check_implicit_always},
11901192
{"ssstateen", "zicsr", check_implicit_always},
11911193
{"sstc", "zicsr", check_implicit_always},
11921194
{NULL, NULL, NULL}
@@ -1327,10 +1329,12 @@ static struct riscv_supported_ext riscv_supported_std_z_ext[] =
13271329
static struct riscv_supported_ext riscv_supported_std_s_ext[] =
13281330
{
13291331
{"smaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
1332+
{"smcsrind", ISA_SPEC_CLASS_DRAFT, 0, 1, 0 },
13301333
{"smepmp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13311334
{"smstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13321335
{"ssaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13331336
{"sscofpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
1337+
{"sscsrind", ISA_SPEC_CLASS_DRAFT, 0, 1, 0 },
13341338
{"ssstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13351339
{"sstc", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
13361340
{"svinval", 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
@@ -74,12 +74,18 @@ enum riscv_csr_class
7474
CSR_CLASS_H_32, /* hypervisor, rv32 only */
7575
CSR_CLASS_SMAIA, /* Smaia */
7676
CSR_CLASS_SMAIA_32, /* Smaia, rv32 only */
77+
CSR_CLASS_SMAIA_OR_SMCSRIND, /* Smaia or Smcsrind */
78+
CSR_CLASS_SMCSRIND, /* Smcsrind */
7779
CSR_CLASS_SMSTATEEN, /* Smstateen only */
7880
CSR_CLASS_SMSTATEEN_32, /* Smstateen RV32 only */
7981
CSR_CLASS_SSAIA, /* Ssaia */
8082
CSR_CLASS_SSAIA_AND_H, /* Ssaia with H */
8183
CSR_CLASS_SSAIA_32, /* Ssaia, rv32 only */
8284
CSR_CLASS_SSAIA_AND_H_32, /* Ssaia with H, rv32 only */
85+
CSR_CLASS_SSAIA_OR_SSCSRIND, /* Ssaia or Sscsrind */
86+
CSR_CLASS_SSAIA_OR_SSCSRIND_AND_H, /* Ssaia or Sscsrind (with H) */
87+
CSR_CLASS_SSCSRIND, /* Sscsrind */
88+
CSR_CLASS_SSCSRIND_AND_H, /* Sscsrind (with H) */
8389
CSR_CLASS_SSSTATEEN, /* S[ms]stateen only */
8490
CSR_CLASS_SSSTATEEN_AND_H, /* S[ms]stateen only (with H) */
8591
CSR_CLASS_SSSTATEEN_AND_H_32, /* S[ms]stateen RV32 only (with H) */
@@ -1054,6 +1060,15 @@ riscv_csr_address (const char *csr_name,
10541060
case CSR_CLASS_SMAIA:
10551061
extension = "smaia";
10561062
break;
1063+
case CSR_CLASS_SMAIA_OR_SMCSRIND:
1064+
is_csr_req_complex = true;
1065+
extension = _ ("smaia' or `smcsrind");
1066+
csr_ok = (riscv_subset_supports (&riscv_rps_as, "smaia")
1067+
|| riscv_subset_supports (&riscv_rps_as, "smcsrind"));
1068+
break;
1069+
case CSR_CLASS_SMCSRIND:
1070+
extension = "smcsrind";
1071+
break;
10571072
case CSR_CLASS_SMSTATEEN_32:
10581073
is_rv32_only = true;
10591074
/* Fall through. */
@@ -1085,6 +1100,21 @@ riscv_csr_address (const char *csr_name,
10851100
case CSR_CLASS_SSCOFPMF:
10861101
extension = "sscofpmf";
10871102
break;
1103+
case CSR_CLASS_SSAIA_OR_SSCSRIND_AND_H:
1104+
is_h_required = true;
1105+
/* Fall through. */
1106+
case CSR_CLASS_SSAIA_OR_SSCSRIND:
1107+
is_csr_req_complex = true;
1108+
extension = _ ("ssaia' or `sscsrind");
1109+
csr_ok = (riscv_subset_supports (&riscv_rps_as, "ssaia")
1110+
|| riscv_subset_supports (&riscv_rps_as, "sscsrind"));
1111+
break;
1112+
case CSR_CLASS_SSCSRIND_AND_H:
1113+
is_h_required = true;
1114+
/* Fall through. */
1115+
case CSR_CLASS_SSCSRIND:
1116+
extension = "sscsrind";
1117+
break;
10881118
case CSR_CLASS_SSTC:
10891119
case CSR_CLASS_SSTC_AND_H:
10901120
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
@@ -324,6 +324,11 @@ Contents of the .* section:
324324
DW_CFA_offset_extended_sf: r4888 \(mvienh\) at cfa\+3168
325325
DW_CFA_offset_extended_sf: r4889 \(mviph\) at cfa\+3172
326326
DW_CFA_offset_extended_sf: r4948 \(miph\) at cfa\+3408
327+
DW_CFA_offset_extended_sf: r4946 \(mireg2\) at cfa\+3400
328+
DW_CFA_offset_extended_sf: r4947 \(mireg3\) at cfa\+3404
329+
DW_CFA_offset_extended_sf: r4949 \(mireg4\) at cfa\+3412
330+
DW_CFA_offset_extended_sf: r4950 \(mireg5\) at cfa\+3416
331+
DW_CFA_offset_extended_sf: r4951 \(mireg6\) at cfa\+3420
327332
DW_CFA_offset_extended_sf: r4876 \(mstateen0\) at cfa\+3120
328333
DW_CFA_offset_extended_sf: r4877 \(mstateen1\) at cfa\+3124
329334
DW_CFA_offset_extended_sf: r4878 \(mstateen2\) at cfa\+3128
@@ -395,6 +400,16 @@ Contents of the .* section:
395400
DW_CFA_offset_extended_sf: r5949 \(mhpmevent29h\) at cfa\+7412
396401
DW_CFA_offset_extended_sf: r5950 \(mhpmevent30h\) at cfa\+7416
397402
DW_CFA_offset_extended_sf: r5951 \(mhpmevent31h\) at cfa\+7420
403+
DW_CFA_offset_extended_sf: r4434 \(sireg2\) at cfa\+1352
404+
DW_CFA_offset_extended_sf: r4435 \(sireg3\) at cfa\+1356
405+
DW_CFA_offset_extended_sf: r4437 \(sireg4\) at cfa\+1364
406+
DW_CFA_offset_extended_sf: r4438 \(sireg5\) at cfa\+1368
407+
DW_CFA_offset_extended_sf: r4439 \(sireg6\) at cfa\+1372
408+
DW_CFA_offset_extended_sf: r4690 \(vsireg2\) at cfa\+2376
409+
DW_CFA_offset_extended_sf: r4691 \(vsireg3\) at cfa\+2380
410+
DW_CFA_offset_extended_sf: r4693 \(vsireg4\) at cfa\+2388
411+
DW_CFA_offset_extended_sf: r4694 \(vsireg5\) at cfa\+2392
412+
DW_CFA_offset_extended_sf: r4695 \(vsireg6\) at cfa\+2396
398413
DW_CFA_offset_extended_sf: r4429 \(stimecmp\) at cfa\+1332
399414
DW_CFA_offset_extended_sf: r4445 \(stimecmph\) at cfa\+1396
400415
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
@@ -321,6 +321,12 @@ _start:
321321
.cfi_offset mvienh, 3168
322322
.cfi_offset mviph, 3172
323323
.cfi_offset miph, 3408
324+
# Smcsrind extension (except miselect/mireg in Smaia)
325+
.cfi_offset mireg2, 3400
326+
.cfi_offset mireg3, 3404
327+
.cfi_offset mireg4, 3412
328+
.cfi_offset mireg5, 3416
329+
.cfi_offset mireg6, 3420
324330
# Smstateen extension
325331
.cfi_offset mstateen0, 3120
326332
.cfi_offset mstateen1, 3124
@@ -395,6 +401,17 @@ _start:
395401
.cfi_offset mhpmevent29h, 7412
396402
.cfi_offset mhpmevent30h, 7416
397403
.cfi_offset mhpmevent31h, 7420
404+
# Sscsrind extension (except {v,}si{select,reg} in Ssaia)
405+
.cfi_offset sireg2, 1352
406+
.cfi_offset sireg3, 1356
407+
.cfi_offset sireg4, 1364
408+
.cfi_offset sireg5, 1368
409+
.cfi_offset sireg6, 1372
410+
.cfi_offset vsireg2, 2376
411+
.cfi_offset vsireg3, 2380
412+
.cfi_offset vsireg4, 2388
413+
.cfi_offset vsireg5, 2392
414+
.cfi_offset vsireg6, 2396
398415
# Sstc extension
399416
.cfi_offset stimecmp, 1332
400417
.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
@@ -623,6 +623,16 @@ Disassembly of section .text:
623623
[ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1
624624
[ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph
625625
[ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1
626+
[ ]+[0-9a-f]+:[ ]+35202573[ ]+csrr[ ]+a0,mireg2
627+
[ ]+[0-9a-f]+:[ ]+35259073[ ]+csrw[ ]+mireg2,a1
628+
[ ]+[0-9a-f]+:[ ]+35302573[ ]+csrr[ ]+a0,mireg3
629+
[ ]+[0-9a-f]+:[ ]+35359073[ ]+csrw[ ]+mireg3,a1
630+
[ ]+[0-9a-f]+:[ ]+35502573[ ]+csrr[ ]+a0,mireg4
631+
[ ]+[0-9a-f]+:[ ]+35559073[ ]+csrw[ ]+mireg4,a1
632+
[ ]+[0-9a-f]+:[ ]+35602573[ ]+csrr[ ]+a0,mireg5
633+
[ ]+[0-9a-f]+:[ ]+35659073[ ]+csrw[ ]+mireg5,a1
634+
[ ]+[0-9a-f]+:[ ]+35702573[ ]+csrr[ ]+a0,mireg6
635+
[ ]+[0-9a-f]+:[ ]+35759073[ ]+csrw[ ]+mireg6,a1
626636
[ ]+[0-9a-f]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
627637
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
628638
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
@@ -765,6 +775,26 @@ Disassembly of section .text:
765775
[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1
766776
[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h
767777
[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1
778+
[ ]+[0-9a-f]+:[ ]+15202573[ ]+csrr[ ]+a0,sireg2
779+
[ ]+[0-9a-f]+:[ ]+15259073[ ]+csrw[ ]+sireg2,a1
780+
[ ]+[0-9a-f]+:[ ]+15302573[ ]+csrr[ ]+a0,sireg3
781+
[ ]+[0-9a-f]+:[ ]+15359073[ ]+csrw[ ]+sireg3,a1
782+
[ ]+[0-9a-f]+:[ ]+15502573[ ]+csrr[ ]+a0,sireg4
783+
[ ]+[0-9a-f]+:[ ]+15559073[ ]+csrw[ ]+sireg4,a1
784+
[ ]+[0-9a-f]+:[ ]+15602573[ ]+csrr[ ]+a0,sireg5
785+
[ ]+[0-9a-f]+:[ ]+15659073[ ]+csrw[ ]+sireg5,a1
786+
[ ]+[0-9a-f]+:[ ]+15702573[ ]+csrr[ ]+a0,sireg6
787+
[ ]+[0-9a-f]+:[ ]+15759073[ ]+csrw[ ]+sireg6,a1
788+
[ ]+[0-9a-f]+:[ ]+25202573[ ]+csrr[ ]+a0,vsireg2
789+
[ ]+[0-9a-f]+:[ ]+25259073[ ]+csrw[ ]+vsireg2,a1
790+
[ ]+[0-9a-f]+:[ ]+25302573[ ]+csrr[ ]+a0,vsireg3
791+
[ ]+[0-9a-f]+:[ ]+25359073[ ]+csrw[ ]+vsireg3,a1
792+
[ ]+[0-9a-f]+:[ ]+25502573[ ]+csrr[ ]+a0,vsireg4
793+
[ ]+[0-9a-f]+:[ ]+25559073[ ]+csrw[ ]+vsireg4,a1
794+
[ ]+[0-9a-f]+:[ ]+25602573[ ]+csrr[ ]+a0,vsireg5
795+
[ ]+[0-9a-f]+:[ ]+25659073[ ]+csrw[ ]+vsireg5,a1
796+
[ ]+[0-9a-f]+:[ ]+25702573[ ]+csrr[ ]+a0,vsireg6
797+
[ ]+[0-9a-f]+:[ ]+25759073[ ]+csrw[ ]+vsireg6,a1
768798
[ ]+[0-9a-f]+:[ ]+14d02573[ ]+csrr[ ]+a0,stimecmp
769799
[ ]+[0-9a-f]+:[ ]+14d59073[ ]+csrw[ ]+stimecmp,a1
770800
[ ]+[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 .*
@@ -889,6 +889,26 @@
889889
.*Info: macro .*
890890
.*Warning: invalid CSR `miph', needs `smaia' extension
891891
.*Info: macro .*
892+
.*Warning: invalid CSR `mireg2', needs `smcsrind' extension
893+
.*Info: macro .*
894+
.*Warning: invalid CSR `mireg2', needs `smcsrind' extension
895+
.*Info: macro .*
896+
.*Warning: invalid CSR `mireg3', needs `smcsrind' extension
897+
.*Info: macro .*
898+
.*Warning: invalid CSR `mireg3', needs `smcsrind' extension
899+
.*Info: macro .*
900+
.*Warning: invalid CSR `mireg4', needs `smcsrind' extension
901+
.*Info: macro .*
902+
.*Warning: invalid CSR `mireg4', needs `smcsrind' extension
903+
.*Info: macro .*
904+
.*Warning: invalid CSR `mireg5', needs `smcsrind' extension
905+
.*Info: macro .*
906+
.*Warning: invalid CSR `mireg5', needs `smcsrind' extension
907+
.*Info: macro .*
908+
.*Warning: invalid CSR `mireg6', needs `smcsrind' extension
909+
.*Info: macro .*
910+
.*Warning: invalid CSR `mireg6', needs `smcsrind' extension
911+
.*Info: macro .*
892912
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
893913
.*Info: macro .*
894914
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
@@ -1033,13 +1053,13 @@
10331053
.*Info: macro .*
10341054
.*Warning: invalid CSR `hstateen3h', needs `ssstateen' extension
10351055
.*Info: macro .*
1036-
.*Warning: invalid CSR `siselect', needs `ssaia' extension
1056+
.*Warning: invalid CSR `siselect', needs `ssaia' or `sscsrind' extension
10371057
.*Info: macro .*
1038-
.*Warning: invalid CSR `siselect', needs `ssaia' extension
1058+
.*Warning: invalid CSR `siselect', needs `ssaia' or `sscsrind' extension
10391059
.*Info: macro .*
1040-
.*Warning: invalid CSR `sireg', needs `ssaia' extension
1060+
.*Warning: invalid CSR `sireg', needs `ssaia' or `sscsrind' extension
10411061
.*Info: macro .*
1042-
.*Warning: invalid CSR `sireg', needs `ssaia' extension
1062+
.*Warning: invalid CSR `sireg', needs `ssaia' or `sscsrind' extension
10431063
.*Info: macro .*
10441064
.*Warning: invalid CSR `stopei', needs `ssaia' extension
10451065
.*Info: macro .*
@@ -1101,19 +1121,19 @@
11011121
.*Info: macro .*
11021122
.*Warning: invalid CSR `vsiselect', needs `h' extension
11031123
.*Info: macro .*
1104-
.*Warning: invalid CSR `vsiselect', needs `ssaia' extension
1124+
.*Warning: invalid CSR `vsiselect', needs `ssaia' or `sscsrind' extension
11051125
.*Info: macro .*
11061126
.*Warning: invalid CSR `vsiselect', needs `h' extension
11071127
.*Info: macro .*
1108-
.*Warning: invalid CSR `vsiselect', needs `ssaia' extension
1128+
.*Warning: invalid CSR `vsiselect', needs `ssaia' or `sscsrind' extension
11091129
.*Info: macro .*
11101130
.*Warning: invalid CSR `vsireg', needs `h' extension
11111131
.*Info: macro .*
1112-
.*Warning: invalid CSR `vsireg', needs `ssaia' extension
1132+
.*Warning: invalid CSR `vsireg', needs `ssaia' or `sscsrind' extension
11131133
.*Info: macro .*
11141134
.*Warning: invalid CSR `vsireg', needs `h' extension
11151135
.*Info: macro .*
1116-
.*Warning: invalid CSR `vsireg', needs `ssaia' extension
1136+
.*Warning: invalid CSR `vsireg', needs `ssaia' or `sscsrind' extension
11171137
.*Info: macro .*
11181138
.*Warning: invalid CSR `vstopei', needs `h' extension
11191139
.*Info: macro .*
@@ -1455,6 +1475,66 @@
14551475
.*Info: macro .*
14561476
.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension
14571477
.*Info: macro .*
1478+
.*Warning: invalid CSR `sireg2', needs `sscsrind' extension
1479+
.*Info: macro .*
1480+
.*Warning: invalid CSR `sireg2', needs `sscsrind' extension
1481+
.*Info: macro .*
1482+
.*Warning: invalid CSR `sireg3', needs `sscsrind' extension
1483+
.*Info: macro .*
1484+
.*Warning: invalid CSR `sireg3', needs `sscsrind' extension
1485+
.*Info: macro .*
1486+
.*Warning: invalid CSR `sireg4', needs `sscsrind' extension
1487+
.*Info: macro .*
1488+
.*Warning: invalid CSR `sireg4', needs `sscsrind' extension
1489+
.*Info: macro .*
1490+
.*Warning: invalid CSR `sireg5', needs `sscsrind' extension
1491+
.*Info: macro .*
1492+
.*Warning: invalid CSR `sireg5', needs `sscsrind' extension
1493+
.*Info: macro .*
1494+
.*Warning: invalid CSR `sireg6', needs `sscsrind' extension
1495+
.*Info: macro .*
1496+
.*Warning: invalid CSR `sireg6', needs `sscsrind' extension
1497+
.*Info: macro .*
1498+
.*Warning: invalid CSR `vsireg2', needs `h' extension
1499+
.*Info: macro .*
1500+
.*Warning: invalid CSR `vsireg2', needs `sscsrind' extension
1501+
.*Info: macro .*
1502+
.*Warning: invalid CSR `vsireg2', needs `h' extension
1503+
.*Info: macro .*
1504+
.*Warning: invalid CSR `vsireg2', needs `sscsrind' extension
1505+
.*Info: macro .*
1506+
.*Warning: invalid CSR `vsireg3', needs `h' extension
1507+
.*Info: macro .*
1508+
.*Warning: invalid CSR `vsireg3', needs `sscsrind' extension
1509+
.*Info: macro .*
1510+
.*Warning: invalid CSR `vsireg3', needs `h' extension
1511+
.*Info: macro .*
1512+
.*Warning: invalid CSR `vsireg3', needs `sscsrind' extension
1513+
.*Info: macro .*
1514+
.*Warning: invalid CSR `vsireg4', needs `h' extension
1515+
.*Info: macro .*
1516+
.*Warning: invalid CSR `vsireg4', needs `sscsrind' extension
1517+
.*Info: macro .*
1518+
.*Warning: invalid CSR `vsireg4', needs `h' extension
1519+
.*Info: macro .*
1520+
.*Warning: invalid CSR `vsireg4', needs `sscsrind' extension
1521+
.*Info: macro .*
1522+
.*Warning: invalid CSR `vsireg5', needs `h' extension
1523+
.*Info: macro .*
1524+
.*Warning: invalid CSR `vsireg5', needs `sscsrind' extension
1525+
.*Info: macro .*
1526+
.*Warning: invalid CSR `vsireg5', needs `h' extension
1527+
.*Info: macro .*
1528+
.*Warning: invalid CSR `vsireg5', needs `sscsrind' extension
1529+
.*Info: macro .*
1530+
.*Warning: invalid CSR `vsireg6', needs `h' extension
1531+
.*Info: macro .*
1532+
.*Warning: invalid CSR `vsireg6', needs `sscsrind' extension
1533+
.*Info: macro .*
1534+
.*Warning: invalid CSR `vsireg6', needs `h' extension
1535+
.*Info: macro .*
1536+
.*Warning: invalid CSR `vsireg6', needs `sscsrind' extension
1537+
.*Info: macro .*
14581538
.*Warning: invalid CSR `stimecmp', needs `sstc' extension
14591539
.*Info: macro .*
14601540
.*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
@@ -623,6 +623,16 @@ Disassembly of section .text:
623623
[ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1
624624
[ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph
625625
[ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1
626+
[ ]+[0-9a-f]+:[ ]+35202573[ ]+csrr[ ]+a0,mireg2
627+
[ ]+[0-9a-f]+:[ ]+35259073[ ]+csrw[ ]+mireg2,a1
628+
[ ]+[0-9a-f]+:[ ]+35302573[ ]+csrr[ ]+a0,mireg3
629+
[ ]+[0-9a-f]+:[ ]+35359073[ ]+csrw[ ]+mireg3,a1
630+
[ ]+[0-9a-f]+:[ ]+35502573[ ]+csrr[ ]+a0,mireg4
631+
[ ]+[0-9a-f]+:[ ]+35559073[ ]+csrw[ ]+mireg4,a1
632+
[ ]+[0-9a-f]+:[ ]+35602573[ ]+csrr[ ]+a0,mireg5
633+
[ ]+[0-9a-f]+:[ ]+35659073[ ]+csrw[ ]+mireg5,a1
634+
[ ]+[0-9a-f]+:[ ]+35702573[ ]+csrr[ ]+a0,mireg6
635+
[ ]+[0-9a-f]+:[ ]+35759073[ ]+csrw[ ]+mireg6,a1
626636
[ ]+[0-9a-f]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
627637
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
628638
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
@@ -765,6 +775,26 @@ Disassembly of section .text:
765775
[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1
766776
[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h
767777
[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1
778+
[ ]+[0-9a-f]+:[ ]+15202573[ ]+csrr[ ]+a0,sireg2
779+
[ ]+[0-9a-f]+:[ ]+15259073[ ]+csrw[ ]+sireg2,a1
780+
[ ]+[0-9a-f]+:[ ]+15302573[ ]+csrr[ ]+a0,sireg3
781+
[ ]+[0-9a-f]+:[ ]+15359073[ ]+csrw[ ]+sireg3,a1
782+
[ ]+[0-9a-f]+:[ ]+15502573[ ]+csrr[ ]+a0,sireg4
783+
[ ]+[0-9a-f]+:[ ]+15559073[ ]+csrw[ ]+sireg4,a1
784+
[ ]+[0-9a-f]+:[ ]+15602573[ ]+csrr[ ]+a0,sireg5
785+
[ ]+[0-9a-f]+:[ ]+15659073[ ]+csrw[ ]+sireg5,a1
786+
[ ]+[0-9a-f]+:[ ]+15702573[ ]+csrr[ ]+a0,sireg6
787+
[ ]+[0-9a-f]+:[ ]+15759073[ ]+csrw[ ]+sireg6,a1
788+
[ ]+[0-9a-f]+:[ ]+25202573[ ]+csrr[ ]+a0,vsireg2
789+
[ ]+[0-9a-f]+:[ ]+25259073[ ]+csrw[ ]+vsireg2,a1
790+
[ ]+[0-9a-f]+:[ ]+25302573[ ]+csrr[ ]+a0,vsireg3
791+
[ ]+[0-9a-f]+:[ ]+25359073[ ]+csrw[ ]+vsireg3,a1
792+
[ ]+[0-9a-f]+:[ ]+25502573[ ]+csrr[ ]+a0,vsireg4
793+
[ ]+[0-9a-f]+:[ ]+25559073[ ]+csrw[ ]+vsireg4,a1
794+
[ ]+[0-9a-f]+:[ ]+25602573[ ]+csrr[ ]+a0,vsireg5
795+
[ ]+[0-9a-f]+:[ ]+25659073[ ]+csrw[ ]+vsireg5,a1
796+
[ ]+[0-9a-f]+:[ ]+25702573[ ]+csrr[ ]+a0,vsireg6
797+
[ ]+[0-9a-f]+:[ ]+25759073[ ]+csrw[ ]+vsireg6,a1
768798
[ ]+[0-9a-f]+:[ ]+14d02573[ ]+csrr[ ]+a0,stimecmp
769799
[ ]+[0-9a-f]+:[ ]+14d59073[ ]+csrw[ ]+stimecmp,a1
770800
[ ]+[0-9a-f]+:[ ]+15d02573[ ]+csrr[ ]+a0,stimecmph

0 commit comments

Comments
 (0)