This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCHv2, RFA] Pass address space to REGNO_MODE_CODE_OK_FOR_BASE_P
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Fri, 21 Oct 2011 14:34:30 +0200
- Subject: Re: [PATCHv2, RFA] Pass address space to REGNO_MODE_CODE_OK_FOR_BASE_P
- References: <201110201512.p9KFCjr7016171@d06av02.portsmouth.uk.ibm.com>
Ulrich Weigand schrieb:
> Georg-Johann Lay wrote:
>> Ulrich Weigand schrieb:
>>> Hello,
>>>
>>> Georg-Johann Lay has proposed a patch to add named address space support
>>> to the AVR target here:
>>> http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00471.html
>>>
>>> Since the target needs to make register allocation decisions for
>>> address base registers depending on the target address space, a
>>> prerequiste for this is a patch of mine that I posted a while ago
>>> to add the address space to the MODE_CODE_BASE_REG_CLASS and
>>> REGNO_MODE_CODE_OK_FOR_BASE_P target macros.
>>>
>>> I've updated the patch for current mainline and re-tested on SPU
>>> with no regressions.
>> Meanwhile, there was some code clean-up to avr backend. Would you add this?
And there is the following lines in reload.c:
#ifdef LEGITIMIZE_RELOAD_ADDRESS
do
{
if (memrefloc && ADDR_SPACE_GENERIC_P (as))
{
LEGITIMIZE_RELOAD_ADDRESS (ad, GET_MODE (*memrefloc), opnum, type,
ind_levels, win);
}
break;
win:
*memrefloc = copy_rtx (*memrefloc);
XEXP (*memrefloc, 0) = ad;
move_replacements (&ad, &XEXP (*memrefloc, 0));
return -1;
}
while (0);
#endif
Does it make sense to extend LEGITIMIZE_RELOAD_ADDRESS, too?
For the target that needs your extension (AVR) there are different addressing
capabilities depending on AS and there is an implementation of L_R_A.
Johann