| 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/base/adapters.h" | 5 #include "src/base/adapters.h" |
| 6 #include "src/compiler/instruction-selector-impl.h" | 6 #include "src/compiler/instruction-selector-impl.h" |
| 7 #include "src/compiler/node-matchers.h" | 7 #include "src/compiler/node-matchers.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 #include "src/ppc/frames-ppc.h" | 9 #include "src/ppc/frames-ppc.h" |
| 10 | 10 |
| (...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1538 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); | 1538 DCHECK_EQ(IrOpcode::kIfException, handler->front()->opcode()); |
| 1539 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); | 1539 IfExceptionHint hint = OpParameter<IfExceptionHint>(handler->front()); |
| 1540 if (hint == IfExceptionHint::kLocallyCaught) { | 1540 if (hint == IfExceptionHint::kLocallyCaught) { |
| 1541 flags |= CallDescriptor::kHasLocalCatchHandler; | 1541 flags |= CallDescriptor::kHasLocalCatchHandler; |
| 1542 } | 1542 } |
| 1543 flags |= CallDescriptor::kHasExceptionHandler; | 1543 flags |= CallDescriptor::kHasExceptionHandler; |
| 1544 buffer.instruction_args.push_back(g.Label(handler)); | 1544 buffer.instruction_args.push_back(g.Label(handler)); |
| 1545 } | 1545 } |
| 1546 | 1546 |
| 1547 // Select the appropriate opcode based on the call type. | 1547 // Select the appropriate opcode based on the call type. |
| 1548 InstructionCode opcode; | 1548 InstructionCode opcode = kArchNop; |
| 1549 switch (descriptor->kind()) { | 1549 switch (descriptor->kind()) { |
| 1550 case CallDescriptor::kCallAddress: | 1550 case CallDescriptor::kCallAddress: |
| 1551 opcode = | 1551 opcode = |
| 1552 kArchCallCFunction | | 1552 kArchCallCFunction | |
| 1553 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); | 1553 MiscField::encode(static_cast<int>(descriptor->CParameterCount())); |
| 1554 break; | 1554 break; |
| 1555 case CallDescriptor::kCallCodeObject: | 1555 case CallDescriptor::kCallCodeObject: |
| 1556 opcode = kArchCallCodeObject | MiscField::encode(flags); | 1556 opcode = kArchCallCodeObject | MiscField::encode(flags); |
| 1557 break; | 1557 break; |
| 1558 case CallDescriptor::kCallJSFunction: | 1558 case CallDescriptor::kCallJSFunction: |
| 1559 opcode = kArchCallJSFunction | MiscField::encode(flags); | 1559 opcode = kArchCallJSFunction | MiscField::encode(flags); |
| 1560 break; | 1560 break; |
| 1561 default: | 1561 case CallDescriptor::kLazyBailout: |
| 1562 UNREACHABLE(); | 1562 opcode = kArchLazyBailout | MiscField::encode(flags); |
| 1563 return; | 1563 break; |
| 1564 } | 1564 } |
| 1565 | 1565 |
| 1566 // Emit the call instruction. | 1566 // Emit the call instruction. |
| 1567 size_t const output_count = buffer.outputs.size(); | 1567 size_t const output_count = buffer.outputs.size(); |
| 1568 auto* outputs = output_count ? &buffer.outputs.front() : nullptr; | 1568 auto* outputs = output_count ? &buffer.outputs.front() : nullptr; |
| 1569 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), | 1569 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), |
| 1570 &buffer.instruction_args.front())->MarkAsCall(); | 1570 &buffer.instruction_args.front())->MarkAsCall(); |
| 1571 } | 1571 } |
| 1572 | 1572 |
| 1573 | 1573 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1713 return MachineOperatorBuilder::kFloat64RoundDown | | 1713 return MachineOperatorBuilder::kFloat64RoundDown | |
| 1714 MachineOperatorBuilder::kFloat64RoundTruncate | | 1714 MachineOperatorBuilder::kFloat64RoundTruncate | |
| 1715 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1715 MachineOperatorBuilder::kFloat64RoundTiesAway | |
| 1716 MachineOperatorBuilder::kWord32Popcnt; | 1716 MachineOperatorBuilder::kWord32Popcnt; |
| 1717 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. | 1717 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. |
| 1718 } | 1718 } |
| 1719 | 1719 |
| 1720 } // namespace compiler | 1720 } // namespace compiler |
| 1721 } // namespace internal | 1721 } // namespace internal |
| 1722 } // namespace v8 | 1722 } // namespace v8 |
| OLD | NEW |