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 <[EMAIL PROTECTED]>

Reply via email to