[Bug target/121419] __clzdi2 emitted when building udev-hid-bpf
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 5 01:15:45 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121419
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jose E. Marchesi from comment #7)
> It seems to me that if the JITted architectures in the kernel all have a clz
> instruction (or similar enough) the right thing to do is to add the
> instruction to the BPF instruction set.
Not all MIPS nor RISCV arches have it but most JITed archs in the kernel do
have it.
But some MIPS and RISCV sub-arches have it.
Having it expanded as part of the JIT for the ones which don't have it makes
more sense than expanding it in the BPF code.
Plus I can see an use of clz/ctz for network code and even for the scheduler.
More information about the Gcc-bugs
mailing list