Use movaps instead of movsd in the gap resolver on ia32 as well.

This is ok since we don't care about preserving the upper half
of xmm registers in Crankshaft code.
Review URL: http://codereview.chromium.org/6880007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7660 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6b7a4f15
......@@ -309,12 +309,15 @@ void LGapResolver::EmitMove(int index) {
__ mov(dst, src);
} else if (source->IsDoubleRegister()) {
ASSERT(destination->IsDoubleRegister() ||
destination->IsDoubleStackSlot());
XMMRegister src = cgen_->ToDoubleRegister(source);
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 @@ void LGapResolver::EmitSwap(int index) {
__ 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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment