c4x.c (c4x_fp_reglist): Const-ify.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sun, 10 Mar 2002 01:39:04 +0000 (01:39 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sun, 10 Mar 2002 01:39:04 +0000 (01:39 +0000)
* c4x.c (c4x_fp_reglist): Const-ify.
* cris.c (cris_print_operand): Likewise.
* i386.c (ix86_va_arg): Likewise.
* ia64/unwind-ia64.c (unw_decode_table): Likewise.
* m32r.c (m32r_hard_regno_mode_ok): Likewise.
* m32r.h (m32r_hard_regno_mode_ok): Likewise.
* mcore.c (regno_reg_class, mcore_unique_section): Likewise.
* mcore.h (regno_reg_class): Likewise.
* mips.c (gen_int_relational): Likewise.
* ns32k.c (ns32k_reg_class_contents, regclass_map): Likewise.
* ns32k.h (ns32k_reg_class_contents, regclass_map): Likewise.
* pdp11.c (pdp11_assemble_integer): Likewise.
* pj.h (INITIALIZE_TRAMPOLINE): Likewise.
* s390.c (s390_branch_condition_mnemonic, regclass_map):
Likewise.
* s390.h (regclass_map): Likewise.
* sh.c (shift_amounts): Likewise.
* sh.md (rot_tab): Likewise.

From-SVN: r50517

18 files changed:
gcc/ChangeLog
gcc/config/c4x/c4x.c
gcc/config/cris/cris.c
gcc/config/i386/i386.c
gcc/config/ia64/unwind-ia64.c
gcc/config/m32r/m32r.c
gcc/config/m32r/m32r.h
gcc/config/mcore/mcore.c
gcc/config/mcore/mcore.h
gcc/config/mips/mips.c
gcc/config/ns32k/ns32k.c
gcc/config/ns32k/ns32k.h
gcc/config/pdp11/pdp11.c
gcc/config/pj/pj.h
gcc/config/s390/s390.c
gcc/config/s390/s390.h
gcc/config/sh/sh.c
gcc/config/sh/sh.md

index 56d2cf62f51e7447414196366840a79e4c58847d..27eb89512edb75a102a1c5b9080ffe1f75b87e01 100644 (file)
@@ -1,3 +1,24 @@
+2002-03-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * c4x.c (c4x_fp_reglist): Const-ify.
+       * cris.c (cris_print_operand): Likewise.
+       * i386.c (ix86_va_arg): Likewise.
+       * ia64/unwind-ia64.c (unw_decode_table): Likewise.
+       * m32r.c (m32r_hard_regno_mode_ok): Likewise.
+       * m32r.h (m32r_hard_regno_mode_ok): Likewise.
+       * mcore.c (regno_reg_class, mcore_unique_section): Likewise.
+       * mcore.h (regno_reg_class): Likewise.
+       * mips.c (gen_int_relational): Likewise.
+       * ns32k.c (ns32k_reg_class_contents, regclass_map): Likewise.
+       * ns32k.h (ns32k_reg_class_contents, regclass_map): Likewise.
+       * pdp11.c (pdp11_assemble_integer): Likewise.
+       * pj.h (INITIALIZE_TRAMPOLINE): Likewise.
+       * s390.c (s390_branch_condition_mnemonic, regclass_map):
+       Likewise.
+       * s390.h (regclass_map): Likewise.
+       * sh.c (shift_amounts): Likewise.
+       * sh.md (rot_tab): Likewise.
+
 2002-03-09  Geoffrey Keating  <geoffk@redhat.com>
 
        * config/rs6000/rs6000.md (ne0+4): Add extra CLOBBER.
index e34ed5c59bdc550ea19104a095ca18a63af70c0c..fc02849aef6995b40a9cf7fac03f80e2576fb74c 100644 (file)
@@ -514,7 +514,7 @@ static const int c4x_int_reglist[3][6] =
   {AR2_REGNO, RC_REGNO, RS_REGNO, RE_REGNO, 0, 0}
 };
 
-static int c4x_fp_reglist[2] = {R2_REGNO, R3_REGNO};
+static const int c4x_fp_reglist[2] = {R2_REGNO, R3_REGNO};
 
 
 /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a
index 72fc6b3acddf1cb8a0abeb21ec04498f09826903..94568742f3e84b5d56519b773cf64e7314dc8176 100644 (file)
@@ -1264,7 +1264,7 @@ cris_print_operand (file, x, code)
   rtx operand = x;
 
   /* Size-strings corresponding to MULT expressions.  */
-  static const char *mults[] = { "BAD:0", ".b", ".w", "BAD:3", ".d" };
+  static const char *const mults[] = { "BAD:0", ".b", ".w", "BAD:3", ".d" };
 
   /* New code entries should just be added to the switch below.  If
      handling is finished, just return.  If handling was just a
index 2f7bb73a64b8e6652c39efe2034fe9b9bea34585..ae714da67b35669c37b39713f1e7c1094458decf 100644 (file)
@@ -2509,7 +2509,7 @@ rtx
 ix86_va_arg (valist, type)
      tree valist, type;
 {
-  static int intreg[6] = { 0, 1, 2, 3, 4, 5 };
+  static const int intreg[6] = { 0, 1, 2, 3, 4, 5 };
   tree f_gpr, f_fpr, f_ovf, f_sav;
   tree gpr, fpr, ovf, sav, t;
   int size, rsize;
index 99923aa9b87cad3f856b68c7f22fb6ce126b236b..bca3f236287658ecacef34995ae02131cdd7cbfc 100644 (file)
@@ -1212,7 +1212,7 @@ unw_decode_b3_x4 (unsigned char *dp, unsigned char code, void *arg)
 
 typedef unsigned char *(*unw_decoder) (unsigned char *, unsigned char, void *);
 
-static unw_decoder unw_decode_table[2][8] =
+static const unw_decoder unw_decode_table[2][8] =
 {
   /* prologue table: */
   {
index 0a985599a3e544c864b384af31361f482d1b8bd3..acc6b5edb2a6e5ea8941db8c6ea2b1766c432b1a 100644 (file)
@@ -172,7 +172,7 @@ enum m32r_mode_class
 
 /* Value is 1 if register/mode pair is acceptable on arc.  */
 
-unsigned int m32r_hard_regno_mode_ok[FIRST_PSEUDO_REGISTER] =
+const unsigned int m32r_hard_regno_mode_ok[FIRST_PSEUDO_REGISTER] =
 {
   T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, T_MODES,
   T_MODES, T_MODES, T_MODES, T_MODES, T_MODES, S_MODES, S_MODES, S_MODES,
index 02a916812580fc0f0f173c71ff90e6623a80833e..ef51ce1dc64f5ba71d2aef46c7d91a807d6e5eda 100644 (file)
@@ -638,7 +638,7 @@ extern enum m32r_sdata m32r_sdata;
 ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
 
 /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.  */
-extern unsigned int m32r_hard_regno_mode_ok[FIRST_PSEUDO_REGISTER];
+extern const unsigned int m32r_hard_regno_mode_ok[FIRST_PSEUDO_REGISTER];
 extern unsigned int m32r_mode_class[];
 #define HARD_REGNO_MODE_OK(REGNO, MODE) \
 ((m32r_hard_regno_mode_ok[REGNO] & m32r_mode_class[MODE]) != 0)
index 931cd06a99dbbb91b5468dd0af311e36bd987626..2acd158da06b51c429af8f31fba1310d670c16a3 100644 (file)
@@ -62,7 +62,7 @@ rtx arch_compare_op1;
 
 /* Provides the class number of the smallest class containing
    reg number.  */
-int regno_reg_class[FIRST_PSEUDO_REGISTER] =
+const int regno_reg_class[FIRST_PSEUDO_REGISTER] =
 {
   GENERAL_REGS,        ONLYR1_REGS,  LRW_REGS,     LRW_REGS,
   LRW_REGS,    LRW_REGS,     LRW_REGS,     LRW_REGS,
@@ -3519,7 +3519,7 @@ mcore_unique_section (decl, reloc)
      int reloc ATTRIBUTE_UNUSED;
 {
   int len;
-  char * name;
+  const char * name;
   char * string;
   const char * prefix;
 
index 01336756f1c574d3f6bd59e9ed6a9cd32db87275..1de6fbc8d678b13d38fa0201113a9f299bf0814e 100644 (file)
@@ -518,7 +518,7 @@ enum reg_class
    reg number REGNO.  This could be a conditional expression
    or could index an array.  */
 
-extern int regno_reg_class[FIRST_PSEUDO_REGISTER];
+extern const int regno_reg_class[FIRST_PSEUDO_REGISTER];
 #define REGNO_REG_CLASS(REGNO) regno_reg_class[REGNO]
 
 /* When defined, the compiler allows registers explicitly used in the
index 72a1e9c1ac9329997bd0f5bd591a0e072a6dd2b5..467cbca8d599a54e0403c94b356ddbc6e720d183 100644 (file)
@@ -2884,7 +2884,7 @@ gen_int_relational (test_code, result, cmp0, cmp1, p_invert)
     int unsignedp;             /* != 0 for unsigned comparisons.  */
   };
 
-  static struct cmp_info info[ (int)ITEST_MAX ] = {
+  static const struct cmp_info info[ (int)ITEST_MAX ] = {
 
     { XOR,      0,  65535,  0,  0,  0,  0, 0 },        /* EQ  */
     { XOR,      0,  65535,  0,  0,  1,  1, 0 },        /* NE  */
@@ -2900,7 +2900,7 @@ gen_int_relational (test_code, result, cmp0, cmp1, p_invert)
 
   enum internal_test test;
   enum machine_mode mode;
-  struct cmp_info *p_info;
+  const struct cmp_info *p_info;
   int branch_p;
   int eqne_p;
   int invert;
index 7c3afe2ecae0bd7a044659199ef6aace823b0189..9feef5e00670ad8fce0571d7d1383f991246ed87 100644 (file)
@@ -47,9 +47,9 @@ int ns32k_num_files = 0;
    initialized in time. Also this is more convenient as an array of ints.
    We know that HARD_REG_SET fits in an unsigned int */
 
-unsigned int ns32k_reg_class_contents[N_REG_CLASSES][1] = REG_CLASS_CONTENTS;
+const unsigned int ns32k_reg_class_contents[N_REG_CLASSES][1] = REG_CLASS_CONTENTS;
 
-enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] =
+const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] =
 {
   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,
   GENERAL_REGS, GENERAL_REGS, GENERAL_REGS, GENERAL_REGS,
index 58878a289dec86685506ed6dc7b0f4f7867744b9..00d3aa7b023fa18e4aa791ad58e3d1bfb9b3b52f 100644 (file)
@@ -1388,8 +1388,8 @@ do {                                                                      \
 
 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address(FILE, ADDR)
 
-extern unsigned int ns32k_reg_class_contents[N_REG_CLASSES][1];
-extern enum reg_class regclass_map[FIRST_PSEUDO_REGISTER]; /* smallest class containing REGNO */
+extern const unsigned int ns32k_reg_class_contents[N_REG_CLASSES][1];
+extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER]; /* smallest class containing REGNO */
 
 /*
 Local variables:
index 505456550bd72a0e0b718e6e593564f7b64aeaef..cff6fbf67928183952f65e2d3a1d1e1958a13926 100644 (file)
@@ -984,7 +984,7 @@ pdp11_assemble_integer (x, size, aligned_p)
 
 /* register move costs, indexed by regs */
 
-static int move_costs[N_REG_CLASSES][N_REG_CLASSES] = 
+static const int move_costs[N_REG_CLASSES][N_REG_CLASSES] = 
 {
              /* NO  MUL  GEN  LFPU  NLFPU FPU ALL */
 
index 42065f532a865f4e8e32d46bf8d6a982332d2d33..5c0095e08df4dee642ed34e8df35ef6d2ee931f3 100644 (file)
@@ -734,7 +734,7 @@ struct pj_args
 
 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)                             \
 {                                                                             \
-  static int off[4] = { 1, 0, 4, 3 };                                         \
+  static const int off[4] = { 1, 0, 4, 3 };                                   \
   int i;                                                                      \
                                                                               \
   /* Move the FNADDR and CXT into the instruction stream. Do this byte        \
index 38c6f59b11f70841c89d01e07e8c47f0bdaf872d..f4696e44f7f9aa4e5b25d415a5a25e77ef38903f 100644 (file)
@@ -344,7 +344,7 @@ s390_branch_condition_mnemonic (code, inv)
      rtx code;
      int inv;
 {
-  static const char *mnemonic[16] =
+  static const char *const mnemonic[16] =
     {
       NULL, "o", "h", "nle",
       "l", "nhe", "lh", "ne",
@@ -600,7 +600,7 @@ override_options ()
 
 /* Map for smallest class containing reg regno.  */
 
-enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] =
+const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] =
 { GENERAL_REGS, ADDR_REGS, ADDR_REGS, ADDR_REGS,
   ADDR_REGS,    ADDR_REGS, ADDR_REGS, ADDR_REGS,
   ADDR_REGS,    ADDR_REGS, ADDR_REGS, ADDR_REGS,
index 959bc9cf1f8a767077f34dc0d9137f5c5164b7bd..005c2f30aa0ab0da72aeb917ac224c65961e17f3 100644 (file)
@@ -518,7 +518,7 @@ enum reg_class
 
 #define REGNO_REG_CLASS(REGNO) (regclass_map[REGNO])
 
-extern enum reg_class regclass_map[FIRST_PSEUDO_REGISTER]; /* smalled class containing REGNO   */
+extern const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER]; /* smalled class containing REGNO   */
 
 /* The class value for index registers, and the one for base regs.  */
 
index 10f342ce23fa235d4ec300b855c4334e02b7f7bc..882a778e901861b70678bf1c2a4319050c995ba7 100644 (file)
@@ -1136,7 +1136,7 @@ static const char shift_insns[]    =
    One bit right shifts clobber the T bit, so when possible, put one bit
    shifts in the middle of the sequence, so the ends are eligible for
    branch delay slots.  */
-static short shift_amounts[32][5] = {
+static const short shift_amounts[32][5] = {
   {0}, {1}, {2}, {2, 1},
   {2, 2}, {2, 1, 2}, {2, 2, 2}, {2, 2, 1, 2},
   {8}, {8, 1}, {8, 2}, {8, 1, 2},
index 072a33e66573ad45d9e967e3571bf21b1aa4e624..ad17f117a1b1dc1cb7a8a9e1b04d936a272b1fc3 100644 (file)
   "TARGET_SH1"
   "
 {
-  static char rot_tab[] = {
+  static const char rot_tab[] = {
     000, 000, 000, 000, 000, 000, 010, 001,
     001, 001, 011, 013, 003, 003, 003, 003,
     003, 003, 003, 003, 003, 013, 012, 002,