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
} else if (target_isa == kX86) {
std::unique_ptr<const X86InstructionSetFeatures> 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<const X86_64InstructionSetFeatures> features_x86_64(