summaryrefslogtreecommitdiff
path: root/longlong.h
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2012-04-04 14:21:22 +0200
committerTorbjorn Granlund <tege@gmplib.org>2012-04-04 14:21:22 +0200
commitb07b5e65e15d4386d920d316adfcded630521d10 (patch)
tree6e7dfb4be1f911271e9ef0b972356a1c54d92ca4 /longlong.h
parent56920c85c34addffdac3238f3f38622e0fb50b2d (diff)
downloadgmp-b07b5e65e15d4386d920d316adfcded630521d10.tar.gz
(ARM count_leading_zeros): Enable for more arch versions.
Diffstat (limited to 'longlong.h')
-rw-r--r--longlong.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/longlong.h b/longlong.h
index 5bb6c5456..41c4414a3 100644
--- a/longlong.h
+++ b/longlong.h
@@ -505,8 +505,16 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype);
#define UDIV_TIME 200
#endif /* LONGLONG_STANDALONE */
#endif
-#if defined (__ARM_ARCH_5__)
-/* This actually requires arm 5 */
+/* This is a bizarre test, but GCC doesn't define useful common symbol. */
+#if defined (__ARM_ARCH_5__) || defined (__ARM_ARCH_5T__) || \
+ defined (__ARM_ARCH_5E__) || defined (__ARM_ARCH_5T__) || \
+ defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__) || \
+ defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6Z__) || \
+ defined (__ARM_ARCH_6ZK__)|| defined (__ARM_ARCH_6T2__)|| \
+ defined (__ARM_ARCH_6M__) || defined (__ARM_ARCH_7__) || \
+ defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7R__) || \
+ defined (__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__)|| \
+ defined (__ARM_ARCH_7M__)
#define count_leading_zeros(count, x) \
__asm__ ("clz\t%0, %1" : "=r" (count) : "r" (x))
#define COUNT_LEADING_ZEROS_0 32