summaryrefslogtreecommitdiff
path: root/debian/patches/svn-updates-linaro.diff
blob: 47d1fd905df5bbe5b2effcc8b7382d5e447d7642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# DP: updates from the 4.7 branch upto 20130614 (r200084).

last_updated()
{
	cat > ${dir}LAST_UPDATED <<EOF
Fri Jun 14 09:56:44 CEST 2013
Fri Jun 14 07:56:44 UTC 2013 (revision 200084)
EOF
}

LANG=C svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@199594 svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch \
	| sed -r 's,^--- (\S+)\t(\S+)(.*)$,--- a/src/\1\t\2,;s,^\+\+\+ (\S+)\t(\S+)(.*)$,+++ b/src/\1\t\2,' \
	| awk '/^Index:.*\.(class|texi)/ {skip=1; next} /^Index:/ { skip=0 } skip==0'

Index: libgcc/config.host
===================================================================
--- a/src/libgcc/config.host	(revision
+++ b/src/libgcc/config.host	(revision
@@ -315,7 +315,7 @@
 	md_unwind_header=alpha/vms-unwind.h
 	;;
 arm-wrs-vxworks)
-	tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-fdpbit"
+	tmake_file="$tmake_file arm/t-arm arm/t-vxworks t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
 	extra_parts="$extra_parts crti.o crtn.o"
 	;;
 arm*-*-freebsd*)
Index: libgcc/ChangeLog
===================================================================
--- a/src/libgcc/ChangeLog	(revision
+++ b/src/libgcc/ChangeLog	(revision
@@ -1,3 +1,16 @@
+2013-06-08  Walter Lee  <walt@tilera.com>
+
+	Backport from mainline:
+	2013-06-08  Walter Lee  <walt@tilera.com>
+	
+	* config/tilepro/atomic.h: Don't include stdint.h or features.h.
+	Replace int64_t with long long.  Add __extension__ where
+	appropriate.
+
+2013-06-06  Douglas B Rupp  <rupp@adacore.com>
+
+	* config.host (arm-wrs-vxworks): Configure with other soft float.
+
 2013-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
 
 	Backport from mainline:
Index: libgcc/config/tilepro/atomic.h
===================================================================
--- a/src/libgcc/config/tilepro/atomic.h	(revision
+++ b/src/libgcc/config/tilepro/atomic.h	(revision
@@ -1,6 +1,5 @@
 /* Macros for atomic functionality for tile.
-   Copyright (C) 2011, 2012
-   Free Software Foundation, Inc.
+   Copyright (C) 2011-2013 Free Software Foundation, Inc.
    Contributed by Walter Lee (walt@tilera.com)
 
    This file is free software; you can redistribute it and/or modify it
@@ -93,8 +92,6 @@
    compare-and-exchange routine, so may be potentially less efficient.  */
 #endif
 
-#include <stdint.h>
-#include <features.h>
 #ifdef __tilegx__
 #include <arch/spr_def.h>
 #else
@@ -123,9 +120,9 @@
 
 /* 64-bit integer compare-and-exchange.  */
 static __inline __attribute__ ((always_inline))
-     int64_t arch_atomic_val_compare_and_exchange_8 (volatile int64_t * mem,
-						     int64_t oldval,
-						     int64_t newval)
+     long long arch_atomic_val_compare_and_exchange_8 (volatile long long
+						       *mem, long long oldval,
+						       long long newval)
 {
 #ifdef __tilegx__
   __insn_mtspr (SPR_CMPEXCH_VALUE, oldval);
@@ -140,7 +137,7 @@
 			"R04" (newval_lo), "R05" (newval_hi),
 			"m" (*mem):"r20", "r21", "r22", "r23", "r24", "r25",
 			"r26", "r27", "r28", "r29", "memory");
-  return ((uint64_t) result_hi) << 32 | result_lo;
+  return ((long long) result_hi) << 32 | result_lo;
 #endif
 }
 
@@ -151,11 +148,11 @@
 
 
 #define arch_atomic_val_compare_and_exchange(mem, o, n)                 \
-  ({                                                                    \
+  __extension__ ({                                                      \
     (__typeof(*(mem)))(__typeof(*(mem)-*(mem)))                         \
       ((sizeof(*(mem)) == 8) ?                                          \
        arch_atomic_val_compare_and_exchange_8(                          \
-         (volatile int64_t*)(mem), (__typeof((o)-(o)))(o),              \
+         (volatile long long*)(mem), (__typeof((o)-(o)))(o),            \
          (__typeof((n)-(n)))(n)) :                                      \
        (sizeof(*(mem)) == 4) ?                                          \
        arch_atomic_val_compare_and_exchange_4(                          \
@@ -165,7 +162,7 @@
   })
 
 #define arch_atomic_bool_compare_and_exchange(mem, o, n)                \
-  ({                                                                    \
+  __extension__ ({                                                      \
     __typeof(o) __o = (o);                                              \
     __builtin_expect(                                                   \
       __o == arch_atomic_val_compare_and_exchange((mem), __o, (n)), 1); \
@@ -175,7 +172,7 @@
 /* Loop with compare_and_exchange until we guess the correct value.
    Normally "expr" will be an expression using __old and __value.  */
 #define __arch_atomic_update_cmpxchg(mem, value, expr)                  \
-  ({                                                                    \
+  __extension__ ({                                                      \
     __typeof(value) __value = (value);                                  \
     __typeof(*(mem)) *__mem = (mem), __old = *__mem, __guess;           \
     do {                                                                \
@@ -190,12 +187,14 @@
 /* Generic atomic op with 8- or 4-byte variant.
    The _mask, _addend, and _expr arguments are ignored on tilegx.  */
 #define __arch_atomic_update(mem, value, op, _mask, _addend, _expr)     \
-  ({                                                                    \
+  __extension__ ({                                                      \
     ((__typeof(*(mem)))                                                 \
      ((sizeof(*(mem)) == 8) ? (__typeof(*(mem)-*(mem)))__insn_##op(     \
-        (void *)(mem), (int64_t)(__typeof((value)-(value)))(value)) :   \
+        (volatile void *)(mem),                                         \
+        (long long)(__typeof((value)-(value)))(value)) :                \
       (sizeof(*(mem)) == 4) ? (int)__insn_##op##4(                      \
-        (void *)(mem), (int32_t)(__typeof((value)-(value)))(value)) :   \
+        (volatile void *)(mem),                                         \
+        (int)(__typeof((value)-(value)))(value)) :                      \
       __arch_atomic_error_bad_argument_size()));                        \
   })
 
@@ -225,7 +224,7 @@
 /* Generic atomic op with 8- or 4-byte variant.
    The _op argument is ignored on tilepro.  */
 #define __arch_atomic_update(mem, value, _op, mask, addend, expr)       \
-  ({                                                                    \
+  __extension__ ({                                                      \
     (__typeof(*(mem)))(__typeof(*(mem)-*(mem)))                         \
       ((sizeof(*(mem)) == 8) ?                                          \
        __arch_atomic_update_cmpxchg((mem), (value), (expr)) :           \
@@ -264,13 +263,13 @@
   __arch_atomic_update_cmpxchg(mem, mask, ~(__old & __value))
 
 #define arch_atomic_bit_set(mem, bit)                                   \
-  ({                                                                    \
+  __extension__ ({                                                      \
     __typeof(*(mem)) __mask = (__typeof(*(mem)))1 << (bit);             \
     __mask & arch_atomic_or((mem), __mask);                             \
   })
 
 #define arch_atomic_bit_clear(mem, bit)                                 \
-  ({                                                                    \
+  __extension__ ({                                                      \
     __typeof(*(mem)) __mask = (__typeof(*(mem)))1 << (bit);             \
     __mask & arch_atomic_and((mem), ~__mask);                           \
   })
Index: gcc/DATESTAMP
===================================================================
--- a/src/gcc/DATESTAMP	(revision
+++ b/src/gcc/DATESTAMP	(revision
@@ -1 +1 @@
-20130603
+20130614
Index: gcc/ChangeLog
===================================================================
--- a/src/gcc/ChangeLog	(revision
+++ b/src/gcc/ChangeLog	(revision
@@ -1,3 +1,31 @@
+2013-06-07  Uros Bizjak  <ubizjak@gmail.com>
+
+	Backport from mainline
+	2013-06-10  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/alpha/alpha.c (alpha_emit_xfloating_compare): Also use
+	cmp_code to construct REG_EQUAL note.
+
+	Backport from mainline
+	2013-06-05  Uros Bizjak  <ubizjak@gmail.com>
+
+	* config/alpha/alpha.c (alpha_emit_conditional_move): Swap all
+	GE, GT, GEU and GTU compares, modulo DImode compares with zero.
+
+	Backport from mainline
+	2013-05-23  Uros Bizjak  <ubizjak@gmail.com>
+
+	PR target/57379
+	* config/alpha/alpha.md (unspec): Add UNSPEC_XFLT_COMPARE.
+	* config/alpha/alpha.c (alpha_emit_xfloating_compare): Construct
+	REG_EQUAL note as UNSPEC_XFLT_COMPARE unspec.
+
+2013-06-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/57568
+	* config/i386/i386.md (TARGET_READ_MODIFY_WRITE peepholes): Ensure
+	that operands[2] doesn't overlap with operands[0].
+
 2013-05-22  Uros Bizjak  <ubizjak@gmail.com>
 
 	PR target/57356
Index: gcc/testsuite/gfortran.dg/do_5.f90
===================================================================
--- a/src/gcc/testsuite/gfortran.dg/do_5.f90	(revision
+++ b/src/gcc/testsuite/gfortran.dg/do_5.f90	(revision
@@ -0,0 +1,29 @@
+! { dg-do compile }
+!
+! PR fortran/54370
+!
+! The following program was ICEing at tree-check time
+! "L()" was regarded as default-kind logical.
+!
+! Contributed by Kirill Chilikin
+!
+      MODULE M
+      CONTAINS
+
+      LOGICAL(C_BOOL) FUNCTION L() BIND(C)
+      USE, INTRINSIC :: ISO_C_BINDING
+      L = .FALSE.
+      END FUNCTION
+
+      LOGICAL(8) FUNCTION L2() BIND(C) ! { dg-warning "may not be a C interoperable kind but it is bind" }
+      L2 = .FALSE._8
+      END FUNCTION
+
+      SUBROUTINE S()
+      DO WHILE (L())
+      ENDDO
+      DO WHILE (L2())
+      ENDDO
+      END
+
+      END
Index: gcc/testsuite/gcc.c-torture/execute/pr57568.c
===================================================================
--- a/src/gcc/testsuite/gcc.c-torture/execute/pr57568.c	(revision
+++ b/src/gcc/testsuite/gcc.c-torture/execute/pr57568.c	(revision
@@ -0,0 +1,12 @@
+/* PR target/57568 */
+
+extern void abort (void);
+int a[6][9] = { }, b = 1, *c = &a[3][5];
+
+int
+main ()
+{
+  if (b && (*c = *c + *c))
+    abort ();
+  return 0;
+}
Index: gcc/testsuite/ChangeLog
===================================================================
--- a/src/gcc/testsuite/ChangeLog	(revision
+++ b/src/gcc/testsuite/ChangeLog	(revision
@@ -1,3 +1,16 @@
+2013-06-09  Jakub Jelinek  <jakub@redhat.com>
+
+	PR target/57568
+	* gcc.c-torture/execute/pr57568.c: New test.
+
+2013-06-06  Tobias Burnus  <burnus@net-b.de>
+
+	Backport from mainline
+	2012-08-27  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/54370
+	* gfortran.dg/do_5.f90: New.
+
 2013-06-01  Janus Weil  <janus@gcc.gnu.org>
 	    Tobias Burnus  <burnus@net-b.de>
 
Index: gcc/fortran/ChangeLog
===================================================================
--- a/src/gcc/fortran/ChangeLog	(revision
+++ b/src/gcc/fortran/ChangeLog	(revision
@@ -1,3 +1,12 @@
+2013-06-06  Tobias Burnus  <burnus@net-b.de>
+
+	Backport from mainline
+	2012-08-27  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/54370
+	* trans-stmt.c (gfc_trans_do_while): Don't change the logical
+	kind for negation of the condition.
+
 2013-06-01  Janus Weil  <janus@gcc.gnu.org>
 	    Tobias Burnus  <burnus@net-b.de>
 
Index: gcc/fortran/trans-stmt.c
===================================================================
--- a/src/gcc/fortran/trans-stmt.c	(revision
+++ b/src/gcc/fortran/trans-stmt.c	(revision
@@ -1743,7 +1743,7 @@
   gfc_conv_expr_val (&cond, code->expr1);
   gfc_add_block_to_block (&block, &cond.pre);
   cond.expr = fold_build1_loc (code->expr1->where.lb->location,
-			       TRUTH_NOT_EXPR, boolean_type_node, cond.expr);
+			       TRUTH_NOT_EXPR, TREE_TYPE (cond.expr), cond.expr);
 
   /* Build "IF (! cond) GOTO exit_label".  */
   tmp = build1_v (GOTO_EXPR, exit_label);
Index: gcc/config/alpha/alpha.md
===================================================================
--- a/src/gcc/config/alpha/alpha.md	(revision
+++ b/src/gcc/config/alpha/alpha.md	(revision
@@ -25,6 +25,7 @@
 ;; Uses of UNSPEC in this file:
 
 (define_c_enum "unspec" [
+  UNSPEC_XFLT_COMPARE
   UNSPEC_ARG_HOME
   UNSPEC_LDGP1
   UNSPEC_INSXH
Index: gcc/config/alpha/alpha.c
===================================================================
--- a/src/gcc/config/alpha/alpha.c	(revision
+++ b/src/gcc/config/alpha/alpha.c	(revision
@@ -2658,12 +2658,12 @@
       break;
 
     case GE:  case GT:  case GEU:  case GTU:
-      /* These must be swapped.  */
-      if (op1 != CONST0_RTX (cmp_mode))
-	{
-	  code = swap_condition (code);
-	  tem = op0, op0 = op1, op1 = tem;
-	}
+      /* These normally need swapping, but for integer zero we have
+	 special patterns that recognize swapped operands.  */
+      if (cmp_mode == DImode && op1 == const0_rtx)
+	break;
+      code = swap_condition (code);
+      tem = op0, op0 = op1, op1 = tem;
       break;
 
     default:
@@ -3025,12 +3025,9 @@
   operands[1] = op1;
   out = gen_reg_rtx (DImode);
 
-  /* What's actually returned is -1,0,1, not a proper boolean value,
-     so use an EXPR_LIST as with a generic libcall instead of a 
-     comparison type expression.  */
-  note = gen_rtx_EXPR_LIST (VOIDmode, op1, NULL_RTX);
-  note = gen_rtx_EXPR_LIST (VOIDmode, op0, note);
-  note = gen_rtx_EXPR_LIST (VOIDmode, func, note);
+  /* What's actually returned is -1,0,1, not a proper boolean value.  */
+  note = gen_rtx_fmt_ee (cmp_code, VOIDmode, op0, op1);
+  note = gen_rtx_UNSPEC (DImode, gen_rtvec (1, note), UNSPEC_XFLT_COMPARE);
   alpha_emit_xfloating_libcall (func, out, operands, 2, note);
 
   return out;
Index: gcc/config/i386/i386.md
===================================================================
--- a/src/gcc/config/i386/i386.md	(revision
+++ b/src/gcc/config/i386/i386.md	(revision
@@ -17194,6 +17194,7 @@
   "(TARGET_READ_MODIFY_WRITE || optimize_insn_for_size_p ())
    && peep2_reg_dead_p (4, operands[0])
    && !reg_overlap_mentioned_p (operands[0], operands[1])
+   && !reg_overlap_mentioned_p (operands[0], operands[2])
    && (<MODE>mode != QImode
        || immediate_operand (operands[2], QImode)
        || q_regs_operand (operands[2], QImode))
@@ -17258,6 +17259,7 @@
        || immediate_operand (operands[2], SImode)
        || q_regs_operand (operands[2], SImode))
    && !reg_overlap_mentioned_p (operands[0], operands[1])
+   && !reg_overlap_mentioned_p (operands[0], operands[2])
    && ix86_match_ccmode (peep2_next_insn (3),
 			 (GET_CODE (operands[3]) == PLUS
 			  || GET_CODE (operands[3]) == MINUS)