{"zcd", "zca", check_implicit_always},
{"zcb", "zca", check_implicit_always},
{"smaia", "ssaia", check_implicit_always},
+ {"smcntrpmf", "zicsr", check_implicit_always},
{"smstateen", "ssstateen", check_implicit_always},
{"smepmp", "zicsr", check_implicit_always},
{"ssaia", "zicsr", check_implicit_always},
static struct riscv_supported_ext riscv_supported_std_s_ext[] =
{
{"smaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
+ {"smcntrpmf", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"smepmp", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"smstateen", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
{"ssaia", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 },
CSR_CLASS_H_32, /* hypervisor, rv32 only */
CSR_CLASS_SMAIA, /* Smaia */
CSR_CLASS_SMAIA_32, /* Smaia, rv32 only */
+ CSR_CLASS_SMCNTRPMF, /* Smcntrpmf */
+ CSR_CLASS_SMCNTRPMF_32, /* Smcntrpmf, rv32 only */
CSR_CLASS_SMSTATEEN, /* Smstateen only */
CSR_CLASS_SMSTATEEN_32, /* Smstateen RV32 only */
CSR_CLASS_SSAIA, /* Ssaia */
case CSR_CLASS_SMAIA:
extension = "smaia";
break;
+ case CSR_CLASS_SMCNTRPMF_32:
+ is_rv32_only = true;
+ /* Fall through. */
+ case CSR_CLASS_SMCNTRPMF:
+ need_check_version = true;
+ extension = "smcntrpmf";
+ break;
case CSR_CLASS_SMSTATEEN_32:
is_rv32_only = true;
/* Fall through. */
DW_CFA_offset_extended_sf: r4888 \(mvienh\) at cfa\+3168
DW_CFA_offset_extended_sf: r4889 \(mviph\) at cfa\+3172
DW_CFA_offset_extended_sf: r4948 \(miph\) at cfa\+3408
+ DW_CFA_offset_extended_sf: r4897 \(mcyclecfg\) at cfa\+3204
+ DW_CFA_offset_extended_sf: r4898 \(minstretcfg\) at cfa\+3208
+ DW_CFA_offset_extended_sf: r5921 \(mcyclecfgh\) at cfa\+7300
+ DW_CFA_offset_extended_sf: r5922 \(minstretcfgh\) at cfa\+7304
DW_CFA_offset_extended_sf: r4876 \(mstateen0\) at cfa\+3120
DW_CFA_offset_extended_sf: r4877 \(mstateen1\) at cfa\+3124
DW_CFA_offset_extended_sf: r4878 \(mstateen2\) at cfa\+3128
DW_CFA_offset_extended_sf: r4480 \(satp\) at cfa\+1536
DW_CFA_offset_extended_sf: r4931 \(mtval\) at cfa\+3340
DW_CFA_offset_extended_sf: r4896 \(mcountinhibit\) at cfa\+3200
+ DW_CFA_offset_extended_sf: r4897 \(mcyclecfg\) at cfa\+3204
+ DW_CFA_offset_extended_sf: r4898 \(minstretcfg\) at cfa\+3208
DW_CFA_offset_extended_sf: r4992 \(mbase\) at cfa\+3584
DW_CFA_offset_extended_sf: r4993 \(mbound\) at cfa\+3588
DW_CFA_offset_extended_sf: r4994 \(mibase\) at cfa\+3592
DW_CFA_offset_extended_sf: r4995 \(mibound\) at cfa\+3596
DW_CFA_offset_extended_sf: r4996 \(mdbase\) at cfa\+3600
DW_CFA_offset_extended_sf: r4997 \(mdbound\) at cfa\+3604
- DW_CFA_offset_extended_sf: r4897 \(mscounteren\) at cfa\+3204
- DW_CFA_offset_extended_sf: r4898 \(mhcounteren\) at cfa\+3208
DW_CFA_offset_extended: r4096 \(ustatus\) at cfa\+0
DW_CFA_offset_extended_sf: r4100 \(uie\) at cfa\+16
DW_CFA_offset_extended_sf: r4101 \(utvec\) at cfa\+20
.cfi_offset mvienh, 3168
.cfi_offset mviph, 3172
.cfi_offset miph, 3408
+ # Smcntrpmf extension
+ .cfi_offset mcyclecfg, 3204
+ .cfi_offset minstretcfg, 3208
+ .cfi_offset mcyclecfgh, 7300
+ .cfi_offset minstretcfgh, 7304
# Smstateen extension
.cfi_offset mstateen0, 3120
.cfi_offset mstateen1, 3124
.cfi_offset sptbr, 1536 # aliases
.cfi_offset mbadaddr, 3340 # aliases
.cfi_offset mucounteren, 3200 # aliases
+ .cfi_offset mscounteren, 3204 # aliases
+ .cfi_offset mhcounteren, 3208 # aliases
.cfi_offset mbase, 3584
.cfi_offset mbound, 3588
.cfi_offset mibase, 3592
.cfi_offset mibound, 3596
.cfi_offset mdbase, 3600
.cfi_offset mdbound, 3604
- .cfi_offset mscounteren, 3204
- .cfi_offset mhcounteren, 3208
.cfi_offset ustatus, 0
.cfi_offset uie, 16
.cfi_offset utvec, 20
[ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1
[ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph
[ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1
+[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg
+[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1
+[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg
+[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+minstretcfg,a1
+[ ]+[0-9a-f]+:[ ]+72102573[ ]+csrr[ ]+a0,mcyclecfgh
+[ ]+[0-9a-f]+:[ ]+72159073[ ]+csrw[ ]+mcyclecfgh,a1
+[ ]+[0-9a-f]+:[ ]+72202573[ ]+csrr[ ]+a0,minstretcfgh
+[ ]+[0-9a-f]+:[ ]+72259073[ ]+csrw[ ]+minstretcfgh,a1
[ ]+[0-9a-f]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
[ ]+[0-9a-f]+:[ ]+34359073[ ]+csrw[ ]+mtval,a1
[ ]+[0-9a-f]+:[ ]+32002573[ ]+csrr[ ]+a0,0x320
[ ]+[0-9a-f]+:[ ]+32059073[ ]+csrw[ ]+0x320,a1
+[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg
+[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1
+[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg
+[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+minstretcfg,a1
[ ]+[0-9a-f]+:[ ]+38002573[ ]+csrr[ ]+a0,0x380
[ ]+[0-9a-f]+:[ ]+38059073[ ]+csrw[ ]+0x380,a1
[ ]+[0-9a-f]+:[ ]+38102573[ ]+csrr[ ]+a0,0x381
[ ]+[0-9a-f]+:[ ]+38459073[ ]+csrw[ ]+0x384,a1
[ ]+[0-9a-f]+:[ ]+38502573[ ]+csrr[ ]+a0,0x385
[ ]+[0-9a-f]+:[ ]+38559073[ ]+csrw[ ]+0x385,a1
-[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,0x321
-[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+0x321,a1
-[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,0x322
-[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+0x322,a1
[ ]+[0-9a-f]+:[ ]+00002573[ ]+csrr[ ]+a0,ustatus
[ ]+[0-9a-f]+:[ ]+00059073[ ]+csrw[ ]+ustatus,a1
[ ]+[0-9a-f]+:[ ]+00402573[ ]+csrr[ ]+a0,uie
.*Info: macro .*
.*Warning: invalid CSR `miph', needs `smaia' extension
.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
+.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
.*Info: macro .*
.*Warning: invalid CSR `mucounteren' for the privileged spec `1.10'
.*Info: macro .*
+.*Warning: invalid CSR `mscounteren' for the privileged spec `1.10'
+.*Info: macro .*
+.*Warning: invalid CSR `mscounteren' for the privileged spec `1.10'
+.*Info: macro .*
+.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.10'
+.*Info: macro .*
+.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.10'
+.*Info: macro .*
.*Warning: invalid CSR `mbase' for the privileged spec `1.10'
.*Info: macro .*
.*Warning: invalid CSR `mbase' for the privileged spec `1.10'
.*Info: macro .*
.*Warning: invalid CSR `mdbound' for the privileged spec `1.10'
.*Info: macro .*
-.*Warning: invalid CSR `mscounteren' for the privileged spec `1.10'
-.*Info: macro .*
-.*Warning: invalid CSR `mscounteren' for the privileged spec `1.10'
-.*Info: macro .*
-.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.10'
-.*Info: macro .*
-.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.10'
-.*Info: macro .*
.*Warning: invalid CSR `fflags', needs `f' extension
.*Info: macro .*
.*Warning: invalid CSR `fflags', needs `f' extension
[ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1
[ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph
[ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1
+[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg
+[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1
+[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg
+[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+minstretcfg,a1
+[ ]+[0-9a-f]+:[ ]+72102573[ ]+csrr[ ]+a0,mcyclecfgh
+[ ]+[0-9a-f]+:[ ]+72159073[ ]+csrw[ ]+mcyclecfgh,a1
+[ ]+[0-9a-f]+:[ ]+72202573[ ]+csrr[ ]+a0,minstretcfgh
+[ ]+[0-9a-f]+:[ ]+72259073[ ]+csrw[ ]+minstretcfgh,a1
[ ]+[0-9a-f]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
[ ]+[0-9a-f]+:[ ]+34359073[ ]+csrw[ ]+mtval,a1
[ ]+[0-9a-f]+:[ ]+32002573[ ]+csrr[ ]+a0,mcountinhibit
[ ]+[0-9a-f]+:[ ]+32059073[ ]+csrw[ ]+mcountinhibit,a1
+[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg
+[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1
+[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg
+[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+minstretcfg,a1
[ ]+[0-9a-f]+:[ ]+38002573[ ]+csrr[ ]+a0,0x380
[ ]+[0-9a-f]+:[ ]+38059073[ ]+csrw[ ]+0x380,a1
[ ]+[0-9a-f]+:[ ]+38102573[ ]+csrr[ ]+a0,0x381
[ ]+[0-9a-f]+:[ ]+38459073[ ]+csrw[ ]+0x384,a1
[ ]+[0-9a-f]+:[ ]+38502573[ ]+csrr[ ]+a0,0x385
[ ]+[0-9a-f]+:[ ]+38559073[ ]+csrw[ ]+0x385,a1
-[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,0x321
-[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+0x321,a1
-[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,0x322
-[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+0x322,a1
[ ]+[0-9a-f]+:[ ]+00002573[ ]+csrr[ ]+a0,ustatus
[ ]+[0-9a-f]+:[ ]+00059073[ ]+csrw[ ]+ustatus,a1
[ ]+[0-9a-f]+:[ ]+00402573[ ]+csrr[ ]+a0,uie
.*Info: macro .*
.*Warning: invalid CSR `miph', needs `smaia' extension
.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
+.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
.*Info: macro .*
.*Warning: invalid CSR `mucounteren' for the privileged spec `1.11'
.*Info: macro .*
+.*Warning: invalid CSR `mscounteren' for the privileged spec `1.11'
+.*Info: macro .*
+.*Warning: invalid CSR `mscounteren' for the privileged spec `1.11'
+.*Info: macro .*
+.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.11'
+.*Info: macro .*
+.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.11'
+.*Info: macro .*
.*Warning: invalid CSR `mbase' for the privileged spec `1.11'
.*Info: macro .*
.*Warning: invalid CSR `mbase' for the privileged spec `1.11'
.*Info: macro .*
.*Warning: invalid CSR `mdbound' for the privileged spec `1.11'
.*Info: macro .*
-.*Warning: invalid CSR `mscounteren' for the privileged spec `1.11'
-.*Info: macro .*
-.*Warning: invalid CSR `mscounteren' for the privileged spec `1.11'
-.*Info: macro .*
-.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.11'
-.*Info: macro .*
-.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.11'
-.*Info: macro .*
.*Warning: invalid CSR `fflags', needs `f' extension
.*Info: macro .*
.*Warning: invalid CSR `fflags', needs `f' extension
[ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1
[ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph
[ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1
+[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg
+[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1
+[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg
+[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+minstretcfg,a1
+[ ]+[0-9a-f]+:[ ]+72102573[ ]+csrr[ ]+a0,mcyclecfgh
+[ ]+[0-9a-f]+:[ ]+72159073[ ]+csrw[ ]+mcyclecfgh,a1
+[ ]+[0-9a-f]+:[ ]+72202573[ ]+csrr[ ]+a0,minstretcfgh
+[ ]+[0-9a-f]+:[ ]+72259073[ ]+csrw[ ]+minstretcfgh,a1
[ ]+[0-9a-f]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
[ ]+[0-9a-f]+:[ ]+34359073[ ]+csrw[ ]+mtval,a1
[ ]+[0-9a-f]+:[ ]+32002573[ ]+csrr[ ]+a0,mcountinhibit
[ ]+[0-9a-f]+:[ ]+32059073[ ]+csrw[ ]+mcountinhibit,a1
+[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mcyclecfg
+[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mcyclecfg,a1
+[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,minstretcfg
+[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+minstretcfg,a1
[ ]+[0-9a-f]+:[ ]+38002573[ ]+csrr[ ]+a0,0x380
[ ]+[0-9a-f]+:[ ]+38059073[ ]+csrw[ ]+0x380,a1
[ ]+[0-9a-f]+:[ ]+38102573[ ]+csrr[ ]+a0,0x381
[ ]+[0-9a-f]+:[ ]+38459073[ ]+csrw[ ]+0x384,a1
[ ]+[0-9a-f]+:[ ]+38502573[ ]+csrr[ ]+a0,0x385
[ ]+[0-9a-f]+:[ ]+38559073[ ]+csrw[ ]+0x385,a1
-[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,0x321
-[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+0x321,a1
-[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,0x322
-[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+0x322,a1
[ ]+[0-9a-f]+:[ ]+00002573[ ]+csrr[ ]+a0,0x0
[ ]+[0-9a-f]+:[ ]+00059073[ ]+csrw[ ]+0x0,a1
[ ]+[0-9a-f]+:[ ]+00402573[ ]+csrr[ ]+a0,0x4
.*Info: macro .*
.*Warning: invalid CSR `miph', needs `smaia' extension
.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
+.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
.*Info: macro .*
.*Warning: invalid CSR `mucounteren' for the privileged spec `1.12'
.*Info: macro .*
+.*Warning: invalid CSR `mscounteren' for the privileged spec `1.12'
+.*Info: macro .*
+.*Warning: invalid CSR `mscounteren' for the privileged spec `1.12'
+.*Info: macro .*
+.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.12'
+.*Info: macro .*
+.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.12'
+.*Info: macro .*
.*Warning: invalid CSR `mbase' for the privileged spec `1.12'
.*Info: macro .*
.*Warning: invalid CSR `mbase' for the privileged spec `1.12'
.*Info: macro .*
.*Warning: invalid CSR `mdbound' for the privileged spec `1.12'
.*Info: macro .*
-.*Warning: invalid CSR `mscounteren' for the privileged spec `1.12'
-.*Info: macro .*
-.*Warning: invalid CSR `mscounteren' for the privileged spec `1.12'
-.*Info: macro .*
-.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.12'
-.*Info: macro .*
-.*Warning: invalid CSR `mhcounteren' for the privileged spec `1.12'
-.*Info: macro .*
.*Warning: invalid CSR `ustatus' for the privileged spec `1.12'
.*Info: macro .*
.*Warning: invalid CSR `ustatus' for the privileged spec `1.12'
[ ]+[0-9a-f]+:[ ]+31959073[ ]+csrw[ ]+mviph,a1
[ ]+[0-9a-f]+:[ ]+35402573[ ]+csrr[ ]+a0,miph
[ ]+[0-9a-f]+:[ ]+35459073[ ]+csrw[ ]+miph,a1
+[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mscounteren
+[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mscounteren,a1
+[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,mhcounteren
+[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+mhcounteren,a1
+[ ]+[0-9a-f]+:[ ]+72102573[ ]+csrr[ ]+a0,0x721
+[ ]+[0-9a-f]+:[ ]+72159073[ ]+csrw[ ]+0x721,a1
+[ ]+[0-9a-f]+:[ ]+72202573[ ]+csrr[ ]+a0,0x722
+[ ]+[0-9a-f]+:[ ]+72259073[ ]+csrw[ ]+0x722,a1
[ ]+[0-9a-f]+:[ ]+30c02573[ ]+csrr[ ]+a0,mstateen0
[ ]+[0-9a-f]+:[ ]+30c59073[ ]+csrw[ ]+mstateen0,a1
[ ]+[0-9a-f]+:[ ]+30d02573[ ]+csrr[ ]+a0,mstateen1
[ ]+[0-9a-f]+:[ ]+34359073[ ]+csrw[ ]+mbadaddr,a1
[ ]+[0-9a-f]+:[ ]+32002573[ ]+csrr[ ]+a0,mucounteren
[ ]+[0-9a-f]+:[ ]+32059073[ ]+csrw[ ]+mucounteren,a1
+[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mscounteren
+[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mscounteren,a1
+[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,mhcounteren
+[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+mhcounteren,a1
[ ]+[0-9a-f]+:[ ]+38002573[ ]+csrr[ ]+a0,mbase
[ ]+[0-9a-f]+:[ ]+38059073[ ]+csrw[ ]+mbase,a1
[ ]+[0-9a-f]+:[ ]+38102573[ ]+csrr[ ]+a0,mbound
[ ]+[0-9a-f]+:[ ]+38459073[ ]+csrw[ ]+mdbase,a1
[ ]+[0-9a-f]+:[ ]+38502573[ ]+csrr[ ]+a0,mdbound
[ ]+[0-9a-f]+:[ ]+38559073[ ]+csrw[ ]+mdbound,a1
-[ ]+[0-9a-f]+:[ ]+32102573[ ]+csrr[ ]+a0,mscounteren
-[ ]+[0-9a-f]+:[ ]+32159073[ ]+csrw[ ]+mscounteren,a1
-[ ]+[0-9a-f]+:[ ]+32202573[ ]+csrr[ ]+a0,mhcounteren
-[ ]+[0-9a-f]+:[ ]+32259073[ ]+csrw[ ]+mhcounteren,a1
[ ]+[0-9a-f]+:[ ]+00002573[ ]+csrr[ ]+a0,ustatus
[ ]+[0-9a-f]+:[ ]+00059073[ ]+csrw[ ]+ustatus,a1
[ ]+[0-9a-f]+:[ ]+00402573[ ]+csrr[ ]+a0,uie
.*Info: macro .*
.*Warning: invalid CSR `miph', needs `smaia' extension
.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfg' for the privileged spec `1.9.1'
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfg' for the privileged spec `1.9.1'
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfg' for the privileged spec `1.9.1'
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfg', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfg' for the privileged spec `1.9.1'
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh' for the privileged spec `1.9.1'
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `mcyclecfgh' for the privileged spec `1.9.1'
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh' for the privileged spec `1.9.1'
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs rv32i extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh', needs `smcntrpmf' extension
+.*Info: macro .*
+.*Warning: invalid CSR `minstretcfgh' for the privileged spec `1.9.1'
+.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
.*Info: macro .*
.*Warning: invalid CSR `mstateen0', needs `smstateen' extension
csr mviph
csr miph
+ # Smcntrpmf extension
+ csr mcyclecfg
+ csr minstretcfg
+ csr mcyclecfgh
+ csr minstretcfgh
+
# Smstateen/Ssstateen extensions
csr mstateen0
csr mstateen1
csr sptbr # 0x180 in 1.9.1, but the value is satp since 1.10
csr mbadaddr # 0x343 in 1.9.1, but the value is mtval since 1.10
csr mucounteren # 0x320 in 1.9.1, dropped in 1.10, but the value is mcountinhibit since 1.11
+ csr mscounteren # 0x321 in 1.9.1, dropped in 1.10, but the value is mcyclecfg for Smcntrpmf extension
+ csr mhcounteren # 0x322 in 1.9.1, dropped in 1.10, but the value is mcyclecfg for Smcntrpmf extension
csr mbase # 0x380 in 1.9.1, dropped in 1.10
csr mbound # 0x381 in 1.9.1, dropped in 1.10
csr mibase # 0x382 in 1.9.1, dropped in 1.10
csr mibound # 0x383 in 1.9.1, dropped in 1.10
csr mdbase # 0x384 in 1.9.1, dropped in 1.10
csr mdbound # 0x385 in 1.9.1, dropped in 1.10
- csr mscounteren # 0x321 in 1.9.1, dropped in 1.10
- csr mhcounteren # 0x322 in 1.9.1, dropped in 1.10
csr ustatus # 0x0 in 1.9.1, dropped in 1.12
csr uie # 0x4 in 1.9.1, dropped in 1.12
csr utvec # 0x5 in 1.9.1, dropped in 1.12
#define CSR_MIBOUND 0x383
#define CSR_MDBASE 0x384
#define CSR_MDBOUND 0x385
-#define CSR_MSCOUNTEREN 0x321
-#define CSR_MHCOUNTEREN 0x322
#define CSR_USTATUS 0x0
#define CSR_UIE 0x4
#define CSR_UTVEC 0x5
#define CSR_MVIENH 0x318
#define CSR_MVIPH 0x319
#define CSR_MIPH 0x354
+/* Smcntrpmf extension. */
+#define CSR_MCYCLECFG 0x321
+#define CSR_MINSTRETCFG 0x322
+#define CSR_MCYCLECFGH 0x721
+#define CSR_MINSTRETCFGH 0x722
/* Smstateen extension */
#define CSR_MSTATEEN0 0x30c
#define CSR_MSTATEEN1 0x30d
DECLARE_CSR(mvienh, CSR_MVIENH, CSR_CLASS_SMAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
DECLARE_CSR(mviph, CSR_MVIPH, CSR_CLASS_SMAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
DECLARE_CSR(miph, CSR_MIPH, CSR_CLASS_SMAIA_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
+/* Smcntrpmf extension (incompatible with the privileged spec v1.9.1). */
+DECLARE_CSR(mcyclecfg, CSR_MCYCLECFG, CSR_CLASS_SMCNTRPMF, PRIV_SPEC_CLASS_1P10, PRIV_SPEC_CLASS_DRAFT)
+DECLARE_CSR(minstretcfg, CSR_MINSTRETCFG, CSR_CLASS_SMCNTRPMF, PRIV_SPEC_CLASS_1P10, PRIV_SPEC_CLASS_DRAFT)
+DECLARE_CSR(mcyclecfgh, CSR_MCYCLECFGH, CSR_CLASS_SMCNTRPMF_32, PRIV_SPEC_CLASS_1P10, PRIV_SPEC_CLASS_DRAFT)
+DECLARE_CSR(minstretcfgh, CSR_MINSTRETCFGH, CSR_CLASS_SMCNTRPMF_32, PRIV_SPEC_CLASS_1P10, PRIV_SPEC_CLASS_DRAFT)
/* Smstateen/Ssstateen extensions. */
DECLARE_CSR(mstateen0, CSR_MSTATEEN0, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
DECLARE_CSR(mstateen1, CSR_MSTATEEN1, CSR_CLASS_SMSTATEEN, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
DECLARE_CSR(mibound, CSR_MIBOUND, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10)
DECLARE_CSR(mdbase, CSR_MDBASE, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10)
DECLARE_CSR(mdbound, CSR_MDBOUND, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10)
-DECLARE_CSR(mscounteren, CSR_MSCOUNTEREN, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10)
-DECLARE_CSR(mhcounteren, CSR_MHCOUNTEREN, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10)
DECLARE_CSR(ustatus, CSR_USTATUS, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P12)
DECLARE_CSR(uie, CSR_UIE, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P12)
DECLARE_CSR(utvec, CSR_UTVEC, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P12)
DECLARE_CSR_ALIAS(sptbr, CSR_SATP, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10)
DECLARE_CSR_ALIAS(mbadaddr, CSR_MTVAL, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10)
DECLARE_CSR_ALIAS(mucounteren, CSR_MCOUNTINHIBIT, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10)
+DECLARE_CSR_ALIAS(mscounteren, CSR_MCYCLECFG, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10)
+DECLARE_CSR_ALIAS(mhcounteren, CSR_MINSTRETCFG, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10)
DECLARE_CSR_ALIAS(dscratch, CSR_DSCRATCH0, CSR_CLASS_DEBUG, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
DECLARE_CSR_ALIAS(mcontrol, CSR_TDATA1, CSR_CLASS_DEBUG, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)
DECLARE_CSR_ALIAS(mcontrol6, CSR_TDATA1, CSR_CLASS_DEBUG, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE)