diff options
author | Xi Ruoyao <xry111@xry111.site> | 2024-02-04 08:27:50 +0800 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-02-05 15:19:41 -0300 |
commit | 2e80f139376450acdb7d879d799439578a41810e (patch) | |
tree | 9888c8627c488da707f338232ab4c480c618eba9 /string/tst-svc2.c | |
parent | 814ed22eab4f3f43bb02229edab5d50004310258 (diff) | |
download | glibc-2e80f139376450acdb7d879d799439578a41810e.tar.gz glibc-2e80f139376450acdb7d879d799439578a41810e.tar.xz glibc-2e80f139376450acdb7d879d799439578a41810e.zip |
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: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'string/tst-svc2.c')
0 files changed, 0 insertions, 0 deletions