diff options
| author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2026-11-10 17:20:30 +0800 |
|---|---|---|
| committer | Huacai Chen <chenhuacai@loongson.cn> | 2026-11-10 17:20:30 +0800 |
| commit | 6dd070681326ef2fef5e008b8c3d0ae9634de222 (patch) | |
| tree | b81ae38e1f6d9335e35dc663ba97c0838c9a5cf7 /include/linux/zstd_errors.h | |
| parent | 9496832b824ab5f570c86d65e3b6f08163e6908b (diff) | |
LoongArch: BPF: Make use of beqz and bnez for trampoline branches
Currently, the implementation for BPF trampoline branches does not match
the existing technical comments. The code uses larch_insn_gen_beq, where
the comment indicates beqz should be used.
While the BPF trampoline size is restricted within a single memory page
(at most 64KB on LoongArch) and cannot cross the original 16-bit branch
offset limit of the reg2i16 format, switching to the beqz instruction
(which belongs to the reg1i21 format) avoids explicitly specifying the
zero register during dynamic JIT encoding, resulting in cleaner assembly
generation.
While at it, also apply the same optimization to the bne instruction by
replacing it with bnez and adding a corresponding comment.
Cc: stable@vger.kernel.org
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'include/linux/zstd_errors.h')
0 files changed, 0 insertions, 0 deletions
