To turn in your program, execute the command turnin cs553f18_assg1 files.
- make compile
- Creates an executable file in the current directory called compile that implements your compiler. Note that this should build your compiler from scratch, i.e. starting from the lex and yacc specifications.
- make clean
- deletes the following files from the current directory: lex.yy.c, y.tab.*, y.output, all object files (*.o) and the executable file compile.
To facilitate type checking by your compiler, these will be declared as externs in the input programs. For example:
- void print_int(int val)
- Prints out the integer val to stdout.
- void print_string(char str[])
- Prints out the string str to stdout.
Your compiler should generate additional code for these two routines, as described at the end of the Translating Three-Address Code to MIPS Assembly Code document.extern void print_int(int x); extern void print_string(char str[]); int main(void) { int x; x = 123; print_int(x); print_string("\n"); return 0; }
/home/cs553/fall18/bin/spimTo run SPIM on a file foo.s containing MIPS assembly code, use:
spim -file foo.sTo get execution count statistics, use:
spim -keepstats -file foo.s