PPC/s390: [wasm] Merge the WasmContext into WasmInstanceObject
Port a6d974fe00
Original Commit Message:
This change makes lifetime management of WasmCode much simpler.
By using the WasmInstanceObject as the context for WASM code execution,
including the pointer to the memory base and indirect function tables,
this keeps the instance alive when WASM code is on the stack, since
the instance object is passed as a parameter and spilled onto the stack.
This is in preparation of sharing the code between instances and
isolates.
R=titzer@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N
Change-Id: I03c3ecff296cca929c69489e769a5dab60b93830
Reviewed-on: https://chromium-review.googlesource.com/1003117
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#52491}
This commit is contained in:
parent
5dd33fdbf2
commit
66e03c8832
@ -2623,9 +2623,9 @@ void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) {
|
||||
__ LoadSmiLiteral(cp, Smi::kZero);
|
||||
__ CallRuntime(Runtime::kWasmCompileLazy);
|
||||
// The entrypoint address is the first return value.
|
||||
__ mov(r11, kReturnRegister0);
|
||||
__ mr(r11, kReturnRegister0);
|
||||
// The WASM instance is the second return value.
|
||||
__ mov(wasm_instance_reg, kReturnRegister1);
|
||||
__ mr(wasm_instance_reg, kReturnRegister1);
|
||||
|
||||
// Restore registers.
|
||||
__ MultiPopDoubles(fp_regs);
|
||||
|
@ -2630,9 +2630,9 @@ void Builtins::Generate_WasmCompileLazy(MacroAssembler* masm) {
|
||||
__ LoadSmiLiteral(cp, Smi::kZero);
|
||||
__ CallRuntime(Runtime::kWasmCompileLazy);
|
||||
// The entrypoint address is the first return value.
|
||||
__ mov(ip, r2);
|
||||
__ LoadRR(ip, r2);
|
||||
// The WASM instance is the second return value.
|
||||
__ movq(wasm_instance_reg, kReturnRegister1);
|
||||
__ LoadRR(wasm_instance_reg, kReturnRegister1);
|
||||
|
||||
// Restore registers.
|
||||
__ MultiPopDoubles(fp_regs);
|
||||
|
Loading…
Reference in New Issue
Block a user