@@ -662,8 +662,7 @@ static int emit_lse_atomic(const struct bpf_insn *insn, struct jit_ctx *ctx)
662
662
u8 reg = dst ;
663
663
664
664
if (off ) {
665
- emit_a64_mov_i (1 , tmp , off , ctx );
666
- emit (A64_ADD (1 , tmp , tmp , dst ), ctx );
665
+ emit_a64_add_i (1 , tmp , reg , tmp , off , ctx );
667
666
reg = tmp ;
668
667
}
669
668
if (arena ) {
@@ -734,7 +733,7 @@ static int emit_ll_sc_atomic(const struct bpf_insn *insn, struct jit_ctx *ctx)
734
733
const s32 imm = insn -> imm ;
735
734
const s16 off = insn -> off ;
736
735
const bool isdw = BPF_SIZE (code ) == BPF_DW ;
737
- u8 reg ;
736
+ u8 reg = dst ;
738
737
s32 jmp_offset ;
739
738
740
739
if (BPF_MODE (code ) == BPF_PROBE_ATOMIC ) {
@@ -743,11 +742,8 @@ static int emit_ll_sc_atomic(const struct bpf_insn *insn, struct jit_ctx *ctx)
743
742
return - EINVAL ;
744
743
}
745
744
746
- if (!off ) {
747
- reg = dst ;
748
- } else {
749
- emit_a64_mov_i (1 , tmp , off , ctx );
750
- emit (A64_ADD (1 , tmp , tmp , dst ), ctx );
745
+ if (off ) {
746
+ emit_a64_add_i (1 , tmp , reg , tmp , off , ctx );
751
747
reg = tmp ;
752
748
}
753
749
0 commit comments