]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
expr.c (highest_pow2_factor): Return unsigned.
authorOlivier Hainque <hainque@act-europe.fr>
Mon, 14 Apr 2003 21:07:12 +0000 (23:07 +0200)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 14 Apr 2003 21:07:12 +0000 (17:07 -0400)
        * expr.c (highest_pow2_factor): Return unsigned.
        * expr.h (offset_address): Likewise.
        * emit-rtl.c (offset_address): POW2 argument now unsigned.

From-SVN: r65589

gcc/ChangeLog
gcc/emit-rtl.c
gcc/expr.c
gcc/expr.h

index 72d5d0a6e46505a0b630bc75143e3cf809ecf724..0ffd927494a71c4aea7fd5e292143c03b88dce73 100644 (file)
@@ -1,3 +1,9 @@
+2003-04-14  Olivier Hainque <hainque@act-europe.fr>
+
+        * expr.c (highest_pow2_factor): Return unsigned.
+        * expr.h (offset_address): Likewise.
+        * emit-rtl.c (offset_address): POW2 argument now unsigned.
+        
 2003-04-14  Roger Sayle  <roger@eyesopen.com>
 
        * builtins.c (expand_builtin_strlen):  Evaluate the lengths of
index 7b1d2ba7fb8f1eea64e35da91d9fc9793cfa7179..058100c07726e1b3674c8256c177039ed40cada5 100644 (file)
@@ -2314,7 +2314,7 @@ rtx
 offset_address (memref, offset, pow2)
      rtx memref;
      rtx offset;
-     HOST_WIDE_INT pow2;
+     unsigned HOST_WIDE_INT pow2;
 {
   rtx new, addr = XEXP (memref, 0);
 
@@ -2342,8 +2342,7 @@ offset_address (memref, offset, pow2)
      we don't know.  */
   MEM_ATTRS (new)
     = get_mem_attrs (MEM_ALIAS_SET (memref), MEM_EXPR (memref), 0, 0,
-                    MIN (MEM_ALIGN (memref),
-                         (unsigned HOST_WIDE_INT) pow2 * BITS_PER_UNIT),
+                    MIN (MEM_ALIGN (memref), pow2 * BITS_PER_UNIT),
                     GET_MODE (new));
   return new;
 }
index ad8993d3a0ec41582f55d7d02c72aca1933e3341..d20342413339a92556564774777c0d7642daa877 100644 (file)
@@ -166,8 +166,11 @@ static rtx store_field             PARAMS ((rtx, HOST_WIDE_INT,
                                         tree, enum machine_mode, int, tree,
                                         int));
 static rtx var_rtx             PARAMS ((tree));
-static HOST_WIDE_INT highest_pow2_factor PARAMS ((tree));
-static HOST_WIDE_INT highest_pow2_factor_for_type PARAMS ((tree, tree));
+
+static unsigned HOST_WIDE_INT highest_pow2_factor PARAMS ((tree));
+static unsigned HOST_WIDE_INT highest_pow2_factor_for_type PARAMS ((tree,
+                                                                   tree));
+
 static int is_aligning_offset  PARAMS ((tree, tree));
 static rtx expand_increment    PARAMS ((tree, int, int));
 static rtx do_store_flag       PARAMS ((tree, rtx, enum machine_mode, int));
@@ -6335,11 +6338,11 @@ check_max_integer_computation_mode (exp)
 /* Return the highest power of two that EXP is known to be a multiple of.
    This is used in updating alignment of MEMs in array references.  */
 
-static HOST_WIDE_INT
+static unsigned HOST_WIDE_INT
 highest_pow2_factor (exp)
      tree exp;
 {
-  HOST_WIDE_INT c0, c1;
+  unsigned HOST_WIDE_INT c0, c1;
 
   switch (TREE_CODE (exp))
     {
@@ -6405,12 +6408,12 @@ highest_pow2_factor (exp)
 /* Similar, except that it is known that the expression must be a multiple
    of the alignment of TYPE.  */
 
-static HOST_WIDE_INT
+static unsigned HOST_WIDE_INT
 highest_pow2_factor_for_type (type, exp)
      tree type;
      tree exp;
 {
-  HOST_WIDE_INT type_align, factor;
+  unsigned HOST_WIDE_INT type_align, factor;
 
   factor = highest_pow2_factor (exp);
   type_align = TYPE_ALIGN (type) / BITS_PER_UNIT;
index cf794fc7401fdd8b301ceadbeb77c0326c087f0b..214ada97bdac21d32167ea6b5957ed9f39ec7463 100644 (file)
@@ -642,7 +642,7 @@ extern rtx adjust_automodify_address_1 PARAMS ((rtx, enum machine_mode,
 /* Return a memory reference like MEMREF, but whose address is changed by
    adding OFFSET, an RTX, to it.  POW2 is the highest power of two factor
    known to be in OFFSET (possibly 1).  */
-extern rtx offset_address PARAMS ((rtx, rtx, HOST_WIDE_INT));
+extern rtx offset_address PARAMS ((rtx, rtx, unsigned HOST_WIDE_INT));
 
 /* Return a memory reference like MEMREF, but with its address changed to
    ADDR.  The caller is asserting that the actual piece of memory pointed