From f0e3937b87453234d0d7970b8712082062709b8d Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 12 Nov 2014 17:50:07 +0000 Subject: Do a parallel move in BoundsCheckSlowPath. The two locations of the index and length could overlap, so we need a parallel move. Also factorize the code for doing a parallel move based on two locations. Change-Id: Iee8b3459e2eed6704d45e9a564fb2cd050741ea4 --- compiler/optimizing/code_generator.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 9d172638e1..6b5ec1d6ca 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -632,4 +632,13 @@ void CodeGenerator::ClearSpillSlotsFromLoopPhisInStackMap(HSuspendCheck* suspend } } +void CodeGenerator::EmitParallelMoves(Location from1, Location to1, Location from2, Location to2) { + MoveOperands move1(from1, to1, nullptr); + MoveOperands move2(from2, to2, nullptr); + HParallelMove parallel_move(GetGraph()->GetArena()); + parallel_move.AddMove(&move1); + parallel_move.AddMove(&move2); + GetMoveResolver()->EmitNativeCode(¶llel_move); +} + } // namespace art -- cgit v1.2.3-59-g8ed1b