[comp.sys.att] C compilers for the 3B2

friedl@vsi.UUCP (Stephen J. Friedl) (04/16/88)

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

friedl@vsi.UUCP (Stephen J. Friedl) (04/16/88)

In article <546@vsi.UUCP>, Stephen J. Friedl (that's me, folks) writes:
> 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.
> [discussion of various C compilers for the 3B2}
> [pcc2, C Issue 3, C-FP+, and CPLU 4.1]

I just heard today that there is now a CPLU (C Programming
Utilities) 4.2, but I've no idea what it contains.  Has anybody
heard of it?

-- 
Steve Friedl   V-Systems, Inc.   "Yes, I'm jeff@unh's brother"
friedl@vsi.com  {backbones}!vsi.com!friedl  attmail!vsi!friedl

pjh@mccc.UUCP (Peter J. Holsberg) (04/17/88)

Here's what I get on my 3b2/400:

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

HOWEVER, this is the same guy that does NOT have mkdir(2) (and gawd
knows what else!).  Comments?

twh@mibte.UUCP (Tim Hitchcock) (04/19/88)

In article <552@vsi.UUCP>, friedl@vsi.UUCP writes:
> In article <546@vsi.UUCP>, Stephen J. Friedl (that's me, folks) writes:
> > 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.
> > [discussion of various C compilers for the 3B2}
> > [pcc2, C Issue 3, C-FP+, and CPLU 4.1]
> 
> I just heard today that there is now a CPLU (C Programming
> Utilities) 4.2, but I've no idea what it contains.  Has anybody
> heard of it?
> 
> -- 
> Steve Friedl   V-Systems, Inc.   "Yes, I'm jeff@unh's brother"
> friedl@vsi.com  {backbones}!vsi.com!friedl  attmail!vsi!friedl

The 4.2 C compiler  on the 3B2 can optimize code for faster performance. 
The code generated in many cases is noticeably faster than 4.1 generated code.
Possibly 50% faster (NO PROMISES).

If your program spends a lot of time doing user calls (see "time" in man),
you may get improved performance by adding the co-processor.

friedl@vsi.UUCP (Stephen J. Friedl) (04/20/88)

In article <2575@mibte.UUCP>, twh@mibte.UUCP (Tim Hitchcock) writes:

< In article <552@vsi.UUCP>, friedl@vsi.UUCP writes:
< > I just heard today that there is now a CPLU (C Programming Utilities)
< > 4.2, but I've no idea what it contains.  Has anybody heard of it?
< > 

< The 4.2 C compiler  on the 3B2 can optimize code for faster performance. 
< The code generated in many cases is noticeably faster than 4.1 generated code.
< Possibly 50% faster (NO PROMISES).

I called Ducommun today trying to track this down and they
can't get any info on it.  Does anybody know if AT&T is shipping
C Programming Utilities 4.2 (CPLU 4.2) and what the PEC is?  Also,
does AT&T generally offer upgrades to owners of CPLU 4.1?

-- 
Steve Friedl   V-Systems, Inc.  Wizard of undocumented 3B options
friedl@vsi.com    {backbones}!vsi.com!friedl   attmail!vsi!friedl

eric@magic4.UUCP (Eric Kozowski) (04/21/88)

In article <546@vsi.UUCP>, friedl@vsi.UUCP (Stephen J. Friedl) writes:
> 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


There is a newer version.  Here is the output from the above on my system,
a 3B2/400 running SysV 3.1.2:


$ fpcc -V main.c
cc: command - C Compilation System, Issue 4.2 4/29/87
comp: MAU compiler - C Compilation System, Issue 4.2 4/29/87
as: assembler - C Compilation System, Issue 4.2 4/29/87
ld: link editor - C Compilation System, Issue 4.2 4/29/87


> C Issue 4.1
> ===========
> 
>      This is the latest (that I know of) compiler for the 3B2,

The newest is 4.2.

>         $ 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


$cc -V main.c
cc: command - C Compilation System, Issue 4.2 4/29/87
comp: FPE compiler - C Compilation System, Issue 4.2 4/29/87
as: assembler - C Compilation System, Issue 4.2 4/29/87
ld: link editor - C Compilation System, Issue 4.2 4/29/87



This is from a 3B2/400 Running SysV 3.1.2 with Advanced Programming 
Utilities Issue 1.2


-- 
Eric Kozowski  AT&T GBS  Portland, Or        || ... I have become 
(503)295-4250  2020 SW 4th  Suite 500 97201  || comfortably numb ...
UUCP: ...!tektronix!tessi!bucket!magic4!eric || 
All of the above opinions are mine           || -- Pink Floyd            

lenny@icus.UUCP (Lenny Tropiano) (04/22/88)

In article <570@vsi.UUCP> friedl@vsi.UUCP (Stephen J. Friedl) writes:
...
|>
|>I called Ducommun today trying to track this down and they
|>can't get any info on it.  Does anybody know if AT&T is shipping
|>C Programming Utilities 4.2 (CPLU 4.2) and what the PEC is?  Also,
|>does AT&T generally offer upgrades to owners of CPLU 4.1?
|>

Good luck, Ducommun gets things so long after the "rest" of the world
claims they have it.  I remember waiting forever to get our 3.0 upgrade
for our 3B2 (way back when)...

							-Lenny

-- 
US MAIL  : Lenny Tropiano, ICUS Computer Group        IIIII  CCC U   U  SSS
           PO Box 1                                     I   C    U   U S
	   Islip Terrace, New York  11752               I   C    U   U  SS 
PHONE    : (516) 968-8576 [H] (516) 582-5525 [W]        I   C    U   U    S
TELEX    : 154232428 [ICUS]                           IIIII  CCC  UUU  SSS 
AT&T MAIL: ...attmail!icus!lenny  
UUCP     : ...{mtune, ihnp4, boulder, talcott, sbcs, bc-cis}!icus!lenny 

friedl@vsi.UUCP (Stephen J. Friedl) (04/24/88)

In article <176@magic4.UUCP>, eric@magic4.UUCP (Eric Kozowski) writes:
< In article <546@vsi.UUCP>, friedl@vsi.UUCP (Stephen J. Friedl) writes:
< > C-FP+
< > =====
< >      This is the highest performance floating point possible on a
< > 3B2.
< 
< There is a newer version.  Here is the output from the above on my system,
< a 3B2/400 running SysV 3.1.2:

On the day I posted my original article, I learned that C Programming
Utilities Issue 4.2 is basically a merging of Issue 4.1 and C-FP+.
C-FP+ compiles directly to math coprocessor operations while Issue 4.1
compiles to FP function calls that check yes/no for the coprocessor
and use the emulator if not.  It appears from the "-V" output lines that
4.2 calls a different compiler-proper depending on cc's argv[0].

-- 
Steve Friedl      V-Systems, Inc.    Gene Spafford for President!
friedl@vsi.com   {backbones}!vsi.com!friedl    attmail!vsi!friedl

wcs@skep2.ATT.COM (Bill.Stewart.<ho95c>) (04/24/88)

:< The 4.2 C compiler  on the 3B2 can optimize code for faster performance. 
:< The code generated in many cases is noticeably faster than 4.1 generated code.
:< Possibly 50% faster (NO PROMISES).
:Does anybody know if AT&T is shipping
:C Programming Utilities 4.2 (CPLU 4.2) and what the PEC is?  

Call 1-800-828-UNIX, the UNIX Software Sales office.
Things the compiler does well included inlining function calls
and generating real code for floating point instead of subroutine calls
to routines which check for the MAU and then execute or emulate.
I think it also takes a lot more advantage of 32100 features, so it
generates code that won't run on 32000s.  Floating point code, and code
that uses lots of small subroutines, will improve drastically.
Generated code is a bit bigger as well, but it's normally worthwhile.
-- 
#				Thanks;
# Bill Stewart, AT&T Bell Labs 2G218, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs
# skep2 is a local machine I'm trying to turn into a server.  Please send
# mail to ho95c or ho95e instead.  Thanks.