Re: wanted: public-domain back-end code generator

reid@sask.UUCP (Irving Reid)
Thu, 16 Jul 87 13:13:42 cst

          From comp.compilers

Related articles
wanted: public-domain back-end code generator gmt@arizona.edu (Gregg Townsend) (1987-07-08)
Re: wanted: public-domain back-end code generator reid@sask.UUCP (1987-07-16)
| List of all articles for this month |
Date: Thu, 16 Jul 87 13:13:42 cst
Summary: Try the GNU C compiler
References: <612@ima.ISC.COM>
From: reid@sask.UUCP (Irving Reid)
Organization: The Church of the Least Fixed Point

In article <612@ima.ISC.COM> gmt@arizona.edu (Gregg Townsend) writes:
>...
>Can anyone point me to a suitable public-domain code generator? It would need
>to generate at least Sun (680x0) and Vax code.


Wait - a freely distributable compiler/code generator that makes Vax and Sun
code? That's right, folks, the Gnu C compiler (currently in late beta test)
is just the thing for you. It dices, it slices (oops - sorry)...


No really, I've been hacking at GCC lately (stealing the front end for my
stub compiler) and it's a fine piece of work. It's set up to be
(relatively) language independent, though it hasn't been used for anything
other than C yet. It builds 2 intermediate forms: first, a parse tree,
which should be fairly language independent (they've provided hooks for
languages other than C) and second a Register Transfer Language IF on which
they do pretty well all of their optimisation and code generation.


As big C programs go, this one is pretty well written and reasonably easy to
read. It comes with a document which describes the RTL trees, how the
optimisations are done, and how the code generator is driven, including how
to write new machine descriptions.


My first look at the code shows more than a few sizeof(int)==sizeof(long)
problems, because the Gnu people don't believe in 16-bit machines, but aside
from that it should be reasonably portable across BSD Unices.


  - irving - (reid@sask.uucp or {alberta, ihnp4, utcsri}!sask!reid)
--


Post a followup to this message

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