rl78.c (rl78_alloc_address_registers_macax): Verify op is a REG before checking REGNO.

* config/rl78/rl78.c (rl78_alloc_address_registers_macax): Verify
op is a REG before checking REGNO.
(rl78_alloc_physical_registers): Verify pattern is a SET before
checking SET_SRC.

From-SVN: r203733
This commit is contained in:
DJ Delorie 2013-10-16 18:55:34 -04:00 committed by DJ Delorie
parent 703344ca91
commit c71aed477a
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2013-10-16 DJ Delorie <dj@redhat.com>
* config/rl78/rl78.c (rl78_alloc_address_registers_macax): Verify
op is a REG before checking REGNO.
(rl78_alloc_physical_registers): Verify pattern is a SET before
checking SET_SRC.
2013-10-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc/config/rs6000/vector.md (vec_unpacks_hi_v4sf): Correct for

View File

@ -3050,7 +3050,8 @@ rl78_alloc_address_registers_macax (rtx insn)
OP (op) = transcode_memory_rtx (OP (op), HL, insn);
if (op == 2
&& MEM_P (OP (op))
&& (REGNO (XEXP (OP (op), 0)) == SP_REG
&& ((GET_CODE (XEXP (OP (op), 0)) == REG
&& REGNO (XEXP (OP (op), 0)) == SP_REG)
|| (GET_CODE (XEXP (OP (op), 0)) == PLUS
&& REGNO (XEXP (XEXP (OP (op), 0), 0)) == SP_REG)))
{
@ -3140,7 +3141,8 @@ rl78_alloc_physical_registers (void)
if (GET_CODE (pattern) != SET
&& GET_CODE (pattern) != CALL)
continue;
if (GET_CODE (SET_SRC (pattern)) == ASM_OPERANDS)
if (GET_CODE (pattern) == SET
&& GET_CODE (SET_SRC (pattern)) == ASM_OPERANDS)
continue;
valloc_method = get_attr_valloc (insn);