aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/net/bpf_jit_comp64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/net/bpf_jit_comp64.c')
-rw-r--r--arch/powerpc/net/bpf_jit_comp64.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/net/bpf_jit_comp64.c b/arch/powerpc/net/bpf_jit_comp64.c
index 17482f5de3e2..7dc81877057d 100644
--- a/arch/powerpc/net/bpf_jit_comp64.c
+++ b/arch/powerpc/net/bpf_jit_comp64.c
@@ -529,9 +529,15 @@ static int bpf_jit_build_body(struct bpf_prog *fp, u32 *image,
529 if (imm != 0) 529 if (imm != 0)
530 PPC_SRDI(dst_reg, dst_reg, imm); 530 PPC_SRDI(dst_reg, dst_reg, imm);
531 break; 531 break;
532 case BPF_ALU | BPF_ARSH | BPF_X: /* (s32) dst >>= src */
533 PPC_SRAW(dst_reg, dst_reg, src_reg);
534 goto bpf_alu32_trunc;
532 case BPF_ALU64 | BPF_ARSH | BPF_X: /* (s64) dst >>= src */ 535 case BPF_ALU64 | BPF_ARSH | BPF_X: /* (s64) dst >>= src */
533 PPC_SRAD(dst_reg, dst_reg, src_reg); 536 PPC_SRAD(dst_reg, dst_reg, src_reg);
534 break; 537 break;
538 case BPF_ALU | BPF_ARSH | BPF_K: /* (s32) dst >>= imm */
539 PPC_SRAWI(dst_reg, dst_reg, imm);
540 goto bpf_alu32_trunc;
535 case BPF_ALU64 | BPF_ARSH | BPF_K: /* (s64) dst >>= imm */ 541 case BPF_ALU64 | BPF_ARSH | BPF_K: /* (s64) dst >>= imm */
536 if (imm != 0) 542 if (imm != 0)
537 PPC_SRADI(dst_reg, dst_reg, imm); 543 PPC_SRADI(dst_reg, dst_reg, imm);