This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with reloading in a new backend...
- From: DJ Delorie <dj at redhat dot com>
- To: Stelian Pop <stelian at popies dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 9 Apr 2008 12:41:20 -0400
- Subject: Re: Problem with reloading in a new backend...
- References: <1207687468.5532.44.camel@galileo> <xn63usqcwh.fsf@greed.delorie.com> <1207690955.16640.1.camel@voyager.dsnet> <200804082224.m38MOP3R003161@greed.delorie.com> <1207758006.6264.60.camel@galileo>
> 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.