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

mercurial at gmplib.org mercurial at gmplib.org
Mon Dec 14 17:55:56 UTC 2015


details:   /var/hg/gmp/rev/1c4d7bc8e4fd
changeset: 17004:1c4d7bc8e4fd
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Dec 14 18:47:13 2015 +0100
description:
mp?/clears.c, mp?/inits.c: Stop supporting empty lists.

details:   /var/hg/gmp/rev/4d37cb433803
changeset: 17005:4d37cb433803
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Dec 14 18:50:05 2015 +0100
description:
tests/arm32call.asm: bx->ret to support thumb-less chips
(thanks Martin Husemann).

diffstat:

 mpf/clears.c        |  3 ++-
 mpf/inits.c         |  3 ++-
 mpq/clears.c        |  3 ++-
 mpq/inits.c         |  3 ++-
 mpz/clears.c        |  3 ++-
 mpz/inits.c         |  3 ++-
 tests/arm32call.asm |  4 ++--
 7 files changed, 14 insertions(+), 8 deletions(-)

diffs (126 lines):

diff -r 14a1c0840769 -r 4d37cb433803 mpf/clears.c
--- a/mpf/clears.c	Mon Dec 14 00:13:18 2015 +0100
+++ b/mpf/clears.c	Mon Dec 14 18:50:05 2015 +0100
@@ -39,11 +39,12 @@
 
   va_start (ap, x);
 
-  while (x != NULL)
+  do
     {
       __GMP_FREE_FUNC_LIMBS (PTR(x), PREC(x) + 1);
       x = va_arg (ap, mpf_ptr);
     }
+  while (x != NULL);
 
   va_end (ap);
 }
diff -r 14a1c0840769 -r 4d37cb433803 mpf/inits.c
--- a/mpf/inits.c	Mon Dec 14 00:13:18 2015 +0100
+++ b/mpf/inits.c	Mon Dec 14 18:50:05 2015 +0100
@@ -39,11 +39,12 @@
 
   va_start (ap, x);
 
-  while (x != NULL)
+  do
     {
       mpf_init (x);
       x = va_arg (ap, mpf_ptr);
     }
+  while (x != NULL);
 
   va_end (ap);
 }
diff -r 14a1c0840769 -r 4d37cb433803 mpq/clears.c
--- a/mpq/clears.c	Mon Dec 14 00:13:18 2015 +0100
+++ b/mpq/clears.c	Mon Dec 14 18:50:05 2015 +0100
@@ -39,12 +39,13 @@
 
   va_start (ap, x);
 
-  while (x != NULL)
+  do
     {
       __GMP_FREE_FUNC_LIMBS (PTR(NUM(x)), ALLOC(NUM(x)));
       __GMP_FREE_FUNC_LIMBS (PTR(DEN(x)), ALLOC(DEN(x)));
       x = va_arg (ap, mpq_ptr);
     }
+  while (x != NULL);
 
   va_end (ap);
 }
diff -r 14a1c0840769 -r 4d37cb433803 mpq/inits.c
--- a/mpq/inits.c	Mon Dec 14 00:13:18 2015 +0100
+++ b/mpq/inits.c	Mon Dec 14 18:50:05 2015 +0100
@@ -39,11 +39,12 @@
 
   va_start (ap, x);
 
-  while (x != NULL)
+  do
     {
       mpq_init (x);
       x = va_arg (ap, mpq_ptr);
     }
+  while (x != NULL);
 
   va_end (ap);
 }
diff -r 14a1c0840769 -r 4d37cb433803 mpz/clears.c
--- a/mpz/clears.c	Mon Dec 14 00:13:18 2015 +0100
+++ b/mpz/clears.c	Mon Dec 14 18:50:05 2015 +0100
@@ -39,12 +39,13 @@
 
   va_start (ap, x);
 
-  while (x != NULL)
+  do
     {
       if (ALLOC (x))
 	__GMP_FREE_FUNC_LIMBS (PTR (x), ALLOC (x));
       x = va_arg (ap, mpz_ptr);
     }
+  while (x != NULL);
 
   va_end (ap);
 }
diff -r 14a1c0840769 -r 4d37cb433803 mpz/inits.c
--- a/mpz/inits.c	Mon Dec 14 00:13:18 2015 +0100
+++ b/mpz/inits.c	Mon Dec 14 18:50:05 2015 +0100
@@ -40,7 +40,7 @@
 
   va_start (ap, x);
 
-  while (x != NULL)
+  do
     {
       ALLOC (x) = 0;
       PTR (x) = (mp_ptr) &dummy_limb;
@@ -48,6 +48,7 @@
 
       x = va_arg (ap, mpz_ptr);
     }
+  while (x != NULL);
 
   va_end (ap);
 }
diff -r 14a1c0840769 -r 4d37cb433803 tests/arm32call.asm
--- a/tests/arm32call.asm	Mon Dec 14 00:13:18 2015 +0100
+++ b/tests/arm32call.asm	Mon Dec 14 18:50:05 2015 +0100
@@ -59,7 +59,7 @@
 	LEA(	r12, calling_conventions_function)
 	ldr	r12, [r12]
 	mov	r14, pc
-	bx	r12
+	ret	r12
 
 	LEA(	r12, calling_conventions_values)
 
@@ -79,5 +79,5 @@
 	add	r12, r12, #JUNK_PARAMS
 	ldm	r12, {r1-r3}
 
-	bx	r14
+	ret	r14
 EPILOGUE()


More information about the gmp-commit mailing list