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

Unified Diff: src/builtins/mips64/builtins-mips64.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/mips/builtins-mips.cc ('k') | src/builtins/x64/builtins-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/mips64/builtins-mips64.cc
diff --git a/src/builtins/mips64/builtins-mips64.cc b/src/builtins/mips64/builtins-mips64.cc
index a067386a68f6c0e24d58c542001a8a69e5405875..bff7cc3f1ea0784dd737fc0a4c4e2ccf03975736 100644
--- a/src/builtins/mips64/builtins-mips64.cc
+++ b/src/builtins/mips64/builtins-mips64.cc
@@ -3134,6 +3134,33 @@ 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() |
+ a4.bit() | a5.bit() | a6.bit() | a7.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.
+ __ Daddu(at, v0, Operand(Code::kHeaderSize - kHeapObjectTag));
+ __ Jump(at);
+}
+
#undef __
} // namespace internal
« no previous file with comments | « src/builtins/mips/builtins-mips.cc ('k') | src/builtins/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698