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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 __ PrepareCallCFunction(0, 2, kScratchReg); | 632 __ PrepareCallCFunction(0, 2, kScratchReg); |
633 __ MovToFloatParameters(i.InputDoubleRegister(0), | 633 __ MovToFloatParameters(i.InputDoubleRegister(0), |
634 i.InputDoubleRegister(1)); | 634 i.InputDoubleRegister(1)); |
635 // TODO(balazs.kilvady): implement mod_two_floats_operation(isolate()) | 635 // TODO(balazs.kilvady): implement mod_two_floats_operation(isolate()) |
636 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), | 636 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), |
637 0, 2); | 637 0, 2); |
638 // Move the result in the double result register. | 638 // Move the result in the double result register. |
639 __ MovFromFloatResult(i.OutputSingleRegister()); | 639 __ MovFromFloatResult(i.OutputSingleRegister()); |
640 break; | 640 break; |
641 } | 641 } |
| 642 case kMips64AbsS: |
| 643 __ abs_s(i.OutputSingleRegister(), i.InputSingleRegister(0)); |
| 644 break; |
642 case kMips64SqrtS: { | 645 case kMips64SqrtS: { |
643 __ sqrt_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 646 __ sqrt_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
644 break; | 647 break; |
645 } | 648 } |
646 case kMips64CmpD: | 649 case kMips64CmpD: |
647 // Psuedo-instruction used for FP cmp/branch. No opcode emitted here. | 650 // Psuedo-instruction used for FP cmp/branch. No opcode emitted here. |
648 break; | 651 break; |
649 case kMips64AddD: | 652 case kMips64AddD: |
650 // TODO(plind): add special case: combine mult & add. | 653 // TODO(plind): add special case: combine mult & add. |
651 __ add_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 654 __ add_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
(...skipping 18 matching lines...) Expand all Loading... |
670 FrameScope scope(masm(), StackFrame::MANUAL); | 673 FrameScope scope(masm(), StackFrame::MANUAL); |
671 __ PrepareCallCFunction(0, 2, kScratchReg); | 674 __ PrepareCallCFunction(0, 2, kScratchReg); |
672 __ MovToFloatParameters(i.InputDoubleRegister(0), | 675 __ MovToFloatParameters(i.InputDoubleRegister(0), |
673 i.InputDoubleRegister(1)); | 676 i.InputDoubleRegister(1)); |
674 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), | 677 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), |
675 0, 2); | 678 0, 2); |
676 // Move the result in the double result register. | 679 // Move the result in the double result register. |
677 __ MovFromFloatResult(i.OutputDoubleRegister()); | 680 __ MovFromFloatResult(i.OutputDoubleRegister()); |
678 break; | 681 break; |
679 } | 682 } |
| 683 case kMips64AbsD: |
| 684 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 685 break; |
680 case kMips64SqrtD: { | 686 case kMips64SqrtD: { |
681 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 687 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
682 break; | 688 break; |
683 } | 689 } |
684 case kMips64Float64RoundDown: { | 690 case kMips64Float64RoundDown: { |
685 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(floor_l_d, Floor); | 691 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(floor_l_d, Floor); |
686 break; | 692 break; |
687 } | 693 } |
688 case kMips64Float64RoundTruncate: { | 694 case kMips64Float64RoundTruncate: { |
689 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate); | 695 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate); |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1348 } | 1354 } |
1349 } | 1355 } |
1350 MarkLazyDeoptSite(); | 1356 MarkLazyDeoptSite(); |
1351 } | 1357 } |
1352 | 1358 |
1353 #undef __ | 1359 #undef __ |
1354 | 1360 |
1355 } // namespace compiler | 1361 } // namespace compiler |
1356 } // namespace internal | 1362 } // namespace internal |
1357 } // namespace v8 | 1363 } // namespace v8 |
OLD | NEW |