From 137dc553d86b1ccf94388e48efaf17609dfcd28f Mon Sep 17 00:00:00 2001 From: Torbjorn Granlund Date: Wed, 17 Apr 2013 17:04:54 +0200 Subject: (arm64 count_trailing_zeros): New. --- longlong.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'longlong.h') 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__ */ -- cgit v1.2.1