]> git.ipfire.org Git - thirdparty/linux.git/commit
nfp: bpf: optimize codegen for JSET with a constant
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 20 Dec 2018 06:13:08 +0000 (22:13 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 20 Dec 2018 16:28:29 +0000 (17:28 +0100)
commit4987eaccd2d1535eaa72d3bbe2b8bfc8267ba965
treec6bf58bba8b67edb2e6d80671348a54890966eef
parent6e774845b321e729966fed7de4aa8ea59c2c3b2e
nfp: bpf: optimize codegen for JSET with a constant

The top word of the constant can only have bits set if sign
extension set it to all-1, therefore we don't really have to
mask the top half of the register.  We can just OR it into
the result as is.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
drivers/net/ethernet/netronome/nfp/bpf/jit.c