Time-stamp: <98/04/13 17:09:58 mitchell>
Getting started with SUIF
To use this page to full effect, you need to view it on a
CSE-supported machine.
I've compiled all the SUIF stuff you'll need and placed it in /net/bonzo/class/sp98/cse231/software.
Here's what you need to do to start using it.
- Make sure you're on a Sun Solaris system. For example, you might be on beowulf, kongo, bonzo, or any of the Solaris APE lab machines.
- % cd /net/bonzo/class/sp98/cse231/software
- % source setup.solaris
- try % which scc. If it can't find the scc command, then mail me because something's not right with the setup.
- Take a look at this page to
familiarize yourself with some of the SUIF features you might or will need.
Note, you'll need to do this setup step each time you want to use
SUIF (like each time you log in. So you might want to stick this in
your .cshrc: source
/net/bonzo/class/sp98/cse231/software/setup.solaris
Getting started with SimpleSUIF
It's pretty simple to use SimpleSUIF, check this out (after making
sure you've set up SUIF, as above!). Say you have a file called
hello.c that you want to prepare for SimpleSUIFing:
- You first need to preprocess hello.c to make it
SimpleSUIF friendly. At your disposal is a script called
ssfe which does the trick.
- % ssfe hello
- (notice I took away the .c).
- This will create two files, one called hello.spx and the other called hello.tmp. The first you can ignore, the second is the file
you want. Now you can operate SimpleSUIF compilers on hello.tmp. For example, try this:
- % printsimple hello.tmp hello2.tmp
- printsimple takes two argumetns, input simplesuif and output simplesuif. Without the second argument, it fails, so watch out!
Jumpstart
Check out this for some
files to help you get jump-started with your compiler. Especially, the
compiler subdirectory. You shouldn't need to modify doproc.c.
"All" you need to do is either use the code in handle_instruction.cc
as a starting spot. You can alternatively write your own
handle_instruction routine.
Useful links
Nick Mitchell