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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 __ MovFromFloatResult(i.OutputSingleRegister()); | 677 __ MovFromFloatResult(i.OutputSingleRegister()); |
678 break; | 678 break; |
679 } | 679 } |
680 case kMips64AbsS: | 680 case kMips64AbsS: |
681 __ abs_s(i.OutputSingleRegister(), i.InputSingleRegister(0)); | 681 __ abs_s(i.OutputSingleRegister(), i.InputSingleRegister(0)); |
682 break; | 682 break; |
683 case kMips64SqrtS: { | 683 case kMips64SqrtS: { |
684 __ sqrt_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 684 __ sqrt_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
685 break; | 685 break; |
686 } | 686 } |
| 687 case kMips64MaxS: |
| 688 __ max_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 689 i.InputDoubleRegister(1)); |
| 690 break; |
| 691 case kMips64MinS: |
| 692 __ min_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 693 i.InputDoubleRegister(1)); |
| 694 break; |
687 case kMips64CmpD: | 695 case kMips64CmpD: |
688 // Psuedo-instruction used for FP cmp/branch. No opcode emitted here. | 696 // Psuedo-instruction used for FP cmp/branch. No opcode emitted here. |
689 break; | 697 break; |
690 case kMips64AddD: | 698 case kMips64AddD: |
691 // TODO(plind): add special case: combine mult & add. | 699 // TODO(plind): add special case: combine mult & add. |
692 __ add_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 700 __ add_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
693 i.InputDoubleRegister(1)); | 701 i.InputDoubleRegister(1)); |
694 break; | 702 break; |
695 case kMips64SubD: | 703 case kMips64SubD: |
696 __ sub_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 704 __ sub_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
(...skipping 21 matching lines...) Expand all Loading... |
718 __ MovFromFloatResult(i.OutputDoubleRegister()); | 726 __ MovFromFloatResult(i.OutputDoubleRegister()); |
719 break; | 727 break; |
720 } | 728 } |
721 case kMips64AbsD: | 729 case kMips64AbsD: |
722 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 730 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
723 break; | 731 break; |
724 case kMips64SqrtD: { | 732 case kMips64SqrtD: { |
725 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 733 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
726 break; | 734 break; |
727 } | 735 } |
| 736 case kMips64MaxD: |
| 737 __ max_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 738 i.InputDoubleRegister(1)); |
| 739 break; |
| 740 case kMips64MinD: |
| 741 __ min_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| 742 i.InputDoubleRegister(1)); |
| 743 break; |
728 case kMips64Float64RoundDown: { | 744 case kMips64Float64RoundDown: { |
729 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(floor_l_d, Floor); | 745 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(floor_l_d, Floor); |
730 break; | 746 break; |
731 } | 747 } |
732 case kMips64Float64RoundTruncate: { | 748 case kMips64Float64RoundTruncate: { |
733 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate); | 749 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate); |
734 break; | 750 break; |
735 } | 751 } |
736 case kMips64Float64RoundUp: { | 752 case kMips64Float64RoundUp: { |
737 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(ceil_l_d, Ceil); | 753 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(ceil_l_d, Ceil); |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1389 } | 1405 } |
1390 } | 1406 } |
1391 MarkLazyDeoptSite(); | 1407 MarkLazyDeoptSite(); |
1392 } | 1408 } |
1393 | 1409 |
1394 #undef __ | 1410 #undef __ |
1395 | 1411 |
1396 } // namespace compiler | 1412 } // namespace compiler |
1397 } // namespace internal | 1413 } // namespace internal |
1398 } // namespace v8 | 1414 } // namespace v8 |
OLD | NEW |