aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-02-10 22:05:40 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-02-10 17:05:40 -0500
commit729a212576ebc14125d4c8e33a5b13ba43eeadec (patch)
tree6986eb3ff22851f6ba40b08e9a2247fb26755e79 /gcc/combine.c
parent5e4900c7f4945f48d9660d2682bbbcce40ec9603 (diff)
downloadgcc-729a212576ebc14125d4c8e33a5b13ba43eeadec.zip
gcc-729a212576ebc14125d4c8e33a5b13ba43eeadec.tar.gz
gcc-729a212576ebc14125d4c8e33a5b13ba43eeadec.tar.bz2
combine.c (make_extraction, [...]): Avoid warning on mixed-signedness conditionals.
* combine.c (make_extraction, force_to_mode): Avoid warning on mixed-signedness conditionals. (make_field_assignment, nonzero_bits): Likewise. * expmed.c (store_fixed_bit_field): ALIGN arg now unsigned. (store_split_bit_field, extract_split_bit_field): Likewise. (extract_fixed_bit_field, store_bit_field, * expr.c: Change alignment to be unsigned everywhere. (move_by_pieces, store_constructor_field, store_constructor): Alignment parm is unsigned. (emit_block_move, emit_group_load, emit_group_store): Likewise. (clear_storage, emit_push_insn, compare_from_rtx): Likewise. (do_compare_rtx_and_jump): Likewise. (move_by_pieces_ninsns, clear_by_pieces): Likewise. Compare align with GET_MODE_ALIGNMENT. (expand_expr_unaligned): Pointer to alignment is pointer to unsigned. (get_inner_reference): Likewise. (copy_blkmode_from_reg, emit_push_insn): Remove unneeded casts. (expand_assignment): Local vars for alignment now unsigned. (store_constructor, store_field, expand_expr, do_jump): Likewise. (do_compare_and_jump): Likewise. (store_field): Call new function expr_align. * expr.h (emit_block_move, emit_group_load, emit_group_store): Alignment arg now unsigned. (clear_storage, emit_push_insn, compare_from_rtx): Likewise. (do_compare_rtx_and_jump, store_bit_field): Likewise. (extract_bit_field): Likewise. * fold-const.c (add_double): Add cast to eliminate signedness warning. * machmode.h (GET_MODE_ALIGNMENT): Result is unsigned. (get_best_mode): Alignment arg is unsigned. * rtl.h (move_by_pieces): Likewise. * store-layout.c (maximum_field_alignment, set_alignment): Now unsigned. (layout_decl): Alignment arg is now unsigned. Remove unneeded casts. (layout_record, layout_union, layout_type): Remove unneeded casts. Local alignment variables now unsigned. (get_best_mode): Alignment arg now unsigned. * tree.c (expr_align): New function. * tree.h (expr_align): Likewise. (maximum_field_alignment, set_alignment): Now unsigned. (get_inner_reference): Alignment argument is now pointer to unsigned. * varasm.c (assemble_variable): Add cast to eliminate warning. From-SVN: r31904
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index d40b6b1..f6b8867 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -5891,7 +5891,7 @@ make_extraction (mode, inner, pos, pos_rtx, len,
new = force_to_mode (inner, tmode,
len >= HOST_BITS_PER_WIDE_INT
? GET_MODE_MASK (tmode)
- : ((HOST_WIDE_INT) 1 << len) - 1,
+ : ((unsigned HOST_WIDE_INT) 1 << len) - 1,
NULL_RTX, 0);
/* If this extraction is going into the destination of a SET,
@@ -6112,7 +6112,8 @@ make_extraction (mode, inner, pos, pos_rtx, len,
pos_rtx
|| len + orig_pos >= HOST_BITS_PER_WIDE_INT
? GET_MODE_MASK (wanted_inner_mode)
- : (((HOST_WIDE_INT) 1 << len) - 1) << orig_pos,
+ : ((((unsigned HOST_WIDE_INT) 1 << len) - 1)
+ << orig_pos),
NULL_RTX, 0);
}
@@ -6583,7 +6584,8 @@ force_to_mode (x, mode, mask, reg, just_select)
if (op_mode)
fuller_mask = (GET_MODE_BITSIZE (op_mode) >= HOST_BITS_PER_WIDE_INT
? GET_MODE_MASK (op_mode)
- : ((HOST_WIDE_INT) 1 << (floor_log2 (mask) + 1)) - 1);
+ : (((unsigned HOST_WIDE_INT) 1 << (floor_log2 (mask) + 1))
+ - 1));
else
fuller_mask = ~ (HOST_WIDE_INT) 0;
@@ -7525,7 +7527,7 @@ make_field_assignment (x)
mode,
GET_MODE_BITSIZE (mode) >= HOST_BITS_PER_WIDE_INT
? GET_MODE_MASK (mode)
- : ((HOST_WIDE_INT) 1 << len) - 1,
+ : ((unsigned HOST_WIDE_INT) 1 << len) - 1,
dest, 0);
return gen_rtx_combine (SET, VOIDmode, assign, src);
@@ -8110,8 +8112,10 @@ nonzero_bits (x, mode)
/* If this is a typical RISC machine, we only have to worry
about the way loads are extended. */
if (LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) == SIGN_EXTEND
- ? (nonzero
- & (1L << (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x))) - 1)))
+ ? (((nonzero
+ & (((unsigned HOST_WIDE_INT) 1
+ << (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (x))) - 1))))
+ != 0))
: LOAD_EXTEND_OP (GET_MODE (SUBREG_REG (x))) != ZERO_EXTEND)
#endif
{