Index: src/ia32/lithium-gap-resolver-ia32.cc |
=================================================================== |
--- src/ia32/lithium-gap-resolver-ia32.cc (revision 7649) |
+++ src/ia32/lithium-gap-resolver-ia32.cc (working copy) |
@@ -309,12 +309,15 @@ |
__ mov(dst, src); |
} else if (source->IsDoubleRegister()) { |
- ASSERT(destination->IsDoubleRegister() || |
- destination->IsDoubleStackSlot()); |
XMMRegister src = cgen_->ToDoubleRegister(source); |
- Operand dst = cgen_->ToOperand(destination); |
- __ movdbl(dst, src); |
- |
+ if (destination->IsDoubleRegister()) { |
+ XMMRegister dst = cgen_->ToDoubleRegister(destination); |
+ __ movaps(dst, src); |
+ } else { |
+ ASSERT(destination->IsDoubleStackSlot()); |
+ Operand dst = cgen_->ToOperand(destination); |
+ __ movdbl(dst, src); |
+ } |
} else if (source->IsDoubleStackSlot()) { |
ASSERT(destination->IsDoubleRegister() || |
destination->IsDoubleStackSlot()); |
@@ -391,13 +394,19 @@ |
__ mov(dst, tmp1); |
__ mov(src, tmp0); |
} |
+ } else if (source->IsDoubleRegister() && destination->IsDoubleRegister()) { |
+ // XMM register-register swap. We rely on having xmm0 |
+ // available as a fixed scratch register. |
+ XMMRegister src = cgen_->ToDoubleRegister(source); |
+ XMMRegister dst = cgen_->ToDoubleRegister(destination); |
+ __ movaps(xmm0, src); |
+ __ movaps(src, dst); |
+ __ movaps(dst, xmm0); |
} else if (source->IsDoubleRegister() || destination->IsDoubleRegister()) { |
- // XMM register-register or register-memory. We rely on having xmm0 |
+ // XMM register-memory swap. We rely on having xmm0 |
// available as a fixed scratch register. |
- ASSERT(source->IsDoubleRegister() || source->IsDoubleStackSlot()); |
- ASSERT(destination->IsDoubleRegister() || |
- destination->IsDoubleStackSlot()); |
+ ASSERT(source->IsDoubleStackSlot() || destination->IsDoubleStackSlot()); |
XMMRegister reg = cgen_->ToDoubleRegister(source->IsDoubleRegister() |
? source |
: destination); |