Skip to content

Commit 02837a9

Browse files
committed
JIT: free Dest register with OP_BS_GET_POSITION
Free Dest register if it is a pointer to an extended VM register. Signed-off-by: Paul Guyot <[email protected]>
1 parent 5dc2263 commit 02837a9

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)