]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
m32r.c (gen_compare): Fix reg/smallconst equal code...
authorNick Clifton <nickc@redhat.com>
Tue, 25 Apr 2006 14:08:35 +0000 (14:08 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Tue, 25 Apr 2006 14:08:35 +0000 (14:08 +0000)
* config/m32r/m32r.c (gen_compare): Fix reg/smallconst equal code,
  the patch for which was accidentally omitted from the previous commit.

From-SVN: r113249

gcc/ChangeLog
gcc/config/m32r/m32r.c

index 143f9b69e8687be9216c6b06167a590130ea9f34..d17872fec44b02969af20654b86391d169c97874 100644 (file)
@@ -1,3 +1,9 @@
+2006-04-25  Nick Clifton  <nickc@redhat.com>
+
+       * config/m32r/m32r.c (gen_compare): Fix reg/smallconst equal code,
+       the patch for which was accidentally omitted from the previous
+       commit.
+
 2006-04-04  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
 
        PR target/26775
index abeea182859cacc7fae81df6011ebdafb154f285..ab0b303823db8c616025114a6fcc39945c01a332 100644 (file)
@@ -1150,11 +1150,11 @@ gen_compare (enum rtx_code code, rtx x, rtx y, int need_compare)
       /* Reg/smallconst equal comparison.  */
       if (compare_code == EQ
          && GET_CODE (y) == CONST_INT
-         && CMP_INT16_P (INTVAL (y)))
+         && UINT16_P (INTVAL (y)))
        {
          rtx tmp = gen_reg_rtx (SImode);
 
-         emit_insn (gen_addsi3 (tmp, x, GEN_INT (-INTVAL (y))));
+         emit_insn (gen_xorsi3 (tmp, x, GEN_INT (INTVAL (y))));
          return gen_rtx (code, CCmode, tmp, const0_rtx);
        }