[Gmp-commit] /var/hg/gmp: mpn/generic/sbpi1_bdiv_q.c: Move ASSERTs, to suppor...

mercurial at gmplib.org mercurial at gmplib.org
Tue Apr 17 22:25:00 CEST 2012


details:   /var/hg/gmp/rev/06616f5ca1d5
changeset: 14844:06616f5ca1d5
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Tue Apr 17 22:22:00 2012 +0200
description:
mpn/generic/sbpi1_bdiv_q.c: Move ASSERTs, to support qp = np.

diffstat:

 ChangeLog                  |  2 ++
 mpn/generic/sbpi1_bdiv_q.c |  4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 7293e8f73e2a -r 06616f5ca1d5 ChangeLog
--- a/ChangeLog	Tue Apr 17 08:10:18 2012 +0200
+++ b/ChangeLog	Tue Apr 17 22:22:00 2012 +0200
@@ -10,6 +10,8 @@
 	* tests/mpn/t-toom8-sqr.c: Likewise, but extended.
 	* tests/mpn/Makefile.am (check_PROGRAMS): Add t-toom?-sqr tests.
 
+	* mpn/generic/sbpi1_bdiv_q.c: Move ASSERTs, to support qp = np.
+
 2012-04-17  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/x86_64/copyd.asm: Rewrite.
diff -r 7293e8f73e2a -r 06616f5ca1d5 mpn/generic/sbpi1_bdiv_q.c
--- a/mpn/generic/sbpi1_bdiv_q.c	Tue Apr 17 08:10:18 2012 +0200
+++ b/mpn/generic/sbpi1_bdiv_q.c	Tue Apr 17 22:22:00 2012 +0200
@@ -66,9 +66,9 @@
       q = dinv * np[0];
       cy = mpn_addmul_1 (np, dp, dn, q);
       mpn_add_1 (np + dn, np + dn, i, cy);
+      ASSERT (np[0] == 0);
       qp[0] = ~q;
       qp++;
-      ASSERT (np[0] == 0);
       np++;
     }
 
@@ -76,9 +76,9 @@
     {
       q = dinv * np[0];
       mpn_addmul_1 (np, dp, i, q);
+      ASSERT (np[0] == 0);
       qp[0] = ~q;
       qp++;
-      ASSERT (np[0] == 0);
       np++;
     }
 


More information about the gmp-commit mailing list