Module Name:    src
Committed By:   joerg
Date:           Tue Mar 25 15:28:15 UTC 2014

Modified Files:
        src/external/lgpl3/gmp/dist: longlong.h
        src/external/lgpl3/mpfr/dist/src: mpfr-longlong.h

Log Message:
Use C version of umul_ppmm for Clang on MIPS.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/lgpl3/gmp/dist/longlong.h
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/lgpl3/gmp/dist/longlong.h
diff -u src/external/lgpl3/gmp/dist/longlong.h:1.1.1.2 src/external/lgpl3/gmp/dist/longlong.h:1.2
--- src/external/lgpl3/gmp/dist/longlong.h:1.1.1.2	Fri Nov 29 07:49:47 2013
+++ src/external/lgpl3/gmp/dist/longlong.h	Tue Mar 25 15:28:15 2014
@@ -1209,7 +1209,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype 
 #endif /* __m88000__ */
 
 #if defined (__mips) && W_TYPE_SIZE == 32
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {									\
     UDItype __ll = (UDItype)(u) * (v);					\
@@ -1231,7 +1231,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype 
 #endif /* __mips */
 
 #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {									\
     typedef unsigned int __ll_UTItype __attribute__((mode(TI)));	\
@@ -1347,7 +1347,7 @@ extern UWtype __MPN(udiv_qrnnd) (UWtype 
   __asm__ ("cntlzw %0,%1" : "=r" (count) : "r" (x))
 #define COUNT_LEADING_ZEROS_0 32
 #if HAVE_HOST_CPU_FAMILY_powerpc
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {									\
     UDItype __ll = (UDItype)(u) * (v);					\

Index: src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h
diff -u src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h:1.1.1.1 src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h:1.2
--- src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h:1.1.1.1	Thu Nov 28 12:30:54 2013
+++ src/external/lgpl3/mpfr/dist/src/mpfr-longlong.h	Tue Mar 25 15:28:15 2014
@@ -1022,7 +1022,7 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
 #endif /* __m88000__ */
 
 #if defined (__mips) && W_TYPE_SIZE == 32
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {									\
     UDItype __ll = (UDItype)(u) * (v);					\
@@ -1044,7 +1044,7 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
 #endif /* __mips */
 
 #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {									\
     typedef unsigned int __ll_UTItype __attribute__((mode(TI)));	\
@@ -1160,7 +1160,7 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
   __asm__ ("{cntlz|cntlzw} %0,%1" : "=r" (count) : "r" (x))
 #define COUNT_LEADING_ZEROS_0 32
 #if HAVE_HOST_CPU_FAMILY_powerpc
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {									\
     UDItype __ll = (UDItype)(u) * (v);					\
@@ -1259,7 +1259,7 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
 #define count_leading_zeros(count, x) \
   __asm__ ("cntlzd %0,%1" : "=r" (count) : "r" (x))
 #define COUNT_LEADING_ZEROS_0 64
-#if __GMP_GNUC_PREREQ (4,4)
+#if __GMP_GNUC_PREREQ (4,4) || defined(__clang__)
 #define umul_ppmm(w1, w0, u, v) \
   do {									\
     typedef unsigned int __ll_UTItype __attribute__((mode(TI)));	\

Reply via email to