The src/target/ia32 Directory

Namespace target::ia32, delivered for TC-7. Code generation for IA-32. This is not part of the student project, but it is left to satisfy their curiosity. In addition to its presence is a sane invitation to respect the constraints of a multi-back-end compiler.

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-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-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-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: runtime-gnu-linux.s & runtime-freebsd.s (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.