]> git.ipfire.org Git - thirdparty/glibc.git/commit
RISC-V: Use builtin for ffs and ffsll while supported extension available
authorJulian Zhu <julian.oerv@isrc.iscas.ac.cn>
Fri, 8 Nov 2024 13:41:43 +0000 (21:41 +0800)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 28 Apr 2025 12:51:59 +0000 (09:51 -0300)
commit4c966c078036abe0e36bd86c9eaeb4501e552977
tree70125eca6c7ec83bd469e2d43fb2ed4b9c887406
parent2be836fe44010d92ffffb73cd060045bb10305e4
RISC-V: Use builtin for ffs and ffsll while supported extension available

Hardware ctz instructions are available in the RISC-V Zbb and XTheadBb extension. With special `-march` flags defined, we can generate more simplified code compared to the generic implementation of `ffs`/`ffsll`.

Signed-off-by: Julian Zhu <julian.oerv@isrc.iscas.ac.cn>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/riscv/math-use-builtins-ffs.h [new file with mode: 0644]