.
Incorporate canonicalization (Chapter 8), add the "maximal munch" algorithm "Chapter 9: Instruction Section," page 216. Your makefile should create an executable jar file called select.jar. The compiler is required to write a *.s file.As usual, in all cases there must be a single line of output to the standard output stream of the following form:
filename=dir/Test.java, errors=0The one line must contain exactly one comma, one space, two equals signs, and so on. Nothing must be written to the standard error stream unless there are errors detected by your compiler and the error messages are properly formatted.
dir/Test.java:001.011: some error message dir/Test.java:034.014: another error messageIn addition to correctly formatted output, it is important that your compiler does not fail for any reason. By "not failing" I mean the compiler always runs to completion quickly, terminates normally, and returns an exist status of zero.
All, or most, of the code for this phase could be in a one file. It could be placed in a package called sparc, since it is specific to the machine architecture.
The (revised) canon package has a method in the class Main that encapulates all the work of chapter 8.
public static List<Stm> transform (Stm s) {
final List<Stm> stms = Canon.linearize (s);
final List<List<Stm>> bb = BasicBlocks.makeBlocks (stms);
final List<Stm> traces = TraceSchedule.trace(bb);
return traces;
}
Turn in the source code for the project using the
submission server.
The submit project tag for this assignment is
.
For your convenience, here is a submission form for this assignment.