Index: src/mips64/builtins-mips64.cc |
diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc |
index 57938144da288d79c98a1196d747196db2b60f0f..54e26bacd48eacd2f2af12d36095a678b264fec2 100644 |
--- a/src/mips64/builtins-mips64.cc |
+++ b/src/mips64/builtins-mips64.cc |
@@ -991,8 +991,13 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
Operand(BYTECODE_ARRAY_TYPE)); |
} |
- // Push new.target, bytecode array and zero for bytecode array offset. |
- __ Push(a3, kInterpreterBytecodeArrayRegister, zero_reg); |
+ // Load initial bytecode offset. |
+ __ li(kInterpreterBytecodeOffsetRegister, |
+ Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
+ |
+ // Push new.target, bytecode array and Smi tagged bytecode array offset. |
+ __ SmiTag(a4, kInterpreterBytecodeOffsetRegister); |
+ __ Push(a3, kInterpreterBytecodeArrayRegister, a4); |
// Allocate the local and temporary register file on the stack. |
{ |
@@ -1022,11 +1027,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ Branch(&loop_header, ge, a4, Operand(zero_reg)); |
} |
- // Load bytecode offset and dispatch table into registers. |
+ // Load accumulator and dispatch table into registers. |
__ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); |
- __ Daddu(a7, fp, Operand(InterpreterFrameConstants::kRegisterFileFromFp)); |
- __ li(kInterpreterBytecodeOffsetRegister, |
- Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
__ li(kInterpreterDispatchTableRegister, |
Operand(ExternalReference::interpreter_dispatch_table_address( |
masm->isolate()))); |