On 19 July 2018 at 15:50, Clem Cole <clemc(a)ccc.com> wrote:
On Wed, Jul 18, 2018 at 5:37 PM, Dibyendu Majumdar <mobile(a)majumdar.org.uk
I am interested in finding out if the last C
compiler code (not the
earliest versions which I know
are available) written by Dennis Ritchie is available somewhere. I
assume that the C compiler in V7 code was written by him?
I'm not sure if this is the last. This is a pointer to the V7 Ritchie
- The sources and the makefile build the three passes /lib/c
This should be a good starting point/base line.
Many thanks - I will compare this with
which is what I have been looking at.
I guess that by this time the work had transitioned to pcc so probably
there isn't a later version available?
Be careful because the Johnson Compiler (pcc) was also
included with V7
and is a different technology.
This is important because their are modifications to both the Ritchie and
Johnson compilers 'in-the-wild' for other back-ends and new optimizations.
I for instance, re-targeted the Ritchie compiler to what would become the
68000 (it was not yet numbered, it was an experimental chip when we had
access to it in the late 1970s in Tek Labs - mine was a 16 bit 'int' as I
was coming primarily from the PDP-11 at the time and the chip was a 16 bit
chip internally - so the code was tight and clean and I basically
substituted PDP-11 instruction sequences for 68000 sequences). IIRC, Jack
Test's 68000 compiler from MIT which was about 18 mons later was based on
the Johnson compiler but he used a 32 bit 'int' which proved easier for
porting programs from the Vax, as the chip supported 32 bit words even
though it took 2 ticks to do anything [so Jack's compiler generated slower
code for many simple ops].
I recommend, that google for the old USENIX tapes and see what you turn up
Thank you for the info - I will certainly look at the USENIX tapes.
I will try to port the C compiler to amd64 - while preserving as much of
the original code as I can. But not sure if this is even feasible.
Thanks and Regards