diff options
author | Xi Ruoyao <xry111@xry111.site> | 2023-08-07 13:07:08 +0200 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-08-12 09:58:22 +0930 |
commit | 079b20e89d3c511716bafb3369336e2b1c165bd5 (patch) | |
tree | a15f0626d489f986241b536983c3c3ce0a73cae8 /libtool.m4 | |
parent | 82fc3423c36c2cdc413910dac2e3c9faf0c59967 (diff) | |
download | fsf-binutils-gdb-079b20e89d3c511716bafb3369336e2b1c165bd5.zip fsf-binutils-gdb-079b20e89d3c511716bafb3369336e2b1c165bd5.tar.gz fsf-binutils-gdb-079b20e89d3c511716bafb3369336e2b1c165bd5.tar.bz2 |
LoongArch: implement count_{leading,trailing}_zeros
LoongArch always support clz and ctz instructions, so we can always use
__builtin_{clz,ctz} for count_{leading,trailing}_zeros. This improves
the code of libgcc, and also benefits Glibc once we merge longlong.h
there.
Bootstrapped and regtested on loongarch64-linux-gnu.
include/
* longlong.h [__loongarch__] (count_leading_zeros): Define.
[__loongarch__] (count_trailing_zeros): Likewise.
[__loongarch__] (COUNT_LEADING_ZEROS_0): Likewise.
Diffstat (limited to 'libtool.m4')
0 files changed, 0 insertions, 0 deletions