[svn] GnuPG - r5502 - branches/STABLE-BRANCH-1-4/mpi
svn author wk
cvs at cvs.gnupg.org
Thu Dec 23 20:05:31 CET 2010
Author: wk
Date: 2010-12-23 20:05:31 +0100 (Thu, 23 Dec 2010)
New Revision: 5502
Modified:
branches/STABLE-BRANCH-1-4/mpi/ChangeLog
branches/STABLE-BRANCH-1-4/mpi/longlong.h
Log:
Revert last two changes and replace by code from libgcrypt 1.4.6.
Modified: branches/STABLE-BRANCH-1-4/mpi/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/mpi/ChangeLog 2010-12-17 16:55:13 UTC (rev 5501)
+++ branches/STABLE-BRANCH-1-4/mpi/ChangeLog 2010-12-23 19:05:31 UTC (rev 5502)
@@ -1,3 +1,8 @@
+2010-10-28 Werner Koch <wk at g10code.com>
+
+ * longlong.h: Revert last two changes and replace by code from
+ libgcrypt 1.4.6.
+
2010-10-22 Jason Woodward <jason.woodward at timesys.com> (wk)
* longlong.h (umul_ppmm) [mips32]: Fix typo.
Modified: branches/STABLE-BRANCH-1-4/mpi/longlong.h
===================================================================
--- branches/STABLE-BRANCH-1-4/mpi/longlong.h 2010-12-17 16:55:13 UTC (rev 5501)
+++ branches/STABLE-BRANCH-1-4/mpi/longlong.h 2010-12-23 19:05:31 UTC (rev 5502)
@@ -710,12 +710,13 @@
************** MIPS *****************
***************************************/
#if defined (__mips__) && W_TYPE_SIZE == 32
-#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )
-#define umul_ppmm(w1, w0, u, v) \
+#if (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
+#define umul_ppmm(w1, w0, u, v) \
do { \
- UDItype __ll = (UDItype)(u) * (v); \
- w1 = __ll >> 32; \
- w0 = __ll; \
+ UDItype _r; \
+ _r = (UDItype) u * v; \
+ (w1) = _r >> 32; \
+ (w0) = (USItype) _r; \
} while (0)
#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
#define umul_ppmm(w1, w0, u, v) \
@@ -742,14 +743,15 @@
************** MIPS/64 **************
***************************************/
#if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
-# if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )
+# if (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
+ typedef unsigned int UTItype __attribute__ ((mode (TI)));
# define umul_ppmm(w1, w0, u, v) \
- do { \
- typedef unsigned int __ll_UTItype __attribute__((mode(TI))); \
- __ll_UTItype __ll = (__ll_UTItype)(u) * (v); \
- w1 = __ll >> 64; \
- w0 = __ll; \
- } while (0)
+ do { \
+ UTItype _r; \
+ _r = (UTItype) u * v; \
+ (w1) = _r >> 64; \
+ (w0) = (UDItype) _r; \
+ } while (0)
# elif if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
# define umul_ppmm(w1, w0, u, v) \
__asm__ ("dmultu %2,%3" \
More information about the Gnupg-commits
mailing list