summaryrefslogtreecommitdiff
path: root/ipc/util.c
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@netronome.com>2018-05-18 12:12:11 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2018-05-18 21:35:55 +0200
commitc217abccaaa5e4eeba4aee26f29cdb57c026afc1 (patch)
tree9472d009cd111dc8b5d6a4cc2f0800aa50adb503 /ipc/util.c
parentf43d0f17fe9a4bb770ab38b36e2b5150d8c3d6cf (diff)
nfp: bpf: support arithmetic indirect right shift (BPF_ARSH | BPF_X)
Code logic is similar with arithmetic right shift by constant, and NFP get indirect shift amount through source A operand of PREV_ALU. It is possible to fall back to logic right shift if the MSB is known to be zero from range info, however there is no benefit to do this given logic indirect right shift use the same number and cycle of instruction sequence. Suppose the MSB of regX is the bit we want to replicate to fill in all the vacant positions, and regY contains the shift amount, then we could use single instruction to set up both. [alu, --, regY, OR, regX] -- NOTE: the PREV_ALU result doesn't need to write to any destination register. Signed-off-by: Jiong Wang <jiong.wang@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'ipc/util.c')
0 files changed, 0 insertions, 0 deletions