diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2009-06-11 19:54:14 +0200 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2009-06-11 19:54:14 +0200 |
commit | 94db0af424f4798814d1aaee48799e67dc41742c (patch) | |
tree | 7a4c51b9894b804b036edbe8e71ac2b3d77dd129 /longlong.h | |
parent | cc4f9a168c8dab69b7497d413ecafb231ff521cc (diff) | |
download | gmp-94db0af424f4798814d1aaee48799e67dc41742c.tar.gz |
(arm count_leading_zeros): Define for armv5.
Diffstat (limited to 'longlong.h')
-rw-r--r-- | longlong.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/longlong.h b/longlong.h index 1354d7df1..649da071b 100644 --- a/longlong.h +++ b/longlong.h @@ -506,6 +506,12 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ((UWtype *, UWtype, UWtype, UWtype)); #define UDIV_TIME 200 #endif /* LONGLONG_STANDALONE */ #endif +#if defined (__ARM_ARCH_5__) +/* This actually requires arm 5 */ +#define count_leading_zeros(count, x) \ + __asm__ ("clz\t%0, %1" : "=r" (count) : "r" (x)) +#define COUNT_LEADING_ZEROS_0 32 +#endif #endif /* __arm__ */ #if defined (__clipper__) && W_TYPE_SIZE == 32 |