@@ -442,36 +442,37 @@ multiclass VIndexLoadStore<list<int> EEWList> {
442
442
}
443
443
}
444
444
445
- multiclass VALU_IV_V_X_I <string opcodestr, bits<6> funct6> {
445
+ multiclass VALU_IV_V <string opcodestr, bits<6> funct6> {
446
446
def V : VALUVV<funct6, OPIVV, opcodestr # ".vv">,
447
447
Sched<[WriteVIALUV_WorstCase, ReadVIALUV_WorstCase,
448
448
ReadVIALUV_WorstCase, ReadVMask]>;
449
- def X : VALUVX<funct6, OPIVX, opcodestr # ".vx">,
450
- Sched<[WriteVIALUX_WorstCase, ReadVIALUV_WorstCase,
451
- ReadVIALUX_WorstCase, ReadVMask]>;
452
- def I : VALUVI<funct6, opcodestr # ".vi", simm5>,
453
- Sched<[WriteVIALUI_WorstCase, ReadVIALUV_WorstCase,
454
- ReadVMask]>;
455
449
}
456
450
457
- multiclass VALU_IV_V_X<string opcodestr, bits<6> funct6> {
458
- def V : VALUVV<funct6, OPIVV, opcodestr # ".vv">,
459
- Sched<[WriteVIALUV_WorstCase, ReadVIALUV_WorstCase,
460
- ReadVIALUV_WorstCase, ReadVMask]>;
451
+ multiclass VALU_IV_X<string opcodestr, bits<6> funct6> {
461
452
def X : VALUVX<funct6, OPIVX, opcodestr # ".vx">,
462
453
Sched<[WriteVIALUX_WorstCase, ReadVIALUV_WorstCase,
463
454
ReadVIALUX_WorstCase, ReadVMask]>;
464
455
}
465
456
466
- multiclass VALU_IV_X_I<string opcodestr, bits<6> funct6> {
467
- def X : VALUVX<funct6, OPIVX, opcodestr # ".vx">,
468
- Sched<[WriteVIALUX_WorstCase, ReadVIALUV_WorstCase,
469
- ReadVIALUX_WorstCase, ReadVMask]>;
457
+ multiclass VALU_IV_I<string opcodestr, bits<6> funct6> {
470
458
def I : VALUVI<funct6, opcodestr # ".vi", simm5>,
471
459
Sched<[WriteVIALUI_WorstCase, ReadVIALUV_WorstCase,
472
460
ReadVMask]>;
473
461
}
474
462
463
+ multiclass VALU_IV_V_X_I<string opcodestr, bits<6> funct6>
464
+ : VALU_IV_V<opcodestr, funct6>,
465
+ VALU_IV_X<opcodestr, funct6>,
466
+ VALU_IV_I<opcodestr, funct6>;
467
+
468
+ multiclass VALU_IV_V_X<string opcodestr, bits<6> funct6>
469
+ : VALU_IV_V<opcodestr, funct6>,
470
+ VALU_IV_X<opcodestr, funct6>;
471
+
472
+ multiclass VALU_IV_X_I<string opcodestr, bits<6> funct6>
473
+ : VALU_IV_X<opcodestr, funct6>,
474
+ VALU_IV_I<opcodestr, funct6>;
475
+
475
476
multiclass VALU_MV_V_X<string opcodestr, bits<6> funct6, string vw> {
476
477
def V : VALUVV<funct6, OPMVV, opcodestr # "." # vw # "v">,
477
478
Sched<[WriteVIWALUV_WorstCase, ReadVIWALUV_WorstCase,
@@ -490,38 +491,24 @@ multiclass VMAC_MV_V_X<string opcodestr, bits<6> funct6> {
490
491
ReadVIMulAddX_WorstCase, ReadVMask]>;
491
492
}
492
493
493
- multiclass VWMAC_MV_V_X<string opcodestr, bits<6> funct6> {
494
- def V : VALUrVV<funct6, OPMVV, opcodestr # ".vv">,
495
- Sched<[WriteVIWMulAddV_WorstCase, ReadVIWMulAddV_WorstCase,
496
- ReadVIWMulAddV_WorstCase, ReadVMask]>;
494
+ multiclass VWMAC_MV_X<string opcodestr, bits<6> funct6> {
497
495
def X : VALUrVX<funct6, OPMVX, opcodestr # ".vx">,
498
496
Sched<[WriteVIWMulAddX_WorstCase, ReadVIWMulAddV_WorstCase,
499
497
ReadVIWMulAddX_WorstCase, ReadVMask]>;
500
498
}
501
499
502
- multiclass VWMAC_MV_X<string opcodestr, bits<6> funct6> {
503
- def X : VALUrVX<funct6, OPMVX, opcodestr # ".vx">,
504
- Sched<[WriteVIWMulAddX_WorstCase, ReadVIWMulAddV_WorstCase,
505
- ReadVIWMulAddX_WorstCase, ReadVMask]>;
500
+ multiclass VWMAC_MV_V_X<string opcodestr, bits<6> funct6>
501
+ : VWMAC_MV_X<opcodestr, funct6> {
502
+ def V : VALUrVV<funct6, OPMVV, opcodestr # ".vv">,
503
+ Sched<[WriteVIWMulAddV_WorstCase, ReadVIWMulAddV_WorstCase,
504
+ ReadVIWMulAddV_WorstCase, ReadVMask]>;
506
505
}
507
506
508
507
multiclass VALU_MV_VS2<string opcodestr, bits<6> funct6, bits<5> vs1> {
509
508
def "" : VALUVs2<funct6, vs1, OPMVV, opcodestr>,
510
509
Sched<[WriteVExtV_WorstCase, ReadVExtV_WorstCase, ReadVMask]>;
511
510
}
512
511
513
- multiclass VALUm_IV_V_X_I<string opcodestr, bits<6> funct6> {
514
- def VM : VALUmVV<funct6, OPIVV, opcodestr # ".vvm">,
515
- Sched<[WriteVICALUV_WorstCase, ReadVICALUV_WorstCase,
516
- ReadVICALUV_WorstCase, ReadVMask]>;
517
- def XM : VALUmVX<funct6, OPIVX, opcodestr # ".vxm">,
518
- Sched<[WriteVICALUX_WorstCase, ReadVICALUV_WorstCase,
519
- ReadVICALUX_WorstCase, ReadVMask]>;
520
- def IM : VALUmVI<funct6, opcodestr # ".vim">,
521
- Sched<[WriteVICALUI_WorstCase, ReadVICALUV_WorstCase,
522
- ReadVMask]>;
523
- }
524
-
525
512
multiclass VMRG_IV_V_X_I<string opcodestr, bits<6> funct6> {
526
513
def VM : VALUmVV<funct6, OPIVV, opcodestr # ".vvm">,
527
514
Sched<[WriteVIMergeV_WorstCase, ReadVIMergeV_WorstCase,
@@ -543,15 +530,11 @@ multiclass VALUm_IV_V_X<string opcodestr, bits<6> funct6> {
543
530
ReadVICALUX_WorstCase, ReadVMask]>;
544
531
}
545
532
546
- multiclass VALUNoVm_IV_V_X_I<string opcodestr, bits<6> funct6> {
547
- def V : VALUVVNoVm<funct6, OPIVV, opcodestr # ".vv">,
548
- Sched<[WriteVICALUV_WorstCase, ReadVICALUV_WorstCase,
549
- ReadVICALUV_WorstCase]>;
550
- def X : VALUVXNoVm<funct6, OPIVX, opcodestr # ".vx">,
551
- Sched<[WriteVICALUX_WorstCase, ReadVICALUV_WorstCase,
552
- ReadVICALUX_WorstCase]>;
553
- def I : VALUVINoVm<funct6, opcodestr # ".vi", simm5>,
554
- Sched<[WriteVICALUI_WorstCase, ReadVICALUV_WorstCase]>;
533
+ multiclass VALUm_IV_V_X_I<string opcodestr, bits<6> funct6>
534
+ : VALUm_IV_V_X<opcodestr, funct6> {
535
+ def IM : VALUmVI<funct6, opcodestr # ".vim">,
536
+ Sched<[WriteVICALUI_WorstCase, ReadVICALUV_WorstCase,
537
+ ReadVMask]>;
555
538
}
556
539
557
540
multiclass VALUNoVm_IV_V_X<string opcodestr, bits<6> funct6> {
@@ -563,13 +546,10 @@ multiclass VALUNoVm_IV_V_X<string opcodestr, bits<6> funct6> {
563
546
ReadVICALUX_WorstCase]>;
564
547
}
565
548
566
- multiclass VALU_FV_V_F<string opcodestr, bits<6> funct6> {
567
- def V : VALUVV<funct6, OPFVV, opcodestr # ".vv">,
568
- Sched<[WriteVFALUV_WorstCase, ReadVFALUV_WorstCase,
569
- ReadVFALUV_WorstCase, ReadVMask]>;
570
- def F : VALUVF<funct6, OPFVF, opcodestr # ".vf">,
571
- Sched<[WriteVFALUF_WorstCase, ReadVFALUV_WorstCase,
572
- ReadVFALUF_WorstCase, ReadVMask]>;
549
+ multiclass VALUNoVm_IV_V_X_I<string opcodestr, bits<6> funct6>
550
+ : VALUNoVm_IV_V_X<opcodestr, funct6> {
551
+ def I : VALUVINoVm<funct6, opcodestr # ".vi", simm5>,
552
+ Sched<[WriteVICALUI_WorstCase, ReadVICALUV_WorstCase]>;
573
553
}
574
554
575
555
multiclass VALU_FV_F<string opcodestr, bits<6> funct6> {
@@ -578,6 +558,13 @@ multiclass VALU_FV_F<string opcodestr, bits<6> funct6> {
578
558
ReadVFALUF_WorstCase, ReadVMask]>;
579
559
}
580
560
561
+ multiclass VALU_FV_V_F<string opcodestr, bits<6> funct6>
562
+ : VALU_FV_F<opcodestr, funct6> {
563
+ def V : VALUVV<funct6, OPFVV, opcodestr # ".vv">,
564
+ Sched<[WriteVFALUV_WorstCase, ReadVFALUV_WorstCase,
565
+ ReadVFALUV_WorstCase, ReadVMask]>;
566
+ }
567
+
581
568
multiclass VWALU_FV_V_F<string opcodestr, bits<6> funct6, string vw> {
582
569
def V : VALUVV<funct6, OPFVV, opcodestr # "." # vw # "v">,
583
570
Sched<[WriteVFWALUV_WorstCase, ReadVFWALUV_WorstCase,
@@ -596,19 +583,17 @@ multiclass VMUL_FV_V_F<string opcodestr, bits<6> funct6> {
596
583
ReadVFMulF_WorstCase, ReadVMask]>;
597
584
}
598
585
599
- multiclass VDIV_FV_V_F<string opcodestr, bits<6> funct6> {
600
- def V : VALUVV<funct6, OPFVV, opcodestr # ".vv">,
601
- Sched<[WriteVFDivV_WorstCase, ReadVFDivV_WorstCase,
602
- ReadVFDivV_WorstCase, ReadVMask]>;
586
+ multiclass VDIV_FV_F<string opcodestr, bits<6> funct6> {
603
587
def F : VALUVF<funct6, OPFVF, opcodestr # ".vf">,
604
588
Sched<[WriteVFDivF_WorstCase, ReadVFDivV_WorstCase,
605
589
ReadVFDivF_WorstCase, ReadVMask]>;
606
590
}
607
591
608
- multiclass VRDIV_FV_F<string opcodestr, bits<6> funct6> {
609
- def F : VALUVF<funct6, OPFVF, opcodestr # ".vf">,
610
- Sched<[WriteVFDivF_WorstCase, ReadVFDivV_WorstCase,
611
- ReadVFDivF_WorstCase, ReadVMask]>;
592
+ multiclass VDIV_FV_V_F<string opcodestr, bits<6> funct6>
593
+ : VDIV_FV_F<opcodestr, funct6> {
594
+ def V : VALUVV<funct6, OPFVV, opcodestr # ".vv">,
595
+ Sched<[WriteVFDivV_WorstCase, ReadVFDivV_WorstCase,
596
+ ReadVFDivV_WorstCase, ReadVMask]>;
612
597
}
613
598
614
599
multiclass VWMUL_FV_V_F<string opcodestr, bits<6> funct6> {
@@ -659,19 +644,17 @@ multiclass VMINMAX_FV_V_F<string opcodestr, bits<6> funct6> {
659
644
ReadVFMinMaxF_WorstCase, ReadVMask]>;
660
645
}
661
646
662
- multiclass VCMP_FV_V_F<string opcodestr, bits<6> funct6> {
663
- def V : VALUVV<funct6, OPFVV, opcodestr # ".vv">,
664
- Sched<[WriteVFCmpV_WorstCase, ReadVFCmpV_WorstCase,
665
- ReadVFCmpV_WorstCase, ReadVMask]>;
647
+ multiclass VCMP_FV_F<string opcodestr, bits<6> funct6> {
666
648
def F : VALUVF<funct6, OPFVF, opcodestr # ".vf">,
667
649
Sched<[WriteVFCmpF_WorstCase, ReadVFCmpV_WorstCase,
668
650
ReadVFCmpF_WorstCase, ReadVMask]>;
669
651
}
670
652
671
- multiclass VCMP_FV_F<string opcodestr, bits<6> funct6> {
672
- def F : VALUVF<funct6, OPFVF, opcodestr # ".vf">,
673
- Sched<[WriteVFCmpF_WorstCase, ReadVFCmpV_WorstCase,
674
- ReadVFCmpF_WorstCase, ReadVMask]>;
653
+ multiclass VCMP_FV_V_F<string opcodestr, bits<6> funct6>
654
+ : VCMP_FV_F<opcodestr, funct6> {
655
+ def V : VALUVV<funct6, OPFVV, opcodestr # ".vv">,
656
+ Sched<[WriteVFCmpV_WorstCase, ReadVFCmpV_WorstCase,
657
+ ReadVFCmpV_WorstCase, ReadVMask]>;
675
658
}
676
659
677
660
multiclass VSGNJ_FV_V_F<string opcodestr, bits<6> funct6> {
@@ -822,35 +805,36 @@ multiclass VMINMAX_IV_V_X<string opcodestr, bits<6> funct6> {
822
805
ReadVIMinMaxX_WorstCase, ReadVMask]>;
823
806
}
824
807
825
- multiclass VCMP_IV_V_X_I <string opcodestr, bits<6> funct6> {
808
+ multiclass VCMP_IV_V <string opcodestr, bits<6> funct6> {
826
809
def V : VALUVV<funct6, OPIVV, opcodestr # ".vv">,
827
810
Sched<[WriteVICmpV_WorstCase, ReadVICmpV_WorstCase,
828
811
ReadVICmpV_WorstCase, ReadVMask]>;
829
- def X : VALUVX<funct6, OPIVX, opcodestr # ".vx">,
830
- Sched<[WriteVICmpX_WorstCase, ReadVICmpV_WorstCase,
831
- ReadVICmpX_WorstCase, ReadVMask]>;
832
- def I : VALUVI<funct6, opcodestr # ".vi", simm5>,
833
- Sched<[WriteVICmpI_WorstCase, ReadVICmpV_WorstCase,
834
- ReadVMask]>;
835
812
}
836
813
837
- multiclass VCMP_IV_X_I <string opcodestr, bits<6> funct6> {
814
+ multiclass VCMP_IV_X <string opcodestr, bits<6> funct6> {
838
815
def X : VALUVX<funct6, OPIVX, opcodestr # ".vx">,
839
816
Sched<[WriteVICmpX_WorstCase, ReadVICmpV_WorstCase,
840
817
ReadVICmpX_WorstCase, ReadVMask]>;
818
+ }
819
+
820
+ multiclass VCMP_IV_I<string opcodestr, bits<6> funct6> {
841
821
def I : VALUVI<funct6, opcodestr # ".vi", simm5>,
842
822
Sched<[WriteVICmpI_WorstCase, ReadVICmpV_WorstCase,
843
823
ReadVMask]>;
844
824
}
845
825
846
- multiclass VCMP_IV_V_X<string opcodestr, bits<6> funct6> {
847
- def V : VALUVV<funct6, OPIVV, opcodestr # ".vv">,
848
- Sched<[WriteVICmpV_WorstCase, ReadVICmpV_WorstCase,
849
- ReadVICmpV_WorstCase, ReadVMask]>;
850
- def X : VALUVX<funct6, OPIVX, opcodestr # ".vx">,
851
- Sched<[WriteVICmpX_WorstCase, ReadVICmpV_WorstCase,
852
- ReadVICmpX_WorstCase, ReadVMask]>;
853
- }
826
+ multiclass VCMP_IV_V_X_I<string opcodestr, bits<6> funct6>
827
+ : VCMP_IV_V<opcodestr, funct6>,
828
+ VCMP_IV_X<opcodestr, funct6>,
829
+ VCMP_IV_I<opcodestr, funct6>;
830
+
831
+ multiclass VCMP_IV_X_I<string opcodestr, bits<6> funct6>
832
+ : VCMP_IV_X<opcodestr, funct6>,
833
+ VCMP_IV_I<opcodestr, funct6>;
834
+
835
+ multiclass VCMP_IV_V_X<string opcodestr, bits<6> funct6>
836
+ : VCMP_IV_V<opcodestr, funct6>,
837
+ VCMP_IV_X<opcodestr, funct6>;
854
838
855
839
multiclass VMUL_MV_V_X<string opcodestr, bits<6> funct6> {
856
840
def V : VALUVV<funct6, OPMVV, opcodestr # ".vv">,
@@ -879,27 +863,22 @@ multiclass VDIV_MV_V_X<string opcodestr, bits<6> funct6> {
879
863
ReadVIDivX_WorstCase, ReadVMask]>;
880
864
}
881
865
882
- multiclass VSALU_IV_V_X_I <string opcodestr, bits<6> funct6> {
866
+ multiclass VSALU_IV_V_X <string opcodestr, bits<6> funct6> {
883
867
def V : VALUVV<funct6, OPIVV, opcodestr # ".vv">,
884
868
Sched<[WriteVSALUV_WorstCase, ReadVSALUV_WorstCase,
885
869
ReadVSALUV_WorstCase, ReadVMask]>;
886
870
def X : VALUVX<funct6, OPIVX, opcodestr # ".vx">,
887
871
Sched<[WriteVSALUX_WorstCase, ReadVSALUV_WorstCase,
888
872
ReadVSALUX_WorstCase, ReadVMask]>;
873
+ }
874
+
875
+ multiclass VSALU_IV_V_X_I<string opcodestr, bits<6> funct6>
876
+ : VSALU_IV_V_X<opcodestr, funct6> {
889
877
def I : VALUVI<funct6, opcodestr # ".vi", simm5>,
890
878
Sched<[WriteVSALUI_WorstCase, ReadVSALUV_WorstCase,
891
879
ReadVMask]>;
892
880
}
893
881
894
- multiclass VSALU_IV_V_X<string opcodestr, bits<6> funct6> {
895
- def V : VALUVV<funct6, OPIVV, opcodestr # ".vv">,
896
- Sched<[WriteVSALUV_WorstCase, ReadVSALUV_WorstCase,
897
- ReadVSALUV_WorstCase, ReadVMask]>;
898
- def X : VALUVX<funct6, OPIVX, opcodestr # ".vx">,
899
- Sched<[WriteVSALUX_WorstCase, ReadVSALUV_WorstCase,
900
- ReadVSALUX_WorstCase, ReadVMask]>;
901
- }
902
-
903
882
multiclass VAALU_MV_V_X<string opcodestr, bits<6> funct6> {
904
883
def V : VALUVV<funct6, OPMVV, opcodestr # ".vv">,
905
884
Sched<[WriteVAALUV_WorstCase, ReadVAALUV_WorstCase,
@@ -1360,7 +1339,7 @@ defm VFWSUB_W : VWALU_FV_V_F<"vfwsub", 0b110110, "w">;
1360
1339
let Uses = [FRM], mayRaiseFPException = true in {
1361
1340
defm VFMUL_V : VMUL_FV_V_F<"vfmul", 0b100100>;
1362
1341
defm VFDIV_V : VDIV_FV_V_F<"vfdiv", 0b100000>;
1363
- defm VFRDIV_V : VRDIV_FV_F <"vfrdiv", 0b100001>;
1342
+ defm VFRDIV_V : VDIV_FV_F <"vfrdiv", 0b100001>;
1364
1343
}
1365
1344
1366
1345
// Vector Widening Floating-Point Multiply
0 commit comments