[Unix-jun72] C compiler status

Warren Toomey wkt at tuhs.org
Mon May 5 16:08:24 AEST 2008

Still no great progress. I can confirm that "cc" and "cvopt" both work, but
the two compiler passes "c1" and "c2" don't work. Sometimes I can get them
to core, but with different arguments the system locks up.

On http://cm.bell-labs.com/cm/cs/who/dmr/primevalC.html, Dennis notes this:

	A second, less noticeable, but astonishing peculiarity is
	the space allocation: temporary storage is allocated that
	deliberately overwrites the beginning of the program,
	smashing its initialization code to save space. The two
	compilers differ in the details in how they cope with this.
	In the earlier one, the start is found by naming a function;
	in the later, the start is simply taken to be 0. This
	indicates that the first compiler was written before we had
	a machine with memory mapping, so the origin of the program
	was not at location 0, whereas by the time of the second,
	we had a PDP-11 that did provide mapping. (See the Unix
	History paper). In one of the files (prestruct-c/c10.c) the
	kludgery is especially evident.

It could be that this sort of memory operation is what is causing the
problem. Is there a way for simh to give an instruction trace beginning
at a certain address e.g. 040000, so I can watch c0's behaviour and see
where it goes off the rails?


More information about the TUHS mailing list