aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorTsukasa OI <research_trasio@irq.a4lg.com>2022-06-24 11:51:55 +0900
committerNelson Chu <nelson.chu@sifive.com>2022-06-28 09:08:06 +0800
commit713f370809b523277f8ecc69680ab591ce94da5e (patch)
treee2793913827eeee23319a9683ea1ead5f1a553cb /gas/testsuite
parent6af47b081ec0e93ad1d79c47a7f093db88f7653d (diff)
downloadgdb-713f370809b523277f8ecc69680ab591ce94da5e.zip
gdb-713f370809b523277f8ecc69680ab591ce94da5e.tar.gz
gdb-713f370809b523277f8ecc69680ab591ce94da5e.tar.bz2
RISC-V: Add 'Sscofpmf' extension with its CSRs
This commit adds Count Overflow and Mode-Based Filtering Extension (Sscofpmf) and its CSRs. bfd/ChangeLog: * elfxx-riscv.c (riscv_supported_std_s_ext): Add 'Sscofpmf' extension to valid 'S' extension list. gas/ChangeLog: * config/tc-riscv.c (enum riscv_csr_class): Add CSR classes for 'Sscofpmf' extension. (riscv_csr_address): Add handling for new CSR classes. * testsuite/gas/riscv/csr-dw-regnums.s: Add new CSRs. * testsuite/gas/riscv/csr-dw-regnums.d: Likewise. * testsuite/gas/riscv/csr.s: Add new CSRs. * testsuite/gas/riscv/csr-version-1p9p1.d: Likewise. * testsuite/gas/riscv/csr-version-1p9p1.l: Likewise. * testsuite/gas/riscv/csr-version-1p10.d: Likewise. * testsuite/gas/riscv/csr-version-1p10.l: Likewise. * testsuite/gas/riscv/csr-version-1p11.d: Likewise. * testsuite/gas/riscv/csr-version-1p11.l: Likewise. * testsuite/gas/riscv/csr-version-1p12.d: Likewise. * testsuite/gas/riscv/csr-version-1p12.l: Likewise. include/ChangeLog: * opcode/riscv-opc.h (CSR_SCOUNTOVF, CSR_MHPMEVENT3H, CSR_MHPMEVENT4H, CSR_MHPMEVENT5H, CSR_MHPMEVENT6H, CSR_MHPMEVENT7H, CSR_MHPMEVENT8H, CSR_MHPMEVENT9H, CSR_MHPMEVENT10H, CSR_MHPMEVENT11H, CSR_MHPMEVENT12H, CSR_MHPMEVENT13H, CSR_MHPMEVENT14H, CSR_MHPMEVENT15H, CSR_MHPMEVENT16H, CSR_MHPMEVENT17H, CSR_MHPMEVENT18H, CSR_MHPMEVENT19H, CSR_MHPMEVENT20H, CSR_MHPMEVENT21H, CSR_MHPMEVENT22H, CSR_MHPMEVENT23H, CSR_MHPMEVENT24H, CSR_MHPMEVENT25H, CSR_MHPMEVENT26H, CSR_MHPMEVENT27H, CSR_MHPMEVENT28H, CSR_MHPMEVENT29H, CSR_MHPMEVENT30H, CSR_MHPMEVENT31H): New CSR macros.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/riscv/csr-dw-regnums.d30
-rw-r--r--gas/testsuite/gas/riscv/csr-dw-regnums.s31
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p10.d60
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p10.l119
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p11.d60
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p11.l119
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p12.d60
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p12.l119
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p9p1.d60
-rw-r--r--gas/testsuite/gas/riscv/csr-version-1p9p1.l119
-rw-r--r--gas/testsuite/gas/riscv/csr.s32
11 files changed, 809 insertions, 0 deletions
diff --git a/gas/testsuite/gas/riscv/csr-dw-regnums.d b/gas/testsuite/gas/riscv/csr-dw-regnums.d
index 0c9ec6e..2f35329 100644
--- a/gas/testsuite/gas/riscv/csr-dw-regnums.d
+++ b/gas/testsuite/gas/riscv/csr-dw-regnums.d
@@ -333,6 +333,36 @@ Contents of the .* section:
DW_CFA_offset_extended_sf: r5661 \(hstateen1h\) at cfa\+6260
DW_CFA_offset_extended_sf: r5662 \(hstateen2h\) at cfa\+6264
DW_CFA_offset_extended_sf: r5663 \(hstateen3h\) at cfa\+6268
+ DW_CFA_offset_extended_sf: r7584 \(scountovf\) at cfa\+13952
+ DW_CFA_offset_extended_sf: r5923 \(mhpmevent3h\) at cfa\+7308
+ DW_CFA_offset_extended_sf: r5924 \(mhpmevent4h\) at cfa\+7312
+ DW_CFA_offset_extended_sf: r5925 \(mhpmevent5h\) at cfa\+7316
+ DW_CFA_offset_extended_sf: r5926 \(mhpmevent6h\) at cfa\+7320
+ DW_CFA_offset_extended_sf: r5927 \(mhpmevent7h\) at cfa\+7324
+ DW_CFA_offset_extended_sf: r5928 \(mhpmevent8h\) at cfa\+7328
+ DW_CFA_offset_extended_sf: r5929 \(mhpmevent9h\) at cfa\+7332
+ DW_CFA_offset_extended_sf: r5930 \(mhpmevent10h\) at cfa\+7336
+ DW_CFA_offset_extended_sf: r5931 \(mhpmevent11h\) at cfa\+7340
+ DW_CFA_offset_extended_sf: r5932 \(mhpmevent12h\) at cfa\+7344
+ DW_CFA_offset_extended_sf: r5933 \(mhpmevent13h\) at cfa\+7348
+ DW_CFA_offset_extended_sf: r5934 \(mhpmevent14h\) at cfa\+7352
+ DW_CFA_offset_extended_sf: r5935 \(mhpmevent15h\) at cfa\+7356
+ DW_CFA_offset_extended_sf: r5936 \(mhpmevent16h\) at cfa\+7360
+ DW_CFA_offset_extended_sf: r5937 \(mhpmevent17h\) at cfa\+7364
+ DW_CFA_offset_extended_sf: r5938 \(mhpmevent18h\) at cfa\+7368
+ DW_CFA_offset_extended_sf: r5939 \(mhpmevent19h\) at cfa\+7372
+ DW_CFA_offset_extended_sf: r5940 \(mhpmevent20h\) at cfa\+7376
+ DW_CFA_offset_extended_sf: r5941 \(mhpmevent21h\) at cfa\+7380
+ DW_CFA_offset_extended_sf: r5942 \(mhpmevent22h\) at cfa\+7384
+ DW_CFA_offset_extended_sf: r5943 \(mhpmevent23h\) at cfa\+7388
+ DW_CFA_offset_extended_sf: r5944 \(mhpmevent24h\) at cfa\+7392
+ DW_CFA_offset_extended_sf: r5945 \(mhpmevent25h\) at cfa\+7396
+ DW_CFA_offset_extended_sf: r5946 \(mhpmevent26h\) at cfa\+7400
+ DW_CFA_offset_extended_sf: r5947 \(mhpmevent27h\) at cfa\+7404
+ DW_CFA_offset_extended_sf: r5948 \(mhpmevent28h\) at cfa\+7408
+ 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: r4163 \(utval\) at cfa\+268
DW_CFA_offset_extended_sf: r4419 \(stval\) at cfa\+1292
DW_CFA_offset_extended_sf: r4480 \(satp\) at cfa\+1536
diff --git a/gas/testsuite/gas/riscv/csr-dw-regnums.s b/gas/testsuite/gas/riscv/csr-dw-regnums.s
index 2afadac..caac321 100644
--- a/gas/testsuite/gas/riscv/csr-dw-regnums.s
+++ b/gas/testsuite/gas/riscv/csr-dw-regnums.s
@@ -328,6 +328,37 @@ _start:
.cfi_offset hstateen1h, 6260
.cfi_offset hstateen2h, 6264
.cfi_offset hstateen3h, 6268
+ # Sscofpmf extension
+ .cfi_offset scountovf, 13952
+ .cfi_offset mhpmevent3h, 7308
+ .cfi_offset mhpmevent4h, 7312
+ .cfi_offset mhpmevent5h, 7316
+ .cfi_offset mhpmevent6h, 7320
+ .cfi_offset mhpmevent7h, 7324
+ .cfi_offset mhpmevent8h, 7328
+ .cfi_offset mhpmevent9h, 7332
+ .cfi_offset mhpmevent10h, 7336
+ .cfi_offset mhpmevent11h, 7340
+ .cfi_offset mhpmevent12h, 7344
+ .cfi_offset mhpmevent13h, 7348
+ .cfi_offset mhpmevent14h, 7352
+ .cfi_offset mhpmevent15h, 7356
+ .cfi_offset mhpmevent16h, 7360
+ .cfi_offset mhpmevent17h, 7364
+ .cfi_offset mhpmevent18h, 7368
+ .cfi_offset mhpmevent19h, 7372
+ .cfi_offset mhpmevent20h, 7376
+ .cfi_offset mhpmevent21h, 7380
+ .cfi_offset mhpmevent22h, 7384
+ .cfi_offset mhpmevent23h, 7388
+ .cfi_offset mhpmevent24h, 7392
+ .cfi_offset mhpmevent25h, 7396
+ .cfi_offset mhpmevent26h, 7400
+ .cfi_offset mhpmevent27h, 7404
+ .cfi_offset mhpmevent28h, 7408
+ .cfi_offset mhpmevent29h, 7412
+ .cfi_offset mhpmevent30h, 7416
+ .cfi_offset mhpmevent31h, 7420
# dropped
.cfi_offset ubadaddr, 268 # aliases
.cfi_offset sbadaddr, 1292 # aliases
diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.d b/gas/testsuite/gas/riscv/csr-version-1p10.d
index 65b370b..90cc5dd 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p10.d
+++ b/gas/testsuite/gas/riscv/csr-version-1p10.d
@@ -641,6 +641,66 @@ Disassembly of section .text:
[ ]+[0-9a-f]+:[ ]+61e59073[ ]+csrw[ ]+hstateen2h,a1
[ ]+[0-9a-f]+:[ ]+61f02573[ ]+csrr[ ]+a0,hstateen3h
[ ]+[0-9a-f]+:[ ]+61f59073[ ]+csrw[ ]+hstateen3h,a1
+[ ]+[0-9a-f]+:[ ]+da002573[ ]+csrr[ ]+a0,scountovf
+[ ]+[0-9a-f]+:[ ]+da059073[ ]+csrw[ ]+scountovf,a1
+[ ]+[0-9a-f]+:[ ]+72302573[ ]+csrr[ ]+a0,mhpmevent3h
+[ ]+[0-9a-f]+:[ ]+72359073[ ]+csrw[ ]+mhpmevent3h,a1
+[ ]+[0-9a-f]+:[ ]+72402573[ ]+csrr[ ]+a0,mhpmevent4h
+[ ]+[0-9a-f]+:[ ]+72459073[ ]+csrw[ ]+mhpmevent4h,a1
+[ ]+[0-9a-f]+:[ ]+72502573[ ]+csrr[ ]+a0,mhpmevent5h
+[ ]+[0-9a-f]+:[ ]+72559073[ ]+csrw[ ]+mhpmevent5h,a1
+[ ]+[0-9a-f]+:[ ]+72602573[ ]+csrr[ ]+a0,mhpmevent6h
+[ ]+[0-9a-f]+:[ ]+72659073[ ]+csrw[ ]+mhpmevent6h,a1
+[ ]+[0-9a-f]+:[ ]+72702573[ ]+csrr[ ]+a0,mhpmevent7h
+[ ]+[0-9a-f]+:[ ]+72759073[ ]+csrw[ ]+mhpmevent7h,a1
+[ ]+[0-9a-f]+:[ ]+72802573[ ]+csrr[ ]+a0,mhpmevent8h
+[ ]+[0-9a-f]+:[ ]+72859073[ ]+csrw[ ]+mhpmevent8h,a1
+[ ]+[0-9a-f]+:[ ]+72902573[ ]+csrr[ ]+a0,mhpmevent9h
+[ ]+[0-9a-f]+:[ ]+72959073[ ]+csrw[ ]+mhpmevent9h,a1
+[ ]+[0-9a-f]+:[ ]+72a02573[ ]+csrr[ ]+a0,mhpmevent10h
+[ ]+[0-9a-f]+:[ ]+72a59073[ ]+csrw[ ]+mhpmevent10h,a1
+[ ]+[0-9a-f]+:[ ]+72b02573[ ]+csrr[ ]+a0,mhpmevent11h
+[ ]+[0-9a-f]+:[ ]+72b59073[ ]+csrw[ ]+mhpmevent11h,a1
+[ ]+[0-9a-f]+:[ ]+72c02573[ ]+csrr[ ]+a0,mhpmevent12h
+[ ]+[0-9a-f]+:[ ]+72c59073[ ]+csrw[ ]+mhpmevent12h,a1
+[ ]+[0-9a-f]+:[ ]+72d02573[ ]+csrr[ ]+a0,mhpmevent13h
+[ ]+[0-9a-f]+:[ ]+72d59073[ ]+csrw[ ]+mhpmevent13h,a1
+[ ]+[0-9a-f]+:[ ]+72e02573[ ]+csrr[ ]+a0,mhpmevent14h
+[ ]+[0-9a-f]+:[ ]+72e59073[ ]+csrw[ ]+mhpmevent14h,a1
+[ ]+[0-9a-f]+:[ ]+72f02573[ ]+csrr[ ]+a0,mhpmevent15h
+[ ]+[0-9a-f]+:[ ]+72f59073[ ]+csrw[ ]+mhpmevent15h,a1
+[ ]+[0-9a-f]+:[ ]+73002573[ ]+csrr[ ]+a0,mhpmevent16h
+[ ]+[0-9a-f]+:[ ]+73059073[ ]+csrw[ ]+mhpmevent16h,a1
+[ ]+[0-9a-f]+:[ ]+73102573[ ]+csrr[ ]+a0,mhpmevent17h
+[ ]+[0-9a-f]+:[ ]+73159073[ ]+csrw[ ]+mhpmevent17h,a1
+[ ]+[0-9a-f]+:[ ]+73202573[ ]+csrr[ ]+a0,mhpmevent18h
+[ ]+[0-9a-f]+:[ ]+73259073[ ]+csrw[ ]+mhpmevent18h,a1
+[ ]+[0-9a-f]+:[ ]+73302573[ ]+csrr[ ]+a0,mhpmevent19h
+[ ]+[0-9a-f]+:[ ]+73359073[ ]+csrw[ ]+mhpmevent19h,a1
+[ ]+[0-9a-f]+:[ ]+73402573[ ]+csrr[ ]+a0,mhpmevent20h
+[ ]+[0-9a-f]+:[ ]+73459073[ ]+csrw[ ]+mhpmevent20h,a1
+[ ]+[0-9a-f]+:[ ]+73502573[ ]+csrr[ ]+a0,mhpmevent21h
+[ ]+[0-9a-f]+:[ ]+73559073[ ]+csrw[ ]+mhpmevent21h,a1
+[ ]+[0-9a-f]+:[ ]+73602573[ ]+csrr[ ]+a0,mhpmevent22h
+[ ]+[0-9a-f]+:[ ]+73659073[ ]+csrw[ ]+mhpmevent22h,a1
+[ ]+[0-9a-f]+:[ ]+73702573[ ]+csrr[ ]+a0,mhpmevent23h
+[ ]+[0-9a-f]+:[ ]+73759073[ ]+csrw[ ]+mhpmevent23h,a1
+[ ]+[0-9a-f]+:[ ]+73802573[ ]+csrr[ ]+a0,mhpmevent24h
+[ ]+[0-9a-f]+:[ ]+73859073[ ]+csrw[ ]+mhpmevent24h,a1
+[ ]+[0-9a-f]+:[ ]+73902573[ ]+csrr[ ]+a0,mhpmevent25h
+[ ]+[0-9a-f]+:[ ]+73959073[ ]+csrw[ ]+mhpmevent25h,a1
+[ ]+[0-9a-f]+:[ ]+73a02573[ ]+csrr[ ]+a0,mhpmevent26h
+[ ]+[0-9a-f]+:[ ]+73a59073[ ]+csrw[ ]+mhpmevent26h,a1
+[ ]+[0-9a-f]+:[ ]+73b02573[ ]+csrr[ ]+a0,mhpmevent27h
+[ ]+[0-9a-f]+:[ ]+73b59073[ ]+csrw[ ]+mhpmevent27h,a1
+[ ]+[0-9a-f]+:[ ]+73c02573[ ]+csrr[ ]+a0,mhpmevent28h
+[ ]+[0-9a-f]+:[ ]+73c59073[ ]+csrw[ ]+mhpmevent28h,a1
+[ ]+[0-9a-f]+:[ ]+73d02573[ ]+csrr[ ]+a0,mhpmevent29h
+[ ]+[0-9a-f]+:[ ]+73d59073[ ]+csrw[ ]+mhpmevent29h,a1
+[ ]+[0-9a-f]+:[ ]+73e02573[ ]+csrr[ ]+a0,mhpmevent30h
+[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1
+[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h
+[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1
[ ]+[0-9a-f]+:[ ]+04302573[ ]+csrr[ ]+a0,utval
[ ]+[0-9a-f]+:[ ]+04359073[ ]+csrw[ ]+utval,a1
[ ]+[0-9a-f]+:[ ]+14302573[ ]+csrr[ ]+a0,stval
diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.l b/gas/testsuite/gas/riscv/csr-version-1p10.l
index b1e4226..e4144b6 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p10.l
+++ b/gas/testsuite/gas/riscv/csr-version-1p10.l
@@ -483,6 +483,125 @@
.*Warning: invalid CSR `hstateen3h', needs rv32i extension
.*Warning: invalid CSR `hstateen3h', needs `h' extension
.*Warning: invalid CSR `hstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension
+.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension
+.*Warning: read-only CSR is written `csrw scountovf,a1'
+.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension
.*Warning: invalid CSR `ubadaddr' for the privileged spec `1.10'
.*Warning: invalid CSR `ubadaddr' for the privileged spec `1.10'
.*Warning: invalid CSR `sbadaddr' for the privileged spec `1.10'
diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.d b/gas/testsuite/gas/riscv/csr-version-1p11.d
index 29a659a..a85875a 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p11.d
+++ b/gas/testsuite/gas/riscv/csr-version-1p11.d
@@ -641,6 +641,66 @@ Disassembly of section .text:
[ ]+[0-9a-f]+:[ ]+61e59073[ ]+csrw[ ]+hstateen2h,a1
[ ]+[0-9a-f]+:[ ]+61f02573[ ]+csrr[ ]+a0,hstateen3h
[ ]+[0-9a-f]+:[ ]+61f59073[ ]+csrw[ ]+hstateen3h,a1
+[ ]+[0-9a-f]+:[ ]+da002573[ ]+csrr[ ]+a0,scountovf
+[ ]+[0-9a-f]+:[ ]+da059073[ ]+csrw[ ]+scountovf,a1
+[ ]+[0-9a-f]+:[ ]+72302573[ ]+csrr[ ]+a0,mhpmevent3h
+[ ]+[0-9a-f]+:[ ]+72359073[ ]+csrw[ ]+mhpmevent3h,a1
+[ ]+[0-9a-f]+:[ ]+72402573[ ]+csrr[ ]+a0,mhpmevent4h
+[ ]+[0-9a-f]+:[ ]+72459073[ ]+csrw[ ]+mhpmevent4h,a1
+[ ]+[0-9a-f]+:[ ]+72502573[ ]+csrr[ ]+a0,mhpmevent5h
+[ ]+[0-9a-f]+:[ ]+72559073[ ]+csrw[ ]+mhpmevent5h,a1
+[ ]+[0-9a-f]+:[ ]+72602573[ ]+csrr[ ]+a0,mhpmevent6h
+[ ]+[0-9a-f]+:[ ]+72659073[ ]+csrw[ ]+mhpmevent6h,a1
+[ ]+[0-9a-f]+:[ ]+72702573[ ]+csrr[ ]+a0,mhpmevent7h
+[ ]+[0-9a-f]+:[ ]+72759073[ ]+csrw[ ]+mhpmevent7h,a1
+[ ]+[0-9a-f]+:[ ]+72802573[ ]+csrr[ ]+a0,mhpmevent8h
+[ ]+[0-9a-f]+:[ ]+72859073[ ]+csrw[ ]+mhpmevent8h,a1
+[ ]+[0-9a-f]+:[ ]+72902573[ ]+csrr[ ]+a0,mhpmevent9h
+[ ]+[0-9a-f]+:[ ]+72959073[ ]+csrw[ ]+mhpmevent9h,a1
+[ ]+[0-9a-f]+:[ ]+72a02573[ ]+csrr[ ]+a0,mhpmevent10h
+[ ]+[0-9a-f]+:[ ]+72a59073[ ]+csrw[ ]+mhpmevent10h,a1
+[ ]+[0-9a-f]+:[ ]+72b02573[ ]+csrr[ ]+a0,mhpmevent11h
+[ ]+[0-9a-f]+:[ ]+72b59073[ ]+csrw[ ]+mhpmevent11h,a1
+[ ]+[0-9a-f]+:[ ]+72c02573[ ]+csrr[ ]+a0,mhpmevent12h
+[ ]+[0-9a-f]+:[ ]+72c59073[ ]+csrw[ ]+mhpmevent12h,a1
+[ ]+[0-9a-f]+:[ ]+72d02573[ ]+csrr[ ]+a0,mhpmevent13h
+[ ]+[0-9a-f]+:[ ]+72d59073[ ]+csrw[ ]+mhpmevent13h,a1
+[ ]+[0-9a-f]+:[ ]+72e02573[ ]+csrr[ ]+a0,mhpmevent14h
+[ ]+[0-9a-f]+:[ ]+72e59073[ ]+csrw[ ]+mhpmevent14h,a1
+[ ]+[0-9a-f]+:[ ]+72f02573[ ]+csrr[ ]+a0,mhpmevent15h
+[ ]+[0-9a-f]+:[ ]+72f59073[ ]+csrw[ ]+mhpmevent15h,a1
+[ ]+[0-9a-f]+:[ ]+73002573[ ]+csrr[ ]+a0,mhpmevent16h
+[ ]+[0-9a-f]+:[ ]+73059073[ ]+csrw[ ]+mhpmevent16h,a1
+[ ]+[0-9a-f]+:[ ]+73102573[ ]+csrr[ ]+a0,mhpmevent17h
+[ ]+[0-9a-f]+:[ ]+73159073[ ]+csrw[ ]+mhpmevent17h,a1
+[ ]+[0-9a-f]+:[ ]+73202573[ ]+csrr[ ]+a0,mhpmevent18h
+[ ]+[0-9a-f]+:[ ]+73259073[ ]+csrw[ ]+mhpmevent18h,a1
+[ ]+[0-9a-f]+:[ ]+73302573[ ]+csrr[ ]+a0,mhpmevent19h
+[ ]+[0-9a-f]+:[ ]+73359073[ ]+csrw[ ]+mhpmevent19h,a1
+[ ]+[0-9a-f]+:[ ]+73402573[ ]+csrr[ ]+a0,mhpmevent20h
+[ ]+[0-9a-f]+:[ ]+73459073[ ]+csrw[ ]+mhpmevent20h,a1
+[ ]+[0-9a-f]+:[ ]+73502573[ ]+csrr[ ]+a0,mhpmevent21h
+[ ]+[0-9a-f]+:[ ]+73559073[ ]+csrw[ ]+mhpmevent21h,a1
+[ ]+[0-9a-f]+:[ ]+73602573[ ]+csrr[ ]+a0,mhpmevent22h
+[ ]+[0-9a-f]+:[ ]+73659073[ ]+csrw[ ]+mhpmevent22h,a1
+[ ]+[0-9a-f]+:[ ]+73702573[ ]+csrr[ ]+a0,mhpmevent23h
+[ ]+[0-9a-f]+:[ ]+73759073[ ]+csrw[ ]+mhpmevent23h,a1
+[ ]+[0-9a-f]+:[ ]+73802573[ ]+csrr[ ]+a0,mhpmevent24h
+[ ]+[0-9a-f]+:[ ]+73859073[ ]+csrw[ ]+mhpmevent24h,a1
+[ ]+[0-9a-f]+:[ ]+73902573[ ]+csrr[ ]+a0,mhpmevent25h
+[ ]+[0-9a-f]+:[ ]+73959073[ ]+csrw[ ]+mhpmevent25h,a1
+[ ]+[0-9a-f]+:[ ]+73a02573[ ]+csrr[ ]+a0,mhpmevent26h
+[ ]+[0-9a-f]+:[ ]+73a59073[ ]+csrw[ ]+mhpmevent26h,a1
+[ ]+[0-9a-f]+:[ ]+73b02573[ ]+csrr[ ]+a0,mhpmevent27h
+[ ]+[0-9a-f]+:[ ]+73b59073[ ]+csrw[ ]+mhpmevent27h,a1
+[ ]+[0-9a-f]+:[ ]+73c02573[ ]+csrr[ ]+a0,mhpmevent28h
+[ ]+[0-9a-f]+:[ ]+73c59073[ ]+csrw[ ]+mhpmevent28h,a1
+[ ]+[0-9a-f]+:[ ]+73d02573[ ]+csrr[ ]+a0,mhpmevent29h
+[ ]+[0-9a-f]+:[ ]+73d59073[ ]+csrw[ ]+mhpmevent29h,a1
+[ ]+[0-9a-f]+:[ ]+73e02573[ ]+csrr[ ]+a0,mhpmevent30h
+[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1
+[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h
+[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1
[ ]+[0-9a-f]+:[ ]+04302573[ ]+csrr[ ]+a0,utval
[ ]+[0-9a-f]+:[ ]+04359073[ ]+csrw[ ]+utval,a1
[ ]+[0-9a-f]+:[ ]+14302573[ ]+csrr[ ]+a0,stval
diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.l b/gas/testsuite/gas/riscv/csr-version-1p11.l
index 1b66848..f4a57f2 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p11.l
+++ b/gas/testsuite/gas/riscv/csr-version-1p11.l
@@ -481,6 +481,125 @@
.*Warning: invalid CSR `hstateen3h', needs rv32i extension
.*Warning: invalid CSR `hstateen3h', needs `h' extension
.*Warning: invalid CSR `hstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension
+.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension
+.*Warning: read-only CSR is written `csrw scountovf,a1'
+.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension
.*Warning: invalid CSR `ubadaddr' for the privileged spec `1.11'
.*Warning: invalid CSR `ubadaddr' for the privileged spec `1.11'
.*Warning: invalid CSR `sbadaddr' for the privileged spec `1.11'
diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.d b/gas/testsuite/gas/riscv/csr-version-1p12.d
index 46ca519..60f19bf 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p12.d
+++ b/gas/testsuite/gas/riscv/csr-version-1p12.d
@@ -641,6 +641,66 @@ Disassembly of section .text:
[ ]+[0-9a-f]+:[ ]+61e59073[ ]+csrw[ ]+hstateen2h,a1
[ ]+[0-9a-f]+:[ ]+61f02573[ ]+csrr[ ]+a0,hstateen3h
[ ]+[0-9a-f]+:[ ]+61f59073[ ]+csrw[ ]+hstateen3h,a1
+[ ]+[0-9a-f]+:[ ]+da002573[ ]+csrr[ ]+a0,scountovf
+[ ]+[0-9a-f]+:[ ]+da059073[ ]+csrw[ ]+scountovf,a1
+[ ]+[0-9a-f]+:[ ]+72302573[ ]+csrr[ ]+a0,mhpmevent3h
+[ ]+[0-9a-f]+:[ ]+72359073[ ]+csrw[ ]+mhpmevent3h,a1
+[ ]+[0-9a-f]+:[ ]+72402573[ ]+csrr[ ]+a0,mhpmevent4h
+[ ]+[0-9a-f]+:[ ]+72459073[ ]+csrw[ ]+mhpmevent4h,a1
+[ ]+[0-9a-f]+:[ ]+72502573[ ]+csrr[ ]+a0,mhpmevent5h
+[ ]+[0-9a-f]+:[ ]+72559073[ ]+csrw[ ]+mhpmevent5h,a1
+[ ]+[0-9a-f]+:[ ]+72602573[ ]+csrr[ ]+a0,mhpmevent6h
+[ ]+[0-9a-f]+:[ ]+72659073[ ]+csrw[ ]+mhpmevent6h,a1
+[ ]+[0-9a-f]+:[ ]+72702573[ ]+csrr[ ]+a0,mhpmevent7h
+[ ]+[0-9a-f]+:[ ]+72759073[ ]+csrw[ ]+mhpmevent7h,a1
+[ ]+[0-9a-f]+:[ ]+72802573[ ]+csrr[ ]+a0,mhpmevent8h
+[ ]+[0-9a-f]+:[ ]+72859073[ ]+csrw[ ]+mhpmevent8h,a1
+[ ]+[0-9a-f]+:[ ]+72902573[ ]+csrr[ ]+a0,mhpmevent9h
+[ ]+[0-9a-f]+:[ ]+72959073[ ]+csrw[ ]+mhpmevent9h,a1
+[ ]+[0-9a-f]+:[ ]+72a02573[ ]+csrr[ ]+a0,mhpmevent10h
+[ ]+[0-9a-f]+:[ ]+72a59073[ ]+csrw[ ]+mhpmevent10h,a1
+[ ]+[0-9a-f]+:[ ]+72b02573[ ]+csrr[ ]+a0,mhpmevent11h
+[ ]+[0-9a-f]+:[ ]+72b59073[ ]+csrw[ ]+mhpmevent11h,a1
+[ ]+[0-9a-f]+:[ ]+72c02573[ ]+csrr[ ]+a0,mhpmevent12h
+[ ]+[0-9a-f]+:[ ]+72c59073[ ]+csrw[ ]+mhpmevent12h,a1
+[ ]+[0-9a-f]+:[ ]+72d02573[ ]+csrr[ ]+a0,mhpmevent13h
+[ ]+[0-9a-f]+:[ ]+72d59073[ ]+csrw[ ]+mhpmevent13h,a1
+[ ]+[0-9a-f]+:[ ]+72e02573[ ]+csrr[ ]+a0,mhpmevent14h
+[ ]+[0-9a-f]+:[ ]+72e59073[ ]+csrw[ ]+mhpmevent14h,a1
+[ ]+[0-9a-f]+:[ ]+72f02573[ ]+csrr[ ]+a0,mhpmevent15h
+[ ]+[0-9a-f]+:[ ]+72f59073[ ]+csrw[ ]+mhpmevent15h,a1
+[ ]+[0-9a-f]+:[ ]+73002573[ ]+csrr[ ]+a0,mhpmevent16h
+[ ]+[0-9a-f]+:[ ]+73059073[ ]+csrw[ ]+mhpmevent16h,a1
+[ ]+[0-9a-f]+:[ ]+73102573[ ]+csrr[ ]+a0,mhpmevent17h
+[ ]+[0-9a-f]+:[ ]+73159073[ ]+csrw[ ]+mhpmevent17h,a1
+[ ]+[0-9a-f]+:[ ]+73202573[ ]+csrr[ ]+a0,mhpmevent18h
+[ ]+[0-9a-f]+:[ ]+73259073[ ]+csrw[ ]+mhpmevent18h,a1
+[ ]+[0-9a-f]+:[ ]+73302573[ ]+csrr[ ]+a0,mhpmevent19h
+[ ]+[0-9a-f]+:[ ]+73359073[ ]+csrw[ ]+mhpmevent19h,a1
+[ ]+[0-9a-f]+:[ ]+73402573[ ]+csrr[ ]+a0,mhpmevent20h
+[ ]+[0-9a-f]+:[ ]+73459073[ ]+csrw[ ]+mhpmevent20h,a1
+[ ]+[0-9a-f]+:[ ]+73502573[ ]+csrr[ ]+a0,mhpmevent21h
+[ ]+[0-9a-f]+:[ ]+73559073[ ]+csrw[ ]+mhpmevent21h,a1
+[ ]+[0-9a-f]+:[ ]+73602573[ ]+csrr[ ]+a0,mhpmevent22h
+[ ]+[0-9a-f]+:[ ]+73659073[ ]+csrw[ ]+mhpmevent22h,a1
+[ ]+[0-9a-f]+:[ ]+73702573[ ]+csrr[ ]+a0,mhpmevent23h
+[ ]+[0-9a-f]+:[ ]+73759073[ ]+csrw[ ]+mhpmevent23h,a1
+[ ]+[0-9a-f]+:[ ]+73802573[ ]+csrr[ ]+a0,mhpmevent24h
+[ ]+[0-9a-f]+:[ ]+73859073[ ]+csrw[ ]+mhpmevent24h,a1
+[ ]+[0-9a-f]+:[ ]+73902573[ ]+csrr[ ]+a0,mhpmevent25h
+[ ]+[0-9a-f]+:[ ]+73959073[ ]+csrw[ ]+mhpmevent25h,a1
+[ ]+[0-9a-f]+:[ ]+73a02573[ ]+csrr[ ]+a0,mhpmevent26h
+[ ]+[0-9a-f]+:[ ]+73a59073[ ]+csrw[ ]+mhpmevent26h,a1
+[ ]+[0-9a-f]+:[ ]+73b02573[ ]+csrr[ ]+a0,mhpmevent27h
+[ ]+[0-9a-f]+:[ ]+73b59073[ ]+csrw[ ]+mhpmevent27h,a1
+[ ]+[0-9a-f]+:[ ]+73c02573[ ]+csrr[ ]+a0,mhpmevent28h
+[ ]+[0-9a-f]+:[ ]+73c59073[ ]+csrw[ ]+mhpmevent28h,a1
+[ ]+[0-9a-f]+:[ ]+73d02573[ ]+csrr[ ]+a0,mhpmevent29h
+[ ]+[0-9a-f]+:[ ]+73d59073[ ]+csrw[ ]+mhpmevent29h,a1
+[ ]+[0-9a-f]+:[ ]+73e02573[ ]+csrr[ ]+a0,mhpmevent30h
+[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1
+[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h
+[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1
[ ]+[0-9a-f]+:[ ]+04302573[ ]+csrr[ ]+a0,0x43
[ ]+[0-9a-f]+:[ ]+04359073[ ]+csrw[ ]+0x43,a1
[ ]+[0-9a-f]+:[ ]+14302573[ ]+csrr[ ]+a0,stval
diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.l b/gas/testsuite/gas/riscv/csr-version-1p12.l
index 90a67f0..37522fa 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p12.l
+++ b/gas/testsuite/gas/riscv/csr-version-1p12.l
@@ -343,6 +343,125 @@
.*Warning: invalid CSR `hstateen3h', needs rv32i extension
.*Warning: invalid CSR `hstateen3h', needs `h' extension
.*Warning: invalid CSR `hstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension
+.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension
+.*Warning: read-only CSR is written `csrw scountovf,a1'
+.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension
.*Warning: invalid CSR `ubadaddr' for the privileged spec `1.12'
.*Warning: invalid CSR `ubadaddr' for the privileged spec `1.12'
.*Warning: invalid CSR `sbadaddr' for the privileged spec `1.12'
diff --git a/gas/testsuite/gas/riscv/csr-version-1p9p1.d b/gas/testsuite/gas/riscv/csr-version-1p9p1.d
index da56a0b..e9eb8c0 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p9p1.d
+++ b/gas/testsuite/gas/riscv/csr-version-1p9p1.d
@@ -641,6 +641,66 @@ Disassembly of section .text:
[ ]+[0-9a-f]+:[ ]+61e59073[ ]+csrw[ ]+hstateen2h,a1
[ ]+[0-9a-f]+:[ ]+61f02573[ ]+csrr[ ]+a0,hstateen3h
[ ]+[0-9a-f]+:[ ]+61f59073[ ]+csrw[ ]+hstateen3h,a1
+[ ]+[0-9a-f]+:[ ]+da002573[ ]+csrr[ ]+a0,scountovf
+[ ]+[0-9a-f]+:[ ]+da059073[ ]+csrw[ ]+scountovf,a1
+[ ]+[0-9a-f]+:[ ]+72302573[ ]+csrr[ ]+a0,mhpmevent3h
+[ ]+[0-9a-f]+:[ ]+72359073[ ]+csrw[ ]+mhpmevent3h,a1
+[ ]+[0-9a-f]+:[ ]+72402573[ ]+csrr[ ]+a0,mhpmevent4h
+[ ]+[0-9a-f]+:[ ]+72459073[ ]+csrw[ ]+mhpmevent4h,a1
+[ ]+[0-9a-f]+:[ ]+72502573[ ]+csrr[ ]+a0,mhpmevent5h
+[ ]+[0-9a-f]+:[ ]+72559073[ ]+csrw[ ]+mhpmevent5h,a1
+[ ]+[0-9a-f]+:[ ]+72602573[ ]+csrr[ ]+a0,mhpmevent6h
+[ ]+[0-9a-f]+:[ ]+72659073[ ]+csrw[ ]+mhpmevent6h,a1
+[ ]+[0-9a-f]+:[ ]+72702573[ ]+csrr[ ]+a0,mhpmevent7h
+[ ]+[0-9a-f]+:[ ]+72759073[ ]+csrw[ ]+mhpmevent7h,a1
+[ ]+[0-9a-f]+:[ ]+72802573[ ]+csrr[ ]+a0,mhpmevent8h
+[ ]+[0-9a-f]+:[ ]+72859073[ ]+csrw[ ]+mhpmevent8h,a1
+[ ]+[0-9a-f]+:[ ]+72902573[ ]+csrr[ ]+a0,mhpmevent9h
+[ ]+[0-9a-f]+:[ ]+72959073[ ]+csrw[ ]+mhpmevent9h,a1
+[ ]+[0-9a-f]+:[ ]+72a02573[ ]+csrr[ ]+a0,mhpmevent10h
+[ ]+[0-9a-f]+:[ ]+72a59073[ ]+csrw[ ]+mhpmevent10h,a1
+[ ]+[0-9a-f]+:[ ]+72b02573[ ]+csrr[ ]+a0,mhpmevent11h
+[ ]+[0-9a-f]+:[ ]+72b59073[ ]+csrw[ ]+mhpmevent11h,a1
+[ ]+[0-9a-f]+:[ ]+72c02573[ ]+csrr[ ]+a0,mhpmevent12h
+[ ]+[0-9a-f]+:[ ]+72c59073[ ]+csrw[ ]+mhpmevent12h,a1
+[ ]+[0-9a-f]+:[ ]+72d02573[ ]+csrr[ ]+a0,mhpmevent13h
+[ ]+[0-9a-f]+:[ ]+72d59073[ ]+csrw[ ]+mhpmevent13h,a1
+[ ]+[0-9a-f]+:[ ]+72e02573[ ]+csrr[ ]+a0,mhpmevent14h
+[ ]+[0-9a-f]+:[ ]+72e59073[ ]+csrw[ ]+mhpmevent14h,a1
+[ ]+[0-9a-f]+:[ ]+72f02573[ ]+csrr[ ]+a0,mhpmevent15h
+[ ]+[0-9a-f]+:[ ]+72f59073[ ]+csrw[ ]+mhpmevent15h,a1
+[ ]+[0-9a-f]+:[ ]+73002573[ ]+csrr[ ]+a0,mhpmevent16h
+[ ]+[0-9a-f]+:[ ]+73059073[ ]+csrw[ ]+mhpmevent16h,a1
+[ ]+[0-9a-f]+:[ ]+73102573[ ]+csrr[ ]+a0,mhpmevent17h
+[ ]+[0-9a-f]+:[ ]+73159073[ ]+csrw[ ]+mhpmevent17h,a1
+[ ]+[0-9a-f]+:[ ]+73202573[ ]+csrr[ ]+a0,mhpmevent18h
+[ ]+[0-9a-f]+:[ ]+73259073[ ]+csrw[ ]+mhpmevent18h,a1
+[ ]+[0-9a-f]+:[ ]+73302573[ ]+csrr[ ]+a0,mhpmevent19h
+[ ]+[0-9a-f]+:[ ]+73359073[ ]+csrw[ ]+mhpmevent19h,a1
+[ ]+[0-9a-f]+:[ ]+73402573[ ]+csrr[ ]+a0,mhpmevent20h
+[ ]+[0-9a-f]+:[ ]+73459073[ ]+csrw[ ]+mhpmevent20h,a1
+[ ]+[0-9a-f]+:[ ]+73502573[ ]+csrr[ ]+a0,mhpmevent21h
+[ ]+[0-9a-f]+:[ ]+73559073[ ]+csrw[ ]+mhpmevent21h,a1
+[ ]+[0-9a-f]+:[ ]+73602573[ ]+csrr[ ]+a0,mhpmevent22h
+[ ]+[0-9a-f]+:[ ]+73659073[ ]+csrw[ ]+mhpmevent22h,a1
+[ ]+[0-9a-f]+:[ ]+73702573[ ]+csrr[ ]+a0,mhpmevent23h
+[ ]+[0-9a-f]+:[ ]+73759073[ ]+csrw[ ]+mhpmevent23h,a1
+[ ]+[0-9a-f]+:[ ]+73802573[ ]+csrr[ ]+a0,mhpmevent24h
+[ ]+[0-9a-f]+:[ ]+73859073[ ]+csrw[ ]+mhpmevent24h,a1
+[ ]+[0-9a-f]+:[ ]+73902573[ ]+csrr[ ]+a0,mhpmevent25h
+[ ]+[0-9a-f]+:[ ]+73959073[ ]+csrw[ ]+mhpmevent25h,a1
+[ ]+[0-9a-f]+:[ ]+73a02573[ ]+csrr[ ]+a0,mhpmevent26h
+[ ]+[0-9a-f]+:[ ]+73a59073[ ]+csrw[ ]+mhpmevent26h,a1
+[ ]+[0-9a-f]+:[ ]+73b02573[ ]+csrr[ ]+a0,mhpmevent27h
+[ ]+[0-9a-f]+:[ ]+73b59073[ ]+csrw[ ]+mhpmevent27h,a1
+[ ]+[0-9a-f]+:[ ]+73c02573[ ]+csrr[ ]+a0,mhpmevent28h
+[ ]+[0-9a-f]+:[ ]+73c59073[ ]+csrw[ ]+mhpmevent28h,a1
+[ ]+[0-9a-f]+:[ ]+73d02573[ ]+csrr[ ]+a0,mhpmevent29h
+[ ]+[0-9a-f]+:[ ]+73d59073[ ]+csrw[ ]+mhpmevent29h,a1
+[ ]+[0-9a-f]+:[ ]+73e02573[ ]+csrr[ ]+a0,mhpmevent30h
+[ ]+[0-9a-f]+:[ ]+73e59073[ ]+csrw[ ]+mhpmevent30h,a1
+[ ]+[0-9a-f]+:[ ]+73f02573[ ]+csrr[ ]+a0,mhpmevent31h
+[ ]+[0-9a-f]+:[ ]+73f59073[ ]+csrw[ ]+mhpmevent31h,a1
[ ]+[0-9a-f]+:[ ]+04302573[ ]+csrr[ ]+a0,ubadaddr
[ ]+[0-9a-f]+:[ ]+04359073[ ]+csrw[ ]+ubadaddr,a1
[ ]+[0-9a-f]+:[ ]+14302573[ ]+csrr[ ]+a0,sbadaddr
diff --git a/gas/testsuite/gas/riscv/csr-version-1p9p1.l b/gas/testsuite/gas/riscv/csr-version-1p9p1.l
index 7376c7c..893f8c8 100644
--- a/gas/testsuite/gas/riscv/csr-version-1p9p1.l
+++ b/gas/testsuite/gas/riscv/csr-version-1p9p1.l
@@ -533,6 +533,125 @@
.*Warning: invalid CSR `hstateen3h', needs rv32i extension
.*Warning: invalid CSR `hstateen3h', needs `h' extension
.*Warning: invalid CSR `hstateen3h', needs `smstateen' extension
+.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension
+.*Warning: invalid CSR `scountovf', needs `sscofpmf' extension
+.*Warning: read-only CSR is written `csrw scountovf,a1'
+.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent3h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent3h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent4h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent4h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent5h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent5h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent6h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent6h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent7h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent7h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent8h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent8h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent9h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent9h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent10h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent10h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent11h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent11h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent12h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent12h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent13h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent13h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent14h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent14h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent15h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent15h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent16h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent16h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent17h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent17h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent18h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent18h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent19h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent19h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent20h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent20h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent21h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent21h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent22h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent22h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent23h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent23h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent24h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent24h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent25h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent25h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent26h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent26h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent27h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent27h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent28h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent28h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent29h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent29h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent30h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent30h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension
+.*Warning: invalid CSR `mhpmevent31h', needs rv32i extension
+.*Warning: invalid CSR `mhpmevent31h', needs `sscofpmf' extension
.*Warning: invalid CSR `utval' for the privileged spec `1.9.1'
.*Warning: invalid CSR `utval' for the privileged spec `1.9.1'
.*Warning: invalid CSR `fflags', needs `f' extension
diff --git a/gas/testsuite/gas/riscv/csr.s b/gas/testsuite/gas/riscv/csr.s
index 1a4a2be..2a72312 100644
--- a/gas/testsuite/gas/riscv/csr.s
+++ b/gas/testsuite/gas/riscv/csr.s
@@ -359,6 +359,38 @@
csr hstateen2h
csr hstateen3h
+ # Sscofpmf extension
+ csr scountovf
+ csr mhpmevent3h
+ csr mhpmevent4h
+ csr mhpmevent5h
+ csr mhpmevent6h
+ csr mhpmevent7h
+ csr mhpmevent8h
+ csr mhpmevent9h
+ csr mhpmevent10h
+ csr mhpmevent11h
+ csr mhpmevent12h
+ csr mhpmevent13h
+ csr mhpmevent14h
+ csr mhpmevent15h
+ csr mhpmevent16h
+ csr mhpmevent17h
+ csr mhpmevent18h
+ csr mhpmevent19h
+ csr mhpmevent20h
+ csr mhpmevent21h
+ csr mhpmevent22h
+ csr mhpmevent23h
+ csr mhpmevent24h
+ csr mhpmevent25h
+ csr mhpmevent26h
+ csr mhpmevent27h
+ csr mhpmevent28h
+ csr mhpmevent29h
+ csr mhpmevent30h
+ csr mhpmevent31h
+
# Supported in previous priv spec, but dropped now
csr ubadaddr # 0x043 in 1.9.1, but the value is utval since 1.10