[webkit-changes] [WebKit/WebKit] 346596: BBQJIT's ScratchScope should always lock preseverv...
Keith Miller
noreply at github.com
Wed Jun 14 12:17:01 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 34659680f0d031dc06982f829f4423d747cd773b
https://github.com/WebKit/WebKit/commit/34659680f0d031dc06982f829f4423d747cd773b
Author: Keith Miller <keith_miller at apple.com>
Date: 2023-06-14 (Wed, 14 Jun 2023)
Changed paths:
M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
Log Message:
-----------
BBQJIT's ScratchScope should always lock preseverved registers
https://bugs.webkit.org/show_bug.cgi?id=258044
Reviewed by Yusuke Suzuki.
Right now if a preserved location/register is already bound to a Location then we don't lock its slot. By not locking however, when we go to allocate any requested scratches we could choose one of the preserved registers to evict. This patch fixes this by always locking the preserved locations.
Additionally, some places where we were using ScratchScope to lock nonArgumentNonPreservedGPR1 can now use ScratchScope to get a non-argument non-preserved register. This is done by preserving all argument GPRs then immediately releasing them via a new unbindPreserved method.
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJIT::addIf):
(JSC::Wasm::BBQJIT::emitIndirectCall):
(JSC::Wasm::BBQJIT::addCallIndirect):
(JSC::Wasm::BBQJIT::addCallRef):
(JSC::Wasm::BBQJIT::ScratchScope::ScratchScope):
(JSC::Wasm::BBQJIT::ScratchScope::~ScratchScope):
(JSC::Wasm::BBQJIT::ScratchScope::unbindEarly):
(JSC::Wasm::BBQJIT::ScratchScope::unbindScratches):
(JSC::Wasm::BBQJIT::ScratchScope::unbindPreserved):
(JSC::Wasm::BBQJIT::ScratchScope::gpr const):
(JSC::Wasm::BBQJIT::ScratchScope::fpr const):
(JSC::Wasm::BBQJIT::ScratchScope::unbind): Deleted.
Canonical link: https://commits.webkit.org/265159@main
More information about the webkit-changes
mailing list