[oe-commits] Khem Raj : gmp-4.2.4: Dont use 'h' asm constraint on mips.

git version control git at git.openembedded.org
Tue Dec 22 09:48:04 UTC 2009


Module: openembedded.git
Branch: martin_jansa/srcpv
Commit: b567a03adbbaf59f064cf8f952d2430c3eadc66d
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=b567a03adbbaf59f064cf8f952d2430c3eadc66d

Author: Khem Raj <raj.khem at gmail.com>
Date:   Sat Dec 19 08:13:39 2009 -0800

gmp-4.2.4: Dont use 'h' asm constraint on mips.

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 .../gmp/gmp-4.2.4/dont_use_mips_h_constraint.patch |   39 ++++++++++++++++++++
 recipes/gmp/gmp_4.2.4.bb                           |    3 +-
 2 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/recipes/gmp/gmp-4.2.4/dont_use_mips_h_constraint.patch b/recipes/gmp/gmp-4.2.4/dont_use_mips_h_constraint.patch
new file mode 100644
index 0000000..f94116a
--- /dev/null
+++ b/recipes/gmp/gmp-4.2.4/dont_use_mips_h_constraint.patch
@@ -0,0 +1,39 @@
+Index: gmp-4.2.4/longlong.h
+===================================================================
+--- gmp-4.2.4.orig/longlong.h	2009-12-18 19:19:02.882100436 -0800
++++ gmp-4.2.4/longlong.h	2009-12-18 19:21:00.422064316 -0800
+@@ -1014,7 +1014,15 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
+ #endif /* __m88000__ */
+ 
+ #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" (w0), "=h" (w1) : "d" (u), "d" (v))
+ #else
+@@ -1027,7 +1035,16 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO (
+ #endif /* __mips */
+ 
+ #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" (w0), "=h" (w1) : "d" (u), "d" (v))
+ #else
diff --git a/recipes/gmp/gmp_4.2.4.bb b/recipes/gmp/gmp_4.2.4.bb
index 9aa5bf8..2b4b09b 100644
--- a/recipes/gmp/gmp_4.2.4.bb
+++ b/recipes/gmp/gmp_4.2.4.bb
@@ -1,8 +1,9 @@
 INC_PR = "r0"
-PR = "${INC_PR}.4"
+PR = "${INC_PR}.5"
 
 SRC_URI_append += "file://sh4-asmfix.patch;patch=1 \
                    file://use-includedir.patch;patch=1 \
+                   file://dont_use_mips_h_constraint.patch;patch=1 \
 		  "
 require gmp.inc
 LICENSE = "GPLv3 LGPLv3"





More information about the Openembedded-commits mailing list