OSDN Git Service

* config/m68k/m68k.c: Strip away code depending on NO_ADDSUB_Q definition.
authorbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Aug 2003 00:04:22 +0000 (00:04 +0000)
committerbernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Aug 2003 00:04:22 +0000 (00:04 +0000)
* config/m68k/m68k.md: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70626 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 4fa7456..2e140c8 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2003-08-20  Mark Mitchell  <mark@codesourcery.com>
 
        PR java/11996
index 40166e3..31da70b 100644 (file)
@@ -345,7 +345,6 @@ m68k_output_function_prologue (stream, size)
     {
       if (fsize + 4 < 0x8000)
        {
-#ifndef NO_ADDSUB_Q
          if (fsize + 4 <= 8)
            {
              if (!TARGET_5200)
@@ -381,9 +380,7 @@ m68k_output_function_prologue (stream, size)
                           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, size)
             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, size)
                       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)
index 703a895..68c665c 100644 (file)
          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\";
 #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 \"\";
 {
   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,
              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\";
 {
   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,
              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\";
 {
   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,
              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\";
   "!TARGET_5200"
   "*
 {
-#ifndef NO_ADDSUB_Q
   if (GET_CODE (operands[2]) == CONST_INT)
     {
       if (INTVAL (operands[2]) >= 128)
         return \"subq%.b %2,%0\";
        }
     }
-#endif
   return \"add%.b %2,%0\";
 }")
 
   "!TARGET_5200"
   "*
 {
-#ifndef NO_ADDSUB_Q
   if (GET_CODE (operands[1]) == CONST_INT)
     {
       if (INTVAL (operands[1]) >= 128)
         return \"subq%.b %1,%0\";
        }
     }
-#endif
   return \"add%.b %1,%0\";
 }")
 
   "!TARGET_5200"
   "*
 {
-#ifndef NO_ADDSUB_Q
   if (GET_CODE (operands[1]) == CONST_INT)
     {
       if (INTVAL (operands[1]) >= 128)
         return \"subq%.b %1,%0\";
        }
     }
-#endif
   return \"add%.b %1,%0\";
 }")
 
          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\";
   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
 {
   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 */
 {
   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 */
 {
   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 */
       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)
          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);
       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)
          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);