The src/target/ia32 Directory

Namespace target::ia32, delivered during TC-7 and TC-9. Code generation for IA-32. 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/ia32/)

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

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

Forward declarations for the target::ia32 module.


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

Description of the i386 CPU.

File: gas-assembly.* (src/target/ia32/)

The IA-32 assembly language (syntax, opcodes and layout); it abstracts the generation of IA-32 instructions using the GNU Assembler (Gas) Syntax. target::ia32::GasAssembly derives from target::Assembly.

File: gas-codegen.* (src/target/ia32/)

A translator from LIR to ASSEM using the IA-32 instruction set defined by target::ia32::GasAssembly. This relies on target::ia32::GasMatcher for instruction scheduling. target::ia32::Codegen derives from target::Codegen.

File: gas-layout.* (src/target/ia32/)

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

File: gas-matcher.* (src/target/ia32/)

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

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

The IA-32 back end, based on a IA-32 CPU and a IA-32 code generator.

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

Generate the Tiger adapted IA-32 runtime.

File: runtime-gnu-linux.s, runtime-freebsd.s & runtime-gnu-linux.cc (src/target/ia32/)

The GNU/Linux and FreeBSD Tiger runtimes in IA-32 assembly language: print etc. The C++ files runtime-gnu-linux.cc and runtime-freebsd.cc are built from runtime-gnu-linux.s and runtime-freebsd.s: do not edit the former. See src/target, tiger-runtime.c.


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

Unit tests.