diff options
Diffstat (limited to 'meta/recipes-support/gmp')
-rw-r--r-- | meta/recipes-support/gmp/gmp-4.2.1/avoid-h-asm-constraint-for-MIPS.patch | 57 | ||||
-rw-r--r-- | meta/recipes-support/gmp/gmp_4.2.1.bb | 1 |
2 files changed, 58 insertions, 0 deletions
diff --git a/meta/recipes-support/gmp/gmp-4.2.1/avoid-h-asm-constraint-for-MIPS.patch b/meta/recipes-support/gmp/gmp-4.2.1/avoid-h-asm-constraint-for-MIPS.patch new file mode 100644 index 0000000000..6da0be9ca0 --- /dev/null +++ b/meta/recipes-support/gmp/gmp-4.2.1/avoid-h-asm-constraint-for-MIPS.patch | |||
@@ -0,0 +1,57 @@ | |||
1 | From d50686de0406a88ef9112f5252103f799982e84a Mon Sep 17 00:00:00 2001 | ||
2 | From: Andre McCurdy <armccurdy@gmail.com> | ||
3 | Date: Thu, 4 Feb 2016 14:00:00 -0800 | ||
4 | Subject: [PATCH] avoid h asm constraint for MIPS | ||
5 | |||
6 | The h asm constrain (to extract the high part of a multiplication | ||
7 | result) has not been recognised since gcc 4.4: | ||
8 | |||
9 | https://gcc.gnu.org/gcc-4.4/changes.html | ||
10 | |||
11 | Drop the MIPS umul_ppmm() implementations which rely on "=h" and fall | ||
12 | back to the older implementations (which use explicit mfhi and mflo | ||
13 | instructions to move the high and low parts of the multiplication | ||
14 | result into their destinations). | ||
15 | |||
16 | Upstream-Status: Inappropriate [upstream has a different solution] | ||
17 | |||
18 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | ||
19 | --- | ||
20 | longlong.h | 10 ---------- | ||
21 | 1 file changed, 10 deletions(-) | ||
22 | |||
23 | diff --git a/longlong.h b/longlong.h | ||
24 | index b53fbee..0193abb 100644 | ||
25 | --- a/longlong.h | ||
26 | +++ b/longlong.h | ||
27 | @@ -1011,27 +1011,17 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ((UWtype *, UWtype, UWtype, UWtype)); | ||
28 | #endif /* __m88000__ */ | ||
29 | |||
30 | #if defined (__mips) && W_TYPE_SIZE == 32 | ||
31 | -#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | ||
32 | -#define umul_ppmm(w1, w0, u, v) \ | ||
33 | - __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) | ||
34 | -#else | ||
35 | #define umul_ppmm(w1, w0, u, v) \ | ||
36 | __asm__ ("multu %2,%3\n\tmflo %0\n\tmfhi %1" \ | ||
37 | : "=d" (w0), "=d" (w1) : "d" (u), "d" (v)) | ||
38 | -#endif | ||
39 | #define UMUL_TIME 10 | ||
40 | #define UDIV_TIME 100 | ||
41 | #endif /* __mips */ | ||
42 | |||
43 | #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64 | ||
44 | -#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 | ||
45 | -#define umul_ppmm(w1, w0, u, v) \ | ||
46 | - __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v)) | ||
47 | -#else | ||
48 | #define umul_ppmm(w1, w0, u, v) \ | ||
49 | __asm__ ("dmultu %2,%3\n\tmflo %0\n\tmfhi %1" \ | ||
50 | : "=d" (w0), "=d" (w1) : "d" (u), "d" (v)) | ||
51 | -#endif | ||
52 | #define UMUL_TIME 20 | ||
53 | #define UDIV_TIME 140 | ||
54 | #endif /* __mips */ | ||
55 | -- | ||
56 | 1.9.1 | ||
57 | |||
diff --git a/meta/recipes-support/gmp/gmp_4.2.1.bb b/meta/recipes-support/gmp/gmp_4.2.1.bb index c25e5ea6ba..5e8ee29f36 100644 --- a/meta/recipes-support/gmp/gmp_4.2.1.bb +++ b/meta/recipes-support/gmp/gmp_4.2.1.bb | |||
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=892f569a555ba9c07a568a7c0c4fa63a \ | |||
10 | SRC_URI = "https://gmplib.org/download/${BPN}/archive/${BP}.tar.bz2 \ | 10 | SRC_URI = "https://gmplib.org/download/${BPN}/archive/${BP}.tar.bz2 \ |
11 | file://Use-__gnu_inline__-attribute.patch \ | 11 | file://Use-__gnu_inline__-attribute.patch \ |
12 | file://gmp_fix_for_automake-1.12.patch \ | 12 | file://gmp_fix_for_automake-1.12.patch \ |
13 | file://avoid-h-asm-constraint-for-MIPS.patch \ | ||
13 | " | 14 | " |
14 | 15 | ||
15 | SRC_URI[md5sum] = "091c56e0e1cca6b09b17b69d47ef18e3" | 16 | SRC_URI[md5sum] = "091c56e0e1cca6b09b17b69d47ef18e3" |