From 2f1cd2ebd65eae6d87332c0bcd5d0e840c886cf3 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 9 Sep 2013 13:06:53 +0000 Subject: asan.c (asan_clear_shadow): Use gen_int_mode with the mode of the associated expand_* call. gcc/ * asan.c (asan_clear_shadow): Use gen_int_mode with the mode of the associated expand_* call. (asan_emit_stack_protection): Likewise. * builtins.c (round_trampoline_addr): Likewise. * explow.c (allocate_dynamic_stack_space, probe_stack_range): Likewise. * expmed.c (expand_smod_pow2, expand_sdiv_pow2, expand_divmod) (emit_store_flag): Likewise. * expr.c (emit_move_resolve_push, push_block, emit_single_push_insn_1) (emit_push_insn, optimize_bitfield_assignment_op, expand_expr_real_1): Likewise. * function.c (instantiate_virtual_regs_in_insn): Likewise. * ifcvt.c (noce_try_store_flag_constants): Likewise. * loop-unroll.c (unroll_loop_runtime_iterations): Likewise. * modulo-sched.c (generate_prolog_epilog): Likewise. * optabs.c (expand_binop, widen_leading, expand_doubleword_clz) (expand_ctz, expand_ffs, expand_unop): Likewise. From-SVN: r202392 --- gcc/expr.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'gcc/expr.c') diff --git a/gcc/expr.c b/gcc/expr.c index dfe5b3f..89bd49a 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -3132,7 +3132,7 @@ emit_move_resolve_push (enum machine_mode mode, rtx x) /* Do not use anti_adjust_stack, since we don't want to update stack_pointer_delta. */ temp = expand_simple_binop (Pmode, PLUS, stack_pointer_rtx, - GEN_INT (adjust), stack_pointer_rtx, + gen_int_mode (adjust, Pmode), stack_pointer_rtx, 0, OPTAB_LIB_WIDEN); if (temp != stack_pointer_rtx) emit_move_insn (stack_pointer_rtx, temp); @@ -3643,7 +3643,8 @@ push_block (rtx size, int extra, int below) { temp = copy_to_mode_reg (Pmode, size); if (extra != 0) - temp = expand_binop (Pmode, add_optab, temp, GEN_INT (extra), + temp = expand_binop (Pmode, add_optab, temp, + gen_int_mode (extra, Pmode), temp, 0, OPTAB_LIB_WIDEN); anti_adjust_stack (temp); } @@ -3911,7 +3912,7 @@ emit_single_push_insn_1 (enum machine_mode mode, rtx x, tree type) add_optab, #endif stack_pointer_rtx, - GEN_INT (rounded_size), + gen_int_mode (rounded_size, Pmode), NULL_RTX, 0, OPTAB_LIB_WIDEN)); offset = (HOST_WIDE_INT) padding_size; @@ -4127,8 +4128,8 @@ emit_push_insn (rtx x, enum machine_mode mode, tree type, rtx size, size = GEN_INT (INTVAL (size) - used); else size = expand_binop (GET_MODE (size), sub_optab, size, - GEN_INT (used), NULL_RTX, 0, - OPTAB_LIB_WIDEN); + gen_int_mode (used, GET_MODE (size)), + NULL_RTX, 0, OPTAB_LIB_WIDEN); } /* Get the address of the stack space. @@ -4475,7 +4476,8 @@ optimize_bitfield_assignment_op (unsigned HOST_WIDE_INT bitsize, binop = code == BIT_IOR_EXPR ? ior_optab : xor_optab; if (bitpos + bitsize != str_bitsize) { - rtx mask = GEN_INT (((unsigned HOST_WIDE_INT) 1 << bitsize) - 1); + rtx mask = gen_int_mode (((unsigned HOST_WIDE_INT) 1 << bitsize) - 1, + str_mode); value = expand_and (str_mode, value, mask, NULL_RTX); } value = expand_shift (LSHIFT_EXPR, str_mode, value, bitpos, NULL_RTX, 1); @@ -9857,7 +9859,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, if (TYPE_UNSIGNED (TREE_TYPE (field))) { - op1 = GEN_INT (((HOST_WIDE_INT) 1 << bitsize) - 1); + op1 = gen_int_mode (((HOST_WIDE_INT) 1 << bitsize) - 1, + imode); op0 = expand_and (imode, op0, op1, target); } else -- cgit v1.1