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

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

Issue 2761773004: PPC/s390: [wasm] Lazy compilation for asm.js (Closed)
Patch Set: 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/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/s390/builtins-s390.cc
diff --git a/src/builtins/s390/builtins-s390.cc b/src/builtins/s390/builtins-s390.cc
index 07c5fe91b1ca495f454214f91bb24fa70316aba3..ce477aa353501b107e4d51c498a48c2a303a735a 100644
--- a/src/builtins/s390/builtins-s390.cc
+++ b/src/builtins/s390/builtins-s390.cc
@@ -3038,6 +3038,38 @@ 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). They might be
+ // overwritten in the runtime call below. We don't have any callee-saved
+ // registers in wasm, so no need to store anything else.
+ const RegList gp_regs =
+ r2.bit() | r3.bit() | r4.bit() | r5.bit() | r6.bit();
+#if V8_TARGET_ARCH_S390X
+ const RegList fp_regs = d0.bit() | d2.bit() | d4.bit() | d6.bit();
+#else
+ const RegList fp_regs = d0.bit() | d2.bit();
+#endif
+ __ MultiPush(gp_regs);
+ __ MultiPushDoubles(fp_regs);
+
+ // Initialize cp register with kZero, CEntryStub will use it to set the
+ // current context on the isolate.
+ __ LoadSmiLiteral(cp, Smi::kZero);
+ __ CallRuntime(Runtime::kWasmCompileLazy);
+ // Store returned instruction start in ip.
+ __ AddP(ip, r2, Operand(Code::kHeaderSize - kHeapObjectTag));
+
+ // Restore registers.
+ __ MultiPopDoubles(fp_regs);
+ __ MultiPop(gp_regs);
+ }
+ // Now jump to the instructions of the returned code object.
+ __ Jump(ip);
+}
+
#undef __
} // namespace internal
« no previous file with comments | « src/builtins/ppc/builtins-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698