From a1935c4fa255b5c20f5e9b2abce6be2d0f7cb0a8 Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Fri, 26 Jun 2015 16:12:18 +0100 Subject: MIPS: Initial version of optimizing compiler for MIPS64R6. (cherry picked from commit 4dda3376b71209fae07f5c3c8ac3eb4b54207aa8) (amended for mnc-dev) Bug: 21555893 Change-Id: I874dc356eee6ab061a32f8f3df5f8ac3a4ab7dcf Signed-off-by: Alexey Frunze Signed-off-by: Douglas Leung --- compiler/optimizing/codegen_test.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'compiler/optimizing/codegen_test.cc') diff --git a/compiler/optimizing/codegen_test.cc b/compiler/optimizing/codegen_test.cc index 4db3b43abf..4fbb51d43c 100644 --- a/compiler/optimizing/codegen_test.cc +++ b/compiler/optimizing/codegen_test.cc @@ -20,6 +20,8 @@ #include "arch/arm/instruction_set_features_arm.h" #include "arch/arm/registers_arm.h" #include "arch/arm64/instruction_set_features_arm64.h" +#include "arch/mips64/instruction_set_features_mips64.h" +#include "arch/mips64/registers_mips64.h" #include "arch/x86/instruction_set_features_x86.h" #include "arch/x86/registers_x86.h" #include "arch/x86_64/instruction_set_features_x86_64.h" @@ -27,6 +29,7 @@ #include "builder.h" #include "code_generator_arm.h" #include "code_generator_arm64.h" +#include "code_generator_mips64.h" #include "code_generator_x86.h" #include "code_generator_x86_64.h" #include "common_compiler_test.h" @@ -40,6 +43,7 @@ #include "ssa_liveness_analysis.h" #include "utils.h" #include "utils/arm/managed_register_arm.h" +#include "utils/mips64/managed_register_mips64.h" #include "utils/x86/managed_register_x86.h" #include "gtest/gtest.h" @@ -172,6 +176,14 @@ static void RunCodeBaseline(HGraph* graph, bool has_result, Expected expected) { if (kRuntimeISA == kArm64) { Run(allocator, codegenARM64, has_result, expected); } + + std::unique_ptr features_mips64( + Mips64InstructionSetFeatures::FromCppDefines()); + mips64::CodeGeneratorMIPS64 codegenMIPS64(graph, *features_mips64.get(), compiler_options); + codegenMIPS64.CompileBaseline(&allocator, true); + if (kRuntimeISA == kMips64) { + Run(allocator, codegenMIPS64, has_result, expected); + } } template @@ -222,6 +234,11 @@ static void RunCodeOptimized(HGraph* graph, X86_64InstructionSetFeatures::FromCppDefines()); x86_64::CodeGeneratorX86_64 codegenX86_64(graph, *features_x86_64.get(), compiler_options); RunCodeOptimized(&codegenX86_64, graph, hook_before_codegen, has_result, expected); + } else if (kRuntimeISA == kMips64) { + std::unique_ptr features_mips64( + Mips64InstructionSetFeatures::FromCppDefines()); + mips64::CodeGeneratorMIPS64 codegenMIPS64(graph, *features_mips64.get(), compiler_options); + RunCodeOptimized(&codegenMIPS64, graph, hook_before_codegen, has_result, expected); } } -- cgit v1.2.3-59-g8ed1b