Index: src/builtins/arm/builtins-arm.cc |
diff --git a/src/builtins/arm/builtins-arm.cc b/src/builtins/arm/builtins-arm.cc |
index 378dc3664230a22a1273968ce7d410cc55470c46..f0d76b09d710c6426822433daa35b07f80300aca 100644 |
--- a/src/builtins/arm/builtins-arm.cc |
+++ b/src/builtins/arm/builtins-arm.cc |
@@ -3049,6 +3049,32 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
} |
} |
+void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) { |
+ { |
+ FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
+ |
+ // Save all parameter registers (see wasm-linkage.cc). |
+ const RegList gp_regs = r0.bit() | r1.bit() | r2.bit() | r3.bit(); |
+ constexpr DwVfpRegister lowest_fp_reg = d0; |
+ constexpr DwVfpRegister highest_fp_reg = d7; |
+ |
+ __ stm(db_w, sp, gp_regs); |
+ __ vstm(db_w, sp, lowest_fp_reg, highest_fp_reg); |
+ |
+ // Initialize cp register with kZero, CEntryStub will use it to set the |
+ // current context on the isolate. |
+ __ Move(cp, Smi::kZero); |
+ __ CallRuntime(Runtime::kWasmCompileLazy); |
+ // Store returned instruction start in r8. |
+ __ add(r8, r0, Operand(Code::kHeaderSize - kHeapObjectTag)); |
+ |
+ // Restore registers. |
+ __ vldm(ia_w, sp, lowest_fp_reg, highest_fp_reg); |
+ __ ldm(ia_w, sp, gp_regs); |
+ } |
+ // Now jump to the instructions of the returned code object. |
+ __ Jump(r8); |
+} |
#undef __ |
} // namespace internal |