diff options
Diffstat (limited to 'compiler/optimizing/code_generator_arm.cc')
-rw-r--r-- | compiler/optimizing/code_generator_arm.cc | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/compiler/optimizing/code_generator_arm.cc b/compiler/optimizing/code_generator_arm.cc index c2e9a2e5da..b336c31edd 100644 --- a/compiler/optimizing/code_generator_arm.cc +++ b/compiler/optimizing/code_generator_arm.cc @@ -169,11 +169,14 @@ class BoundsCheckSlowPathARM : public SlowPathCodeARM { virtual void EmitNativeCode(CodeGenerator* codegen) OVERRIDE { CodeGeneratorARM* arm_codegen = down_cast<CodeGeneratorARM*>(codegen); __ Bind(GetEntryLabel()); + // We're moving two locations to locations that could overlap, so we need a parallel + // move resolver. InvokeRuntimeCallingConvention calling_convention; - arm_codegen->Move32( - Location::RegisterLocation(calling_convention.GetRegisterAt(0)), index_location_); - arm_codegen->Move32( - Location::RegisterLocation(calling_convention.GetRegisterAt(1)), length_location_); + codegen->EmitParallelMoves( + index_location_, + Location::RegisterLocation(calling_convention.GetRegisterAt(0)), + length_location_, + Location::RegisterLocation(calling_convention.GetRegisterAt(1))); arm_codegen->InvokeRuntime( QUICK_ENTRY_POINT(pThrowArrayBounds), instruction_, instruction_->GetDexPc()); } @@ -290,16 +293,11 @@ class TypeCheckSlowPathARM : public SlowPathCodeARM { // We're moving two locations to locations that could overlap, so we need a parallel // move resolver. InvokeRuntimeCallingConvention calling_convention; - MoveOperands move1(class_to_check_, - Location::RegisterLocation(calling_convention.GetRegisterAt(0)), - nullptr); - MoveOperands move2(object_class_, - Location::RegisterLocation(calling_convention.GetRegisterAt(1)), - nullptr); - HParallelMove parallel_move(codegen->GetGraph()->GetArena()); - parallel_move.AddMove(&move1); - parallel_move.AddMove(&move2); - arm_codegen->GetMoveResolver()->EmitNativeCode(¶llel_move); + codegen->EmitParallelMoves( + class_to_check_, + Location::RegisterLocation(calling_convention.GetRegisterAt(0)), + object_class_, + Location::RegisterLocation(calling_convention.GetRegisterAt(1))); if (instruction_->IsInstanceOf()) { arm_codegen->InvokeRuntime(QUICK_ENTRY_POINT(pInstanceofNonTrivial), instruction_, dex_pc_); |