Chromium Code Reviews| Index: src/ia32/lithium-gap-resolver-ia32.cc |
| =================================================================== |
| --- src/ia32/lithium-gap-resolver-ia32.cc (revision 7644) |
| +++ src/ia32/lithium-gap-resolver-ia32.cc (working copy) |
| @@ -312,9 +312,13 @@ |
| ASSERT(destination->IsDoubleRegister() || |
| destination->IsDoubleStackSlot()); |
| XMMRegister src = cgen_->ToDoubleRegister(source); |
| - Operand dst = cgen_->ToOperand(destination); |
| - __ movdbl(dst, src); |
| - |
| + if (destination->IsDoubleStackSlot()) { |
| + Operand dst = cgen_->ToOperand(destination); |
| + __ movdbl(dst, src); |
| + } else { |
|
Kevin Millikin (Chromium)
2011/04/18 14:02:59
To fit the rest of the code, you should turn the A
fschneider
2011/04/19 09:16:24
Done.
|
| + XMMRegister dst = cgen_->ToDoubleRegister(destination); |
| + __ movaps(dst, src); |
| + } |
| } else if (source->IsDoubleStackSlot()) { |
| ASSERT(destination->IsDoubleRegister() || |
| destination->IsDoubleStackSlot()); |
| @@ -391,13 +395,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); |