Index: src/x64/builtins-x64.cc |
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc |
index 1e3b7b7d85e5e44a4aefec5899c6baebef0ae8a4..0794d9a6c31f13b866348b207b2eafa4eebee7a9 100644 |
--- a/src/x64/builtins-x64.cc |
+++ b/src/x64/builtins-x64.cc |
@@ -620,13 +620,6 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ Push(rdi); // Callee's JS function. |
__ Push(rdx); // Callee's new target. |
- // Push dispatch table pointer. |
- __ Move(rax, ExternalReference::interpreter_dispatch_table_address( |
- masm->isolate())); |
- __ Push(rax); |
- // Push zero for bytecode array offset. |
- __ Push(Immediate(0)); |
- |
// 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)); |
@@ -641,6 +634,11 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ Assert(equal, kFunctionDataShouldBeBytecodeArrayOnInterpreterEntry); |
} |
+ // Push bytecode array. |
+ __ Push(kInterpreterBytecodeArrayRegister); |
+ // Push zero for bytecode array offset. |
+ __ Push(Immediate(0)); |
+ |
// Allocate the local and temporary register file on the stack. |
{ |
// Load frame size from the BytecodeArray object. |
@@ -684,8 +682,9 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
Immediate(InterpreterFrameConstants::kRegisterFilePointerFromFp)); |
__ movp(kInterpreterBytecodeOffsetRegister, |
Immediate(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
- __ movp(kInterpreterDispatchTableRegister, |
- Operand(rbp, InterpreterFrameConstants::kDispatchTableFromFp)); |
+ __ Move( |
+ kInterpreterDispatchTableRegister, |
+ ExternalReference::interpreter_dispatch_table_address(masm->isolate())); |
// Dispatch to the first bytecode handler for the function. |
__ movzxbp(rbx, Operand(kInterpreterBytecodeArrayRegister, |
@@ -819,12 +818,10 @@ static void Generate_EnterBytecodeDispatch(MacroAssembler* masm) { |
InterpreterFrameConstants::kContextFromRegisterPointer)); |
// Get the bytecode array pointer from the frame. |
- __ movp(rbx, |
- Operand(kInterpreterRegisterFileRegister, |
- InterpreterFrameConstants::kFunctionFromRegisterPointer)); |
- __ movp(rbx, FieldOperand(rbx, JSFunction::kSharedFunctionInfoOffset)); |
- __ movp(kInterpreterBytecodeArrayRegister, |
- FieldOperand(rbx, SharedFunctionInfo::kFunctionDataOffset)); |
+ __ movp( |
+ kInterpreterBytecodeArrayRegister, |
+ Operand(kInterpreterRegisterFileRegister, |
+ InterpreterFrameConstants::kBytecodeArrayFromRegisterPointer)); |
if (FLAG_debug_code) { |
// Check function data field is actually a BytecodeArray object. |