This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCHv2, RFA] Pass address space to REGNO_MODE_CODE_OK_FOR_BASE_P


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]