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 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 return VisitFloat64Compare(selector, value, cont); | 1424 return VisitFloat64Compare(selector, value, cont); |
1425 case IrOpcode::kFloat64LessThanOrEqual: | 1425 case IrOpcode::kFloat64LessThanOrEqual: |
1426 cont->OverwriteAndNegateIfEqual(kUnsignedLessThanOrEqual); | 1426 cont->OverwriteAndNegateIfEqual(kUnsignedLessThanOrEqual); |
1427 return VisitFloat64Compare(selector, value, cont); | 1427 return VisitFloat64Compare(selector, value, cont); |
1428 case IrOpcode::kProjection: | 1428 case IrOpcode::kProjection: |
1429 // Check if this is the overflow output projection of an | 1429 // Check if this is the overflow output projection of an |
1430 // <Operation>WithOverflow node. | 1430 // <Operation>WithOverflow node. |
1431 if (ProjectionIndexOf(value->op()) == 1u) { | 1431 if (ProjectionIndexOf(value->op()) == 1u) { |
1432 // We cannot combine the <Operation>WithOverflow with this branch | 1432 // We cannot combine the <Operation>WithOverflow with this branch |
1433 // unless the 0th projection (the use of the actual value of the | 1433 // unless the 0th projection (the use of the actual value of the |
1434 // <Operation> is either NULL, which means there's no use of the | 1434 // <Operation> is either nullptr, which means there's no use of the |
1435 // actual value, or was already defined, which means it is scheduled | 1435 // actual value, or was already defined, which means it is scheduled |
1436 // *AFTER* this branch). | 1436 // *AFTER* this branch). |
1437 Node* const node = value->InputAt(0); | 1437 Node* const node = value->InputAt(0); |
1438 Node* const result = NodeProperties::FindProjection(node, 0); | 1438 Node* const result = NodeProperties::FindProjection(node, 0); |
1439 if (result == NULL || selector->IsDefined(result)) { | 1439 if (result == nullptr || selector->IsDefined(result)) { |
1440 switch (node->opcode()) { | 1440 switch (node->opcode()) { |
1441 case IrOpcode::kInt32AddWithOverflow: | 1441 case IrOpcode::kInt32AddWithOverflow: |
1442 cont->OverwriteAndNegateIfEqual(kOverflow); | 1442 cont->OverwriteAndNegateIfEqual(kOverflow); |
1443 return VisitBinop<Int32BinopMatcher>( | 1443 return VisitBinop<Int32BinopMatcher>( |
1444 selector, node, kPPC_AddWithOverflow32, kInt16Imm, cont); | 1444 selector, node, kPPC_AddWithOverflow32, kInt16Imm, cont); |
1445 case IrOpcode::kInt32SubWithOverflow: | 1445 case IrOpcode::kInt32SubWithOverflow: |
1446 cont->OverwriteAndNegateIfEqual(kOverflow); | 1446 cont->OverwriteAndNegateIfEqual(kOverflow); |
1447 return VisitBinop<Int32BinopMatcher>(selector, node, | 1447 return VisitBinop<Int32BinopMatcher>(selector, node, |
1448 kPPC_SubWithOverflow32, | 1448 kPPC_SubWithOverflow32, |
1449 kInt16Imm_Negate, cont); | 1449 kInt16Imm_Negate, cont); |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1763 MachineOperatorBuilder::kFloat64RoundTruncate | | 1763 MachineOperatorBuilder::kFloat64RoundTruncate | |
1764 MachineOperatorBuilder::kFloat64RoundTiesAway | | 1764 MachineOperatorBuilder::kFloat64RoundTiesAway | |
1765 MachineOperatorBuilder::kWord32Popcnt | | 1765 MachineOperatorBuilder::kWord32Popcnt | |
1766 MachineOperatorBuilder::kWord64Popcnt; | 1766 MachineOperatorBuilder::kWord64Popcnt; |
1767 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. | 1767 // We omit kWord32ShiftIsSafe as s[rl]w use 0x3f as a mask rather than 0x1f. |
1768 } | 1768 } |
1769 | 1769 |
1770 } // namespace compiler | 1770 } // namespace compiler |
1771 } // namespace internal | 1771 } // namespace internal |
1772 } // namespace v8 | 1772 } // namespace v8 |
OLD | NEW |