@@ -819,38 +819,40 @@ def SWPB16r : Pseudo<(outs GR16:$dst), (ins GR16:$src),
819
819
// Integer comparisons
820
820
let Defs = [SRW] in {
821
821
def CMP8rr : Pseudo<(outs), (ins GR8:$src1, GR8:$src2),
822
- "cmp.b\t{$src1 , $src2 }",
822
+ "cmp.b\t{$src2 , $src1 }",
823
823
[(MSP430cmp GR8:$src1, GR8:$src2), (implicit SRW)]>;
824
824
def CMP16rr : Pseudo<(outs), (ins GR16:$src1, GR16:$src2),
825
- "cmp.w\t{$src1 , $src2 }",
825
+ "cmp.w\t{$src2 , $src1 }",
826
826
[(MSP430cmp GR16:$src1, GR16:$src2), (implicit SRW)]>;
827
827
828
- def CMP8ir : Pseudo<(outs), (ins i8imm:$src1, GR8:$src2),
829
- "cmp.b\t{$src1, $src2}",
830
- [(MSP430cmp imm:$src1, GR8:$src2), (implicit SRW)]>;
831
- def CMP16ir : Pseudo<(outs), (ins i16imm:$src1, GR16:$src2),
832
- "cmp.w\t{$src1, $src2}",
833
- [(MSP430cmp imm:$src1, GR16:$src2), (implicit SRW)]>;
834
-
835
- def CMP8im : Pseudo<(outs), (ins i8imm:$src1, memsrc:$src2),
836
- "cmp.b\t{$src1, $src2}",
837
- [(MSP430cmp (i8 imm:$src1), (load addr:$src2)), (implicit SRW)]>;
838
- def CMP16im : Pseudo<(outs), (ins i16imm:$src1, memsrc:$src2),
839
- "cmp.w\t{$src1, $src2}",
840
- [(MSP430cmp (i16 imm:$src1), (load addr:$src2)), (implicit SRW)]>;
828
+ def CMP8ri : Pseudo<(outs), (ins GR8:$src1, i8imm:$src2),
829
+ "cmp.b\t{$src2, $src1}",
830
+ [(MSP430cmp GR8:$src1, imm:$src2), (implicit SRW)]>;
831
+ def CMP16ri : Pseudo<(outs), (ins GR16:$src1, i16imm:$src2),
832
+ "cmp.w\t{$src2, $src1}",
833
+ [(MSP430cmp GR16:$src1, imm:$src2), (implicit SRW)]>;
834
+
835
+ def CMP8mi : Pseudo<(outs), (ins memsrc:$src1, i8imm:$src2),
836
+ "cmp.b\t{$src2, $src1}",
837
+ [(MSP430cmp (load addr:$src1),
838
+ (i8 imm:$src2)), (implicit SRW)]>;
839
+ def CMP16mi : Pseudo<(outs), (ins memsrc:$src1, i16imm:$src2),
840
+ "cmp.w\t{$src2, $src1}",
841
+ [(MSP430cmp (load addr:$src1),
842
+ (i16 imm:$src2)), (implicit SRW)]>;
841
843
842
844
def CMP8rm : Pseudo<(outs), (ins GR8:$src1, memsrc:$src2),
843
- "cmp.b\t{$src1 , $src2 }",
845
+ "cmp.b\t{$src2 , $src1 }",
844
846
[(MSP430cmp GR8:$src1, (load addr:$src2)), (implicit SRW)]>;
845
847
def CMP16rm : Pseudo<(outs), (ins GR16:$src1, memsrc:$src2),
846
- "cmp.w\t{$src1 , $src2 }",
848
+ "cmp.w\t{$src2 , $src1 }",
847
849
[(MSP430cmp GR16:$src1, (load addr:$src2)), (implicit SRW)]>;
848
850
849
851
def CMP8mr : Pseudo<(outs), (ins memsrc:$src1, GR8:$src2),
850
- "cmp.b\t{$src1 , $src2 }",
852
+ "cmp.b\t{$src2 , $src1 }",
851
853
[(MSP430cmp (load addr:$src1), GR8:$src2), (implicit SRW)]>;
852
854
def CMP16mr : Pseudo<(outs), (ins memsrc:$src1, GR16:$src2),
853
- "cmp.w\t{$src1 , $src2 }",
855
+ "cmp.w\t{$src2 , $src1 }",
854
856
[(MSP430cmp (load addr:$src1), GR16:$src2), (implicit SRW)]>;
855
857
856
858
0 commit comments