The src/target/mips Directory

Namespace target::mips, delivered during TC-7 and TC-9. Code generation for MIPS R2000.

File: local.am (src/target/mips/)

This is a Makefile configuration relative to the src/target/mips/ directory. It is responsible for the integration into the libtc library with everything exported from the target::mips module, and the linkage of the directory’s unit tests in the test-suite.


File: cpu.* (src/target/mips/)

The description of the MIPS (actually, SPIM/Nolimips) CPU.

File: spim-assembly.* (src/target/mips/)

Our assembly language (syntax, opcodes and layout); it abstracts the generation of MIPS R2000 instructions. target::mips::SpimAssembly derives from target::Assembly.

File: spim-codegen.* (src/target/mips/)

A translator from LIR to ASSEM using the MIPS R2000 instruction set defined by target::mips::SpimAssembly. This relies on target::mips::SpimMatcher for instruction scheduling. target::mips::Codegen derives from target::Codegen.

File: spim-layout.* (src/target/mips/)

How MIPS (and SPIM/Nolimips) fragments are to be displayed. In other words, that’s where the (global) syntax of the target assembly file is selected.

File: spim-matcher.* (src/target/mips/)

Functor used for pattern-matching based instruction selection, making use of misc::LambdaVisitor for nested matching.

File: target.* (src/target/mips/)

The main back end, based on a MIPS CPU and a MIPS code generator.

File: generate-runtime.sh (src/target/mips/)

Generate the Tiger adapted MIPS runtime.

File: runtime.s & runtime.cc (src/target/mips/)

The Tiger runtime in MIPS assembly language: print etc. The C++ file runtime.cc is built from runtime.s: do not edit the former. See src/target, tiger-runtime.c.


File: test-target.cc (src/target/mips/)

Unit tests.