[comp.sys.mips] Writing compilers for M/120

mason@tmsoft.uucp (Dave Mason) (02/21/90)

I teach a compiler course.  The students have written a compiler (or at
least they will have by tomorrow midnight :-) with code generator for a
simple stack machine for which I wrote a simulator.

For the final project in the course, I want them (in groups of 4) to
generate code for the MIPS 2000 architecture.  I have made a first
pass through the Kane book, and everything looks pretty straight-forward.
I was also at a talk a year ago by John Mashey, but if my flakey memory has
confused facts enough, it could make life very difficult for my students.

In particular does the compiler or the assembler have to worry about
filling the delayed load or delayed jump slot?  (I seem to remember
John saying the assembler did unless you told it not to.) I could (and
will) look at the assembler output of the compiler and get a pretty
good hint on this, but I'd appreciate an authoritative answer.... I
hate lying to my students, almost as much as they hate it!

In general, are there any things that I, or they, should be aware of in
generating code for this architecture.  I'd be happy to hear from
mipsco people, but also from anyone who has tried to write a compiler
for the machine based on the information available in the Kane book.

Thanks muchly	../Dave