Skip to content

Commit

Permalink
AArch64: Favor load_sources() over multiple mov_arg()
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorng committed Dec 22, 2023
1 parent 2bcabe9 commit 9c2c0f7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions erts/emulator/beam/jit/arm/instr_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,8 +358,10 @@ void BeamModuleAssembler::emit_i_get_map_element(const ArgLabel &Fail,
const ArgRegister &Src,
const ArgRegister &Key,
const ArgRegister &Dst) {
mov_arg(ARG1, Src);
mov_arg(ARG2, Key);
auto [src, key] = load_sources(Src, ARG1, Key, ARG2);

mov_var(ARG1, src);
mov_var(ARG2, key);

if (maybe_one_of<BeamTypeId::MaybeImmediate>(Key)) {
fragment_call(ga->get_i_get_map_element_shared());
Expand Down
6 changes: 4 additions & 2 deletions erts/emulator/beam/jit/arm/instr_msg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ void BeamModuleAssembler::emit_recv_marker_reserve(const ArgRegister &Dst) {

void BeamModuleAssembler::emit_recv_marker_bind(const ArgRegister &Marker,
const ArgRegister &Reference) {
mov_arg(ARG2, Marker);
mov_arg(ARG3, Reference);
auto [marker, reference] = load_sources(Marker, ARG2, Reference, ARG3);

mov_var(ARG2, marker);
mov_var(ARG3, reference);

emit_enter_runtime();

Expand Down

0 comments on commit 9c2c0f7

Please sign in to comment.