summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@lge.com>2014-07-18 01:16:39 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-11 12:06:56 +0100
commited68cb87bc01bd3f89b47b0e54706bdde7120012 (patch)
tree82504493f1dcc0e92de2fdadc126d9cc680ffe65 /meta
parent60cdebd50c5de5a0656d056fe63094ca35c01e57 (diff)
downloadpoky-ed68cb87bc01bd3f89b47b0e54706bdde7120012.tar.gz
gcc-4.8: backport fix for ICE when building opus
* backported from 4.8.2, so daisy isn't affected (From OE-Core rev: 3aba676cb5d81ceaee85ca87d9ae706242f3454b) Signed-off-by: Martin Jansa <martin.jansa@lge.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0001-fix-ICE-when-building-opus.patch121
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 "
83SRC_URI[md5sum] = "3b2386c114cd74185aa3754b58a79304" 84SRC_URI[md5sum] = "3b2386c114cd74185aa3754b58a79304"
84SRC_URI[sha256sum] = "545b44be3ad9f2c4e90e6880f5c9d4f0a8f0e5f67e1ffb0d45da9fa01bb05813" 85SRC_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 @@
1From 22228d8ba86c70381f7c34c22ac6994234d0f3e7 Mon Sep 17 00:00:00 2001
2From: xguo <xguo@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Fri, 9 Aug 2013 06:59:01 +0000
4Subject: [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
12gcc/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
19Upstream-Status: Backport from 4.8.2
20Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
21
22More details in:
23http://gcc.1065356.n5.nabble.com/PATCH-ARM-Fix-unrecognizable-vector-comparisons-td947064.html
24
25git-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
34diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
35index 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));
95diff --git a/gcc/testsuite/gcc.target/arm/lp1189445.c b/gcc/testsuite/gcc.target/arm/lp1189445.c
96new file mode 100644
97index 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--
1202.0.0
121