[llvm] [RISCV]Add support for resolving encoding conflicts among vendor specific CSRs (PR #96174)
Jessica Clarke via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 05:23:48 PDT 2024
================
@@ -0,0 +1,109 @@
+// RUN: llvm-tblgen -gen-searchable-tables -I %p/../../include %s | FileCheck %s
+
+include "llvm/TableGen/SearchableTable.td"
+
+class SysReg<string name, bits<12> op> {
+ string Name = name;
+ bits<12> Encoding = op;
+ code FeaturesRequired = [{ {} }];
+}
+
+def List1 : GenericTable {
+ let FilterClass = "SysReg";
+ let Fields = [
+ "Name", "Encoding", "FeaturesRequired",
+ ];
+
+ let PrimaryKey = [ "Encoding" ];
+ let PrimaryKeyName = "lookupSysRegByEncoding";
+ let PrimaryKeyReturnRange = true;
+}
+
+
----------------
jrtc27 wrote:
```suggestion
```
https://github.com/llvm/llvm-project/pull/96174
More information about the llvm-commits
mailing list