glibc/sysdeps/mips/math-use-builtins-ffs.h
Junxian Zhu 545480506f mips: Use builtins for ffs and ffsll
__builtin_ffs{,ll} basically on __builtin_ctz{,ll} in MIPS GCC compiler.
The hardware ctz instructions were available after MIPS{32,64} Release1. By using builtin ctz. It can also reduce code size of ffs/ffsll.

Checked on mips o32. mips64.

Signed-off-by: Junxian Zhu <zhujunxian@oss.cipunited.com>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
2024-02-14 12:20:49 -03:00

4 lines
114 B
C

#include <sysdep.h>
#define USE_FFS_BUILTIN (__mips_isa_rev >= 1)
#define USE_FFSLL_BUILTIN (__mips_isa_rev >= 1)