@@ -154,7 +154,8 @@ def FeatureStdExtZihpm
154
154
: RISCVExtension<2, 0, "Hardware Performance Counters",
155
155
[FeatureStdExtZicsr]>;
156
156
157
- def FeatureStdExtZimop : RISCVExtension<1, 0, "May-Be-Operations">;
157
+ def FeatureStdExtZimop : RISCVExtension<1, 0, "May-Be-Operations">,
158
+ RISCVExtensionBitmask<1, 1>;
158
159
def HasStdExtZimop : Predicate<"Subtarget->hasStdExtZimop()">,
159
160
AssemblerPredicate<(all_of FeatureStdExtZimop),
160
161
"'Zimop' (May-Be-Operations)">;
@@ -262,7 +263,8 @@ def HasStdExtZalasr : Predicate<"Subtarget->hasStdExtZalasr()">,
262
263
def FeatureStdExtZama16b
263
264
: RISCVExtension<1, 0, "Atomic 16-byte misaligned loads, stores and AMOs">;
264
265
265
- def FeatureStdExtZawrs : RISCVExtension<1, 0, "Wait on Reservation Set">;
266
+ def FeatureStdExtZawrs : RISCVExtension<1, 0, "Wait on Reservation Set">,
267
+ RISCVExtensionBitmask<1, 7>;
266
268
def HasStdExtZawrs : Predicate<"Subtarget->hasStdExtZawrs()">,
267
269
AssemblerPredicate<(all_of FeatureStdExtZawrs),
268
270
"'Zawrs' (Wait on Reservation Set)">;
@@ -368,7 +370,8 @@ def HasRVCHints : Predicate<"Subtarget->enableRVCHintInstrs()">,
368
370
def FeatureStdExtZca
369
371
: RISCVExtension<1, 0,
370
372
"part of the C extension, excluding compressed "
371
- "floating point loads/stores">;
373
+ "floating point loads/stores">,
374
+ RISCVExtensionBitmask<1, 2>;
372
375
373
376
def FeatureStdExtC
374
377
: RISCVExtension<2, 0, "Compressed Instructions", [FeatureStdExtZca]>,
@@ -387,15 +390,17 @@ def HasStdExtCOrZca
387
390
388
391
def FeatureStdExtZcb
389
392
: RISCVExtension<1, 0, "Compressed basic bit manipulation instructions",
390
- [FeatureStdExtZca]>;
393
+ [FeatureStdExtZca]>,
394
+ RISCVExtensionBitmask<1, 3>;
391
395
def HasStdExtZcb : Predicate<"Subtarget->hasStdExtZcb()">,
392
396
AssemblerPredicate<(all_of FeatureStdExtZcb),
393
397
"'Zcb' (Compressed basic bit manipulation instructions)">;
394
398
395
399
def FeatureStdExtZcd
396
400
: RISCVExtension<1, 0,
397
401
"Compressed Double-Precision Floating-Point Instructions",
398
- [FeatureStdExtD, FeatureStdExtZca]>;
402
+ [FeatureStdExtD, FeatureStdExtZca]>,
403
+ RISCVExtensionBitmask<1, 4>;
399
404
400
405
def HasStdExtCOrZcd
401
406
: Predicate<"Subtarget->hasStdExtCOrZcd()">,
@@ -406,7 +411,8 @@ def HasStdExtCOrZcd
406
411
def FeatureStdExtZcf
407
412
: RISCVExtension<1, 0,
408
413
"Compressed Single-Precision Floating-Point Instructions",
409
- [FeatureStdExtF, FeatureStdExtZca]>;
414
+ [FeatureStdExtF, FeatureStdExtZca]>,
415
+ RISCVExtensionBitmask<1, 5>;
410
416
411
417
def FeatureStdExtZclsd
412
418
: RISCVExtension<1, 0,
@@ -447,7 +453,8 @@ def HasStdExtCOrZcfOrZce
447
453
448
454
def FeatureStdExtZcmop
449
455
: RISCVExtension<1, 0, "Compressed May-Be-Operations",
450
- [FeatureStdExtZca]>;
456
+ [FeatureStdExtZca]>,
457
+ RISCVExtensionBitmask<1, 6>;
451
458
def HasStdExtZcmop : Predicate<"Subtarget->hasStdExtZcmop()">,
452
459
AssemblerPredicate<(all_of FeatureStdExtZcmop),
453
460
"'Zcmop' (Compressed May-Be-Operations)">;
@@ -628,32 +635,37 @@ def FeatureStdExtZve32x
628
635
: RISCVExtension<1, 0,
629
636
"Vector Extensions for Embedded Processors "
630
637
"with maximal 32 EEW",
631
- [FeatureStdExtZicsr, FeatureStdExtZvl32b]>;
638
+ [FeatureStdExtZicsr, FeatureStdExtZvl32b]>,
639
+ RISCVExtensionBitmask<0, 60>;
632
640
633
641
634
642
def FeatureStdExtZve32f
635
643
: RISCVExtension<1, 0,
636
644
"Vector Extensions for Embedded Processors "
637
645
"with maximal 32 EEW and F extension",
638
- [FeatureStdExtZve32x, FeatureStdExtF]>;
646
+ [FeatureStdExtZve32x, FeatureStdExtF]>,
647
+ RISCVExtensionBitmask<0, 61>;
639
648
640
649
def FeatureStdExtZve64x
641
650
: RISCVExtension<1, 0,
642
651
"Vector Extensions for Embedded Processors "
643
652
"with maximal 64 EEW",
644
- [FeatureStdExtZve32x, FeatureStdExtZvl64b]>;
653
+ [FeatureStdExtZve32x, FeatureStdExtZvl64b]>,
654
+ RISCVExtensionBitmask<0, 62>;
645
655
646
656
def FeatureStdExtZve64f
647
657
: RISCVExtension<1, 0,
648
658
"Vector Extensions for Embedded Processors "
649
659
"with maximal 64 EEW and F extension",
650
- [FeatureStdExtZve32f, FeatureStdExtZve64x]>;
660
+ [FeatureStdExtZve32f, FeatureStdExtZve64x]>,
661
+ RISCVExtensionBitmask<0, 63>;
651
662
652
663
def FeatureStdExtZve64d
653
664
: RISCVExtension<1, 0,
654
665
"Vector Extensions for Embedded Processors "
655
666
"with maximal 64 EEW, F and D extension",
656
- [FeatureStdExtZve64f, FeatureStdExtD]>;
667
+ [FeatureStdExtZve64f, FeatureStdExtD]>,
668
+ RISCVExtensionBitmask<1, 0>;
657
669
658
670
def FeatureStdExtV
659
671
: RISCVExtension<1, 0,
0 commit comments