[Turbofan] Register-register swap for x64 can use movapd instruction.

LOG=N
BUG=v8:4124

Review-Url: https://codereview.chromium.org/2144613002
Cr-Commit-Position: refs/heads/master@{#37684}
This commit is contained in:
bbudge 2016-07-12 08:02:51 -07:00 committed by Commit bot
parent 27d810e63b
commit 0ddd158b74

View File

@ -2444,16 +2444,9 @@ void CodeGenerator::AssembleSwap(InstructionOperand* source,
// XMM register-register swap.
XMMRegister src = g.ToDoubleRegister(source);
XMMRegister dst = g.ToDoubleRegister(destination);
MachineRepresentation rep = LocationOperand::cast(source)->representation();
if (rep != MachineRepresentation::kSimd128) {
__ Movapd(kScratchDoubleReg, src);
__ Movapd(src, dst);
__ Movapd(dst, kScratchDoubleReg);
} else {
__ Movups(kScratchDoubleReg, src);
__ Movups(src, dst);
__ Movups(dst, kScratchDoubleReg);
}
__ Movapd(kScratchDoubleReg, src);
__ Movapd(src, dst);
__ Movapd(dst, kScratchDoubleReg);
} else if (source->IsFPRegister() && destination->IsFPStackSlot()) {
// XMM register-memory swap.
XMMRegister src = g.ToDoubleRegister(source);