summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99479.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-03-17 21:41:22 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2011-03-17 21:41:22 +0100
commitc58cc7d3796dcee6e93885c835ed04cb566abeb2 (patch)
tree3eea4d4ef6a4ef79e0f4e025d7012c1a5cc38835 /meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99479.patch
parenteec6ab97f712e06eb52c9f7c99e19ffab3ce9d74 (diff)
downloadmeta-openembedded-c58cc7d3796dcee6e93885c835ed04cb566abeb2.tar.gz
move layer into meta-oe in preparation for future splits
As per TSC decision Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99479.patch')
-rw-r--r--meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99479.patch101
1 files changed, 101 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99479.patch b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99479.patch
new file mode 100644
index 000000000..2920466d8
--- /dev/null
+++ b/meta-oe/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99479.patch
@@ -0,0 +1,101 @@
12011-02-24 Chung-Lin Tang <cltang@codesourcery.com>
2
3 Backport from FSF mainline:
4
5 2010-08-10 Bernd Schmidt <bernds@codesourcery.com>
6
7 PR bootstrap/45177
8 * config/arm/arm.c (multiple_operation_profitable_p): Move xscale
9 test here from arm_gen_load_multiple_1.
10 (arm_gen_load_multiple_1, arm_gen_store_multiple_1): Use
11 multiple_operation_profitable_p.
12
13=== modified file 'gcc/config/arm/arm.c'
14--- old/gcc/config/arm/arm.c 2011-02-22 11:38:56 +0000
15+++ new/gcc/config/arm/arm.c 2011-02-24 17:30:32 +0000
16@@ -9728,6 +9728,36 @@
17 if (nops == 2 && arm_ld_sched && add_offset != 0)
18 return false;
19
20+ /* XScale has load-store double instructions, but they have stricter
21+ alignment requirements than load-store multiple, so we cannot
22+ use them.
23+
24+ For XScale ldm requires 2 + NREGS cycles to complete and blocks
25+ the pipeline until completion.
26+
27+ NREGS CYCLES
28+ 1 3
29+ 2 4
30+ 3 5
31+ 4 6
32+
33+ An ldr instruction takes 1-3 cycles, but does not block the
34+ pipeline.
35+
36+ NREGS CYCLES
37+ 1 1-3
38+ 2 2-6
39+ 3 3-9
40+ 4 4-12
41+
42+ Best case ldr will always win. However, the more ldr instructions
43+ we issue, the less likely we are to be able to schedule them well.
44+ Using ldr instructions also increases code size.
45+
46+ As a compromise, we use ldr for counts of 1 or 2 regs, and ldm
47+ for counts of 3 or 4 regs. */
48+ if (nops <= 2 && arm_tune_xscale && !optimize_size)
49+ return false;
50 return true;
51 }
52
53@@ -10086,35 +10116,7 @@
54 int i = 0, j;
55 rtx result;
56
57- /* XScale has load-store double instructions, but they have stricter
58- alignment requirements than load-store multiple, so we cannot
59- use them.
60-
61- For XScale ldm requires 2 + NREGS cycles to complete and blocks
62- the pipeline until completion.
63-
64- NREGS CYCLES
65- 1 3
66- 2 4
67- 3 5
68- 4 6
69-
70- An ldr instruction takes 1-3 cycles, but does not block the
71- pipeline.
72-
73- NREGS CYCLES
74- 1 1-3
75- 2 2-6
76- 3 3-9
77- 4 4-12
78-
79- Best case ldr will always win. However, the more ldr instructions
80- we issue, the less likely we are to be able to schedule them well.
81- Using ldr instructions also increases code size.
82-
83- As a compromise, we use ldr for counts of 1 or 2 regs, and ldm
84- for counts of 3 or 4 regs. */
85- if (low_irq_latency || (arm_tune_xscale && count <= 2 && ! optimize_size))
86+ if (low_irq_latency || !multiple_operation_profitable_p (false, count, 0))
87 {
88 rtx seq;
89
90@@ -10166,9 +10168,7 @@
91 if (GET_CODE (basereg) == PLUS)
92 basereg = XEXP (basereg, 0);
93
94- /* See arm_gen_load_multiple_1 for discussion of
95- the pros/cons of ldm/stm usage for XScale. */
96- if (low_irq_latency || (arm_tune_xscale && count <= 2 && ! optimize_size))
97+ if (low_irq_latency || !multiple_operation_profitable_p (false, count, 0))
98 {
99 rtx seq;
100
101