From 2da882315a61072664f7ce3c212307342e907207 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 27 Feb 2014 12:26:20 -0800 Subject: Initial changes towards Generic JNI option Some initial changes that lead to an UNIMPLEMENTED. Works by not compiling for JNI right now and tracking native methods which have neither quick nor portable code. Uses new trampoline. Change-Id: I5448654044eb2717752fd7359f4ef8bd5c17be6e --- compiler/driver/compiler_driver.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'compiler/driver/compiler_driver.cc') diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 501ea7c130..fc22addbf1 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -440,6 +440,11 @@ const std::vector* CompilerDriver::CreatePortableToInterpreterBridge() PORTABLE_ENTRYPOINT_OFFSET(pPortableToInterpreterBridge)); } +const std::vector* CompilerDriver::CreateQuickGenericJniTrampoline() const { + return CreateTrampoline(instruction_set_, kQuickAbi, + QUICK_ENTRYPOINT_OFFSET(pQuickGenericJniTrampoline)); +} + const std::vector* CompilerDriver::CreateQuickImtConflictTrampoline() const { return CreateTrampoline(instruction_set_, kQuickAbi, QUICK_ENTRYPOINT_OFFSET(pQuickImtConflictTrampoline)); @@ -1920,8 +1925,12 @@ void CompilerDriver::CompileMethod(const DexFile::CodeItem* code_item, uint32_t uint64_t start_ns = NanoTime(); if ((access_flags & kAccNative) != 0) { +#if defined(__x86_64__) + // leaving this empty will trigger the generic JNI version +#else compiled_method = compiler_backend_->JniCompile(*this, access_flags, method_idx, dex_file); CHECK(compiled_method != NULL); +#endif } else if ((access_flags & kAccAbstract) != 0) { } else { MethodReference method_ref(&dex_file, method_idx); -- cgit v1.2.3-59-g8ed1b