Assignment 6: Instruction Selection

Due: Midnight pm, Monday November 16th by git commit.
(That is, end of Monday / beginning of Tuesday.)

Project 6 is to read chapter nine of the text and build a module to translate IR trees to MIPS machine instructions. The MIPS instruction set is documented in the SPIM documentation; see the course web page for links.

Your structure should match the CODEGEN signature described in chapter nine. In particular, it should export a codegen function that maps a frame and a single IR statement to a list of assembler instructions.

You will also need to augment your frame structure to add the register lists and functions that add entry/exit code to Tiger procedure bodies as described on page 208 of the text.

To hand in your work, mark your submission commit with git tag "6-insn-sel". Your repo should contain a directory named 6-insn-sel, that contains:

Word to the wise: this should not be too hard, but under no circumstances do you want to go past the project deadline. The following phases will require serious hacking. If you go over the deadline, you take a double hit: you lose points on your late project as well as using up the time allocated for the more difficult current project.

As always… good luck; have fun!

  –Olin

CS4410