summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
authorScott Wakeling <scott.wakeling@linaro.org>2016-07-26 10:33:29 +0100
committerScott Wakeling <scott.wakeling@linaro.org>2016-09-15 16:17:01 +0100
commitb138dfbd76f9d8b64fb9dbaf1a7c25e2549b2a8c (patch)
treea3765fd2bd7e5ddd7ec81adab1ec36859f193d94 /compiler/optimizing/code_generator.cc
parent5cfaafbda5d2de57e311cfc9051f8d817091e950 (diff)
ARM: VIXL32: Add an initial code generator that passes codegen_tests.
This VIXL32-based code generator is not enabled in the optimizing compiler by default. Changes in codegen_test.cc test it in parallel with the existing ARM backend. This patch provides a base for further work, the new backend will not be enabled in the optimizing compiler until parity is proven with the current ARM backend and assembler. Test: gtest-codegen_test on host and target Change-Id: Id556a975b2645bf1d98ab2984650e8435b2312c2
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc19
1 files changed, 14 insertions, 5 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index 2087888f4e..1444931b9c 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -18,6 +18,7 @@
#ifdef ART_ENABLE_CODEGEN_arm
#include "code_generator_arm.h"
+#include "code_generator_arm_vixl.h"
#endif
#ifdef ART_ENABLE_CODEGEN_arm64
@@ -575,11 +576,19 @@ std::unique_ptr<CodeGenerator> CodeGenerator::Create(HGraph* graph,
#ifdef ART_ENABLE_CODEGEN_arm
case kArm:
case kThumb2: {
- return std::unique_ptr<CodeGenerator>(
- new (arena) arm::CodeGeneratorARM(graph,
- *isa_features.AsArmInstructionSetFeatures(),
- compiler_options,
- stats));
+ if (kArmUseVIXL32) {
+ return std::unique_ptr<CodeGenerator>(
+ new (arena) arm::CodeGeneratorARMVIXL(graph,
+ *isa_features.AsArmInstructionSetFeatures(),
+ compiler_options,
+ stats));
+ } else {
+ return std::unique_ptr<CodeGenerator>(
+ new (arena) arm::CodeGeneratorARM(graph,
+ *isa_features.AsArmInstructionSetFeatures(),
+ compiler_options,
+ stats));
+ }
}
#endif
#ifdef ART_ENABLE_CODEGEN_arm64