<%- if ext?(:Zicntr) -%>
Aliased as instret.COUNT.
<%- end -%>
Increments every time an instruction retires unless:
mcountinhibit.IR <%- if ext?(:Smcdeleg) -%>or its alias scountinhibit.IR<%- end -%> is set
<%- if ext?(:Smcntrpmf) -%>
minstretcfg.MINH is set and the current privilege level is M
<%- if ext?(:S) -%>
minstretcfg.SINH <%- if ext?(:Ssccfg) -%>or its alias instretcfg.SINH<%- end -%> is set and the current privilege level is (H)S
<%- end -%>
<%- if ext?(:U) -%>
minstretcfg.UINH <%- if ext?(:Ssccfg) -%>or its alias instretcfg.SINH<%- end -%> is set and the current privilege level is U
<%- end -%>
<%- if ext?(:H) -%>
minstretcfg.VSINH <%- if ext?(:Ssccfg) -%>or its alias instretcfg.SINH<%- end -%> is set and the current privilege level is VS
minstretcfg.VUINH <%- if ext?(:Ssccfg) -%>or its alias instretcfg.SINH<%- end -%> is set and the current privilege level is VU
<%- end -%>
<%- end -%>
An instruction that causes an exception, notably including MRET/SRET,
does not retire and does not cause minstret.COUNT to increment.