This is the mail archive of the gcc@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: Problem with reloading in a new backend...


Le mercredi 09 avril 2008 Ã 12:41 -0400, DJ Delorie a Ãcrit :
> >         switch (which_alternative) {
> >         case 0:                         /* register to register */
> 
> Better to just use the @ syntax that gcc offers, to provide multiple
> patterns:
> 
> 	"@
> 	tfr %0,%1
> 	ldih %0, hi(%1); ldil %0, lo(%1)
> 	ldih %0, hi(%1); ldil %0, lo(%1)
> 	st %1,(%0)
> 	ld %0,(%1)"
> 
> Everything else should have been sorted out by the constraints.

Right.

> > This seems to work ok, but I still have issues at reload time, because
> > of the base register addressing mode: in the reload pass gcc generates
> > moves from/to the stack:
> 
> You might need to define LEGITIMIZE_RELOAD_ADDRESS, or at least
> LEGITIMIZE_ADDRESS.  I don't know if reload has assumptions about such
> offsets, but the m32c port has a limit on the offset range so it might
> help you figure out your port.

Ah, this looks exactly like what I needed, thanks!

I'll try this and come back afterwards.

-- 
Stelian Pop <stelian@popies.net>


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