s390/bpf: Use lg(f)rl when long displacement cannot be used
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 18 Nov 2019 18:03:39 +0000 (19:03 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 19 Nov 2019 03:51:16 +0000 (19:51 -0800)
commitb25c57b6b7dda3799aaebc5f463776e4a0555927
treeb81a1acaf090da5f1608e91ba957f85b9bc6dfc7
parent451e448ff4bb137da3d4b8b26a8260a2ff66869a
s390/bpf: Use lg(f)rl when long displacement cannot be used

If literal pool grows past 524287 mark, it's no longer possible to use
long displacement to reference literal pool entries. In JIT setting
maintaining multiple literal pool registers is next to impossible, since
we operate on one instruction at a time.

Therefore, fall back to loading literal pool entry using PC-relative
addressing, and then using a register-register form of the following
machine instruction.

Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20191118180340.68373-6-iii@linux.ibm.com
arch/s390/net/bpf_jit_comp.c