Index: src/mips/builtins-mips.cc |
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc |
index 024bd83570c42dbf0d27074a78329fb84320a46c..af42c2a7433332483e9ee268b53e7c4cfc2dfd32 100644 |
--- a/src/mips/builtins-mips.cc |
+++ b/src/mips/builtins-mips.cc |
@@ -1002,8 +1002,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(t0, kInterpreterBytecodeOffsetRegister); |
+ __ Push(a3, kInterpreterBytecodeArrayRegister, t0); |
// Allocate the local and temporary register file on the stack. |
{ |
@@ -1033,11 +1038,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { |
__ Branch(&loop_header, ge, t0, Operand(zero_reg)); |
} |
- // Load bytecode offset and dispatch table into registers. |
+ // Load accumulator and dispatch table into registers. |
__ LoadRoot(kInterpreterAccumulatorRegister, Heap::kUndefinedValueRootIndex); |
- __ Addu(t3, fp, Operand(InterpreterFrameConstants::kRegisterFileFromFp)); |
- __ li(kInterpreterBytecodeOffsetRegister, |
- Operand(BytecodeArray::kHeaderSize - kHeapObjectTag)); |
__ li(kInterpreterDispatchTableRegister, |
Operand(ExternalReference::interpreter_dispatch_table_address( |
masm->isolate()))); |