diff options
| author | Tiezhu Yang <yangtiezhu@loongson.cn> | 2026-08-17 22:07:23 +0800 |
|---|---|---|
| committer | Huacai Chen <chenhuacai@loongson.cn> | 2026-08-17 22:07:23 +0800 |
| commit | 434308885db42e7cc929e8466ac9eb7f69a999e0 (patch) | |
| tree | bb207ddbcdd1d8d0bde6b8bf931e4b5621637c96 /scripts/objdiff | |
| parent | 37d545d12f21c4d50612ecaebd7ae1e5bf91b2d8 (diff) | |
| download | linux-434308885db42e7cc929e8466ac9eb7f69a999e0.tar.gz linux-434308885db42e7cc929e8466ac9eb7f69a999e0.zip | |
LoongArch: BPF: Implement branchless conditional move for TCC
The current implementation handles combined bpf2bpf and tail calls by
checking at runtime whether REG_TCC holds a scalar count or a pointer
address via a conditional jump. This adds branch prediction overhead
in the hot path of tail call execution.
To implement branchless conditional move, use an unsigned comparison
(sltui) combined with mask instructions (maskeqz/masknez) to achieve
branchless classification and blending of incoming scalar counts and
kernel pointers in REG_TCC.
This optimization refactors the inner logic of the helper function,
unifies the offset decrement at the function entry, and removes all
runtime branching from the prologue hot path completely.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions
