Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: src/compiler/instruction.cc

Issue 1287383003: Re-reland: Remove register index/code indirection (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix MIPS tests again Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/instruction-selector-impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 << "(=" << conf->general_register_name( 77 return os << "(="
78 unalloc->fixed_register_index()) << ")"; 78 << conf->GetGeneralRegisterName(
79 unalloc->fixed_register_index())
80 << ")";
79 case UnallocatedOperand::FIXED_DOUBLE_REGISTER: 81 case UnallocatedOperand::FIXED_DOUBLE_REGISTER:
80 return os << "(=" << conf->double_register_name( 82 return os << "(="
81 unalloc->fixed_register_index()) << ")"; 83 << conf->GetDoubleRegisterName(
84 unalloc->fixed_register_index())
85 << ")";
82 case UnallocatedOperand::MUST_HAVE_REGISTER: 86 case UnallocatedOperand::MUST_HAVE_REGISTER:
83 return os << "(R)"; 87 return os << "(R)";
84 case UnallocatedOperand::MUST_HAVE_SLOT: 88 case UnallocatedOperand::MUST_HAVE_SLOT:
85 return os << "(S)"; 89 return os << "(S)";
86 case UnallocatedOperand::SAME_AS_FIRST_INPUT: 90 case UnallocatedOperand::SAME_AS_FIRST_INPUT:
87 return os << "(1)"; 91 return os << "(1)";
88 case UnallocatedOperand::ANY: 92 case UnallocatedOperand::ANY:
89 return os << "(-)"; 93 return os << "(-)";
90 } 94 }
91 } 95 }
(...skipping 12 matching lines...) Expand all
104 case InstructionOperand::ALLOCATED: { 108 case InstructionOperand::ALLOCATED: {
105 auto allocated = AllocatedOperand::cast(op); 109 auto allocated = AllocatedOperand::cast(op);
106 switch (allocated.allocated_kind()) { 110 switch (allocated.allocated_kind()) {
107 case AllocatedOperand::STACK_SLOT: 111 case AllocatedOperand::STACK_SLOT:
108 os << "[stack:" << StackSlotOperand::cast(op).index(); 112 os << "[stack:" << StackSlotOperand::cast(op).index();
109 break; 113 break;
110 case AllocatedOperand::DOUBLE_STACK_SLOT: 114 case AllocatedOperand::DOUBLE_STACK_SLOT:
111 os << "[double_stack:" << DoubleStackSlotOperand::cast(op).index(); 115 os << "[double_stack:" << DoubleStackSlotOperand::cast(op).index();
112 break; 116 break;
113 case AllocatedOperand::REGISTER: 117 case AllocatedOperand::REGISTER:
114 os << "[" 118 os << "[" << RegisterOperand::cast(op).GetRegister().ToString()
115 << conf->general_register_name(RegisterOperand::cast(op).index())
116 << "|R"; 119 << "|R";
117 break; 120 break;
118 case AllocatedOperand::DOUBLE_REGISTER: 121 case AllocatedOperand::DOUBLE_REGISTER:
119 os << "[" 122 os << "[" << DoubleRegisterOperand::cast(op).GetRegister().ToString()
120 << conf->double_register_name( 123 << "|R";
121 DoubleRegisterOperand::cast(op).index()) << "|R";
122 break; 124 break;
123 } 125 }
124 switch (allocated.machine_type()) { 126 switch (allocated.machine_type()) {
125 case kRepWord32: 127 case kRepWord32:
126 os << "|w32"; 128 os << "|w32";
127 break; 129 break;
128 case kRepWord64: 130 case kRepWord64:
129 os << "|w64"; 131 os << "|w64";
130 break; 132 break;
131 case kRepFloat32: 133 case kRepFloat32:
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 os << " B" << succ.ToInt(); 875 os << " B" << succ.ToInt();
874 } 876 }
875 os << "\n"; 877 os << "\n";
876 } 878 }
877 return os; 879 return os;
878 } 880 }
879 881
880 } // namespace compiler 882 } // namespace compiler
881 } // namespace internal 883 } // namespace internal
882 } // namespace v8 884 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/instruction-selector-impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698