This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Adding soft-registers
- From: James Dessart <james at skwirl dot ca>
- To: Stephane Carrez <stcarrez at nerim dot fr>
- Cc: Eric Botcazou <ebotcazou at libertysurf dot fr>, gcc at gcc dot gnu dot org
- Date: Thu, 8 Jan 2004 16:28:02 -0500 (EST)
- Subject: Re: Adding soft-registers
On Thu, 8 Jan 2004, Stephane Carrez wrote:
> 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:-) ).
There is a difference, a rather big one, in the direct mode. The HC11 and
HC12s only address page 0. The 6809 has a register to configure which 256
byte page that the direct mode points at. As a result, two machines which
I know of that use the 6809 (the TRS-80 Color Computer series and the
Thomson series from France) both have content in page 0 in a normal
configuration, that the application may want to access.
So the page 0 implementation that those ports use is limited. What would
be nice is a run-time configured page that contains the registers. The
direct page register could be configured in the runtime, and the compiled
code wouldn't know the difference. The problem is that the segment that
would be used would need to be on a page boundary... I'm not sure the
assembler or linker are properly set up to do that sort of thing in a
memory-efficient way. What do you think, Eric? Other than me, you're
probably the one who's played with those tools the most, and perhaps the
author. :)
James