Noeud « Next »: , Noeud « Previous »: src/codegen/mips, Noeud « Up »: Project Layout



3.2.18 The src/codegen/ia32 Directory

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

— File: runtime.s (src/codegen/ia32/)
— File: runtime.cc (src/codegen/ia32/)

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

— File: gas-assembly.hh (src/codegen/ia32/)
— File: gas-assembly.cc (src/codegen/ia32/)

Our assembly language (syntax, opcodes and layout); it abstracts the generation of IA32 instructions using Gas' syntax. codegen::ia32::GasAssembly derives from codegen::Assembly.

— File: codegen.hh (src/codegen/ia32/)
— File: codegen.cc (src/codegen/ia32/)

The IA32 back-end: a translator from LIR to ASSEM using the IA32 instruction set defined by codegen::ia32::GasAssembly. It is implemented as a maximal munch. codegen::ia32::Codegen derives from codegen::Codegen.

— File: gas-layout.hh (src/codegen/ia32/)
— File: gas-layout.cc (src/codegen/ia32/)

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