PPC/s390: [wasm] Use a consistent limit for large frames
Port f7de8c8062
Original Commit Message:
For large frames we are executing a special stack check that checks the
remaining stack space before allocating the new frame. Different
platforms used different limits for the frame size so far. Liftoff
already uses 4KB everywhere, hence use the same limit also for TurboFan.
simplification.
R=clemensb@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N
Change-Id: Ie47572277769170878c3ed5598fe61edd8524ac7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3068955
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76063}
This commit is contained in:
parent
574ca6b71c
commit
2a654716c8
@ -4072,7 +4072,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
|
||||
if (required_slots > 0) {
|
||||
#if V8_ENABLE_WEBASSEMBLY
|
||||
if (info()->IsWasm() && required_slots > 128) {
|
||||
if (info()->IsWasm() && required_slots * kSystemPointerSize > 4 * KB) {
|
||||
// For WebAssembly functions with big frames we have to do the stack
|
||||
// overflow check before we construct the frame. Otherwise we may not
|
||||
// have enough space on the stack to call the runtime for the stack
|
||||
@ -4082,7 +4082,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
// If the frame is bigger than the stack, we throw the stack overflow
|
||||
// exception unconditionally. Thereby we can avoid the integer overflow
|
||||
// check in the condition code.
|
||||
if ((required_slots * kSystemPointerSize) < (FLAG_stack_size * 1024)) {
|
||||
if (required_slots * kSystemPointerSize < FLAG_stack_size * KB) {
|
||||
Register scratch = ip;
|
||||
__ LoadU64(
|
||||
scratch,
|
||||
@ -4097,12 +4097,11 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
}
|
||||
|
||||
__ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
|
||||
// We come from WebAssembly, there are no references for the GC.
|
||||
// The call does not return, hence we can ignore any references and just
|
||||
// define an empty safepoint.
|
||||
ReferenceMap* reference_map = zone()->New<ReferenceMap>(zone());
|
||||
RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
if (FLAG_debug_code) __ stop();
|
||||
|
||||
__ bind(&done);
|
||||
}
|
||||
|
@ -4015,7 +4015,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
|
||||
if (required_slots > 0) {
|
||||
#if V8_ENABLE_WEBASSEMBLY
|
||||
if (info()->IsWasm() && required_slots > 128) {
|
||||
if (info()->IsWasm() && required_slots * kSystemPointerSize > 4 * KB) {
|
||||
// For WebAssembly functions with big frames we have to do the stack
|
||||
// overflow check before we construct the frame. Otherwise we may not
|
||||
// have enough space on the stack to call the runtime for the stack
|
||||
@ -4025,7 +4025,7 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
// If the frame is bigger than the stack, we throw the stack overflow
|
||||
// exception unconditionally. Thereby we can avoid the integer overflow
|
||||
// check in the condition code.
|
||||
if ((required_slots * kSystemPointerSize) < (FLAG_stack_size * 1024)) {
|
||||
if (required_slots * kSystemPointerSize < FLAG_stack_size * KB) {
|
||||
Register scratch = r1;
|
||||
__ LoadU64(
|
||||
scratch,
|
||||
@ -4039,12 +4039,11 @@ void CodeGenerator::AssembleConstructFrame() {
|
||||
}
|
||||
|
||||
__ Call(wasm::WasmCode::kWasmStackOverflow, RelocInfo::WASM_STUB_CALL);
|
||||
// We come from WebAssembly, there are no references for the GC.
|
||||
// The call does not return, hence we can ignore any references and just
|
||||
// define an empty safepoint.
|
||||
ReferenceMap* reference_map = zone()->New<ReferenceMap>(zone());
|
||||
RecordSafepoint(reference_map);
|
||||
if (FLAG_debug_code) {
|
||||
__ stop();
|
||||
}
|
||||
if (FLAG_debug_code) __ stop();
|
||||
|
||||
__ bind(&done);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user