| 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 | 6 |
| 7 #include "src/compilation-info.h" | 7 #include "src/compilation-info.h" |
| 8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
| 9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
| 10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
| (...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1440 #if V8_TARGET_ARCH_PPC64 | 1440 #if V8_TARGET_ARCH_PPC64 |
| 1441 case kPPC_DivU64: | 1441 case kPPC_DivU64: |
| 1442 __ divdu(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); | 1442 __ divdu(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); |
| 1443 DCHECK_EQ(LeaveRC, i.OutputRCBit()); | 1443 DCHECK_EQ(LeaveRC, i.OutputRCBit()); |
| 1444 break; | 1444 break; |
| 1445 #endif | 1445 #endif |
| 1446 case kPPC_DivDouble: | 1446 case kPPC_DivDouble: |
| 1447 ASSEMBLE_FLOAT_BINOP_RC(fdiv, MiscField::decode(instr->opcode())); | 1447 ASSEMBLE_FLOAT_BINOP_RC(fdiv, MiscField::decode(instr->opcode())); |
| 1448 break; | 1448 break; |
| 1449 case kPPC_Mod32: | 1449 case kPPC_Mod32: |
| 1450 ASSEMBLE_MODULO(divw, mullw); | 1450 if (CpuFeatures::IsSupported(MODULO)) { |
| 1451 __ modsw(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); |
| 1452 } else { |
| 1453 ASSEMBLE_MODULO(divw, mullw); |
| 1454 } |
| 1451 break; | 1455 break; |
| 1452 #if V8_TARGET_ARCH_PPC64 | 1456 #if V8_TARGET_ARCH_PPC64 |
| 1453 case kPPC_Mod64: | 1457 case kPPC_Mod64: |
| 1454 ASSEMBLE_MODULO(divd, mulld); | 1458 if (CpuFeatures::IsSupported(MODULO)) { |
| 1459 __ modsd(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); |
| 1460 } else { |
| 1461 ASSEMBLE_MODULO(divd, mulld); |
| 1462 } |
| 1455 break; | 1463 break; |
| 1456 #endif | 1464 #endif |
| 1457 case kPPC_ModU32: | 1465 case kPPC_ModU32: |
| 1458 ASSEMBLE_MODULO(divwu, mullw); | 1466 if (CpuFeatures::IsSupported(MODULO)) { |
| 1467 __ moduw(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); |
| 1468 } else { |
| 1469 ASSEMBLE_MODULO(divwu, mullw); |
| 1470 } |
| 1459 break; | 1471 break; |
| 1460 #if V8_TARGET_ARCH_PPC64 | 1472 #if V8_TARGET_ARCH_PPC64 |
| 1461 case kPPC_ModU64: | 1473 case kPPC_ModU64: |
| 1462 ASSEMBLE_MODULO(divdu, mulld); | 1474 if (CpuFeatures::IsSupported(MODULO)) { |
| 1475 __ modud(i.OutputRegister(), i.InputRegister(0), i.InputRegister(1)); |
| 1476 } else { |
| 1477 ASSEMBLE_MODULO(divdu, mulld); |
| 1478 } |
| 1463 break; | 1479 break; |
| 1464 #endif | 1480 #endif |
| 1465 case kPPC_ModDouble: | 1481 case kPPC_ModDouble: |
| 1466 // TODO(bmeurer): We should really get rid of this special instruction, | 1482 // TODO(bmeurer): We should really get rid of this special instruction, |
| 1467 // and generate a CallAddress instruction instead. | 1483 // and generate a CallAddress instruction instead. |
| 1468 ASSEMBLE_FLOAT_MODULO(); | 1484 ASSEMBLE_FLOAT_MODULO(); |
| 1469 break; | 1485 break; |
| 1470 case kIeee754Float64Acos: | 1486 case kIeee754Float64Acos: |
| 1471 ASSEMBLE_IEEE754_UNOP(acos); | 1487 ASSEMBLE_IEEE754_UNOP(acos); |
| 1472 break; | 1488 break; |
| (...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2474 padding_size -= v8::internal::Assembler::kInstrSize; | 2490 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2475 } | 2491 } |
| 2476 } | 2492 } |
| 2477 } | 2493 } |
| 2478 | 2494 |
| 2479 #undef __ | 2495 #undef __ |
| 2480 | 2496 |
| 2481 } // namespace compiler | 2497 } // namespace compiler |
| 2482 } // namespace internal | 2498 } // namespace internal |
| 2483 } // namespace v8 | 2499 } // namespace v8 |
| OLD | NEW |