| 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/compiler/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
| 6 #include "src/compiler/graph.h" | 6 #include "src/compiler/graph.h" |
| 7 #include "src/compiler/instruction.h" | 7 #include "src/compiler/instruction.h" |
| 8 #include "src/compiler/schedule.h" | 8 #include "src/compiler/schedule.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 case InstructionOperand::UNALLOCATED: { | 67 case InstructionOperand::UNALLOCATED: { |
| 68 const UnallocatedOperand* unalloc = UnallocatedOperand::cast(&op); | 68 const UnallocatedOperand* unalloc = UnallocatedOperand::cast(&op); |
| 69 os << "v" << unalloc->virtual_register(); | 69 os << "v" << unalloc->virtual_register(); |
| 70 if (unalloc->basic_policy() == UnallocatedOperand::FIXED_SLOT) { | 70 if (unalloc->basic_policy() == UnallocatedOperand::FIXED_SLOT) { |
| 71 return os << "(=" << unalloc->fixed_slot_index() << "S)"; | 71 return os << "(=" << unalloc->fixed_slot_index() << "S)"; |
| 72 } | 72 } |
| 73 switch (unalloc->extended_policy()) { | 73 switch (unalloc->extended_policy()) { |
| 74 case UnallocatedOperand::NONE: | 74 case UnallocatedOperand::NONE: |
| 75 return os; | 75 return os; |
| 76 case UnallocatedOperand::FIXED_REGISTER: | 76 case UnallocatedOperand::FIXED_REGISTER: |
| 77 return os << "(=" | 77 return os << "(=" << conf->general_register_name( |
| 78 << conf->GetGeneralRegisterName( | 78 unalloc->fixed_register_index()) << ")"; |
| 79 unalloc->fixed_register_index()) | |
| 80 << ")"; | |
| 81 case UnallocatedOperand::FIXED_DOUBLE_REGISTER: | 79 case UnallocatedOperand::FIXED_DOUBLE_REGISTER: |
| 82 return os << "(=" | 80 return os << "(=" << conf->double_register_name( |
| 83 << conf->GetDoubleRegisterName( | 81 unalloc->fixed_register_index()) << ")"; |
| 84 unalloc->fixed_register_index()) | |
| 85 << ")"; | |
| 86 case UnallocatedOperand::MUST_HAVE_REGISTER: | 82 case UnallocatedOperand::MUST_HAVE_REGISTER: |
| 87 return os << "(R)"; | 83 return os << "(R)"; |
| 88 case UnallocatedOperand::MUST_HAVE_SLOT: | 84 case UnallocatedOperand::MUST_HAVE_SLOT: |
| 89 return os << "(S)"; | 85 return os << "(S)"; |
| 90 case UnallocatedOperand::SAME_AS_FIRST_INPUT: | 86 case UnallocatedOperand::SAME_AS_FIRST_INPUT: |
| 91 return os << "(1)"; | 87 return os << "(1)"; |
| 92 case UnallocatedOperand::ANY: | 88 case UnallocatedOperand::ANY: |
| 93 return os << "(-)"; | 89 return os << "(-)"; |
| 94 } | 90 } |
| 95 } | 91 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 108 case InstructionOperand::ALLOCATED: { | 104 case InstructionOperand::ALLOCATED: { |
| 109 auto allocated = AllocatedOperand::cast(op); | 105 auto allocated = AllocatedOperand::cast(op); |
| 110 switch (allocated.allocated_kind()) { | 106 switch (allocated.allocated_kind()) { |
| 111 case AllocatedOperand::STACK_SLOT: | 107 case AllocatedOperand::STACK_SLOT: |
| 112 os << "[stack:" << StackSlotOperand::cast(op).index(); | 108 os << "[stack:" << StackSlotOperand::cast(op).index(); |
| 113 break; | 109 break; |
| 114 case AllocatedOperand::DOUBLE_STACK_SLOT: | 110 case AllocatedOperand::DOUBLE_STACK_SLOT: |
| 115 os << "[double_stack:" << DoubleStackSlotOperand::cast(op).index(); | 111 os << "[double_stack:" << DoubleStackSlotOperand::cast(op).index(); |
| 116 break; | 112 break; |
| 117 case AllocatedOperand::REGISTER: | 113 case AllocatedOperand::REGISTER: |
| 118 os << "[" << RegisterOperand::cast(op).GetRegister().ToString() | 114 os << "[" |
| 115 << conf->general_register_name(RegisterOperand::cast(op).index()) |
| 119 << "|R"; | 116 << "|R"; |
| 120 break; | 117 break; |
| 121 case AllocatedOperand::DOUBLE_REGISTER: | 118 case AllocatedOperand::DOUBLE_REGISTER: |
| 122 os << "[" << DoubleRegisterOperand::cast(op).GetRegister().ToString() | 119 os << "[" |
| 123 << "|R"; | 120 << conf->double_register_name( |
| 121 DoubleRegisterOperand::cast(op).index()) << "|R"; |
| 124 break; | 122 break; |
| 125 } | 123 } |
| 126 switch (allocated.machine_type()) { | 124 switch (allocated.machine_type()) { |
| 127 case kRepWord32: | 125 case kRepWord32: |
| 128 os << "|w32"; | 126 os << "|w32"; |
| 129 break; | 127 break; |
| 130 case kRepWord64: | 128 case kRepWord64: |
| 131 os << "|w64"; | 129 os << "|w64"; |
| 132 break; | 130 break; |
| 133 case kRepFloat32: | 131 case kRepFloat32: |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 os << " B" << succ.ToInt(); | 873 os << " B" << succ.ToInt(); |
| 876 } | 874 } |
| 877 os << "\n"; | 875 os << "\n"; |
| 878 } | 876 } |
| 879 return os; | 877 return os; |
| 880 } | 878 } |
| 881 | 879 |
| 882 } // namespace compiler | 880 } // namespace compiler |
| 883 } // namespace internal | 881 } // namespace internal |
| 884 } // namespace v8 | 882 } // namespace v8 |
| OLD | NEW |