|How to port gcc? email@example.com.EDU (Ross Bagley) (1996-04-10)|
|Re: How to port gcc? firstname.lastname@example.org (1996-04-11)|
|Re: How to port gcc? email@example.com (1996-04-28)|
|How to port gcc? firstname.lastname@example.org (R.A.L Williams) (1996-05-03)|
|From:||email@example.com (Stephen A. Leake)|
|Date:||28 Apr 1996 22:50:51 -0400|
|Organization:||NASA Goddard Space Flight Center -- Greenbelt, Maryland USA|
Ross Bagley <firstname.lastname@example.org.EDU> writes:
I am interested in writing a new back-end for gcc (new processor
architecture+instruction set), but lack sufficent knowledge. Can
I have taken a graduate level compilers course, own and can refer to
the dragon book when necessary, and have tried to read the GNU
documentation on GCC "Using and Porting GNU CC".
My basic problem is that I haven't found a description of a minimum
set of instruction patterns sufficient to define a back-end for gcc.
The GCC docs never seem to make that point clear, in fact, I don't
even have a good idea of where to begin writing patterns.
I've done something similar, for the ut69r000 chip. The best way is to
find an existing port to a chip that is fairly similar to the one you
want. On the other hand, if your chip is really different, you might
want to start with a really simple chip and add on. The ut69r000 chip
is the simplist I've ever seen; 20 general registers, 35 instructions,
2 address modes. I'm not done porting it yet, but if you want, you can
have my md file to use as a simple example.
I have not found any better documentation. The info files are cryptic,
but once you get into writing and debugging the machine description,
things begin to make more sense.
One thing that helps is having a test suite; I'm using a C compiler
validation suite from Metaware ($2k). I hope to use GNAT and the Ada
validation suite sometime.
Stephen Leake, NASA Goddard Space Flight Center
Return to the
Search the comp.compilers archives again.