| 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 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 LocationOperand::cast(this)->location_kind() == | 600 LocationOperand::cast(this)->location_kind() == |
| 601 LocationOperand::STACK_SLOT && | 601 LocationOperand::STACK_SLOT && |
| 602 LocationOperand::cast(this)->representation() == | 602 LocationOperand::cast(this)->representation() == |
| 603 MachineRepresentation::kSimd128; | 603 MachineRepresentation::kSimd128; |
| 604 } | 604 } |
| 605 | 605 |
| 606 uint64_t InstructionOperand::GetCanonicalizedValue() const { | 606 uint64_t InstructionOperand::GetCanonicalizedValue() const { |
| 607 if (IsAllocated() || IsExplicit()) { | 607 if (IsAllocated() || IsExplicit()) { |
| 608 MachineRepresentation canonical = MachineRepresentation::kNone; | 608 MachineRepresentation canonical = MachineRepresentation::kNone; |
| 609 if (IsFPRegister()) { | 609 if (IsFPRegister()) { |
| 610 if (kSimpleFPAliasing) { | 610 // We treat all FP register operands the same for simple aliasing. |
| 611 // We treat all FP register operands the same for simple aliasing. | 611 canonical = MachineRepresentation::kFloat64; |
| 612 canonical = MachineRepresentation::kFloat64; | |
| 613 } else { | |
| 614 // We need to distinguish FP register operands of different reps when | |
| 615 // aliasing is not simple (e.g. ARM). | |
| 616 canonical = LocationOperand::cast(this)->representation(); | |
| 617 } | |
| 618 } | 612 } |
| 619 return InstructionOperand::KindField::update( | 613 return InstructionOperand::KindField::update( |
| 620 LocationOperand::RepresentationField::update(this->value_, canonical), | 614 LocationOperand::RepresentationField::update(this->value_, canonical), |
| 621 LocationOperand::EXPLICIT); | 615 LocationOperand::EXPLICIT); |
| 622 } | 616 } |
| 623 return this->value_; | 617 return this->value_; |
| 624 } | 618 } |
| 625 | 619 |
| 626 // Required for maps that don't care about machine type. | 620 // Required for maps that don't care about machine type. |
| 627 struct CompareOperandModuloType { | 621 struct CompareOperandModuloType { |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1492 | 1486 |
| 1493 | 1487 |
| 1494 std::ostream& operator<<(std::ostream& os, | 1488 std::ostream& operator<<(std::ostream& os, |
| 1495 const PrintableInstructionSequence& code); | 1489 const PrintableInstructionSequence& code); |
| 1496 | 1490 |
| 1497 } // namespace compiler | 1491 } // namespace compiler |
| 1498 } // namespace internal | 1492 } // namespace internal |
| 1499 } // namespace v8 | 1493 } // namespace v8 |
| 1500 | 1494 |
| 1501 #endif // V8_COMPILER_INSTRUCTION_H_ | 1495 #endif // V8_COMPILER_INSTRUCTION_H_ |
| OLD | NEW |