alpha.c (alpha_cpu_name, [...]): Add the `const' keyword.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Tue, 2 Mar 1999 07:21:47 +0000 (07:21 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Tue, 2 Mar 1999 07:21:47 +0000 (07:21 +0000)
        * alpha.c (alpha_cpu_name, alpha_cpu_string, alpha_tp_string,
        alpha_fprm_string, alpha_fptm_string, alpha_mlat_string,
        current_function_file): Add the `const' keyword.
        (normal_memory_operand): Mark parameter `mode' with
        ATTRIBUTE_UNUSED.
        (alpha_expand_unaligned_load): Add a default case to a switch.
        * alpha.h (alpha_cpu_string, alpha_fprm_string, alpha_fptm_string,
        alpha_tp_string, alpha_mlat_string): Add the `const' keyword.
        (normal_memory_operand): Add prototype.
        * alpha.md: Cast an expression to `unsigned HOST_WIDE_INT' when
        comparing against one.

From-SVN: r25532

gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/config/alpha/alpha.h
gcc/config/alpha/alpha.md

index c498a20304f584161db6378df8814cab35801e89..86d209ff1685fca7e87f67d1a57d212abe6c0c34 100644 (file)
@@ -1,3 +1,19 @@
+Tue Mar  2 10:12:48 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * alpha.c (alpha_cpu_name, alpha_cpu_string, alpha_tp_string,
+       alpha_fprm_string, alpha_fptm_string, alpha_mlat_string,
+       current_function_file): Add the `const' keyword.
+       (normal_memory_operand): Mark parameter `mode' with
+       ATTRIBUTE_UNUSED.
+       (alpha_expand_unaligned_load): Add a default case to a switch.
+
+       * alpha.h (alpha_cpu_string, alpha_fprm_string, alpha_fptm_string,
+       alpha_tp_string, alpha_mlat_string): Add the `const' keyword.
+       (normal_memory_operand): Add prototype.
+       
+       * alpha.md: Cast an expression to `unsigned HOST_WIDE_INT' when
+       comparing against one.
+
 Tue Mar  2 10:00:21 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * mips.c (abort_with_insn): Make function static, add a prototype,
index 7a057017b0bc05ad5fef065c39e263a74d09457f..c833e11a9f4223a5e6254b50a1598549e9d69693 100644 (file)
@@ -49,7 +49,7 @@ extern int rtx_equal_function_value_matters;
 /* Specify which cpu to schedule for. */
 
 enum processor_type alpha_cpu;
-static char* const alpha_cpu_name[] = 
+static const char * const alpha_cpu_name[] = 
 {
   "ev4", "ev5", "ev6"
 };
@@ -68,11 +68,11 @@ enum alpha_fp_trap_mode alpha_fptm;
 
 /* Strings decoded into the above options.  */
 
-char *alpha_cpu_string;                /* -mcpu= */
-char *alpha_tp_string;         /* -mtrap-precision=[p|s|i] */
-char *alpha_fprm_string;       /* -mfp-rounding-mode=[n|m|c|d] */
-char *alpha_fptm_string;       /* -mfp-trap-mode=[n|u|su|sui] */
-char *alpha_mlat_string;       /* -mmemory-latency= */
+const char *alpha_cpu_string;  /* -mcpu= */
+const char *alpha_tp_string;   /* -mtrap-precision=[p|s|i] */
+const char *alpha_fprm_string; /* -mfp-rounding-mode=[n|m|c|d] */
+const char *alpha_fptm_string; /* -mfp-trap-mode=[n|u|su|sui] */
+const char *alpha_mlat_string; /* -mmemory-latency= */
 
 /* Save information from a "cmpxx" operation until the branch or scc is
    emitted.  */
@@ -856,7 +856,7 @@ reg_not_elim_operand (op, mode)
 int
 normal_memory_operand (op, mode)
      register rtx op;
-     enum machine_mode mode;
+     enum machine_mode mode ATTRIBUTE_UNUSED;
 {
   if (reload_in_progress && GET_CODE (op) == REG
       && REGNO (op) >= FIRST_PSEUDO_REGISTER)
@@ -1576,6 +1576,8 @@ alpha_expand_unaligned_load (tgt, mem, size, ofs, sign)
          emit_insn (gen_extqh (exth, memh, addr));
          mode = DImode;
          break;
+       default:
+         abort();
        }
 
       addr = expand_binop (mode, ior_optab, gen_lowpart (mode, extl),
@@ -3958,7 +3960,7 @@ static int num_source_filenames = 0;
 
 /* Name of the file containing the current function.  */
 
-static char *current_function_file = "";
+static const char *current_function_file = "";
 
 /* Offsets to alpha virtual arg/local debugging pointers.  */
 
index a995ed77416878d1e793f2cf7bcf9dd056f202ec..f5ab13bb1a644003cc309149fae008e85ceeb19f 100644 (file)
@@ -233,11 +233,11 @@ extern enum alpha_fp_trap_mode alpha_fptm;
        extern char *m88k_short_data;
        #define TARGET_OPTIONS { { "short-data-", &m88k_short_data } }  */
 
-extern char *alpha_cpu_string;  /* For -mcpu= */
-extern char *alpha_fprm_string;        /* For -mfp-rounding-mode=[n|m|c|d] */
-extern char *alpha_fptm_string;        /* For -mfp-trap-mode=[n|u|su|sui]  */
-extern char *alpha_tp_string;  /* For -mtrap-precision=[p|f|i] */
-extern char *alpha_mlat_string;        /* For -mmemory-latency= */
+extern const char *alpha_cpu_string;   /* For -mcpu= */
+extern const char *alpha_fprm_string;  /* For -mfp-rounding-mode=[n|m|c|d] */
+extern const char *alpha_fptm_string;  /* For -mfp-trap-mode=[n|u|su|sui]  */
+extern const char *alpha_tp_string;    /* For -mtrap-precision=[p|f|i] */
+extern const char *alpha_mlat_string;  /* For -mmemory-latency= */
 
 #define TARGET_OPTIONS                                 \
 {                                                      \
@@ -783,6 +783,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, FLOAT_REGS, ALL_REGS,
    : (C) == 'S' ? (GET_CODE (OP) == CONST_INT                          \
                   && (unsigned HOST_WIDE_INT) INTVAL (OP) < 64)        \
    : 0)
+extern int normal_memory_operand ();
 
 /* Given an rtx X being reloaded into a reg required to be
    in class CLASS, return the class of reg to actually use.
index 6bab614a6155829cc44ebc88381319ce636db4b6..82c108958c2f19c35ccfbbadde6dcd80f7579b38 100644 (file)
   "HOST_BITS_PER_WIDE_INT == 64
    && GET_CODE (operands[3]) == CONST_INT
    && (((unsigned HOST_WIDE_INT) 0xff << INTVAL (operands[2])
-        == INTVAL (operands[3]))
+        == (unsigned HOST_WIDE_INT) INTVAL (operands[3]))
        || ((unsigned HOST_WIDE_INT) 0xffff << INTVAL (operands[2])
-        == INTVAL (operands[3]))
+        == (unsigned HOST_WIDE_INT) INTVAL (operands[3]))
        || ((unsigned HOST_WIDE_INT) 0xffffffff << INTVAL (operands[2])
-        == INTVAL (operands[3])))"
+        == (unsigned HOST_WIDE_INT) INTVAL (operands[3])))"
   "*
 {
 #if HOST_BITS_PER_WIDE_INT == 64
   if ((unsigned HOST_WIDE_INT) 0xff << INTVAL (operands[2])
-      == INTVAL (operands[3]))
+      == (unsigned HOST_WIDE_INT) INTVAL (operands[3]))
     return \"insbl %1,%s2,%0\";
   if ((unsigned HOST_WIDE_INT) 0xffff << INTVAL (operands[2])
-      == INTVAL (operands[3]))
+      == (unsigned HOST_WIDE_INT) INTVAL (operands[3]))
     return \"inswl %1,%s2,%0\";
   if ((unsigned HOST_WIDE_INT) 0xffffffff << INTVAL (operands[2])
-      == INTVAL (operands[3]))
+      == (unsigned HOST_WIDE_INT) INTVAL (operands[3]))
     return \"insll %1,%s2,%0\";
 #endif
   abort();