convex.c (convex_output_function_prologue): Fix format specifier warning.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sun, 4 Nov 2001 02:40:39 +0000 (02:40 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sun, 4 Nov 2001 02:40:39 +0000 (02:40 +0000)
* convex.c (convex_output_function_prologue): Fix format specifier
warning.
(asm_declare_function_name): Fix signed/unsigned warning.
(print_operand): Fix format specifier warning.
* convex.h (S_REGNO_P, A_REGNO_P): Fix signed/unsigned warning.
* dsp16xx-protos.h (uns_comparison_operator,
num_1600_core_shifts): Prototype.
* dsp16xx.c: Include tm_p.h, not dsp16xx-protos.h.
(frame_size, frame_pointer_offset): Delete.
(dsp16xx_output_function_prologue, dsp16xx_output_function_epilogue):
Make static.  Fix format specifier warnings.
* dsp16xx.h (IS_ACCUM_REG): Fix unsigned>=0 warning.
(EXTRA_SECTION_FUNCTIONS): Prototype const_section.
* dsp16xx.md: Add default case in switches.
* fr30.h (IN_RANGE): Delete.
* ia64.h (ASM_OUTPUT_MI_THUNK): Fix format specifier warnings.
* mcore-protos.h (mcore_output_cmov): Const-ify.
* mcore.c (mcore_output_cmov): Likewise.
* mcore.h (switch_to_section): Make static and prototype.
* mn10200.h (REGNO_OK_FOR_INDEX_P, REG_OK_FOR_INDEX_P): Fix
unsigned>=0 warnings.
* mn10300.h (REGNO_IN_RANGE_P): Likewise.
* rs6000-protos.h (read_only_data_section,
read_only_private_data_section): Prototype.
* rs6000.h (ASM_OUTPUT_BYTE): Fix format specifier warning.
* sh.c (sh_adjust_cost): Mark parameter with ATTRIBUTE_UNUSED.
* sh.h (GENERAL_REGISTER_P): Fix unsigned>=0 warning.

From-SVN: r46758

18 files changed:
gcc/ChangeLog
gcc/config/convex/convex.c
gcc/config/convex/convex.h
gcc/config/dsp16xx/dsp16xx-protos.h
gcc/config/dsp16xx/dsp16xx.c
gcc/config/dsp16xx/dsp16xx.h
gcc/config/dsp16xx/dsp16xx.md
gcc/config/fr30/fr30.h
gcc/config/ia64/ia64.h
gcc/config/mcore/mcore-protos.h
gcc/config/mcore/mcore.c
gcc/config/mcore/mcore.h
gcc/config/mn10200/mn10200.h
gcc/config/mn10300/mn10300.h
gcc/config/rs6000/rs6000-protos.h
gcc/config/rs6000/rs6000.h
gcc/config/sh/sh.c
gcc/config/sh/sh.h

index 4382d73730b2ae5f760d9aa0f5d47084d30cdb7d..f1bd7474fc42ebe0ef235ff647cec54e1b97c371 100644 (file)
@@ -1,3 +1,33 @@
+2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * convex.c (convex_output_function_prologue): Fix format specifier
+       warning.
+       (asm_declare_function_name): Fix signed/unsigned warning.
+       (print_operand): Fix format specifier warning.
+       * convex.h (S_REGNO_P, A_REGNO_P): Fix signed/unsigned warning.
+       * dsp16xx-protos.h (uns_comparison_operator,
+       num_1600_core_shifts): Prototype.
+       * dsp16xx.c: Include tm_p.h, not dsp16xx-protos.h.
+       (frame_size, frame_pointer_offset): Delete.
+       (dsp16xx_output_function_prologue, dsp16xx_output_function_epilogue):
+       Make static.  Fix format specifier warnings.
+       * dsp16xx.h (IS_ACCUM_REG): Fix unsigned>=0 warning.
+       (EXTRA_SECTION_FUNCTIONS): Prototype const_section.
+       * dsp16xx.md: Add default case in switches.
+       * fr30.h (IN_RANGE): Delete.
+       * ia64.h (ASM_OUTPUT_MI_THUNK): Fix format specifier warnings.
+       * mcore-protos.h (mcore_output_cmov): Const-ify.
+       * mcore.c (mcore_output_cmov): Likewise.
+       * mcore.h (switch_to_section): Make static and prototype.
+       * mn10200.h (REGNO_OK_FOR_INDEX_P, REG_OK_FOR_INDEX_P): Fix
+       unsigned>=0 warnings.
+       * mn10300.h (REGNO_IN_RANGE_P): Likewise.
+       * rs6000-protos.h (read_only_data_section,
+       read_only_private_data_section): Prototype.
+       * rs6000.h (ASM_OUTPUT_BYTE): Fix format specifier warning.
+       * sh.c (sh_adjust_cost): Mark parameter with ATTRIBUTE_UNUSED.
+       * sh.h (GENERAL_REGISTER_P): Fix unsigned>=0 warning.
+
 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * dwarf2asm.c (dw2_asm_output_pcrel): Mark parameters with
index 6f965a2809dd82bd19d515bc7662467fe5af5e02..6d3883182c85909e656c851ceae929df9b38536e 100644 (file)
@@ -94,7 +94,11 @@ convex_output_function_prologue (file, size)
 {
   size = ((size) + 7) & -8;
   if (size)
-    fprintf (file, "\tsub.w #%d,sp\n", size);
+    {
+      fprintf (file, "\tsub.w #");
+      fprintf (file, HOST_WIDE_INT_PRINT_DEC, size);
+      fprintf (file, ",sp\n");
+    }
 }
 
 /* This function generates the assembly code for function exit.
@@ -568,7 +572,7 @@ asm_declare_function_name (file, name, decl)
   p = version_string;
   for (i = 0; i < 3; ) {
     c = *p;
-    if (c - '0' < (unsigned) 10)
+    if (ISDIGIT (c))
       vers[i++] = c;
     if (c == 0 || c == ' ')
       vers[i++] = '0';
@@ -639,9 +643,15 @@ print_operand (file, x, code)
        break;
       default:
        if (code == 'u')
-         fprintf (file, "#%d", CONST_DOUBLE_HIGH (x));
+         {
+           fprintf (file, "#");
+           fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_HIGH (x));
+         }
        else
-         fprintf (file, "#%d", CONST_DOUBLE_LOW (x));
+         {
+           fprintf (file, "#");
+           fprintf (file, HOST_WIDE_INT_PRINT_DEC, CONST_DOUBLE_LOW (x));
+         }
       }
       break;
 
index 8d11c63618b23317cb034d1fe15c25e1c36082ea..b326c96961b3cb07f899105442b1303e175e526d 100644 (file)
@@ -642,8 +642,8 @@ enum reg_class {
 
 #define REGNO_REG_CLASS(REGNO) (regno_reg_class[REGNO])
 
-#define S_REGNO_P(REGNO) (((REGNO) - S0_REGNUM) < (unsigned) 8)
-#define A_REGNO_P(REGNO) (((REGNO) - A0_REGNUM) < (unsigned) 8)
+#define S_REGNO_P(REGNO) ((unsigned)((REGNO) - S0_REGNUM) < 8)
+#define A_REGNO_P(REGNO) ((unsigned)((REGNO) - A0_REGNUM) < 8)
 
 #define S_REG_P(X) (REG_P (X) && S_REGNO_P (REGNO (X)))
 #define A_REG_P(X) (REG_P (X) && A_REGNO_P (REGNO (X)))
index 02ba7b8c4f7b263bcfd41d6f082631e0667a16c0..ea1ea6b6610d6b6a11593a1c9c83a0291864cb5d 100644 (file)
@@ -49,6 +49,7 @@ extern void output_dsp16xx_float_const PARAMS ((rtx *));
 extern void emit_1600_core_shift PARAMS ((enum rtx_code, rtx *, int));
 extern int dsp16xx_address_cost PARAMS ((rtx));
 extern int symbolic_address_p PARAMS ((rtx));
+extern int uns_comparison_operator PARAMS ((rtx, enum machine_mode));
 #endif /* RTX_CODE */
 
 
@@ -87,3 +88,4 @@ extern enum reg_class dsp16xx_reg_class_from_letter PARAMS ((int));
 extern int regno_reg_class PARAMS ((int));
 extern void function_prologue PARAMS ((FILE *, int));
 extern void function_epilogue PARAMS ((FILE *, int));
+extern int num_1600_core_shifts PARAMS ((int));
index 5604d4d2717cd772e50d1d2190e770c7425172d3..f67d92cfcf6db2b09461f615f3aacb8ba4fb88e2 100644 (file)
@@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA.  */
 #include "ggc.h"
 #include "toplev.h"
 #include "recog.h"
-#include "dsp16xx-protos.h"
+#include "tm_p.h"
 #include "target.h"
 #include "target-def.h"
 
@@ -1362,21 +1362,6 @@ compute_frame_size (size)
   return total_size;
 }
 
-int 
-frame_size ()
-{
-  return (int) compute_frame_size(get_frame_size());
-}
-
-int 
-frame_pointer_offset ()
-{
-  if (!leaf_function_p())
-    return (-(current_function_outgoing_args_size + 1));
-  else
-    return 1;
-}
-
 int
 dsp16xx_call_saved_register (regno)
      int regno;
@@ -1405,7 +1390,7 @@ ybase_regs_ever_used ()
   return live;
 }
 
-void 
+static void 
 dsp16xx_output_function_prologue (file, size)
      FILE *file;
      HOST_WIDE_INT size;
@@ -1420,14 +1405,14 @@ dsp16xx_output_function_prologue (file, size)
   total_size = compute_frame_size (size);
   
   fprintf (file, "\t/* FUNCTION PROLOGUE: */\n");
-  fprintf (file, "\t/* total=%d, vars= %d, regs= %d, args=%d, extra= %d */\n",
+  fprintf (file, "\t/* total=%ld, vars= %ld, regs= %d, args=%d, extra= %ld */\n",
           current_frame_info.total_size,
           current_frame_info.var_size,
           current_frame_info.reg_size,
           current_function_outgoing_args_size,
           current_frame_info.extra_size);
   
-  fprintf (file, "\t/* fp save offset= %d, sp save_offset= %d */\n\n",
+  fprintf (file, "\t/* fp save offset= %ld, sp save_offset= %ld */\n\n",
           current_frame_info.fp_save_offset,
           current_frame_info.sp_save_offset);
   /* Set up the 'ybase' register window.  */
@@ -1449,7 +1434,7 @@ dsp16xx_output_function_prologue (file, size)
       else
         {
          if (SMALL_INTVAL(current_frame_info.var_size) && ((current_frame_info.var_size & 0x8000) == 0))
-           fprintf (file, "\t%s=%d\n\t*%s++%s\n", reg_names[REG_J], current_frame_info.var_size, sp, reg_names[REG_J]);
+           fprintf (file, "\t%s=%ld\n\t*%s++%s\n", reg_names[REG_J], current_frame_info.var_size, sp, reg_names[REG_J]);
          else
            fatal_error ("Stack size > 32k");
        }
@@ -1481,7 +1466,7 @@ dsp16xx_output_function_prologue (file, size)
     {
       fprintf (file, "\t%s=%s\n", a1h, sp);
       fprintf (file, "\t%s=%s\n", fp, a1h);  /* Establish new base frame */
-      fprintf (file, "\t%s=%d\n", reg_names[REG_J], -total_size);
+      fprintf (file, "\t%s=%ld\n", reg_names[REG_J], -total_size);
       fprintf (file, "\t*%s++%s\n", fp, reg_names[REG_J]);
     }
   
@@ -1515,7 +1500,7 @@ init_emulation_routines ()
  dsp16xx_lshrhi3_libcall = (rtx) 0;
 
 }
-void
+static void
 dsp16xx_output_function_epilogue (file, size)
      FILE *file;
      HOST_WIDE_INT size ATTRIBUTE_UNUSED;
@@ -1535,7 +1520,7 @@ dsp16xx_output_function_epilogue (file, size)
        fprintf (file, "\t*%s--\n", sp);
       else
        {
-         fprintf (file, "\t%s=%d\n\t*%s++%s\n", 
+         fprintf (file, "\t%s=%ld\n\t*%s++%s\n", 
                   reg_names[REG_J], -current_frame_info.args_size, sp, reg_names[REG_J]);
        }
     }
@@ -1565,7 +1550,7 @@ dsp16xx_output_function_epilogue (file, size)
        fprintf (file, "\t*%s--\n", sp);
       else
        {
-         fprintf (file, "\t%s=%d\n\t*%s++%s\n", 
+         fprintf (file, "\t%s=%ld\n\t*%s++%s\n", 
                   reg_names[REG_J], -current_frame_info.var_size, sp, reg_names[REG_J]);
        }
     }
@@ -2478,7 +2463,6 @@ luxworks_dsp16xx_file_start (file)
          }
 #endif
     fprintf (file, "\"%s\"\n", temp_filename);
-    fprintf (file, "");
 
   fprintf (file, "#include <%s.h>\n", save_chip_name);
 
index 542c89b5e66f1d27f7db3867f9ad351e7d1ed812..36abc14902cba96436b7f09518655a456ae71810 100644 (file)
@@ -502,7 +502,7 @@ extern int target_flags;
 #define REG_YBASE31 57
 
 /* Do we have a accumulator register? */
-#define IS_ACCUM_REG(REGNO) ((REGNO) >= REG_A0 && (REGNO) <= REG_A1L)
+#define IS_ACCUM_REG(REGNO) IN_RANGE ((REGNO), REG_A0, REG_A1L)
 #define IS_ACCUM_LOW_REG(REGNO) ((REGNO) == REG_A0L || (REGNO) == REG_A1L)
 
 /* Do we have a virtual ybase register */
@@ -1604,6 +1604,7 @@ extern struct dsp16xx_frame_info current_frame_info;
 #define EXTRA_SECTIONS in_const
 
 #define EXTRA_SECTION_FUNCTIONS  \
+extern void const_section PARAMS ((void));                         \
 void                                                               \
 const_section ()                                                   \
 {                                                                  \
index 1f44420e38fb3dc6fce9c95bc3723ad030b16ef7..64a64fd032aa2296cc136aa9589a84bbba5371cb 100644 (file)
           case 0:
           case 1:
              return \"%0&%1\";
+           default:
+             abort();
          }
 }"
   [(set_attr "type" "f3_alu,f3_alu")])
 
        case 2:
          return \"*%0++\;*%0++\";
+        default:
+          abort();
        }
 
     case 2:
     case 10:
     case 11:
       return \"%0=%b1+%H2\";
+    default:
+      abort();
     }
 }"
 [(set_attr "type" "data_move_memory,data_move_multiple,f3_alu_i,f3_alu_i,f3_alu,f3_alu,f3_alu,f3_alu,f3_alu_i,f3_alu_i,f3_alu_i,f3_alu_i")])
     case 7: case 8:
     case 9: case 10:
       return \"%0=%b1-%H2\";
+    default:
+      abort();
     }
 }"
 [(set_attr "type" "data_move_multiple,f3_alu_i,f3_alu_i,f3_alu,f3_alu,f3_alu,f3_alu,f3_alu_i,f3_alu_i,f3_alu_i,f3_alu_i")])
                case 8:
                case 9:
                   return \"\";
+                default:
+                  abort();
         }
 }"
 [(set_attr "type" "special,data_move_multiple,f3_alu,data_move_multiple,data_move_multiple,data_move_multiple,data_move_multiple,data_move_multiple,nothing,nothing")])
 
                 case 9: case 10:
                   return \"%0=%1\";
+                default:
+                  abort();
        }
 }"
 [(set_attr "type" "data_move,data_move,data_move_short_i,data_move_i,data_move_memory,data_move_memory,data_move_memory,data_move_memory,nothing,malu,malu")])
 
                 case 9: case 10:
                   return \"%0=%1\";
+                default:
+                  abort();
        }
 }"
 [(set_attr "type" "data_move,data_move,data_move_short_i,data_move_i,data_move_memory,data_move_memory,data_move_memory,data_move_memory,nothing,malu,malu")])
                case 5:
                case 6:
                   return \"%u0=%u1\;%w0=%w1\";
+                default:
+                  abort();
         }
 }"
 [(set_attr "type" "move,move,load_i,load,store,load,store")])
 ;;     return \"move %w0=%1\;%0=0\";
 ;;      else
 ;;     return \"%w0=%1\;%0=0\";
+;;    default:
+;;      abort();
 ;;    }
 ;; }")
 
 
        case 3:
          return \"%0 = extractz(%m1, 0x1000)\";
+        default:
+          abort();
       }
   }"
   [(set_attr "type" "data_move_2,data_move_2,data_move_2,shift_i")])
           }
           else
             return \"%w0=%1\;%0=0\";
+          default:
+            abort();
       }
   }"
   [(set_attr "type" "data_move_2,data_move_2,data_move_2")])
index 4e947b32a977f407f12b27d6dd45c2f0e0e2fa6b..bc2d0ca1fc45fdc3841a93a8ab3cd94033b2c664 100644 (file)
@@ -617,11 +617,6 @@ enum reg_class
 /*}}}*/ \f
 /*{{{  CONSTANTS.  */ 
 
-/* Return true if a value is inside a range */
-#define IN_RANGE(VALUE, LOW, HIGH)                                     \
-  (   ((unsigned HOST_WIDE_INT)((VALUE) - (LOW)))                      \
-   <= ((unsigned HOST_WIDE_INT)( (HIGH) - (LOW))))
-
 /* A C expression that defines the machine-dependent operand constraint letters
    (`I', `J', `K', .. 'P') that specify particular ranges of integer values.
    If C is one of those letters, the expression should check that VALUE, an
index ce8e7f1e1f98b30c9f9ed2234dab0de31e0463f8..361cf0a65aed92d2a11d94b0b1fb0fecbe106baa 100644 (file)
@@ -1526,13 +1526,25 @@ do {                                                                    \
 #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
 do {                                                                   \
   if (CONST_OK_FOR_I (DELTA))                                          \
-    fprintf (FILE, "\tadds r32 = %d, r32\n", (DELTA));                 \
+    {                                                                  \
+      fprintf (FILE, "\tadds r32 = ");                                 \
+      fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA));                        \
+      fprintf (FILE, ", r32\n");                                       \
+    }                                                                  \
   else                                                                 \
     {                                                                  \
       if (CONST_OK_FOR_J (DELTA))                                      \
-        fprintf (FILE, "\taddl r2 = %d, r0\n", (DELTA));               \
+        {                                                              \
+          fprintf (FILE, "\taddl r2 = ");                              \
+          fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA));            \
+          fprintf (FILE, ", r0\n");                                    \
+        }                                                              \
       else                                                             \
-       fprintf (FILE, "\tmovl r2 = %d\n", (DELTA));                    \
+        {                                                              \
+         fprintf (FILE, "\tmovl r2 = ");                               \
+         fprintf (FILE, HOST_WIDE_INT_PRINT_DEC, (DELTA));             \
+         fprintf (FILE, "\n");                                         \
+        }                                                              \
       fprintf (FILE, "\t;;\n");                                                \
       fprintf (FILE, "\tadd r32 = r2, r32\n");                         \
     }                                                                  \
index 9e197ca3996cf8ae7155e42ac54c7665ee82c7a7..d478f9003067592c9b47386115f358e00832273d 100644 (file)
@@ -57,7 +57,7 @@ extern rtx arch_compare_op1;
 
 extern const char * mcore_output_bclri                         PARAMS ((rtx, int));
 extern const char * mcore_output_bseti                         PARAMS ((rtx, int));
-extern const char * mcore_output_cmov                          PARAMS ((rtx *, int, char *));
+extern const char * mcore_output_cmov                          PARAMS ((rtx *, int, const char *));
 extern char *       mcore_output_call                          PARAMS ((rtx *, int));
 extern int          mcore_is_dead                      PARAMS ((rtx, rtx));
 extern int          mcore_expand_insv                  PARAMS ((rtx *));
index 556003044c7d6ea577f2b30e3ce6445531637904..aa52497915f7f5e81d9de81665683d4eb82dffce 100644 (file)
@@ -971,7 +971,7 @@ const char *
 mcore_output_cmov (operands, cmp_t, test)
      rtx operands[];
      int cmp_t;
-     char * test;
+     const char * test;
 {
   int load_value;
   int adjust_value;
index 1fd73a8bf7ff3dd2e5993a2bf8967df93f0dd32a..0b66920ad9cce8e636c1e4c399a942b6ab29dedc 100644 (file)
@@ -1095,7 +1095,8 @@ extern enum reg_class reg_class_from_letter[];
    ASM_DECLARE_OBJECT_NAME and then switch back to the original section
    afterwards.  */
 #define SWITCH_SECTION_FUNCTION                                        \
-void                                                           \
+static void switch_to_section PARAMS ((enum in_section, tree));        \
+static void                                                    \
 switch_to_section (section, decl)                              \
      enum in_section section;                                  \
      tree decl;                                                        \
index d6288b82de9fe2eac68695842d1803f33994824f..695ff2c3a8e15480385a70d3f4355f6e07b7b41c 100644 (file)
@@ -280,7 +280,7 @@ enum reg_class {
    || (reg_renumber[regno] > 3 && reg_renumber[regno] < FIRST_PSEUDO_REGISTER))
 
 #define REGNO_OK_FOR_INDEX_P(regno) \
-  (((regno) >= 0 && regno < 4) \
+  (IN_RANGE ((regno), 0, 3) \
    || (reg_renumber[regno] >= 0 && reg_renumber[regno] < 4))
 
 
@@ -639,7 +639,7 @@ struct cum_arg { int nbytes; };
 /* Nonzero if X is a hard reg that can be used as an index
    or if it is a pseudo reg.  */
 #define REG_OK_FOR_INDEX_P(X)  \
-  (((REGNO (X) >= 0 && REGNO(X) <= 3) || REGNO (X) >= FIRST_PSEUDO_REGISTER))
+  (IN_RANGE (REGNO (X), 0, 3) || REGNO (X) >= FIRST_PSEUDO_REGISTER)
 /* Nonzero if X is a hard reg that can be used as a base reg
    or if it is a pseudo reg.  */
 #define REG_OK_FOR_BASE_P(X) \
index 481f524a74cae7a41f9228c2df263bcb8c735921..4594bb0576105867dc9b6d234b06e92eae56331f 100644 (file)
@@ -342,7 +342,7 @@ enum reg_class {
   (((regno) >= (min) && (regno) <= (max)) || (regno) >= FIRST_PSEUDO_REGISTER)
 #else
 # define REGNO_IN_RANGE_P(regno,min,max) \
-  (((regno) >= (min) && (regno) <= (max)) \
+  (IN_RANGE ((regno), (min), (max)) \
    || (reg_renumber \
        && reg_renumber[(regno)] >= (min) && reg_renumber[(regno)] <= (max)))
 #endif
index 3a205e29e005d245ea7f10ace052226310eff201..b745a3acc0ada5c0dd364a3f08afa873b3bdba16 100644 (file)
@@ -170,6 +170,8 @@ extern void sdata_section PARAMS ((void));
 extern void sdata2_section PARAMS ((void));
 extern void sbss_section PARAMS ((void));
 extern void private_data_section PARAMS ((void));
+extern void read_only_data_section PARAMS ((void));
+extern void read_only_private_data_section PARAMS ((void));
 extern int get_TOC_alias_set PARAMS ((void));
 extern int uses_TOC PARAMS ((void));
 extern void rs6000_emit_prologue PARAMS ((void));
index 56281940a5aada90b942ba6001b7c1ad7730f9c1..47b97c73e7b83a9d43afeb879cbfeb3885d72a95 100644 (file)
@@ -2500,7 +2500,7 @@ do {                                                                      \
 /* This is how to output an assembler line for a numeric constant byte.  */
 
 #define ASM_OUTPUT_BYTE(FILE,VALUE)  \
-  fprintf (FILE, "\t.byte 0x%x\n", (VALUE))
+  fprintf (FILE, "\t.byte 0x%x\n", (int)(VALUE))
 
 /* This is used by the definition of ASM_OUTPUT_ADDR_ELT in defaults.h.  */
 #define ASM_LONG (TARGET_32BIT ? ".long" : DOUBLE_INT_ASM_OP)
index 684cff1ac5eea745218f887bcd8abc4d59cdce98..0e871d415c3ea430a4bf98e39b7b3f4c11f36641 100644 (file)
@@ -5648,7 +5648,7 @@ sh_asm_named_section (name, flags)
 static int
 sh_adjust_cost (insn, link, dep_insn, cost)
      rtx insn;
-     rtx link;
+     rtx link ATTRIBUTE_UNUSED;
      rtx dep_insn;
      int cost;
 {
index ddbc2a72648986593624d8e12bd0af80ae5fb4d5..80a3a36e4cb24327edd8d1037d1205cf9e9140d2 100644 (file)
@@ -483,7 +483,7 @@ do {                                                                        \
 #define LAST_XD_REG  (FIRST_XD_REG + 7)
 
 #define GENERAL_REGISTER_P(REGNO) \
-  ((REGNO) >= FIRST_GENERAL_REG && (REGNO) <= LAST_GENERAL_REG)
+  IN_RANGE ((REGNO), FIRST_GENERAL_REG, LAST_GENERAL_REG)
 
 #define GENERAL_OR_AP_REGISTER_P(REGNO) \
   (GENERAL_REGISTER_P (REGNO) || ((REGNO) == AP_REG))