expr.c (highest_pow2_factor): Return unsigned.

* expr.c (highest_pow2_factor): Return unsigned.
        * expr.h (offset_address): Likewise.
        * emit-rtl.c (offset_address): POW2 argument now unsigned.

From-SVN: r65589
This commit is contained in:
Olivier Hainque 2003-04-14 23:07:12 +02:00 committed by Richard Kenner
parent 712b7a052f
commit 9ceca3020a
4 changed files with 18 additions and 10 deletions

View 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

View 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;
}

View 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;

View 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