[clang] [llvm] [RISCV]Support Sspmp, Sspmpen and Smpmpdeleg Extensions (PR #207696)

Liao Chunyu via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 6 03:34:01 PDT 2026


================
@@ -1095,6 +1095,16 @@ def FeatureStdExtSsccfg
 def FeatureStdExtSsccptr
     : RISCVExtension<1, 0, "Main memory supports page table reads">;
 
+def FeatureStdExtSspmp
+    : RISCVExtension<1, 0, "S-level Physical Memory Protection (SPMP)",
+                     [FeatureStdExtSscsrind]>;
+def FeatureStdExtSspmpen
+    : RISCVExtension<1, 0, "Optimizing Context Switching of SPMP Entries", [FeatureStdExtSspmp]>;
+
+def FeatureStdExtSmpmpdeleg
+    : RISCVExtension<1, 0, "Sharing Hardware Resources between PMP and SPMP",
+                     [FeatureStdExtSmcsrind, FeatureStdExtSspmp]>;
----------------
ChunyuLiao wrote:

This part is not yet supported in the spec, and I don't know add Sm1p13.

`This extension is mandatory for implementations that support both Sspmp and Sm1p13.`

Perhaps we need to support Sm1p13, like GCC's mpriv-spec?

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


More information about the cfe-commits mailing list