Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index a14fdf5b184a324196b06d39472a72fbe601d37d..ea24f038b03e1e5c4e16e74083f0ae9865ef06c4 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -649,10 +649,14 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
} |
- // Push bytecode array. |
+ // Load initial bytecode offset. |
+ __ movp(kInterpreterBytecodeOffsetRegister, |
+ Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
+ |
+ // Push bytecode array and Smi tagged bytecode offset. |
__ Push(kInterpreterBytecodeArrayRegister); |
- // Push zero for bytecode array offset. |
- __ Push(Immediate(0)); |
+ __ Integer32ToSmi(rcx, kInterpreterBytecodeOffsetRegister); |
+ __ Push(rcx); |
// Allocate the local and temporary register file on the stack. |
{ |
@@ -683,13 +687,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ j(greater_equal, &loop_header, Label::kNear); |
} |
- // Load accumulator, register file, bytecode offset, dispatch table into |
- // registers. |
+ // Load accumulator and dispatch table into registers. |
__ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); |
- __ movp(r11, rbp); |
- __ addp(r11, Immediate(InterpreterFrameConstants::kRegisterFileFromFp)); |
- __ movp(kInterpreterBytecodeOffsetRegister, |
- Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
__ Move( |
kInterpreterDispatchTableRegister, |
ExternalReference::interpreter_dispatch_table_address(masm->isolate())); |