Skip to content

Commit 2290a31

Browse files
committed
Merge pull request #1853 from pguyot/w39/jit-fix-op_bs_get_position-free-reg
JIT: free Dest register with OP_BS_GET_POSITION 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
2 parents d4410b0 + 02837a9 commit 2290a31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/jit/src/jit.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2043,7 +2043,7 @@ first_pass(<<?OP_BS_GET_POSITION, Rest0/binary>>, MMod, MSt0, State0) ->
20432043
MSt6 = MMod:shift_left(MSt5, Reg, 4),
20442044
MSt7 = MMod:or_(MSt6, Reg, ?TERM_INTEGER_TAG),
20452045
MSt8 = MMod:move_to_vm_register(MSt7, Reg, Dest),
2046-
MSt9 = MMod:free_native_registers(MSt8, [Reg]),
2046+
MSt9 = MMod:free_native_registers(MSt8, [Reg, Dest]),
20472047
?ASSERT_ALL_NATIVE_FREE(MSt9),
20482048
first_pass(Rest3, MMod, MSt9, State0);
20492049
% 168

0 commit comments

Comments
 (0)