From cff8cc7818dd901d3667025ad0ff654100bbb629 Mon Sep 17 00:00:00 2001 From: Calin Juravle Date: Fri, 9 Oct 2015 12:03:24 +0100 Subject: Don't check for optimizing test marker on unsupported ISAs. Change-Id: I39b31e770f4a9f1f5806cc4b28009e2f1908ad43 --- compiler/optimizing/optimizing_compiler.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/optimizing_compiler.cc') diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index a34717c3fa..b501980dbe 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -358,7 +358,8 @@ bool OptimizingCompiler::CanCompileMethod(uint32_t method_idx ATTRIBUTE_UNUSED, } static bool IsInstructionSetSupported(InstructionSet instruction_set) { - return instruction_set == kArm64 + return (instruction_set == kArm && !kArm32QuickCodeUseSoftFloat) + || instruction_set == kArm64 || (instruction_set == kThumb2 && !kArm32QuickCodeUseSoftFloat) || instruction_set == kMips64 || instruction_set == kX86 @@ -670,6 +671,7 @@ CompiledMethod* OptimizingCompiler::TryCompile(const DexFile::CodeItem* code_ite MaybeRecordStat(MethodCompilationStat::kAttemptCompilation); CompilerDriver* compiler_driver = GetCompilerDriver(); InstructionSet instruction_set = compiler_driver->GetInstructionSet(); + // Always use the thumb2 assembler: some runtime functionality (like implicit stack // overflow checks) assume thumb2. if (instruction_set == kArm) { @@ -851,7 +853,9 @@ CompiledMethod* OptimizingCompiler::Compile(const DexFile::CodeItem* code_item, } } - if (kIsDebugBuild && IsCompilingWithCoreImage()) { + if (kIsDebugBuild && + IsCompilingWithCoreImage() && + IsInstructionSetSupported(compiler_driver->GetInstructionSet())) { // For testing purposes, we put a special marker on method names that should be compiled // with this compiler. This makes sure we're not regressing. std::string method_name = PrettyMethod(method_idx, dex_file); -- cgit v1.2.3-59-g8ed1b