~ubuntu-branches/ubuntu/saucy/gcc-4.7/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/patches/pr54974-linaro.diff

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-06-14 11:58:35 UTC
  • mfrom: (15.1.29 sid)
  • Revision ID: package-import@ubuntu.com-20130614115835-d9d3jr4ksr1ambgu
Tags: 4.7.3-5ubuntu1
* Merge with Debian; remaining changes:
  - Build from upstream source.
* Really build from the Linaro 4.7-2013.06 release (the tarball
  released as 4.7-2013.06 really is 4.7-2013.05).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# DP: Fix PR target/54974: Thumb literal pools don't handle PC rounding.
2
 
 
3
 
Index: b/src/gcc/config/arm/arm.md
4
 
===================================================================
5
 
--- a/src/gcc/config/arm/arm.md 2013-04-11 12:24:07.178055676 +0000
6
 
+++ b/src/gcc/config/arm/arm.md 2013-04-11 12:24:07.142055507 +0000
7
 
@@ -5058,7 +5058,7 @@
8
 
                                        (const_int 2) (const_int 4))
9
 
                          (const_int 4)])
10
 
    (set_attr "type" "simple_alu_shift,load_byte")
11
 
-   (set_attr "pool_range" "*,1020")]
12
 
+   (set_attr "pool_range" "*,1018")]
13
 
 )
14
 
 
15
 
 ;; This pattern will only be used when ldsh is not available
16
 
@@ -5464,7 +5464,7 @@
17
 
    (set_attr "type" "*,*,*,load2,store2")
18
 
    (set_attr "arm_pool_range" "*,*,*,1020,*")
19
 
    (set_attr "arm_neg_pool_range" "*,*,*,1004,*")
20
 
-   (set_attr "thumb2_pool_range" "*,*,*,4096,*")
21
 
+   (set_attr "thumb2_pool_range" "*,*,*,4094,*")
22
 
    (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")]
23
 
 )
24
 
 
25
 
@@ -5604,7 +5604,7 @@
26
 
   [(set_attr "length" "4,4,6,2,2,6,4,4")
27
 
    (set_attr "type" "*,*,*,load2,store2,load2,store2,*")
28
 
    (set_attr "insn" "*,mov,*,*,*,*,*,mov")
29
 
-   (set_attr "pool_range" "*,*,*,*,*,1020,*,*")]
30
 
+   (set_attr "pool_range" "*,*,*,*,*,1018,*,*")]
31
 
 )
32
 
 
33
 
 (define_expand "movsi"
34
 
@@ -5764,7 +5764,7 @@
35
 
    mov\\t%0, %1"
36
 
   [(set_attr "length" "2,2,4,4,2,2,2,2,2")
37
 
    (set_attr "type" "*,*,*,*,load1,store1,load1,store1,*")
38
 
-   (set_attr "pool_range" "*,*,*,*,*,*,1020,*,*")
39
 
+   (set_attr "pool_range" "*,*,*,*,*,*,1018,*,*")
40
 
    (set_attr "conds" "set,clob,*,*,nocond,nocond,nocond,nocond,nocond")])
41
 
 
42
 
 (define_split 
43
 
@@ -5857,7 +5857,7 @@
44
 
                                         (match_dup 2)] UNSPEC_PIC_BASE))]
45
 
  "operands[3] = TARGET_THUMB ? GEN_INT (4) : GEN_INT (8);"
46
 
  [(set_attr "type" "load1,load1,load1")
47
 
-  (set_attr "pool_range" "4096,4096,1024")
48
 
+  (set_attr "pool_range" "4096,4094,1022")
49
 
   (set_attr "neg_pool_range" "4084,0,0")
50
 
   (set_attr "arch"  "a,t2,t1")    
51
 
   (set_attr "length" "8,6,4")]
52
 
@@ -5873,7 +5873,10 @@
53
 
   "TARGET_32BIT && flag_pic"
54
 
   "ldr%?\\t%0, %1"
55
 
   [(set_attr "type" "load1")
56
 
-   (set_attr "pool_range" "4096")
57
 
+   (set (attr "pool_range")
58
 
+       (if_then_else (eq_attr "is_thumb" "no")
59
 
+                     (const_int 4096)
60
 
+                     (const_int 4094)))
61
 
    (set (attr "neg_pool_range")
62
 
        (if_then_else (eq_attr "is_thumb" "no")
63
 
                      (const_int 4084)
64
 
@@ -5886,7 +5889,7 @@
65
 
   "TARGET_THUMB1 && flag_pic"
66
 
   "ldr\\t%0, %1"
67
 
   [(set_attr "type" "load1")
68
 
-   (set (attr "pool_range") (const_int 1024))]
69
 
+   (set (attr "pool_range") (const_int 1018))]
70
 
 )
71
 
 
72
 
 (define_insn "pic_add_dot_plus_four"
73
 
@@ -6691,7 +6694,7 @@
74
 
   [(set_attr "length" "2")
75
 
    (set_attr "type" "*,load1,store1,*,*")
76
 
    (set_attr "insn" "mov,*,*,mov,mov")
77
 
-   (set_attr "pool_range" "*,1020,*,*,*")
78
 
+   (set_attr "pool_range" "*,1018,*,*,*")
79
 
    (set_attr "conds" "clob,nocond,nocond,nocond,nocond")])
80
 
 
81
 
 (define_expand "movsf"
82
 
@@ -6746,7 +6749,8 @@
83
 
   [(set_attr "predicable" "yes")
84
 
    (set_attr "type" "*,load1,store1")
85
 
    (set_attr "insn" "mov,*,*")
86
 
-   (set_attr "pool_range" "*,4096,*")
87
 
+   (set_attr "arm_pool_range" "*,4096,*")
88
 
+   (set_attr "thumb2_pool_range" "*,4094,*")
89
 
    (set_attr "arm_neg_pool_range" "*,4084,*")
90
 
    (set_attr "thumb2_neg_pool_range" "*,0,*")]
91
 
 )
92
 
@@ -6768,7 +6772,7 @@
93
 
    mov\\t%0, %1"
94
 
   [(set_attr "length" "2")
95
 
    (set_attr "type" "*,load1,store1,load1,store1,*,*")
96
 
-   (set_attr "pool_range" "*,*,*,1020,*,*,*")
97
 
+   (set_attr "pool_range" "*,*,*,1018,*,*,*")
98
 
    (set_attr "insn" "*,*,*,*,*,mov,mov")
99
 
    (set_attr "conds" "clob,nocond,nocond,nocond,nocond,nocond,nocond")]
100
 
 )
101
 
@@ -6857,7 +6861,8 @@
102
 
   "
103
 
   [(set_attr "length" "8,12,16,8,8")
104
 
    (set_attr "type" "*,*,*,load2,store2")
105
 
-   (set_attr "pool_range" "*,*,*,1020,*")
106
 
+   (set_attr "arm_pool_range" "*,*,*,1020,*")
107
 
+   (set_attr "thumb2_pool_range" "*,*,*,1018,*")
108
 
    (set_attr "arm_neg_pool_range" "*,*,*,1004,*")
109
 
    (set_attr "thumb2_neg_pool_range" "*,*,*,0,*")]
110
 
 )
111
 
@@ -6900,7 +6905,7 @@
112
 
   [(set_attr "length" "4,2,2,6,4,4")
113
 
    (set_attr "type" "*,load2,store2,load2,store2,*")
114
 
    (set_attr "insn" "*,*,*,*,*,mov")
115
 
-   (set_attr "pool_range" "*,*,*,1020,*,*")]
116
 
+   (set_attr "pool_range" "*,*,*,1018,*,*")]
117
 
 )
118
 
 
119
 
 (define_expand "movxf"
120
 
Index: b/src/gcc/config/arm/neon.md
121
 
===================================================================
122
 
--- a/src/gcc/config/arm/neon.md        2013-04-11 12:24:07.178055676 +0000
123
 
+++ b/src/gcc/config/arm/neon.md        2013-04-11 12:24:07.174055671 +0000
124
 
@@ -197,7 +197,8 @@
125
 
   (set_attr "type" "*,f_stored,*,f_loadd,*,*,alu_reg,load2,store2")
126
 
   (set_attr "insn" "*,*,*,*,*,*,mov,*,*")
127
 
   (set_attr "length" "4,4,4,4,4,4,8,8,8")
128
 
-  (set_attr "pool_range"     "*,*,*,1020,*,*,*,1020,*")
129
 
+  (set_attr "arm_pool_range"     "*,*,*,1020,*,*,*,1020,*")
130
 
+  (set_attr "thumb2_pool_range"     "*,*,*,1018,*,*,*,1018,*")
131
 
   (set_attr "neg_pool_range" "*,*,*,1004,*,*,*,1004,*")])
132
 
 
133
 
 (define_insn "*neon_mov<mode>"
134
 
@@ -242,7 +243,8 @@
135
 
    (set_attr "type" "*,*,*,*,*,*,alu_reg,load4,store4")
136
 
    (set_attr "insn" "*,*,*,*,*,*,mov,*,*")
137
 
    (set_attr "length" "4,8,4,8,8,8,16,8,16")
138
 
-   (set_attr "pool_range" "*,*,*,1020,*,*,*,1020,*")
139
 
+   (set_attr "arm_pool_range" "*,*,*,1020,*,*,*,1020,*")
140
 
+   (set_attr "thumb2_pool_range" "*,*,*,1018,*,*,*,1018,*")
141
 
    (set_attr "neg_pool_range" "*,*,*,996,*,*,*,996,*")])
142
 
 
143
 
 (define_expand "movti"
144
 
Index: b/src/gcc/config/arm/thumb2.md
145
 
===================================================================
146
 
--- a/src/gcc/config/arm/thumb2.md      2013-04-11 12:24:07.178055676 +0000
147
 
+++ b/src/gcc/config/arm/thumb2.md      2013-04-11 12:24:07.174055671 +0000
148
 
@@ -184,7 +184,7 @@
149
 
    str%?\\t%1, %0"
150
 
   [(set_attr "type" "*,*,simple_alu_imm,*,load1,load1,store1,store1")
151
 
    (set_attr "predicable" "yes")
152
 
-   (set_attr "pool_range" "*,*,*,*,1020,4096,*,*")
153
 
+   (set_attr "pool_range" "*,*,*,*,1018,4094,*,*")
154
 
    (set_attr "neg_pool_range" "*,*,*,*,0,0,*,*")]
155
 
 )
156
 
 
157
 
@@ -219,7 +219,7 @@
158
 
    ldr%(h%)\\t%0, %1\\t%@ movhi"
159
 
   [(set_attr "type" "*,*,store1,load1")
160
 
    (set_attr "predicable" "yes")
161
 
-   (set_attr "pool_range" "*,*,*,4096")
162
 
+   (set_attr "pool_range" "*,*,*,4094")
163
 
    (set_attr "neg_pool_range" "*,*,*,250")]
164
 
 )
165
 
 
166
 
@@ -572,7 +572,7 @@
167
 
    ldr%(sb%)\\t%0, %1"
168
 
   [(set_attr "type" "simple_alu_shift,load_byte")
169
 
    (set_attr "predicable" "yes")
170
 
-   (set_attr "pool_range" "*,4096")
171
 
+   (set_attr "pool_range" "*,4094")
172
 
    (set_attr "neg_pool_range" "*,250")]
173
 
 )
174
 
 
175
 
@@ -585,7 +585,7 @@
176
 
    ldr%(h%)\\t%0, %1"
177
 
   [(set_attr "type" "simple_alu_shift,load_byte")
178
 
    (set_attr "predicable" "yes")
179
 
-   (set_attr "pool_range" "*,4096")
180
 
+   (set_attr "pool_range" "*,4094")
181
 
    (set_attr "neg_pool_range" "*,250")]
182
 
 )
183
 
 
184
 
@@ -598,7 +598,7 @@
185
 
    ldr%(b%)\\t%0, %1\\t%@ zero_extendqisi2"
186
 
   [(set_attr "type" "simple_alu_shift,load_byte")
187
 
    (set_attr "predicable" "yes")
188
 
-   (set_attr "pool_range" "*,4096")
189
 
+   (set_attr "pool_range" "*,4094")
190
 
    (set_attr "neg_pool_range" "*,250")]
191
 
 )
192
 
 
193
 
Index: b/src/gcc/config/arm/vfp.md
194
 
===================================================================
195
 
--- a/src/gcc/config/arm/vfp.md 2013-04-11 12:24:07.178055676 +0000
196
 
+++ b/src/gcc/config/arm/vfp.md 2013-04-11 12:24:07.174055671 +0000
197
 
@@ -130,7 +130,7 @@
198
 
    (set_attr "type" "*,*,*,*,load1,load1,store1,store1,r_2_f,f_2_r,fcpys,f_loads,f_stores")
199
 
    (set_attr "neon_type" "*,*,*,*,*,*,*,*,neon_mcr,neon_mrc,neon_vmov,*,*")
200
 
    (set_attr "insn" "mov,mov,mvn,mov,*,*,*,*,*,*,*,*,*")
201
 
-   (set_attr "pool_range"     "*,*,*,*,1020,4096,*,*,*,*,*,1020,*")
202
 
+   (set_attr "pool_range"     "*,*,*,*,1018,4094,*,*,*,*,*,1018,*")
203
 
    (set_attr "neg_pool_range" "*,*,*,*,   0,   0,*,*,*,*,*,1008,*")]
204
 
 )
205
 
 
206
 
@@ -183,7 +183,8 @@
207
 
                                  (const_int 8)
208
 
                                  (const_int 4))]
209
 
                               (const_int 4)))
210
 
-   (set_attr "pool_range"     "*,*,*,*,1020,4096,*,*,*,*,1020,*")
211
 
+   (set_attr "arm_pool_range"     "*,*,*,*,1020,4096,*,*,*,*,1020,*")
212
 
+   (set_attr "thumb2_pool_range"     "*,*,*,*,1018,4094,*,*,*,*,1018,*")
213
 
    (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*")
214
 
    (set_attr "arch"           "t2,any,any,any,a,t2,any,any,any,any,any,any")]
215
 
 )
216
 
@@ -230,7 +231,8 @@
217
 
                                  * 4")]
218
 
                               (const_int 4)))
219
 
    (set_attr "predicable"    "yes")
220
 
-   (set_attr "pool_range"     "*,*,*,*,1020,4096,*,*,*,*,1020,*")
221
 
+   (set_attr "arm_pool_range"     "*,*,*,*,1018,4094,*,*,*,*,1018,*")
222
 
+   (set_attr "thumb2_pool_range"     "*,*,*,*,1018,4094,*,*,*,*,1018,*")
223
 
    (set_attr "neg_pool_range" "*,*,*,*,1004,0,*,*,*,*,1004,*")
224
 
    (set (attr "ce_count") 
225
 
        (symbol_ref "get_attr_length (insn) / 4"))
226
 
@@ -419,7 +421,7 @@
227
 
      "r_2_f,f_2_r,fconsts,f_loads,f_stores,load1,store1,fcpys,*")
228
 
    (set_attr "neon_type" "neon_mcr,neon_mrc,*,*,*,*,*,neon_vmov,*")
229
 
    (set_attr "insn" "*,*,*,*,*,*,*,*,mov")
230
 
-   (set_attr "pool_range" "*,*,*,1020,*,4092,*,*,*")
231
 
+   (set_attr "pool_range" "*,*,*,1018,*,4090,*,*,*")
232
 
    (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")]
233
 
 )
234
 
 
235
 
@@ -513,7 +515,7 @@
236
 
                                 (const_int 8)
237
 
                                 (const_int 4))]
238
 
                              (const_int 4)))
239
 
-   (set_attr "pool_range" "*,*,*,1020,*,4096,*,*,*")
240
 
+   (set_attr "pool_range" "*,*,*,1018,*,4094,*,*,*")
241
 
    (set_attr "neg_pool_range" "*,*,*,1008,*,0,*,*,*")]
242
 
 )
243