diff options
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.8.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch | 121 |
2 files changed, 122 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc index f1260af3a3..ac205dedaf 100644 --- a/meta/recipes-devtools/gcc/gcc-4.8.inc +++ b/meta/recipes-devtools/gcc/gcc-4.8.inc | |||
@@ -79,6 +79,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ | |||
79 | file://0047-repomembug.patch \ | 79 | file://0047-repomembug.patch \ |
80 | file://0048-PR57532.patch \ | 80 | file://0048-PR57532.patch \ |
81 | file://0048-PR58854_fix_arm_apcs_epilogue.patch \ | 81 | file://0048-PR58854_fix_arm_apcs_epilogue.patch \ |
82 | file://0001-fix-ICE-when-building-opus.patch \ | ||
82 | " | 83 | " |
83 | SRC_URI[md5sum] = "3b2386c114cd74185aa3754b58a79304" | 84 | SRC_URI[md5sum] = "3b2386c114cd74185aa3754b58a79304" |
84 | SRC_URI[sha256sum] = "545b44be3ad9f2c4e90e6880f5c9d4f0a8f0e5f67e1ffb0d45da9fa01bb05813" | 85 | SRC_URI[sha256sum] = "545b44be3ad9f2c4e90e6880f5c9d4f0a8f0e5f67e1ffb0d45da9fa01bb05813" |
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch b/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch new file mode 100644 index 0000000000..9d3aeaa4e0 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch | |||
@@ -0,0 +1,121 @@ | |||
1 | From 22228d8ba86c70381f7c34c22ac6994234d0f3e7 Mon Sep 17 00:00:00 2001 | ||
2 | From: xguo <xguo@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Fri, 9 Aug 2013 06:59:01 +0000 | ||
4 | Subject: [PATCH] gcc/ChangeLog: | ||
5 | |||
6 | Backport from mainline: | ||
7 | 2013-08-09 Zhenqiang Chen <zhenqiang.chen@linaro.org> | ||
8 | |||
9 | * config/arm/neon.md (vcond): Fix floating-point vector | ||
10 | comparisons against 0. | ||
11 | |||
12 | gcc/testsuite/ChangeLog: | ||
13 | |||
14 | Backport from mainline: | ||
15 | 2013-08-09 Zhenqiang Chen <zhenqiang.chen@linaro.org> | ||
16 | |||
17 | * gcc.target/arm/lp1189445.c: New testcase. | ||
18 | |||
19 | Upstream-Status: Backport from 4.8.2 | ||
20 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
21 | |||
22 | More details in: | ||
23 | http://gcc.1065356.n5.nabble.com/PATCH-ARM-Fix-unrecognizable-vector-comparisons-td947064.html | ||
24 | |||
25 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@201620 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
26 | --- | ||
27 | gcc/ChangeLog | 8 ++++++++ | ||
28 | gcc/config/arm/neon.md | 34 +++++++++++++++++++++++++++----- | ||
29 | gcc/testsuite/ChangeLog | 7 +++++++ | ||
30 | gcc/testsuite/gcc.target/arm/lp1189445.c | 18 +++++++++++++++++ | ||
31 | 4 files changed, 62 insertions(+), 5 deletions(-) | ||
32 | create mode 100644 gcc/testsuite/gcc.target/arm/lp1189445.c | ||
33 | |||
34 | diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md | ||
35 | index d8d4202..86a5932 100644 | ||
36 | --- a/gcc/config/arm/neon.md | ||
37 | +++ b/gcc/config/arm/neon.md | ||
38 | @@ -1732,6 +1732,7 @@ | ||
39 | ? 3 : 1; | ||
40 | rtx magic_rtx = GEN_INT (magic_word); | ||
41 | int inverse = 0; | ||
42 | + int use_zero_form = 0; | ||
43 | int swap_bsl_operands = 0; | ||
44 | rtx mask = gen_reg_rtx (<V_cmp_result>mode); | ||
45 | rtx tmp = gen_reg_rtx (<V_cmp_result>mode); | ||
46 | @@ -1742,12 +1743,16 @@ | ||
47 | switch (GET_CODE (operands[3])) | ||
48 | { | ||
49 | case GE: | ||
50 | + case GT: | ||
51 | case LE: | ||
52 | + case LT: | ||
53 | case EQ: | ||
54 | - if (!REG_P (operands[5]) | ||
55 | - && (operands[5] != CONST0_RTX (<MODE>mode))) | ||
56 | - operands[5] = force_reg (<MODE>mode, operands[5]); | ||
57 | - break; | ||
58 | + if (operands[5] == CONST0_RTX (<MODE>mode)) | ||
59 | + { | ||
60 | + use_zero_form = 1; | ||
61 | + break; | ||
62 | + } | ||
63 | + /* Fall through. */ | ||
64 | default: | ||
65 | if (!REG_P (operands[5])) | ||
66 | operands[5] = force_reg (<MODE>mode, operands[5]); | ||
67 | @@ -1798,7 +1803,26 @@ | ||
68 | a GT b -> a GT b | ||
69 | a LE b -> b GE a | ||
70 | a LT b -> b GT a | ||
71 | - a EQ b -> a EQ b */ | ||
72 | + a EQ b -> a EQ b | ||
73 | + Note that there also exist direct comparison against 0 forms, | ||
74 | + so catch those as a special case. */ | ||
75 | + if (use_zero_form) | ||
76 | + { | ||
77 | + inverse = 0; | ||
78 | + switch (GET_CODE (operands[3])) | ||
79 | + { | ||
80 | + case LT: | ||
81 | + base_comparison = gen_neon_vclt<mode>; | ||
82 | + break; | ||
83 | + case LE: | ||
84 | + base_comparison = gen_neon_vcle<mode>; | ||
85 | + break; | ||
86 | + default: | ||
87 | + /* Do nothing, other zero form cases already have the correct | ||
88 | + base_comparison. */ | ||
89 | + break; | ||
90 | + } | ||
91 | + } | ||
92 | |||
93 | if (!inverse) | ||
94 | emit_insn (base_comparison (mask, operands[4], operands[5], magic_rtx)); | ||
95 | diff --git a/gcc/testsuite/gcc.target/arm/lp1189445.c b/gcc/testsuite/gcc.target/arm/lp1189445.c | ||
96 | new file mode 100644 | ||
97 | index 0000000..766748e | ||
98 | --- /dev/null | ||
99 | +++ b/gcc/testsuite/gcc.target/arm/lp1189445.c | ||
100 | @@ -0,0 +1,18 @@ | ||
101 | +/* { dg-do compile } */ | ||
102 | +/* { dg-require-effective-target arm_neon } */ | ||
103 | +/* { dg-add-options arm_neon } */ | ||
104 | +/* { dg-options "-O3" } */ | ||
105 | + | ||
106 | +int id; | ||
107 | +int | ||
108 | +test (const long int *data) | ||
109 | +{ | ||
110 | + int i, retval; | ||
111 | + retval = id; | ||
112 | + for (i = 0; i < id; i++) | ||
113 | + { | ||
114 | + retval &= (data[i] <= 0); | ||
115 | + } | ||
116 | + | ||
117 | + return (retval); | ||
118 | +} | ||
119 | -- | ||
120 | 2.0.0 | ||
121 | |||