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...


>         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.

> 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.


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