aboutsummaryrefslogtreecommitdiffstats
path: root/mpi/longlong.h
diff options
context:
space:
mode:
Diffstat (limited to 'mpi/longlong.h')
-rw-r--r--mpi/longlong.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/mpi/longlong.h b/mpi/longlong.h
index ba437f217..aeecf1e68 100644
--- a/mpi/longlong.h
+++ b/mpi/longlong.h
@@ -710,8 +710,15 @@ extern USItype __udiv_qrnnd ();
************** MIPS *****************
***************************************/
#if defined (__mips__) && W_TYPE_SIZE == 32
-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
-#define umul_ppmm(w1, w0, u, v) \
+#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR >= 4 )
+#define umul_ppmm(w1, w0, u, v) \
+ do { \
+ UDItype __ll = (UDItype)(u) * (v); \
+ w1 = __ll >> 32; \
+ w0 = __ll; \
+ } 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)) \