This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Adding soft-registers
- From: Stephane Carrez <stcarrez at nerim dot fr>
- To: James Dessart <james at skwirl dot ca>
- Cc: Eric Botcazou <ebotcazou at libertysurf dot fr>, gcc at gcc dot gnu dot org
- Date: Thu, 08 Jan 2004 21:00:53 +0100
- Subject: Re: Adding soft-registers
- References: <C9C03961-3ADC-11D8-82CB-003065E07450@skwirl.ca> <005801c3cefb$39f0c760$6f9253d4@fr> <F2FD920A-3AF3-11D8-82CB-003065E07450@skwirl.ca> <200401071951.28820.ebotcazou@libertysurf.fr> <9F2F44A8-4189-11D8-93FA-003065E07450@skwirl.ca>
Hi!
James Dessart wrote:
On 7-Jan-04, at 1:51 PM, Eric Botcazou wrote:
The MC6809 back-end appears to use a "looseness" strategy to avoid
generating
lots of memory references during RTL expansion and to expect that reload
will fix up everything at the end. This doesn't work here because the
subqi3 pattern is not commutative.
Thanks! This seems to fix up the problem with the compiler. I'll run
it through its paces when I get a chance.
What I would like to do, though, is add some soft registers to the
port. Others are interested in using the port for floating point, with
soft floating point support, but none of us have the knowledge to add
the required extra registers. I tried reading the gccint documents, but
they're really just a reference to what's there. I tried using the
mc68hc11 port (which has soft registers) to see how to do it, but I got
lost between the piles of related macros, the C implementation and the
machine description. Is there a howto somewhere?
Thanks,
James
FYI the 6809 is intermediate between 68HC11 and 68HC12: same regs,
same instruction set, same addressing modes as HC11 + restricted auto increment
mode (restricted compared to HC12). My feeling is that you should
be able to steal the hole hc11 port and hack it to your needs (and pretend
it is an HC12 as the 6809 is closer to it then to HC11; except for movXXX patterns:-) ).
I don't have a document that explains the particular implementation of m68hc11
port. Check http://stephane.carrez.free.fr/doc/hc11_3.html#SEC17 to see
how the soft regs are mapped and .... use the source James...
What is important for such soft reg is that they are in memory and as such
you have to be careful when you define your constraints. The movXXX must be
defined with care because you don't have a memory <-> memory move.
Stephane
--
Home Office
E-mail: stcarrez@nerim.fr Stephane.Carrez@solsoft.com
WWW: http://stcarrez.nerim.net http://www.solsoft.com
Free the Software! Security Policy Management