riscv, bpf: Optimize calls
authorBjörn Töpel <bjorn.topel@gmail.com>
Mon, 16 Dec 2019 09:13:41 +0000 (10:13 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 19 Dec 2019 15:03:31 +0000 (16:03 +0100)
commite368b64f8b0c8066115ad1da71f83f20f7bb43af
treea66e883c91237ec8aaaec3fa98bf108db620f287
parent7f3631e88ee6fb13beac333a0e9e605d2414d17f
riscv, bpf: Optimize calls

Instead of using emit_imm() and emit_jalr() which can expand to six
instructions, start using jal or auipc+jalr.

Signed-off-by: Björn Töpel <bjorn.topel@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191216091343.23260-8-bjorn.topel@gmail.com
arch/riscv/net/bpf_jit_comp.c