Chromium Code Reviews| Index: src/compiler/instruction-selector-impl.h |
| diff --git a/src/compiler/instruction-selector-impl.h b/src/compiler/instruction-selector-impl.h |
| index 8543aa0b19604dec163c9801a210ec686d0ee691..9916f14028cb69901f7b398c67e0d2d86ce8fd80 100644 |
| --- a/src/compiler/instruction-selector-impl.h |
| +++ b/src/compiler/instruction-selector-impl.h |
| @@ -128,9 +128,15 @@ class OperandGenerator { |
| reg.code(), GetVReg(node))); |
| } |
| - InstructionOperand UseExplicit(Register reg) { |
| + InstructionOperand UseExplicit(LinkageLocation location) { |
| MachineType machine_type = InstructionSequence::DefaultRepresentation(); |
| - return ExplicitOperand(LocationOperand::REGISTER, machine_type, reg.code()); |
| + if (location.IsRegister()) { |
| + return ExplicitOperand(LocationOperand::REGISTER, machine_type, |
| + location.AsRegister()); |
| + } else { |
| + return ExplicitOperand(LocationOperand::STACK_SLOT, machine_type, |
| + location.GetLocation()); |
| + } |
| } |
| InstructionOperand UseImmediate(Node* node) { |
| @@ -142,6 +148,19 @@ class OperandGenerator { |
| return Use(node, ToUnallocatedOperand(location, type, GetVReg(node))); |
| } |
| + // Used to force gap moves from the from_location to the to_location |
| + // immediately before an instruction. |
| + InstructionOperand UseLocation(LinkageLocation to_location, |
| + LinkageLocation from_location, |
| + MachineType type) { |
| + UnallocatedOperand casted_from_operand = |
| + UnallocatedOperand::cast(TempLocation( |
| + from_location, static_cast<MachineType>(kTypeAny | kMachPtr))); |
|
Jarin
2015/11/20 10:56:09
Why does not this use the incoming type? As sugges
danno
2015/11/20 14:43:23
Done.
|
| + selector_->Emit(kArchNop, casted_from_operand); |
| + return ToUnallocatedOperand(to_location, type, |
| + casted_from_operand.virtual_register()); |
| + } |
| + |
| InstructionOperand TempRegister() { |
| return UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, |
| UnallocatedOperand::USED_AT_START, |