Index: src/builtins/mips/builtins-mips.cc |
diff --git a/src/builtins/mips/builtins-mips.cc b/src/builtins/mips/builtins-mips.cc |
index 145af2c47467cce36f42d5b9a33d2bbc54ae4f4e..cafdd335ab2a4ab9d1055080943a9d12f0390a0f 100644 |
--- a/src/builtins/mips/builtins-mips.cc |
+++ b/src/builtins/mips/builtins-mips.cc |
@@ -3107,6 +3107,32 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
} |
} |
+void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) { |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ |
+ // Save all parameter registers (see wasm-linkage.cc). They might be |
+ // overwritten in the runtime call below. |
+ // Other registers (like context and root) are not relevant here. The |
+ // CEntryStub will overwrite them anyway. |
+ const RegList gp_regs = a0.bit() | a1.bit() | a2.bit() | a3.bit(); |
+ const RegList fp_regs = f2.bit() | f4.bit() | f6.bit() | f8.bit() | |
+ f10.bit() | f12.bit() | f14.bit(); |
+ __ MultiPush(gp_regs); |
+ __ MultiPushFPU(fp_regs); |
+ |
+ __ Move(kContextRegister, Smi::kZero); |
+ __ CallRuntime(Runtime::kWasmCompileLazy); |
+ |
+ // Restore registers. |
+ __ MultiPopFPU(fp_regs); |
+ __ MultiPop(gp_regs); |
+ } |
+ // Now jump to the instructions of the returned code object. |
+ __ Addu(at, v0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
+ __ Jump(at); |
+} |
+ |
#undef __ |
} // namespace internal |