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: Adding soft-registers


On Thu, 8 Jan 2004, James Dessart wrote:

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

It sounds like the 6809 direct page differs from the 65816 direct page
because the 65816 direct page is settable on a byte boundary. This allowed
it be used as the frame pointer, and we generally accessed the locals on
the stack via the direct page.

It sounds like, in your case, you will need to use an indexed absolute
addressing mode to access your soft registers.

Toshi



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