From 50fa993d67f8a20322c27c1a77e7efcf826531fc Mon Sep 17 00:00:00 2001 From: Alex Light Date: Mon, 10 Aug 2015 15:30:07 -0700 Subject: Svelter libart-compiler Added new environment variable ART_{TARGET,HOST}_CODEGEN_ARCHS which may be set to 'all', 'svelte' or a space separated list of architectures. When compiled with ART_{TARGET,HOST}_CODEGEN_ARCHS='all' (the default value) dex2oat will be able to generate output for all supported architectures. When compiled with ART_TARGET_CODEGEN_ARCHS='svelte' only the architectures of the TARGET will be included. When ART_HOST_CODEGEN_ARCHS='svelte' all architectures the target includes and the host architectures will be included on the host dex2oat. If a list of architectures is given only those will be included. Change-Id: I87f4ad0131ab1b37544d8799e947ce4733b6daec --- compiler/utils/assembler.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'compiler/utils/assembler.cc') diff --git a/compiler/utils/assembler.cc b/compiler/utils/assembler.cc index 6d8a98931f..496ca95ff9 100644 --- a/compiler/utils/assembler.cc +++ b/compiler/utils/assembler.cc @@ -19,13 +19,25 @@ #include #include +#ifdef ART_ENABLE_CODEGEN_arm #include "arm/assembler_arm32.h" #include "arm/assembler_thumb2.h" +#endif +#ifdef ART_ENABLE_CODEGEN_arm64 #include "arm64/assembler_arm64.h" +#endif +#ifdef ART_ENABLE_CODEGEN_mips #include "mips/assembler_mips.h" +#endif +#ifdef ART_ENABLE_CODEGEN_mips64 #include "mips64/assembler_mips64.h" +#endif +#ifdef ART_ENABLE_CODEGEN_x86 #include "x86/assembler_x86.h" +#endif +#ifdef ART_ENABLE_CODEGEN_x86_64 #include "x86_64/assembler_x86_64.h" +#endif #include "globals.h" #include "memory_region.h" @@ -112,20 +124,32 @@ void DebugFrameOpCodeWriterForAssembler::ImplicitlyAdvancePC() { Assembler* Assembler::Create(InstructionSet instruction_set) { switch (instruction_set) { +#ifdef ART_ENABLE_CODEGEN_arm case kArm: return new arm::Arm32Assembler(); case kThumb2: return new arm::Thumb2Assembler(); +#endif +#ifdef ART_ENABLE_CODEGEN_arm64 case kArm64: return new arm64::Arm64Assembler(); +#endif +#ifdef ART_ENABLE_CODEGEN_mips case kMips: return new mips::MipsAssembler(); +#endif +#ifdef ART_ENABLE_CODEGEN_mips64 case kMips64: return new mips64::Mips64Assembler(); +#endif +#ifdef ART_ENABLE_CODEGEN_x86 case kX86: return new x86::X86Assembler(); +#endif +#ifdef ART_ENABLE_CODEGEN_x86_64 case kX86_64: return new x86_64::X86_64Assembler(); +#endif default: LOG(FATAL) << "Unknown InstructionSet: " << instruction_set; return nullptr; -- cgit v1.2.3-59-g8ed1b