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 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
7 | 7 |
8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
9 #include "src/compiler/instruction-selector.h" | 9 #include "src/compiler/instruction-selector.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 UnallocatedOperand* ToUnallocatedOperand(LinkageLocation location) { | 195 UnallocatedOperand* ToUnallocatedOperand(LinkageLocation location) { |
196 if (location.location_ == LinkageLocation::ANY_REGISTER) { | 196 if (location.location_ == LinkageLocation::ANY_REGISTER) { |
197 return new (zone()) | 197 return new (zone()) |
198 UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER); | 198 UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER); |
199 } | 199 } |
200 if (location.location_ < 0) { | 200 if (location.location_ < 0) { |
201 return new (zone()) UnallocatedOperand(UnallocatedOperand::FIXED_SLOT, | 201 return new (zone()) UnallocatedOperand(UnallocatedOperand::FIXED_SLOT, |
202 location.location_); | 202 location.location_); |
203 } | 203 } |
204 if (location.rep_ == kMachineFloat64) { | 204 if (RepresentationOf(location.rep_) == kRepFloat64) { |
205 return new (zone()) UnallocatedOperand( | 205 return new (zone()) UnallocatedOperand( |
206 UnallocatedOperand::FIXED_DOUBLE_REGISTER, location.location_); | 206 UnallocatedOperand::FIXED_DOUBLE_REGISTER, location.location_); |
207 } | 207 } |
208 return new (zone()) UnallocatedOperand(UnallocatedOperand::FIXED_REGISTER, | 208 return new (zone()) UnallocatedOperand(UnallocatedOperand::FIXED_REGISTER, |
209 location.location_); | 209 location.location_); |
210 } | 210 } |
211 | 211 |
212 InstructionSelector* selector_; | 212 InstructionSelector* selector_; |
213 }; | 213 }; |
214 | 214 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 int control_count() { return descriptor->CanLazilyDeoptimize() ? 2 : 0; } | 362 int control_count() { return descriptor->CanLazilyDeoptimize() ? 2 : 0; } |
363 | 363 |
364 int fixed_and_control_count() { return fixed_count + control_count(); } | 364 int fixed_and_control_count() { return fixed_count + control_count(); } |
365 }; | 365 }; |
366 | 366 |
367 } // namespace compiler | 367 } // namespace compiler |
368 } // namespace internal | 368 } // namespace internal |
369 } // namespace v8 | 369 } // namespace v8 |
370 | 370 |
371 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 371 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
OLD | NEW |