linux/arch/x86/net
Daniel Borkmann 6fe8b9c1f4 bpf, x64: save several bytes by using mov over movabsq when possible
While analyzing some of the more complex BPF programs from Cilium,
I found that LLVM generally prefers to emit LD_IMM64 instead of MOV32
BPF instructions for loading unsigned 32-bit immediates into a
register. Given we cannot change the current/stable LLVM versions
that are already out there, lets optimize this case such that the
JIT prefers to emit 'mov %eax, imm32' over 'movabsq %rax, imm64'
whenever suitable in order to reduce the image size by 4-5 bytes per
such load in the typical case, reducing image size on some of the
bigger programs by up to 4%. emit_mov_imm32() and emit_mov_imm64()
have been added as helpers.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-02-23 22:50:00 -08:00
..
bpf_jit_comp.c bpf, x64: save several bytes by using mov over movabsq when possible 2018-02-23 22:50:00 -08:00
bpf_jit.S bpf: change x86 JITed program stack layout 2017-05-31 19:29:48 -04:00
Makefile objtool, x86: Add several functions and files to the objtool whitelist 2017-06-30 10:19:19 +02:00