bpf, x64: save few bytes when mul is in alu32
authorDaniel Borkmann <daniel@iogearbox.net>
Sat, 24 Feb 2018 00:08:01 +0000 (01:08 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 24 Feb 2018 06:50:00 +0000 (22:50 -0800)
commit4c38e2f386b4fc5fd95d1203c74819948e2e903d
tree26e9b52c57d79f91206e09624e5eaaa360275f1f
parentd806a0cf2a1ddb97c91d902ef1c8219e1e2b2c4c
bpf, x64: save few bytes when mul is in alu32

Add a generic emit_mov_reg() helper in order to reuse it in BPF
multiplication to load the src into rax, we can save a few bytes
in alu32 while doing so.

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