blob: a49eef8915cdbf0be6ab3f6d5b1b8b2dd9f25b30 [file] [log] [blame]
Ben Cheng5d90c202009-11-22 23:31:11 -08001The codegen file for the ARM-based JIT is composed by files broken by
2functionality hierarchies. The goal is to separate architectural dependent
3and independent components to facilitate maintenance and future extension.
4
5For example, the codegen file for armv7-a is assembled by the following
6components:
7
8--
9
10/* Architectural independent building blocks */
11#include "../CodegenCommon.c"
12
13/* Thumb2-specific factory utilities */
14#include "../Thumb2/Factory.c"
15/* Factory utilities dependent on arch-specific features */
16#include "../CodegenFactory.c"
17
18/* Thumb2-specific codegen routines */
19#include "../Thumb2/Gen.c"
20/* Thumb2+VFP codegen routines */
21#include "../FP/Thumb2VFP.c"
22
23/* Thumb2-specific register allocation */
24#include "../Thumb2/Ralloc.c"
25
26/* MIR2LIR dispatcher and architectural independent codegen routines */
27#include "../CodegenDriver.c"
28
29/* Architecture manifest */
30#include "ArchVariant.c"
31
32--
33
34For the Thumb/Thumb2 directories, each contain the followin three files:
35
36- Factory.c (low-level routines for instruction selections)
37- Gen.c (invoke the ISA-specific instruction selection routines)
38- Ralloc.c (arch-dependent register pools)
39
40The FP directory contains FP-specific codegen routines depending on
41Thumb/Thumb2/VFP/PortableFP:
42
43- Thumb2VFP.c
44- ThumbVFP.c
45- ThumbPortableFP.c
46
47In this way the dependency between generic and specific code tied to
48particular architectures can be explicitly represented.