Skip to content
Commit 2e80f139 authored by Xi Ruoyao's avatar Xi Ruoyao Committed by Adhemerval Zanella
Browse files

LoongArch: Use builtins for ffs and ffsll



On LoongArch GCC compiles __builtin_ffs{,ll} to basically
`(x ? __builtin_ctz (x) : -1) + 1`.  Since a hardware ctz instruction is
available, this is much better than the table-driven generic
implementation.

Tested on loongarch64.

Signed-off-by: default avatarXi Ruoyao <xry111@xry111.site>
Reviewed-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
parent 814ed22e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment