Path: utzoo!mnetor!uunet!vsi!friedl From: friedl@vsi.UUCP (Stephen J. Friedl) Newsgroups: comp.sys.att Subject: C compilers for the 3B2 Message-ID: <546@vsi.UUCP> Date: 15 Apr 88 18:35:51 GMT Distribution: comp Organization: V-Systems, Inc. -- Santa Ana, CA Lines: 125 Hi net.people, A number of recent postings have exhibited confusion about the various C compilers available for the 3B2, so perhaps this discussion will clear some things up. We have been dealing with these things for a couple of years and have been fairly successful in tracking down information. I have all four compilers mentioned below immediately available to me, but some of these comments are speculation; rebuttals are welcome. You can find out what kind of compiler you have by compiling a small program with the "-V" flag. I use: $ cat > main.c main() {} ^D $ cc -V main.c For each compiler we'll show the output from the above. Also, our experience is with the 3B2 and 3B5 only, but some of these may apply to the 3B15 as well. C Issue 2 ========= Also know as "pcc2", this has long been the standard C compiler for the 3B2 and 3B5. It is an old compiler with no MAU (Math Accellerator Unit) support, so floating-point gets a very, very slow (but very clever) interpreter. Output from the compiler is: $ cc -V main.c : command -System V Release 2.0.11.0 07/30/84 WE32000 pcc2 compiler: @(#)local.c SVR2 : assembler - System V Release 2.0.11.0 07/30/84 ld : System V Release 2.0.11.0 07/30/84 : Version 1.6: 2/27/84 C Issue 3 ========= We know the least about this compiler so there is a little more speculation here than for the rest. This was the first compiler to support a MAU. Floating-point operations compile down to function calls (_fpmul, _fpadd, etc.) that check for the existance of the MAU: it is used if available, else the interpreter is loaded. This compiler is also known as "qcc". Output from cc -V: $ cc -V main.c cc: command -C Issue 3.1 11/19/85 WE32000 qcc compiler: SVR2.1.0 as: assembler - C Issue 3.1 11/19/85 ld : C Issue 3.1 11/19/85 : Version 1.8.1.3: 11/19/85 C-FP+ ===== This is the highest performance floating point possible on a 3B2. While the compiler can run on any machine, the resultant code requires a MAU to execute. Rather than generate the floating-point function calls as above, direct math coprocessor instructions are issued for absolute maximum speed. This compiler is also known as "rcc", and the compiler's default name is "fpcc" rather than "cc". $ fpcc -V main.c cc: command -C-FP+ Release 1.0 12/2/85 WE 32106 rcc compiler: C-FP+ Issue 0.1 as: assembler - C Issue 3.1 11/19/85 ld : C-FP+ Release 1.0 12/2/85 : Version 1.8: 1/3/85 C Issue 4.1 =========== This is the latest (that I know of) compiler for the 3B2, and it is similar to C Issue 3. The current release is called "C Programming Utilities Issue 4.1" and it goes ith "Advanced Programming Utilities Issue 1.1". It appears to handle floating-point the same way as Issue 3 (with function calls) but also supports a little more debugging info for sdb, shared libraries, and probably more things that I don't know. We usually refer to this as "CPLU 4.1". $ cc -V main.c cc: command -C Compilation System, Issue 4.1 1/29/87 C Compilation System, Issue 4.1 1/29/87 as: assembler - C Compilation System, Issue 4.1 1/29/87 ld : C Compilation System, Issue 4.1 1/29/87 --------- More random thoughts. Even through floating-point is done quite differently between Issue3/4, C-FP+ and pcc, older interpreter-based object modules can be used with newer MAU-based code. This is helpful when linking with (say) Informix libraries that have not been recompiled by the vendor. I have other thoughts on pcc2's floating-point interpreter that I will post when I can put them together. They do it in a very, uh, um, er, "interesting" manner and you may be amused. Try to get into C Issue 4 if you can because floating-point is much faster even without a MAU, and C-FP+ is 237 times faster than pcc2 on a 3B5 with a MAU. Another note: if you have System V Release 3, you need CPLU 4.1 to get SVR3-specific syscalls and library functions like mkdir(2) and the new signal handler. These capabilities exist in the kernel, but the little interface functions to get there are not included in the "older" libraries. I don't think that CPLU4.1 was out when Sys V Rel 3.0 was released, but with SVR3.1 it becaome available. It is possible that AT&T will retrofit the older compilers (possibly C-FP+) with the new libraries but you never know. A similar OS/compiler difference occurs with #include header files but Unix provides a disk with these important files so the problem is not so bad. ------ I hope this helps, send mail this way for more questions. I can probably track down PECs (Price Element Codes) for these things so you can order them from your Friendly Neighborhood AT&T person. -- Steve Friedl V-Systems, Inc. "Yes, I'm jeff@unh's brother" friedl@vsi.com {backbones}!vsi.com!friedl attmail!vsi!friedl