+2014-08-28 David Malcolm <dmalcolm@redhat.com>
+
+ * insn-addr.h (insn_addresses_new): Strengthen param "insn" from
+ rtx to rtx_insn *.
+ * config/s390/s390.c (s390_split_branches): Eliminate top-level
+ local rtx "tmp", in favor of new local rtx "mem" and rtx_insn *
+ "set_insn".
+ (s390_mainpool_finish): In three places, split out a local rtx
+ "insn" into a local rtx - "set" or "pat" - and a rtx_insn *
+ "insn". Strengthen local "pool_end" from rtx to rtx_code_label *
+ and split another local rtx "insn" out into rtx "pat" and
+ rtx_insn * "insn".
+ * config/sh/sh.c (output_branchy_insn): Rather than working
+ directly on operands[9], introduce local rtx_code_label *
+ variables named "lab" in two places, working on them, and then
+ assigning them to operands[9], so that the intervening operations
+ are known by the type system to be on insns.
+
2014-08-28 David Malcolm <dmalcolm@redhat.com>
* rtl.h (INSN_HAS_LOCATION): Strengthen param from const_rtx to
rtx temp_reg = gen_rtx_REG (Pmode, RETURN_REGNUM);
int new_literal = 0, ret;
rtx_insn *insn;
- rtx pat, tmp, target;
+ rtx pat, target;
rtx *label;
/* We need correct insn addresses. */
if (!flag_pic)
{
new_literal = 1;
- tmp = force_const_mem (Pmode, *label);
- tmp = emit_insn_before (gen_rtx_SET (Pmode, temp_reg, tmp), insn);
- INSN_ADDRESSES_NEW (tmp, -1);
- annotate_constant_pool_refs (&PATTERN (tmp));
+ rtx mem = force_const_mem (Pmode, *label);
+ rtx_insn *set_insn = emit_insn_before (gen_rtx_SET (Pmode, temp_reg, mem), insn);
+ INSN_ADDRESSES_NEW (set_insn, -1);
+ annotate_constant_pool_refs (&PATTERN (set_insn));
target = temp_reg;
}
UNSPEC_LTREL_OFFSET);
target = gen_rtx_CONST (Pmode, target);
target = force_const_mem (Pmode, target);
- tmp = emit_insn_before (gen_rtx_SET (Pmode, temp_reg, target), insn);
- INSN_ADDRESSES_NEW (tmp, -1);
- annotate_constant_pool_refs (&PATTERN (tmp));
+ rtx_insn *set_insn = emit_insn_before (gen_rtx_SET (Pmode, temp_reg, target), insn);
+ INSN_ADDRESSES_NEW (set_insn, -1);
+ annotate_constant_pool_refs (&PATTERN (set_insn));
target = gen_rtx_UNSPEC (Pmode, gen_rtvec (2, XEXP (target, 0),
cfun->machine->base_reg),
located in the .rodata section, so we emit it after the function. */
if (TARGET_CPU_ZARCH)
{
- rtx insn = gen_main_base_64 (base_reg, pool->label);
- insn = emit_insn_after (insn, pool->pool_insn);
+ rtx set = gen_main_base_64 (base_reg, pool->label);
+ rtx_insn *insn = emit_insn_after (set, pool->pool_insn);
INSN_ADDRESSES_NEW (insn, -1);
remove_insn (pool->pool_insn);
else if (INSN_ADDRESSES (INSN_UID (pool->emit_pool_after))
+ pool->size + 8 /* alignment slop */ < 4096)
{
- rtx insn = gen_main_base_31_small (base_reg, pool->label);
- insn = emit_insn_after (insn, pool->pool_insn);
+ rtx set = gen_main_base_31_small (base_reg, pool->label);
+ rtx_insn *insn = emit_insn_after (set, pool->pool_insn);
INSN_ADDRESSES_NEW (insn, -1);
remove_insn (pool->pool_insn);
over it, setting up the pool register at the same time. */
else
{
- rtx pool_end = gen_label_rtx ();
+ rtx_code_label *pool_end = gen_label_rtx ();
- rtx insn = gen_main_base_31_large (base_reg, pool->label, pool_end);
- insn = emit_jump_insn_after (insn, pool->pool_insn);
+ rtx pat = gen_main_base_31_large (base_reg, pool->label, pool_end);
+ rtx_insn *insn = emit_jump_insn_after (pat, pool->pool_insn);
JUMP_LABEL (insn) = pool_end;
INSN_ADDRESSES_NEW (insn, -1);
remove_insn (pool->pool_insn);
if (GET_CODE (src) == IF_THEN_ELSE && GET_CODE (XEXP (src, 0)) != code)
{
/* Following branch not taken */
- operands[9] = gen_label_rtx ();
- emit_label_after (operands[9], next_insn);
- INSN_ADDRESSES_NEW (operands[9],
+ rtx_code_label *lab = gen_label_rtx ();
+ emit_label_after (lab, next_insn);
+ INSN_ADDRESSES_NEW (lab,
INSN_ADDRESSES (INSN_UID (next_insn))
+ get_attr_length (next_insn));
+ operands[9] = lab;
return templ;
}
else
}
}
}
- operands[9] = gen_label_rtx ();
- emit_label_after (operands[9], insn);
- INSN_ADDRESSES_NEW (operands[9],
+ rtx_code_label *lab = gen_label_rtx ();
+ emit_label_after (lab, insn);
+ INSN_ADDRESSES_NEW (lab,
INSN_ADDRESSES (INSN_UID (insn))
+ get_attr_length (insn));
+ operands[9] = lab;
return templ;
}