| 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 #ifndef V8_COMPILER_INSTRUCTION_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_H_ |
| 6 #define V8_COMPILER_INSTRUCTION_H_ | 6 #define V8_COMPILER_INSTRUCTION_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 return RepresentationField::decode(value_); | 472 return RepresentationField::decode(value_); |
| 473 } | 473 } |
| 474 | 474 |
| 475 static bool IsSupportedRepresentation(MachineRepresentation rep) { | 475 static bool IsSupportedRepresentation(MachineRepresentation rep) { |
| 476 switch (rep) { | 476 switch (rep) { |
| 477 case MachineRepresentation::kWord32: | 477 case MachineRepresentation::kWord32: |
| 478 case MachineRepresentation::kWord64: | 478 case MachineRepresentation::kWord64: |
| 479 case MachineRepresentation::kFloat32: | 479 case MachineRepresentation::kFloat32: |
| 480 case MachineRepresentation::kFloat64: | 480 case MachineRepresentation::kFloat64: |
| 481 case MachineRepresentation::kSimd128: | 481 case MachineRepresentation::kSimd128: |
| 482 case MachineRepresentation::kSimd1x4: | |
| 483 case MachineRepresentation::kSimd1x8: | |
| 484 case MachineRepresentation::kSimd1x16: | |
| 485 case MachineRepresentation::kTaggedSigned: | 482 case MachineRepresentation::kTaggedSigned: |
| 486 case MachineRepresentation::kTaggedPointer: | 483 case MachineRepresentation::kTaggedPointer: |
| 487 case MachineRepresentation::kTagged: | 484 case MachineRepresentation::kTagged: |
| 488 return true; | 485 return true; |
| 489 case MachineRepresentation::kBit: | 486 case MachineRepresentation::kBit: |
| 490 case MachineRepresentation::kWord8: | 487 case MachineRepresentation::kWord8: |
| 491 case MachineRepresentation::kWord16: | 488 case MachineRepresentation::kWord16: |
| 492 case MachineRepresentation::kNone: | 489 case MachineRepresentation::kNone: |
| 493 return false; | 490 return false; |
| 494 } | 491 } |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 MachineRepresentation::kFloat32; | 580 MachineRepresentation::kFloat32; |
| 584 } | 581 } |
| 585 | 582 |
| 586 bool InstructionOperand::IsDoubleRegister() const { | 583 bool InstructionOperand::IsDoubleRegister() const { |
| 587 return IsAnyRegister() && | 584 return IsAnyRegister() && |
| 588 LocationOperand::cast(this)->representation() == | 585 LocationOperand::cast(this)->representation() == |
| 589 MachineRepresentation::kFloat64; | 586 MachineRepresentation::kFloat64; |
| 590 } | 587 } |
| 591 | 588 |
| 592 bool InstructionOperand::IsSimd128Register() const { | 589 bool InstructionOperand::IsSimd128Register() const { |
| 593 return IsAnyRegister() && | 590 return IsAnyRegister() && LocationOperand::cast(this)->representation() == |
| 594 LocationOperand::cast(this)->representation() == | 591 MachineRepresentation::kSimd128; |
| 595 MachineRepresentation::kSimd128; | |
| 596 } | 592 } |
| 597 | 593 |
| 598 bool InstructionOperand::IsAnyStackSlot() const { | 594 bool InstructionOperand::IsAnyStackSlot() const { |
| 599 return IsAnyLocationOperand() && | 595 return IsAnyLocationOperand() && |
| 600 LocationOperand::cast(this)->location_kind() == | 596 LocationOperand::cast(this)->location_kind() == |
| 601 LocationOperand::STACK_SLOT; | 597 LocationOperand::STACK_SLOT; |
| 602 } | 598 } |
| 603 | 599 |
| 604 bool InstructionOperand::IsStackSlot() const { | 600 bool InstructionOperand::IsStackSlot() const { |
| 605 return IsAnyStackSlot() && | 601 return IsAnyStackSlot() && |
| (...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1670 }; | 1666 }; |
| 1671 | 1667 |
| 1672 V8_EXPORT_PRIVATE std::ostream& operator<<( | 1668 V8_EXPORT_PRIVATE std::ostream& operator<<( |
| 1673 std::ostream& os, const PrintableInstructionSequence& code); | 1669 std::ostream& os, const PrintableInstructionSequence& code); |
| 1674 | 1670 |
| 1675 } // namespace compiler | 1671 } // namespace compiler |
| 1676 } // namespace internal | 1672 } // namespace internal |
| 1677 } // namespace v8 | 1673 } // namespace v8 |
| 1678 | 1674 |
| 1679 #endif // V8_COMPILER_INSTRUCTION_H_ | 1675 #endif // V8_COMPILER_INSTRUCTION_H_ |
| OLD | NEW |