summaryrefslogtreecommitdiff
path: root/compiler/optimizing/parallel_move_resolver.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-04-15 11:56:51 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2015-04-15 12:53:42 +0100
commit9021825d1e73998b99c81e89c73796f6f2845471 (patch)
tree13e1038931cbb8bf8b8d0f4e3f51553ba1bfa983 /compiler/optimizing/parallel_move_resolver.cc
parent858d28ca2e73a785977f53141e775a7d4841b89d (diff)
Type MoveOperands.
The ParallelMoveResolver implementation needs to know if a move is for 64bits or not, to handle swaps correctly. Bug found, and test case courtesy of Serguei I. Katkov. Change-Id: I9a0917a1cfed398c07e57ad6251aea8c9b0b8506
Diffstat (limited to 'compiler/optimizing/parallel_move_resolver.cc')
-rw-r--r--compiler/optimizing/parallel_move_resolver.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/optimizing/parallel_move_resolver.cc b/compiler/optimizing/parallel_move_resolver.cc
index 4936685367..0c7f0da611 100644
--- a/compiler/optimizing/parallel_move_resolver.cc
+++ b/compiler/optimizing/parallel_move_resolver.cc
@@ -189,9 +189,9 @@ MoveOperands* ParallelMoveResolver::PerformMove(size_t index) {
const MoveOperands& other_move = *moves_.Get(i);
if (other_move.Blocks(destination)) {
DCHECK(other_move.IsPending());
- if (!destination.IsPair() && other_move.GetSource().IsPair()) {
- // We swap pairs before swapping non-pairs. Go back from the
- // cycle by returning the pair that must be swapped.
+ if (!move->Is64BitMove() && other_move.Is64BitMove()) {
+ // We swap 64bits moves before swapping 32bits moves. Go back from the
+ // cycle by returning the move that must be swapped.
return moves_.Get(i);
}
do_swap = true;
@@ -216,7 +216,7 @@ MoveOperands* ParallelMoveResolver::PerformMove(size_t index) {
UpdateSourceOf(moves_.Get(i), swap_destination, source);
}
}
- // If the swap was required because of a pair in the middle of a cycle,
+ // If the swap was required because of a 64bits move in the middle of a cycle,
// we return the swapped move, so that the caller knows it needs to re-iterate
// its dependency loop.
return required_swap;