@@ -666,6 +666,7 @@ def PPCU1ImmAsmOperand : AsmOperandClass {
666
666
def u1imm : Operand<i32> {
667
667
let PrintMethod = "printU1ImmOperand";
668
668
let ParserMatchClass = PPCU1ImmAsmOperand;
669
+ let OperandType = "OPERAND_IMMEDIATE";
669
670
}
670
671
671
672
def PPCU2ImmAsmOperand : AsmOperandClass {
@@ -675,6 +676,7 @@ def PPCU2ImmAsmOperand : AsmOperandClass {
675
676
def u2imm : Operand<i32> {
676
677
let PrintMethod = "printU2ImmOperand";
677
678
let ParserMatchClass = PPCU2ImmAsmOperand;
679
+ let OperandType = "OPERAND_IMMEDIATE";
678
680
}
679
681
680
682
def PPCATBitsAsHintAsmOperand : AsmOperandClass {
@@ -684,6 +686,7 @@ def PPCATBitsAsHintAsmOperand : AsmOperandClass {
684
686
def atimm : Operand<i32> {
685
687
let PrintMethod = "printATBitsAsHint";
686
688
let ParserMatchClass = PPCATBitsAsHintAsmOperand;
689
+ let OperandType = "OPERAND_IMMEDIATE";
687
690
}
688
691
689
692
def PPCU3ImmAsmOperand : AsmOperandClass {
@@ -693,6 +696,7 @@ def PPCU3ImmAsmOperand : AsmOperandClass {
693
696
def u3imm : Operand<i32> {
694
697
let PrintMethod = "printU3ImmOperand";
695
698
let ParserMatchClass = PPCU3ImmAsmOperand;
699
+ let OperandType = "OPERAND_IMMEDIATE";
696
700
}
697
701
698
702
def PPCU4ImmAsmOperand : AsmOperandClass {
@@ -702,6 +706,7 @@ def PPCU4ImmAsmOperand : AsmOperandClass {
702
706
def u4imm : Operand<i32> {
703
707
let PrintMethod = "printU4ImmOperand";
704
708
let ParserMatchClass = PPCU4ImmAsmOperand;
709
+ let OperandType = "OPERAND_IMMEDIATE";
705
710
}
706
711
def PPCS5ImmAsmOperand : AsmOperandClass {
707
712
let Name = "S5Imm"; let PredicateMethod = "isS5Imm";
@@ -711,6 +716,7 @@ def s5imm : Operand<i32> {
711
716
let PrintMethod = "printS5ImmOperand";
712
717
let ParserMatchClass = PPCS5ImmAsmOperand;
713
718
let DecoderMethod = "decodeSImmOperand<5>";
719
+ let OperandType = "OPERAND_IMMEDIATE";
714
720
}
715
721
def PPCU5ImmAsmOperand : AsmOperandClass {
716
722
let Name = "U5Imm"; let PredicateMethod = "isU5Imm";
@@ -720,6 +726,7 @@ def u5imm : Operand<i32> {
720
726
let PrintMethod = "printU5ImmOperand";
721
727
let ParserMatchClass = PPCU5ImmAsmOperand;
722
728
let DecoderMethod = "decodeUImmOperand<5>";
729
+ let OperandType = "OPERAND_IMMEDIATE";
723
730
}
724
731
def PPCU6ImmAsmOperand : AsmOperandClass {
725
732
let Name = "U6Imm"; let PredicateMethod = "isU6Imm";
@@ -729,6 +736,7 @@ def u6imm : Operand<i32> {
729
736
let PrintMethod = "printU6ImmOperand";
730
737
let ParserMatchClass = PPCU6ImmAsmOperand;
731
738
let DecoderMethod = "decodeUImmOperand<6>";
739
+ let OperandType = "OPERAND_IMMEDIATE";
732
740
}
733
741
def PPCU7ImmAsmOperand : AsmOperandClass {
734
742
let Name = "U7Imm"; let PredicateMethod = "isU7Imm";
@@ -738,6 +746,7 @@ def u7imm : Operand<i32> {
738
746
let PrintMethod = "printU7ImmOperand";
739
747
let ParserMatchClass = PPCU7ImmAsmOperand;
740
748
let DecoderMethod = "decodeUImmOperand<7>";
749
+ let OperandType = "OPERAND_IMMEDIATE";
741
750
}
742
751
def PPCU8ImmAsmOperand : AsmOperandClass {
743
752
let Name = "U8Imm"; let PredicateMethod = "isU8Imm";
@@ -747,6 +756,7 @@ def u8imm : Operand<i32> {
747
756
let PrintMethod = "printU8ImmOperand";
748
757
let ParserMatchClass = PPCU8ImmAsmOperand;
749
758
let DecoderMethod = "decodeUImmOperand<8>";
759
+ let OperandType = "OPERAND_IMMEDIATE";
750
760
}
751
761
def PPCU10ImmAsmOperand : AsmOperandClass {
752
762
let Name = "U10Imm"; let PredicateMethod = "isU10Imm";
@@ -756,6 +766,7 @@ def u10imm : Operand<i32> {
756
766
let PrintMethod = "printU10ImmOperand";
757
767
let ParserMatchClass = PPCU10ImmAsmOperand;
758
768
let DecoderMethod = "decodeUImmOperand<10>";
769
+ let OperandType = "OPERAND_IMMEDIATE";
759
770
}
760
771
def PPCU12ImmAsmOperand : AsmOperandClass {
761
772
let Name = "U12Imm"; let PredicateMethod = "isU12Imm";
@@ -765,6 +776,7 @@ def u12imm : Operand<i32> {
765
776
let PrintMethod = "printU12ImmOperand";
766
777
let ParserMatchClass = PPCU12ImmAsmOperand;
767
778
let DecoderMethod = "decodeUImmOperand<12>";
779
+ let OperandType = "OPERAND_IMMEDIATE";
768
780
}
769
781
def PPCS16ImmAsmOperand : AsmOperandClass {
770
782
let Name = "S16Imm"; let PredicateMethod = "isS16Imm";
@@ -775,6 +787,7 @@ def s16imm : Operand<i32> {
775
787
let EncoderMethod = "getImm16Encoding";
776
788
let ParserMatchClass = PPCS16ImmAsmOperand;
777
789
let DecoderMethod = "decodeSImmOperand<16>";
790
+ let OperandType = "OPERAND_IMMEDIATE";
778
791
}
779
792
def PPCU16ImmAsmOperand : AsmOperandClass {
780
793
let Name = "U16Imm"; let PredicateMethod = "isU16Imm";
@@ -785,6 +798,7 @@ def u16imm : Operand<i32> {
785
798
let EncoderMethod = "getImm16Encoding";
786
799
let ParserMatchClass = PPCU16ImmAsmOperand;
787
800
let DecoderMethod = "decodeUImmOperand<16>";
801
+ let OperandType = "OPERAND_IMMEDIATE";
788
802
}
789
803
def PPCS17ImmAsmOperand : AsmOperandClass {
790
804
let Name = "S17Imm"; let PredicateMethod = "isS17Imm";
@@ -798,6 +812,7 @@ def s17imm : Operand<i32> {
798
812
let EncoderMethod = "getImm16Encoding";
799
813
let ParserMatchClass = PPCS17ImmAsmOperand;
800
814
let DecoderMethod = "decodeSImmOperand<16>";
815
+ let OperandType = "OPERAND_IMMEDIATE";
801
816
}
802
817
def PPCS34ImmAsmOperand : AsmOperandClass {
803
818
let Name = "S34Imm";
@@ -809,12 +824,14 @@ def s34imm : Operand<i64> {
809
824
let EncoderMethod = "getImm34EncodingNoPCRel";
810
825
let ParserMatchClass = PPCS34ImmAsmOperand;
811
826
let DecoderMethod = "decodeSImmOperand<34>";
827
+ let OperandType = "OPERAND_IMMEDIATE";
812
828
}
813
829
def s34imm_pcrel : Operand<i64> {
814
830
let PrintMethod = "printS34ImmOperand";
815
831
let EncoderMethod = "getImm34EncodingPCRel";
816
832
let ParserMatchClass = PPCS34ImmAsmOperand;
817
833
let DecoderMethod = "decodeSImmOperand<34>";
834
+ let OperandType = "OPERAND_IMMEDIATE";
818
835
}
819
836
def PPCImmZeroAsmOperand : AsmOperandClass {
820
837
let Name = "ImmZero";
@@ -825,6 +842,7 @@ def immZero : Operand<i32> {
825
842
let PrintMethod = "printImmZeroOperand";
826
843
let ParserMatchClass = PPCImmZeroAsmOperand;
827
844
let DecoderMethod = "decodeImmZeroOperand";
845
+ let OperandType = "OPERAND_IMMEDIATE";
828
846
}
829
847
830
848
def fpimm0 : PatLeaf<(fpimm), [{ return N->isExactlyValue(+0.0); }]>;
@@ -970,47 +988,55 @@ def memri : Operand<iPTR> {
970
988
let MIOperandInfo = (ops dispRI:$imm, ptr_rc_nor0:$reg);
971
989
let EncoderMethod = "getMemRIEncoding";
972
990
let DecoderMethod = "decodeMemRIOperands";
991
+ let OperandType = "OPERAND_MEMORY";
973
992
}
974
993
def memrr : Operand<iPTR> {
975
994
let PrintMethod = "printMemRegReg";
976
995
let MIOperandInfo = (ops ptr_rc_nor0:$ptrreg, ptr_rc_idx:$offreg);
996
+ let OperandType = "OPERAND_MEMORY";
977
997
}
978
998
def memrix : Operand<iPTR> { // memri where the imm is 4-aligned.
979
999
let PrintMethod = "printMemRegImm";
980
1000
let MIOperandInfo = (ops dispRIX:$imm, ptr_rc_nor0:$reg);
981
1001
let EncoderMethod = "getMemRIXEncoding";
982
1002
let DecoderMethod = "decodeMemRIXOperands";
1003
+ let OperandType = "OPERAND_MEMORY";
983
1004
}
984
1005
def memrix16 : Operand<iPTR> { // memri, imm is 16-aligned, 12-bit, Inst{16:27}
985
1006
let PrintMethod = "printMemRegImm";
986
1007
let MIOperandInfo = (ops dispRIX16:$imm, ptr_rc_nor0:$reg);
987
1008
let EncoderMethod = "getMemRIX16Encoding";
988
1009
let DecoderMethod = "decodeMemRIX16Operands";
1010
+ let OperandType = "OPERAND_MEMORY";
989
1011
}
990
1012
def spe8dis : Operand<iPTR> { // SPE displacement where the imm is 8-aligned.
991
1013
let PrintMethod = "printMemRegImm";
992
1014
let MIOperandInfo = (ops dispSPE8:$imm, ptr_rc_nor0:$reg);
993
1015
let EncoderMethod = "getSPE8DisEncoding";
994
1016
let DecoderMethod = "decodeSPE8Operands";
1017
+ let OperandType = "OPERAND_MEMORY";
995
1018
}
996
1019
def spe4dis : Operand<iPTR> { // SPE displacement where the imm is 4-aligned.
997
1020
let PrintMethod = "printMemRegImm";
998
1021
let MIOperandInfo = (ops dispSPE4:$imm, ptr_rc_nor0:$reg);
999
1022
let EncoderMethod = "getSPE4DisEncoding";
1000
1023
let DecoderMethod = "decodeSPE4Operands";
1024
+ let OperandType = "OPERAND_MEMORY";
1001
1025
}
1002
1026
def spe2dis : Operand<iPTR> { // SPE displacement where the imm is 2-aligned.
1003
1027
let PrintMethod = "printMemRegImm";
1004
1028
let MIOperandInfo = (ops dispSPE2:$imm, ptr_rc_nor0:$reg);
1005
1029
let EncoderMethod = "getSPE2DisEncoding";
1006
1030
let DecoderMethod = "decodeSPE2Operands";
1031
+ let OperandType = "OPERAND_MEMORY";
1007
1032
}
1008
1033
1009
1034
// A single-register address. This is used with the SjLj
1010
1035
// pseudo-instructions which translates to LD/LWZ. These instructions requires
1011
1036
// G8RC_NOX0 registers.
1012
1037
def memr : Operand<iPTR> {
1013
1038
let MIOperandInfo = (ops ptr_rc_nor0:$ptrreg);
1039
+ let OperandType = "OPERAND_MEMORY";
1014
1040
}
1015
1041
def PPCTLSRegOperand : AsmOperandClass {
1016
1042
let Name = "TLSReg"; let PredicateMethod = "isTLSReg";
0 commit comments