diff options
| author | Xi Ruoyao <xry111@xry111.site> | 2022-10-12 22:06:07 +0800 |
|---|---|---|
| committer | Xi Ruoyao <xry111@xry111.site> | 2022-10-13 18:05:22 +0800 |
| commit | 6f653a2c85a450714bac905ea4f153234bc6cd5f (patch) | |
| tree | d6218ef805fa751f65760f726dbf7b77bbfbe3cf /contrib/check-params-in-docs.py | |
| parent | 7f9a7465c863e482708d2a00f5f7ff91ae3a7e0b (diff) | |
| download | gcc-6f653a2c85a450714bac905ea4f153234bc6cd5f.zip gcc-6f653a2c85a450714bac905ea4f153234bc6cd5f.tar.gz gcc-6f653a2c85a450714bac905ea4f153234bc6cd5f.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/ChangeLog:
* longlong.h [__loongarch__] (count_leading_zeros): Define.
[__loongarch__] (count_trailing_zeros): Likewise.
[__loongarch__] (COUNT_LEADING_ZEROS_0): Likewise.
Diffstat (limited to 'contrib/check-params-in-docs.py')
0 files changed, 0 insertions, 0 deletions
