avr.md (*cmpqi_sign_extend): Handle negative values of operand 1 correctly.
authorMarek Michalkiewicz <marekm@amelek.gda.pl>
Sun, 20 Apr 2003 13:24:06 +0000 (15:24 +0200)
committerMarek Michalkiewicz <marekm@gcc.gnu.org>
Sun, 20 Apr 2003 13:24:06 +0000 (13:24 +0000)
* config/avr/avr.md (*cmpqi_sign_extend): Handle negative values
of operand 1 correctly.

From-SVN: r65850

gcc/ChangeLog
gcc/config/avr/avr.md

index b73ad6d9bc1cd67676b6fa64fcb2f6dd7314b2d3..9ecfed750aaf645d357076c9fd7d78023971e6cb 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-20  Marek Michalkiewicz  <marekm@amelek.gda.pl>
+
+       * config/avr/avr.md (*cmpqi_sign_extend): Handle negative values
+       of operand 1 correctly.
+
 2003-04-20  Nathan Sidwell  <nathan@codesourcery.com>
 
        * cpplex.c (_cpp_lex_direct): Set BOL for CPP_EOF tokens.
index dd51f0e72409fe10e4166fc1a96c8d26d79ad17f..86ab6c72829d2136f57149c67994d63b1d9eaa03 100644 (file)
   [(set (cc0)
         (compare (sign_extend:HI
                  (match_operand:QI 0 "register_operand"  "d"))
-                (match_operand:HI 1 "immediate_operand" "M")))]
-  ""
+                (match_operand:HI 1 "const_int_operand" "n")))]
+  "INTVAL (operands[1]) >= -128 && INTVAL (operands[1]) <= 127"
   "cpi %0,lo8(%1)"
   [(set_attr "cc" "compare")
    (set_attr "length" "1")])