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/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 __ cvtlsi2sd(i.OutputDoubleRegister(), input.operand); | 507 __ cvtlsi2sd(i.OutputDoubleRegister(), input.operand); |
508 } | 508 } |
509 break; | 509 break; |
510 } | 510 } |
511 case kSSEUint32ToFloat64: { | 511 case kSSEUint32ToFloat64: { |
512 // TODO(turbofan): X64 SSE cvtqsi2sd should support operands. | 512 // TODO(turbofan): X64 SSE cvtqsi2sd should support operands. |
513 __ cvtqsi2sd(i.OutputDoubleRegister(), i.InputRegister(0)); | 513 __ cvtqsi2sd(i.OutputDoubleRegister(), i.InputRegister(0)); |
514 break; | 514 break; |
515 } | 515 } |
516 | 516 |
517 case kX64Movsd: | |
518 if (instr->HasOutput()) { | |
519 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand()); | |
520 } else { | |
521 int index = 0; | |
522 Operand operand = i.MemoryOperand(&index); | |
523 __ movsd(operand, i.InputDoubleRegister(index)); | |
524 } | |
525 break; | |
526 case kX64Movsxbl: | 517 case kX64Movsxbl: |
527 __ movsxbl(i.OutputRegister(), i.MemoryOperand()); | 518 __ movsxbl(i.OutputRegister(), i.MemoryOperand()); |
528 break; | 519 break; |
529 case kX64Movzxbl: | 520 case kX64Movzxbl: |
530 __ movzxbl(i.OutputRegister(), i.MemoryOperand()); | 521 __ movzxbl(i.OutputRegister(), i.MemoryOperand()); |
531 break; | 522 break; |
532 case kX64Movb: { | 523 case kX64Movb: { |
533 int index = 0; | 524 int index = 0; |
534 Operand operand = i.MemoryOperand(&index); | 525 Operand operand = i.MemoryOperand(&index); |
535 if (HasImmediateInput(instr, index)) { | 526 if (HasImmediateInput(instr, index)) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 } else { | 583 } else { |
593 int index = 0; | 584 int index = 0; |
594 Operand operand = i.MemoryOperand(&index); | 585 Operand operand = i.MemoryOperand(&index); |
595 if (HasImmediateInput(instr, index)) { | 586 if (HasImmediateInput(instr, index)) { |
596 __ movq(operand, i.InputImmediate(index)); | 587 __ movq(operand, i.InputImmediate(index)); |
597 } else { | 588 } else { |
598 __ movq(operand, i.InputRegister(index)); | 589 __ movq(operand, i.InputRegister(index)); |
599 } | 590 } |
600 } | 591 } |
601 break; | 592 break; |
| 593 case kX64Movss: |
| 594 if (instr->HasOutput()) { |
| 595 __ movss(i.OutputDoubleRegister(), i.MemoryOperand()); |
| 596 __ cvtss2sd(i.OutputDoubleRegister(), i.OutputDoubleRegister()); |
| 597 } else { |
| 598 int index = 0; |
| 599 Operand operand = i.MemoryOperand(&index); |
| 600 __ cvtsd2ss(xmm0, i.InputDoubleRegister(index)); |
| 601 __ movss(operand, xmm0); |
| 602 } |
| 603 break; |
| 604 case kX64Movsd: |
| 605 if (instr->HasOutput()) { |
| 606 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand()); |
| 607 } else { |
| 608 int index = 0; |
| 609 Operand operand = i.MemoryOperand(&index); |
| 610 __ movsd(operand, i.InputDoubleRegister(index)); |
| 611 } |
| 612 break; |
602 case kX64StoreWriteBarrier: { | 613 case kX64StoreWriteBarrier: { |
603 Register object = i.InputRegister(0); | 614 Register object = i.InputRegister(0); |
604 Register index = i.InputRegister(1); | 615 Register index = i.InputRegister(1); |
605 Register value = i.InputRegister(2); | 616 Register value = i.InputRegister(2); |
606 __ movsxlq(index, index); | 617 __ movsxlq(index, index); |
607 __ movq(Operand(object, index, times_1, 0), value); | 618 __ movq(Operand(object, index, times_1, 0), value); |
608 __ leaq(index, Operand(object, index, times_1, 0)); | 619 __ leaq(index, Operand(object, index, times_1, 0)); |
609 SaveFPRegsMode mode = code_->frame()->DidAllocateDoubleRegisters() | 620 SaveFPRegsMode mode = code_->frame()->DidAllocateDoubleRegisters() |
610 ? kSaveFPRegs | 621 ? kSaveFPRegs |
611 : kDontSaveFPRegs; | 622 : kDontSaveFPRegs; |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 } | 1003 } |
993 | 1004 |
994 | 1005 |
995 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } | 1006 void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } |
996 | 1007 |
997 #undef __ | 1008 #undef __ |
998 | 1009 |
999 } // namespace internal | 1010 } // namespace internal |
1000 } // namespace compiler | 1011 } // namespace compiler |
1001 } // namespace v8 | 1012 } // namespace v8 |
OLD | NEW |