Re: How to port gcc? (Stephen A. Leake)
28 Apr 1996 22:50:51 -0400

          From comp.compilers

Related articles
How to port gcc? rabagley@isdn33.eng.uc.EDU (Ross Bagley) (1996-04-10)
Re: How to port gcc? (1996-04-11)
Re: How to port gcc? (1996-04-28)
How to port gcc? (R.A.L Williams) (1996-05-03)
| List of all articles for this month |

From: (Stephen A. Leake)
Newsgroups: comp.compilers
Date: 28 Apr 1996 22:50:51 -0400
Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA
References: 96-04-061
Keywords: GCC, architecture

Ross Bagley <rabagley@isdn33.eng.uc.EDU> writes:

      I am interested in writing a new back-end for gcc (new processor
      architecture+instruction set), but lack sufficent knowledge. Can
      anyone help?

      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


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.