[Gmp-commit] /var/hg/gmp: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Mon Feb 27 16:48:59 UTC 2017


details:   /var/hg/gmp/rev/9971da64c572
changeset: 17315:9971da64c572
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Mon Feb 27 17:48:02 2017 +0100
description:
(arm32/arm64): Remove useless comparison to 0 introduced in last change (spotted by Marco).

details:   /var/hg/gmp/rev/86439a912005
changeset: 17316:86439a912005
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Mon Feb 27 17:48:57 2017 +0100
description:
Trivial merge.

diffstat:

 longlong.h   |  6 +++---
 mpz/gcdext.c |  2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r c3927196a330 -r 86439a912005 longlong.h
--- a/longlong.h	Sun Feb 26 08:51:08 2017 +0100
+++ b/longlong.h	Mon Feb 27 17:48:57 2017 +0100
@@ -441,7 +441,7 @@
     && W_TYPE_SIZE == 32
 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
   do {									\
-    if (__builtin_constant_p (bl) && (bl) < 0 && (-(USItype) (bl) < 0x1000)) \
+    if (__builtin_constant_p (bl) && -(USItype)(bl) < 0x1000))		\
       __asm__ ("subs\t%1, %4, %5\n\tadc\t%0, %2, %3"			\
 	   : "=r" (sh), "=&r" (sl)					\
 	       : "r" (ah), "rI" (bh),					\
@@ -552,7 +552,7 @@
    ADDS and SUBS, since they set carry in the same way.  */
 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
   do {									\
-    if (__builtin_constant_p (bl) && (bl) < 0 && (-(UDItype) (bl) < 0x1000)) \
+    if (__builtin_constant_p (bl) && (-(UDItype)(bl) < 0x1000))		\
       __asm__ ("subs\t%1, %x4, %5\n\tadc\t%0, %x2, %x3"			\
 	       : "=r" (sh), "=&r" (sl)					\
 	       : "rZ" ((UDItype)(ah)), "rZ" ((UDItype)(bh)),		\
@@ -565,7 +565,7 @@
   } while (0)
 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \
   do {									\
-    if (__builtin_constant_p (bl) && (bl) < 0 && (-(UDItype) (bl) < 0x1000)) \
+    if (__builtin_constant_p (bl) && (-(UDItype)(bl) < 0x1000))		\
       __asm__ ("adds\t%1, %x4, %5\n\tsbc\t%0, %x2, %x3"			\
 	       : "=r,r" (sh), "=&r,&r" (sl)				\
 	       : "rZ,rZ" ((UDItype)(ah)), "rZ,rZ" ((UDItype)(bh)),	\
diff -r c3927196a330 -r 86439a912005 mpz/gcdext.c
--- a/mpz/gcdext.c	Sun Feb 26 08:51:08 2017 +0100
+++ b/mpz/gcdext.c	Mon Feb 27 17:48:57 2017 +0100
@@ -66,6 +66,8 @@
 
       if (g != NULL)
 	{
+	  /* If g == a, then ALLOC(g) == ALLOC(a) >= asize, i.e.
+	     the next MPZ_NEWALLOC returns the old PTR(a) .*/
 	  gp = MPZ_NEWALLOC (g, asize);
 	  MPN_COPY (gp, PTR (a), asize);
 	  SIZ (g) = asize;


More information about the gmp-commit mailing list