Porting PCC

wood@dg_rtp.UUCP (Tom Wood)
11 Jun 87 12:34:40 GMT

          From comp.compilers

Related articles
Porting PCC wood@dg_rtp.UUCP (1987-06-11)
| List of all articles for this month |
From: wood@dg_rtp.UUCP (Tom Wood)
Newsgroups: comp.compilers
Date: 11 Jun 87 12:34:40 GMT
Posted: Thu Jun 11 08:34:40 1987

We're considering using PCC as a means of providing a C compiler
for a new architecture. I'd appreciate any helpful pointers or
opinions.


Are there a variety of PCC versions (V.3, 4.3, ...)?
If so, which one is better to use as a base?
[I retargeted the V.1 Vax PCC to the RT PC. It wasn't particularly hard,
though as noted in the previous message, the resulting compiler ran slowly
and generated mediocre code. It works, though.]
I'm currently reviewing the 4.3 PCC version with the help of the
April 1986 version of "A Tour Through the Portable C Compiler" by
Johnson and Seeley.


Anybody know of any more documentation?
[No. There's no substitute for reading the code, which you'll eventually
do one way or the other.]
I may be misled on this one, but I heard that the 4.2/4.3 versions
of Pascal and Fortran target the PCC intermediate language.


Is this true?
Does this mean that the additional cost of retargeting
Pascal and Fortran given a PCC is free or very small?
[Yes, it's true, and it means that the cost of retargeting Pascal and Fortran
is relatively small once you've got C working. They use the same code
generator for expressions as does PCC, but they each generate their own code
for control structures and stuff like FORMAT statements. Each has different
sorts of expressions, so you'll find new bugs, both in the compiler and in
the runtime library.]
Thanks much for your comments and opinions!
[Other comments always welcome. -John]
--
Tom Wood (919) 248-6067
Data General, Research Triangle Park, NC
{the known world}!mcnc!rti-sel!dg_rtp!wood
--


Post a followup to this message

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