[Gmp-commit] /var/hg/gmp-6.1: Merge longlong.h changes from mainline.

mercurial at gmplib.org mercurial at gmplib.org
Wed Dec 14 18:55:14 UTC 2016


details:   /var/hg/gmp-6.1/rev/1b182069ce36
changeset: 16966:1b182069ce36
user:      Torbjorn Granlund <tg at gmplib.org>
date:      Wed Dec 14 19:55:12 2016 +0100
description:
Merge longlong.h changes from mainline.

diffstat:

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

diffs (83 lines):

diff -r 2bae1bb25197 -r 1b182069ce36 ChangeLog
--- a/ChangeLog	Wed Dec 07 23:55:27 2016 +0100
+++ b/ChangeLog	Wed Dec 14 19:55:12 2016 +0100
@@ -1,3 +1,7 @@
+2016-12-13  Torbjörn Granlund  <tg at gmplib.org>
+
+	* longlong.h: Test LONGLONG_STANDALONE in two more places.
+
 2016-12-07  Torbjörn Granlund  <tg at gmplib.org>
 
 	* gmp-h.in: Check yet another symbol for FILE.
@@ -96,6 +100,11 @@
 	* longlong.h (arc add_ssaaaa, sub_ddmmss): Replace obsolete 'J'
 	constraint with 'Cal'.
 
+2016-08-22  Marc Glisse  <marc.glisse at inria.fr>
+
+	* longlong.h (umul_ppmm from __umulsidi3): Protect with do ...
+	while (0).
+
 2016-06-18  Torbjörn Granlund  <tg at gmplib.org>
 
 	* Version 6.1.1 released.
@@ -137,7 +146,7 @@
 
 2015-12-13 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
-	* tests/arm32call.asm: bx->ret to support thumb-less chips 
+	* tests/arm32call.asm: bx->ret to support thumb-less chips
 	  (thanks Martin Husemann).
 
 2015-12-13  Torbjörn Granlund  <torbjorng at google.com>
diff -r 2bae1bb25197 -r 1b182069ce36 longlong.h
--- a/longlong.h	Wed Dec 07 23:55:27 2016 +0100
+++ b/longlong.h	Wed Dec 14 19:55:12 2016 +0100
@@ -1,6 +1,6 @@
 /* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
 
-Copyright 1991-1994, 1996, 1997, 1999-2005, 2007-2009, 2011-2015 Free Software
+Copyright 1991-1994, 1996, 1997, 1999-2005, 2007-2009, 2011-2016 Free Software
 Foundation, Inc.
 
 This file is part of the GNU MP Library.
@@ -506,6 +506,7 @@
 	   : "r" ((USItype) (a)), "r" ((USItype) (b)) __CLOBBER_CC);	\
   } while (0)
 #define UMUL_TIME 20
+#ifndef LONGLONG_STANDALONE
 #define udiv_qrnnd(q, r, n1, n0, d) \
   do { UWtype __r;							\
     (q) = __MPN(udiv_qrnnd) (&__r, (n1), (n0), (d));			\
@@ -513,6 +514,7 @@
   } while (0)
 extern UWtype __MPN(udiv_qrnnd) (UWtype *, UWtype, UWtype, UWtype);
 #define UDIV_TIME 200
+#endif /* LONGLONG_STANDALONE */
 #else /* ARMv4 or newer */
 #define umul_ppmm(xh, xl, a, b) \
   __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b))
@@ -1895,11 +1897,11 @@
 /* FIXME: "sidi" here is highly doubtful, should sometimes be "diti".  */
 #if !defined (umul_ppmm) && defined (__umulsidi3)
 #define umul_ppmm(ph, pl, m0, m1) \
-  {									\
+  do {									\
     UDWtype __ll = __umulsidi3 (m0, m1);				\
     ph = (UWtype) (__ll >> W_TYPE_SIZE);				\
     pl = (UWtype) __ll;							\
-  }
+  } while (0)
 #endif
 
 #if !defined (__umulsidi3)
@@ -2104,7 +2106,8 @@
 
 /* If the processor has no udiv_qrnnd but sdiv_qrnnd, go through
    __udiv_w_sdiv (defined in libgcc or elsewhere).  */
-#if !defined (udiv_qrnnd) && defined (sdiv_qrnnd)
+#if !defined (udiv_qrnnd) && defined (sdiv_qrnnd) \
+  && ! defined (LONGLONG_STANDALONE)
 #define udiv_qrnnd(q, r, nh, nl, d) \
   do {									\
     UWtype __r;								\


More information about the gmp-commit mailing list