[svn] gcry - r1422 - trunk/mpi
svn author wk
cvs at cvs.gnupg.org
Mon Feb 22 12:35:39 CET 2010
Author: wk
Date: 2010-02-22 12:35:38 +0100 (Mon, 22 Feb 2010)
New Revision: 1422
Modified:
trunk/mpi/ChangeLog
trunk/mpi/longlong.h
Log:
Fix for gcc 4.4 on mips
Modified: trunk/mpi/ChangeLog
===================================================================
--- trunk/mpi/ChangeLog 2010-02-22 11:35:18 UTC (rev 1421)
+++ trunk/mpi/ChangeLog 2010-02-22 11:35:38 UTC (rev 1422)
@@ -1,3 +1,8 @@
+2010-02-22 Aurelien Jarno <aurel32 at debian.org> (wk)
+
+ * longlong.h (umul_ppmm) <mips> [__GNUC__ >= 4.4]: Patch according
+ to recommended gcc 4.4 changes.
+
2009-12-09 Werner Koch <wk at g10code.com>
* config.links: Remove asm modules for all sparc64. This is
Modified: trunk/mpi/longlong.h
===================================================================
--- trunk/mpi/longlong.h 2010-02-22 11:35:18 UTC (rev 1421)
+++ trunk/mpi/longlong.h 2010-02-22 11:35:38 UTC (rev 1422)
@@ -714,8 +714,16 @@
************** MIPS *****************
***************************************/
#if defined (__mips__) && W_TYPE_SIZE == 32
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+#if (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ 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) \
__asm__ ("multu %2,%3" \
: "=l" ((USItype)(w0)), \
"=h" ((USItype)(w1)) \
@@ -739,8 +747,17 @@
************** MIPS/64 **************
***************************************/
#if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+#if (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
+typedef unsigned int UTItype __attribute__ ((mode (TI)));
#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UTItype _r; \
+ _r = (UTItype) u * v; \
+ (w1) = _r >> 64; \
+ (w0) = (UDItype) _r; \
+ } while (0)
+#elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+#define umul_ppmm(w1, w0, u, v) \
__asm__ ("dmultu %2,%3" \
: "=l" ((UDItype)(w0)), \
"=h" ((UDItype)(w1)) \
More information about the Gnupg-commits
mailing list