[llvm] [RISCV] Add extension information to RISCVFeatures.td. NFC (PR #89326)
Brandon Wu via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 20 02:34:33 PDT 2024
================
@@ -10,119 +10,155 @@
// RISC-V subtarget features and instruction predicates.
//===----------------------------------------------------------------------===//
+// Subclass of SubtargetFeature to be used when the feature is also a RISC-V
+// extension. Extensions have a version and may be experimental.
+//
+// name - Name of the extension in lower case.q
+// major - Major version of extension
+// minor - Minor version of extension
+// fieldname - name of field to create in RISCVSubtarget.
+// desc - Description of extension
+// implies - Extensions or features implied by this extension.
+// value - Value to assign to the field in RISCVSubtarget when this
+// extension is enabled. Usually "true".
+class RISCVExtension<string name, int major, int minor, string fieldname,
+ string desc, list<SubtargetFeature> implies = [],
+ string value = "true">
+ : SubtargetFeature<name, fieldname, value, desc, implies> {
+ // MajorVersion - The major version for this extension.
+ int MajorVersion = major;
+
+ // MajorVersion - The minor version for this extension.
----------------
4vtomat wrote:
Should be MinorVersion.
https://github.com/llvm/llvm-project/pull/89326
More information about the llvm-commits
mailing list