Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: src/builtins/arm/builtins-arm.cc

Issue 2731523005: [wasm] Lazy compilation for asm.js (Closed)
Patch Set: [wasm] Lazy compilation for asm.js Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/builtins/arm64/builtins-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | src/builtins/arm64/builtins-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698