Commit 3ba2436a by Ulrich Weigand Committed by Ulrich Weigand

recog.c (constrain_operands): Prefer exact match over reloadable EXTRA_MEMORY_CONSTRAINT or...

	* recog.c (constrain_operands): Prefer exact match over reloadable
	EXTRA_MEMORY_CONSTRAINT or EXTRA_ADDRESS_CONSTRAINT.

	* reload.c (find_reloads): Always reload EXTRA_ADDRESS_CONSTRAINT
	operands in Pmode.

From-SVN: r59308
parent 3ebb998e
2002-11-20 Ulrich Weigand <uweigand@de.ibm.com>
* recog.c (constrain_operands): Prefer exact match over reloadable
EXTRA_MEMORY_CONSTRAINT or EXTRA_ADDRESS_CONSTRAINT.
* reload.c (find_reloads): Always reload EXTRA_ADDRESS_CONSTRAINT
operands in Pmode.
2002-11-20 Eric Botcazou <ebotcazou@libertysurf.fr> 2002-11-20 Eric Botcazou <ebotcazou@libertysurf.fr>
PR c/8518 PR c/8518
......
...@@ -2628,23 +2628,23 @@ constrain_operands (strict) ...@@ -2628,23 +2628,23 @@ constrain_operands (strict)
if (EXTRA_MEMORY_CONSTRAINT (c)) if (EXTRA_MEMORY_CONSTRAINT (c))
{ {
/* Every memory operand can be reloaded to fit, /* Every memory operand can be reloaded to fit. */
so copy the condition from the 'm' case. */ if (strict < 0 && GET_CODE (op) == MEM)
if (GET_CODE (op) == MEM win = 1;
/* Before reload, accept what reload can turn into mem. */
|| (strict < 0 && CONSTANT_P (op)) /* Before reload, accept what reload can turn into mem. */
/* During reload, accept a pseudo */ if (strict < 0 && CONSTANT_P (op))
|| (reload_in_progress && GET_CODE (op) == REG win = 1;
&& REGNO (op) >= FIRST_PSEUDO_REGISTER))
/* During reload, accept a pseudo */
if (reload_in_progress && GET_CODE (op) == REG
&& REGNO (op) >= FIRST_PSEUDO_REGISTER)
win = 1; win = 1;
} }
if (EXTRA_ADDRESS_CONSTRAINT (c)) if (EXTRA_ADDRESS_CONSTRAINT (c))
{ {
/* Every address operand can be reloaded to fit, /* Every address operand can be reloaded to fit. */
so copy the condition from the 'p' case. */ if (strict < 0)
if (strict <= 0
|| (strict_memory_address_p (recog_data.operand_mode[opno],
op)))
win = 1; win = 1;
} }
#endif #endif
......
...@@ -3283,6 +3283,10 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) ...@@ -3283,6 +3283,10 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
the address into a base register. */ the address into a base register. */
this_alternative[i] = (int) MODE_BASE_REG_CLASS (VOIDmode); this_alternative[i] = (int) MODE_BASE_REG_CLASS (VOIDmode);
badop = 0; badop = 0;
/* Address constraints are reloaded in Pmode, no matter
what mode is given in the machine description. */
operand_mode[i] = Pmode;
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