]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: x86: Factor out emission of ModR/M for *(reg + off)
authorBrendan Jackman <jackmanb@google.com>
Thu, 14 Jan 2021 18:17:41 +0000 (18:17 +0000)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 15 Jan 2021 02:34:28 +0000 (18:34 -0800)
commit7f1505ad91ac9235263928acfd33df9bad1e6b65
tree4e39d31bc3a058e88da6d125c72cc69cb6ff2517
parent6fd2cae98582f99240d3e7a54425ef1b9bc7e392
bpf: x86: Factor out emission of ModR/M for *(reg + off)

The case for JITing atomics is about to get more complicated. Let's
factor out some common code to make the review and result more
readable.

NB the atomics code doesn't yet use the new helper - a subsequent
patch will add its use as a side-effect of other changes.

Signed-off-by: Brendan Jackman <jackmanb@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20210114181751.768687-2-jackmanb@google.com
arch/x86/net/bpf_jit_comp.c