[clang] [llvm] [RISCV] Add smcntrpmf extension (PR #136556)

Sam Elliott via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 21 03:03:05 PDT 2025


================
@@ -482,6 +482,14 @@ def : SysReg<"sctrdepth", 0x15f>;
 def : SysReg<"vsctrctl", 0x24e>;
 def : SysReg<"mctrctl", 0x34e>;
 
+//===-----------------------------------------------
+// Cycle and Instret privilege mode filtering (Smcntrpmf)
+//===-----------------------------------------------
+def : SysReg<"mcyclecfg", 0x321>;
+def : SysReg<"minstretcfg", 0x322>;
+def : SysReg<"mcyclecfgh", 0x721>;
+def : SysReg<"minstretcfgh", 0x722>;
----------------
lenary wrote:

I think these two are RV32-only, for accessing the high halves of the 64-bit csr state?

https://github.com/llvm/llvm-project/pull/136556


More information about the cfe-commits mailing list