h8300.md (anonymous patterns): Check that operands are registers before using REGNO...
authorKazu Hirata <kazu@hxi.com>
Fri, 4 Jan 2002 22:08:24 +0000 (22:08 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Fri, 4 Jan 2002 22:08:24 +0000 (22:08 +0000)
* config/h8300/h8300.md (anonymous patterns): Check that
operands are registers before using REGNO on them.

From-SVN: r48545

gcc/ChangeLog
gcc/config/h8300/h8300.md

index c70cb5b94c85f90df9c7c87a09bdebf95f567360..bee90a48db61f1ab73db58a3f7c0cc70d88e4d2c 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-04  Kazu Hirata  <kazu@hxi.com>
+
+       * config/h8300/h8300.md (anonymous patterns): Check that
+       operands are registers before using REGNO on them.
+
 2002-01-03  Roland McGrath  <roland@frob.com>
 
        * doc/invoke.texi (RS/6000 and PowerPC Options): Add -mcall-gnu.
index de911dcda8762ea91ca20fa227abb429fc6e35aa..56986c7da0ed86da197a2da75bba0d7366070f59 100644 (file)
         (ior:HI
            (zero_extend:HI (match_operand:QI 1 "register_operand" "r"))
            (match_operand:HI 2 "register_operand" "0")))]
-  "REGNO (operands[0]) != REGNO (operands[1])"
+  "REG_P (operands[0])
+   && REG_P (operands[1])
+   && REGNO (operands[0]) != REGNO (operands[1])"
   "or\\t%X1,%s0"
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])
            (zero_extend:SI (match_operand:HI 1 "register_operand" "r"))
            (match_operand:SI 2 "register_operand" "0")))]
   "(TARGET_H8300H || TARGET_H8300S)
-    && (REGNO (operands[0]) != REGNO (operands[1]))"
+   && REG_P (operands[0])
+   && REG_P (operands[1])
+   && (REGNO (operands[0]) != REGNO (operands[1]))"
   "or.w\\t%T1,%f0"
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])
         (ior:SI
            (zero_extend:SI (match_operand:QI 1 "register_operand" "r"))
            (match_operand:SI 2 "register_operand" "0")))]
-  "REGNO (operands[0]) != REGNO (operands[1])"
+  "REG_P (operands[0])
+   && REG_P (operands[1])
+   && REGNO (operands[0]) != REGNO (operands[1])"
   "or\\t%X1,%s0"
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])
         (xor:HI
            (zero_extend:HI (match_operand:QI 1 "register_operand" "r"))
            (match_operand:HI 2 "register_operand" "0")))]
-  "REGNO (operands[0]) != REGNO (operands[1])"
+  "REG_P (operands[0])
+   && REG_P (operands[1])
+   && REGNO (operands[0]) != REGNO (operands[1])"
   "xor\\t%X1,%s0"
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])
            (zero_extend:SI (match_operand:HI 1 "register_operand" "r"))
            (match_operand:SI 2 "register_operand" "0")))]
   "(TARGET_H8300H || TARGET_H8300S)
-    && (REGNO (operands[0]) != REGNO (operands[1]))"
+   && REG_P (operands[0])
+   && REG_P (operands[1])
+   && (REGNO (operands[0]) != REGNO (operands[1]))"
   "xor.w\\t%T1,%f0"
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])
         (xor:SI
            (zero_extend:SI (match_operand:QI 1 "register_operand" "r"))
            (match_operand:SI 2 "register_operand" "0")))]
-  "REGNO (operands[0]) != REGNO (operands[1])"
+  "REG_P (operands[0])
+   && REG_P (operands[1])
+   && REGNO (operands[0]) != REGNO (operands[1])"
   "xor\\t%X1,%s0"
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])
            (zero_extend:HI (match_operand:QI 1 "register_operand" "0"))
            (ashift:HI (match_operand:HI 2 "register_operand" "r")
                       (const_int 8))))]
-  "REGNO (operands[0]) != REGNO (operands[2])"
+  "REG_P (operands[0])
+   && REG_P (operands[2])
+   && REGNO (operands[0]) != REGNO (operands[2])"
   "mov.b\\t%s2,%t0"
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])
            (ashift:SI (match_operand:SI 2 "register_operand" "r")
                       (const_int 16))))]
   "(TARGET_H8300H || TARGET_H8300S)
-    && (REGNO (operands[0]) != REGNO (operands[2]))"
+   && REG_P (operands[0])
+   && REG_P (operands[2])
+   && (REGNO (operands[0]) != REGNO (operands[2]))"
   "mov.w\\t%f2,%e0"
   [(set_attr "cc" "clobber")
    (set_attr "length" "2")])