wood@xyzzy.UUCP (Tom Wood) (08/06/87)
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
dkk@sfsup.UUCP (D.K.Kallman) (08/07/87)
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