Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index 5ea5d330652122a15ddc5439c25e1c51ad330314..36fe424a53f17b0339c1680a6a2a418049f705b2 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -593,6 +593,10 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ Push(rdi); // Callee's JS function. |
__ Push(rdx); // Callee's new target. |
+ // Push zero for bytecode array offset. |
+ __ movp(rax, Immediate(0)); |
+ __ Push(rax); |
Michael Starzinger
2015/12/09 18:16:22
nit: Here "Push(Immediate(0))" should do the trick
rmcilroy
2015/12/10 14:17:12
Done.
|
+ |
// Get the bytecode array from the function object and load the pointer to the |
// first entry into edi (InterpreterBytecodeRegister). |
__ movp(rax, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); |
@@ -623,10 +627,10 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ bind(&ok); |
// If ok, push undefined as the initial value for all register file entries. |
+ // (plus one for the accumulator save slot). |
Label loop_header; |
Label loop_check; |
__ LoadRoot(rdx, Heap::kUndefinedValueRootIndex); |
- __ j(always, &loop_check); |
__ bind(&loop_header); |
// TODO(rmcilroy): Consider doing more than one push per loop iteration. |
__ Push(rdx); |
@@ -658,9 +662,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
// registers. |
__ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); |
__ movp(kInterpreterRegisterFileRegister, rbp); |
- __ subp(kInterpreterRegisterFileRegister, |
- Immediate(2 * kPointerSize + |
- StandardFrameConstants::kFixedFrameSizeFromFp)); |
+ __ addp(kInterpreterRegisterFileRegister, |
+ Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp)); |
__ movp(kInterpreterBytecodeOffsetRegister, |
Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
__ LoadRoot(kInterpreterDispatchTableRegister, |