This patchset adds support for cpu v4 instructions for LoongArch. For details, see the proposal ([0]) and its implementation in BPF core ([1]). [0]: https://lore.kernel.org/bpf/4bfe98be-5333-1c7e-2f6d-42486c8ec039@xxxxxxxx/ [1]: https://lore.kernel.org/all/20230728011143.3710005-1-yonghong.song@xxxxxxxxx/ Hengqi Chen (8): LoongArch: Add more instruction opcodes and emit_* helpers LoongArch: BPF: Support sign-extension load instructions LoongArch: BPF: Support sign-extension mov instructions LoongArch: BPF: Support unconditional bswap instructions LoongArch: BPF: Support 32-bit offset jmp instructions LoongArch: BPF: Support signed div instructions LoongArch: BPF: Support signed mod instructions selftests/bpf: Enable cpu v4 tests for LoongArch arch/loongarch/include/asm/inst.h | 13 ++ arch/loongarch/net/bpf_jit.c | 143 ++++++++++++++---- .../selftests/bpf/progs/test_ldsx_insn.c | 3 +- .../selftests/bpf/progs/verifier_bswap.c | 3 +- .../selftests/bpf/progs/verifier_gotol.c | 3 +- .../selftests/bpf/progs/verifier_ldsx.c | 3 +- .../selftests/bpf/progs/verifier_movsx.c | 3 +- .../selftests/bpf/progs/verifier_sdiv.c | 3 +- 8 files changed, 137 insertions(+), 37 deletions(-) -- 2.34.1