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

Unified Diff: src/builtins/arm64/builtins-arm64.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 | « src/builtins/arm/builtins-arm.cc ('k') | src/builtins/builtins.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/arm64/builtins-arm64.cc
diff --git a/src/builtins/arm64/builtins-arm64.cc b/src/builtins/arm64/builtins-arm64.cc
index 79184bebe176cfa9494d234bef47fc53c5e88078..a7e768570b21d4a50cfea52522788edb15f0486f 100644
--- a/src/builtins/arm64/builtins-arm64.cc
+++ b/src/builtins/arm64/builtins-arm64.cc
@@ -3164,6 +3164,35 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
}
}
+void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) {
+ DCHECK(masm->StackPointer().is(jssp));
+ __ Move(jssp, csp);
+ {
+ FrameScope scope(masm, StackFrame::INTERNAL);
+
+ // Save all parameter registers (see wasm-linkage.cc).
+ const RegList gp_regs = x0.Bit() | x1.Bit() | x2.Bit() | x3.Bit() |
+ x4.Bit() | x5.Bit() | x6.Bit() | x7.Bit();
+ const RegList fp_regs = d0.Bit() | d1.Bit() | d2.Bit() | d3.Bit() |
+ d4.Bit() | d5.Bit() | d6.Bit() | d7.Bit();
+ __ PushXRegList(gp_regs);
+ __ PushDRegList(fp_regs);
+
+ // 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 x8.
+ __ Add(x8, x0, Code::kHeaderSize - kHeapObjectTag);
+
+ // Restore registers.
+ __ PopDRegList(fp_regs);
+ __ PopXRegList(gp_regs);
+ }
+ // Now jump to the instructions of the returned code object.
+ __ Jump(x8);
+}
+
#undef __
} // namespace internal
« no previous file with comments | « src/builtins/arm/builtins-arm.cc ('k') | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698