Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf, arm64: Emit A64_{ADD,SUB}_I when possible in emit_{lse,ll_sc}_at…
…omic() Currently in emit_{lse,ll_sc}_atomic(), if there is an offset, we add it to the base address by emitting two instructions, for example: if (off) { emit_a64_mov_i(1, tmp, off, ctx); emit(A64_ADD(1, tmp, tmp, dst), ctx); ... As pointed out by Xu, we can combine the above into a single A64_ADD_I instruction if 'is_addsub_imm(off)' is true, or an A64_SUB_I, if 'is_addsub_imm(-off)' is true. Suggested-by: Xu Kuohai <[email protected]> Signed-off-by: Peilin Ye <[email protected]>
- Loading branch information