Index: src/crankshaft/x64/lithium-gap-resolver-x64.cc |
diff --git a/src/crankshaft/x64/lithium-gap-resolver-x64.cc b/src/crankshaft/x64/lithium-gap-resolver-x64.cc |
index cc65f188cebad2d047b2f24eeb4558fb5ba2f052..3808c377dc1f17b172549817d5240f1a14679216 100644 |
--- a/src/crankshaft/x64/lithium-gap-resolver-x64.cc |
+++ b/src/crankshaft/x64/lithium-gap-resolver-x64.cc |
@@ -244,7 +244,9 @@ void LGapResolver::EmitSwap(int index) { |
// Swap two general-purpose registers. |
Register src = cgen_->ToRegister(source); |
Register dst = cgen_->ToRegister(destination); |
- __ xchgq(dst, src); |
+ __ movp(kScratchRegister, src); |
+ __ movp(src, dst); |
+ __ movp(dst, kScratchRegister); |
} else if ((source->IsRegister() && destination->IsStackSlot()) || |
(source->IsStackSlot() && destination->IsRegister())) { |