This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Reload problems with only one base reg for "base + offset" addressing mode
- From: Denis Chertykov <chertykov at gmail dot com>
- To: redriver jiang <jiang dot redriver at gmail dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, gcc at gcc dot gnu dot org
- Date: Sun, 1 Aug 2010 21:11:21 +0400
- Subject: Re: Reload problems with only one base reg for "base + offset" addressing mode
- References: <AANLkTin69C0-qfmHY_JZReacxhxXv0GPLoOzcbyUQvLq@mail.gmail.com> <mcr4ofufcn1.fsf@google.com> <AANLkTinPyHdoEwwm4oGhnJA_rxVyTg-eUgDWVFwIOAUG@mail.gmail.com> <mcreieufwl9.fsf@google.com> <AANLkTikYUL91ufdnbg=BnK+qW3C-Y344En_9hVr8ydK3@mail.gmail.com> <mcr6303uzx7.fsf@google.com> <AANLkTimPiU_b7drxBjtJJzkUmYFzO6d0BOMrABFOcJ1A@mail.gmail.com> <AANLkTik9i0qZSd-Qpe-_21i9K_C_g37UHK65NzwNDFrS@mail.gmail.com> <AANLkTimTDEnd+4CH6zK18BxiGWJcJRCdGt8hgq0e9=Nc@mail.gmail.com>
2010/8/1 redriver jiang <jiang.redriver@gmail.com>:
> Hi Denis,
>
> I read the "out_movqi_r_mr" code of the AVR port. I see that following
> exception are
>
> handled:
>
> 1. "REG_X+offset", which is not supported by AVR.
> 2. "REGY+offset", with offset larger than 63, which is not supported by AVR.
>
> Seems reload can not handle the targets that has some base regs are
> offsetable, and some can't.
IMHO reload can't handle small number of pointer regs with small
offsets only in very rare cases.
Also, look at avr.h: BASE_REG_CLASS definition.
My main idea was to disable infinite offsets in addressing (and
REG_X+offset) as long as possible.
But, if wrong addressing occurs then I have to emulate it.
Look at avr.h: LEGITIMIZE_RELOAD_ADDRESS it's not easy to understand
Denis.