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 28 matching lines...) Expand all Loading... |
39 return os << "(1)"; | 39 return os << "(1)"; |
40 case UnallocatedOperand::ANY: | 40 case UnallocatedOperand::ANY: |
41 return os << "(-)"; | 41 return os << "(-)"; |
42 } | 42 } |
43 } | 43 } |
44 case InstructionOperand::CONSTANT: | 44 case InstructionOperand::CONSTANT: |
45 return os << "[constant:" << ConstantOperand::cast(op).virtual_register() | 45 return os << "[constant:" << ConstantOperand::cast(op).virtual_register() |
46 << "]"; | 46 << "]"; |
47 case InstructionOperand::IMMEDIATE: | 47 case InstructionOperand::IMMEDIATE: |
48 return os << "[immediate:" << ImmediateOperand::cast(op).index() << "]"; | 48 return os << "[immediate:" << ImmediateOperand::cast(op).index() << "]"; |
49 case InstructionOperand::STACK_SLOT: | 49 case InstructionOperand::ALLOCATED: |
50 return os << "[stack:" << StackSlotOperand::cast(op).index() << "]"; | 50 switch (AllocatedOperand::cast(op).allocated_kind()) { |
51 case InstructionOperand::DOUBLE_STACK_SLOT: | 51 case AllocatedOperand::STACK_SLOT: |
52 return os << "[double_stack:" << DoubleStackSlotOperand::cast(op).index() | 52 return os << "[stack:" << StackSlotOperand::cast(op).index() << "]"; |
53 << "]"; | 53 case AllocatedOperand::DOUBLE_STACK_SLOT: |
54 case InstructionOperand::REGISTER: | 54 return os << "[double_stack:" |
55 return os << "[" | 55 << DoubleStackSlotOperand::cast(op).index() << "]"; |
56 << conf->general_register_name( | 56 case AllocatedOperand::REGISTER: |
57 RegisterOperand::cast(op).index()) << "|R]"; | 57 return os << "[" |
58 case InstructionOperand::DOUBLE_REGISTER: | 58 << conf->general_register_name( |
59 return os << "[" | 59 RegisterOperand::cast(op).index()) << "|R]"; |
60 << conf->double_register_name( | 60 case AllocatedOperand::DOUBLE_REGISTER: |
61 DoubleRegisterOperand::cast(op).index()) << "|R]"; | 61 return os << "[" |
| 62 << conf->double_register_name( |
| 63 DoubleRegisterOperand::cast(op).index()) << "|R]"; |
| 64 } |
62 case InstructionOperand::INVALID: | 65 case InstructionOperand::INVALID: |
63 return os << "(x)"; | 66 return os << "(x)"; |
64 } | 67 } |
65 UNREACHABLE(); | 68 UNREACHABLE(); |
66 return os; | 69 return os; |
67 } | 70 } |
68 | 71 |
69 | 72 |
70 std::ostream& operator<<(std::ostream& os, | 73 std::ostream& operator<<(std::ostream& os, |
71 const PrintableMoveOperands& printable) { | 74 const PrintableMoveOperands& printable) { |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 os << " B" << succ.ToInt(); | 747 os << " B" << succ.ToInt(); |
745 } | 748 } |
746 os << "\n"; | 749 os << "\n"; |
747 } | 750 } |
748 return os; | 751 return os; |
749 } | 752 } |
750 | 753 |
751 } // namespace compiler | 754 } // namespace compiler |
752 } // namespace internal | 755 } // namespace internal |
753 } // namespace v8 | 756 } // namespace v8 |
OLD | NEW |