asan.c (asan_emit_stack_protection): Use gen_int_mode instead of GEN_INT.

gcc/
	* asan.c (asan_emit_stack_protection): Use gen_int_mode instead of
	GEN_INT.
	* builtins.c (expand_errno_check): Likewise.
	* dwarf2cfi.c (init_return_column_size): Likewise.
	* except.c (sjlj_mark_call_sites): Likewise.
	* expr.c (move_by_pieces_1, store_by_pieces_2): Likewise.
	* lra-constraints.c (emit_inc): Likewise.
	* ree.c (combine_set_extension): Likewise.
	* regmove.c (fixup_match_2): Likewise.
	* reload1.c (inc_for_reload): Likewise.

From-SVN: r202394
This commit is contained in:
Richard Sandiford 2013-09-09 13:07:10 +00:00 committed by Richard Sandiford
parent 69a59f0fa9
commit 69db2d57a3
10 changed files with 44 additions and 14 deletions

View File

@ -1,3 +1,16 @@
2013-09-09 Richard Sandiford <rdsandiford@googlemail.com>
* asan.c (asan_emit_stack_protection): Use gen_int_mode instead of
GEN_INT.
* builtins.c (expand_errno_check): Likewise.
* dwarf2cfi.c (init_return_column_size): Likewise.
* except.c (sjlj_mark_call_sites): Likewise.
* expr.c (move_by_pieces_1, store_by_pieces_2): Likewise.
* lra-constraints.c (emit_inc): Likewise.
* ree.c (combine_set_extension): Likewise.
* regmove.c (fixup_match_2): Likewise.
* reload1.c (inc_for_reload): Likewise.
2013-09-09 Richard Sandiford <rdsandiford@googlemail.com>
* combine.c (simplify_set, expand_field_assignment, extract_left_shift)

View File

@ -970,7 +970,7 @@ asan_emit_stack_protection (rtx base, HOST_WIDE_INT *offsets, tree *decls,
gen_int_mode (base_offset, Pmode),
NULL_RTX, 1, OPTAB_DIRECT);
mem = gen_rtx_MEM (ptr_mode, base);
emit_move_insn (mem, GEN_INT (ASAN_STACK_FRAME_MAGIC));
emit_move_insn (mem, gen_int_mode (ASAN_STACK_FRAME_MAGIC, ptr_mode));
mem = adjust_address (mem, VOIDmode, GET_MODE_SIZE (ptr_mode));
emit_move_insn (mem, expand_normal (str_cst));
shadow_base = expand_binop (Pmode, lshr_optab, base,

View File

@ -1967,7 +1967,8 @@ expand_errno_check (tree exp, rtx target)
rtx errno_rtx
= gen_rtx_MEM (word_mode, gen_rtx_SYMBOL_REF (Pmode, "errno"));
#endif
emit_move_insn (errno_rtx, GEN_INT (TARGET_EDOM));
emit_move_insn (errno_rtx,
gen_int_mode (TARGET_EDOM, GET_MODE (errno_rtx)));
emit_label (lab);
return;
}

View File

@ -246,7 +246,8 @@ init_return_column_size (enum machine_mode mode, rtx mem, unsigned int c)
{
HOST_WIDE_INT offset = c * GET_MODE_SIZE (mode);
HOST_WIDE_INT size = GET_MODE_SIZE (Pmode);
emit_move_insn (adjust_address (mem, mode, offset), GEN_INT (size));
emit_move_insn (adjust_address (mem, mode, offset),
gen_int_mode (size, mode));
}
/* Generate code to initialize the register size table. */

View File

@ -1156,7 +1156,7 @@ sjlj_mark_call_sites (void)
start_sequence ();
mem = adjust_address (crtl->eh.sjlj_fc, TYPE_MODE (integer_type_node),
sjlj_fc_call_site_ofs);
emit_move_insn (mem, GEN_INT (this_call_site));
emit_move_insn (mem, gen_int_mode (this_call_site, GET_MODE (mem)));
p = get_insns ();
end_sequence ();

View File

@ -1071,10 +1071,12 @@ move_by_pieces_1 (insn_gen_fn genfun, machine_mode mode,
if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
emit_insn (gen_add2_insn (data->to_addr,
GEN_INT (-(HOST_WIDE_INT)size)));
gen_int_mode (-(HOST_WIDE_INT) size,
GET_MODE (data->to_addr))));
if (HAVE_PRE_DECREMENT && data->explicit_inc_from < 0)
emit_insn (gen_add2_insn (data->from_addr,
GEN_INT (-(HOST_WIDE_INT)size)));
gen_int_mode (-(HOST_WIDE_INT) size,
GET_MODE (data->from_addr))));
if (data->to)
emit_insn ((*genfun) (to1, from1));
@ -1088,9 +1090,13 @@ move_by_pieces_1 (insn_gen_fn genfun, machine_mode mode,
}
if (HAVE_POST_INCREMENT && data->explicit_inc_to > 0)
emit_insn (gen_add2_insn (data->to_addr, GEN_INT (size)));
emit_insn (gen_add2_insn (data->to_addr,
gen_int_mode (size,
GET_MODE (data->to_addr))));
if (HAVE_POST_INCREMENT && data->explicit_inc_from > 0)
emit_insn (gen_add2_insn (data->from_addr, GEN_INT (size)));
emit_insn (gen_add2_insn (data->from_addr,
gen_int_mode (size,
GET_MODE (data->from_addr))));
if (! data->reverse)
data->offset += size;
@ -2676,13 +2682,16 @@ store_by_pieces_2 (insn_gen_fn genfun, machine_mode mode,
if (HAVE_PRE_DECREMENT && data->explicit_inc_to < 0)
emit_insn (gen_add2_insn (data->to_addr,
GEN_INT (-(HOST_WIDE_INT) size)));
gen_int_mode (-(HOST_WIDE_INT) size,
GET_MODE (data->to_addr))));
cst = (*data->constfun) (data->constfundata, data->offset, mode);
emit_insn ((*genfun) (to1, cst));
if (HAVE_POST_INCREMENT && data->explicit_inc_to > 0)
emit_insn (gen_add2_insn (data->to_addr, GEN_INT (size)));
emit_insn (gen_add2_insn (data->to_addr,
gen_int_mode (size,
GET_MODE (data->to_addr))));
if (! data->reverse)
data->offset += size;

View File

@ -2837,7 +2837,9 @@ emit_inc (enum reg_class new_rclass, rtx in, rtx value, int inc_amount)
if (plus_p)
{
if (CONST_INT_P (inc))
emit_insn (gen_add2_insn (result, GEN_INT (-INTVAL (inc))));
emit_insn (gen_add2_insn (result,
gen_int_mode (-INTVAL (inc),
GET_MODE (result))));
else
emit_insn (gen_sub2_insn (result, inc));
}

View File

@ -298,7 +298,8 @@ combine_set_extension (ext_cand *cand, rtx curr_insn, rtx *orig_set)
the source mode. */
enum machine_mode src_mode = GET_MODE (SET_DEST (*orig_set));
rtx new_const_int
= GEN_INT (INTVAL (orig_src) & GET_MODE_MASK (src_mode));
= gen_int_mode (INTVAL (orig_src) & GET_MODE_MASK (src_mode),
GET_MODE (new_reg));
new_set = gen_rtx_SET (VOIDmode, new_reg, new_const_int);
}
}

View File

@ -786,7 +786,8 @@ fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset)
{
HOST_WIDE_INT newconst
= INTVAL (offset) - INTVAL (XEXP (SET_SRC (pset), 1));
rtx add = gen_add3_insn (dst, dst, GEN_INT (newconst));
rtx add = gen_add3_insn (dst, dst,
gen_int_mode (newconst, GET_MODE (dst)));
if (add && validate_change (insn, &PATTERN (insn), add, 0))
{

View File

@ -9157,7 +9157,9 @@ inc_for_reload (rtx reloadreg, rtx in, rtx value, int inc_amount)
emit_insn (gen_add2_insn (reloadreg, inc));
emit_insn (gen_move_insn (incloc, reloadreg));
if (CONST_INT_P (inc))
emit_insn (gen_add2_insn (reloadreg, GEN_INT (-INTVAL (inc))));
emit_insn (gen_add2_insn (reloadreg,
gen_int_mode (-INTVAL (inc),
GET_MODE (reloadreg))));
else
emit_insn (gen_sub2_insn (reloadreg, inc));
}