[Gmp-commit] /var/hg/gmp: Delete incorrect definition of COUNT_LEADING_ZEROS_...

mercurial at gmplib.org mercurial at gmplib.org
Wed Dec 27 16:14:22 UTC 2017


details:   /var/hg/gmp/rev/0e10f8f34eb4
changeset: 17510:0e10f8f34eb4
user:      Niels M?ller <nisse at lysator.liu.se>
date:      Wed Dec 27 17:12:48 2017 +0100
description:
Delete incorrect definition of COUNT_LEADING_ZEROS_0 for arm32/arm64.

diffstat:

 ChangeLog  |  5 +++++
 longlong.h |  2 --
 2 files changed, 5 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 19d4782aaaca -r 0e10f8f34eb4 ChangeLog
--- a/ChangeLog	Wed Dec 27 00:27:52 2017 +0100
+++ b/ChangeLog	Wed Dec 27 17:12:48 2017 +0100
@@ -1,3 +1,8 @@
+2017-12-27  Niels Möller  <nisse at lysator.liu.se>
+
+	* longlong.h (arm32/arm64): Leave COUNT_LEADING_ZEROS_0 undefined,
+	since we use gcc's __builtin_clzl, which doesn't allow zero inputs.
+
 2017-08-28  Torbjörn Granlund  <tg at gmplib.org>
 
 	* mpn/sparc64: Revert 2017-07-23 PIC changes.
diff -r 19d4782aaaca -r 0e10f8f34eb4 longlong.h
--- a/longlong.h	Wed Dec 27 00:27:52 2017 +0100
+++ b/longlong.h	Wed Dec 27 17:12:48 2017 +0100
@@ -535,7 +535,6 @@
 #endif /* defined(__ARM_ARCH_2__) ... */
 #define count_leading_zeros(count, x)  count_leading_zeros_gcc_clz(count, x)
 #define count_trailing_zeros(count, x)  count_trailing_zeros_gcc_ctz(count, x)
-#define COUNT_LEADING_ZEROS_0 32
 #endif /* __arm__ */
 
 #if defined (__aarch64__) && W_TYPE_SIZE == 64
@@ -586,7 +585,6 @@
 #endif
 #define count_leading_zeros(count, x)  count_leading_zeros_gcc_clz(count, x)
 #define count_trailing_zeros(count, x)  count_trailing_zeros_gcc_ctz(count, x)
-#define COUNT_LEADING_ZEROS_0 64
 #endif /* __aarch64__ */
 
 #if defined (__clipper__) && W_TYPE_SIZE == 32


More information about the gmp-commit mailing list