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/compilation-info.h" | 6 #include "src/compilation-info.h" |
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/osr.h" | 10 #include "src/compiler/osr.h" |
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1339 case kMips64AddD: | 1339 case kMips64AddD: |
1340 // TODO(plind): add special case: combine mult & add. | 1340 // TODO(plind): add special case: combine mult & add. |
1341 __ add_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 1341 __ add_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
1342 i.InputDoubleRegister(1)); | 1342 i.InputDoubleRegister(1)); |
1343 break; | 1343 break; |
1344 case kMips64SubD: | 1344 case kMips64SubD: |
1345 __ sub_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 1345 __ sub_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
1346 i.InputDoubleRegister(1)); | 1346 i.InputDoubleRegister(1)); |
1347 break; | 1347 break; |
1348 case kMips64MaddS: | 1348 case kMips64MaddS: |
1349 __ madd_s(i.OutputFloatRegister(), i.InputFloatRegister(0), | 1349 __ Madd_s(i.OutputFloatRegister(), i.InputFloatRegister(0), |
1350 i.InputFloatRegister(1), i.InputFloatRegister(2)); | 1350 i.InputFloatRegister(1), i.InputFloatRegister(2), |
| 1351 kScratchDoubleReg); |
1351 break; | 1352 break; |
1352 case kMips64MaddD: | 1353 case kMips64MaddD: |
1353 __ madd_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 1354 __ Madd_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
1354 i.InputDoubleRegister(1), i.InputDoubleRegister(2)); | 1355 i.InputDoubleRegister(1), i.InputDoubleRegister(2), |
1355 break; | 1356 kScratchDoubleReg); |
1356 case kMips64MaddfS: | |
1357 __ maddf_s(i.OutputFloatRegister(), i.InputFloatRegister(1), | |
1358 i.InputFloatRegister(2)); | |
1359 break; | |
1360 case kMips64MaddfD: | |
1361 __ maddf_d(i.OutputDoubleRegister(), i.InputDoubleRegister(1), | |
1362 i.InputDoubleRegister(2)); | |
1363 break; | 1357 break; |
1364 case kMips64MsubS: | 1358 case kMips64MsubS: |
1365 __ msub_s(i.OutputFloatRegister(), i.InputFloatRegister(0), | 1359 __ Msub_s(i.OutputFloatRegister(), i.InputFloatRegister(0), |
1366 i.InputFloatRegister(1), i.InputFloatRegister(2)); | 1360 i.InputFloatRegister(1), i.InputFloatRegister(2), |
| 1361 kScratchDoubleReg); |
1367 break; | 1362 break; |
1368 case kMips64MsubD: | 1363 case kMips64MsubD: |
1369 __ msub_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 1364 __ Msub_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
1370 i.InputDoubleRegister(1), i.InputDoubleRegister(2)); | 1365 i.InputDoubleRegister(1), i.InputDoubleRegister(2), |
1371 break; | 1366 kScratchDoubleReg); |
1372 case kMips64MsubfS: | |
1373 __ msubf_s(i.OutputFloatRegister(), i.InputFloatRegister(1), | |
1374 i.InputFloatRegister(2)); | |
1375 break; | |
1376 case kMips64MsubfD: | |
1377 __ msubf_d(i.OutputDoubleRegister(), i.InputDoubleRegister(1), | |
1378 i.InputDoubleRegister(2)); | |
1379 break; | 1367 break; |
1380 case kMips64MulD: | 1368 case kMips64MulD: |
1381 // TODO(plind): add special case: right op is -1.0, see arm port. | 1369 // TODO(plind): add special case: right op is -1.0, see arm port. |
1382 __ mul_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 1370 __ mul_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
1383 i.InputDoubleRegister(1)); | 1371 i.InputDoubleRegister(1)); |
1384 break; | 1372 break; |
1385 case kMips64DivD: | 1373 case kMips64DivD: |
1386 __ div_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), | 1374 __ div_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
1387 i.InputDoubleRegister(1)); | 1375 i.InputDoubleRegister(1)); |
1388 break; | 1376 break; |
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2594 padding_size -= v8::internal::Assembler::kInstrSize; | 2582 padding_size -= v8::internal::Assembler::kInstrSize; |
2595 } | 2583 } |
2596 } | 2584 } |
2597 } | 2585 } |
2598 | 2586 |
2599 #undef __ | 2587 #undef __ |
2600 | 2588 |
2601 } // namespace compiler | 2589 } // namespace compiler |
2602 } // namespace internal | 2590 } // namespace internal |
2603 } // namespace v8 | 2591 } // namespace v8 |
OLD | NEW |