OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 // XMM register-memory swap. We rely on having xmm0 | 481 // XMM register-memory swap. We rely on having xmm0 |
482 // available as a fixed scratch register. | 482 // available as a fixed scratch register. |
483 ASSERT(source->IsDoubleStackSlot() || destination->IsDoubleStackSlot()); | 483 ASSERT(source->IsDoubleStackSlot() || destination->IsDoubleStackSlot()); |
484 XMMRegister reg = cgen_->ToDoubleRegister(source->IsDoubleRegister() | 484 XMMRegister reg = cgen_->ToDoubleRegister(source->IsDoubleRegister() |
485 ? source | 485 ? source |
486 : destination); | 486 : destination); |
487 Operand other = | 487 Operand other = |
488 cgen_->ToOperand(source->IsDoubleRegister() ? destination : source); | 488 cgen_->ToOperand(source->IsDoubleRegister() ? destination : source); |
489 __ movsd(xmm0, other); | 489 __ movsd(xmm0, other); |
490 __ movsd(other, reg); | 490 __ movsd(other, reg); |
491 __ movsd(reg, Operand(xmm0)); | 491 __ movaps(reg, xmm0); |
492 } else if (source->IsDoubleStackSlot() && destination->IsDoubleStackSlot()) { | 492 } else if (source->IsDoubleStackSlot() && destination->IsDoubleStackSlot()) { |
493 CpuFeatureScope scope(cgen_->masm(), SSE2); | 493 CpuFeatureScope scope(cgen_->masm(), SSE2); |
494 // Double-width memory-to-memory. Spill on demand to use a general | 494 // Double-width memory-to-memory. Spill on demand to use a general |
495 // purpose temporary register and also rely on having xmm0 available as | 495 // purpose temporary register and also rely on having xmm0 available as |
496 // a fixed scratch register. | 496 // a fixed scratch register. |
497 Register tmp = EnsureTempRegister(); | 497 Register tmp = EnsureTempRegister(); |
498 Operand src0 = cgen_->ToOperand(source); | 498 Operand src0 = cgen_->ToOperand(source); |
499 Operand src1 = cgen_->HighOperand(source); | 499 Operand src1 = cgen_->HighOperand(source); |
500 Operand dst0 = cgen_->ToOperand(destination); | 500 Operand dst0 = cgen_->ToOperand(destination); |
501 Operand dst1 = cgen_->HighOperand(destination); | 501 Operand dst1 = cgen_->HighOperand(destination); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 } else if (destination->IsRegister()) { | 540 } else if (destination->IsRegister()) { |
541 source_uses_[destination->index()] = CountSourceUses(destination); | 541 source_uses_[destination->index()] = CountSourceUses(destination); |
542 } | 542 } |
543 } | 543 } |
544 | 544 |
545 #undef __ | 545 #undef __ |
546 | 546 |
547 } } // namespace v8::internal | 547 } } // namespace v8::internal |
548 | 548 |
549 #endif // V8_TARGET_ARCH_IA32 | 549 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |