Chromium Code Reviews| Index: src/compiler/instruction.cc |
| diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc |
| index a7ed0e5f236f7bae334f7810ee41efc80bcf624e..b1ce9dbdd80cd80c9f3aebbdef3eae626b56b066 100644 |
| --- a/src/compiler/instruction.cc |
| +++ b/src/compiler/instruction.cc |
| @@ -105,23 +105,19 @@ std::ostream& operator<<(std::ostream& os, |
| return os << "[immediate:" << imm.indexed_value() << "]"; |
| } |
| } |
| + case InstructionOperand::EXPLICIT: |
|
Mircea Trofin
2015/10/15 15:05:38
Would it help debugging if Explicit had some extra
danno
2015/10/23 08:07:49
Done
|
| case InstructionOperand::ALLOCATED: { |
| - auto allocated = AllocatedOperand::cast(op); |
| - switch (allocated.allocated_kind()) { |
| - case AllocatedOperand::STACK_SLOT: |
| - os << "[stack:" << StackSlotOperand::cast(op).index(); |
| - break; |
| - case AllocatedOperand::DOUBLE_STACK_SLOT: |
| - os << "[double_stack:" << DoubleStackSlotOperand::cast(op).index(); |
| - break; |
| - case AllocatedOperand::REGISTER: |
| - os << "[" << RegisterOperand::cast(op).GetRegister().ToString() |
| - << "|R"; |
| - break; |
| - case AllocatedOperand::DOUBLE_REGISTER: |
| - os << "[" << DoubleRegisterOperand::cast(op).GetRegister().ToString() |
| - << "|R"; |
| - break; |
| + auto allocated = LocationOperand::cast(op); |
| + if (op.IsStackSlot()) { |
| + os << "[stack:" << LocationOperand::cast(op).index(); |
| + } else if (op.IsDoubleStackSlot()) { |
| + os << "[double_stack:" << LocationOperand::cast(op).index(); |
| + } else if (op.IsRegister()) { |
| + os << "[" << LocationOperand::cast(op).GetRegister().ToString() << "|R"; |
| + } else { |
| + DCHECK(op.IsDoubleRegister()); |
| + os << "[" << LocationOperand::cast(op).GetDoubleRegister().ToString() |
| + << "|R"; |
| } |
| switch (allocated.machine_type()) { |
| case kRepWord32: |
| @@ -180,11 +176,12 @@ MoveOperands* ParallelMove::PrepareInsertAfter(MoveOperands* move) const { |
| MoveOperands* to_eliminate = nullptr; |
| for (auto curr : *this) { |
| if (curr->IsEliminated()) continue; |
| - if (curr->destination().EqualsModuloType(move->source())) { |
| + if (curr->destination().EqualsCanonicalizeType(move->source())) { |
| DCHECK(!replacement); |
| replacement = curr; |
| if (to_eliminate != nullptr) break; |
| - } else if (curr->destination().EqualsModuloType(move->destination())) { |
| + } else if (curr->destination().EqualsCanonicalizeType( |
| + move->destination())) { |
| DCHECK(!to_eliminate); |
| to_eliminate = curr; |
| if (replacement != nullptr) break; |
| @@ -262,7 +259,7 @@ std::ostream& operator<<(std::ostream& os, |
| void ReferenceMap::RecordReference(const AllocatedOperand& op) { |
| // Do not record arguments as pointers. |
| - if (op.IsStackSlot() && StackSlotOperand::cast(op).index() < 0) return; |
| + if (op.IsStackSlot() && LocationOperand::cast(op).index() < 0) return; |
| DCHECK(!op.IsDoubleRegister() && !op.IsDoubleStackSlot()); |
| reference_operands_.push_back(op); |
| } |