Skip to content

JIT: convert all backends to bitmask-based register tracking#2173

Merged
bettio merged 1 commit intoatomvm:mainfrom
pguyot:w10/jit-bitmask-regs
Mar 9, 2026
Merged

JIT: convert all backends to bitmask-based register tracking#2173
bettio merged 1 commit intoatomvm:mainfrom
pguyot:w10/jit-bitmask-regs

Conversation

@pguyot
Copy link
Collaborator

@pguyot pguyot commented Mar 8, 2026

Convert aarch64, armv6m, riscv32 and x86_64 backends from list-based register tracking to bitmask-based operations.

The main gain is not by replacing O(n) list operations with O(1) bitwise operations (bor, band, bnot) for register allocation/freeing, as n is small, but on the lower impact on gc.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

Convert aarch64, armv6m, riscv32 and x86_64 backends from list-based
register tracking to bitmask-based operations.

The main gain is not by replacing O(n) list operations with O(1) bitwise
operations (bor, band, bnot) for register allocation/freeing, as n is small,
but on the lower impact on gc.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
@bettio bettio merged commit dab42ff into atomvm:main Mar 9, 2026
235 of 238 checks passed
@pguyot pguyot deleted the w10/jit-bitmask-regs branch March 11, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants