| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 MachineRepresentation rep = InstructionSequence::DefaultRepresentation(); | 132 MachineRepresentation rep = InstructionSequence::DefaultRepresentation(); |
| 133 if (location.IsRegister()) { | 133 if (location.IsRegister()) { |
| 134 return ExplicitOperand(LocationOperand::REGISTER, rep, | 134 return ExplicitOperand(LocationOperand::REGISTER, rep, |
| 135 location.AsRegister()); | 135 location.AsRegister()); |
| 136 } else { | 136 } else { |
| 137 return ExplicitOperand(LocationOperand::STACK_SLOT, rep, | 137 return ExplicitOperand(LocationOperand::STACK_SLOT, rep, |
| 138 location.GetLocation()); | 138 location.GetLocation()); |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 | 141 |
| 142 InstructionOperand UseImmediate(int immediate) { |
| 143 return sequence()->AddImmediate(Constant(immediate)); |
| 144 } |
| 145 |
| 142 InstructionOperand UseImmediate(Node* node) { | 146 InstructionOperand UseImmediate(Node* node) { |
| 143 return sequence()->AddImmediate(ToConstant(node)); | 147 return sequence()->AddImmediate(ToConstant(node)); |
| 144 } | 148 } |
| 145 | 149 |
| 146 InstructionOperand UseNegatedImmediate(Node* node) { | 150 InstructionOperand UseNegatedImmediate(Node* node) { |
| 147 return sequence()->AddImmediate(ToNegatedConstant(node)); | 151 return sequence()->AddImmediate(ToNegatedConstant(node)); |
| 148 } | 152 } |
| 149 | 153 |
| 150 InstructionOperand UseLocation(Node* node, LinkageLocation location) { | 154 InstructionOperand UseLocation(Node* node, LinkageLocation location) { |
| 151 return Use(node, ToUnallocatedOperand(location, GetVReg(node))); | 155 return Use(node, ToUnallocatedOperand(location, GetVReg(node))); |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 // or mode_ == kFlags_set. | 401 // or mode_ == kFlags_set. |
| 398 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch. | 402 BasicBlock* true_block_; // Only valid if mode_ == kFlags_branch. |
| 399 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch. | 403 BasicBlock* false_block_; // Only valid if mode_ == kFlags_branch. |
| 400 }; | 404 }; |
| 401 | 405 |
| 402 } // namespace compiler | 406 } // namespace compiler |
| 403 } // namespace internal | 407 } // namespace internal |
| 404 } // namespace v8 | 408 } // namespace v8 |
| 405 | 409 |
| 406 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 410 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| OLD | NEW |