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

Side by Side Diff: src/compiler/register-allocator-verifier.cc

Issue 2013193002: Turbofan: Rename IsFloat -> IsFP (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/x64/instruction-selector-x64.cc » ('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/bit-vector.h" 5 #include "src/bit-vector.h"
6 #include "src/compiler/instruction.h" 6 #include "src/compiler/instruction.h"
7 #include "src/compiler/register-allocator-verifier.h" 7 #include "src/compiler/register-allocator-verifier.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 int value = imm->type() == ImmediateOperand::INLINE ? imm->inline_value() 153 int value = imm->type() == ImmediateOperand::INLINE ? imm->inline_value()
154 : imm->indexed_value(); 154 : imm->indexed_value();
155 constraint->type_ = kImmediate; 155 constraint->type_ = kImmediate;
156 constraint->value_ = value; 156 constraint->value_ = value;
157 } else { 157 } else {
158 CHECK(op->IsUnallocated()); 158 CHECK(op->IsUnallocated());
159 const UnallocatedOperand* unallocated = UnallocatedOperand::cast(op); 159 const UnallocatedOperand* unallocated = UnallocatedOperand::cast(op);
160 int vreg = unallocated->virtual_register(); 160 int vreg = unallocated->virtual_register();
161 constraint->virtual_register_ = vreg; 161 constraint->virtual_register_ = vreg;
162 if (unallocated->basic_policy() == UnallocatedOperand::FIXED_SLOT) { 162 if (unallocated->basic_policy() == UnallocatedOperand::FIXED_SLOT) {
163 constraint->type_ = sequence()->IsFloat(vreg) ? kDoubleSlot : kSlot; 163 constraint->type_ = sequence()->IsFP(vreg) ? kDoubleSlot : kSlot;
164 constraint->value_ = unallocated->fixed_slot_index(); 164 constraint->value_ = unallocated->fixed_slot_index();
165 } else { 165 } else {
166 switch (unallocated->extended_policy()) { 166 switch (unallocated->extended_policy()) {
167 case UnallocatedOperand::ANY: 167 case UnallocatedOperand::ANY:
168 case UnallocatedOperand::NONE: 168 case UnallocatedOperand::NONE:
169 if (sequence()->IsFloat(vreg)) { 169 if (sequence()->IsFP(vreg)) {
170 constraint->type_ = kNoneDouble; 170 constraint->type_ = kNoneDouble;
171 } else { 171 } else {
172 constraint->type_ = kNone; 172 constraint->type_ = kNone;
173 } 173 }
174 break; 174 break;
175 case UnallocatedOperand::FIXED_REGISTER: 175 case UnallocatedOperand::FIXED_REGISTER:
176 if (unallocated->HasSecondaryStorage()) { 176 if (unallocated->HasSecondaryStorage()) {
177 constraint->type_ = kRegisterAndSlot; 177 constraint->type_ = kRegisterAndSlot;
178 constraint->spilled_slot_ = unallocated->GetSecondaryStorage(); 178 constraint->spilled_slot_ = unallocated->GetSecondaryStorage();
179 } else { 179 } else {
180 constraint->type_ = kFixedRegister; 180 constraint->type_ = kFixedRegister;
181 } 181 }
182 constraint->value_ = unallocated->fixed_register_index(); 182 constraint->value_ = unallocated->fixed_register_index();
183 break; 183 break;
184 case UnallocatedOperand::FIXED_DOUBLE_REGISTER: 184 case UnallocatedOperand::FIXED_DOUBLE_REGISTER:
185 constraint->type_ = kFixedDoubleRegister; 185 constraint->type_ = kFixedDoubleRegister;
186 constraint->value_ = unallocated->fixed_register_index(); 186 constraint->value_ = unallocated->fixed_register_index();
187 break; 187 break;
188 case UnallocatedOperand::MUST_HAVE_REGISTER: 188 case UnallocatedOperand::MUST_HAVE_REGISTER:
189 if (sequence()->IsFloat(vreg)) { 189 if (sequence()->IsFP(vreg)) {
190 constraint->type_ = kDoubleRegister; 190 constraint->type_ = kDoubleRegister;
191 } else { 191 } else {
192 constraint->type_ = kRegister; 192 constraint->type_ = kRegister;
193 } 193 }
194 break; 194 break;
195 case UnallocatedOperand::MUST_HAVE_SLOT: 195 case UnallocatedOperand::MUST_HAVE_SLOT:
196 constraint->type_ = sequence()->IsFloat(vreg) ? kDoubleSlot : kSlot; 196 constraint->type_ = sequence()->IsFP(vreg) ? kDoubleSlot : kSlot;
197 break; 197 break;
198 case UnallocatedOperand::SAME_AS_FIRST_INPUT: 198 case UnallocatedOperand::SAME_AS_FIRST_INPUT:
199 constraint->type_ = kSameAsFirst; 199 constraint->type_ = kSameAsFirst;
200 break; 200 break;
201 } 201 }
202 } 202 }
203 } 203 }
204 } 204 }
205 205
206 void RegisterAllocatorVerifier::CheckConstraint( 206 void RegisterAllocatorVerifier::CheckConstraint(
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 new (zone()) FinalAssessment(vreg, pending); 551 new (zone()) FinalAssessment(vreg, pending);
552 break; 552 break;
553 } 553 }
554 } 554 }
555 } 555 }
556 } 556 }
557 557
558 } // namespace compiler 558 } // namespace compiler
559 } // namespace internal 559 } // namespace internal
560 } // namespace v8 560 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698