Commit 5d762226 authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC/s390: [wasm] Fix explicit stack check to be Isolate independent.

Port 4c4c3437

Original Commit Message:

    This fixes the special stack check we emit for very large frames to no
    longer embed the limit address but load it from the instance object
    instead. It makes sure WasmCode remains independent of the Isolate.

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:7424
LOG=N

Change-Id: I35e662ee89fbad679a6c103518e4d1feb2c8dce0
Reviewed-on: https://chromium-review.googlesource.com/1131996Reviewed-by: 's avatarMuntasir Mallick <mmallick@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#54368}
parent a87c0cd1
......@@ -2365,8 +2365,9 @@ void CodeGenerator::AssembleConstructFrame() {
// check in the condition code.
if ((shrink_slots * kPointerSize) < (FLAG_stack_size * 1024)) {
Register scratch = ip;
__ Move(scratch,
ExternalReference::address_of_real_stack_limit(__ isolate()));
__ LoadP(scratch, FieldMemOperand(
kWasmInstanceRegister,
WasmInstanceObject::kRealStackLimitAddressOffset));
__ LoadP(scratch, MemOperand(scratch), r0);
__ Add(scratch, scratch, shrink_slots * kPointerSize, r0);
__ cmpl(sp, scratch);
......
......@@ -3005,8 +3005,9 @@ void CodeGenerator::AssembleConstructFrame() {
// check in the condition code.
if ((shrink_slots * kPointerSize) < (FLAG_stack_size * 1024)) {
Register scratch = r1;
__ Move(scratch,
ExternalReference::address_of_real_stack_limit(__ isolate()));
__ LoadP(scratch, FieldMemOperand(
kWasmInstanceRegister,
WasmInstanceObject::kRealStackLimitAddressOffset));
__ LoadP(scratch, MemOperand(scratch));
__ AddP(scratch, scratch, Operand(shrink_slots * kPointerSize));
__ CmpLogicalP(sp, scratch);
......
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