Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!mcnc!rti!xyzzy!wood From: wood@xyzzy.UUCP (Tom Wood) Newsgroups: comp.lang.c Subject: Having Ported PCC Message-ID: <178@xyzzy.UUCP> Date: Thu, 6-Aug-87 08:23:38 EDT Article-I.D.: xyzzy.178 Posted: Thu Aug 6 08:23:38 1987 Date-Received: Sat, 8-Aug-87 10:39:20 EDT Reply-To: wood@xyzzy.UUCP () Distribution: world Organization: Data General Corporation, Research Triangle, NC Lines: 42 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