working on a z80 port of gcc (target Rex-6000 microPDA)

Philip Dye phdye@darksleep.com
Thu Dec 13 14:56:00 GMT 2001


I've seen several references to people working a z80 port but no actual
progress.  I am working on it now.  I've been in contact with two people who
mentioned working on a port including one who posted that they had created a
machine description but neither had any information or files available.

My target system is the Rex 6000 microPDA.  I have some interesting ideas of
what could be done with the credit card pda given a good optimizing compiler
and gnu's very well designed set of binutils.

As a first cut, I am basing it largely on the m68hc11 implementation since
it seems to be the closest in architecture.  I wrote code for it years ago.
I am about perhaps a fourth of the way through the gcc port itself (as long
as the files under gcc/config/<machine> comprise a port).

My intention is to get gcc producing reasonable assembly code first then
work on binutils.  I'd certainly appreciate it if anyone else was interested
in taking over that part though.  And any who wants to help out on gcc would
also be appreciated.

Also, if anyone has any partially complete ports to the z80 or notes, such
would also be useful to review.

So far the work hasn't been particularly difficult, just time consuming,
much of it refreshing my knowlege in the area.  The large amount of
documentation certainly covers innumerable aspects and their exist dozens of
ports of course.  Unfortunately, for me at least, the documentation contains
too much detail and the ports not enough at all.  The ports in particular
detail what was done but rarely why a given value was chosen.  The recent
documents (I last delved into gcc in the early 90's) for m6811, avr, and
cris do help considerably and I must commend these contributors.  I well
agree with the Allan Alder's gcc book proposal for gcc though, particularily
in that the minimum characteristics to achieve a functioning port of gcc
should be detailed.  I am not concerned with completeness or performance in
a first cut.  I just want to acheive a minimal correct result so I can feel
confident that I have a basic understanding of the how the backend works and
how its pieces function together.

I had hoped to locate step by step notes of a porting experience with the
reasoning behind the each decision made.  I realize now how difficult that
is and I am hardly keeping such notes myself at this point.  If this goes
well, I will find the time to document my experience in some detail.  I
really would like to establish a minimal set a characteristics and write a
good introductory tutorial.

After the REX, I might retarget it for my two Epson PX-8, laptops (circa
1985).  The architecture is similar in many ways, they have 64K of
non-volatile ram (maintained by a trickle charge I believe), execute CP/M
2.2 from ROM (via bank switching), and included an integral microcassete
tape drive.

Philip H. Dye
phdye@acm.org

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list