Having Ported PCC 
Author Message
 Having Ported PCC

I recently got hold of the System V.3 3B2 version of PCC and have
retargeted it in just 4 weeks.  This version is QCC, but has much of the
RCC code #ifdef-ed out.  I tried building RCC, but gave up.  I believe
the "stin" (Shapes and Template INput) file for RCC differs from that
for QCC, and in the 3B2 version, there are some register set functions
that were missing.

I want to thank everyone for their help in getting started on this
project.  The discussions were quite helpful.  After having done as
thorough a job of digging into references on PCC, I think a summary
would be helpful to pass along.  These 5 references were all I could
find that discuss PCC specifically.  I was not at all interested in
general texts on compilers.

        "A Tour Through the Portable C Compiler" by S.C. Johnson

        "A Tour through the UNIX C Compiler" by D.M. Ritchie

        "A Tour Through the Portable C Compiler" by S.C. Johnson and
        Donn Seeley (4.3BSD document SMM:19)

        "Four Generations of Portable C Compiler" by D.M. Kristol
        (1986 Summer USENIX Conference Proceedings)

        "A Detailed Tour Through the /6 Portable C Compiler" by
        S.J. Leffler (CWRU tech report). I never was able to get a copy
        of it, but it's supposed to be useful.

The three "tour through PCC" papers are each a little different, and are
helpful in figuring out the C-tree representation.

The "stin" file was the most helpful aspect of retargeting QCC.  After
you read a few hundred pages of code, you can almost figure out how to
write/modify the "stin" file (typical Unix).  The good news is that
unless you're trying to brain damage QCC, 98% of the changes occur in
the mere 20 page "stin" file.

Oh yes, another good source (especially if you're starting with the 3B2
version of PCC) is the AT&T 3B2 Assembly Language Programming Manual.
--
                        Tom Wood
                        Data General, Research Triangle Park, NC
                        {the known world}!mcnc!rti!xyzzy!wood



Sun, 17 Jan 1993 08:23:00 GMT  
 Having Ported PCC
In porting QCC, a useful text is the "Portable C Compiler -
Version 2 (PCC2) Internals".  It includes documentation of
stin file formats, PCC2 tree forms, debugging flags, and
compiler #defines.  The manual is expensive so it's worth it
most if you buy it before you figure it all out doing a
port.  Since the manual is based on PCC2 (and hasn't been
updated), it's a good starting point, but doesn't have the
latest information.

The manual is available as Select Code 308-142 from the AT&T
Customer Information Center, 1-800-432-6600.  You need a
source code license to some version of PCC2 or later to
purchase it.

Dave Kallman, AT&T, 190 River Road, Summit, NJ 07901
attunix!dkk, (201)522-6378



Sun, 17 Jan 1993 15:56:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Need string.h file for PCC 2.1c

2. PCC compiler

3. REQ:Undeleter written in pcc

4. Anyone Using the PCC Compiler?

5. Help with beep in Pcc

6. pcc intermediate files

7. Yet another pcc botch

8. Bad optimization in PCC?

9. pcc optimizer strangeness?

10. pcc misfeature

11. Porting PCC

12. PCC tour

 

 
Powered by phpBB® Forum Software