Commit f7ce0951 by Steve Ellcey Committed by Steve Ellcey

function.c (instantiate_virtual_regs_in_insn): Copy to new reg before forcing mode.

2009-11-30  Steve Ellcey  <sje@cup.hp.com>
	    Jakub Jelinek <jakub@redhat.com>

	* function.c (instantiate_virtual_regs_in_insn): Copy to new reg
	before forcing mode.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r154843
parent d64728cf
2009-11-30 Steve Ellcey <sje@cup.hp.com>
Jakub Jelinek <jakub@redhat.com>
* function.c (instantiate_virtual_regs_in_insn): Copy to new reg
before forcing mode.
2009-11-30 Anatoly Sokolov <aesok@post.ru> 2009-11-30 Anatoly Sokolov <aesok@post.ru>
* config/sh/sh.c (sh_promote_prototypes): Make static. * config/sh/sh.c (sh_promote_prototypes): Make static.
...@@ -1598,7 +1598,13 @@ instantiate_virtual_regs_in_insn (rtx insn) ...@@ -1598,7 +1598,13 @@ instantiate_virtual_regs_in_insn (rtx insn)
if (!safe_insn_predicate (insn_code, i, x)) if (!safe_insn_predicate (insn_code, i, x))
{ {
start_sequence (); start_sequence ();
x = force_reg (insn_data[insn_code].operand[i].mode, x); if (REG_P (x))
{
gcc_assert (REGNO (x) <= LAST_VIRTUAL_REGISTER);
x = copy_to_reg (x);
}
else
x = force_reg (insn_data[insn_code].operand[i].mode, x);
seq = get_insns (); seq = get_insns ();
end_sequence (); end_sequence ();
if (seq) if (seq)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment