diff options
author | Ilya Yanok <yanok@emcraft.com> | 2011-07-19 03:00:55 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-20 15:27:35 +0100 |
commit | b2e49a6b70dcf9f281e73d33f04e38808b71cdfb (patch) | |
tree | 3df60f635a09a479d7cbe0ca9d719ae37714c84a /meta | |
parent | 44f59d24d9cc3d8a15fd796d170233dc122d13b1 (diff) | |
download | poky-b2e49a6b70dcf9f281e73d33f04e38808b71cdfb.tar.gz |
gcc_4.5.1: add pr44606.patch
Add fix for PR44606 as proposed in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44606
(From OE-Core rev: 5ec03dc1f80e437d5660aa3e0c7db9b561603d49)
Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.5.1.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.5.1/pr44606.patch | 106 |
2 files changed, 107 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1.inc b/meta/recipes-devtools/gcc/gcc-4.5.1.inc index 99f2ad61c4..e84df82082 100644 --- a/meta/recipes-devtools/gcc/gcc-4.5.1.inc +++ b/meta/recipes-devtools/gcc/gcc-4.5.1.inc | |||
@@ -60,6 +60,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ | |||
60 | file://use-defaults.h-and-t-oe-in-B.patch \ | 60 | file://use-defaults.h-and-t-oe-in-B.patch \ |
61 | file://pr43810.patch \ | 61 | file://pr43810.patch \ |
62 | file://pr44290.patch \ | 62 | file://pr44290.patch \ |
63 | file://pr44606.patch \ | ||
63 | " | 64 | " |
64 | 65 | ||
65 | SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " | 66 | SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " |
diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/pr44606.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/pr44606.patch new file mode 100644 index 0000000000..dd590bbe80 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.5.1/pr44606.patch | |||
@@ -0,0 +1,106 @@ | |||
1 | From aff0ca6587a2f0849db55eef62a85bc8721869f2 Mon Sep 17 00:00:00 2001 | ||
2 | From: froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Tue, 1 Feb 2011 02:11:54 +0000 | ||
4 | Subject: [PATCH 3/6] gcc/ Backport from mainline: 2010-12-30 Nathan Froyd <froydnj@codesourcery.com> | ||
5 | |||
6 | PR target/44606 | ||
7 | * reload1.c (choose_reload_regs): Don't look for equivalences for | ||
8 | output reloads of constant loads. | ||
9 | |||
10 | gcc/testsuite/ | ||
11 | Backport from mainline: | ||
12 | 2010-12-30 Nathan Froyd <froydnj@codesourcery.com> | ||
13 | |||
14 | PR target/44606 | ||
15 | * gcc.dg/pr44606.c: New test. | ||
16 | |||
17 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch@169465 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
18 | --- | ||
19 | gcc/reload1.c | 11 -------- | ||
20 | gcc/testsuite/gcc.dg/pr44606.c | 52 ++++++++++++++++++++++++++++++++++++++++ | ||
21 | 2 files changed, 52 insertions(+), 11 deletions(-) | ||
22 | create mode 100644 gcc/testsuite/gcc.dg/pr44606.c | ||
23 | |||
24 | diff --git a/gcc/reload1.c b/gcc/reload1.c | ||
25 | index 02fef2d..5732677 100644 | ||
26 | --- a/gcc/reload1.c | ||
27 | +++ b/gcc/reload1.c | ||
28 | @@ -6273,17 +6273,6 @@ choose_reload_regs (struct insn_chain *chain) | ||
29 | && (rld[r].nregs == max_group_size | ||
30 | || ! reg_classes_intersect_p (rld[r].rclass, group_class))) | ||
31 | search_equiv = rld[r].in; | ||
32 | - /* If this is an output reload from a simple move insn, look | ||
33 | - if an equivalence for the input is available. */ | ||
34 | - else if (inheritance && rld[r].in == 0 && rld[r].out != 0) | ||
35 | - { | ||
36 | - rtx set = single_set (insn); | ||
37 | - | ||
38 | - if (set | ||
39 | - && rtx_equal_p (rld[r].out, SET_DEST (set)) | ||
40 | - && CONSTANT_P (SET_SRC (set))) | ||
41 | - search_equiv = SET_SRC (set); | ||
42 | - } | ||
43 | |||
44 | if (search_equiv) | ||
45 | { | ||
46 | diff --git a/gcc/testsuite/gcc.dg/pr44606.c b/gcc/testsuite/gcc.dg/pr44606.c | ||
47 | new file mode 100644 | ||
48 | index 0000000..3929775 | ||
49 | --- /dev/null | ||
50 | +++ b/gcc/testsuite/gcc.dg/pr44606.c | ||
51 | @@ -0,0 +1,52 @@ | ||
52 | +/* PR target/44606 */ | ||
53 | +/* { dg-do run } */ | ||
54 | +/* { dg-options "-O2" } */ | ||
55 | + | ||
56 | +#include <stdio.h> | ||
57 | + | ||
58 | +extern void abort (void); | ||
59 | + | ||
60 | + typedef struct _PixelPacket { unsigned char r, g, b; } | ||
61 | + PixelPacket; | ||
62 | +#define ARRAYLEN(X) (sizeof(X)/sizeof(X[0])) | ||
63 | +PixelPacket q[6]; | ||
64 | +#define COLS (ARRAYLEN(q) - 1) | ||
65 | +PixelPacket p[2*COLS + 22]; | ||
66 | +#define Minify(POS, WEIGHT) do { \ | ||
67 | + total_r += (WEIGHT)*(p[POS].r); \ | ||
68 | + total_g += (WEIGHT)*(p[POS].g); \ | ||
69 | + total_b += (WEIGHT)*(p[POS].b); \ | ||
70 | +} while (0) | ||
71 | +unsigned long columns = COLS; | ||
72 | +int main(void) | ||
73 | +{ | ||
74 | + static const unsigned char answers[COLS] = { 31, 32, 34, 35, 36 }; | ||
75 | + unsigned long x; | ||
76 | + for (x = 0; x < sizeof(p)/sizeof(p[0]); x++) { | ||
77 | + p[x].b = (x + 34) | 1; | ||
78 | + } | ||
79 | + for (x = 0; x < columns; x++) { | ||
80 | + double total_r = 0, total_g = 0, total_b = 0; | ||
81 | + double saved_r = 0, saved_g = 0, saved_b = 0; | ||
82 | + Minify(2*x + 0, 3.0); | ||
83 | + Minify(2*x + 1, 7.0); | ||
84 | + Minify(2*x + 2, 7.0); | ||
85 | + saved_r = total_r; | ||
86 | + saved_g = total_g; | ||
87 | + Minify(2*x + 11, 15.0); | ||
88 | + Minify(2*x + 12, 7.0); | ||
89 | + Minify(2*x + 18, 7.0); | ||
90 | + Minify(2*x + 19, 15.0); | ||
91 | + Minify(2*x + 20, 15.0); | ||
92 | + Minify(2*x + 21, 7.0); | ||
93 | + q[x].r = (unsigned char)(total_r/128.0 + 0.5); | ||
94 | + q[x].g = (unsigned char)(total_g/128.0 + 0.5); | ||
95 | + q[x].b = (unsigned char)(total_b/128.0 + 0.5); | ||
96 | + fprintf(stderr, "r:%f g:%f b:%f\n", saved_r, saved_g, saved_b); | ||
97 | + } | ||
98 | + for (x = 0; x < COLS; x++) { | ||
99 | + if (answers[x] != q[x].b) | ||
100 | + abort(); | ||
101 | + } | ||
102 | + return 0; | ||
103 | +} | ||
104 | -- | ||
105 | 1.7.4 | ||
106 | |||