diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2013-04-17 17:04:54 +0200 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2013-04-17 17:04:54 +0200 |
commit | 137dc553d86b1ccf94388e48efaf17609dfcd28f (patch) | |
tree | 59006b8347cbcbb5ba6b823bd6b699a8decd7562 | |
parent | 68046acc39deecb3edece6e2653d632f39c1c366 (diff) | |
download | gmp-137dc553d86b1ccf94388e48efaf17609dfcd28f.tar.gz |
(arm64 count_trailing_zeros): New.
-rw-r--r-- | longlong.h | 2 |
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__ */ |