Commit 582be0a1 by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

cris.c (cris_address_cost): For a PLUS, swap tem1 and tem2 if tem1 is not a REG or MULT.

	* config/cris/cris.c (cris_address_cost): For a PLUS, swap tem1
	and tem2 if tem1 is not a REG or MULT.

From-SVN: r134088
parent 38173d38
2008-04-08 Hans-Peter Nilsson <hp@axis.com>
* config/cris/cris.c (cris_address_cost): For a PLUS, swap tem1
and tem2 if tem1 is not a REG or MULT.
2008-04-08 Jan Hubicka <jh@suse.cz> 2008-04-08 Jan Hubicka <jh@suse.cz>
* function.h (incomming_args): Break out of struct function. * function.h (incomming_args): Break out of struct function.
......
...@@ -1883,7 +1883,12 @@ cris_address_cost (rtx x) ...@@ -1883,7 +1883,12 @@ cris_address_cost (rtx x)
rtx tem1 = XEXP (x, 0); rtx tem1 = XEXP (x, 0);
rtx tem2 = XEXP (x, 1); rtx tem2 = XEXP (x, 1);
/* We'll "assume" canonical RTX. */ /* Local extended canonicalization rule: the first operand must
be REG, unless it's an operation (MULT). */
if (!REG_P (tem1) && GET_CODE (tem1) != MULT)
tem1 = tem2, tem2 = XEXP (x, 0);
/* We'll "assume" we have canonical RTX now. */
gcc_assert (REG_P (tem1) || GET_CODE (tem1) == MULT); gcc_assert (REG_P (tem1) || GET_CODE (tem1) == MULT);
/* A BIAP is 2 extra bytes for the prefix insn, nothing more. We /* A BIAP is 2 extra bytes for the prefix insn, nothing more. We
......
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