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 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 } | 449 } |
450 case kSSEFloat64Sqrt: { | 450 case kSSEFloat64Sqrt: { |
451 RegisterOrOperand input = i.InputRegisterOrOperand(0); | 451 RegisterOrOperand input = i.InputRegisterOrOperand(0); |
452 if (input.type == kDoubleRegister) { | 452 if (input.type == kDoubleRegister) { |
453 __ sqrtsd(i.OutputDoubleRegister(), input.double_reg); | 453 __ sqrtsd(i.OutputDoubleRegister(), input.double_reg); |
454 } else { | 454 } else { |
455 __ sqrtsd(i.OutputDoubleRegister(), input.operand); | 455 __ sqrtsd(i.OutputDoubleRegister(), input.operand); |
456 } | 456 } |
457 break; | 457 break; |
458 } | 458 } |
| 459 case kSSECvtss2sd: |
| 460 __ cvtss2sd(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 461 break; |
| 462 case kSSECvtsd2ss: |
| 463 __ cvtsd2ss(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 464 break; |
459 case kSSEFloat64ToInt32: { | 465 case kSSEFloat64ToInt32: { |
460 RegisterOrOperand input = i.InputRegisterOrOperand(0); | 466 RegisterOrOperand input = i.InputRegisterOrOperand(0); |
461 if (input.type == kDoubleRegister) { | 467 if (input.type == kDoubleRegister) { |
462 __ cvttsd2si(i.OutputRegister(), input.double_reg); | 468 __ cvttsd2si(i.OutputRegister(), input.double_reg); |
463 } else { | 469 } else { |
464 __ cvttsd2si(i.OutputRegister(), input.operand); | 470 __ cvttsd2si(i.OutputRegister(), input.operand); |
465 } | 471 } |
466 break; | 472 break; |
467 } | 473 } |
468 case kSSEFloat64ToUint32: { | 474 case kSSEFloat64ToUint32: { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
563 if (HasImmediateInput(instr, index)) { | 569 if (HasImmediateInput(instr, index)) { |
564 __ movq(operand, i.InputImmediate(index)); | 570 __ movq(operand, i.InputImmediate(index)); |
565 } else { | 571 } else { |
566 __ movq(operand, i.InputRegister(index)); | 572 __ movq(operand, i.InputRegister(index)); |
567 } | 573 } |
568 } | 574 } |
569 break; | 575 break; |
570 case kX64Movss: | 576 case kX64Movss: |
571 if (instr->HasOutput()) { | 577 if (instr->HasOutput()) { |
572 __ movss(i.OutputDoubleRegister(), i.MemoryOperand()); | 578 __ movss(i.OutputDoubleRegister(), i.MemoryOperand()); |
573 __ cvtss2sd(i.OutputDoubleRegister(), i.OutputDoubleRegister()); | |
574 } else { | 579 } else { |
575 int index = 0; | 580 int index = 0; |
576 Operand operand = i.MemoryOperand(&index); | 581 Operand operand = i.MemoryOperand(&index); |
577 __ cvtsd2ss(xmm0, i.InputDoubleRegister(index)); | 582 __ movss(operand, i.InputDoubleRegister(index)); |
578 __ movss(operand, xmm0); | |
579 } | 583 } |
580 break; | 584 break; |
581 case kX64Movsd: | 585 case kX64Movsd: |
582 if (instr->HasOutput()) { | 586 if (instr->HasOutput()) { |
583 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand()); | 587 __ movsd(i.OutputDoubleRegister(), i.MemoryOperand()); |
584 } else { | 588 } else { |
585 int index = 0; | 589 int index = 0; |
586 Operand operand = i.MemoryOperand(&index); | 590 Operand operand = i.MemoryOperand(&index); |
587 __ movsd(operand, i.InputDoubleRegister(index)); | 591 __ movsd(operand, i.InputDoubleRegister(index)); |
588 } | 592 } |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 } | 1019 } |
1016 } | 1020 } |
1017 MarkLazyDeoptSite(); | 1021 MarkLazyDeoptSite(); |
1018 } | 1022 } |
1019 | 1023 |
1020 #undef __ | 1024 #undef __ |
1021 | 1025 |
1022 } // namespace internal | 1026 } // namespace internal |
1023 } // namespace compiler | 1027 } // namespace compiler |
1024 } // namespace v8 | 1028 } // namespace v8 |
OLD | NEW |