Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!gatech!bloom-beacon!husc6!mit-eddie!genrad!decvax!ima!johnl From: johnl@ima.ISC.COM (John R. Levine) Newsgroups: comp.compilers Subject: Re: wanted: public-domain back-end code generator Message-ID: <620@ima.ISC.COM> Date: Thu, 16-Jul-87 15:13:42 EDT Article-I.D.: ima.620 Posted: Thu Jul 16 15:13:42 1987 Date-Received: Tue, 21-Jul-87 05:06:06 EDT References: <612@ima.ISC.COM> Reply-To: reid@sask.UUCP (Irving Reid) Organization: The Church of the Least Fixed Point Lines: 36 Approved: compilers@ima.UUCP Summary: Try the GNU C compiler 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) -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.ARPA Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | cca}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request -- John R. Levine, Javelin Software Corp., Cambridge MA +1 617 494 1400 { ihnp4 | decvax | cbosgd | harvard | yale }!ima!johnl, Levine@YALE.something U.S. out of New Mexico!