Re: Need a C compiler for a new processor.

Tim Josling <tej@melbpc.org.au>
17 Oct 1999 01:34:05 -0400

          From comp.compilers

Related articles
Need a C compiler for a new processor. gcome@cyberus.ca (Guillaume Comeau) (1999-10-16)
Re: Need a C compiler for a new processor. tej@melbpc.org.au (Tim Josling) (1999-10-17)
Re: Need a C compiler for a new processor. guerby@acm.org (Laurent Guerby) (1999-10-18)
Re: Need a C compiler for a new processor. meissner@cygnus.com (Michael Meissner) (1999-10-18)
Re: Need a C compiler for a new processor. C.vanReeuwijk@twi.tudelft.nl (Kees van Reeuwijk) (1999-10-18)
Re: Need a C compiler for a new processor. rpgurd@archelon.com (Preston Gurd) (1999-10-21)
Re: Need a C compiler for a new processor. mah@colorado.edu (Haibing Ma) (1999-10-27)
Re: Need a C compiler for a new processor. gaul@ipd.info.uni-karlsruhe.de (Thilo Gaul) (1999-11-09)
[2 later articles]
| List of all articles for this month |

From: Tim Josling <tej@melbpc.org.au>
Newsgroups: comp.compilers
Date: 17 Oct 1999 01:34:05 -0400
Organization: Melbourne PC User Group
References: 99-10-080
Keywords: C

The Free Software foundation publishes a book called "Using and
Porting GNU GCC" by Richard Stallman. You can also download it for
free I believe and print it if you want to (www.fsf.org).


GCC is quite modular. The parsers for the various languages (Fortran,
Objective C, C, C++) generate an intermediate language called RTL,
which is then translated into machine code using a machine description
language.


So what you have to do is write a machine description. All the parsing
is taken care of and is basically machine independent. To do this you
will have some work to do because RMS - a very clever guy - has a
unique way of thinking. RTL is modelled on LISP.


GCC also fully supports cross compiling. It assumes that the machine
concerned has an assembler.


Your compiler will have to be released under the GPL (ie free
software) due to the GCC licencing conditions.


Tim Josling




Guillaume Comeau wrote:
>
> Ok. Here it is:
>
> 1. I am in charge of writing a C compiler for a new 32-bit
> processor. The processor itself is new, it uses an instruction set
> different than any other processor.



Post a followup to this message

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