diff options
author | Jason Merrill <jason@casey.cygnus.com> | 2000-05-04 21:15:05 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-05-04 17:15:05 -0400 |
commit | f9e158c377d54f13901c7ab2e79de3f741c71e39 (patch) | |
tree | f94edf423be1c6f8735d954344a16ef175aca24d /gcc | |
parent | 926fd2e161ada3acf143b8c123b9237d53e3c27e (diff) | |
download | gcc-f9e158c377d54f13901c7ab2e79de3f741c71e39.zip gcc-f9e158c377d54f13901c7ab2e79de3f741c71e39.tar.gz gcc-f9e158c377d54f13901c7ab2e79de3f741c71e39.tar.bz2 |
simplify-rtx.c (simplify_ternary_operation): Cast to unsigned.
* simplify-rtx.c (simplify_ternary_operation): Cast to unsigned.
* stor-layout.c (place_field): Likewise.
* integrate.h (struct inline_remap): Make regno_pointer_align unsigned.
* expr.c (store_expr): Make align unsigned.
* explow.c (plus_constant_wide): Make low words unsigned.
* expmed.c (choose_multiplier): Likewise.
* fold-const.c (fold): Likewise.
* tree.h (build_int_2): Likewise.
* tree.c (build_int_2_wide, tree_int_cst_msb): Likewise.
* emit-rtl.c (gen_reg_rtx): Add cast to unsigned char*.
(init_emit): Change cast to unsigned char*.
* varasm.c (compare_constant_1): Add cast to char*.
* gcse.c (delete_null_pointer_checks): Change cast to unsigned int*.
* reload1.c (reload): Likewise.
* rtl.h (MEM_SET_IN_STRUCT_P): Use do { } while (0).
From-SVN: r33684
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/emit-rtl.c | 6 | ||||
-rw-r--r-- | gcc/explow.c | 7 | ||||
-rw-r--r-- | gcc/expmed.c | 11 | ||||
-rw-r--r-- | gcc/expr.c | 2 | ||||
-rw-r--r-- | gcc/fold-const.c | 6 | ||||
-rw-r--r-- | gcc/gcse.c | 2 | ||||
-rw-r--r-- | gcc/integrate.h | 2 | ||||
-rw-r--r-- | gcc/reload1.c | 2 | ||||
-rw-r--r-- | gcc/rtl.h | 15 | ||||
-rw-r--r-- | gcc/simplify-rtx.c | 2 | ||||
-rw-r--r-- | gcc/stor-layout.c | 2 | ||||
-rw-r--r-- | gcc/tree.c | 5 | ||||
-rw-r--r-- | gcc/tree.h | 4 | ||||
-rw-r--r-- | gcc/varasm.c | 4 |
15 files changed, 61 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a1312d23..4987c2a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2000-05-04 Jason Merrill <jason@casey.cygnus.com> + + * simplify-rtx.c (simplify_ternary_operation): Cast to unsigned. + * stor-layout.c (place_field): Likewise. + * integrate.h (struct inline_remap): Make regno_pointer_align unsigned. + * expr.c (store_expr): Make align unsigned. + * explow.c (plus_constant_wide): Make low words unsigned. + * expmed.c (choose_multiplier): Likewise. + * fold-const.c (fold): Likewise. + * tree.h (build_int_2): Likewise. + * tree.c (build_int_2_wide, tree_int_cst_msb): Likewise. + * emit-rtl.c (gen_reg_rtx): Add cast to unsigned char*. + (init_emit): Change cast to unsigned char*. + * varasm.c (compare_constant_1): Add cast to char*. + * gcse.c (delete_null_pointer_checks): Change cast to unsigned int*. + * reload1.c (reload): Likewise. + + * rtl.h (MEM_SET_IN_STRUCT_P): Use do { } while (0). + Thu May 4 14:37:23 2000 Jeffrey A Law (law@cygnus.com) * predict.c (estimate_probability): If no prediction was found, then diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 82a2ca2..12ba67f 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -572,7 +572,7 @@ gen_reg_rtx (mode) new = xrealloc (f->emit->regno_pointer_align, old_size * 2); memset (new + old_size, 0, old_size); - f->emit->regno_pointer_align = new; + f->emit->regno_pointer_align = (unsigned char *) new; new1 = (rtx *) xrealloc (f->emit->x_regno_reg_rtx, old_size * 2 * sizeof (rtx)); @@ -3893,8 +3893,8 @@ init_emit () = (char *) xcalloc (f->emit->regno_pointer_flag_length, sizeof (char)); f->emit->regno_pointer_align - = (char *) xcalloc (f->emit->regno_pointer_flag_length, - sizeof (char)); + = (unsigned char *) xcalloc (f->emit->regno_pointer_flag_length, + sizeof (unsigned char)); regno_reg_rtx = (rtx *) xcalloc (f->emit->regno_pointer_flag_length * sizeof (rtx), diff --git a/gcc/explow.c b/gcc/explow.c index 4d3756e..585dafd 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -106,11 +106,12 @@ plus_constant_wide (x, c) case CONST_DOUBLE: { - HOST_WIDE_INT l1 = CONST_DOUBLE_LOW (x); + unsigned HOST_WIDE_INT l1 = CONST_DOUBLE_LOW (x); HOST_WIDE_INT h1 = CONST_DOUBLE_HIGH (x); - HOST_WIDE_INT l2 = c; + unsigned HOST_WIDE_INT l2 = c; HOST_WIDE_INT h2 = c < 0 ? ~0 : 0; - HOST_WIDE_INT lv, hv; + unsigned HOST_WIDE_INT lv; + HOST_WIDE_INT hv; add_double (l1, h1, l2, h2, &lv, &hv); diff --git a/gcc/expmed.c b/gcc/expmed.c index bb06536..c230a33 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2567,11 +2567,12 @@ choose_multiplier (d, n, precision, multiplier_ptr, post_shift_ptr, lgup_ptr) int *post_shift_ptr; int *lgup_ptr; { - unsigned HOST_WIDE_INT mhigh_hi, mhigh_lo; - unsigned HOST_WIDE_INT mlow_hi, mlow_lo; + HOST_WIDE_INT mhigh_hi, mlow_hi; + unsigned HOST_WIDE_INT mhigh_lo, mlow_lo; int lgup, post_shift; int pow, pow2; - unsigned HOST_WIDE_INT nh, nl, dummy1, dummy2; + unsigned HOST_WIDE_INT nl, dummy1; + HOST_WIDE_INT nh, dummy2; /* lgup = ceil(log2(divisor)); */ lgup = ceil_log2 (d); @@ -2592,7 +2593,7 @@ choose_multiplier (d, n, precision, multiplier_ptr, post_shift_ptr, lgup_ptr) /* mlow = 2^(N + lgup)/d */ if (pow >= HOST_BITS_PER_WIDE_INT) { - nh = (unsigned HOST_WIDE_INT) 1 << (pow - HOST_BITS_PER_WIDE_INT); + nh = (HOST_WIDE_INT) 1 << (pow - HOST_BITS_PER_WIDE_INT); nl = 0; } else @@ -2605,7 +2606,7 @@ choose_multiplier (d, n, precision, multiplier_ptr, post_shift_ptr, lgup_ptr) /* mhigh = (2^(N + lgup) + 2^N + lgup - precision)/d */ if (pow2 >= HOST_BITS_PER_WIDE_INT) - nh |= (unsigned HOST_WIDE_INT) 1 << (pow2 - HOST_BITS_PER_WIDE_INT); + nh |= (HOST_WIDE_INT) 1 << (pow2 - HOST_BITS_PER_WIDE_INT); else nl |= (unsigned HOST_WIDE_INT) 1 << pow2; div_and_round_double (TRUNC_DIV_EXPR, 1, nl, nh, d, (HOST_WIDE_INT) 0, @@ -3926,7 +3926,7 @@ store_expr (exp, target, want_value) = size_binop (MIN_EXPR, make_tree (sizetype, size), size_int (TREE_STRING_LENGTH (exp))); - int align = TYPE_ALIGN (TREE_TYPE (exp)); + unsigned int align = TYPE_ALIGN (TREE_TYPE (exp)); rtx copy_size_rtx = expand_expr (copy_size, NULL_RTX, VOIDmode, 0); rtx label = 0; diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 9568287..93c5816 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -5185,7 +5185,8 @@ fold (expr) { if (TREE_CODE (arg0) == INTEGER_CST) { - HOST_WIDE_INT low, high; + unsigned HOST_WIDE_INT low; + HOST_WIDE_INT high; int overflow = neg_double (TREE_INT_CST_LOW (arg0), TREE_INT_CST_HIGH (arg0), &low, &high); @@ -5219,7 +5220,8 @@ fold (expr) if (! TREE_UNSIGNED (type) && TREE_INT_CST_HIGH (arg0) < 0) { - HOST_WIDE_INT low, high; + unsigned HOST_WIDE_INT low; + HOST_WIDE_INT high; int overflow = neg_double (TREE_INT_CST_LOW (arg0), TREE_INT_CST_HIGH (arg0), &low, &high); @@ -5093,7 +5093,7 @@ delete_null_pointer_checks (f) /* Go through the basic blocks, seeing whether or not each block ends with a conditional branch whose condition is a comparison against zero. Record the register compared in BLOCK_REG. */ - block_reg = (int *) xcalloc (n_basic_blocks, sizeof (int)); + block_reg = (unsigned int *) xcalloc (n_basic_blocks, sizeof (int)); for (bb = 0; bb < n_basic_blocks; bb++) { rtx last_insn = BLOCK_END (bb); diff --git a/gcc/integrate.h b/gcc/integrate.h index 14fdd37..5bc4569 100644 --- a/gcc/integrate.h +++ b/gcc/integrate.h @@ -95,7 +95,7 @@ struct inline_remap /* Indications for regs being pointers and their alignment. */ char *regno_pointer_flag; - char *regno_pointer_align; + unsigned char *regno_pointer_align; /* The next few fields are used for subst_constants to record the SETs that it saw. */ diff --git a/gcc/reload1.c b/gcc/reload1.c index 446ca8d..a543297 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -674,7 +674,7 @@ reload (first, global, dumpfile) reg_equiv_mem = (rtx *) xcalloc (max_regno, sizeof (rtx)); reg_equiv_init = (rtx *) xcalloc (max_regno, sizeof (rtx)); reg_equiv_address = (rtx *) xcalloc (max_regno, sizeof (rtx)); - reg_max_ref_width = (int *) xcalloc (max_regno, sizeof (int)); + reg_max_ref_width = (unsigned int *) xcalloc (max_regno, sizeof (int)); reg_old_renumber = (short *) xcalloc (max_regno, sizeof (short)); bcopy ((PTR) reg_renumber, (PTR) reg_old_renumber, max_regno * sizeof (short)); pseudo_forbidden_regs @@ -772,9 +772,18 @@ extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS]; RTX. Otherwise, vice versa. Use this macro only when you are *sure* that you know that the MEM is in a structure, or is a scalar. VAL is evaluated only once. */ -#define MEM_SET_IN_STRUCT_P(RTX, VAL) \ - ((VAL) ? (MEM_IN_STRUCT_P (RTX) = 1, MEM_SCALAR_P (RTX) = 0) \ - : (MEM_IN_STRUCT_P (RTX) = 0, MEM_SCALAR_P (RTX) = 1)) +#define MEM_SET_IN_STRUCT_P(RTX, VAL) do { \ + if (VAL) \ + { \ + MEM_IN_STRUCT_P (RTX) = 1; \ + MEM_SCALAR_P (RTX) = 0; \ + } \ + else \ + { \ + MEM_IN_STRUCT_P (RTX) = 0; \ + MEM_SCALAR_P (RTX) = 1; \ + } \ +} while (0) /* For a MEM rtx, the alias set. If 0, this MEM is not in any alias set, and may alias anything. Otherwise, the MEM can only alias diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 84bba2d..af16f11 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1905,7 +1905,7 @@ simplify_ternary_operation (code, mode, op0_mode, op0, op1, op2) && GET_CODE (op1) == CONST_INT && GET_CODE (op2) == CONST_INT && INTVAL (op1) + INTVAL (op2) <= GET_MODE_BITSIZE (op0_mode) - && width <= HOST_BITS_PER_WIDE_INT) + && width <= (unsigned) HOST_BITS_PER_WIDE_INT) { /* Extracting a bit-field from a constant */ HOST_WIDE_INT val = INTVAL (op0); diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index c5c69e3..eadb973 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -667,7 +667,7 @@ place_field (rli, field) /* Some targets (i.e. VMS) limit struct field alignment to a lower boundary than alignment of variables. */ #ifdef BIGGEST_FIELD_ALIGNMENT - desired_align = MIN (desired_align, BIGGEST_FIELD_ALIGNMENT); + desired_align = MIN (desired_align, (unsigned) BIGGEST_FIELD_ALIGNMENT); #endif #ifdef ADJUST_FIELD_ALIGN desired_align = ADJUST_FIELD_ALIGN (field, desired_align); @@ -1386,7 +1386,8 @@ set_identifier_size (size) tree build_int_2_wide (low, hi) - HOST_WIDE_INT low, hi; + unsigned HOST_WIDE_INT low; + HOST_WIDE_INT hi; { register tree t = make_node (INTEGER_CST); @@ -4334,7 +4335,7 @@ tree_int_cst_msb (t) { register int prec; HOST_WIDE_INT h; - HOST_WIDE_INT l; + unsigned HOST_WIDE_INT l; /* Note that using TYPE_PRECISION here is wrong. We care about the actual bits, not the (arbitrary) range of the type. */ @@ -1824,13 +1824,13 @@ extern tree maybe_get_identifier PARAMS ((const char *)); /* Construct various types of nodes. */ #define build_int_2(LO,HI) \ - build_int_2_wide ((HOST_WIDE_INT) (LO), (HOST_WIDE_INT) (HI)) + build_int_2_wide ((unsigned HOST_WIDE_INT) (LO), (HOST_WIDE_INT) (HI)) extern tree build PARAMS ((enum tree_code, tree, ...)); extern tree build_nt PARAMS ((enum tree_code, ...)); extern tree build_parse_node PARAMS ((enum tree_code, ...)); -extern tree build_int_2_wide PARAMS ((HOST_WIDE_INT, HOST_WIDE_INT)); +extern tree build_int_2_wide PARAMS ((unsigned HOST_WIDE_INT, HOST_WIDE_INT)); extern tree build_real PARAMS ((tree, REAL_VALUE_TYPE)); extern tree build_real_from_int_cst PARAMS ((tree, tree)); extern tree build_complex PARAMS ((tree, tree, tree)); diff --git a/gcc/varasm.c b/gcc/varasm.c index 88bfec0..8a6bdde 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -2563,8 +2563,8 @@ compare_constant_1 (exp, p) int xlen = len = int_size_in_bytes (TREE_TYPE (exp)); unsigned char *tmp = (unsigned char *) alloca (len); - get_set_constructor_bytes (exp, (unsigned char *) tmp, len); - strp = tmp; + get_set_constructor_bytes (exp, tmp, len); + strp = (char *) tmp; if (bcmp ((char *) &xlen, p, sizeof xlen)) return 0; |