Support hard float on arm in optimizing compiler.
Also bump oat version, needed after latest hard float switch.
Change-Id: Idf5acfb36c07e74acff00edab998419a3c6b2965
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 0555c00..5350dcb 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -199,6 +199,13 @@
delegate_->InitCompilationUnit(cu);
}
+static bool IsInstructionSetSupported(InstructionSet instruction_set) {
+ return instruction_set == kArm64
+ || (instruction_set == kThumb2 && !kArm32QuickCodeUseSoftFloat)
+ || instruction_set == kX86
+ || instruction_set == kX86_64;
+}
+
CompiledMethod* OptimizingCompiler::TryCompile(const DexFile::CodeItem* code_item,
uint32_t access_flags,
InvokeType invoke_type,
@@ -215,10 +222,7 @@
}
// Do not attempt to compile on architectures we do not support.
- if (instruction_set != kArm64 &&
- instruction_set != kThumb2 &&
- instruction_set != kX86 &&
- instruction_set != kX86_64) {
+ if (!IsInstructionSetSupported(instruction_set)) {
return nullptr;
}
@@ -233,17 +237,6 @@
bool shouldOptimize =
dex_compilation_unit.GetSymbol().find("00024reg_00024") != std::string::npos;
- if (instruction_set == kThumb2 && !kArm32QuickCodeUseSoftFloat) {
- uint32_t shorty_len;
- const char* shorty = dex_compilation_unit.GetShorty(&shorty_len);
- for (uint32_t i = 0; i < shorty_len; ++i) {
- if (shorty[i] == 'D' || shorty[i] == 'F') {
- CHECK(!shouldCompile) << "Hard float ARM32 parameters are not yet supported";
- return nullptr;
- }
- }
- }
-
ArenaPool pool;
ArenaAllocator arena(&pool);
HGraphBuilder builder(&arena, &dex_compilation_unit, &dex_file, GetCompilerDriver());