[oe-commits] Khem Raj : mpfr_2.3.1.bb: 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: c313ecd0f15e2f2f0ed13998c0daf2d574247988
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=c313ecd0f15e2f2f0ed13998c0daf2d574247988

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

mpfr_2.3.1.bb: Dont use 'h' asm constraint on mips.

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

---

 recipes/mpfr/dont_use_mips_h_constraint.patch |   39 +++++++++++++++++++++++++
 recipes/mpfr/mpfr_2.3.1.bb                    |    6 ++-
 2 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/recipes/mpfr/dont_use_mips_h_constraint.patch b/recipes/mpfr/dont_use_mips_h_constraint.patch
new file mode 100644
index 0000000..055e494
--- /dev/null
+++ b/recipes/mpfr/dont_use_mips_h_constraint.patch
@@ -0,0 +1,39 @@
+Index: mpfr-2.3.1/mpfr-longlong.h
+===================================================================
+--- mpfr-2.3.1.orig/mpfr-longlong.h	2009-12-18 19:22:54.372096301 -0800
++++ mpfr-2.3.1/mpfr-longlong.h	2009-12-18 19:24:21.832074034 -0800
+@@ -1011,7 +1011,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
+@@ -1024,7 +1032,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/mpfr/mpfr_2.3.1.bb b/recipes/mpfr/mpfr_2.3.1.bb
index 8da9c0e..5e415a1 100644
--- a/recipes/mpfr/mpfr_2.3.1.bb
+++ b/recipes/mpfr/mpfr_2.3.1.bb
@@ -1,10 +1,12 @@
 require mpfr.inc
 
 DEPENDS = "gmp"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.bz2 \
-        file://long-long-thumb.patch;patch=1"
+           file://long-long-thumb.patch;patch=1 \
+	   file://dont_use_mips_h_constraint.patch;patch=1 \
+	  "
 S = "${WORKDIR}/mpfr-${PV}"
 
 do_stage() {





More information about the Openembedded-commits mailing list