Initial Installation

  1. You'll need a modest amount of disk space (roughly 3MB per tree). You can set up subdirectories under /projects/cecil11/501/students; there is about 1.3 GB of free space on this partition, which should be sufficient for the project. Or you can use your own disk space if you want.
  2. The initial distribution can be found in the file /projects/cecil11/501/tiger.tar. cd to the directory where you want to install tiger and use tar (tar xf /project/cecil11/501/tiger.tar) to extract the source code.
  3. After extracting the initial version, you'll want to put the src and testcases subdirectories under some form of source control. I'd recommend using CVS, but do whatever you want.
  4. You'll need to modify the tops of .../tiger/src/makefile and ..../tiger/testcases/makefile to have the correct path information (or set up the appropriate symlink from your home directory to make the makefiles work as is).

Building Tiger

  1. You'll have to have a working Java development environment. Java is installed on most of the platforms in the department, so hopefully this won't be an issue.
  2. The makefiles rely on features of gmake (found in /uns/bin); on most platforms vanilla make will not work.
  3. Typing 'gmake' in .../tiger/src will build the Tiger compiler. The initial installation includes precompiled .class files.
  4. Typing 'gmake clean' in .../tiger/src removes all generated .class, JLex, and JavaCUP files (do this if you want to ensure a rebuild from scratch).

Running Tiger

The file .../tiger/testcases/makefile contains rules for using Tiger to compiler .tig source files into .s files and for compiling/linking the .s files into executables. You'll need to be a little careful when using this makefile; compiling a .tig to a .s file must be done on a machine which has java installed and compiling a .s file into an executable must be done on a MIPS box, and apparently only one that uses extended coff format (in this department only a few obsolete DecStations, which appear to not have Java installed).

For example, here's a transcript of me building the queens executable from the queens.tig source file. Tolt is a Sparc/Solaris box with Java; truecod is a Mips/Ultrix box.


(tolt 14)% make queens.s
java -classpath :/homes/fish/grove/501/tiger/JavaCUP:/homes/fish/grove/501/tiger:/homes/fish/grove/501/tiger/classes:/usr/java/lib/classes.zip Main.Main queens.tig
(tolt 15)% 

...<switch machines>...

(truecod 9)% make queens
gcc  -o runtime.o -c runtime.c
gcc  runtime.o queens.s -o queens
(truecod 10)% queens
 O . . . . . . .
 . . . . O . . .
 . . . . . . . O
 . . . . . O . .
 . . O . . . . .
 . . . . . . O .
 . O . . . . . .
 . . . O . . . .
 
...<lots more output>...

You can get a list of DecStations in the department by using 'hinfo | grep DS'. It might be possible to get things to work on some of the SGI's as well. Also there's a MIPS simulator, SPIM, which I haven't got to work yet, but could probably get going with minimal effort if it turns out that there aren't enough DecStation cycles available to test the projects.


chambers@cs.washington.edu