[PATCH] remove NO_ADDSUB_Q dependent code in m68k back-end

This patch strips away all code blocks depending on the
NO_ADDSUB_Q definition, which hasn't been defined anywhere
since 2.95.3 and possibly before.


2003-08-20  Bernardo Innocenti  <bernie@develer.com>

	* config/m68k/m68k.c: Strip away code depending on NO_ADDSUB_Q definition.
	* config/m68k/m68k.md: Likewise.

diff -u -3 -p -u -r1.64 m68k.md
--- gcc/config/m68k/m68k.md	20 Aug 2003 22:15:57 -0000	1.64
+++ gcc/config/m68k/m68k.md	20 Aug 2003 23:59:51 -0000
@@ -1948,21 +1948,11 @@
 	  if (GET_CODE (operands[1]) == CONST_INT)
 	    {
 	      if (INTVAL (operands[1]) > 0 && INTVAL (operands[1]) <= 8)
-		{
-#ifdef NO_ADDSUB_Q
-		  return \"add%.l %1,%R0\;addx%.l %3,%0\";
-#else
-		  return \"addq%.l %1,%R0\;addx%.l %3,%0\";
-#endif
-		}
+		return \"addq%.l %1,%R0\;addx%.l %3,%0\";
 	      else if (INTVAL (operands[1]) >= -8 && INTVAL (operands[1]) < 0)
 		{
 		  operands[1] = GEN_INT (-INTVAL (operands[1]));
-#ifdef NO_ADDSUB_Q
-		  return \"sub%.l %1,%R0\;subx%.l %3,%0\";
-#else
 		  return \"subq%.l %1,%R0\;subx%.l %3,%0\";
-#endif
 		}
 	    }
 	  return \"add%.l %1,%R0\;addx%.l %3,%0\";
@@ -2018,11 +2008,7 @@
 #else
   output_asm_insn (\"jpl %l3\", operands);
 #endif
-#ifndef NO_ADDSUB_Q
   output_asm_insn (\"addq%.l %#1,%2\", operands);
-#else
-  output_asm_insn (\"add%.l %#1,%2\", operands);
-#endif
   (*targetm.asm_out.internal_label) (asm_out_file, \"L\",
 				CODE_LABEL_NUMBER (operands[3]));
   return \"\";
@@ -2072,7 +2058,6 @@
 {
   if (GET_CODE (operands[2]) == CONST_INT)
     {
-#ifndef NO_ADDSUB_Q
       /* If the constant would be a negative number when interpreted as
 	 HImode, make it negative.  This is usually, but not always, done
 	 elsewhere in the compiler.  First check for constants out of range,
@@ -2108,7 +2093,6 @@
 	      return \"subq%.w %#8,%0\;subq%.w %2,%0\";
 	    }
 	}
-#endif
       if (ADDRESS_REG_P (operands[0]) && !TARGET_68040)
 #ifdef MOTOROLA  
 	    return \"lea (%c2,%0),%0\";
@@ -2134,7 +2118,6 @@
 {
   if (GET_CODE (operands[1]) == CONST_INT)
     {
-#ifndef NO_ADDSUB_Q
       /* If the constant would be a negative number when interpreted as
 	 HImode, make it negative.  This is usually, but not always, done
 	 elsewhere in the compiler.  First check for constants out of range,
@@ -2170,7 +2153,6 @@
 	      return \"subq%.w %#8,%0\;subq%.w %1,%0\";
 	    }
 	}
-#endif
       if (ADDRESS_REG_P (operands[0]) && !TARGET_68040)
 #ifdef MOTOROLA  
 	    return \"lea (%c1,%0),%0\";
@@ -2190,7 +2172,6 @@
 {
   if (GET_CODE (operands[1]) == CONST_INT)
     {
-#ifndef NO_ADDSUB_Q
       /* If the constant would be a negative number when interpreted as
 	 HImode, make it negative.  This is usually, but not always, done
 	 elsewhere in the compiler.  First check for constants out of range,
@@ -2226,7 +2207,6 @@
 	      return \"subq%.w %#8,%0\;subq%.w %1,%0\";
 	    }
 	}
-#endif
       if (ADDRESS_REG_P (operands[0]) && !TARGET_68040)
 #ifdef MOTOROLA  
 	    return \"lea (%c1,%0),%0\";
@@ -2244,7 +2224,6 @@
   "!TARGET_5200"
   "*
 {
-#ifndef NO_ADDSUB_Q
   if (GET_CODE (operands[2]) == CONST_INT)
     {
       if (INTVAL (operands[2]) >= 128)
@@ -2259,7 +2238,6 @@
 	 return \"subq%.b %2,%0\";
        }
     }
-#endif
   return \"add%.b %2,%0\";
 }")
 
@@ -2270,7 +2248,6 @@
   "!TARGET_5200"
   "*
 {
-#ifndef NO_ADDSUB_Q
   if (GET_CODE (operands[1]) == CONST_INT)
     {
       if (INTVAL (operands[1]) >= 128)
@@ -2285,7 +2262,6 @@
 	 return \"subq%.b %1,%0\";
        }
     }
-#endif
   return \"add%.b %1,%0\";
 }")
 
@@ -2296,7 +2272,6 @@
   "!TARGET_5200"
   "*
 {
-#ifndef NO_ADDSUB_Q
   if (GET_CODE (operands[1]) == CONST_INT)
     {
       if (INTVAL (operands[1]) >= 128)
@@ -2311,7 +2286,6 @@
 	 return \"subq%.b %1,%0\";
        }
     }
-#endif
   return \"add%.b %1,%0\";
 }")
 
@@ -2478,21 +2452,11 @@
 	  if (GET_CODE (operands[1]) == CONST_INT)
 	    {
 	      if (INTVAL (operands[1]) > 0 && INTVAL (operands[1]) <= 8)
-		{
-#ifdef NO_ADDSUB_Q
-		  return \"sub%.l %1,%R0\;subx%.l %3,%0\";
-#else
-		  return \"subq%.l %1,%R0\;subx%.l %3,%0\";
-#endif
-		}
+		return \"subq%.l %1,%R0\;subx%.l %3,%0\";
 	      else if (INTVAL (operands[1]) >= -8 && INTVAL (operands[1]) < 0)
 		{
 		  operands[1] = GEN_INT (-INTVAL (operands[1]));
-#ifdef NO_ADDSUB_Q
-		  return \"add%.l %1,%R0\;addx%.l %3,%0\";
-#else
 		  return \"addq%.l %1,%R0\;addx%.l %3,%0\";
-#endif
 		}
 	    }
 	  return \"sub%.l %1,%R0\;subx%.l %3,%0\";
@@ -6571,22 +6535,14 @@
   if (GET_CODE (operands[0]) == MEM)
     {
 #ifdef MOTOROLA
-#ifdef NO_ADDSUB_Q
-      return \"sub%.w %#1,%0\;jbcc %l1\";
-#else
       return \"subq%.w %#1,%0\;jbcc %l1\";
-#endif
 #else /* not MOTOROLA */
       return \"subqw %#1,%0\;jcc %l1\";
 #endif
     }
 #ifdef MOTOROLA
 #ifdef SGS_CMP_ORDER
-#ifdef NO_ADDSUB_Q
-  return \"sub%.w %#1,%0\;cmp%.w %0,%#-1\;jbne %l1\";
-#else
   return \"subq%.w %#1,%0\;cmp%.w %0,%#-1\;jbne %l1\";
-#endif
 #else /* not SGS_CMP_ORDER */
   return \"subq%.w %#1,%0\;cmp%.w %#-1,%0\;jbne %l1\";
 #endif
@@ -6610,23 +6566,12 @@
 {
   CC_STATUS_INIT;
 #ifdef MOTOROLA
-#ifdef NO_ADDSUB_Q
-  if (DATA_REG_P (operands[0]))
-    return \"dbra %0,%l1\;clr%.w %0\;sub%.l %#1,%0\;jbcc %l1\";
-  if (GET_CODE (operands[0]) == MEM)
-    return \"sub%.l %#1,%0\;jbcc %l1\";
-#else
   if (DATA_REG_P (operands[0]))
     return \"dbra %0,%l1\;clr%.w %0\;subq%.l %#1,%0\;jbcc %l1\";
   if (GET_CODE (operands[0]) == MEM)
     return \"subq%.l %#1,%0\;jbcc %l1\";
-#endif /* NO_ADDSUB_Q */
 #ifdef SGS_CMP_ORDER
-#ifdef NO_ADDSUB_Q
-  return \"sub.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\";
-#else
   return \"subq.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\";
-#endif
 #else /* not SGS_CMP_ORDER */
   return \"subq.l %#1,%0\;cmp.l %#-1,%0\;jbne %l1\";
 #endif /* not SGS_CMP_ORDER */
@@ -6657,23 +6602,12 @@
 {
   CC_STATUS_INIT;
 #ifdef MOTOROLA
-#ifdef NO_ADDSUB_Q
-  if (DATA_REG_P (operands[0]))
-    return \"dbra %0,%l1\";
-  if (GET_CODE (operands[0]) == MEM)
-    return \"sub%.w %#1,%0\;jbcc %l1\";
-#else
   if (DATA_REG_P (operands[0]))
     return \"dbra %0,%l1\";
   if (GET_CODE (operands[0]) == MEM)
     return \"subq%.w %#1,%0\;jbcc %l1\";
-#endif
 #ifdef SGS_CMP_ORDER
-#ifdef NO_ADDSUB_Q
-  return \"sub.w %#1,%0\;cmp.w %0,%#-1\;jbne %l1\";
-#else
   return \"subq.w %#1,%0\;cmp.w %0,%#-1\;jbne %l1\";
-#endif
 #else /* not SGS_CMP_ORDER */
   return \"subq.w %#1,%0\;cmp.w %#-1,%0\;jbne %l1\";
 #endif /* not SGS_CMP_ORDER */
@@ -6716,23 +6650,12 @@
 {
   CC_STATUS_INIT;
 #ifdef MOTOROLA
-#ifdef NO_ADDSUB_Q
-  if (DATA_REG_P (operands[0]))
-    return \"dbra %0,%l1\;clr%.w %0\;sub%.l %#1,%0\;jbcc %l1\";
-  if (GET_CODE (operands[0]) == MEM)
-    return \"sub%.l %#1,%0\;jbcc %l1\";
-#else
   if (DATA_REG_P (operands[0]))
     return \"dbra %0,%l1\;clr%.w %0\;subq%.l %#1,%0\;jbcc %l1\";
   if (GET_CODE (operands[0]) == MEM)
     return \"subq%.l %#1,%0\;jbcc %l1\";
-#endif
 #ifdef SGS_CMP_ORDER
-#ifdef NO_ADDSUB_Q
-  return \"sub.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\";
-#else
   return \"subq.l %#1,%0\;cmp.l %0,%#-1\;jbne %l1\";
-#endif
 #else /* not SGS_CMP_ORDER */
   return \"subq.l %#1,%0\;cmp.l %#-1,%0\;jbne %l1\";
 #endif /* not SGS_CMP_ORDER */
@@ -7048,7 +6971,6 @@
       rtx xoperands[2];
       xoperands[0] = stack_pointer_rtx;
       xoperands[1] = GEN_INT (INTVAL (operands[0]) - 4);
-#ifndef NO_ADDSUB_Q
       if (INTVAL (xoperands[1]) <= 8)
 	{
 	  if (!TARGET_5200)
@@ -7061,9 +6983,7 @@
 	  xoperands[1] = GEN_INT (INTVAL (xoperands[1]) - 8);
 	  output_asm_insn (\"addq%.w %#8,%0\;addq%.w %1,%0\", xoperands);
 	}
-      else
-#endif
-        if (INTVAL (xoperands[1]) <= 0x7FFF)
+      else if (INTVAL (xoperands[1]) <= 0x7FFF)
         {
 	  if (TARGET_68040)
 	    output_asm_insn (\"add%.w %1,%0\", xoperands);
@@ -7098,7 +7018,6 @@
       rtx xoperands[2];
       xoperands[0] = stack_pointer_rtx;
       xoperands[1] = GEN_INT (INTVAL (operands[0]) - 4);
-#ifndef NO_ADDSUB_Q
       if (INTVAL (xoperands[1]) <= 8)
 	{
 	  if (!TARGET_5200)
@@ -7111,9 +7030,7 @@
 	  xoperands[1] = GEN_INT (INTVAL (xoperands[1]) - 8);
 	  output_asm_insn (\"addq%.w %#8,%0\;addq%.w %1,%0\", xoperands);
 	}
-      else
-#endif
-        if (INTVAL (xoperands[1]) <= 0x7FFF)
+      else if (INTVAL (xoperands[1]) <= 0x7FFF)
         {
 	  if (TARGET_68040)
 	    output_asm_insn (\"add%.w %1,%0\", xoperands);
diff -u -3 -p -u -r1.95 m68k.c
--- gcc/config/m68k/m68k.c	20 Aug 2003 22:15:57 -0000	1.95
+++ gcc/config/m68k/m68k.c	21 Aug 2003 00:00:03 -0000
@@ -345,7 +345,6 @@ m68k_output_function_prologue (stream, s
     {
       if (fsize + 4 < 0x8000)
 	{
-#ifndef NO_ADDSUB_Q
 	  if (fsize + 4 <= 8)
 	    {
 	      if (!TARGET_5200)
@@ -381,9 +380,7 @@ m68k_output_function_prologue (stream, s
 			   fsize + 4 - 8);
 #endif
 	    }
-	  else 
-#endif /* not NO_ADDSUB_Q */
-	  if (TARGET_68040)
+	  else if (TARGET_68040)
 	    {
 	      /* Adding negative number is faster on the 68040.  */
 	      /* asm_fprintf() cannot handle %.  */
@@ -800,7 +797,6 @@ m68k_output_function_epilogue (stream, s
 	     reg_names[FRAME_POINTER_REGNUM]);
   else if (fsize)
     {
-#ifndef NO_ADDSUB_Q
       if (fsize + 4 <= 8) 
 	{
 	  if (!TARGET_5200)
@@ -833,9 +829,7 @@ m68k_output_function_epilogue (stream, s
 		       fsize + 4 - 8);
 #endif
 	}
-      else
-#endif /* not NO_ADDSUB_Q */
-      if (fsize + 4 < 0x8000)
+      else if (fsize + 4 < 0x8000)
 	{
 	  if (TARGET_68040)
 	    { 
@@ -1763,11 +1757,7 @@ output_move_qimode (operands)
       if (!reg_mentioned_p (stack_pointer_rtx, operands[1]))
 	{
 	  xoperands[3] = stack_pointer_rtx;
-#ifndef NO_ADDSUB_Q
 	  output_asm_insn ("subq%.l %#2,%3\n\tmove%.b %1,%2", xoperands);
-#else
-	  output_asm_insn ("sub%.l %#2,%3\n\tmove%.b %1,%2", xoperands);
-#endif
 	}
       else
 	output_asm_insn ("move%.b %1,%-\n\tmove%.b %@,%2", xoperands);
@@ -2268,7 +2258,6 @@ output_addsi3 (operands)
     }
   if (GET_CODE (operands[2]) == CONST_INT)
     {
-#ifndef NO_ADDSUB_Q
       if (INTVAL (operands[2]) > 0
 	  && INTVAL (operands[2]) <= 8)
 	return "addq%.l %2,%0";
@@ -2296,7 +2285,6 @@ output_addsi3 (operands)
 	      return "subq%.l %#8,%0\n\tsubq%.l %2,%0";
 	    }
 	}
-#endif
       if (ADDRESS_REG_P (operands[0])
 	  && INTVAL (operands[2]) >= -0x8000
 	  && INTVAL (operands[2]) < 0x8000)

