(find_reloads_address): Redo last change: copy the mem

in the same way it's usually done.

From-SVN: r2503
This commit is contained in:
Richard Stallman 1992-10-18 00:49:34 +00:00
parent 4006fe4f1b
commit ca3e4a2f2d
1 changed files with 7 additions and 1 deletions

View File

@ -3633,7 +3633,13 @@ find_reloads_address (mode, memrefloc, ad, loc, operand, ind_levels)
/* If tem was changed, then we must create a new memory reference to
hold it and store it back into memrefloc. */
if (tem != ad && memrefloc)
*memrefloc = gen_rtx (MEM, GET_MODE (*memrefloc), tem);
{
rtx oldref = *memrefloc;
*memrefloc = copy_rtx (*memrefloc);
loc = &XEXP (*memrefloc, 0);
if (operand == oldref)
operand = *memrefloc;
}
/* Check similar cases as for indirect addresses as above except
that we can allow pseudos and a MEM since they should have been