@@ -61,18 +61,16 @@ def ATValues : GenericEnum {
6161def ATsList : GenericTable {
6262 let FilterClass = "AT";
6363 let Fields = ["Name", "Encoding", "Requires"];
64+
65+ let PrimaryKey = ["Encoding"];
66+ let PrimaryKeyName = "lookupATByEncoding";
6467}
6568
6669def lookupATByName : SearchIndex {
6770 let Table = ATsList;
6871 let Key = ["Name"];
6972}
7073
71- def lookupATByEncoding : SearchIndex {
72- let Table = ATsList;
73- let Key = ["Encoding"];
74- }
75-
7674def : AT<"S1E1R", 0b000, 0b0111, 0b1000, 0b000>;
7775def : AT<"S1E2R", 0b100, 0b0111, 0b1000, 0b000>;
7876def : AT<"S1E3R", 0b110, 0b0111, 0b1000, 0b000>;
@@ -114,18 +112,16 @@ def DBValues : GenericEnum {
114112def DBsList : GenericTable {
115113 let FilterClass = "DB";
116114 let Fields = ["Name", "Encoding"];
115+
116+ let PrimaryKey = ["Encoding"];
117+ let PrimaryKeyName = "lookupDBByEncoding";
117118}
118119
119120def lookupDBByName : SearchIndex {
120121 let Table = DBsList;
121122 let Key = ["Name"];
122123}
123124
124- def lookupDBByEncoding : SearchIndex {
125- let Table = DBsList;
126- let Key = ["Encoding"];
127- }
128-
129125def : DB<"oshld", 0x1>;
130126def : DB<"oshst", 0x2>;
131127def : DB<"osh", 0x3>;
@@ -155,18 +151,16 @@ def DBnXSValues : GenericEnum {
155151def DBnXSsList : GenericTable {
156152 let FilterClass = "DBnXS";
157153 let Fields = ["Name", "Encoding", "ImmValue", "Requires"];
154+
155+ let PrimaryKey = ["Encoding"];
156+ let PrimaryKeyName = "lookupDBnXSByEncoding";
158157}
159158
160159def lookupDBnXSByName : SearchIndex {
161160 let Table = DBnXSsList;
162161 let Key = ["Name"];
163162}
164163
165- def lookupDBnXSByEncoding : SearchIndex {
166- let Table = DBnXSsList;
167- let Key = ["Encoding"];
168- }
169-
170164def lookupDBnXSByImmValue : SearchIndex {
171165 let Table = DBnXSsList;
172166 let Key = ["ImmValue"];
@@ -201,18 +195,16 @@ def DCValues : GenericEnum {
201195def DCsList : GenericTable {
202196 let FilterClass = "DC";
203197 let Fields = ["Name", "Encoding", "Requires"];
198+
199+ let PrimaryKey = ["Encoding"];
200+ let PrimaryKeyName = "lookupDCByEncoding";
204201}
205202
206203def lookupDCByName : SearchIndex {
207204 let Table = DCsList;
208205 let Key = ["Name"];
209206}
210207
211- def lookupDCByEncoding : SearchIndex {
212- let Table = DCsList;
213- let Key = ["Encoding"];
214- }
215-
216208def : DC<"ZVA", 0b011, 0b0111, 0b0100, 0b001>;
217209def : DC<"IVAC", 0b000, 0b0111, 0b0110, 0b001>;
218210def : DC<"ISW", 0b000, 0b0111, 0b0110, 0b010>;
@@ -289,18 +281,16 @@ def ICValues : GenericEnum {
289281def ICsList : GenericTable {
290282 let FilterClass = "IC";
291283 let Fields = ["Name", "Encoding", "NeedsReg"];
284+
285+ let PrimaryKey = ["Encoding"];
286+ let PrimaryKeyName = "lookupICByEncoding";
292287}
293288
294289def lookupICByName : SearchIndex {
295290 let Table = ICsList;
296291 let Key = ["Name"];
297292}
298293
299- def lookupICByEncoding : SearchIndex {
300- let Table = ICsList;
301- let Key = ["Encoding"];
302- }
303-
304294def : IC<"IALLUIS", 0b000, 0b0111, 0b0001, 0b000, 0>;
305295def : IC<"IALLU", 0b000, 0b0111, 0b0101, 0b000, 0>;
306296def : IC<"IVAU", 0b011, 0b0111, 0b0101, 0b001, 1>;
@@ -324,18 +314,16 @@ def ISBValues : GenericEnum {
324314def ISBsList : GenericTable {
325315 let FilterClass = "ISB";
326316 let Fields = ["Name", "Encoding"];
317+
318+ let PrimaryKey = ["Encoding"];
319+ let PrimaryKeyName = "lookupISBByEncoding";
327320}
328321
329322def lookupISBByName : SearchIndex {
330323 let Table = ISBsList;
331324 let Key = ["Name"];
332325}
333326
334- def lookupISBByEncoding : SearchIndex {
335- let Table = ISBsList;
336- let Key = ["Encoding"];
337- }
338-
339327def : ISB<"sy", 0xf>;
340328
341329//===----------------------------------------------------------------------===//
@@ -359,18 +347,16 @@ def TSBValues : GenericEnum {
359347def TSBsList : GenericTable {
360348 let FilterClass = "TSB";
361349 let Fields = ["Name", "Encoding", "Requires"];
350+
351+ let PrimaryKey = ["Encoding"];
352+ let PrimaryKeyName = "lookupTSBByEncoding";
362353}
363354
364355def lookupTSBByName : SearchIndex {
365356 let Table = TSBsList;
366357 let Key = ["Name"];
367358}
368359
369- def lookupTSBByEncoding : SearchIndex {
370- let Table = TSBsList;
371- let Key = ["Encoding"];
372- }
373-
374360def : TSB<"csync", 0>;
375361
376362//===----------------------------------------------------------------------===//
@@ -398,18 +384,16 @@ def PRFMValues : GenericEnum {
398384def PRFMsList : GenericTable {
399385 let FilterClass = "PRFM";
400386 let Fields = ["Name", "Encoding", "Requires"];
387+
388+ let PrimaryKey = ["Encoding"];
389+ let PrimaryKeyName = "lookupPRFMByEncoding";
401390}
402391
403392def lookupPRFMByName : SearchIndex {
404393 let Table = PRFMsList;
405394 let Key = ["Name"];
406395}
407396
408- def lookupPRFMByEncoding : SearchIndex {
409- let Table = PRFMsList;
410- let Key = ["Encoding"];
411- }
412-
413397def : PRFM<"pld", 0b00, "l1", 0b00, "keep", 0b0>;
414398def : PRFM<"pld", 0b00, "l1", 0b00, "strm", 0b1>;
415399def : PRFM<"pld", 0b00, "l2", 0b01, "keep", 0b0>;
@@ -461,18 +445,16 @@ def SVEPRFMValues : GenericEnum {
461445def SVEPRFMsList : GenericTable {
462446 let FilterClass = "SVEPRFM";
463447 let Fields = ["Name", "Encoding", "Requires"];
448+
449+ let PrimaryKey = ["Encoding"];
450+ let PrimaryKeyName = "lookupSVEPRFMByEncoding";
464451}
465452
466453def lookupSVEPRFMByName : SearchIndex {
467454 let Table = SVEPRFMsList;
468455 let Key = ["Name"];
469456}
470457
471- def lookupSVEPRFMByEncoding : SearchIndex {
472- let Table = SVEPRFMsList;
473- let Key = ["Encoding"];
474- }
475-
476458let Requires = [{ {AArch64::FeatureSVE} }] in {
477459def : SVEPRFM<"pldl1keep", 0x00>;
478460def : SVEPRFM<"pldl1strm", 0x01>;
@@ -545,18 +527,16 @@ def SVEPREDPATValues : GenericEnum {
545527def SVEPREDPATsList : GenericTable {
546528 let FilterClass = "SVEPREDPAT";
547529 let Fields = ["Name", "Encoding"];
530+
531+ let PrimaryKey = ["Encoding"];
532+ let PrimaryKeyName = "lookupSVEPREDPATByEncoding";
548533}
549534
550535def lookupSVEPREDPATByName : SearchIndex {
551536 let Table = SVEPREDPATsList;
552537 let Key = ["Name"];
553538}
554539
555- def lookupSVEPREDPATByEncoding : SearchIndex {
556- let Table = SVEPREDPATsList;
557- let Key = ["Encoding"];
558- }
559-
560540def : SVEPREDPAT<"pow2", 0x00>;
561541def : SVEPREDPAT<"vl1", 0x01>;
562542def : SVEPREDPAT<"vl2", 0x02>;
@@ -594,18 +574,16 @@ def SVEVECLENSPECIFIERValues : GenericEnum {
594574def SVEVECLENSPECIFIERsList : GenericTable {
595575 let FilterClass = "SVEVECLENSPECIFIER";
596576 let Fields = ["Name", "Encoding"];
577+
578+ let PrimaryKey = ["Encoding"];
579+ let PrimaryKeyName = "lookupSVEVECLENSPECIFIERByEncoding";
597580}
598581
599582def lookupSVEVECLENSPECIFIERByName : SearchIndex {
600583 let Table = SVEVECLENSPECIFIERsList;
601584 let Key = ["Name"];
602585}
603586
604- def lookupSVEVECLENSPECIFIERByEncoding : SearchIndex {
605- let Table = SVEVECLENSPECIFIERsList;
606- let Key = ["Encoding"];
607- }
608-
609587def : SVEVECLENSPECIFIER<"vlx2", 0x0>;
610588def : SVEVECLENSPECIFIER<"vlx4", 0x1>;
611589
@@ -664,18 +642,16 @@ def PStateImm0_15Values : GenericEnum {
664642def PStateImm0_15sList : GenericTable {
665643 let FilterClass = "PStateImm0_15";
666644 let Fields = ["Name", "Encoding", "Requires"];
645+
646+ let PrimaryKey = ["Encoding"];
647+ let PrimaryKeyName = "lookupPStateImm0_15ByEncoding";
667648}
668649
669650def lookupPStateImm0_15ByName : SearchIndex {
670651 let Table = PStateImm0_15sList;
671652 let Key = ["Name"];
672653}
673654
674- def lookupPStateImm0_15ByEncoding : SearchIndex {
675- let Table = PStateImm0_15sList;
676- let Key = ["Encoding"];
677- }
678-
679655class PStateImm0_1<string name, bits<3> op1, bits<3> op2, bits<3> crm_high> {
680656 string Name = name;
681657 bits<9> Encoding;
@@ -694,18 +670,16 @@ def PStateImm0_1Values : GenericEnum {
694670def PStateImm0_1sList : GenericTable {
695671 let FilterClass = "PStateImm0_1";
696672 let Fields = ["Name", "Encoding", "Requires"];
673+
674+ let PrimaryKey = ["Encoding"];
675+ let PrimaryKeyName = "lookupPStateImm0_1ByEncoding";
697676}
698677
699678def lookupPStateImm0_1ByName : SearchIndex {
700679 let Table = PStateImm0_1sList;
701680 let Key = ["Name"];
702681}
703682
704- def lookupPStateImm0_1ByEncoding : SearchIndex {
705- let Table = PStateImm0_1sList;
706- let Key = ["Encoding"];
707- }
708-
709683// Name, Op1, Op2
710684def : PStateImm0_15<"SPSel", 0b000, 0b101>;
711685def : PStateImm0_15<"DAIFSet", 0b011, 0b110>;
@@ -753,18 +727,16 @@ def SVCRValues : GenericEnum {
753727def SVCRsList : GenericTable {
754728 let FilterClass = "SVCR";
755729 let Fields = ["Name", "Encoding", "Requires"];
730+
731+ let PrimaryKey = ["Encoding"];
732+ let PrimaryKeyName = "lookupSVCRByEncoding";
756733}
757734
758735def lookupSVCRByName : SearchIndex {
759736 let Table = SVCRsList;
760737 let Key = ["Name"];
761738}
762739
763- def lookupSVCRByEncoding : SearchIndex {
764- let Table = SVCRsList;
765- let Key = ["Encoding"];
766- }
767-
768740let Requires = [{ {AArch64::FeatureSME} }] in {
769741def : SVCR<"SVCRSM", 0b001>;
770742def : SVCR<"SVCRZA", 0b010>;
@@ -790,18 +762,16 @@ def PSBValues : GenericEnum {
790762def PSBsList : GenericTable {
791763 let FilterClass = "PSB";
792764 let Fields = ["Name", "Encoding"];
765+
766+ let PrimaryKey = ["Encoding"];
767+ let PrimaryKeyName = "lookupPSBByEncoding";
793768}
794769
795770def lookupPSBByName : SearchIndex {
796771 let Table = PSBsList;
797772 let Key = ["Name"];
798773}
799774
800- def lookupPSBByEncoding : SearchIndex {
801- let Table = PSBsList;
802- let Key = ["Encoding"];
803- }
804-
805775def : PSB<"csync", 0x11>;
806776
807777//===----------------------------------------------------------------------===//
@@ -823,18 +793,16 @@ def BTIValues : GenericEnum {
823793def BTIsList : GenericTable {
824794 let FilterClass = "BTI";
825795 let Fields = ["Name", "Encoding"];
796+
797+ let PrimaryKey = ["Encoding"];
798+ let PrimaryKeyName = "lookupBTIByEncoding";
826799}
827800
828801def lookupBTIByName : SearchIndex {
829802 let Table = BTIsList;
830803 let Key = ["Name"];
831804}
832805
833- def lookupBTIByEncoding : SearchIndex {
834- let Table = BTIsList;
835- let Key = ["Encoding"];
836- }
837-
838806def : BTI<"c", 0b010>;
839807def : BTI<"j", 0b100>;
840808def : BTI<"jc", 0b110>;
@@ -861,18 +829,16 @@ def TLBITable : GenericTable {
861829 let FilterClass = "TLBIEntry";
862830 let CppTypeName = "TLBI";
863831 let Fields = ["Name", "Encoding", "NeedsReg", "RequiresStr"];
832+
833+ let PrimaryKey = ["Encoding"];
834+ let PrimaryKeyName = "lookupTLBIByEncoding";
864835}
865836
866837def lookupTLBIByName : SearchIndex {
867838 let Table = TLBITable;
868839 let Key = ["Name"];
869840}
870841
871- def lookupTLBIByEncoding : SearchIndex {
872- let Table = TLBITable;
873- let Key = ["Encoding"];
874- }
875-
876842multiclass TLBI<string name, bits<3> op1, bits<4> crn, bits<4> crm,
877843 bits<3> op2, bit needsreg = 1> {
878844 def : TLBIEntry<name, op1, crn, crm, op2, needsreg>;
@@ -2382,18 +2348,16 @@ def PHintValues : GenericEnum {
23822348def PHintsList : GenericTable {
23832349 let FilterClass = "PHint";
23842350 let Fields = ["Name", "Encoding", "Requires"];
2351+
2352+ let PrimaryKey = ["Encoding"];
2353+ let PrimaryKeyName = "lookupPHintByEncoding";
23852354}
23862355
23872356def lookupPHintByName : SearchIndex {
23882357 let Table = PHintsList;
23892358 let Key = ["Name"];
23902359}
23912360
2392- def lookupPHintByEncoding : SearchIndex {
2393- let Table = PHintsList;
2394- let Key = ["Encoding"];
2395- }
2396-
23972361let Requires = [{ {AArch64::FeaturePCDPHINT} }] in {
23982362 def KEEP : PHint<0b00, 0b000, 0b0000, 0b0000, 0b000, "keep">;
23992363 def STRM : PHint<0b00, 0b000, 0b0000, 0b0000, 0b001, "strm">;
0 commit comments