summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2017-11-08 10:33:52 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-04 17:23:59 +0000
commit7104d48590ce672a657fcf51d8c3902a6cd14549 (patch)
treedd2f03c4ad2a9504b958be349329412761cf8a4d /meta
parentd164445477d57c18e93fd280ecccfa64b8394246 (diff)
downloadpoky-7104d48590ce672a657fcf51d8c3902a6cd14549.tar.gz
gcc: backport patch to fix miscompilation on mips64
Backport a patch to fix miscompilation on mips64. We've observed strange behaviour of `systemctl status <xxx> on qemumips64. The output of the command is like `systemctl show <xxx>', which is incorrect. The problem is due to the miscompilation of gcc for mips64 platform, thus backporting patch from upstream to fix this problem. [YOCTO #12266] (From OE-Core rev: 6264b4afe6962d37eeb918e062568dee811ef231) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (cherry picked from commit cfa13e5c756849820644d86d1882602649db6a9c) Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.2.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch52
2 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-7.2.inc b/meta/recipes-devtools/gcc/gcc-7.2.inc
index a2cb288ba0..1d40cba731 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-7.2.inc
@@ -79,6 +79,7 @@ SRC_URI = "\
79" 79"
80BACKPORTS = "\ 80BACKPORTS = "\
81 file://0051-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch \ 81 file://0051-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch \
82 file://0001-PR-rtl-optimization-81803.patch \
82" 83"
83SRC_URI[md5sum] = "ff370482573133a7fcdd96cd2f552292" 84SRC_URI[md5sum] = "ff370482573133a7fcdd96cd2f552292"
84SRC_URI[sha256sum] = "1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a" 85SRC_URI[sha256sum] = "1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a"
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch b/meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch
new file mode 100644
index 0000000000..292e734a2f
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch
@@ -0,0 +1,52 @@
1From 5cbb8e6b1122092b3eaabd4270b2f316aa40407c Mon Sep 17 00:00:00 2001
2From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Tue, 31 Oct 2017 18:27:52 +0000
4Subject: [PATCH] PR rtl-optimization/81803 * lra-constraints.c
5 (curr_insn_transform): Also reload the whole register for a strict subreg
6 no wider than a word if this is for a WORD_REGISTER_OPERATIONS target.
7
8git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254275 138bc75d-0d04-0410-961f-82ee72b054a4
9
10Upstream-Status: Backport
11
12This patch removes changes to Changelog from the original patch upstream. This is
13because we are backporting a patch to a stable version, making changes to Changelog,
14especially up '* GCC 7.2.0 released.', feels a little weird.
15
16Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
17---
18 gcc/lra-constraints.c | 11 ++++++++---
19 2 files changed, 16 insertions(+), 3 deletions(-)
20
21diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
22index a423f069836..3758409bb9c 100644
23--- a/gcc/lra-constraints.c
24+++ b/gcc/lra-constraints.c
25@@ -4207,8 +4207,9 @@ curr_insn_transform (bool check_only_p)
26 reg = SUBREG_REG (*loc);
27 byte = SUBREG_BYTE (*loc);
28 if (REG_P (reg)
29- /* Strict_low_part requires reload the register not
30- the sub-register. */
31+ /* Strict_low_part requires reloading the register and not
32+ just the subreg. Likewise for a strict subreg no wider
33+ than a word for WORD_REGISTER_OPERATIONS targets. */
34 && (curr_static_id->operand[i].strict_low
35 || (!paradoxical_subreg_p (mode, GET_MODE (reg))
36 && (hard_regno
37@@ -4219,7 +4220,11 @@ curr_insn_transform (bool check_only_p)
38 && (goal_alt[i] == NO_REGS
39 || (simplify_subreg_regno
40 (ira_class_hard_regs[goal_alt[i]][0],
41- GET_MODE (reg), byte, mode) >= 0)))))
42+ GET_MODE (reg), byte, mode) >= 0)))
43+ || (GET_MODE_PRECISION (mode)
44+ < GET_MODE_PRECISION (GET_MODE (reg))
45+ && GET_MODE_SIZE (GET_MODE (reg)) <= UNITS_PER_WORD
46+ && WORD_REGISTER_OPERATIONS)))
47 {
48 /* An OP_INOUT is required when reloading a subreg of a
49 mode wider than a word to ensure that data beyond the
50--
512.13.0
52