mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 02:20:56 +01:00
configure/riscv: detect fast CLZ
RISC-V defines the CLZ instruction as part of the ratified Zbb subset of the (not yet ratified) bit mapulation extension (B). We can detect it from the __riscv_zbb predefined constant. At least GCC 12 already supports this correctly. Note that the macro will be non-zero if supported, zero if enabled in the compiler flags (e.g. -march=rv64gzbb) but not known to the compiler, and undefined otherwise.
This commit is contained in:
parent
d808070547
commit
ff14e37393
1 changed files with 6 additions and 0 deletions
6
configure
vendored
6
configure
vendored
|
|
@ -5334,6 +5334,12 @@ elif enabled ppc; then
|
|||
;;
|
||||
esac
|
||||
|
||||
elif enabled riscv; then
|
||||
|
||||
if test_cpp_condition stddef.h "__riscv_zbb"; then
|
||||
enable fast_clz
|
||||
fi
|
||||
|
||||
elif enabled sparc; then
|
||||
|
||||
case $cpu in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue