]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit07c091894a07b6ba853ab97f749adb61ab4d0cee
treeb81a1acaf090da5f1608e91ba957f85b9bc6dfc7
parentd9be1872a475b083e0212dd69701be52feb38139
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