summaryrefslogtreecommitdiff
path: root/arch/powerpc/net/bpf_jit.h
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@netronome.com>2019-01-26 20:26:10 +0300
committerAlexei Starovoitov <ast@kernel.org>2019-01-27 00:33:02 +0300
commit5f6459966d0abca8b799440f6e1b18dac153c54d (patch)
tree24690a84094e3b231f1d47682e612b063d703678 /arch/powerpc/net/bpf_jit.h
parentb85062ac0df33a6a1dcaccd07fe7b1ca55194b25 (diff)
downloadlinux-5f6459966d0abca8b799440f6e1b18dac153c54d.tar.xz
ppc: bpf: implement jitting of JMP32
This patch implements code-gen for new JMP32 instructions on ppc. For JMP32 | JSET, instruction encoding for PPC_RLWINM_DOT is added to check the result of ANDing low 32-bit of operands. Cc: Naveen N. Rao <naveen.n.rao@linux.ibm.com> Cc: Sandipan Das <sandipan@linux.ibm.com> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'arch/powerpc/net/bpf_jit.h')
-rw-r--r--arch/powerpc/net/bpf_jit.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h
index c2d5192ed64f..549e9490ff2a 100644
--- a/arch/powerpc/net/bpf_jit.h
+++ b/arch/powerpc/net/bpf_jit.h
@@ -165,6 +165,10 @@
#define PPC_RLWINM(d, a, i, mb, me) EMIT(PPC_INST_RLWINM | ___PPC_RA(d) | \
___PPC_RS(a) | __PPC_SH(i) | \
__PPC_MB(mb) | __PPC_ME(me))
+#define PPC_RLWINM_DOT(d, a, i, mb, me) EMIT(PPC_INST_RLWINM_DOT | \
+ ___PPC_RA(d) | ___PPC_RS(a) | \
+ __PPC_SH(i) | __PPC_MB(mb) | \
+ __PPC_ME(me))
#define PPC_RLWIMI(d, a, i, mb, me) EMIT(PPC_INST_RLWIMI | ___PPC_RA(d) | \
___PPC_RS(a) | __PPC_SH(i) | \
__PPC_MB(mb) | __PPC_ME(me))