X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=arch%2Floongarch%2Fnet%2Fbpf_jit.c;h=00915fb3cb82cec69aeb3e2dcd91ea4c92240e4c;hb=4b117370d1d12cc00bb14ee2f400b1a91e32bb69;hp=db9342b2d0e6605e8b13179acdc9e61bdb761dee;hpb=db6da59cf27b5661ced03754ae0550f8914eda9e;p=platform%2Fkernel%2Flinux-starfive.git diff --git a/arch/loongarch/net/bpf_jit.c b/arch/loongarch/net/bpf_jit.c index db9342b..00915fb 100644 --- a/arch/loongarch/net/bpf_jit.c +++ b/arch/loongarch/net/bpf_jit.c @@ -855,8 +855,6 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, bool ext /* function return */ case BPF_JMP | BPF_EXIT: - emit_sext_32(ctx, regmap[BPF_REG_0], true); - if (i == ctx->prog->len - 1) break; @@ -907,14 +905,8 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx, bool ext } break; case BPF_DW: - if (is_signed_imm12(off)) { - emit_insn(ctx, ldd, dst, src, off); - } else if (is_signed_imm14(off)) { - emit_insn(ctx, ldptrd, dst, src, off); - } else { - move_imm(ctx, t1, off, is32); - emit_insn(ctx, ldxd, dst, src, t1); - } + move_imm(ctx, t1, off, is32); + emit_insn(ctx, ldxd, dst, src, t1); break; }