| 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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 __ PrepareCallCFunction(0, 2, kScratchReg); | 570 __ PrepareCallCFunction(0, 2, kScratchReg); |
| 571 __ MovToFloatParameters(i.InputDoubleRegister(0), | 571 __ MovToFloatParameters(i.InputDoubleRegister(0), |
| 572 i.InputDoubleRegister(1)); | 572 i.InputDoubleRegister(1)); |
| 573 // TODO(balazs.kilvady): implement mod_two_floats_operation(isolate()) | 573 // TODO(balazs.kilvady): implement mod_two_floats_operation(isolate()) |
| 574 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), | 574 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), |
| 575 0, 2); | 575 0, 2); |
| 576 // Move the result in the double result register. | 576 // Move the result in the double result register. |
| 577 __ MovFromFloatResult(i.OutputSingleRegister()); | 577 __ MovFromFloatResult(i.OutputSingleRegister()); |
| 578 break; | 578 break; |
| 579 } | 579 } |
| 580 case kMipsAbsS: |
| 581 __ abs_s(i.OutputSingleRegister(), i.InputSingleRegister(0)); |
| 582 break; |
| 580 case kMipsSqrtS: { | 583 case kMipsSqrtS: { |
| 581 __ sqrt_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 584 __ sqrt_s(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 582 break; | 585 break; |
| 583 } | 586 } |
| 584 case kMipsCmpD: | 587 case kMipsCmpD: |
| 585 // Psuedo-instruction used for FP cmp/branch. No opcode emitted here. | 588 // Psuedo-instruction used for FP cmp/branch. No opcode emitted here. |
| 586 break; | 589 break; |
| 587 case kMipsAddD: | 590 case kMipsAddD: |
| 588 // TODO(plind): add special case: combine mult & add. | 591 // TODO(plind): add special case: combine mult & add. |
| 589 __ add_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 592 __ add_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
| (...skipping 18 matching lines...) Expand all Loading... |
| 608 FrameScope scope(masm(), StackFrame::MANUAL); | 611 FrameScope scope(masm(), StackFrame::MANUAL); |
| 609 __ PrepareCallCFunction(0, 2, kScratchReg); | 612 __ PrepareCallCFunction(0, 2, kScratchReg); |
| 610 __ MovToFloatParameters(i.InputDoubleRegister(0), | 613 __ MovToFloatParameters(i.InputDoubleRegister(0), |
| 611 i.InputDoubleRegister(1)); | 614 i.InputDoubleRegister(1)); |
| 612 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), | 615 __ CallCFunction(ExternalReference::mod_two_doubles_operation(isolate()), |
| 613 0, 2); | 616 0, 2); |
| 614 // Move the result in the double result register. | 617 // Move the result in the double result register. |
| 615 __ MovFromFloatResult(i.OutputDoubleRegister()); | 618 __ MovFromFloatResult(i.OutputDoubleRegister()); |
| 616 break; | 619 break; |
| 617 } | 620 } |
| 621 case kMipsAbsD: |
| 622 __ abs_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 623 break; |
| 618 case kMipsSqrtD: { | 624 case kMipsSqrtD: { |
| 619 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); | 625 __ sqrt_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0)); |
| 620 break; | 626 break; |
| 621 } | 627 } |
| 622 case kMipsFloat64RoundDown: { | 628 case kMipsFloat64RoundDown: { |
| 623 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(floor_l_d, Floor); | 629 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(floor_l_d, Floor); |
| 624 break; | 630 break; |
| 625 } | 631 } |
| 626 case kMipsFloat64RoundTruncate: { | 632 case kMipsFloat64RoundTruncate: { |
| 627 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate); | 633 ASSEMBLE_ROUND_DOUBLE_TO_DOUBLE(trunc_l_d, Truncate); |
| (...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1282 } | 1288 } |
| 1283 } | 1289 } |
| 1284 MarkLazyDeoptSite(); | 1290 MarkLazyDeoptSite(); |
| 1285 } | 1291 } |
| 1286 | 1292 |
| 1287 #undef __ | 1293 #undef __ |
| 1288 | 1294 |
| 1289 } // namespace compiler | 1295 } // namespace compiler |
| 1290 } // namespace internal | 1296 } // namespace internal |
| 1291 } // namespace v8 | 1297 } // namespace v8 |
| OLD | NEW |