Merge lp:~ams-codesourcery/gcc-linaro/merge-fsf-4.5-20110505 into lp:gcc-linaro/4.5

Proposed by Andrew Stubbs
Status: Merged
Approved by: Richard Sandiford
Approved revision: no longer in the source branch.
Merged at revision: 99508
Proposed branch: lp:~ams-codesourcery/gcc-linaro/merge-fsf-4.5-20110505
Merge into: lp:gcc-linaro/4.5
Diff against target: 1318 lines (+566/-162)
33 files modified
ChangeLog.linaro (+4/-0)
gcc/BASE-VER (+1/-1)
gcc/ChangeLog (+117/-0)
gcc/DATESTAMP (+1/-1)
gcc/DEV-PHASE (+1/-0)
gcc/c-typeck.c (+1/-1)
gcc/config/arm/arm.c (+1/-1)
gcc/config/arm/neon.md (+20/-17)
gcc/config/i386/i386.c (+15/-2)
gcc/config/i386/i386.md (+53/-28)
gcc/config/i386/mmx.md (+4/-2)
gcc/config/i386/sse.md (+7/-6)
gcc/config/pa/pa-protos.h (+0/-2)
gcc/config/pa/pa.md (+5/-10)
gcc/config/pa/predicates.md (+9/-5)
gcc/cp/ChangeLog (+6/-0)
gcc/cp/parser.c (+1/-1)
gcc/df-problems.c (+3/-7)
gcc/final.c (+5/-0)
gcc/fold-const.c (+0/-2)
gcc/ifcvt.c (+12/-15)
gcc/testsuite/ChangeLog (+50/-0)
gcc/testsuite/g++.dg/parse/ambig6.C (+12/-0)
gcc/testsuite/gcc.c-torture/compile/pr48742.c (+15/-0)
gcc/testsuite/gcc.c-torture/execute/pr48809.c (+60/-0)
gcc/testsuite/gcc.dg/pr48685.c (+11/-0)
gcc/testsuite/gcc.dg/pr48774.c (+38/-0)
gcc/testsuite/gcc.target/arm/pr48252.c (+31/-0)
gcc/testsuite/gcc.target/i386/pr48708.c (+15/-0)
gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c (+2/-2)
gcc/tree-switch-conversion.c (+17/-41)
libffi/ChangeLog (+10/-0)
libffi/src/alpha/osf.S (+39/-18)
To merge this branch: bzr merge lp:~ams-codesourcery/gcc-linaro/merge-fsf-4.5-20110505
Reviewer Review Type Date Requested Status
Richard Sandiford Approve
Review via email: mp+60071@code.launchpad.net

Description of the change

Merge from FSF GCC 4.5 branch.

To post a comment you must log in.
Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild has taken a snapshot of this branch at r99506 and queued it for build.

The snapshot is available at:
 http://ex.seabright.co.nz/snapshots/gcc-linaro-4.5+bzr99506~ams-codesourcery~merge-fsf-4.5-20110505.tar.xdelta3.xz

and will be built on the following builders:
 a9-builder i686 x86_64

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: gcc-linaro-4.5+bzr99506~ams-codesourcery~merge-fsf-4.5-20110505
cbuild-ancestor: lp:gcc-linaro+bzr99505
cbuild-state: check

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild successfully built this on i686-lucid-cbuild114-scorpius-i686r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99506~ams-codesourcery~merge-fsf-4.5-20110505/logs/i686-lucid-cbuild114-scorpius-i686r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99505:
 +PASS: gcc.c-torture/compile/pr48742.c -O0 (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O1 (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O2 -flto (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O2 -fwhopr (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O2 (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O3 -fomit-frame-pointer (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O3 -g (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -Os (test for excess errors)
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O0
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O1
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O2
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O2 -flto
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O2 -fwhopr
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O3 -fomit-frame-pointer
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O3 -g
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -Os
 +PASS: gcc.c-torture/execute/pr48809.c execution, -O0
 +PASS: gcc.c-torture/execute/pr48809.c execution, -O1
 +PASS: gcc.c-torture/execute/pr48809.c execution, -O2
 ...and 13 more

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99506~ams-codesourcery~merge-fsf-4.5-20110505/logs/i686-lucid-cbuild114-scorpius-i686r1/gcc-testsuite.txt

cbuild-checked: i686-lucid-cbuild114-scorpius-i686r1

Revision history for this message
Ramana Radhakrishnan (ramana) wrote :

Andrew - Could you check the 13 more ?

Ramana

Revision history for this message
Andrew Stubbs (ams-codesourcery) wrote :

> Andrew - Could you check the 13 more ?

They're all PASSes.

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

cbuild successfully built this on armv7l-maverick-cbuild114-ursa4-cortexa9r1.

The build results are available at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99506~ams-codesourcery~merge-fsf-4.5-20110505/logs/armv7l-maverick-cbuild114-ursa4-cortexa9r1

The test suite results changed compared to the branch point lp:gcc-linaro+bzr99505:
 +PASS: gcc.c-torture/compile/pr48742.c -O0 (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O1 (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O2 -flto (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O2 -fwhopr (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O2 (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O3 -fomit-frame-pointer (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -O3 -g (test for excess errors)
 +PASS: gcc.c-torture/compile/pr48742.c -Os (test for excess errors)
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O0
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O1
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O2
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O2 -flto
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O2 -fwhopr
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O3 -fomit-frame-pointer
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -O3 -g
 +PASS: gcc.c-torture/execute/pr48809.c compilation, -Os
 +PASS: gcc.c-torture/execute/pr48809.c execution, -O0
 +PASS: gcc.c-torture/execute/pr48809.c execution, -O1
 +PASS: gcc.c-torture/execute/pr48809.c execution, -O2
 ...and 14 more

The full testsuite results are at:
 http://ex.seabright.co.nz/build/gcc-linaro-4.5+bzr99506~ams-codesourcery~merge-fsf-4.5-20110505/logs/armv7l-maverick-cbuild114-ursa4-cortexa9r1/gcc-testsuite.txt

cbuild-checked: armv7l-maverick-cbuild114-ursa4-cortexa9r1

Revision history for this message
Richard Sandiford (rsandifo) wrote :

Not sure whether we're doing reviews for upstream merges,
but just in case: OK if you're happy with the elided results.

review: Approve
Revision history for this message
Andrew Stubbs (ams-codesourcery) wrote :

i686 and ARM test results are OK.

Still waiting for x86_64 .....

Revision history for this message
Andrew Stubbs (ams-codesourcery) wrote :

Ok, I'm bored of waiting, the x86_64 machine has been disrupted by UDS, and I want this merged before the very last minute. I'm going to merge it, and if there's a problem, I'll revert it later.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog.linaro'
2--- ChangeLog.linaro 2011-05-04 09:21:34 +0000
3+++ ChangeLog.linaro 2011-05-05 15:18:28 +0000
4@@ -1,3 +1,7 @@
5+2011-05-05 Andrew Stubbs <ams@codesourcery.com>
6+
7+ Merge from FSF 4.5 branch r173417 (pre 4.5.4).
8+
9 2011-04-28 Andrew Stubbs <ams@codesourcery.com>
10
11 Merge from FSF 4.5 branch r173113 (4.5.3 release).
12
13=== modified file 'gcc/BASE-VER'
14--- gcc/BASE-VER 2010-12-16 14:34:03 +0000
15+++ gcc/BASE-VER 2011-05-05 15:18:28 +0000
16@@ -1,1 +1,1 @@
17-4.5.3
18+4.5.4
19
20=== modified file 'gcc/ChangeLog'
21--- gcc/ChangeLog 2011-04-28 14:11:53 +0000
22+++ gcc/ChangeLog 2011-05-05 15:18:28 +0000
23@@ -1,3 +1,120 @@
24+2010-05-05 Ira Rosen <ira.rosen@linaro.org>
25+
26+ Backport from mainline:
27+ 2011-04-18 Ulrich Weigand <ulrich.weigand@linaro.org>
28+ Ira Rosen <ira.rosen@linaro.org>
29+
30+ PR target/48252
31+ * config/arm/arm.c (neon_emit_pair_result_insn): Swap arguments
32+ to match neon_vzip/vuzp/vtrn_internal.
33+ * config/arm/neon.md (neon_vtrn<mode>_internal): Make both
34+ outputs explicitly dependent on both inputs.
35+ (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Likewise.
36+
37+2011-05-04 Uros Bizjak <ubizjak@gmail.com>
38+
39+ Backport from mainline
40+ 2011-04-21 Uros Bizjak <ubizjak@gmail.com>
41+
42+ PR target/48708
43+ * config/i386/i386.c (ix86_expand_vector_set) <V2DImode>: Generate
44+ vec_extract and vec_concat for non-SSE4_1 targets.
45+
46+2011-05-04 Uros Bizjak <ubizjak@gmail.com>
47+
48+ * config/i386/i386.md (*movdi_internal_rex64) <TYPE_SSEMOV>:
49+ Use %v prefix in insn mnemonic to handle TARGET_AVX.
50+ (*movdi_internal): Use "maybe_vex" instead of "vex" in "prefix"
51+ attribute calculation.
52+ (*movdf_internal): Output AVX mnemonics. Add "prefix" attribute.
53+ * config/i386/sse.md (*sse2_storeq_rex64): Do not emit %v prefix
54+ for mov{q} mnemonic.
55+ (*vec_extractv2di_1_rex64_avx): Ditto.
56+ (*vec_concatv2di_rex64_sse4_1): Use %vmovd for reg<->xmm moves.
57+ (*vec_concatv2di_rex64_sse): Use movd for reg<->xmm moves.
58+ * config/i386/mmx.md (*mov<mode>_internal_rex64): Ditto.
59+
60+2011-05-03 Uros Bizjak <ubizjak@gmail.com>
61+ Jakub Jelinek <jakub@redhat.com>
62+
63+ PR target/48774
64+ * config/i386/i386.c (ix86_match_ccmode): For CC{A,C,O,S}mode
65+ only succeed if req_mode is the same as set_mode.
66+
67+2011-05-03 Jakub Jelinek <jakub@redhat.com>
68+
69+ Backport from mainline
70+ 2011-04-30 Jakub Jelinek <jakub@redhat.com>
71+
72+ PR tree-optimization/48809
73+ * tree-switch-conversion.c (build_arrays): Compute tidx in unsigned
74+ type.
75+ (gen_inbound_check): Don't compute index_expr - range_min in utype
76+ again, instead reuse SSA_NAME initialized in build_arrays.
77+ Remove two useless gsi_for_stmt calls.
78+
79+ 2011-04-28 Jakub Jelinek <jakub@redhat.com>
80+
81+ PR middle-end/48597
82+ * final.c (final_scan_insn): Call dwarf2out_frame_debug even for
83+ inline asm.
84+
85+ 2011-04-27 Jakub Jelinek <jakub@redhat.com>
86+
87+ PR c/48742
88+ * c-typeck.c (build_binary_op): Don't wrap arguments if
89+ int_operands is true.
90+
91+ 2011-04-23 Jakub Jelinek <jakub@redhat.com>
92+
93+ PR c/48685
94+ * fold-const.c (fold_convert_loc): Add NOP_EXPR when casting
95+ to VOID_TYPE even around MODIFY_EXPR.
96+
97+2011-05-02 Ulrich Weigand <ulrich.weigand@linaro.org>
98+
99+ PR middle-end/43085
100+ Backport from mainline:
101+
102+ 2010-04-29 Bernd Schmidt <bernds@codesourcery.com>
103+
104+ From Dominique d'Humieres <dominiq@lps.ens.fr>
105+ PR bootstrap/43858
106+ * ifcvt.c (dead_or_predicable): Use df_simulate_find_defs to compute
107+ test_set.
108+
109+ 2010-04-26 Bernd Schmidt <bernds@codesourcery.com>
110+
111+ * df-problems.c (df_simulate_initialize_forwards): Set, don't clear,
112+ bits for artificial defs at the top of the block.
113+ * fwprop.c (single_def_use_enter_block): Don't call it.
114+
115+ 2010-04-22 Bernd Schmidt <bernds@codesourcery.com>
116+
117+ * ifcvt.c (dead_or_predicable): Use df_simulate_find_defs and
118+ df_simulate_find_noclobber_defs as appropriate. Keep track of an
119+ extra set merge_set_noclobber, and use it to relax the final test
120+ slightly.
121+ * df.h (df_simulate_find_noclobber_defs): Declare.
122+ * df-problems.c (df_simulate_find_defs): Don't ignore partial or
123+ conditional defs.
124+ (df_simulate_find_noclobber_defs): New function.
125+
126+2011-04-29 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
127+
128+ PR target/48288
129+ * config/pa/predicates.md (ior_operand): Delete predicate.
130+ (cint_ior_operand, reg_or_cint_ior_operand): New predicates.
131+ * config/pa/pa.md (iordi3): Use reg_or_cint_ior_operand predicate in
132+ expander. Use cint_ior_operand in unnamed insn.
133+ (iorsi3): Likewise.
134+ * config/pa/pa-protos.h (ior_operand): Delete declarations.
135+
136+2011-04-28 Richard Guenther <rguenther@suse.de>
137+
138+ * DEV-PHASE: Set back to prerelease.
139+ * BASE-VER: Bump to 4.5.4.
140+
141 2011-04-28 Release Manager
142
143 * GCC 4.5.3 released.
144
145=== modified file 'gcc/DATESTAMP'
146--- gcc/DATESTAMP 2011-04-28 00:17:54 +0000
147+++ gcc/DATESTAMP 2011-05-05 15:18:28 +0000
148@@ -1,1 +1,1 @@
149-20110428
150+20110505
151
152=== modified file 'gcc/DEV-PHASE'
153--- gcc/DEV-PHASE 2011-04-28 16:13:24 +0000
154+++ gcc/DEV-PHASE 2011-05-05 15:18:28 +0000
155@@ -0,0 +1,1 @@
156+prerelease
157
158=== modified file 'gcc/c-typeck.c'
159--- gcc/c-typeck.c 2011-02-22 11:38:56 +0000
160+++ gcc/c-typeck.c 2011-05-05 15:18:28 +0000
161@@ -9816,7 +9816,7 @@
162 warn_for_sign_compare (location, orig_op0_folded,
163 orig_op1_folded, op0, op1,
164 result_type, resultcode);
165- if (!in_late_binary_op)
166+ if (!in_late_binary_op && !int_operands)
167 {
168 if (!op0_maybe_const || TREE_CODE (op0) != INTEGER_CST)
169 op0 = c_wrap_maybe_const (op0, !op0_maybe_const);
170
171=== modified file 'gcc/config/arm/arm.c'
172--- gcc/config/arm/arm.c 2011-04-20 10:10:50 +0000
173+++ gcc/config/arm/arm.c 2011-05-05 15:18:28 +0000
174@@ -19823,7 +19823,7 @@
175 rtx tmp1 = gen_reg_rtx (mode);
176 rtx tmp2 = gen_reg_rtx (mode);
177
178- emit_insn (intfn (tmp1, op1, tmp2, op2));
179+ emit_insn (intfn (tmp1, op1, op2, tmp2));
180
181 emit_move_insn (mem, tmp1);
182 mem = adjust_address (mem, mode, GET_MODE_SIZE (mode));
183
184=== modified file 'gcc/config/arm/neon.md'
185--- gcc/config/arm/neon.md 2011-04-20 10:00:39 +0000
186+++ gcc/config/arm/neon.md 2011-05-05 15:18:28 +0000
187@@ -4397,13 +4397,14 @@
188
189 (define_insn "neon_vtrn<mode>_internal"
190 [(set (match_operand:VDQW 0 "s_register_operand" "=w")
191- (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")]
192- UNSPEC_VTRN1))
193- (set (match_operand:VDQW 2 "s_register_operand" "=w")
194- (unspec:VDQW [(match_operand:VDQW 3 "s_register_operand" "2")]
195- UNSPEC_VTRN2))]
196+ (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")
197+ (match_operand:VDQW 2 "s_register_operand" "w")]
198+ UNSPEC_VTRN1))
199+ (set (match_operand:VDQW 3 "s_register_operand" "=2")
200+ (unspec:VDQW [(match_dup 1) (match_dup 2)]
201+ UNSPEC_VTRN2))]
202 "TARGET_NEON"
203- "vtrn.<V_sz_elem>\t%<V_reg>0, %<V_reg>2"
204+ "vtrn.<V_sz_elem>\t%<V_reg>0, %<V_reg>3"
205 [(set (attr "neon_type")
206 (if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0))
207 (const_string "neon_bp_simple")
208@@ -4423,13 +4424,14 @@
209
210 (define_insn "neon_vzip<mode>_internal"
211 [(set (match_operand:VDQW 0 "s_register_operand" "=w")
212- (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")]
213- UNSPEC_VZIP1))
214- (set (match_operand:VDQW 2 "s_register_operand" "=w")
215- (unspec:VDQW [(match_operand:VDQW 3 "s_register_operand" "2")]
216- UNSPEC_VZIP2))]
217+ (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")
218+ (match_operand:VDQW 2 "s_register_operand" "w")]
219+ UNSPEC_VZIP1))
220+ (set (match_operand:VDQW 3 "s_register_operand" "=2")
221+ (unspec:VDQW [(match_dup 1) (match_dup 2)]
222+ UNSPEC_VZIP2))]
223 "TARGET_NEON"
224- "vzip.<V_sz_elem>\t%<V_reg>0, %<V_reg>2"
225+ "vzip.<V_sz_elem>\t%<V_reg>0, %<V_reg>3"
226 [(set (attr "neon_type")
227 (if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0))
228 (const_string "neon_bp_simple")
229@@ -4449,13 +4451,14 @@
230
231 (define_insn "neon_vuzp<mode>_internal"
232 [(set (match_operand:VDQW 0 "s_register_operand" "=w")
233- (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")]
234+ (unspec:VDQW [(match_operand:VDQW 1 "s_register_operand" "0")
235+ (match_operand:VDQW 2 "s_register_operand" "w")]
236 UNSPEC_VUZP1))
237- (set (match_operand:VDQW 2 "s_register_operand" "=w")
238- (unspec:VDQW [(match_operand:VDQW 3 "s_register_operand" "2")]
239- UNSPEC_VUZP2))]
240+ (set (match_operand:VDQW 3 "s_register_operand" "=2")
241+ (unspec:VDQW [(match_dup 1) (match_dup 2)]
242+ UNSPEC_VUZP2))]
243 "TARGET_NEON"
244- "vuzp.<V_sz_elem>\t%<V_reg>0, %<V_reg>2"
245+ "vuzp.<V_sz_elem>\t%<V_reg>0, %<V_reg>3"
246 [(set (attr "neon_type")
247 (if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0))
248 (const_string "neon_bp_simple")
249
250=== modified file 'gcc/config/i386/i386.c'
251--- gcc/config/i386/i386.c 2011-02-22 11:38:56 +0000
252+++ gcc/config/i386/i386.c 2011-05-05 15:18:28 +0000
253@@ -14587,11 +14587,15 @@
254 if (req_mode == CCZmode)
255 return 0;
256 /* FALLTHRU */
257+ case CCZmode:
258+ break;
259+
260 case CCAmode:
261 case CCCmode:
262 case CCOmode:
263 case CCSmode:
264- case CCZmode:
265+ if (set_mode != req_mode)
266+ return 0;
267 break;
268
269 default:
270@@ -27691,10 +27695,19 @@
271 break;
272
273 case V2DImode:
274- use_vec_merge = TARGET_SSE4_1;
275+ use_vec_merge = TARGET_SSE4_1 && TARGET_64BIT;
276 if (use_vec_merge)
277 break;
278
279+ tmp = gen_reg_rtx (GET_MODE_INNER (mode));
280+ ix86_expand_vector_extract (false, tmp, target, 1 - elt);
281+ if (elt == 0)
282+ tmp = gen_rtx_VEC_CONCAT (mode, tmp, val);
283+ else
284+ tmp = gen_rtx_VEC_CONCAT (mode, val, tmp);
285+ emit_insn (gen_rtx_SET (VOIDmode, target, tmp));
286+ return;
287+
288 case V2DFmode:
289 {
290 rtx op0, op1;
291
292=== modified file 'gcc/config/i386/i386.md'
293--- gcc/config/i386/i386.md 2011-02-22 11:38:56 +0000
294+++ gcc/config/i386/i386.md 2011-05-05 15:18:28 +0000
295@@ -2429,7 +2429,7 @@
296 [(set_attr "type" "*,*,mmx,mmxmov,mmxmov,sselog1,ssemov,ssemov,ssemov,sselog1,ssemov,ssemov,ssemov")
297 (set (attr "prefix")
298 (if_then_else (eq_attr "alternative" "5,6,7,8")
299- (const_string "vex")
300+ (const_string "maybe_vex")
301 (const_string "orig")))
302 (set_attr "mode" "DI,DI,DI,DI,DI,TI,DI,TI,DI,V4SF,V2SF,V4SF,V2SF")])
303
304@@ -2467,21 +2467,15 @@
305 return "movdq2q\t{%1, %0|%0, %1}";
306
307 case TYPE_SSEMOV:
308- if (TARGET_AVX)
309- {
310- if (get_attr_mode (insn) == MODE_TI)
311- return "vmovdqa\t{%1, %0|%0, %1}";
312- else
313- return "vmovq\t{%1, %0|%0, %1}";
314- }
315-
316 if (get_attr_mode (insn) == MODE_TI)
317- return "movdqa\t{%1, %0|%0, %1}";
318- /* FALLTHRU */
319+ return "%vmovdqa\t{%1, %0|%0, %1}";
320+ /* Handle broken assemblers that require movd instead of movq. */
321+ if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1]))
322+ return "%vmovd\t{%1, %0|%0, %1}";
323+ return "%vmovq\t{%1, %0|%0, %1}";
324
325 case TYPE_MMXMOV:
326- /* Moves from and into integer register is done using movd
327- opcode with REX prefix. */
328+ /* Handle broken assemblers that require movd instead of movq. */
329 if (GENERAL_REG_P (operands[0]) || GENERAL_REG_P (operands[1]))
330 return "movd\t{%1, %0|%0, %1}";
331 return "movq\t{%1, %0|%0, %1}";
332@@ -2914,12 +2908,13 @@
333
334 case 9: case 10: case 14: case 15:
335 return "movd\t{%1, %0|%0, %1}";
336+
337+ case 11:
338+ return "movq\t{%1, %0|%0, %1}";
339+
340 case 12: case 13:
341 return "%vmovd\t{%1, %0|%0, %1}";
342
343- case 11:
344- return "movq\t{%1, %0|%0, %1}";
345-
346 default:
347 gcc_unreachable ();
348 }
349@@ -3066,6 +3061,7 @@
350 case 3:
351 case 4:
352 return "#";
353+
354 case 5:
355 switch (get_attr_mode (insn))
356 {
357@@ -3261,7 +3257,8 @@
358
359 case 9:
360 case 10:
361- return "%vmovd\t{%1, %0|%0, %1}";
362+ /* Handle broken assemblers that require movd instead of movq. */
363+ return "%vmovd\t{%1, %0|%0, %1}";
364
365 default:
366 gcc_unreachable();
367@@ -3360,11 +3357,11 @@
368 switch (get_attr_mode (insn))
369 {
370 case MODE_V4SF:
371- return "xorps\t%0, %0";
372+ return "%vxorps\t%0, %d0";
373 case MODE_V2DF:
374- return "xorpd\t%0, %0";
375+ return "%vxorpd\t%0, %d0";
376 case MODE_TI:
377- return "pxor\t%0, %0";
378+ return "%vpxor\t%0, %d0";
379 default:
380 gcc_unreachable ();
381 }
382@@ -3374,28 +3371,56 @@
383 switch (get_attr_mode (insn))
384 {
385 case MODE_V4SF:
386- return "movaps\t{%1, %0|%0, %1}";
387+ return "%vmovaps\t{%1, %0|%0, %1}";
388 case MODE_V2DF:
389- return "movapd\t{%1, %0|%0, %1}";
390+ return "%vmovapd\t{%1, %0|%0, %1}";
391 case MODE_TI:
392- return "movdqa\t{%1, %0|%0, %1}";
393+ return "%vmovdqa\t{%1, %0|%0, %1}";
394 case MODE_DI:
395- return "movq\t{%1, %0|%0, %1}";
396+ return "%vmovq\t{%1, %0|%0, %1}";
397 case MODE_DF:
398- return "movsd\t{%1, %0|%0, %1}";
399+ if (TARGET_AVX)
400+ {
401+ if (REG_P (operands[0]) && REG_P (operands[1]))
402+ return "vmovsd\t{%1, %0, %0|%0, %0, %1}";
403+ else
404+ return "vmovsd\t{%1, %0|%0, %1}";
405+ }
406+ else
407+ return "movsd\t{%1, %0|%0, %1}";
408 case MODE_V1DF:
409- return "movlpd\t{%1, %0|%0, %1}";
410+ if (TARGET_AVX)
411+ {
412+ if (REG_P (operands[0]))
413+ return "vmovlpd\t{%1, %0, %0|%0, %0, %1}";
414+ else
415+ return "vmovlpd\t{%1, %0|%0, %1}";
416+ }
417+ else
418+ return "movlpd\t{%1, %0|%0, %1}";
419 case MODE_V2SF:
420- return "movlps\t{%1, %0|%0, %1}";
421+ if (TARGET_AVX)
422+ {
423+ if (REG_P (operands[0]))
424+ return "vmovlps\t{%1, %0, %0|%0, %0, %1}";
425+ else
426+ return "vmovlps\t{%1, %0|%0, %1}";
427+ }
428+ else
429+ return "movlps\t{%1, %0|%0, %1}";
430 default:
431 gcc_unreachable ();
432 }
433
434 default:
435- gcc_unreachable();
436+ gcc_unreachable ();
437 }
438 }
439 [(set_attr "type" "fmov,fmov,fmov,multi,multi,sselog1,ssemov,ssemov,ssemov")
440+ (set (attr "prefix")
441+ (if_then_else (eq_attr "alternative" "0,1,2,3,4")
442+ (const_string "orig")
443+ (const_string "maybe_vex")))
444 (set (attr "prefix_data16")
445 (if_then_else (eq_attr "mode" "V1DF")
446 (const_string "1")
447
448=== modified file 'gcc/config/i386/mmx.md'
449--- gcc/config/i386/mmx.md 2009-12-30 11:07:12 +0000
450+++ gcc/config/i386/mmx.md 2011-05-05 15:18:28 +0000
451@@ -63,6 +63,7 @@
452 DONE;
453 })
454
455+;; movd instead of movq is required to handle broken assemblers.
456 (define_insn "*mov<mode>_internal_rex64"
457 [(set (match_operand:MMXMODEI8 0 "nonimmediate_operand"
458 "=rm,r,!?y,!?y ,m ,!y,*Y2,x,x ,m,r,Yi")
459@@ -81,8 +82,8 @@
460 %vpxor\t%0, %d0
461 %vmovq\t{%1, %0|%0, %1}
462 %vmovq\t{%1, %0|%0, %1}
463- %vmovq\t{%1, %0|%0, %1}
464- %vmovq\t{%1, %0|%0, %1}"
465+ %vmovd\t{%1, %0|%0, %1}
466+ %vmovd\t{%1, %0|%0, %1}"
467 [(set_attr "type" "imov,imov,mmx,mmxmov,mmxmov,ssecvt,ssecvt,sselog1,ssemov,ssemov,ssemov,ssemov")
468 (set_attr "unit" "*,*,*,*,*,mmx,mmx,*,*,*,*,*")
469 (set_attr "prefix_rep" "*,*,*,*,*,1,1,*,1,*,*,*")
470@@ -192,6 +193,7 @@
471 (const_string "orig")))
472 (set_attr "mode" "DI,DI,DI,DI,DI,DI,DI,V4SF,V4SF,V2SF,V2SF,DI,DI")])
473
474+;; movd instead of movq is required to handle broken assemblers.
475 (define_insn "*movv2sf_internal_rex64"
476 [(set (match_operand:V2SF 0 "nonimmediate_operand"
477 "=rm,r ,!?y,!?y ,m ,!y,*Y2,x,x,x,m,r,Yi")
478
479=== modified file 'gcc/config/i386/sse.md'
480--- gcc/config/i386/sse.md 2011-04-16 07:53:39 +0000
481+++ gcc/config/i386/sse.md 2011-05-05 15:18:28 +0000
482@@ -7473,9 +7473,8 @@
483 "@
484 #
485 #
486- %vmov{q}\t{%1, %0|%0, %1}"
487+ mov{q}\t{%1, %0|%0, %1}"
488 [(set_attr "type" "*,*,imov")
489- (set_attr "prefix" "*,*,maybe_vex")
490 (set_attr "mode" "*,*,DI")])
491
492 (define_insn "*sse2_storeq"
493@@ -7513,11 +7512,11 @@
494 vmovhps\t{%1, %0|%0, %1}
495 vpsrldq\t{$8, %1, %0|%0, %1, 8}
496 vmovq\t{%H1, %0|%0, %H1}
497- vmov{q}\t{%H1, %0|%0, %H1}"
498+ mov{q}\t{%H1, %0|%0, %H1}"
499 [(set_attr "type" "ssemov,sseishft1,ssemov,imov")
500 (set_attr "length_immediate" "*,1,*,*")
501 (set_attr "memory" "*,none,*,*")
502- (set_attr "prefix" "vex")
503+ (set_attr "prefix" "vex,vex,vex,orig")
504 (set_attr "mode" "V2SF,TI,TI,DI")])
505
506 (define_insn "*vec_extractv2di_1_rex64"
507@@ -7795,6 +7794,7 @@
508 (const_string "vex")))
509 (set_attr "mode" "TI,TI,TI,TI,TI,V2SF")])
510
511+;; movd instead of movq is required to handle broken assemblers.
512 (define_insn "*vec_concatv2di_rex64_sse4_1"
513 [(set (match_operand:V2DI 0 "register_operand" "=x ,x ,Yi,!x,x,x,x")
514 (vec_concat:V2DI
515@@ -7804,7 +7804,7 @@
516 "@
517 pinsrq\t{$0x1, %2, %0|%0, %2, 0x1}
518 movq\t{%1, %0|%0, %1}
519- movq\t{%1, %0|%0, %1}
520+ movd\t{%1, %0|%0, %1}
521 movq2dq\t{%1, %0|%0, %1}
522 punpcklqdq\t{%2, %0|%0, %2}
523 movlhps\t{%2, %0|%0, %2}
524@@ -7815,6 +7815,7 @@
525 (set_attr "length_immediate" "1,*,*,*,*,*,*")
526 (set_attr "mode" "TI,TI,TI,TI,TI,V4SF,V2SF")])
527
528+;; movd instead of movq is required to handle broken assemblers.
529 (define_insn "*vec_concatv2di_rex64_sse"
530 [(set (match_operand:V2DI 0 "register_operand" "=Y2 ,Yi,!Y2,Y2,x,x")
531 (vec_concat:V2DI
532@@ -7823,7 +7824,7 @@
533 "TARGET_64BIT && TARGET_SSE"
534 "@
535 movq\t{%1, %0|%0, %1}
536- movq\t{%1, %0|%0, %1}
537+ movd\t{%1, %0|%0, %1}
538 movq2dq\t{%1, %0|%0, %1}
539 punpcklqdq\t{%2, %0|%0, %2}
540 movlhps\t{%2, %0|%0, %2}
541
542=== modified file 'gcc/config/pa/pa-protos.h'
543--- gcc/config/pa/pa-protos.h 2009-09-23 18:08:32 +0000
544+++ gcc/config/pa/pa-protos.h 2011-05-05 15:18:28 +0000
545@@ -79,7 +79,6 @@
546 extern int prefetch_cc_operand (rtx, enum machine_mode);
547 extern int prefetch_nocc_operand (rtx, enum machine_mode);
548 extern int and_operand (rtx, enum machine_mode);
549-extern int ior_operand (rtx, enum machine_mode);
550 extern int arith32_operand (rtx, enum machine_mode);
551 extern int uint32_operand (rtx, enum machine_mode);
552 extern int reg_before_reload_operand (rtx, enum machine_mode);
553@@ -94,7 +93,6 @@
554 extern int fmpyaddoperands (rtx *);
555 extern int fmpysuboperands (rtx *);
556 extern int call_operand_address (rtx, enum machine_mode);
557-extern int ior_operand (rtx, enum machine_mode);
558 extern void emit_bcond_fp (rtx[]);
559 extern int emit_move_sequence (rtx *, enum machine_mode, rtx);
560 extern int emit_hpdiv_const (rtx *, int);
561
562=== modified file 'gcc/config/pa/pa.md'
563--- gcc/config/pa/pa.md 2010-12-30 21:57:32 +0000
564+++ gcc/config/pa/pa.md 2011-05-05 15:18:28 +0000
565@@ -5686,7 +5686,7 @@
566 (define_expand "iordi3"
567 [(set (match_operand:DI 0 "register_operand" "")
568 (ior:DI (match_operand:DI 1 "register_operand" "")
569- (match_operand:DI 2 "ior_operand" "")))]
570+ (match_operand:DI 2 "reg_or_cint_ior_operand" "")))]
571 ""
572 "
573 {
574@@ -5707,7 +5707,7 @@
575 (define_insn ""
576 [(set (match_operand:DI 0 "register_operand" "=r,r")
577 (ior:DI (match_operand:DI 1 "register_operand" "0,0")
578- (match_operand:DI 2 "ior_operand" "M,i")))]
579+ (match_operand:DI 2 "cint_ior_operand" "M,i")))]
580 "TARGET_64BIT"
581 "* return output_64bit_ior (operands); "
582 [(set_attr "type" "binary,shift")
583@@ -5726,19 +5726,14 @@
584 (define_expand "iorsi3"
585 [(set (match_operand:SI 0 "register_operand" "")
586 (ior:SI (match_operand:SI 1 "register_operand" "")
587- (match_operand:SI 2 "arith32_operand" "")))]
588+ (match_operand:SI 2 "reg_or_cint_ior_operand" "")))]
589 ""
590- "
591-{
592- if (! (ior_operand (operands[2], SImode)
593- || register_operand (operands[2], SImode)))
594- operands[2] = force_reg (SImode, operands[2]);
595-}")
596+ "")
597
598 (define_insn ""
599 [(set (match_operand:SI 0 "register_operand" "=r,r")
600 (ior:SI (match_operand:SI 1 "register_operand" "0,0")
601- (match_operand:SI 2 "ior_operand" "M,i")))]
602+ (match_operand:SI 2 "cint_ior_operand" "M,i")))]
603 ""
604 "* return output_ior (operands); "
605 [(set_attr "type" "binary,shift")
606
607=== modified file 'gcc/config/pa/predicates.md'
608--- gcc/config/pa/predicates.md 2010-07-03 21:46:51 +0000
609+++ gcc/config/pa/predicates.md 2011-05-05 15:18:28 +0000
610@@ -411,11 +411,15 @@
611
612 ;; True iff depi can be used to compute (reg | OP).
613
614-(define_predicate "ior_operand"
615- (match_code "const_int")
616-{
617- return (GET_CODE (op) == CONST_INT && ior_mask_p (INTVAL (op)));
618-})
619+(define_predicate "cint_ior_operand"
620+ (and (match_code "const_int")
621+ (match_test "ior_mask_p (INTVAL (op))")))
622+
623+;; True iff OP can be used to compute (reg | OP).
624+
625+(define_predicate "reg_or_cint_ior_operand"
626+ (ior (match_operand 0 "register_operand")
627+ (match_operand 0 "cint_ior_operand")))
628
629 ;; True iff OP is a CONST_INT of the forms 0...0xxxx or
630 ;; 0...01...1xxxx. Such values can be the left hand side x in (x <<
631
632=== modified file 'gcc/cp/ChangeLog'
633--- gcc/cp/ChangeLog 2011-04-28 14:12:32 +0000
634+++ gcc/cp/ChangeLog 2011-05-05 15:18:28 +0000
635@@ -1,3 +1,9 @@
636+2011-04-27 Jason Merrill <jason@redhat.com>
637+
638+ PR c++/48046
639+ * parser.c (cp_parser_diagnose_invalid_type_name): Commit
640+ to tentative parse sooner.
641+
642 2011-04-28 Release Manager
643
644 * GCC 4.5.3 released.
645
646=== modified file 'gcc/cp/parser.c'
647--- gcc/cp/parser.c 2011-04-27 05:20:46 +0000
648+++ gcc/cp/parser.c 2011-05-05 15:18:28 +0000
649@@ -2333,6 +2333,7 @@
650 location_t location)
651 {
652 tree decl, old_scope;
653+ cp_parser_commit_to_tentative_parse (parser);
654 /* Try to lookup the identifier. */
655 old_scope = parser->scope;
656 parser->scope = scope;
657@@ -2423,7 +2424,6 @@
658 else
659 gcc_unreachable ();
660 }
661- cp_parser_commit_to_tentative_parse (parser);
662 }
663
664 /* Check for a common situation where a type-name should be present,
665
666=== modified file 'gcc/df-problems.c'
667--- gcc/df-problems.c 2011-02-08 12:07:29 +0000
668+++ gcc/df-problems.c 2011-05-05 15:18:28 +0000
669@@ -3916,13 +3916,9 @@
670 the block, starting with the first one.
671 ----------------------------------------------------------------------------*/
672
673-/* Apply the artificial uses and defs at the top of BB in a forwards
674- direction. ??? This is wrong; defs mark the point where a pseudo
675- becomes live when scanning forwards (unless a def is unused). Since
676- there are no REG_UNUSED notes for artificial defs, passes that
677- require artificial defs probably should not call this function
678- unless (as is the case for fwprop) they are correct when liveness
679- bitmaps are *under*estimated. */
680+/* Initialize the LIVE bitmap, which should be copied from DF_LIVE_IN or
681+ DF_LR_IN for basic block BB, for forward scanning by marking artificial
682+ defs live. */
683
684 void
685 df_simulate_initialize_forwards (basic_block bb, bitmap live)
686
687=== modified file 'gcc/final.c'
688--- gcc/final.c 2011-02-08 10:51:58 +0000
689+++ gcc/final.c 2011-05-05 15:18:28 +0000
690@@ -2241,6 +2241,11 @@
691 location_t loc;
692 expanded_location expanded;
693
694+ /* Make sure we flush any queued register saves in case this
695+ clobbers affected registers. */
696+ if (dwarf2out_do_frame ())
697+ dwarf2out_frame_debug (insn, false);
698+
699 /* There's no telling what that did to the condition codes. */
700 CC_STATUS_INIT;
701
702
703=== modified file 'gcc/fold-const.c'
704--- gcc/fold-const.c 2011-04-28 16:13:24 +0000
705+++ gcc/fold-const.c 2011-05-05 15:18:28 +0000
706@@ -2784,8 +2784,6 @@
707
708 case VOID_TYPE:
709 tem = fold_ignored_result (arg);
710- if (TREE_CODE (tem) == MODIFY_EXPR)
711- goto fold_convert_exit;
712 return fold_build1_loc (loc, NOP_EXPR, type, tem);
713
714 default:
715
716=== modified file 'gcc/ifcvt.c'
717--- gcc/ifcvt.c 2011-02-08 12:07:29 +0000
718+++ gcc/ifcvt.c 2011-05-05 15:18:28 +0000
719@@ -4010,8 +4010,7 @@
720 {
721 basic_block new_dest = dest_edge->dest;
722 rtx head, end, jump, earliest = NULL_RTX, old_dest;
723- bitmap merge_set = NULL;
724- bitmap merge_set_noclobber = NULL;
725+ bitmap merge_set = NULL, merge_set_noclobber = NULL;
726 /* Number of pending changes. */
727 int n_validated_changes = 0;
728 rtx new_dest_label;
729@@ -4165,9 +4164,11 @@
730
731 /* Collect:
732 MERGE_SET = set of registers set in MERGE_BB
733+ MERGE_SET_NOCLOBBER = like MERGE_SET, but only includes registers
734+ that are really set, not just clobbered.
735 TEST_LIVE = set of registers live at EARLIEST
736- TEST_SET = set of registers set between EARLIEST and the
737- end of the block. */
738+ TEST_SET = set of registers set between EARLIEST and the
739+ end of the block. */
740
741 merge_set = BITMAP_ALLOC (&reg_obstack);
742 merge_set_noclobber = BITMAP_ALLOC (&reg_obstack);
743@@ -4182,14 +4183,8 @@
744 {
745 if (NONDEBUG_INSN_P (insn))
746 {
747- unsigned int uid = INSN_UID (insn);
748- df_ref *def_rec;
749- for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++)
750- {
751- df_ref def = *def_rec;
752- bitmap_set_bit (merge_set, DF_REF_REGNO (def));
753- }
754- df_simulate_find_noclobber_defs (insn, merge_set_noclobber);
755+ df_simulate_find_defs (insn, merge_set);
756+ df_simulate_find_noclobber_defs (insn, merge_set_noclobber);
757 }
758 }
759
760@@ -4231,7 +4226,9 @@
761 }
762
763 /* We can perform the transformation if
764- MERGE_SET & (TEST_SET | TEST_LIVE)
765+ MERGE_SET_NOCLOBBER & TEST_SET
766+ and
767+ MERGE_SET & TEST_LIVE
768 and
769 TEST_SET & DF_LIVE_IN (merge_bb)
770 are empty. */
771@@ -4319,11 +4316,11 @@
772 unsigned i;
773 bitmap_iterator bi;
774
775- EXECUTE_IF_SET_IN_BITMAP (merge_set, 0, i, bi)
776+ EXECUTE_IF_SET_IN_BITMAP (merge_set_noclobber, 0, i, bi)
777 remove_reg_equal_equiv_notes_for_regno (i);
778
779 BITMAP_FREE (merge_set);
780- BITMAP_FREE (merge_set_noclobber);
781+ BITMAP_FREE (merge_set_noclobber);
782 }
783
784 reorder_insns (head, end, PREV_INSN (earliest));
785
786=== modified file 'gcc/testsuite/ChangeLog'
787--- gcc/testsuite/ChangeLog 2011-04-28 14:11:59 +0000
788+++ gcc/testsuite/ChangeLog 2011-05-05 15:18:28 +0000
789@@ -1,3 +1,53 @@
790+2010-05-05 Ira Rosen <ira.rosen@linaro.org>
791+
792+ Backport from mainline:
793+ 2011-04-18 Ulrich Weigand <ulrich.weigand@linaro.org>
794+ Ira Rosen <ira.rosen@linaro.org>
795+
796+ PR target/48252
797+ * gcc.target/arm/pr48252.c: New test.
798+
799+2011-05-04 Uros Bizjak <ubizjak@gmail.com>
800+
801+ Backport from mainline
802+ 2011-04-21 Uros Bizjak <ubizjak@gmail.com>
803+
804+ PR target/48708
805+ * gcc.target/i386/pr48708.c: New test.
806+
807+2011-05-04 Uros Bizjak <ubizjak@gmail.com>
808+
809+ Backport from mainline
810+ 2010-12-08 H.J. Lu <hongjiu.lu@intel.com>
811+
812+ * gcc.target/i386/sse2-init-v2di-2.c: Add "-dp" and update
813+ expected scan.
814+
815+2011-05-03 Jakub Jelinek <jakub@redhat.com>
816+
817+ PR target/48774
818+ * gcc.dg/pr48774.c: New test.
819+
820+ Backport from mainline
821+ 2011-04-30 Jakub Jelinek <jakub@redhat.com>
822+
823+ PR tree-optimization/48809
824+ * gcc.c-torture/execute/pr48809.c: New test.
825+
826+ 2011-04-27 Jakub Jelinek <jakub@redhat.com>
827+
828+ PR c/48742
829+ * gcc.c-torture/compile/pr48742.c: New test.
830+
831+ 2011-04-23 Jakub Jelinek <jakub@redhat.com>
832+
833+ PR c/48685
834+ * gcc.dg/pr48685.c: New test.
835+
836+2011-04-27 Jason Merrill <jason@redhat.com>
837+
838+ * g++.dg/parse/ambig6.C: New.
839+
840 2011-04-28 Release Manager
841
842 * GCC 4.5.3 released.
843
844=== added file 'gcc/testsuite/g++.dg/parse/ambig6.C'
845--- gcc/testsuite/g++.dg/parse/ambig6.C 1970-01-01 00:00:00 +0000
846+++ gcc/testsuite/g++.dg/parse/ambig6.C 2011-05-05 15:18:28 +0000
847@@ -0,0 +1,12 @@
848+// PR c++/48046
849+
850+namespace N1 { typedef int T; } // { dg-error "" }
851+namespace N2 { typedef float T; } // { dg-error "" }
852+
853+int main()
854+{
855+ using namespace N1;
856+ using namespace N2;
857+
858+ static T t; // { dg-error "" }
859+}
860
861=== added file 'gcc/testsuite/gcc.c-torture/compile/pr48742.c'
862--- gcc/testsuite/gcc.c-torture/compile/pr48742.c 1970-01-01 00:00:00 +0000
863+++ gcc/testsuite/gcc.c-torture/compile/pr48742.c 2011-05-05 15:18:28 +0000
864@@ -0,0 +1,15 @@
865+/* PR c/48742 */
866+
867+void baz (int);
868+
869+int
870+foo (void)
871+{
872+ return 1 / 0 > 0;
873+}
874+
875+void
876+bar (void)
877+{
878+ baz (1 <= 2 % (3 >> 1 > 5 / 6 == 3));
879+}
880
881=== added file 'gcc/testsuite/gcc.c-torture/execute/pr48809.c'
882--- gcc/testsuite/gcc.c-torture/execute/pr48809.c 1970-01-01 00:00:00 +0000
883+++ gcc/testsuite/gcc.c-torture/execute/pr48809.c 2011-05-05 15:18:28 +0000
884@@ -0,0 +1,60 @@
885+/* PR tree-optimization/48809 */
886+
887+extern void abort (void);
888+
889+int
890+foo (signed char x)
891+{
892+ int y = 0;
893+ switch (x)
894+ {
895+ case 0: y = 1; break;
896+ case 1: y = 7; break;
897+ case 2: y = 2; break;
898+ case 3: y = 19; break;
899+ case 4: y = 5; break;
900+ case 5: y = 17; break;
901+ case 6: y = 31; break;
902+ case 7: y = 8; break;
903+ case 8: y = 28; break;
904+ case 9: y = 16; break;
905+ case 10: y = 31; break;
906+ case 11: y = 12; break;
907+ case 12: y = 15; break;
908+ case 13: y = 111; break;
909+ case 14: y = 17; break;
910+ case 15: y = 10; break;
911+ case 16: y = 31; break;
912+ case 17: y = 7; break;
913+ case 18: y = 2; break;
914+ case 19: y = 19; break;
915+ case 20: y = 5; break;
916+ case 21: y = 107; break;
917+ case 22: y = 31; break;
918+ case 23: y = 8; break;
919+ case 24: y = 28; break;
920+ case 25: y = 106; break;
921+ case 26: y = 31; break;
922+ case 27: y = 102; break;
923+ case 28: y = 105; break;
924+ case 29: y = 111; break;
925+ case 30: y = 17; break;
926+ case 31: y = 10; break;
927+ case 32: y = 31; break;
928+ case 98: y = 18; break;
929+ case -62: y = 19; break;
930+ }
931+ return y;
932+}
933+
934+int
935+main ()
936+{
937+ if (foo (98) != 18 || foo (97) != 0 || foo (99) != 0)
938+ abort ();
939+ if (foo (-62) != 19 || foo (-63) != 0 || foo (-61) != 0)
940+ abort ();
941+ if (foo (28) != 105 || foo (27) != 102 || foo (29) != 111)
942+ abort ();
943+ return 0;
944+}
945
946=== added file 'gcc/testsuite/gcc.dg/pr48685.c'
947--- gcc/testsuite/gcc.dg/pr48685.c 1970-01-01 00:00:00 +0000
948+++ gcc/testsuite/gcc.dg/pr48685.c 2011-05-05 15:18:28 +0000
949@@ -0,0 +1,11 @@
950+/* PR c/48685 */
951+/* { dg-do compile } */
952+/* { dg-options "-O2" } */
953+
954+int
955+main ()
956+{
957+ int v = 1;
958+ (void) (1 == 2 ? (void) 0 : (v = 0));
959+ return v;
960+}
961
962=== added file 'gcc/testsuite/gcc.dg/pr48774.c'
963--- gcc/testsuite/gcc.dg/pr48774.c 1970-01-01 00:00:00 +0000
964+++ gcc/testsuite/gcc.dg/pr48774.c 2011-05-05 15:18:28 +0000
965@@ -0,0 +1,38 @@
966+/* PR target/48774 */
967+/* { dg-do run } */
968+/* { dg-options "-O2 -funroll-loops" } */
969+
970+extern void abort (void);
971+unsigned long int s[24]
972+ = { 12, ~1, 12, ~2, 12, ~4, 12, ~8, 12, ~16, 12, ~32,
973+ 12, ~64, 12, ~128, 12, ~256, 12, ~512, 12, ~1024, 12, ~2048 };
974+struct { int n; unsigned long *e[12]; } g
975+ = { 12, { &s[0], &s[2], &s[4], &s[6], &s[8], &s[10], &s[12], &s[14],
976+ &s[16], &s[18], &s[20], &s[22] } };
977+int c[12];
978+
979+__attribute__((noinline, noclone)) void
980+foo (void)
981+{
982+ int i, j;
983+ for (i = 0; i < g.n; i++)
984+ for (j = 0; j < g.n; j++)
985+ {
986+ if (i == j && j < g.e[0][0] && (g.e[i][1] & (1UL << j)))
987+ abort ();
988+ if (j < g.e[0][0] && (g.e[i][1] & (1UL << j)))
989+ c[i]++;
990+ }
991+}
992+
993+int
994+main ()
995+{
996+ int i;
997+ asm volatile ("" : "+m" (s), "+m" (g), "+m" (c));
998+ foo ();
999+ for (i = 0; i < 12; i++)
1000+ if (c[i] != 11)
1001+ abort ();
1002+ return 0;
1003+}
1004
1005=== added file 'gcc/testsuite/gcc.target/arm/pr48252.c'
1006--- gcc/testsuite/gcc.target/arm/pr48252.c 1970-01-01 00:00:00 +0000
1007+++ gcc/testsuite/gcc.target/arm/pr48252.c 2011-05-05 15:18:28 +0000
1008@@ -0,0 +1,31 @@
1009+/* { dg-do run } */
1010+/* { dg-require-effective-target arm_neon_hw } */
1011+/* { dg-options "-O2" } */
1012+/* { dg-add-options arm_neon } */
1013+
1014+#include "arm_neon.h"
1015+#include <stdlib.h>
1016+
1017+int main(void)
1018+{
1019+ uint8x8_t v1 = {1, 1, 1, 1, 1, 1, 1, 1};
1020+ uint8x8_t v2 = {2, 2, 2, 2, 2, 2, 2, 2};
1021+ uint8x8x2_t vd1, vd2;
1022+ union {uint8x8_t v; uint8_t buf[8];} d1, d2, d3, d4;
1023+ int i;
1024+
1025+ vd1 = vzip_u8(v1, vdup_n_u8(0));
1026+ vd2 = vzip_u8(v2, vdup_n_u8(0));
1027+
1028+ vst1_u8(d1.buf, vd1.val[0]);
1029+ vst1_u8(d2.buf, vd1.val[1]);
1030+ vst1_u8(d3.buf, vd2.val[0]);
1031+ vst1_u8(d4.buf, vd2.val[1]);
1032+
1033+ for (i = 0; i < 8; i++)
1034+ if ((i % 2 == 0 && d4.buf[i] != 2)
1035+ || (i % 2 == 1 && d4.buf[i] != 0))
1036+ abort ();
1037+
1038+ return 0;
1039+}
1040
1041=== added file 'gcc/testsuite/gcc.target/i386/pr48708.c'
1042--- gcc/testsuite/gcc.target/i386/pr48708.c 1970-01-01 00:00:00 +0000
1043+++ gcc/testsuite/gcc.target/i386/pr48708.c 2011-05-05 15:18:28 +0000
1044@@ -0,0 +1,15 @@
1045+/* { dg-do compile } */
1046+/* { dg-options "-O2 -msse2" } */
1047+
1048+#include <emmintrin.h>
1049+
1050+typedef long long T __attribute__((may_alias));
1051+struct S { __m128i d; };
1052+
1053+__m128i
1054+foo (long long *x, struct S *y, __m128i *z)
1055+{
1056+ struct S s = *y;
1057+ ((T *) &s.d)[0] = *x;
1058+ return _mm_cmpeq_epi16 (s.d, *z);
1059+}
1060
1061=== modified file 'gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c'
1062--- gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c 2008-08-20 12:22:30 +0000
1063+++ gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c 2011-05-05 15:18:28 +0000
1064@@ -1,6 +1,6 @@
1065 /* { dg-do compile } */
1066 /* { dg-require-effective-target lp64 } */
1067-/* { dg-options "-O2 -msse4 -march=core2" } */
1068+/* { dg-options "-O2 -msse4 -march=core2 -dp" } */
1069
1070 #include <emmintrin.h>
1071
1072@@ -10,4 +10,4 @@
1073 return _mm_cvtsi64_si128 (b);
1074 }
1075
1076-/* { dg-final { scan-assembler "movq" } } */
1077+/* { dg-final { scan-assembler-times "\\*vec_concatv2di_rex64_sse4_1/3" 1 } } */
1078
1079=== modified file 'gcc/tree-switch-conversion.c'
1080--- gcc/tree-switch-conversion.c 2010-09-02 13:05:30 +0000
1081+++ gcc/tree-switch-conversion.c 2011-05-05 15:18:28 +0000
1082@@ -549,7 +549,7 @@
1083 build_arrays (gimple swtch)
1084 {
1085 tree arr_index_type;
1086- tree tidx, sub, tmp;
1087+ tree tidx, sub, tmp, utype;
1088 gimple stmt;
1089 gimple_stmt_iterator gsi;
1090 int i;
1091@@ -557,14 +557,20 @@
1092
1093 gsi = gsi_for_stmt (swtch);
1094
1095+ /* Make sure we do not generate arithmetics in a subrange. */
1096+ utype = TREE_TYPE (info.index_expr);
1097+ if (TREE_TYPE (utype))
1098+ utype = lang_hooks.types.type_for_mode (TYPE_MODE (TREE_TYPE (utype)), 1);
1099+ else
1100+ utype = lang_hooks.types.type_for_mode (TYPE_MODE (utype), 1);
1101+
1102 arr_index_type = build_index_type (info.range_size);
1103- tmp = create_tmp_var (TREE_TYPE (info.index_expr), "csti");
1104+ tmp = create_tmp_var (utype, "csui");
1105 add_referenced_var (tmp);
1106 tidx = make_ssa_name (tmp, NULL);
1107- sub = fold_build2_loc (loc, MINUS_EXPR,
1108- TREE_TYPE (info.index_expr), info.index_expr,
1109- fold_convert_loc (loc, TREE_TYPE (info.index_expr),
1110- info.range_min));
1111+ sub = fold_build2_loc (loc, MINUS_EXPR, utype,
1112+ fold_convert_loc (loc, utype, info.index_expr),
1113+ fold_convert_loc (loc, utype, info.range_min));
1114 sub = force_gimple_operand_gsi (&gsi, sub,
1115 false, NULL, true, GSI_SAME_STMT);
1116 stmt = gimple_build_assign (tidx, sub);
1117@@ -673,12 +679,7 @@
1118 tree label_decl2 = create_artificial_label (UNKNOWN_LOCATION);
1119 tree label_decl3 = create_artificial_label (UNKNOWN_LOCATION);
1120 gimple label1, label2, label3;
1121-
1122- tree utype;
1123- tree tmp_u_1, tmp_u_2, tmp_u_var;
1124- tree cast;
1125- gimple cast_assign, minus_assign;
1126- tree ulb, minus;
1127+ tree utype, tidx;
1128 tree bound;
1129
1130 gimple cond_stmt;
1131@@ -692,49 +693,24 @@
1132 gcc_assert (info.default_values);
1133 bb0 = gimple_bb (swtch);
1134
1135- /* Make sure we do not generate arithmetics in a subrange. */
1136- if (TREE_TYPE (TREE_TYPE (info.index_expr)))
1137- utype = lang_hooks.types.type_for_mode
1138- (TYPE_MODE (TREE_TYPE (TREE_TYPE (info.index_expr))), 1);
1139- else
1140- utype = lang_hooks.types.type_for_mode
1141- (TYPE_MODE (TREE_TYPE (info.index_expr)), 1);
1142+ tidx = gimple_assign_lhs (info.arr_ref_first);
1143+ utype = TREE_TYPE (tidx);
1144
1145 /* (end of) block 0 */
1146 gsi = gsi_for_stmt (info.arr_ref_first);
1147- tmp_u_var = create_tmp_var (utype, "csui");
1148- add_referenced_var (tmp_u_var);
1149- tmp_u_1 = make_ssa_name (tmp_u_var, NULL);
1150-
1151- cast = fold_convert_loc (loc, utype, info.index_expr);
1152- cast_assign = gimple_build_assign (tmp_u_1, cast);
1153- SSA_NAME_DEF_STMT (tmp_u_1) = cast_assign;
1154- gsi_insert_before (&gsi, cast_assign, GSI_SAME_STMT);
1155- update_stmt (cast_assign);
1156-
1157- ulb = fold_convert_loc (loc, utype, info.range_min);
1158- minus = fold_build2_loc (loc, MINUS_EXPR, utype, tmp_u_1, ulb);
1159- minus = force_gimple_operand_gsi (&gsi, minus, false, NULL, true,
1160- GSI_SAME_STMT);
1161- tmp_u_2 = make_ssa_name (tmp_u_var, NULL);
1162- minus_assign = gimple_build_assign (tmp_u_2, minus);
1163- SSA_NAME_DEF_STMT (tmp_u_2) = minus_assign;
1164- gsi_insert_before (&gsi, minus_assign, GSI_SAME_STMT);
1165- update_stmt (minus_assign);
1166+ gsi_next (&gsi);
1167
1168 bound = fold_convert_loc (loc, utype, info.range_size);
1169- cond_stmt = gimple_build_cond (LE_EXPR, tmp_u_2, bound, NULL_TREE, NULL_TREE);
1170+ cond_stmt = gimple_build_cond (LE_EXPR, tidx, bound, NULL_TREE, NULL_TREE);
1171 gsi_insert_before (&gsi, cond_stmt, GSI_SAME_STMT);
1172 update_stmt (cond_stmt);
1173
1174 /* block 2 */
1175- gsi = gsi_for_stmt (info.arr_ref_first);
1176 label2 = gimple_build_label (label_decl2);
1177 gsi_insert_before (&gsi, label2, GSI_SAME_STMT);
1178 last_assign = gen_def_assigns (&gsi);
1179
1180 /* block 1 */
1181- gsi = gsi_for_stmt (info.arr_ref_first);
1182 label1 = gimple_build_label (label_decl1);
1183 gsi_insert_before (&gsi, label1, GSI_SAME_STMT);
1184
1185
1186=== modified file 'libffi/ChangeLog'
1187--- libffi/ChangeLog 2011-04-28 14:10:51 +0000
1188+++ libffi/ChangeLog 2011-05-05 15:18:28 +0000
1189@@ -1,3 +1,13 @@
1190+2011-05-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1191+
1192+ Backport from mainline:
1193+ 2011-04-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1194+
1195+ * src/alpha/osf.S (UA_SI, FDE_ENCODING, FDE_ENCODE, FDE_ARANGE):
1196+ Define.
1197+ Use them to handle ELF vs. ECOFF differences.
1198+ [__osf__] (_GLOBAL__F_ffi_call_osf): Define.
1199+
1200 2011-04-28 Release Manager
1201
1202 * GCC 4.5.3 released.
1203
1204=== modified file 'libffi/src/alpha/osf.S'
1205--- libffi/src/alpha/osf.S 2009-06-04 14:43:03 +0000
1206+++ libffi/src/alpha/osf.S 2011-05-05 15:18:28 +0000
1207@@ -1,5 +1,5 @@
1208 /* -----------------------------------------------------------------------
1209- osf.S - Copyright (c) 1998, 2001, 2007, 2008 Red Hat
1210+ osf.S - Copyright (c) 1998, 2001, 2007, 2008, 2011 Red Hat
1211
1212 Alpha/OSF Foreign Function Interface
1213
1214@@ -299,33 +299,51 @@
1215 #endif
1216
1217 #ifdef __ELF__
1218+# define UA_SI .4byte
1219+# define FDE_ENCODING 0x1b /* pcrel sdata4 */
1220+# define FDE_ENCODE(X) .4byte X-.
1221+# define FDE_ARANGE(X) .4byte X
1222+#elif defined __osf__
1223+# define UA_SI .align 0; .long
1224+# define FDE_ENCODING 0x50 /* aligned absolute */
1225+# define FDE_ENCODE(X) .align 3; .quad X
1226+# define FDE_ARANGE(X) .align 0; .quad X
1227+#endif
1228+
1229+#ifdef __ELF__
1230 .section .eh_frame,EH_FRAME_FLAGS,@progbits
1231+#elif defined __osf__
1232+ .data
1233+ .align 3
1234+ .globl _GLOBAL__F_ffi_call_osf
1235+_GLOBAL__F_ffi_call_osf:
1236+#endif
1237 __FRAME_BEGIN__:
1238- .4byte $LECIE1-$LSCIE1 # Length of Common Information Entry
1239+ UA_SI $LECIE1-$LSCIE1 # Length of Common Information Entry
1240 $LSCIE1:
1241- .4byte 0x0 # CIE Identifier Tag
1242+ UA_SI 0x0 # CIE Identifier Tag
1243 .byte 0x1 # CIE Version
1244 .ascii "zR\0" # CIE Augmentation
1245 .byte 0x1 # uleb128 0x1; CIE Code Alignment Factor
1246 .byte 0x78 # sleb128 -8; CIE Data Alignment Factor
1247 .byte 26 # CIE RA Column
1248 .byte 0x1 # uleb128 0x1; Augmentation size
1249- .byte 0x1b # FDE Encoding (pcrel sdata4)
1250+ .byte FDE_ENCODING # FDE Encoding
1251 .byte 0xc # DW_CFA_def_cfa
1252 .byte 30 # uleb128 column 30
1253 .byte 0 # uleb128 offset 0
1254 .align 3
1255 $LECIE1:
1256 $LSFDE1:
1257- .4byte $LEFDE1-$LASFDE1 # FDE Length
1258+ UA_SI $LEFDE1-$LASFDE1 # FDE Length
1259 $LASFDE1:
1260- .4byte $LASFDE1-__FRAME_BEGIN__ # FDE CIE offset
1261- .4byte $LFB1-. # FDE initial location
1262- .4byte $LFE1-$LFB1 # FDE address range
1263+ UA_SI $LASFDE1-__FRAME_BEGIN__ # FDE CIE offset
1264+ FDE_ENCODE($LFB1) # FDE initial location
1265+ FDE_ARANGE($LFE1-$LFB1) # FDE address range
1266 .byte 0x0 # uleb128 0x0; Augmentation size
1267
1268 .byte 0x4 # DW_CFA_advance_loc4
1269- .4byte $LCFI1-$LFB1
1270+ UA_SI $LCFI1-$LFB1
1271 .byte 0x9a # DW_CFA_offset, column 26
1272 .byte 4 # uleb128 4*-8
1273 .byte 0x8f # DW_CFA_offset, column 15
1274@@ -335,32 +353,35 @@
1275 .byte 32 # uleb128 offset 32
1276
1277 .byte 0x4 # DW_CFA_advance_loc4
1278- .4byte $LCFI2-$LCFI1
1279+ UA_SI $LCFI2-$LCFI1
1280 .byte 0xda # DW_CFA_restore, column 26
1281 .align 3
1282 $LEFDE1:
1283
1284 $LSFDE3:
1285- .4byte $LEFDE3-$LASFDE3 # FDE Length
1286+ UA_SI $LEFDE3-$LASFDE3 # FDE Length
1287 $LASFDE3:
1288- .4byte $LASFDE3-__FRAME_BEGIN__ # FDE CIE offset
1289- .4byte $LFB2-. # FDE initial location
1290- .4byte $LFE2-$LFB2 # FDE address range
1291+ UA_SI $LASFDE3-__FRAME_BEGIN__ # FDE CIE offset
1292+ FDE_ENCODE($LFB2) # FDE initial location
1293+ FDE_ARANGE($LFE2-$LFB2) # FDE address range
1294 .byte 0x0 # uleb128 0x0; Augmentation size
1295
1296 .byte 0x4 # DW_CFA_advance_loc4
1297- .4byte $LCFI5-$LFB2
1298+ UA_SI $LCFI5-$LFB2
1299 .byte 0xe # DW_CFA_def_cfa_offset
1300 .byte 0x80,0x1 # uleb128 128
1301
1302 .byte 0x4 # DW_CFA_advance_loc4
1303- .4byte $LCFI6-$LCFI5
1304+ UA_SI $LCFI6-$LCFI5
1305 .byte 0x9a # DW_CFA_offset, column 26
1306 .byte 16 # uleb128 offset 16*-8
1307 .align 3
1308 $LEFDE3:
1309+#if defined __osf__
1310+ .align 0
1311+ .long 0 # End of Table
1312+#endif
1313
1314-#ifdef __linux__
1315+#if defined __ELF__ && defined __linux__
1316 .section .note.GNU-stack,"",@progbits
1317 #endif
1318-#endif

Subscribers

People subscribed via source and target branches