summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2026-08-17 22:07:23 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2026-08-17 22:07:23 +0800
commit434308885db42e7cc929e8466ac9eb7f69a999e0 (patch)
treebb207ddbcdd1d8d0bde6b8bf931e4b5621637c96 /tools/lib/python
parent37d545d12f21c4d50612ecaebd7ae1e5bf91b2d8 (diff)
downloadlinux-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 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions