Commit d104907c authored by Farazmand's avatar Farazmand Committed by Commit Bot

PPC/s390: [wasm] Stack checks should not call runtime functions but stubs

Port b0b1ba9a

Original Commit Message:

    This CL changes the secondary stack check for WebAssembly functions
    with big stack frames in the code generator from calling a runtime
    function to calling a code stub. The runtime function caused problems
    with serialization.

R=ahaas@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ie2175eedb043304405fd271c3bf1337dac76ab49
Reviewed-on: https://chromium-review.googlesource.com/c/1483210Reviewed-by: 's avatarJunliang Yan <jyan@ca.ibm.com>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#59796}
parent e81e5030
......@@ -2368,12 +2368,7 @@ void CodeGenerator::AssembleConstructFrame() {
__ bge(&done);
}
__ LoadP(r5,
FieldMemOperand(kWasmInstanceRegister,
WasmInstanceObject::kCEntryStubOffset),
r0);
__ Move(cp, Smi::zero());
__ CallRuntimeWithCEntry(Runtime::kThrowWasmStackOverflow, r5);
__ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
// We come from WebAssembly, there are no references for the GC.
ReferenceMap* reference_map = new (zone()) ReferenceMap(zone());
RecordSafepoint(reference_map, Safepoint::kSimple,
......
......@@ -3067,10 +3067,7 @@ void CodeGenerator::AssembleConstructFrame() {
__ bge(&done);
}
__ LoadP(r4, FieldMemOperand(kWasmInstanceRegister,
WasmInstanceObject::kCEntryStubOffset));
__ Move(cp, Smi::zero());
__ CallRuntimeWithCEntry(Runtime::kThrowWasmStackOverflow, r4);
__ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
// We come from WebAssembly, there are no references for the GC.
ReferenceMap* reference_map = new (zone()) ReferenceMap(zone());
RecordSafepoint(reference_map, Safepoint::kSimple,
......
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