* varasm.c (immed_double_const): Add casts to HOST_WIDE_INT where
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Jan 1998 22:50:40 +0000 (22:50 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Jan 1998 22:50:40 +0000 (22:50 +0000)
        necessary.
        (const_hash): Hash val is unsigned long.
        (SYMHASH): Likewise.
        * tree.c (TYPE_HASH): Type of hash val is unsigned long.
        * print-tree.c (print_node_brief): HOST_PTR_PRINTF format wants a
        char pointer, not HOST_WIDE_INT.
        (print_node): Likewise.  Also hash is unsigned long not
        HOST_WIDE_INT.
        * cse.c (canon_hash): Hash is unsigned long not HOST_WIDE_INT.

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

gcc/ChangeLog
gcc/cse.c
gcc/print-tree.c
gcc/tree.c
gcc/varasm.c

index b77d668..3efb4cb 100644 (file)
@@ -1,5 +1,19 @@
 Sat Jan 17 23:41:36 1998  David S. Miller  <davem@tanya.rutgers.edu>
 
+       * varasm.c (immed_double_const): Add casts to HOST_WIDE_INT where
+       necessary.
+       (const_hash): Hash val is unsigned long.
+       (SYMHASH): Likewise.
+
+       * tree.c (TYPE_HASH): Type of hash val is unsigned long.
+
+       * print-tree.c (print_node_brief): HOST_PTR_PRINTF format wants a
+       char pointer, not HOST_WIDE_INT.
+       (print_node): Likewise.  Also hash is unsigned long not
+       HOST_WIDE_INT.
+
+       * cse.c (canon_hash): Hash is unsigned long not HOST_WIDE_INT.
+
        * explow.c (optimize_save_area_alloca): New function for targets
        where SETJMP_VIA_SAVE_AREA is true.
        (allocate_dynamic_stack_space): On SETJMP_VIA_SAVE_AREA targets,
index ae1a5c9..e001597 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -1918,12 +1918,12 @@ canon_hash (x, mode)
       /* Assume there is only one rtx object for any given label.  */
     case LABEL_REF:
       hash
-       += ((unsigned) LABEL_REF << 7) + (unsigned HOST_WIDE_INT) XEXP (x, 0);
+       += ((unsigned) LABEL_REF << 7) + (unsigned long) XEXP (x, 0);
       return hash;
 
     case SYMBOL_REF:
       hash
-       += ((unsigned) SYMBOL_REF << 7) + (unsigned HOST_WIDE_INT) XSTR (x, 0);
+       += ((unsigned) SYMBOL_REF << 7) + (unsigned long) XSTR (x, 0);
       return hash;
 
     case MEM:
index 8d7db2b..f075f0b 100644 (file)
@@ -80,7 +80,7 @@ print_node_brief (file, prefix, node, indent)
   if (indent > 0)
     fprintf (file, " ");
   fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
-  fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) node);
+  fprintf (file, HOST_PTR_PRINTF, (char *) node);
 
   if (class == 'd')
     {
@@ -216,7 +216,7 @@ print_node (file, prefix, node, indent)
       return;
     }
 
-  hash = ((unsigned HOST_WIDE_INT) node) % HASH_SIZE;
+  hash = ((unsigned long) node) % HASH_SIZE;
 
   /* If node is in the table, just mention its address.  */
   for (b = table[hash]; b; b = b->next)
@@ -237,7 +237,7 @@ print_node (file, prefix, node, indent)
 
   /* Print the slot this node is in, and its code, and address.  */
   fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]);
-  fprintf (file, HOST_PTR_PRINTF, (HOST_WIDE_INT) node);
+  fprintf (file, HOST_PTR_PRINTF, (char *) node);
 
   /* Print the name, if any.  */
   if (class == 'd')
@@ -433,7 +433,7 @@ print_node (file, prefix, node, indent)
            {
              fprintf (file, "saved-insns ");
              fprintf (file, HOST_PTR_PRINTF,
-                      (HOST_WIDE_INT) DECL_SAVED_INSNS (node));
+                      (char *) DECL_SAVED_INSNS (node));
            }
        }
 
index b7d06e3..eda6187 100644 (file)
@@ -272,7 +272,7 @@ static int next_type_uid = 1;
 
 /* Here is how primitive or already-canonicalized types' hash
    codes are made.  */
-#define TYPE_HASH(TYPE) ((HOST_WIDE_INT) (TYPE) & 0777777)
+#define TYPE_HASH(TYPE) ((unsigned long) (TYPE) & 0777777)
 
 extern char *mode_name[];
 
index 81e5350..5e0e3e4 100644 (file)
@@ -2178,7 +2178,7 @@ immed_double_const (i0, i1, mode)
         is being broken.  */
 
       if (width <= HOST_BITS_PER_WIDE_INT)
-       i1 = (i0 < 0) ? ~0 : 0;
+       i1 = (i0 < 0) ? ~(HOST_WIDE_INT) 0 : 0;
 
       /* If this integer fits in one word, return a CONST_INT.  */
       if ((i1 == 0 && i0 >= 0)
@@ -2490,7 +2490,7 @@ const_hash (exp)
             Instead, we include the array size because the constructor could
             be shorter.  */
          if (TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE)
-           hi = ((HOST_WIDE_INT) TREE_TYPE (exp) & ((1 << HASHBITS) - 1))
+           hi = ((unsigned long) TREE_TYPE (exp) & ((1 << HASHBITS) - 1))
              % MAX_HASH_TABLE;
          else
            hi = ((5 + int_size_in_bytes (TREE_TYPE (exp)))
@@ -3257,7 +3257,7 @@ static struct pool_sym **const_rtx_sym_hash_table;
    The argument is XSTR (... , 0)  */
 
 #define SYMHASH(LABEL) \
-  ((((HOST_WIDE_INT) (LABEL)) & ((1 << HASHBITS) - 1))  % MAX_RTX_HASH_TABLE)
+  ((((unsigned long) (LABEL)) & ((1 << HASHBITS) - 1))  % MAX_RTX_HASH_TABLE)
 \f
 /* Initialize constant pool hashing for next function.  */