[llvm] [RISCV] Add groupid/bitmask for RISC-V extension (PR #94440)

Piyou Chen via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 23 22:19:38 PDT 2024


================
@@ -37,6 +37,15 @@ class RISCVExtension<string name, int major, int minor, string desc,
   bit Experimental = false;
 }
 
+// The groupID/bitmask of RISCVExtension is used to retrieve a specific bit value 
+// from __riscv_feature_bit based on the groupID and bitmask.
+// gourpID      - groupID of extension
+// bitmaskShift - bitmask shift of extension
+class RISCVExtensionBitmask<bits<3> groupID, int bitmaskShift> {
----------------
BeMg wrote:

The RFC side defines the bit position in GroupID/bitmask form. Is it worth merging into a single value instead of aligning with the RFC?

> Note: When building the required extension bitmasks from a multiversion function, we still need to break the single value into GroupID/bitmask.


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


More information about the llvm-commits mailing list