From 1aa559d49b55b72de2da77734dc69704733af269 Mon Sep 17 00:00:00 2001 From: Matthew Gharrity Date: Thu, 11 Aug 2016 17:20:05 -0700 Subject: Use TestCodeGeneratorX86 in codegen unit tests The codegen unit tests are supposed to use special "test" code generators when targeting ARM and x86 (due to differing calling conventions between the C++ source code and the generated code), yet TestCodeGeneratorX86 was not being used. This fixes that. (The tests were only succeeding because the register allocator happened to not assign the EBX register.) Test: m test-art-host-gtest-codegen_test Change-Id: Ia3dd6998c38e9ff27b8c2734457f86b3fed44ab4 --- compiler/optimizing/codegen_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/optimizing/codegen_test.cc') diff --git a/compiler/optimizing/codegen_test.cc b/compiler/optimizing/codegen_test.cc index fe9a7af250..18db507c48 100644 --- a/compiler/optimizing/codegen_test.cc +++ b/compiler/optimizing/codegen_test.cc @@ -247,7 +247,7 @@ static void RunCode(InstructionSet target_isa, } else if (target_isa == kX86) { std::unique_ptr features_x86( X86InstructionSetFeatures::FromCppDefines()); - x86::CodeGeneratorX86 codegenX86(graph, *features_x86.get(), compiler_options); + TestCodeGeneratorX86 codegenX86(graph, *features_x86.get(), compiler_options); RunCode(&codegenX86, graph, hook_before_codegen, has_result, expected); } else if (target_isa == kX86_64) { std::unique_ptr features_x86_64( -- cgit v1.2.3