Commit 0fe64b7e authored by sreten.kovacevic's avatar sreten.kovacevic Committed by Commit Bot

[Liftoff][mips] Implement remaining Call and Trace memory methods

Port CallIndirect and CallRuntime methods. Also, implement methods
for allocation and deallocation of stack slots, which are used in
trace memory operations.

Bug: v8:6600
Change-Id: I99e0115dcf6d971229892b27b4b4f01d0c5441e8
Reviewed-on: https://chromium-review.googlesource.com/970262
Commit-Queue: Sreten Kovacevic <sreten.kovacevic@mips.com>
Reviewed-by: 's avatarIvica Bogosavljevic <ivica.bogosavljevic@mips.com>
Cr-Commit-Position: refs/heads/master@{#52065}
parent 520b025f
......@@ -734,21 +734,29 @@ void LiftoffAssembler::CallNativeWasmCode(Address addr) {
}
void LiftoffAssembler::CallRuntime(Zone* zone, Runtime::FunctionId fid) {
BAILOUT("CallRuntime");
// Set context to zero.
TurboAssembler::Move(cp, zero_reg);
CallRuntimeDelayed(zone, fid);
}
void LiftoffAssembler::CallIndirect(wasm::FunctionSig* sig,
compiler::CallDescriptor* call_descriptor,
Register target) {
BAILOUT("CallIndirect");
if (target == no_reg) {
pop(at);
Call(at);
} else {
Call(target);
}
}
void LiftoffAssembler::AllocateStackSlot(Register addr, uint32_t size) {
BAILOUT("AllocateStackSlot");
addiu(sp, sp, -size);
TurboAssembler::Move(addr, sp);
}
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) {
BAILOUT("DeallocateStackSlot");
addiu(sp, sp, size);
}
} // namespace wasm
......
......@@ -664,21 +664,29 @@ void LiftoffAssembler::CallNativeWasmCode(Address addr) {
}
void LiftoffAssembler::CallRuntime(Zone* zone, Runtime::FunctionId fid) {
BAILOUT("CallRuntime");
// Set context to zero.
TurboAssembler::Move(cp, zero_reg);
CallRuntimeDelayed(zone, fid);
}
void LiftoffAssembler::CallIndirect(wasm::FunctionSig* sig,
compiler::CallDescriptor* call_descriptor,
Register target) {
BAILOUT("CallIndirect");
if (target == no_reg) {
pop(at);
Call(at);
} else {
Call(target);
}
}
void LiftoffAssembler::AllocateStackSlot(Register addr, uint32_t size) {
BAILOUT("AllocateStackSlot");
daddiu(sp, sp, -size);
TurboAssembler::Move(addr, sp);
}
void LiftoffAssembler::DeallocateStackSlot(uint32_t size) {
BAILOUT("DeallocateStackSlot");
daddiu(sp, sp, size);
}
} // namespace wasm
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment