OSDN Git Service

Restructure the codegen to make architectural depedency explicit.
authorBen Cheng <bccheng@google.com>
Mon, 23 Nov 2009 07:31:11 +0000 (23:31 -0800)
committerBen Cheng <bccheng@google.com>
Mon, 23 Nov 2009 07:31:11 +0000 (23:31 -0800)
commit5d90c20bd7903d7bba966b224e576bf137bf8b4b
tree0e83785f8132c4397aa9438325c1503e37a54b0e
parentec6029afbfb9aafec2b54b447dff7ddef81e49f5
Restructure the codegen to make architectural depedency explicit.

The original Codegen.c is broken into three components:

- CodegenCommon.c (arch-independend)
- CodegenFactory.c (Thumb1/2 dependent)
- CodegenDriver.c (Dalvik dependent)

For the Thumb/Thumb2 directories, each contain the followin three files:

- Factory.c (low-level routines for instruction selections)
- Gen.c     (invoke the ISA-specific instruction selection routines)
- Ralloc.c  (arch-dependent register pools)

The FP directory contains FP-specific codegen routines depending on
Thumb/Thumb2/VFP/PortableFP:

- Thumb2VFP.c
- ThumbVFP.c
- ThumbPortableFP.c

Then the hierarchy is formed by stacking these files in the following top-down
order:

1 CodegenCommon.c
2 Thumb[2]/Factory.c
3 CodegenFactory.c
4 Thumb[2]/Gen.c
5 FP stuff
6 Thumb[2]/Ralloc.c
7 CodegenDriver.c
32 files changed:
vm/Dvm.mk
vm/compiler/CompilerUtility.h
vm/compiler/Frontend.c
vm/compiler/codegen/CompilerCodegen.h
vm/compiler/codegen/arm/ArmLIR.h
vm/compiler/codegen/arm/Codegen-armv5te-vfp.c [deleted file]
vm/compiler/codegen/arm/Codegen-armv5te.c [deleted file]
vm/compiler/codegen/arm/Codegen-armv7-a.c [deleted file]
vm/compiler/codegen/arm/Codegen.h
vm/compiler/codegen/arm/CodegenCommon.c [new file with mode: 0644]
vm/compiler/codegen/arm/CodegenDriver.c [moved from vm/compiler/codegen/arm/Codegen.c with 86% similarity]
vm/compiler/codegen/arm/CodegenFactory.c [new file with mode: 0644]
vm/compiler/codegen/arm/FP/Thumb2VFP.c [new file with mode: 0644]
vm/compiler/codegen/arm/FP/ThumbPortableFP.c [new file with mode: 0644]
vm/compiler/codegen/arm/FP/ThumbVFP.c [new file with mode: 0644]
vm/compiler/codegen/arm/LocalOptimizations.c
vm/compiler/codegen/arm/README.txt [new file with mode: 0644]
vm/compiler/codegen/arm/Ralloc.h [new file with mode: 0644]
vm/compiler/codegen/arm/RallocUtil.c
vm/compiler/codegen/arm/Thumb/Factory.c [moved from vm/compiler/codegen/arm/ThumbUtil.c with 68% similarity]
vm/compiler/codegen/arm/Thumb/Gen.c [new file with mode: 0644]
vm/compiler/codegen/arm/Thumb/Ralloc.c [new file with mode: 0644]
vm/compiler/codegen/arm/Thumb2/Factory.c [moved from vm/compiler/codegen/arm/Thumb2Util.c with 68% similarity]
vm/compiler/codegen/arm/Thumb2/Gen.c [new file with mode: 0644]
vm/compiler/codegen/arm/Thumb2/Ralloc.c [new file with mode: 0644]
vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.c
vm/compiler/codegen/arm/armv5te-vfp/Codegen.c [new file with mode: 0644]
vm/compiler/codegen/arm/armv5te/ArchVariant.c
vm/compiler/codegen/arm/armv5te/Codegen.c [new file with mode: 0644]
vm/compiler/codegen/arm/armv7-a/ArchVariant.c
vm/compiler/codegen/arm/armv7-a/Codegen.c [new file with mode: 0644]
vm/interp/Jit.c