expr.c (expand_increment): When enqueing a postincrement for a MEM...

* expr.c (expand_increment): When enqueing a postincrement for a MEM,
	use copy_to_reg if address is not a general_operand.

From-SVN: r16247
This commit is contained in:
J"orn Rennecke 1997-10-31 00:40:46 +00:00 committed by Joern Rennecke
parent d1271dedce
commit 59fe8c2c20
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Fri Oct 31 00:34:55 1996 J"orn Rennecke <amylaar@cygnus.co.uk>
* expr.c (expand_increment): When enqueing a postincrement for a MEM,
use copy_to_reg if address is not a general_operand.
Fri Oct 31 00:16:55 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
* profile.c (output_func_start_profiler): Clear flag_inline_functions

View File

@ -9847,7 +9847,9 @@ expand_increment (exp, post, ignore)
}
if (icode != (int) CODE_FOR_nothing && GET_CODE (op0) == MEM)
{
rtx addr = force_reg (Pmode, XEXP (op0, 0));
rtx addr = (general_operand (XEXP (op0, 0), mode)
? force_reg (Pmode, XEXP (op0, 0))
: copy_to_reg (XEXP (op0, 0)));
rtx temp, result;
op0 = change_address (op0, VOIDmode, addr);