diff options
author | Brian Carlstrom <bdc@google.com> | 2011-05-05 00:01:58 -0700 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2011-05-05 14:49:03 -0700 |
commit | bbf31b58c50fb892423b7fef0d8c1093bd0c1a6c (patch) | |
tree | da5cb21f3c53e2b67ef6046e722a15ac4db8da9e /vm/compiler/codegen/x86 | |
parent | 00ceb87d1c57ccee59966be4deef1292a049285c (diff) | |
parent | a17fcc1899d097ee5e6722740d5a60ad3f0313e5 (diff) | |
download | android_dalvik-bbf31b58c50fb892423b7fef0d8c1093bd0c1a6c.tar.gz android_dalvik-bbf31b58c50fb892423b7fef0d8c1093bd0c1a6c.tar.bz2 android_dalvik-bbf31b58c50fb892423b7fef0d8c1093bd0c1a6c.zip |
Merge remote branch 'goog/dalvik-dev' into dalvik-dev-to-master
Change-Id: I99c4289bd34f63b0b970b6ed0fa992b44e805393
Diffstat (limited to 'vm/compiler/codegen/x86')
-rw-r--r-- | vm/compiler/codegen/x86/ArchUtility.cpp (renamed from vm/compiler/codegen/x86/ArchUtility.c) | 0 | ||||
-rw-r--r-- | vm/compiler/codegen/x86/Assemble.cpp (renamed from vm/compiler/codegen/x86/Assemble.c) | 0 | ||||
-rw-r--r-- | vm/compiler/codegen/x86/CalloutHelper.h | 2 | ||||
-rw-r--r-- | vm/compiler/codegen/x86/CodegenDriver.cpp (renamed from vm/compiler/codegen/x86/CodegenDriver.c) | 0 | ||||
-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 |
7 files changed, 19 insertions, 18 deletions
diff --git a/vm/compiler/codegen/x86/ArchUtility.c b/vm/compiler/codegen/x86/ArchUtility.cpp index f7c48d628..f7c48d628 100644 --- a/vm/compiler/codegen/x86/ArchUtility.c +++ b/vm/compiler/codegen/x86/ArchUtility.cpp diff --git a/vm/compiler/codegen/x86/Assemble.c b/vm/compiler/codegen/x86/Assemble.cpp index 03edbf109..03edbf109 100644 --- a/vm/compiler/codegen/x86/Assemble.c +++ b/vm/compiler/codegen/x86/Assemble.cpp diff --git a/vm/compiler/codegen/x86/CalloutHelper.h b/vm/compiler/codegen/x86/CalloutHelper.h index a64f017fe..52c030fea 100644 --- a/vm/compiler/codegen/x86/CalloutHelper.h +++ b/vm/compiler/codegen/x86/CalloutHelper.h @@ -54,6 +54,6 @@ Object* dvmAllocObject(ClassObject* clazz, int flags); // OP_NEW_INSTANCE * Functions declared in gDvmInlineOpsTable[] are used for * OP_EXECUTE_INLINE & OP_EXECUTE_INLINE_RANGE. */ -double sqrt(double x); // INLINE_MATH_SQRT +extern "C" double sqrt(double x); // INLINE_MATH_SQRT #endif /* _DALVIK_VM_COMPILER_CODEGEN_X86_CALLOUT_HELPER_H */ diff --git a/vm/compiler/codegen/x86/CodegenDriver.c b/vm/compiler/codegen/x86/CodegenDriver.cpp index a5ef56afb..a5ef56afb 100644 --- a/vm/compiler/codegen/x86/CodegenDriver.c +++ b/vm/compiler/codegen/x86/CodegenDriver.cpp 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" |