diff options
author | glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-23 22:16:08 +0000 |
---|---|---|
committer | glisse <glisse@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-08-23 22:16:08 +0000 |
commit | 561f0ec8cf3b0a2b13ed7561b6d4af44ea96190d (patch) | |
tree | fd1a5007e3c6c876ebf4f1982aa74584d82afc0d /gcc/tree-stdarg.c | |
parent | 66d5aa8e94ffe60746b0032942967ea052e199e0 (diff) |
2013-08-24 Marc Glisse <marc.glisse@inria.fr>
PR other/57324
* hwint.h (HOST_WIDE_INT_UC, HOST_WIDE_INT_1U, HOST_WIDE_INT_M1,
HOST_WIDE_INT_M1U): New macros.
* fold-const.c (sign_bit_p, build_range_check, fold_unary_loc,
fold_binary_loc, fold_ternary_loc): Use the new macros. Use an
unsigned -1 for lshift.
* cse.c (cse_insn): Likewise.
* double-int.c (rshift_double, lshift_double): Likewise.
* builtins.c (fold_builtin_bitop): Likewise.
* combine.c (force_to_mode): Likewise.
* tree.c (integer_pow2p, tree_log2, tree_floor_log2): Likewise.
* simplify-rtx.c (simplify_const_unary_operation,
simplify_const_binary_operation): Likewise.
* tree-stdarg.c (va_list_counter_bump, va_list_ptr_read,
check_va_list_escapes): Likewise.
* rtlanal.c (nonzero_bits1): Likewise.
* expmed.c (expand_smod_pow2): Likewise.
* tree-ssa-structalias.c (UNKNOWN_OFFSET): Use HOST_WIDE_INT_MIN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201953 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-stdarg.c')
-rw-r--r-- | gcc/tree-stdarg.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index 50592c03a365..e4eb60ae0429 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -105,7 +105,7 @@ reachable_at_most_once (basic_block va_arg_bb, basic_block va_start_bb) /* For statement COUNTER = RHS, if RHS is COUNTER + constant, - return constant, otherwise return (unsigned HOST_WIDE_INT) -1. + return constant, otherwise return HOST_WIDE_INT_M1U. GPR_P is true if this is GPR counter. */ static unsigned HOST_WIDE_INT @@ -149,7 +149,7 @@ va_list_counter_bump (struct stdarg_info *si, tree counter, tree rhs, stmt = SSA_NAME_DEF_STMT (lhs); if (!is_gimple_assign (stmt) || gimple_assign_lhs (stmt) != lhs) - return (unsigned HOST_WIDE_INT) -1; + return HOST_WIDE_INT_M1U; rhs_code = gimple_assign_rhs_code (stmt); rhs1 = gimple_assign_rhs1 (stmt); @@ -182,21 +182,21 @@ va_list_counter_bump (struct stdarg_info *si, tree counter, tree rhs, } if (get_gimple_rhs_class (rhs_code) != GIMPLE_SINGLE_RHS) - return (unsigned HOST_WIDE_INT) -1; + return HOST_WIDE_INT_M1U; rhs = gimple_assign_rhs1 (stmt); if (TREE_CODE (counter) != TREE_CODE (rhs)) - return (unsigned HOST_WIDE_INT) -1; + return HOST_WIDE_INT_M1U; if (TREE_CODE (counter) == COMPONENT_REF) { if (get_base_address (counter) != get_base_address (rhs) || TREE_CODE (TREE_OPERAND (rhs, 1)) != FIELD_DECL || TREE_OPERAND (counter, 1) != TREE_OPERAND (rhs, 1)) - return (unsigned HOST_WIDE_INT) -1; + return HOST_WIDE_INT_M1U; } else if (counter != rhs) - return (unsigned HOST_WIDE_INT) -1; + return HOST_WIDE_INT_M1U; lhs = NULL; } @@ -401,7 +401,7 @@ va_list_ptr_read (struct stdarg_info *si, tree ap, tree tem) if (! si->compute_sizes) return false; - if (va_list_counter_bump (si, ap, tem, true) == (unsigned HOST_WIDE_INT) -1) + if (va_list_counter_bump (si, ap, tem, true) == HOST_WIDE_INT_M1U) return false; /* Note the temporary, as we need to track whether it doesn't escape @@ -504,7 +504,7 @@ check_va_list_escapes (struct stdarg_info *si, tree lhs, tree rhs) } if (va_list_counter_bump (si, si->va_start_ap, lhs, true) - == (unsigned HOST_WIDE_INT) -1) + == HOST_WIDE_INT_M1U) { si->va_list_escapes = true; return; |