(addsi3...
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 4 Jan 1997 13:15:46 +0000 (08:15 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 4 Jan 1997 13:15:46 +0000 (08:15 -0500)
(addsi3, addhi3): Use two addqw (or subqw) insns when adding (or
subtracting) small integer constants (8 < N <= 16) to both address and
data registers.

From-SVN: r13367

gcc/config/m68k/m68k.md

index 61e4a663e9c763130b0ea620e745d3203f6bd312..2f0201c5ccbc278a7da15d8052678ac7dc84bc27 100644 (file)
@@ -1,5 +1,5 @@
 ;;- Machine description for GNU compiler, Motorola 68000 Version
-;;  Copyright (C) 1987, 88, 93, 94, 95, 1996 Free Software Foundation, Inc.
+;;  Copyright (C) 1987, 88, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
 
 ;; This file is part of GNU CC.
 
                  : \"subq%.l %2,%0\");
        }
       /* On the CPU32 it is faster to use two addqw instructions to
-        add a small integer (8 < N <= 16) to an address register.
+        add a small integer (8 < N <= 16) to a register.
         Likewise for subqw. */
-      if (TARGET_CPU32 && ADDRESS_REG_P (operands[0]))
+      if (TARGET_CPU32 && REG_P (operands[0]))
        {
          if (INTVAL (operands[2]) > 8
              && INTVAL (operands[2]) <= 16)
          return \"subq%.w %2,%0\";
        }
       /* On the CPU32 it is faster to use two addqw instructions to
-        add a small integer (8 < N <= 16) to an address register.  
+        add a small integer (8 < N <= 16) to a register.  
         Likewise for subqw. */
-      if (TARGET_CPU32 && ADDRESS_REG_P (operands[0]))
+      if (TARGET_CPU32 && REG_P (operands[0]))
        {
          if (INTVAL (operands[2]) > 8
              && INTVAL (operands[2]) <= 16)
          return \"subq%.w %1,%0\";
        }
       /* On the CPU32 it is faster to use two addqw instructions to
-        add a small integer (8 < N <= 16) to an address register. 
+        add a small integer (8 < N <= 16) to a register. 
         Likewise for subqw. */
-      if (TARGET_CPU32 && ADDRESS_REG_P (operands[0]))
+      if (TARGET_CPU32 && REG_P (operands[0]))
        {
          if (INTVAL (operands[1]) > 8
              && INTVAL (operands[1]) <= 16)
          return \"subq%.w %1,%0\";
        }
       /* On the CPU32 it is faster to use two addqw instructions to
-        add a small integer (8 < N <= 16) to an address register.
+        add a small integer (8 < N <= 16) to a register.
         Likewise for subqw. */
-      if (TARGET_CPU32 && ADDRESS_REG_P (operands[0])) 
+      if (TARGET_CPU32 && REG_P (operands[0])) 
        {
          if (INTVAL (operands[1]) > 8
              && INTVAL (operands[1]) <= 16)