This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 13722 candidate fix
Richard Henderson <rth@redhat.com> writes:
> On Thu, Jan 22, 2004 at 11:43:40PM -0800, Zack Weinberg wrote:
>> + out[0] = adjust_automodify_address
>> + (in, DImode, gen_rtx_POST_INC (Pmode, base), 0);
>> +
>> + if (GET_CODE (XEXP (offset, 1)) == REG)
>> + {
>> + rtx reg = XEXP (offset, 1);
>> + /* Tweak the index register, then emit the first move as
>> + a POST_INC and the second as the original POST_MODIFY. */
>> + emit_insn (GEN_FCN (add_optab->handlers[GET_MODE (reg)].insn_code)
>> + (reg, reg, GEN_INT (-8)));
>
> You can't modify the POST_MODIFY operand.
> You need to modify the address register a third time, ie.
Duh, because the index register value might be needed again. This
isn't true for constant POST_MODIFY, though, right?
(Gets me out of having to dig around in add_optab, though, yay.)
zw