diff options
| author | 2018-10-07 12:56:56 +0100 | |
|---|---|---|
| committer | 2018-10-08 10:24:13 +0200 | |
| commit | 445496231445aad46866a858a384b428cd073977 (patch) | |
| tree | 3a53c4366d29fc7b54ead15c07fb7159c163b7a3 /kernel/sysctl_binary.c | |
| parent | nfp: bpf: fix return address from register-saving subroutine to callee (diff) | |
nfp: bpf: optimise save/restore for R6~R9 based on register usage
When pre-processing the instructions, it is trivial to detect what
subprograms are using R6, R7, R8 or R9 as destination registers. If a
subprogram uses none of those, then we do not need to jump to the
subroutines dedicated to saving and restoring callee-saved registers in
its prologue and epilogue.
This patch introduces detection of callee-saved registers in subprograms
and prevents the JIT from adding calls to those subroutines whenever we
can: we save some instructions in the translated program, and some time
at runtime on BPF-to-BPF calls and returns.
If no subprogram needs to save those registers, we can avoid appending
the subroutines at the end of the program.
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel/sysctl_binary.c')
0 files changed, 0 insertions, 0 deletions
