@@ -10,8 +10,16 @@ hpmcounter10:
1010 description : |
1111 Alias for M-mode CSR `mhpmcounter10`.
1212
13- Privilege mode access is controlled with `mcounteren.HPM10`, `scounteren.HPM10`, and `hcounteren.HPM10` as follows:
13+ Privilege mode access is controlled with `mcounteren.HPM10`
14+ <%- if ext?(:S) - % >
15+ , `scounteren.HPM10`
16+ <%- if ext?(:H) - % >
17+ , and `hcounteren.HPM10`
18+ <%- end - % >
19+ <%- end - % >
20+ as follows:
1421
22+ <%- if ext?(:H) - % >
1523 [%autowidth,cols="1,1,1,1,1,1,1",separator="!"]
1624 !===
1725 .2+h![.rotate]#`mcounteren.HPM10`# .2+h! [.rotate]#`scounteren.HPM10`# .2+h! [.rotate]#`hcounteren.HPM10`#
@@ -24,6 +32,28 @@ hpmcounter10:
2432 ! 1 ! 0 ! 1 ! read-only ! `IllegalInstruction` ! read-only ! `VirtualInstruction`
2533 ! 1 ! 1 ! 1 ! read-only ! read-only ! read-only ! read-only
2634 !===
35+ <%- elsif ext?(:S) - % >
36+ [%autowidth,cols="1,1,1,1",separator="!"]
37+ !===
38+ .2+h![.rotate]#`mcounteren.HPM10`# .2+h! [.rotate]#`scounteren.HPM10`#
39+ 2+^.>h! `hpmcounter10` behavior
40+ .^h! S-mode .^h! U-mode
41+
42+ ! 0 ! - ! `IllegalInstruction` ! `IllegalInstruction`
43+ ! 1 ! 0 ! read-only ! `IllegalInstruction`
44+ ! 1 ! 1 ! read-only ! read-only
45+ !===
46+ <%- else - % >
47+ [%autowidth,cols="1,1",separator="!"]
48+ !===
49+ .2+h![.rotate]#`mcounteren.HPM10`#
50+ ^.>h! `hpmcounter10` behavior
51+ .^h! U-mode
52+
53+ ! 0 ! `IllegalInstruction`
54+ ! 1 ! read-only
55+ !===
56+ <%- end - % >
2757 priv_mode : U
2858 length : 64
2959 definedBy : Zihpm
0 commit comments