From c338f2e39da17e572e0661ad6a15c59bbfc4b529 Mon Sep 17 00:00:00 2001
From: rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 9 Sep 2013 13:06:43 +0000
Subject: gcc/ 	* alias.c (addr_side_effect_eval): Use gen_int_mode with the
 mode 	of the associated gen_rtx_* call. 	* caller-save.c
 (init_caller_save): Likewise. 	* combine.c (find_split_point,
 make_extraction): Likewise. 	(make_compound_operation): Likewise. 	*
 dwarf2out.c (mem_loc_descriptor): Likewise. 	* explow.c (plus_constant,
 probe_stack_range): Likewise. 	* expmed.c (expand_mult_const): Likewise. 
 * expr.c (emit_single_push_insn_1, do_tablejump): Likewise. 	* reload1.c
 (init_reload): Likewise. 	* valtrack.c (cleanup_auto_inc_dec): Likewise.
 	* var-tracking.c (adjust_mems): Likewise. 	* modulo-sched.c
 (sms_schedule): Likewise, but use gen_rtx_GT 	rather than gen_rtx_fmt_ee.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202391 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/explow.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'gcc/explow.c')

diff --git a/gcc/explow.c b/gcc/explow.c
index 7da8bc75f19..a69240da40e 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -186,7 +186,7 @@ plus_constant (enum machine_mode mode, rtx x, HOST_WIDE_INT c)
     }
 
   if (c != 0)
-    x = gen_rtx_PLUS (mode, x, GEN_INT (c));
+    x = gen_rtx_PLUS (mode, x, gen_int_mode (c, mode));
 
   if (GET_CODE (x) == SYMBOL_REF || GET_CODE (x) == LABEL_REF)
     return x;
@@ -1641,7 +1641,8 @@ probe_stack_range (HOST_WIDE_INT first, rtx size)
       /* TEST_ADDR = SP + FIRST.  */
       test_addr = force_operand (gen_rtx_fmt_ee (STACK_GROW_OP, Pmode,
 					 	 stack_pointer_rtx,
-					 	 GEN_INT (first)), NULL_RTX);
+						 gen_int_mode (first, Pmode)),
+				 NULL_RTX);
 
       /* LAST_ADDR = SP + FIRST + ROUNDED_SIZE.  */
       last_addr = force_operand (gen_rtx_fmt_ee (STACK_GROW_OP, Pmode,
-- 
cgit v1.2.1


From 0359f9f53a70edeb0517316df82971dec738dc5c Mon Sep 17 00:00:00 2001
From: rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 9 Sep 2013 13:06:53 +0000
Subject: 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202392 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/explow.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

(limited to 'gcc/explow.c')

diff --git a/gcc/explow.c b/gcc/explow.c
index a69240da40e..0ae5ee05da4 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -1355,7 +1355,8 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
       else
 	{
 	  ask = expand_binop (Pmode, add_optab, size,
-			      GEN_INT (required_align / BITS_PER_UNIT - 1),
+			      gen_int_mode (required_align / BITS_PER_UNIT - 1,
+					    Pmode),
 			      NULL_RTX, 1, OPTAB_LIB_WIDEN);
 	  must_align = true;
 	}
@@ -1481,13 +1482,16 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align,
 	 but we know it can't.  So add ourselves and then do
 	 TRUNC_DIV_EXPR.  */
       target = expand_binop (Pmode, add_optab, target,
-			     GEN_INT (required_align / BITS_PER_UNIT - 1),
+			     gen_int_mode (required_align / BITS_PER_UNIT - 1,
+					   Pmode),
 			     NULL_RTX, 1, OPTAB_LIB_WIDEN);
       target = expand_divmod (0, TRUNC_DIV_EXPR, Pmode, target,
-			      GEN_INT (required_align / BITS_PER_UNIT),
+			      gen_int_mode (required_align / BITS_PER_UNIT,
+					    Pmode),
 			      NULL_RTX, 1);
       target = expand_mult (Pmode, target,
-			    GEN_INT (required_align / BITS_PER_UNIT),
+			    gen_int_mode (required_align / BITS_PER_UNIT,
+					  Pmode),
 			    NULL_RTX, 1);
     }
 
@@ -1669,7 +1673,7 @@ probe_stack_range (HOST_WIDE_INT first, rtx size)
 
       /* TEST_ADDR = TEST_ADDR + PROBE_INTERVAL.  */
       temp = expand_binop (Pmode, STACK_GROW_OPTAB, test_addr,
-			   GEN_INT (PROBE_INTERVAL), test_addr,
+			   gen_int_mode (PROBE_INTERVAL, Pmode), test_addr,
 			   1, OPTAB_WIDEN);
 
       gcc_assert (temp == test_addr);
-- 
cgit v1.2.1


From 5d5ee71fdce406c03f481463c65c5c347005551e Mon Sep 17 00:00:00 2001
From: rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 9 Sep 2013 13:07:02 +0000
Subject: gcc/ 	* combine.c (simplify_set, expand_field_assignment,
 extract_left_shift) 	(force_to_mode, simplify_shift_const_1,
 simplify_comparison): 	Use gen_int_mode with the mode of the associated
 simplify_* call. 	* explow.c (probe_stack_range,
 anti_adjust_stack_and_probe): Likewise. 	* expmed.c (expand_shift_1):
 Likewise. 	* function.c (instantiate_virtual_regs_in_insn): Likewise. 
 * loop-iv.c (iv_number_of_iterations): Likewise. 	* loop-unroll.c
 (unroll_loop_runtime_iterations): Likewise. 	* simplify-rtx.c
 (simplify_binary_operation_1): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202393 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/explow.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'gcc/explow.c')

diff --git a/gcc/explow.c b/gcc/explow.c
index 0ae5ee05da4..f278e29b78e 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -1636,7 +1636,8 @@ probe_stack_range (HOST_WIDE_INT first, rtx size)
 
       /* ROUNDED_SIZE = SIZE & -PROBE_INTERVAL  */
       rounded_size
-	= simplify_gen_binary (AND, Pmode, size, GEN_INT (-PROBE_INTERVAL));
+	= simplify_gen_binary (AND, Pmode, size,
+			       gen_int_mode (-PROBE_INTERVAL, Pmode));
       rounded_size_op = force_operand (rounded_size, NULL_RTX);
 
 
@@ -1780,7 +1781,8 @@ anti_adjust_stack_and_probe (rtx size, bool adjust_back)
 
       /* ROUNDED_SIZE = SIZE & -PROBE_INTERVAL  */
       rounded_size
-	= simplify_gen_binary (AND, Pmode, size, GEN_INT (-PROBE_INTERVAL));
+	= simplify_gen_binary (AND, Pmode, size,
+			       gen_int_mode (-PROBE_INTERVAL, Pmode));
       rounded_size_op = force_operand (rounded_size, NULL_RTX);
 
 
-- 
cgit v1.2.1