Commit 0345195a by Richard Kenner Committed by Richard Kenner

combine.c (struct undo): Change int to unsigned int.

	* combine.c (struct undo): Change int to unsigned int.
	(do_SUBST_INT): Args are unsigned int.
	(make_extraction, force_to_mode): Use proper type when forming mask.
	(make_field_assignment): Likewise.

From-SVN: r36967
parent 11306230
Fri Oct 20 13:33:16 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* combine.c (struct undo): Change int to unsigned int.
(do_SUBST_INT): Args are unsigned int.
(make_extraction, force_to_mode): Use proper type when forming mask.
(make_field_assignment): Likewise.
2000-10-20 Joseph S. Myers <jsm28@cam.ac.uk> 2000-10-20 Joseph S. Myers <jsm28@cam.ac.uk>
* c-common.c (check_format_info_recurse): Extract string constant * c-common.c (check_format_info_recurse): Extract string constant
......
...@@ -330,8 +330,8 @@ struct undo ...@@ -330,8 +330,8 @@ struct undo
{ {
struct undo *next; struct undo *next;
int is_int; int is_int;
union {rtx r; int i;} old_contents; union {rtx r; unsigned int i;} old_contents;
union {rtx *r; int *i;} where; union {rtx *r; unsigned int *i;} where;
}; };
/* Record a bunch of changes to be undone, up to MAX_UNDO of them. /* Record a bunch of changes to be undone, up to MAX_UNDO of them.
...@@ -361,7 +361,8 @@ static struct undobuf undobuf; ...@@ -361,7 +361,8 @@ static struct undobuf undobuf;
static int n_occurrences; static int n_occurrences;
static void do_SUBST PARAMS ((rtx *, rtx)); static void do_SUBST PARAMS ((rtx *, rtx));
static void do_SUBST_INT PARAMS ((int *, int)); static void do_SUBST_INT PARAMS ((unsigned int *,
unsigned int));
static void init_reg_last_arrays PARAMS ((void)); static void init_reg_last_arrays PARAMS ((void));
static void setup_incoming_promotions PARAMS ((void)); static void setup_incoming_promotions PARAMS ((void));
static void set_nonzero_bits_and_sign_copies PARAMS ((rtx, rtx, void *)); static void set_nonzero_bits_and_sign_copies PARAMS ((rtx, rtx, void *));
...@@ -468,10 +469,10 @@ do_SUBST (into, newval) ...@@ -468,10 +469,10 @@ do_SUBST (into, newval)
static void static void
do_SUBST_INT (into, newval) do_SUBST_INT (into, newval)
int *into, newval; unsigned int *into, newval;
{ {
struct undo *buf; struct undo *buf;
int oldval = *into; unsigned int oldval = *into;
if (oldval == newval) if (oldval == newval)
return; return;
...@@ -6014,7 +6015,7 @@ make_extraction (mode, inner, pos, pos_rtx, len, ...@@ -6014,7 +6015,7 @@ make_extraction (mode, inner, pos, pos_rtx, len,
else else
new = force_to_mode (inner, tmode, new = force_to_mode (inner, tmode,
len >= HOST_BITS_PER_WIDE_INT len >= HOST_BITS_PER_WIDE_INT
? ~(HOST_WIDE_INT) 0 ? ~(unsigned HOST_WIDE_INT) 0
: ((unsigned HOST_WIDE_INT) 1 << len) - 1, : ((unsigned HOST_WIDE_INT) 1 << len) - 1,
NULL_RTX, 0); NULL_RTX, 0);
...@@ -6235,7 +6236,7 @@ make_extraction (mode, inner, pos, pos_rtx, len, ...@@ -6235,7 +6236,7 @@ make_extraction (mode, inner, pos, pos_rtx, len,
inner = force_to_mode (inner, wanted_inner_mode, inner = force_to_mode (inner, wanted_inner_mode,
pos_rtx pos_rtx
|| len + orig_pos >= HOST_BITS_PER_WIDE_INT || len + orig_pos >= HOST_BITS_PER_WIDE_INT
? ~(HOST_WIDE_INT) 0 ? ~(unsigned HOST_WIDE_INT) 0
: ((((unsigned HOST_WIDE_INT) 1 << len) - 1) : ((((unsigned HOST_WIDE_INT) 1 << len) - 1)
<< orig_pos), << orig_pos),
NULL_RTX, 0); NULL_RTX, 0);
...@@ -6902,7 +6903,9 @@ force_to_mode (x, mode, mask, reg, just_select) ...@@ -6902,7 +6903,9 @@ force_to_mode (x, mode, mask, reg, just_select)
/* If X is (minus C Y) where C's least set bit is larger than any bit /* If X is (minus C Y) where C's least set bit is larger than any bit
in the mask, then we may replace with (neg Y). */ in the mask, then we may replace with (neg Y). */
if (GET_CODE (XEXP (x, 0)) == CONST_INT if (GET_CODE (XEXP (x, 0)) == CONST_INT
&& (INTVAL (XEXP (x, 0)) & -INTVAL (XEXP (x, 0))) > mask) && (((unsigned HOST_WIDE_INT) (INTVAL (XEXP (x, 0))
& -INTVAL (XEXP (x, 0))))
> mask))
{ {
x = gen_unary (NEG, GET_MODE (x), GET_MODE (x), XEXP (x, 1)); x = gen_unary (NEG, GET_MODE (x), GET_MODE (x), XEXP (x, 1));
return force_to_mode (x, mode, mask, reg, next_select); return force_to_mode (x, mode, mask, reg, next_select);
...@@ -6911,7 +6914,8 @@ force_to_mode (x, mode, mask, reg, just_select) ...@@ -6911,7 +6914,8 @@ force_to_mode (x, mode, mask, reg, just_select)
/* Similarly, if C contains every bit in the mask, then we may /* Similarly, if C contains every bit in the mask, then we may
replace with (not Y). */ replace with (not Y). */
if (GET_CODE (XEXP (x, 0)) == CONST_INT if (GET_CODE (XEXP (x, 0)) == CONST_INT
&& (INTVAL (XEXP (x, 0)) | mask) == INTVAL (XEXP (x, 0))) && ((INTVAL (XEXP (x, 0)) | (HOST_WIDE_INT) mask)
== INTVAL (XEXP (x, 0))))
{ {
x = gen_unary (NOT, GET_MODE (x), GET_MODE (x), XEXP (x, 1)); x = gen_unary (NOT, GET_MODE (x), GET_MODE (x), XEXP (x, 1));
return force_to_mode (x, mode, mask, reg, next_select); return force_to_mode (x, mode, mask, reg, next_select);
...@@ -7693,7 +7697,7 @@ make_field_assignment (x) ...@@ -7693,7 +7697,7 @@ make_field_assignment (x)
GET_MODE (src), other, pos), GET_MODE (src), other, pos),
mode, mode,
GET_MODE_BITSIZE (mode) >= HOST_BITS_PER_WIDE_INT GET_MODE_BITSIZE (mode) >= HOST_BITS_PER_WIDE_INT
? ~(HOST_WIDE_INT) 0 ? ~(unsigned HOST_WIDE_INT) 0
: ((unsigned HOST_WIDE_INT) 1 << len) - 1, : ((unsigned HOST_WIDE_INT) 1 << len) - 1,
dest, 0); dest, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment