From f9487c039efb4112616d438593a2ab02792e0304 Mon Sep 17 00:00:00 2001 From: Dave Allison Date: Tue, 8 Apr 2014 23:08:12 +0000 Subject: Revert "Revert "Use trampolines for calls to helpers"" This reverts commit 081f73e888b3c246cf7635db37b7f1105cf1a2ff. Change-Id: Ibd777f8ce73cf8ed6c4cb81d50bf6437ac28cb61 Conflicts: compiler/dex/quick/mir_to_lir.h --- compiler/driver/compiler_driver.cc | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'compiler/driver/compiler_driver.cc') diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index b66082dedd..ba15d2a45d 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -22,6 +22,8 @@ #include #include +#include "arch/arm/final_relocations_arm.h" +#include "base/hex_dump.h" #include "base/stl_util.h" #include "base/timing_logger.h" #include "class_linker.h" @@ -504,6 +506,7 @@ void CompilerDriver::CompileAll(jobject class_loader, UniquePtr thread_pool(new ThreadPool("Compiler driver thread pool", thread_count_ - 1)); PreCompile(class_loader, dex_files, thread_pool.get(), timings); Compile(class_loader, dex_files, thread_pool.get(), timings); + PostCompile(); if (dump_stats_) { stats_->Dump(); } @@ -615,6 +618,10 @@ void CompilerDriver::PreCompile(jobject class_loader, const std::vector(offset)); + break; + default: + UNIMPLEMENTED(FATAL) << "No entrypoint trampolines for this architecture"; + } + } +} + + void CompilerDriver::AddCodePatch(const DexFile* dex_file, uint16_t referrer_class_def_idx, uint32_t referrer_method_idx, @@ -2071,4 +2099,17 @@ bool CompilerDriver::SkipCompilation(const std::string& method_name) { } return !compile; } + +FinalEntrypointRelocationSet* CompilerDriver::AllocateFinalEntrypointRelocationSet( + CompilationUnit* cu) const { + switch (instruction_set_) { + case kArm: + case kThumb2: + return new FinalEntrypointRelocationSetArm(this); + default: + UNIMPLEMENTED(FATAL) << "Cannot allocate FinalEntrypointRelocationSet for non-ARM"; + return nullptr; + } +} + } // namespace art -- cgit v1.2.3-59-g8ed1b