Skip to content

Conversation

@pguyot
Copy link
Collaborator

@pguyot pguyot commented Oct 10, 2025

Fix a leak where a register was not properly freed on 32 bits platforms

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

Fix a leak where a register was not properly freed on 32 bits platforms.
Also fix a double free that happened on 32 bits platforms.

This code currently is dead and is only evaluated when targeting riscv-32
and armv6m.

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
@pguyot pguyot force-pushed the w41/jit-fix-register-leak-32bits branch from 0988e0e to 8f81439 Compare October 11, 2025 09:07
@bettio bettio merged commit 7fe9484 into atomvm:main Oct 12, 2025
161 of 162 checks passed
@pguyot pguyot deleted the w41/jit-fix-register-leak-32bits branch October 12, 2025 17:17
bettio added a commit that referenced this pull request Oct 22, 2025
Just in time compilation with armv6m target

Continuation of:
- #1770
- #1773
- #1833
- #1834
- #1835
- #1890
- #1878
- #1881
- #1887

The target is suitable for Pico, Pico2 and STM32.
Benchmark test on a Pico with SMP disabled shows a speed increase from 14% to
62%.

  | native (w34/jit-arm) | emulated (main) -- d8ecc02 | %
-- | -- | -- | --
pingpong_speed_test | 17437587 | 27590085 | 37 %
prime_speed_test | 13257293 | 35212412 | 62 %
prng_test | 1128949 | 1500967 | 25 %
pi_test | 26759537 | 58693061 | 54 %
sudoku_solution_test | 6420801 | 7471461 | 14 %
sudoku_puzzle_test | 254335968 | 333834045 | 24 %

Remark: the current backend requires 64 bits floats. 32 bits floats would need
a specific variant.

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
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