Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: cbb285948432c0c0fe8ef0267a94d56c6429153c
https://github.com/WebKit/WebKit/commit/cbb285948432c0c0fe8ef0267a94d56c6429153c
Author: Mikhail R. Gadelha <[email protected]>
Date: 2025-11-19 (Wed, 19 Nov 2025)
Changed paths:
M Source/JavaScriptCore/assembler/ARMv7Assembler.h
M Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h
M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
M Source/JavaScriptCore/wasm/WasmBBQJIT.h
M Source/JavaScriptCore/wasm/WasmBBQJIT32_64.cpp
M Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp
Log Message:
-----------
[JSC][32-bit] Enable fused branch compare on BBQ for 32-bit platforms
https://bugs.webkit.org/show_bug.cgi?id=302472
Reviewed by Justin Michaud.
This PR enables fused branch compare for 32-bit platforms with the goal of
reducing code size.
The 32-bit and 64-bit code paths are also unified with only two #if
USE(JSVALUE64),
emitBranchI64 is the most affected but it's minimal, we only need to pass more
registers in the branch64 call.
There was also only one change in the code copied from 64-bit, which was to
handle GPR2 in the two addFusedIfCompare methods.
This feature saves -16KiB in code size of JetStream3's tfjs-wasm.js, a -3.53%
improvement:
Base total code size: 439162 bytes (429KiB)
New total code size: 423680 bytes (414KiB)
Difference (new - base): -15482 bytes (-16KiB)
Percentage change: -3.53%
* Source/JavaScriptCore/assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::invert):
* Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::armV7ConditionForHigh32):
(JSC::MacroAssemblerARMv7::armV7ConditionForLow32):
(JSC::MacroAssemblerARMv7::compare64):
(JSC::MacroAssemblerARMv7::compare32AndSetFlags):
(JSC::MacroAssemblerARMv7::branch64Impl):
(JSC::MacroAssemblerARMv7::branch64):
(JSC::MacroAssemblerARMv7::branchTest64):
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::tryFoldFusedBranchCompare):
(JSC::Wasm::BBQJITImpl::BBQJIT::emitFusedBranchCompareBranch):
(JSC::Wasm::BBQJITImpl::BBQJIT::addFusedBranchCompare):
(JSC::Wasm::BBQJITImpl::BBQJIT::addFusedIfCompare):
(JSC::Wasm::BBQJITImpl::emitBranchI32):
(JSC::Wasm::BBQJITImpl::emitBranchI64):
(JSC::Wasm::BBQJITImpl::emitBranchF32):
(JSC::Wasm::BBQJITImpl::emitBranchF64):
* Source/JavaScriptCore/wasm/WasmBBQJIT.h:
* Source/JavaScriptCore/wasm/WasmBBQJIT32_64.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::tryFoldFusedBranchCompare): Deleted.
(JSC::Wasm::BBQJITImpl::BBQJIT::emitFusedBranchCompareBranch): Deleted.
(JSC::Wasm::BBQJITImpl::BBQJIT::addFusedBranchCompare): Deleted.
(JSC::Wasm::BBQJITImpl::BBQJIT::addFusedIfCompare): Deleted.
* Source/JavaScriptCore/wasm/WasmBBQJIT64.cpp:
(JSC::Wasm::BBQJITImpl::BBQJIT::tryFoldFusedBranchCompare): Deleted.
(JSC::Wasm::BBQJITImpl::BBQJIT::emitFusedBranchCompareBranch): Deleted.
(JSC::Wasm::BBQJITImpl::BBQJIT::addFusedBranchCompare): Deleted.
(JSC::Wasm::BBQJITImpl::BBQJIT::addFusedIfCompare): Deleted.
(JSC::Wasm::BBQJITImpl::emitBranchI32): Deleted.
(JSC::Wasm::BBQJITImpl::emitBranchI64): Deleted.
(JSC::Wasm::BBQJITImpl::emitBranchF32): Deleted.
(JSC::Wasm::BBQJITImpl::emitBranchF64): Deleted.
Canonical link: https://commits.webkit.org/303254@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications