| Index: src/compiler/x64/code-generator-x64.cc
|
| diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
|
| index ffc9620543dc9e744cbf2df3ad342896ee8ea641..28966253210c4df158d015e71c3d16f3022fb2a0 100644
|
| --- a/src/compiler/x64/code-generator-x64.cc
|
| +++ b/src/compiler/x64/code-generator-x64.cc
|
| @@ -49,8 +49,11 @@ class X64OperandConverter : public InstructionOperandConverter {
|
|
|
| Operand ToOperand(InstructionOperand* op, int extra = 0) {
|
| DCHECK(op->IsStackSlot() || op->IsDoubleStackSlot());
|
| - FrameOffset offset = frame_access_state()->GetFrameOffset(
|
| - AllocatedOperand::cast(op)->index());
|
| + return SlotToOperand(AllocatedOperand::cast(op)->index());
|
| + }
|
| +
|
| + Operand SlotToOperand(int slot_index, int extra = 0) {
|
| + FrameOffset offset = frame_access_state()->GetFrameOffset(slot_index);
|
| return Operand(offset.from_stack_pointer() ? rsp : rbp,
|
| offset.offset() + extra);
|
| }
|
| @@ -2082,9 +2085,9 @@ void CodeGenerator::AssembleMove(InstructionOperand* source,
|
| case Constant::kHeapObject: {
|
| Handle<HeapObject> src_object = src.ToHeapObject();
|
| Heap::RootListIndex index;
|
| - int offset;
|
| - if (IsMaterializableFromFrame(src_object, &offset)) {
|
| - __ movp(dst, Operand(rbp, offset));
|
| + int slot;
|
| + if (IsMaterializableFromFrame(src_object, &slot)) {
|
| + __ movp(dst, g.SlotToOperand(slot));
|
| } else if (IsMaterializableFromRoot(src_object, &index)) {
|
| __ LoadRoot(dst, index);
|
| } else {
|
|
|