Commit 4baf07a7 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[sparkplug] Add scratch register for arm64

We didn't have enough scratch registers for a suspend generator
whose field write offsets exceeded the immediate value range.

Bug: v8:11420, chromium:1193493
Change-Id: Iee90db4ef1ec00924bcc4791a8e6ffb9138bb388
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2794424
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73739}
parent e5b93c86
......@@ -23,6 +23,7 @@ class BaselineAssembler::ScratchRegisterScope {
// If we haven't opened a scratch scope yet, for the first one add a
// couple of extra registers.
wrapped_scope_.Include(x14, x15);
wrapped_scope_.Include(x19);
}
assembler_->scratch_register_scope_ = this;
}
......
......@@ -268,6 +268,19 @@ for (let val of gen) {
}
assertEquals(4, i);
// Generator with a lot of locals
let gen_func_with_a_lot_of_locals = eval(`(function*() {
${ Array(32*1024).fill().map((x,i)=>`let local_${i};`).join("\n") }
yield 1;
yield 2;
yield 3;
})`);
i = 1;
for (let val of run(gen_func_with_a_lot_of_locals)) {
assertEquals(i++, val);
}
assertEquals(4, i);
// Async await
run(async function() {
await 1;
......
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