diff options
Diffstat (limited to 'vm/compiler/codegen/x86/ia32')
-rw-r--r-- | vm/compiler/codegen/x86/ia32/ArchVariant.cpp (renamed from vm/compiler/codegen/x86/ia32/ArchVariant.c) | 19 | ||||
-rw-r--r-- | vm/compiler/codegen/x86/ia32/ArchVariant.h | 4 | ||||
-rw-r--r-- | vm/compiler/codegen/x86/ia32/Codegen.cpp (renamed from vm/compiler/codegen/x86/ia32/Codegen.c) | 12 |
3 files changed, 18 insertions, 17 deletions
diff --git a/vm/compiler/codegen/x86/ia32/ArchVariant.c b/vm/compiler/codegen/x86/ia32/ArchVariant.cpp index 90f14a33a..5ccd26d0f 100644 --- a/vm/compiler/codegen/x86/ia32/ArchVariant.c +++ b/vm/compiler/codegen/x86/ia32/ArchVariant.cpp @@ -14,6 +14,8 @@ * limitations under the License. */ +extern "C" void dvmCompilerTemplateStart(void); + /* * This file is included by Codegen-x86.c, and implements architecture * variant-specific code. @@ -28,16 +30,15 @@ JitInstructionSetType dvmCompilerInstructionSet(void) return DALVIK_JIT_IA32; } -/* Architecture-specific initializations and checks go here */ -bool dvmCompilerArchVariantInit(void) -{ - /* First, declare dvmCompiler_TEMPLATE_XXX for each template */ -#define JIT_TEMPLATE(X) extern void dvmCompiler_TEMPLATE_##X(); +/* First, declare dvmCompiler_TEMPLATE_XXX for each template */ +#define JIT_TEMPLATE(X) extern "C" void dvmCompiler_TEMPLATE_##X(); #include "../../../template/ia32/TemplateOpList.h" #undef JIT_TEMPLATE +/* Architecture-specific initializations and checks go here */ +bool dvmCompilerArchVariantInit(void) +{ int i = 0; - extern void dvmCompilerTemplateStart(void); /* * Then, populate the templateEntryOffsets array with the offsets from the @@ -63,9 +64,9 @@ bool dvmCompilerArchVariantInit(void) /* Codegen-specific assumptions */ assert(offsetof(ClassObject, vtable) < 128 && (offsetof(ClassObject, vtable) & 0x3) == 0); - assert(offsetof(ArrayObject, length) < 128 && - (offsetof(ArrayObject, length) & 0x3) == 0); - assert(offsetof(ArrayObject, contents) < 256); + assert(OFFSETOF_MEMBER(ArrayObject, length) < 128 && + (OFFSETOF_MEMBER(ArrayObject, length) & 0x3) == 0); + assert(OFFSETOF_MEMBER(ArrayObject, contents) < 256); /* Up to 5 args are pushed on top of FP - sizeofStackSaveArea */ assert(sizeof(StackSaveArea) < 236); diff --git a/vm/compiler/codegen/x86/ia32/ArchVariant.h b/vm/compiler/codegen/x86/ia32/ArchVariant.h index e4eebf3b4..c5ce38e28 100644 --- a/vm/compiler/codegen/x86/ia32/ArchVariant.h +++ b/vm/compiler/codegen/x86/ia32/ArchVariant.h @@ -19,7 +19,7 @@ /* Create the TemplateOpcode enum */ #define JIT_TEMPLATE(X) TEMPLATE_##X, -typedef enum { +enum TemplateOpcode { #include "../../../template/ia32/TemplateOpList.h" /* * For example, @@ -28,7 +28,7 @@ typedef enum { * ... */ TEMPLATE_LAST_MARK, -} TemplateOpcode; +}; #undef JIT_TEMPLATE #endif /* _DALVIK_VM_COMPILER_CODEGEN_X86_IA32_ARCHVARIANT_H */ diff --git a/vm/compiler/codegen/x86/ia32/Codegen.c b/vm/compiler/codegen/x86/ia32/Codegen.cpp index 4c2a759f5..ae55cd111 100644 --- a/vm/compiler/codegen/x86/ia32/Codegen.c +++ b/vm/compiler/codegen/x86/ia32/Codegen.cpp @@ -28,18 +28,18 @@ #include "ArchVariant.h" /* Architectural independent building blocks */ -//#include "../CodegenCommon.c" +//#include "../CodegenCommon.cpp" /* Architectural independent building blocks */ -//#include "../Thumb/Factory.c" +//#include "../Thumb/Factory.cpp" /* Factory utilities dependent on arch-specific features */ -//#include "../CodegenFactory.c" +//#include "../CodegenFactory.cpp" /* ia32 register allocation */ -//#include "../ia32/Ralloc.c" +//#include "../ia32/Ralloc.cpp" /* MIR2LIR dispatcher and architectural independent codegen routines */ -#include "../CodegenDriver.c" +#include "../CodegenDriver.cpp" /* Architecture manifest */ -#include "ArchVariant.c" +#include "ArchVariant.cpp" |