summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8.inc3
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/0050-PR-target-58595.patch132
2 files changed, 134 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
index f5e583d766..855ec26aef 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -69,7 +69,8 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
69 file://0046-libatomic-deptracking.patch \ 69 file://0046-libatomic-deptracking.patch \
70 file://0047-repomembug.patch \ 70 file://0047-repomembug.patch \
71 file://0048-PR58854_fix_arm_apcs_epilogue.patch \ 71 file://0048-PR58854_fix_arm_apcs_epilogue.patch \
72 file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \ 72 file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
73 file://0050-PR-target-58595.patch \
73 " 74 "
74SRC_URI[md5sum] = "a3d7d63b9cb6b6ea049469a0c4a43c9d" 75SRC_URI[md5sum] = "a3d7d63b9cb6b6ea049469a0c4a43c9d"
75SRC_URI[sha256sum] = "09dc2276c73424bbbfda1dbddc62bbbf900c9f185acf7f3e1d773ce2d7e3cdc8" 76SRC_URI[sha256sum] = "09dc2276c73424bbbfda1dbddc62bbbf900c9f185acf7f3e1d773ce2d7e3cdc8"
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0050-PR-target-58595.patch b/meta/recipes-devtools/gcc/gcc-4.8/0050-PR-target-58595.patch
new file mode 100644
index 0000000000..4470596527
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/0050-PR-target-58595.patch
@@ -0,0 +1,132 @@
1Backport fix for PR target/58595
2
3From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
4Date: Thu, 6 Mar 2014 12:07:07 +0000
5Subject: [PATCH] PR target/58595 * config/arm/arm.c
6 (arm_tls_symbol_p): Remove. (arm_legitimize_address): Call
7 legitimize_tls_address for any arm_tls_referenced_p expression,
8 handle constant addend. Call it before testing for !TARGET_ARM.
9 (thumb_legitimize_address): Don't handle arm_tls_symbol_p here.
10
11 * gcc.dg/tls/pr58595.c: New test.
12
13
14git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208380 138bc75d-0d04-0410-961f-82ee72b054a4
15
16Index: gcc-4.8.2/gcc/ChangeLog
17===================================================================
18--- gcc-4.8.2.orig/gcc/ChangeLog
19+++ gcc-4.8.2/gcc/ChangeLog
20@@ -1,3 +1,13 @@
21+2014-03-06 Jakub Jelinek <jakub@redhat.com>
22+ Meador Inge <meadori@codesourcery.com>
23+
24+ PR target/58595
25+ * config/arm/arm.c (arm_tls_symbol_p): Remove.
26+ (arm_legitimize_address): Call legitimize_tls_address for any
27+ arm_tls_referenced_p expression, handle constant addend. Call it
28+ before testing for !TARGET_ARM.
29+ (thumb_legitimize_address): Don't handle arm_tls_symbol_p here.
30+
31 2013-10-16 Release Manager
32
33 * GCC 4.8.2 released.
34Index: gcc-4.8.2/gcc/config/arm/arm.c
35===================================================================
36--- gcc-4.8.2.orig/gcc/config/arm/arm.c
37+++ gcc-4.8.2/gcc/config/arm/arm.c
38@@ -230,7 +230,6 @@ static tree arm_gimplify_va_arg_expr (tr
39 static void arm_option_override (void);
40 static unsigned HOST_WIDE_INT arm_shift_truncation_mask (enum machine_mode);
41 static bool arm_cannot_copy_insn_p (rtx);
42-static bool arm_tls_symbol_p (rtx x);
43 static int arm_issue_rate (void);
44 static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED;
45 static bool arm_output_addr_const_extra (FILE *, rtx);
46@@ -6573,6 +6572,32 @@ legitimize_tls_address (rtx x, rtx reg)
47 rtx
48 arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
49 {
50+ if (arm_tls_referenced_p (x))
51+ {
52+ rtx addend = NULL;
53+
54+ if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS)
55+ {
56+ addend = XEXP (XEXP (x, 0), 1);
57+ x = XEXP (XEXP (x, 0), 0);
58+ }
59+
60+ if (GET_CODE (x) != SYMBOL_REF)
61+ return x;
62+
63+ gcc_assert (SYMBOL_REF_TLS_MODEL (x) != 0);
64+
65+ x = legitimize_tls_address (x, NULL_RTX);
66+
67+ if (addend)
68+ {
69+ x = gen_rtx_PLUS (SImode, x, addend);
70+ orig_x = x;
71+ }
72+ else
73+ return x;
74+ }
75+
76 if (!TARGET_ARM)
77 {
78 /* TODO: legitimize_address for Thumb2. */
79@@ -6581,9 +6606,6 @@ arm_legitimize_address (rtx x, rtx orig_
80 return thumb_legitimize_address (x, orig_x, mode);
81 }
82
83- if (arm_tls_symbol_p (x))
84- return legitimize_tls_address (x, NULL_RTX);
85-
86 if (GET_CODE (x) == PLUS)
87 {
88 rtx xop0 = XEXP (x, 0);
89@@ -6695,9 +6717,6 @@ arm_legitimize_address (rtx x, rtx orig_
90 rtx
91 thumb_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode)
92 {
93- if (arm_tls_symbol_p (x))
94- return legitimize_tls_address (x, NULL_RTX);
95-
96 if (GET_CODE (x) == PLUS
97 && CONST_INT_P (XEXP (x, 1))
98 && (INTVAL (XEXP (x, 1)) >= 32 * GET_MODE_SIZE (mode)
99@@ -6988,20 +7007,6 @@ thumb_legitimize_reload_address (rtx *x_
100
101 /* Test for various thread-local symbols. */
102
103-/* Return TRUE if X is a thread-local symbol. */
104-
105-static bool
106-arm_tls_symbol_p (rtx x)
107-{
108- if (! TARGET_HAVE_TLS)
109- return false;
110-
111- if (GET_CODE (x) != SYMBOL_REF)
112- return false;
113-
114- return SYMBOL_REF_TLS_MODEL (x) != 0;
115-}
116-
117 /* Helper for arm_tls_referenced_p. */
118
119 static int
120Index: gcc-4.8.2/gcc/testsuite/ChangeLog
121===================================================================
122--- gcc-4.8.2.orig/gcc/testsuite/ChangeLog
123+++ gcc-4.8.2/gcc/testsuite/ChangeLog
124@@ -1,3 +1,8 @@
125+2014-03-06 Jakub Jelinek <jakub@redhat.com>
126+
127+ PR target/58595
128+ * gcc.dg/tls/pr58595.c: New test.
129+
130 2013-10-16 Release Manager
131
132 * GCC 4.8.2 released.