@@ -586,14 +586,23 @@ let Predicates = [iHasE2] in {
586
586
BinOpFrag<(rotl node:$LHS, (and node:$RHS, 0x1f))>, "rotl32">;
587
587
588
588
def BMASKI32 : I_5_Z<0b010100, 0x1, "bmaski32", oimm5, []>;
589
- def LSLC32 : I_5_XZ<0x13, 0x1, "lslc32",
590
- (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, oimm5:$imm5), []>;
591
- def LSRC32 : I_5_XZ<0x13, 0x2, "lsrc32",
592
- (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, oimm5:$imm5), []>;
593
- def ASRC32 : I_5_XZ<0x13, 0x4, "asrc32",
594
- (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, oimm5:$imm5), []>;
595
- def XSR32 : I_5_XZ<0x13, 0x8, "xsr32",
596
- (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, oimm5:$imm5, CARRY:$cin), []>;
589
+ def LSLC32 : I_5_XZ<0x13, 0x1, "lslc32", (outs GPR:$rz, CARRY:$cout),
590
+ (ins GPR:$rx, oimm5:$imm5), []> {
591
+ bits<0> cout;
592
+ }
593
+ def LSRC32 : I_5_XZ<0x13, 0x2, "lsrc32", (outs GPR:$rz, CARRY:$cout),
594
+ (ins GPR:$rx, oimm5:$imm5), []> {
595
+ bits<0> cout;
596
+ }
597
+ def ASRC32 : I_5_XZ<0x13, 0x4, "asrc32", (outs GPR:$rz, CARRY:$cout),
598
+ (ins GPR:$rx, oimm5:$imm5), []> {
599
+ bits<0> cout;
600
+ }
601
+ def XSR32 : I_5_XZ<0x13, 0x8, "xsr32", (outs GPR:$rz, CARRY:$cout),
602
+ (ins GPR:$rx, oimm5:$imm5, CARRY:$cin), []> {
603
+ bits<0> cout;
604
+ bits<0> cin;
605
+ }
597
606
598
607
def IXH32 : R_YXZ_SP_F1<0x2, 0x1,
599
608
BinOpFrag<(add node:$LHS, (shl node:$RHS, (i32 1)))>, "ixh32">;
@@ -605,9 +614,15 @@ let Predicates = [iHasE2] in {
605
614
606
615
let isCommutable = 1, isAdd = 1 in
607
616
def ADDC32 : R_YXZ<0x31, 0x0, 0x2, (outs GPR:$rz, CARRY:$cout),
608
- (ins GPR:$rx, GPR:$ry, CARRY:$cin), "addc32", []>;
617
+ (ins GPR:$rx, GPR:$ry, CARRY:$cin), "addc32", []> {
618
+ bits<0> cout;
619
+ bits<0> cin;
620
+ }
609
621
def SUBC32 : R_YXZ<0x31, 0x0, 0x8, (outs GPR:$rz, CARRY:$cout),
610
- (ins GPR:$rx, GPR:$ry, CARRY:$cin), "subc32", []>;
622
+ (ins GPR:$rx, GPR:$ry, CARRY:$cin), "subc32", []> {
623
+ bits<0> cout;
624
+ bits<0> cin;
625
+ }
611
626
612
627
def INCF32 : I_5_ZX<0x3, 0x1, "incf32", uimm5, []>;
613
628
def INCT32 : I_5_ZX<0x3, 0x2, "inct32", uimm5, []>;
@@ -621,12 +636,18 @@ let Predicates = [iHas2E3] in {
621
636
def DIVU32 : R_YXZ_SP_F1<0x20, 0x1,
622
637
BinOpFrag<(udiv node:$LHS, node:$RHS)>, "divu32">;
623
638
624
- def DECGT32 : I_5_XZ<0x4, 0x1, "decgt32",
625
- (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, uimm5:$imm5), []>;
626
- def DECLT32 : I_5_XZ<0x4, 0x2, "declt32",
627
- (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, uimm5:$imm5), []>;
628
- def DECNE32 : I_5_XZ<0x4, 0x4, "decne32",
629
- (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, uimm5:$imm5), []>;
639
+ def DECGT32 : I_5_XZ<0x4, 0x1, "decgt32", (outs GPR:$rz, CARRY:$cout),
640
+ (ins GPR:$rx, uimm5:$imm5), []> {
641
+ bits<0> cout;
642
+ }
643
+ def DECLT32 : I_5_XZ<0x4, 0x2, "declt32", (outs GPR:$rz, CARRY:$cout),
644
+ (ins GPR:$rx, uimm5:$imm5), []> {
645
+ bits<0> cout;
646
+ }
647
+ def DECNE32 : I_5_XZ<0x4, 0x4, "decne32", (outs GPR:$rz, CARRY:$cout),
648
+ (ins GPR:$rx, uimm5:$imm5), []> {
649
+ bits<0> cout;
650
+ }
630
651
631
652
def SEXT32 : I_5_XZ_U<0x16, (outs GPR:$rz), (ins GPR:$rx, uimm5:$msb, uimm5:$lsb), "sext32", []>;
632
653
let isCodeGenOnly = 1 in {
@@ -744,17 +765,19 @@ let Predicates = [iHas2E3] in {
744
765
def CMPHS32 : R_YX<0x1, 0x1, "cmphs32">;
745
766
def CMPLT32 : R_YX<0x1, 0x2, "cmplt32">;
746
767
747
- def SETC32 : CSKY32Inst<AddrModeNone, 0x31,
748
- (outs CARRY:$ca), (ins), "setc32", []> {
768
+ def SETC32 : CSKY32Inst<AddrModeNone, 0x31, (outs CARRY:$ca), (ins), "setc32",
769
+ []> {
770
+ bits<0> ca;
749
771
let Inst{25 - 21} = 0; //rx
750
772
let Inst{20 - 16} = 0; //ry
751
773
let Inst{15 - 10} = 0x1;
752
774
let Inst{9 - 5} = 0x1;
753
775
let Inst{4 - 0} = 0;
754
776
let isCompare = 1;
755
777
}
756
- def CLRC32 : CSKY32Inst<AddrModeNone, 0x31,
757
- (outs CARRY:$ca), (ins), "clrc32", []> {
778
+ def CLRC32 : CSKY32Inst<AddrModeNone, 0x31, (outs CARRY:$ca), (ins), "clrc32",
779
+ []> {
780
+ bits<0> ca;
758
781
let Inst{25 - 21} = 0; //rx
759
782
let Inst{20 - 16} = 0; //ry
760
783
let Inst{15 - 10} = 0x1;
@@ -764,8 +787,10 @@ let Predicates = [iHas2E3] in {
764
787
}
765
788
766
789
def TST32 : R_YX<0x8, 0x4, "tst32">;
767
- def TSTNBZ32 : R_X<0x8, 0x8,
768
- (outs CARRY:$ca), (ins GPR:$rx), "tstnbz32", []>;
790
+ def TSTNBZ32 : R_X<0x8, 0x8, (outs CARRY:$ca), (ins GPR:$rx), "tstnbz32",
791
+ []> {
792
+ bits<0> ca;
793
+ }
769
794
}
770
795
771
796
//===----------------------------------------------------------------------===//
@@ -806,9 +831,14 @@ let isBranch = 1, isTerminator = 1 in {
806
831
[(br bb:$imm16)]>;
807
832
808
833
def BT32 : I_16_L<0x3, (outs), (ins CARRY:$ca, br_symbol:$imm16),
809
- "bt32\t$imm16", [(brcond CARRY:$ca, bb:$imm16)]>, Requires<[iHasE2]>;
834
+ "bt32\t$imm16", [(brcond CARRY:$ca, bb:$imm16)]>,
835
+ Requires<[iHasE2]> {
836
+ bits<0> ca;
837
+ }
810
838
def BF32 : I_16_L<0x2, (outs), (ins CARRY:$ca, br_symbol:$imm16),
811
- "bf32\t$imm16", []>, Requires<[iHasE2]>;
839
+ "bf32\t$imm16", []>, Requires<[iHasE2]> {
840
+ bits<0> ca;
841
+ }
812
842
}
813
843
814
844
let Predicates = [iHas2E3] in {
@@ -1030,7 +1060,10 @@ def SE32 : I_5_XZ_PRIVI<0b010110, 0x1, "se32">;
1030
1060
def WSC32 : I_5_XZ_PRIVI<0b001111, 0x1, "wsc32">;
1031
1061
1032
1062
def CPOP32 : I_CPOP<(outs), (ins uimm5:$cpid, uimm20:$usdef), "cpop32 <$cpid, ${usdef}>">;
1033
- def CPRC32 : I_CP<0b0100, (outs CARRY:$ca), (ins uimm5:$cpid, uimm12:$usdef), "cprc32 <$cpid, ${usdef}>">;
1063
+ def CPRC32 : I_CP<0b0100, (outs CARRY:$ca), (ins uimm5:$cpid, uimm12:$usdef),
1064
+ "cprc32 <$cpid, ${usdef}>"> {
1065
+ bits<0> ca;
1066
+ }
1034
1067
def CPRCR32 : I_CP_Z<0b0010, (outs GPR:$rz), (ins uimm5:$cpid, uimm12:$usdef), "cprcr32 $rz, <$cpid, ${usdef}>">;
1035
1068
def CPRGR32 : I_CP_Z<0b0000, (outs GPR:$rz), (ins uimm5:$cpid, uimm12:$usdef), "cprgr32 $rz, <$cpid, ${usdef}>">;
1036
1069
def CPWCR32 : I_CP_Z<0b0011, (outs), (ins GPR:$rz, uimm5:$cpid, uimm12:$usdef), "cpwcr32 $rz, <$cpid, ${usdef}>">;
0 commit comments