The src/target/arm Directory

Namespace target::arm, delivered during TC-7 & TC-9. Code generation for ARMv7. This is an additional assignment, it is left to satisfy students’ curiosity. In addition to its presence is a sane invitation to respect the constraints of a multi-back-end compiler.

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

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

File: fwd.hh (src/target/arm/)

Forward declarations for the target::arm module.


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

Description of the ARMV7 CPU.

File: arm-assembly.* (src/target/arm/)

The ARM assembly language (syntax, opcodes and layout); it abstracts the generation of ARM instructions using the GNU Assembler (Gas) Syntax. target::arm::ArmAssembly derives from target::Assembly.

File: arm-codegen.* (src/target/arm/)

A translator from LIR to ASSEM using the ARM instruction set defined by target::arm::ArmAssembly. This relies on target::arm::ArmMatcher for instruction scheduling. target::arm::Codegen derives from target::Codegen.

File: arm-layout.* (src/target/arm/)

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

File: arm-matcher.* (src/target/arm/)

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

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

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

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

Generate the Tiger adapted ARM runtime.

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

The Tiger runtime in ARM assembly language: print etc.


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

Unit tests.