Skip to content

Conversation

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

Pull request for series with
subject: LoongArch: BPF: Optimize sign-extention mov instructions
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=995518

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

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

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

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

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

Upstream branch: 2465bb8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=995518
version: 1

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

Upstream branch: 2465bb8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=995518
version: 1

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

Upstream branch: 2660b9d
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=995518
version: 1

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

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

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

Upstream branch: 4c229f3
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=995518
version: 1

For 8-bit and 16-bit sign-extention mov instructions, it can use the native
instructions ext.w.b and ext.w.h directly, no need to use the temporary t1
register, just remove the redundant operations.

Here are the test results:

  # modprobe test_bpf test_range=81,84
  # dmesg -t | tail -5
  test_bpf: #81 ALU_MOVSX | BPF_B jited:1 5 PASS
  test_bpf: #82 ALU_MOVSX | BPF_H jited:1 5 PASS
  test_bpf: #83 ALU64_MOVSX | BPF_B jited:1 5 PASS
  test_bpf: #84 ALU64_MOVSX | BPF_H jited:1 5 PASS
  test_bpf: Summary: 4 PASSED, 0 FAILED, [4/4 JIT'ed]

Signed-off-by: Tiezhu Yang <[email protected]>
Acked-by: Hengqi Chen <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

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

@kernel-patches-daemon-bpf-rc kernel-patches-daemon-bpf-rc bot deleted the series/995518=>bpf-next branch August 28, 2025 00:20
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.

2 participants