TC-7 Code to WriteΒΆ
Tip
Information on MIPS R2000 assembly instructions may be found in SPIM manual.
- Codegen
src/target/mips/mips-matcher.ccis the functor used for instruction selection pattern-matching.- src/target/mips/spim-assembly.cc
SpimAssembly::move_buildbuilds a move instruction using MIPS R2000 standard instruction set.SpimAssembly::binop_inst,SpimAssembly::binop_buildbuild arithmetic binary operations (addition, multiplication, etc.) using MIPS R2000 standard instruction set.SpimAssembly::load_build,SpimAssembly::store_buildbuild a load (respectively a store) instruction using MIPS R2000 standard instruction set. Here, the indirect addressing mode is used.SpimAssembly::cjump_buildtranslates conditional branch instructions (branch if equal, if lower than, etc.) into MIPS R2000 assembly.- Runtime
You have to complete the implementation of the runtime in
src/target/mips/runtime.s:- strcmp
- streq
- print_int
- substring
- concat
- src/target/mips/epilogue.cc
Completing the
Codegen::rewrite_programroutine will be needed during register allocation only, see TC-9, Register Allocation.