Commit 1c6b1021 by DJ Delorie Committed by DJ Delorie

rl78.c (rl78_alloc_physical_registers): Check for SET before extracting SET_SRC.

* config/rl78/rl78.c (rl78_alloc_physical_registers): Check for
SET before extracting SET_SRC.
(rl78_remove_unused_sets): Check for REG before extractnig REGNO.

From-SVN: r190278
parent 23459cbe
2012-08-09 DJ Delorie <dj@redhat.com>
* config/rl78/rl78.c (rl78_alloc_physical_registers): Check for
SET before extracting SET_SRC.
(rl78_remove_unused_sets): Check for REG before extractnig REGNO.
2012-08-09 Oleg Endo <olegendo@gcc.gnu.org>
PR target/54089
......
......@@ -2217,7 +2217,8 @@ rl78_alloc_physical_registers (void)
&& GET_CODE (PATTERN (insn)) != CALL)
continue;
if (GET_CODE (SET_SRC (PATTERN (insn))) == ASM_OPERANDS)
if (GET_CODE (PATTERN (insn)) == SET
&& GET_CODE (SET_SRC (PATTERN (insn))) == ASM_OPERANDS)
continue;
valloc_method = get_attr_valloc (insn);
......@@ -2644,7 +2645,7 @@ rl78_remove_unused_sets (void)
dest = SET_DEST (insn);
if (REGNO (dest) > 23)
if (GET_CODE (dest) != REG || REGNO (dest) > 23)
continue;
if (find_regno_note (insn, REG_UNUSED, REGNO (dest)))
......
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