summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99338.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2010-11-02 22:03:58 +0100
committerKoen Kooi <koen@dominion.thruhere.net>2010-11-02 22:12:02 +0100
commitbe10a6b1321f250b1034c7d9d0a8ef18b296eef1 (patch)
tree9249025cbfbfbee4cc430d62b27f75301dd4dfde /recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99338.patch
parent93b28937ac67ba46d65f55637e42552e224aa7e2 (diff)
downloadmeta-openembedded-be10a6b1321f250b1034c7d9d0a8ef18b296eef1.tar.gz
angstrom-layers: meta-openembedded: replace poky gcc 4.5 sources with OE ones
This needs further investigation, but for now we can get the tested sources into the poky gcc harness Signed-off-by: Koen Kooi <k-kooi@ti.com>
Diffstat (limited to 'recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99338.patch')
-rw-r--r--recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99338.patch111
1 files changed, 111 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99338.patch b/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99338.patch
new file mode 100644
index 0000000000..632e80caf7
--- /dev/null
+++ b/recipes-devtools/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99338.patch
@@ -0,0 +1,111 @@
1 2009-06-23 Kazu Hirata <kazu@codesourcery.com>
2
3 Issue #4613
4 gcc/
5 * config/arm/arm.c (arm_rtx_costs_1): Teach that the cost of MLS
6 is the same as its underlying multiplication.
7 * config/arm/arm.md (two splitters): New.
8 * config/arm/predicates.md (binary_operator): New.
9
102010-07-26 Julian Brown <julian@codesourcery.com>
11
12 Merge from Sourcery G++ 4.4:
13
14 2008-09-08 Daniel Jacobowitz <dan@codesourcery.com>
15
16 gcc/
17
18=== modified file 'gcc/config/arm/arm.c'
19--- old/gcc/config/arm/arm.c 2010-08-12 11:33:54 +0000
20+++ new/gcc/config/arm/arm.c 2010-08-12 13:35:39 +0000
21@@ -6604,6 +6604,19 @@
22 return true;
23 }
24
25+ /* MLS is just as expensive as its underlying multiplication.
26+ Exclude a shift by a constant, which is expressed as a
27+ multiplication. */
28+ if (TARGET_32BIT && arm_arch_thumb2
29+ && GET_CODE (XEXP (x, 1)) == MULT
30+ && ! (GET_CODE (XEXP (XEXP (x, 1), 1)) == CONST_INT
31+ && ((INTVAL (XEXP (XEXP (x, 1), 1)) &
32+ (INTVAL (XEXP (XEXP (x, 1), 1)) - 1)) == 0)))
33+ {
34+ /* The cost comes from the cost of the multiply. */
35+ return false;
36+ }
37+
38 /* Fall through */
39
40 case PLUS:
41
42=== modified file 'gcc/config/arm/arm.md'
43--- old/gcc/config/arm/arm.md 2010-08-12 11:33:54 +0000
44+++ new/gcc/config/arm/arm.md 2010-08-12 13:35:39 +0000
45@@ -1355,6 +1355,49 @@
46 (set_attr "predicable" "yes")]
47 )
48
49+; The combiner cannot combine the first and last insns in the
50+; following sequence because of the intervening insn, so help the
51+; combiner with this splitter. The combiner does attempt to split
52+; this particular combination but does not know this exact split.
53+; Note that the combiner puts the constant at the outermost operation
54+; as a part of canonicalization.
55+;
56+; mul r3, r2, r1
57+; <add/sub> r3, r3, <constant>
58+; add r3, r3, r4
59+
60+(define_split
61+ [(set (match_operand:SI 0 "s_register_operand" "")
62+ (match_operator:SI 1 "plusminus_operator"
63+ [(plus:SI (mult:SI (match_operand:SI 2 "s_register_operand" "")
64+ (match_operand:SI 3 "s_register_operand" ""))
65+ (match_operand:SI 4 "s_register_operand" ""))
66+ (match_operand:SI 5 "arm_immediate_operand" "")]))]
67+ "TARGET_32BIT"
68+ [(set (match_dup 0)
69+ (plus:SI (mult:SI (match_dup 2) (match_dup 3))
70+ (match_dup 4)))
71+ (set (match_dup 0)
72+ (match_op_dup:SI 1 [(match_dup 0) (match_dup 5)]))]
73+ "")
74+
75+; Likewise for MLS. MLS is available only on select architectures.
76+
77+(define_split
78+ [(set (match_operand:SI 0 "s_register_operand" "")
79+ (match_operator:SI 1 "plusminus_operator"
80+ [(minus:SI (match_operand:SI 2 "s_register_operand" "")
81+ (mult:SI (match_operand:SI 3 "s_register_operand" "")
82+ (match_operand:SI 4 "s_register_operand" "")))
83+ (match_operand:SI 5 "arm_immediate_operand" "")]))]
84+ "TARGET_32BIT && arm_arch_thumb2"
85+ [(set (match_dup 0)
86+ (minus:SI (match_dup 2)
87+ (mult:SI (match_dup 3) (match_dup 4))))
88+ (set (match_dup 0)
89+ (match_op_dup:SI 1 [(match_dup 0) (match_dup 5)]))]
90+ "")
91+
92 (define_insn "*mulsi3addsi_compare0"
93 [(set (reg:CC_NOOV CC_REGNUM)
94 (compare:CC_NOOV
95
96=== modified file 'gcc/config/arm/predicates.md'
97--- old/gcc/config/arm/predicates.md 2010-08-10 13:31:21 +0000
98+++ new/gcc/config/arm/predicates.md 2010-08-12 13:35:39 +0000
99@@ -197,6 +197,11 @@
100 (and (match_code "plus,minus,ior,xor,and")
101 (match_test "mode == GET_MODE (op)")))
102
103+;; True for plus/minus operators
104+(define_special_predicate "plusminus_operator"
105+ (and (match_code "plus,minus")
106+ (match_test "mode == GET_MODE (op)")))
107+
108 ;; True for logical binary operators.
109 (define_special_predicate "logical_binary_operator"
110 (and (match_code "ior,xor,and")
111