Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf, arm64: Simplify if logic in emit_lse_atomic() #4825

Closed

Conversation

kernel-patches-daemon-bpf-rc[bot]
Copy link

Pull request for series with
subject: bpf, arm64: Simplify if logic in emit_lse_atomic()
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=921189

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: c5d2bac
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=921189
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 9468f39
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=921189
version: 1

Delete that unnecessary outer if clause.  No functional changes.

Signed-off-by: Peilin Ye <[email protected]>
…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]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 654a338
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=921189
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=921189 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant