summaryrefslogtreecommitdiff
path: root/longlong.h
diff options
context:
space:
mode:
Diffstat (limited to 'longlong.h')
-rw-r--r--longlong.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/longlong.h b/longlong.h
index a7a853253..d969c7470 100644
--- a/longlong.h
+++ b/longlong.h
@@ -548,6 +548,8 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype);
} while (0)
#define count_leading_zeros(count, x) \
__asm__ ("clz\t%0, %1" : "=r" (count) : "r" (x))
+#define count_trailing_zeros(count, x) \
+ __asm__ ("rbit\t%0, %1\n\tclz\t%0, %0" : "=r" (count) : "r" (x))
#define COUNT_LEADING_ZEROS_0 64
#endif /* __aarch64__ */