| 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..7136de96b1d6bda3d7216e43e675ca3808eef2b5 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,18 @@ 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 UsePointerLocation(LinkageLocation to_location,
|
| + LinkageLocation from_location) {
|
| + MachineType type = static_cast<MachineType>(kTypeAny | kMachPtr);
|
| + UnallocatedOperand casted_from_operand =
|
| + UnallocatedOperand::cast(TempLocation(from_location, type));
|
| + 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,
|
|
|