Skip to content

Commit

Permalink
Swap out/in reduction count on apply and fixed_apply for GC
Browse files Browse the repository at this point in the history
  • Loading branch information
rickard-green committed Oct 4, 2021
1 parent 2d9f944 commit 41a3d47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions erts/emulator/beam/jit/x86/instr_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ x86::Mem BeamModuleAssembler::emit_variable_apply(bool includeI) {
align_erlang_cp();
a.bind(entry);

emit_enter_runtime<Update::eStack | Update::eHeap>();
emit_enter_runtime<Update::eReductions | Update::eStack | Update::eHeap>();

a.mov(ARG1, c_p);
load_x_reg_array(ARG2);
Expand All @@ -151,7 +151,7 @@ x86::Mem BeamModuleAssembler::emit_variable_apply(bool includeI) {

runtime_call<4>(apply);

emit_leave_runtime<Update::eStack | Update::eHeap>();
emit_leave_runtime<Update::eReductions | Update::eStack | Update::eHeap>();

a.test(RET, RET);
a.short_().jne(dispatch);
Expand Down Expand Up @@ -185,7 +185,7 @@ x86::Mem BeamModuleAssembler::emit_fixed_apply(const ArgVal &Arity,

mov_arg(ARG3, Arity);

emit_enter_runtime<Update::eStack | Update::eHeap>();
emit_enter_runtime<Update::eReductions | Update::eStack | Update::eHeap>();

a.mov(ARG1, c_p);
load_x_reg_array(ARG2);
Expand All @@ -200,7 +200,7 @@ x86::Mem BeamModuleAssembler::emit_fixed_apply(const ArgVal &Arity,

runtime_call<5>(fixed_apply);

emit_leave_runtime<Update::eStack | Update::eHeap>();
emit_leave_runtime<Update::eReductions | Update::eStack | Update::eHeap>();

a.test(RET, RET);
a.short_().jne(dispatch);
Expand Down

0 comments on commit 41a3d47

Please sign in to comment.