bpf, x64: save one byte per shl/shr/sar when imm is 1
authorDaniel Borkmann <daniel@iogearbox.net>
Sat, 24 Feb 2018 00:07:58 +0000 (01:07 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 24 Feb 2018 06:50:00 +0000 (22:50 -0800)
commit88e69a1fcc1e67dec3025af64736a84532528242
tree3b7969431a064be0e3079257d01f895bf5692f97
parentee07862f7b4594d390b978f6636a6a6191632ab3
bpf, x64: save one byte per shl/shr/sar when imm is 1

When we shift by one, we can use a different encoding where imm
is not explicitly needed, which saves 1 byte per such op.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
arch/x86/net/bpf_jit_comp.c