| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 2426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2437 __ Movups(src, kScratchDoubleReg); | 2437 __ Movups(src, kScratchDoubleReg); |
| 2438 __ Xorps(kScratchDoubleReg, dst); // scratch contains src. | 2438 __ Xorps(kScratchDoubleReg, dst); // scratch contains src. |
| 2439 __ Movups(dst, kScratchDoubleReg); | 2439 __ Movups(dst, kScratchDoubleReg); |
| 2440 __ Xorps(kScratchDoubleReg, src); // scratch contains dst. | 2440 __ Xorps(kScratchDoubleReg, src); // scratch contains dst. |
| 2441 __ Movups(src, kScratchDoubleReg); | 2441 __ Movups(src, kScratchDoubleReg); |
| 2442 } | 2442 } |
| 2443 } else if (source->IsFPRegister() && destination->IsFPRegister()) { | 2443 } else if (source->IsFPRegister() && destination->IsFPRegister()) { |
| 2444 // XMM register-register swap. | 2444 // XMM register-register swap. |
| 2445 XMMRegister src = g.ToDoubleRegister(source); | 2445 XMMRegister src = g.ToDoubleRegister(source); |
| 2446 XMMRegister dst = g.ToDoubleRegister(destination); | 2446 XMMRegister dst = g.ToDoubleRegister(destination); |
| 2447 MachineRepresentation rep = LocationOperand::cast(source)->representation(); | 2447 __ Movapd(kScratchDoubleReg, src); |
| 2448 if (rep != MachineRepresentation::kSimd128) { | 2448 __ Movapd(src, dst); |
| 2449 __ Movapd(kScratchDoubleReg, src); | 2449 __ Movapd(dst, kScratchDoubleReg); |
| 2450 __ Movapd(src, dst); | |
| 2451 __ Movapd(dst, kScratchDoubleReg); | |
| 2452 } else { | |
| 2453 __ Movups(kScratchDoubleReg, src); | |
| 2454 __ Movups(src, dst); | |
| 2455 __ Movups(dst, kScratchDoubleReg); | |
| 2456 } | |
| 2457 } else if (source->IsFPRegister() && destination->IsFPStackSlot()) { | 2450 } else if (source->IsFPRegister() && destination->IsFPStackSlot()) { |
| 2458 // XMM register-memory swap. | 2451 // XMM register-memory swap. |
| 2459 XMMRegister src = g.ToDoubleRegister(source); | 2452 XMMRegister src = g.ToDoubleRegister(source); |
| 2460 Operand dst = g.ToOperand(destination); | 2453 Operand dst = g.ToOperand(destination); |
| 2461 MachineRepresentation rep = LocationOperand::cast(source)->representation(); | 2454 MachineRepresentation rep = LocationOperand::cast(source)->representation(); |
| 2462 if (rep != MachineRepresentation::kSimd128) { | 2455 if (rep != MachineRepresentation::kSimd128) { |
| 2463 __ Movsd(kScratchDoubleReg, src); | 2456 __ Movsd(kScratchDoubleReg, src); |
| 2464 __ Movsd(src, dst); | 2457 __ Movsd(src, dst); |
| 2465 __ Movsd(dst, kScratchDoubleReg); | 2458 __ Movsd(dst, kScratchDoubleReg); |
| 2466 } else { | 2459 } else { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2495 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2488 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
| 2496 __ Nop(padding_size); | 2489 __ Nop(padding_size); |
| 2497 } | 2490 } |
| 2498 } | 2491 } |
| 2499 | 2492 |
| 2500 #undef __ | 2493 #undef __ |
| 2501 | 2494 |
| 2502 } // namespace compiler | 2495 } // namespace compiler |
| 2503 } // namespace internal | 2496 } // namespace internal |
| 2504 } // namespace v8 | 2497 } // namespace v8 |
| OLD | NEW |