Commit 47069ecb by Richard Henderson Committed by Richard Henderson

* recog.c (constrain_operands): Validate mem operands.

From-SVN: r75624
parent c31d56ed
2004-01-09 Richard Henderson <rth@redhat.com>
* recog.c (constrain_operands): Validate mem operands.
2004-01-09 James E Wilson <wilson@specifixinc.com> 2004-01-09 James E Wilson <wilson@specifixinc.com>
* gcc.c (init_spec): Remove -lunwind from shared case. * gcc.c (init_spec): Remove -lunwind from shared case.
......
...@@ -2445,12 +2445,25 @@ constrain_operands (int strict) ...@@ -2445,12 +2445,25 @@ constrain_operands (int strict)
break; break;
case 'm': case 'm':
if (GET_CODE (op) == MEM /* Memory operands must be valid, to the extent
required by STRICT. */
if (GET_CODE (op) == MEM)
{
if (strict > 0
&& !strict_memory_address_p (GET_MODE (op),
XEXP (op, 0)))
break;
if (strict == 0
&& !memory_address_p (GET_MODE (op), XEXP (op, 0)))
break;
win = 1;
}
/* Before reload, accept what reload can turn into mem. */ /* Before reload, accept what reload can turn into mem. */
|| (strict < 0 && CONSTANT_P (op)) else if (strict < 0 && CONSTANT_P (op))
win = 1;
/* During reload, accept a pseudo */ /* During reload, accept a pseudo */
|| (reload_in_progress && GET_CODE (op) == REG else if (reload_in_progress && GET_CODE (op) == REG
&& REGNO (op) >= FIRST_PSEUDO_REGISTER)) && REGNO (op) >= FIRST_PSEUDO_REGISTER)
win = 1; win = 1;
break; break;
......
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