| Index: src/builtins/ppc/builtins-ppc.cc
|
| diff --git a/src/builtins/ppc/builtins-ppc.cc b/src/builtins/ppc/builtins-ppc.cc
|
| index 3efae357b4bb5a8c4a5257016dda546c0e620b20..14341704360b8456b9972a11293cb590f5553a87 100644
|
| --- a/src/builtins/ppc/builtins-ppc.cc
|
| +++ b/src/builtins/ppc/builtins-ppc.cc
|
| @@ -3027,6 +3027,35 @@ 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 = r3.bit() | r4.bit() | r5.bit() | r6.bit() |
|
| + r7.bit() | r8.bit() | r9.bit() | r10.bit();
|
| + const RegList fp_regs = d1.bit() | d2.bit() | d3.bit() | d4.bit() |
|
| + d5.bit() | d6.bit() | d7.bit() | d8.bit();
|
| + __ 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.
|
| + __ addi(ip, r3, 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
|
| } // namespace v8
|
|
|