summaryrefslogtreecommitdiffstats
path: root/arch/loongarch/net/bpf_jit.c
diff options
context:
space:
mode:
authorHengqi Chen <hengqi.chen@gmail.com>2023-11-08 07:12:16 +0100
committerHuacai Chen <chenhuacai@loongson.cn>2023-11-08 07:12:16 +0100
commit4ebf9216e7dff0b38e350007da3b03afb15c816b (patch)
treeb9774fa0c45822f578e83d929dea34d1f105f5ce /arch/loongarch/net/bpf_jit.c
parentLoongArch: BPF: Support sign-extension mov instructions (diff)
downloadlinux-4ebf9216e7dff0b38e350007da3b03afb15c816b.tar.xz
linux-4ebf9216e7dff0b38e350007da3b03afb15c816b.zip
LoongArch: BPF: Support unconditional bswap instructions
Add support for unconditional bswap instruction. Since LoongArch is always little-endian, just treat unconditional bswap the same as big- endian conversion. Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/net/bpf_jit.c')
-rw-r--r--arch/loongarch/net/bpf_jit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/loongarch/net/bpf_jit.c b/arch/loongarch/net/bpf_jit.c
index ac9edf02675c..a8be6d4b058c 100644
--- a/arch/loongarch/net/bpf_jit.c
+++ b/arch/loongarch/net/bpf_jit.c
@@ -731,6 +731,7 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, bool ext
break;
case BPF_ALU | BPF_END | BPF_FROM_BE:
+ case BPF_ALU64 | BPF_END | BPF_FROM_LE:
switch (imm) {
case 16:
emit_insn(ctx, revb2h, dst, dst);