m68k.c (output_move_simode_const): Use subl to move a zero into an address register.
authorAndreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Mon, 17 Aug 1998 08:25:31 +0000 (08:25 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 17 Aug 1998 08:25:31 +0000 (02:25 -0600)
        * m68k.c (output_move_simode_const): Use subl to move a zero into an
        address register.
        (output_move_[hq]imode): Likewise.

From-SVN: r21778

gcc/ChangeLog
gcc/config/m68k/m68k.c

index 823fbe9..afd7974 100644 (file)
@@ -1,3 +1,9 @@
+Mon Aug 17 09:23:42 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * m68k.c (output_move_simode_const): Use subl to move a zero into an
+       address register.
+       (output_move_[hq]imode): Likewise.
+
 Mon Aug 17 09:15:47 1998  Jeffrey A Law  (law@cygnus.com)
 
        * toplev.c (main): Enable -fstrict-aliasing for -O2 and above.
index 64bbe4a..1cfe3b2 100644 (file)
@@ -1507,6 +1507,9 @@ output_move_simode_const (operands)
          || !(GET_CODE (operands[0]) == MEM
               && MEM_VOLATILE_P (operands[0]))))
     return "clr%.l %0";
+  else if (operands[1] == const0_rtx
+          && ADDRESS_REG_P (operands[0]))
+    return "sub%.l %0,%0";
   else if (DATA_REG_P (operands[0]))
     return output_move_const_into_data_reg (operands);
   else if (ADDRESS_REG_P (operands[0])
@@ -1554,6 +1557,9 @@ output_move_himode (operands)
              || !(GET_CODE (operands[0]) == MEM
                   && MEM_VOLATILE_P (operands[0]))))
        return "clr%.w %0";
+      else if (operands[1] == const0_rtx
+              && ADDRESS_REG_P (operands[0]))
+       return "sub%.l %0,%0";
       else if (DATA_REG_P (operands[0])
               && INTVAL (operands[1]) < 128
               && INTVAL (operands[1]) >= -128)
@@ -1668,6 +1674,8 @@ output_move_qimode (operands)
       return "moveq %1,%0";
 #endif
     }
+  if (operands[1] == const0_rtx && ADDRESS_REG_P (operands[0]))
+    return "sub%.l %0,%0";
   if (GET_CODE (operands[1]) != CONST_INT && CONSTANT_P (operands[1]))
     return "move%.l %1,%0";
   /* 68k family doesn't support byte moves to from address registers.  The