summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-11-12 17:50:07 +0000
committerNicolas Geoffray <ngeoffray@google.com>2014-11-12 17:55:24 +0000
commitf0e3937b87453234d0d7970b8712082062709b8d (patch)
treee552c1173ee90fea1d2ba11cc08878efe65ba0be /compiler/optimizing/code_generator.cc
parent59321e0e10ea09694efecf6154704e2743b9bffd (diff)
downloadandroid_art-f0e3937b87453234d0d7970b8712082062709b8d.tar.gz
android_art-f0e3937b87453234d0d7970b8712082062709b8d.tar.bz2
android_art-f0e3937b87453234d0d7970b8712082062709b8d.zip
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
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc9
1 files changed, 9 insertions, 0 deletions
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(&parallel_move);
+}
+
} // namespace art