blob: 1bb4603791e21180573ddb6e04d895268cf96dda [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 */
Brian Carlstrombbf31b52011-05-05 00:01:58 -070011#include "../CodegenCommon.cpp"
Ben Cheng5d90c202009-11-22 23:31:11 -080012
13/* Thumb2-specific factory utilities */
Brian Carlstrombbf31b52011-05-05 00:01:58 -070014#include "../Thumb2/Factory.cpp"
Ben Cheng5d90c202009-11-22 23:31:11 -080015/* Factory utilities dependent on arch-specific features */
Brian Carlstrombbf31b52011-05-05 00:01:58 -070016#include "../CodegenFactory.cpp"
Ben Cheng5d90c202009-11-22 23:31:11 -080017
18/* Thumb2-specific codegen routines */
Brian Carlstrombbf31b52011-05-05 00:01:58 -070019#include "../Thumb2/Gen.cpp"
Ben Cheng5d90c202009-11-22 23:31:11 -080020/* Thumb2+VFP codegen routines */
Brian Carlstrombbf31b52011-05-05 00:01:58 -070021#include "../FP/Thumb2VFP.cpp"
Ben Cheng5d90c202009-11-22 23:31:11 -080022
23/* Thumb2-specific register allocation */
Brian Carlstrombbf31b52011-05-05 00:01:58 -070024#include "../Thumb2/Ralloc.cpp"
Ben Cheng5d90c202009-11-22 23:31:11 -080025
26/* MIR2LIR dispatcher and architectural independent codegen routines */
Brian Carlstrombbf31b52011-05-05 00:01:58 -070027#include "../CodegenDriver.cpp"
Ben Cheng5d90c202009-11-22 23:31:11 -080028
29/* Architecture manifest */
Brian Carlstrombbf31b52011-05-05 00:01:58 -070030#include "ArchVariant.cpp"
Ben Cheng5d90c202009-11-22 23:31:11 -080031
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.