MSP430: Fix postinc addressing mode being used for dst op of CMP insns
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Thu, 5 Dec 2019 10:56:02 +0000 (10:56 +0000)
committerJozef Lawrynowicz <jozefl@gcc.gnu.org>
Thu, 5 Dec 2019 10:56:02 +0000 (10:56 +0000)
2019-12-05  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

* config/msp430/msp430.md (cbranch<mode>4): Use
msp430_general_dst_nonv_operand instead of nonimmediate_operand for
dest operand of CMP instruction.
(cbranchpsi4_real): Likewise.
(cbranchqi4_real): Likewise.
(cbranchhi4_real): Likewise.
(cbranchpsi4_reversed): Likewise.
(cbranchqi4_reversed): Likewise.
(cbranchhi4_reversed): Likewise.

From-SVN: r278994

gcc/ChangeLog
gcc/config/msp430/msp430.md

index f17fc102a07bb6ab63dbf61458fc22611628ced1..fca257297784fe816c63847c7a530d7e9649b07e 100644 (file)
@@ -1,3 +1,15 @@
+2019-12-05  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
+
+       * config/msp430/msp430.md (cbranch<mode>4): Use
+       msp430_general_dst_nonv_operand instead of nonimmediate_operand for
+       dest operand of CMP instruction.
+       (cbranchpsi4_real): Likewise.
+       (cbranchqi4_real): Likewise.
+       (cbranchhi4_real): Likewise.
+       (cbranchpsi4_reversed): Likewise.
+       (cbranchqi4_reversed): Likewise.
+       (cbranchhi4_reversed): Likewise.
+
 2019-12-05  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/92803
index c3d85071a58b8f4c2826dc7e723dbe6d80fe3c97..48515b9c26b48b41b0da2ba59b0639c435442abd 100644 (file)
 (define_expand "cbranch<mode>4"
   [(parallel [(set (pc) (if_then_else
                         (match_operator 0 ""
-                                        [(match_operand:QHI 1 "nonimmediate_operand")
+                                        [(match_operand:QHI 1 "msp430_general_dst_nonv_operand")
                                          (match_operand:QHI 2 "general_operand")])
                         (label_ref (match_operand 3 "" ""))
                         (pc)))
 (define_insn "cbranchpsi4_real"
   [(set (pc) (if_then_else
              (match_operator                     0 "msp430_cmp_operator"
-                             [(match_operand:PSI 1 "nonimmediate_operand" "r,rYs,rm")
+                             [(match_operand:PSI 1 "msp430_general_dst_nonv_operand" "r,rYs,rm")
                               (match_operand:PSI 2 "general_operand"      "rLs,rYsi,rmi")])
               (label_ref (match_operand           3 "" ""))
              (pc)))
 (define_insn "cbranchqi4_real"
   [(set (pc) (if_then_else
              (match_operator                    0 "msp430_cmp_operator"
-                             [(match_operand:QI 1 "nonimmediate_operand" "rYsYx,rm")
+                             [(match_operand:QI 1 "msp430_general_dst_nonv_operand" "rYsYx,rm")
                               (match_operand:QI 2 "general_operand"      "rYsYxi,rmi")])
               (label_ref (match_operand          3 "" ""))
              (pc)))
 (define_insn "cbranchhi4_real"
   [(set (pc) (if_then_else
              (match_operator                    0 "msp430_cmp_operator"
-                             [(match_operand:HI 1 "nonimmediate_operand" "rYsYx,rm")
+                             [(match_operand:HI 1 "msp430_general_dst_nonv_operand" "rYsYx,rm")
                               (match_operand:HI 2 "general_operand"      "rYsYxi,rmi")])
               (label_ref (match_operand          3 "" ""))
              (pc)))
   [(set (pc) (if_then_else
              (match_operator                     0 "msp430_reversible_cmp_operator"
                              [(match_operand:PSI 1 "general_operand" "rLs,rYsi,rmi")
-                              (match_operand:PSI 2 "general_operand" "r,rYs,rm")])
+                              (match_operand:PSI 2 "msp430_general_dst_nonv_operand" "r,rYs,rm")])
               (label_ref (match_operand           3 "" ""))
              (pc)))
    (clobber (reg:BI CARRY))
   [(set (pc) (if_then_else
              (match_operator                    0 "msp430_reversible_cmp_operator"
                              [(match_operand:QI 1 "general_operand" "rYsYxi,rmi")
-                              (match_operand:QI 2 "general_operand" "rYsYx,rm")])
+                              (match_operand:QI 2 "msp430_general_dst_nonv_operand" "rYsYx,rm")])
               (label_ref (match_operand          3 "" ""))
              (pc)))
    (clobber (reg:BI CARRY))
   [(set (pc) (if_then_else
              (match_operator                    0 "msp430_reversible_cmp_operator"
                              [(match_operand:HI 1 "general_operand" "rYsYxi,rmi")
-                              (match_operand:HI 2 "general_operand" "rYsYx,rm")])
+                              (match_operand:HI 2 "msp430_general_dst_nonv_operand" "rYsYx,rm")])
               (label_ref (match_operand          3 "" ""))
              (pc)))
    (clobber (reg:BI CARRY))