OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/compiler/code-generator-impl.h" | 6 #include "src/compiler/code-generator-impl.h" |
7 #include "src/compiler/gap-resolver.h" | 7 #include "src/compiler/gap-resolver.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/mips/macro-assembler-mips.h" | 9 #include "src/mips/macro-assembler-mips.h" |
10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 __ MovFromFloatResult(i.OutputSingleRegister()); | 615 __ MovFromFloatResult(i.OutputSingleRegister()); |
616 break; | 616 break; |
617 } | 617 } |
618 case kMipsAbsS: | 618 case kMipsAbsS: |
619 __ abs_s(i.OutputSingleRegister(), i.InputSingleRegister(0)); | 619 __ abs_s(i.OutputSingleRegister(), i.InputSingleRegister(0)); |
620 break; | 620 break; |
621 case kMipsSqrtS: { | 621 case kMipsSqrtS: { |
622 __ sqrt_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 622 __ sqrt_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
623 break; | 623 break; |
624 } | 624 } |
| 625 case kMipsMaxS: |
| 626 __ max_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 627 i.InputDoubleRegister(1)); |
| 628 break; |
| 629 case kMipsMinS: |
| 630 __ min_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 631 i.InputDoubleRegister(1)); |
| 632 break; |
625 case kMipsCmpD: | 633 case kMipsCmpD: |
626 // Psuedo-instruction used for FP cmp/branch. No opcode emitted here. | 634 // Psuedo-instruction used for FP cmp/branch. No opcode emitted here. |
627 break; | 635 break; |
628 case kMipsAddD: | 636 case kMipsAddD: |
629 // TODO(plind): add special case: combine mult & add. | 637 // TODO(plind): add special case: combine mult & add. |
630 __ add_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 638 __ add_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
631 i.InputDoubleRegister(1)); | 639 i.InputDoubleRegister(1)); |
632 break; | 640 break; |
633 case kMipsSubD: | 641 case kMipsSubD: |
634 __ sub_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 642 __ sub_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
(...skipping 21 matching lines...) Expand all Loading... |
656 __ MovFromFloatResult(i.OutputDoubleRegister()); | 664 __ MovFromFloatResult(i.OutputDoubleRegister()); |
657 break; | 665 break; |
658 } | 666 } |
659 case kMipsAbsD: | 667 case kMipsAbsD: |
660 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 668 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
661 break; | 669 break; |
662 case kMipsSqrtD: { | 670 case kMipsSqrtD: { |
663 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 671 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
664 break; | 672 break; |
665 } | 673 } |
| 674 case kMipsMaxD: |
| 675 __ max_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 676 i.InputDoubleRegister(1)); |
| 677 break; |
| 678 case kMipsMinD: |
| 679 __ min_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 680 i.InputDoubleRegister(1)); |
| 681 break; |
666 case kMipsFloat64RoundDown: { | 682 case kMipsFloat64RoundDown: { |
667 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(floor_l_d, Floor); | 683 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(floor_l_d, Floor); |
668 break; | 684 break; |
669 } | 685 } |
670 case kMipsFloat64RoundTruncate: { | 686 case kMipsFloat64RoundTruncate: { |
671 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate); | 687 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate); |
672 break; | 688 break; |
673 } | 689 } |
674 case kMipsFloat64RoundUp: { | 690 case kMipsFloat64RoundUp: { |
675 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(ceil_l_d, Ceil); | 691 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(ceil_l_d, Ceil); |
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 } | 1339 } |
1324 } | 1340 } |
1325 MarkLazyDeoptSite(); | 1341 MarkLazyDeoptSite(); |
1326 } | 1342 } |
1327 | 1343 |
1328 #undef __ | 1344 #undef __ |
1329 | 1345 |
1330 } // namespace compiler | 1346 } // namespace compiler |
1331 } // namespace internal | 1347 } // namespace internal |
1332 } // namespace v8 | 1348 } // namespace v8 |
OLD | NEW |