OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/crankshaft/x87/lithium-gap-resolver-x87.h" | 7 #include "src/crankshaft/x87/lithium-gap-resolver-x87.h" |
8 #include "src/register-configuration.h" | 8 #include "src/register-configuration.h" |
9 | 9 |
10 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 10 #include "src/crankshaft/x87/lithium-codegen-x87.h" |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 LOperand* destination = moves_[index].destination(); | 367 LOperand* destination = moves_[index].destination(); |
368 EnsureRestored(source); | 368 EnsureRestored(source); |
369 EnsureRestored(destination); | 369 EnsureRestored(destination); |
370 | 370 |
371 // Dispatch on the source and destination operand kinds. Not all | 371 // Dispatch on the source and destination operand kinds. Not all |
372 // combinations are possible. | 372 // combinations are possible. |
373 if (source->IsRegister() && destination->IsRegister()) { | 373 if (source->IsRegister() && destination->IsRegister()) { |
374 // Register-register. | 374 // Register-register. |
375 Register src = cgen_->ToRegister(source); | 375 Register src = cgen_->ToRegister(source); |
376 Register dst = cgen_->ToRegister(destination); | 376 Register dst = cgen_->ToRegister(destination); |
377 __ xchg(dst, src); | 377 __ push(src); |
| 378 __ mov(src, dst); |
| 379 __ pop(dst); |
378 | 380 |
379 } else if ((source->IsRegister() && destination->IsStackSlot()) || | 381 } else if ((source->IsRegister() && destination->IsStackSlot()) || |
380 (source->IsStackSlot() && destination->IsRegister())) { | 382 (source->IsStackSlot() && destination->IsRegister())) { |
381 // Register-memory. Use a free register as a temp if possible. Do not | 383 // Register-memory. Use a free register as a temp if possible. Do not |
382 // spill on demand because the simple spill implementation cannot avoid | 384 // spill on demand because the simple spill implementation cannot avoid |
383 // spilling src at this point. | 385 // spilling src at this point. |
384 Register tmp = GetFreeRegisterNot(no_reg); | 386 Register tmp = GetFreeRegisterNot(no_reg); |
385 Register reg = | 387 Register reg = |
386 cgen_->ToRegister(source->IsRegister() ? source : destination); | 388 cgen_->ToRegister(source->IsRegister() ? source : destination); |
387 Operand mem = | 389 Operand mem = |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 source_uses_[destination->index()] = CountSourceUses(destination); | 453 source_uses_[destination->index()] = CountSourceUses(destination); |
452 } | 454 } |
453 } | 455 } |
454 | 456 |
455 #undef __ | 457 #undef __ |
456 | 458 |
457 } // namespace internal | 459 } // namespace internal |
458 } // namespace v8 | 460 } // namespace v8 |
459 | 461 |
460 #endif // V8_TARGET_ARCH_X87 | 462 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |