diff options
| -rw-r--r-- | compiler/dex/frontend.cc | 11 | ||||
| -rw-r--r-- | compiler/elf_writer_quick.cc | 3 |
2 files changed, 9 insertions, 5 deletions
diff --git a/compiler/dex/frontend.cc b/compiler/dex/frontend.cc index e48e5bf122..201dc47bf7 100644 --- a/compiler/dex/frontend.cc +++ b/compiler/dex/frontend.cc @@ -155,13 +155,16 @@ static CompiledMethod* CompileMethod(CompilerDriver& driver, cu.compiler_driver = &driver; cu.class_linker = class_linker; cu.instruction_set = driver.GetInstructionSet(); + if (cu.instruction_set == kArm) { + cu.instruction_set = kThumb2; + } cu.target64 = (cu.instruction_set == kX86_64) || (cu.instruction_set == kArm64); cu.compiler = compiler; // TODO: x86_64 & arm64 are not yet implemented. - DCHECK((cu.instruction_set == kThumb2) || - (cu.instruction_set == kX86) || - (cu.instruction_set == kX86_64) || - (cu.instruction_set == kMips)); + CHECK((cu.instruction_set == kThumb2) || + (cu.instruction_set == kX86) || + (cu.instruction_set == kX86_64) || + (cu.instruction_set == kMips)); /* Adjust this value accordingly once inlining is performed */ diff --git a/compiler/elf_writer_quick.cc b/compiler/elf_writer_quick.cc index f6a324f8e8..e88ed42380 100644 --- a/compiler/elf_writer_quick.cc +++ b/compiler/elf_writer_quick.cc @@ -367,6 +367,8 @@ bool ElfWriterQuick::Write(OatWriter* oat_writer, elf_header.e_ident[EI_ABIVERSION] = 0; elf_header.e_type = ET_DYN; switch (compiler_driver_->GetInstructionSet()) { + case kArm: + // Fall through. case kThumb2: { elf_header.e_machine = EM_ARM; elf_header.e_flags = EF_ARM_EABI_VER5; @@ -396,7 +398,6 @@ bool ElfWriterQuick::Write(OatWriter* oat_writer, EF_MIPS_ARCH_32R2); break; } - case kArm: default: { LOG(FATAL) << "Unknown instruction set: " << compiler_driver_->GetInstructionSet(); break; |