2 ===================================================================
3 RCS file: /cvs/gcc/gcc/ChangeLog,v
4 retrieving revision 1.621.2.52
5 retrieving revision 1.621.2.53
6 diff -u -r1.621.2.52 -r1.621.2.53
7 --- gcc/ChangeLog 30 Sep 2004 16:47:59 -0000 1.621.2.52
8 +++ gcc/ChangeLog 6 Oct 2004 12:00:52 -0000 1.621.2.53
10 +2004-10-06 Josef Zlomek <josef.zlomek@email.cz>
12 + * MAINTAINERS: Update my e-mail address.
14 2004-09-30 Release Manager
18 ===================================================================
19 RCS file: /cvs/gcc/gcc/MAINTAINERS,v
20 retrieving revision 1.253.2.18
21 retrieving revision 1.253.2.19
22 diff -u -r1.253.2.18 -r1.253.2.19
23 --- gcc/MAINTAINERS 16 Jan 2004 23:33:12 -0000 1.253.2.18
24 +++ gcc/MAINTAINERS 6 Oct 2004 12:00:53 -0000 1.253.2.19
26 John Wehle john@feith.com
27 Florian Weimer fw@deneb.enyo.de
28 Mark Wielaard mark@gcc.gnu.org
29 -Josef Zlomek zlomekj@suse.cz
30 +Josef Zlomek josef.zlomek@email.cz
35 ===================================================================
36 RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
37 retrieving revision 1.16114.2.1019
38 retrieving revision 1.16114.2.1059
39 diff -u -r1.16114.2.1019 -r1.16114.2.1059
40 --- gcc/gcc/ChangeLog 30 Sep 2004 16:45:01 -0000 1.16114.2.1019
41 +++ gcc/gcc/ChangeLog 29 Jan 2005 11:53:57 -0000 1.16114.2.1059
43 +2005-01-29 Alan Modra <amodra@bigpond.net.au>
45 + * unwind-dw2.c (execute_stack_op): Add missing cases for
46 + DW_OP_shl, DW_OP_shr, DW_OP_shra, DW_OP_xor.
48 +2005-01-28 Stephane Carrez <stcarrez@nerim.fr>
51 + * config/m68hc11/t-m68hc11-gas (dp-bit.c): Fix typo causing a
52 + configuration part of dp-bit.c to be lost.
54 +2005-01-27 Ulrich Weigand <uweigand@de.ibm.com>
57 + Backport from mainline:
58 + * config/s390/s390.md ("reload_outti"): Remove predicate for
59 + output operand. Abort if operand is not a MEM.
60 + ("reload_outdi", "reload_outdf"): Likewise.
62 +2005-01-22 Roger Sayle <roger@eyesopen.com>
65 + Backport from mainline
66 + 2003-02-05 Jakub Jelinek <jakub@redhat.com>
68 + PR optimization/8555
69 + * config/i386/i386.md (sse_mov?fcc split): Handle op2 == op3 case
70 + instead of aborting.
72 +2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
74 + * gccbug.in: Update optimization -> tree-optimization/rtl-optimization.
76 +2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
79 + * tree-inline.c (expand_call_inline): Do not warn for functions
80 + marked with attribute noinline.
82 +2005-01-18 Eric Botcazou <ebotcazou@libertysurf.fr>
84 + PR rtl-optimization/19296
85 + * combine.c (simplify_comparison): Rewrite the condition under
86 + which a non-paradoxical SUBREG of a PLUS can be lifted when
87 + compared against a constant.
89 +2004-01-14 David Mosberger <davidm@hpl.hp.com>
90 + James E Wilson <wilson@specifixinc.com>
93 + * config/ia64/ia64.c (process_set): For alloc insn, only call
94 + process_epilogue is !frame_pointer_needed.
97 + * config/ia64/ia64.c (ia64_expand_epilogue): Set RTX_FRAME_RELATED_P on
98 + sibcall alloc instruction.
99 + (process_set): Handle sibcall alloc instruction.
101 +2005-01-13 David O'Brien <obrien@FreeBSD.org>
103 + Backport from mainline:
104 + * config/freebsd-spec.h: Use KSE pthread lib for -pthread.
106 +2005-01-08 Sergey M. Samoylov <ssamoylov@dev.rtsoft.ru>
109 + 2004-02-12 Richard Sandiford <rsandifo@redhat.com>
111 + * config/mips/mips-protos.h (mips_output_aligned_decl_common): Declare.
112 + (mips_declare_object): Make variadic.
113 + * config/mips/mips.h (ASM_OUTPUT_ALIGNED_DECL_COMMON): Use
114 + mips_output_aligned_decl_common.
115 + * config/mips/mips.c (mips_output_aligned_decl_common): New function.
116 + (mips_declare_object): Make variadic.
118 +2005-01-08 Richard Sandiford <rsandifo@redhat.com>
121 + * config/mips/mips.md (define_asm_attributes): Set can_delay to no.
123 +2004-12-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
125 + * vax.c (vax_address_cost, vax_rtx_cost): Correct casts.
126 + (vax_rtx_cost): Handle small offsets for both PLUS and MINUS.
128 +2004-12-27 Steven Bosscher <stevenb@suse.de>
129 + John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
131 + rtl-optimization/12863
132 + * config/vax/vax.h (CASE_DROPS_THROUGH): Don't define.
133 + * config/vax/vax.md (casesi): Emit a test-and-branch to make sure
134 + that the case is in range, to make sure the casesi insn is always
135 + in range and never falls through.
136 + (casesi1): Add comment to explain why casesi never falls through.
137 + Remove the unnamed special case casesi pattern.
139 +2004-12-26 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
142 + * config/pa/pa32-linux.h (FUNCTION_OK_FOR_SIBCALL): Return false when
143 + TARGET_PORTABLE_RUNTIME is true.
145 +2004-12-25 Alan Modra <amodra@bigpond.net.au>
148 + * config/rs6000/rs6000.md (andsi3_internal7, andsi3_internal8): Delete.
150 +2004-12-21 Joseph S. Myers <jsm@polyomino.org.uk>
153 + * c-parse.in (compstmt_primary_start): Set last_expr_type to
156 +2004-12-19 Roger Sayle <roger@eyesopen.com>
158 + PR middle-end/19068
159 + * expr.c (expand_expr_real_1) <MAX_EXPR>: Ensure that target, op0
160 + and op1 are all registers (or constants) before expanding the RTL
161 + comparison sequence [to avoid reg_overlap_mentioned (target, op1)].
163 +2004-12-16 Eric Botcazou <ebotcazou@adacore.com>
165 + PR middle-end/18882
166 + * function.c (assign_stack_local_1): Use BITS_PER_UNIT alignment
167 + when passed -2 as 'align'.
168 + (put_var_into_stack): Adjust calls to put_reg_into_stack.
169 + When passed a CONCAT, instruct put_reg_into_stack to use
170 + a consecutive stack slot for the second part.
171 + (put_reg_into_stack): Remove 'promoted_mode' parameter, add
172 + 'consecutive_p' parameter. Retrieve the register mode from 'reg'.
173 + When consecutive_p is true, instruct assign_stack_local_1 to use
174 + BITS_PER_UNIT alignment.
175 + (put_addressof_into_stack): Adjust call to put_reg_into_stack.
177 +2004-12-16 Eric Botcazou <ebotcazou@libertysurf.fr>
179 + PR middle-end/18590
180 + * function.c (fixup_var_refs_insns_with_hash): Do not invoke
181 + fixup_var_refs_insn on insns marked as deleted.
183 +2004-12-15 Richard Henderson <rth@redhat.com>
186 + * config/i386/i386.md (swaphi_1): Swap with swaphi_2, allow with
188 + (swapqi_1): Rename from swapqi. Enable only for no partial reg
189 + stall and optimize_size.
191 + (swaphi_1, swaphi_2, swapqi_1): Add athlon_decode.
192 + (swapsi, swaphi_1, swaphi_2, swapqi_1, swapdi): Remove modrm override.
194 +2004-12-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
196 + PR middle-end/18730
197 + * emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn): When
198 + the first/last insn is a sequence, return the first/last insn of the
201 +2004-12-12 Richard Henderson <rth@redhat.com>
204 + * config/i386/i386.md (all splits and peepholes): Use flags_reg_operand
205 + and compare_operator to propagate the input CC mode to the output.
206 + * config/i386/i386.c (flags_reg_operand, compare_operator): New.
207 + * config/i386/i386.h (PREDICATE_CODES): Add them.
208 + * config/i386/i386-protos.h: Update.
210 +2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
212 + PR rtl-optimization/16536
213 + Backport from mainline:
214 + 2004-06-25 Mark Mitchell <mark@codesourcery.com>
215 + * alias.c (get_alias_set): Adjust setting of
216 + DECL_POINTER_ALIAS_SET for pointers to aggregates.
218 +2004-12-09 Richard Henderson <rth@redhat.com>
221 + * config/i386/i386.md (testqi_1_maybe_si, andqi_2_maybe_si): New.
222 + (test_qi_1, andqi_2): Do not promote to simode.
224 +2004-12-07 David Mosberger <davidm@hpl.hp.com>
227 + * config/ia64/ia64.c (ia64_assemble_integer): Add support for
228 + emitting unaligned pointer-sized integers.
230 +2004-12-05 Richard Henderson <rth@redhat.com>
233 + * config/alpha/alpha.md (UNSPECV_SETJMPR_ER): New.
234 + (builtin_setjmp_receiver_er_sl_1): Use it.
235 + (builtin_setjmp_receiver_er_1): Likewise.
236 + (builtin_setjmp_receiver_er, exception_receiver_er): Remove.
237 + (builtin_setjmp_receiver): Don't split for explicit relocs until
239 + (exception_receiver): Likewise.
241 +2004-12-03 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
243 + 2003-10-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
244 + Backport from mainline
245 + * aclocal.m4 (gcc_AC_FUNC_MMAP_BLACKLIST): Blacklist ultrix*.
246 + * configure: Rebuilt.
248 +2004-12-03 Richard Henderson <rth@redhat.com>
250 + 2004-09-24 Richard Henderson <rth@redhat.com>
252 + * regclass.c (subregs_of_mode): Turn into an htab. Make static.
253 + (som_hash, som_eq): New.
254 + (init_subregs_of_mode, record_subregs_of_mode): New.
255 + (cannot_change_mode_set_regs): Rewrite for htab implementation.
256 + (invalid_mode_change_p): Likewise.
257 + * combine.c (gen_lowpart_for_combine): Use record_subregs_of_mode.
258 + * flow.c (mark_used_regs): Likewise.
259 + (life_analysis): Use init_subregs_of_mode.
260 + * regs.h (subregs_of_mode): Remove.
261 + * rtl.h (init_subregs_of_mode, record_subregs_of_mode): Declare.
263 +2004-12-03 Roger Sayle <roger@eyesopen.com>
266 + * config/i386/i386.md (*call_value_1): Correct Intel assembler
267 + syntax by using %A1 instead of %*%1.
269 +2004-12-01 Alan Modra <amodra@bigpond.net.au>
272 + * config/rs6000/rs6000.c (rs6000_emit_prologue): Use r0 for vrsave.
274 +2004-11-29 Roger Sayle <roger@eyesopen.com>
276 + PR rtl-optimization/9771
277 + * regclass.c (CALL_REALLY_USED_REGNO_P): New macro to eliminate
278 + conditional compilation in init_reg_sets_1.
279 + (init_reg_sets_1): Let global_regs[i] take priority over the frame
280 + (but not stack) pointer exceptions to regs_invalidated_by_call.
281 + (globalize_reg): Globalizing a fixed register may need to update
282 + regs_invalidated_by_call.
284 +2004-11-27 Falk Hueffner <falk@debian.org>
285 + Eric Botcazou <ebotcazou@libertysurf.fr>
287 + PR optimization/18577
288 + * unroll.c (unroll_loop): Test both REGNO_LAST_UID and
289 + REGNO_LAST_NOTE_UID to decide whether a pseudo is local
292 +2004-11-27 Alan Modra <amodra@bigpond.net.au>
295 + * config/rs6000/rs6000.c (init_cumulative_args): Set call_cookie
296 + from rs6000_default_long_calls for libcalls.
298 +2004-11-25 Richard Henderson <rth@redhat.com>
301 + * reload1.c (set_initial_eh_label_offset): New.
302 + (set_initial_label_offsets): Use it.
304 +2004-11-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
306 + PR rtl-optimization/14838
307 + * emit-rtl.c (get_first_nonnote_insn): Don't assume first insn is a
309 + (get_last_nonnote_insn): Don't assume last insn is a note.
311 +2004-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
313 + * doc/install.texi (*-*-solaris2*): Update with info about kernel
314 + patches to solve spurious testsuite failures.
316 +2004-10-13 Eric Botcazou <ebotcazou@libertysurf.fr>
319 + * config/sparc/sparc.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Set to
320 + sparc_can_output_mi_thunk.
321 + (sparc_output_mi_thunk): Simplify handling of delta offset. Add
322 + handling of vcall offset.
323 + (sparc_can_output_mi_thunk): New predicate.
324 + * doc/tm.texi (TARGET_ASM_OUTPUT_MI_THUNK): Document VCALL_OFFSET.
325 + (TARGET_ASM_OUTPUT_MI_VCALL_THUNK): Delete.
326 + (TARGET_ASM_CAN_OUTPUT_MI_THUNK): New target hook.
328 + * config/sparc/sparc.md (movdi): Remove redundant test.
330 +2004-10-07 Eric Botcazou <ebotcazou@libertysurf.fr>
332 + * doc/install.texi (*-*-solaris2*): Fix marker for URL.
334 +2004-10-06 Eric Botcazou <ebotcazou@libertysurf.fr>
337 + * doc/install.texi (*-*-solaris2*): Mention potential problem
338 + with Sun assembler + GNU linker and C++ programs.
339 + Document status of binutils 2.15 release.
341 +2004-09-30 Richard Henderson <rth@redhat.com>
343 + * config/alpha/qrnnd.asm: Mark for noexecstack.
345 +2004-09-30 Richard Henderson <rth@redhat.com>
347 + * unwind-dw2.c (_Unwind_GetGR): Honor DWARF_ZERO_REG.
348 + * doc/tm.texi (DWARF_ZERO_REG): New.
350 + * config/alpha/alpha.c (alpha_sa_mask, alpha_expand_prologue,
351 + alpha_expand_epilogue): Revert 2003-09-30 change to store zero.
352 + * config/alpha/alpha.h (DWARF_ZERO_REG): New.
354 2004-09-30 Release Manager
356 * GCC 3.3.5 Released.
359 2004-09-13 Richard Henderson <rth@redhat.com>
362 - * cselib.c (cselib_invalidate_rtx): Export. Remove unused args.
363 - (cselib_invalidate_rtx_note_stores): New.
364 - (cselib_record_sets, cselib_process_insn): Update to match.
365 - * cselib.h (cselib_invalidate_rtx): Declare.
366 - * reload1.c (reload_cse_simplify): Invalidate asm clobbers.
368 + * cselib.c (cselib_invalidate_rtx): Export. Remove unused args.
369 + (cselib_invalidate_rtx_note_stores): New.
370 + (cselib_record_sets, cselib_process_insn): Update to match.
371 + * cselib.h (cselib_invalidate_rtx): Declare.
372 + * reload1.c (reload_cse_simplify): Invalidate asm clobbers.
374 2004-08-29 Jonathan Wakely <redi@gcc.gnu.org>
377 2004-07-25 Andreas Jaeger <aj@suse.de>
379 Backport from mainline:
380 - * libgcc-std.ver: Add __unorddf2 and __unordsf2 with version 3.3.4.
381 + * libgcc-std.ver: Add __unorddf2 and __unordsf2 with version 3.3.4.
383 2004-07-25 Kaz Kojima <kkojima@gcc.gnu.org>
385 @@ -155,14 +466,14 @@
386 side-effect of having a length greater or equal to 3.
388 2004-07-13 Eric Botcazou <ebotcazou@libertysurf.fr>
389 - Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
390 + Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
393 * config/sparc/sol2-bi.h (LINK_ARCH64_SPEC_BASE): Pass
394 /usr/ucblib/sparcv9 as -R path when -compat-bsd is specified.
396 2004-07-13 Eric Botcazou <ebotcazou@libertysurf.fr>
397 - Martin Sebor <sebor@roguewave.com>
398 + Martin Sebor <sebor@roguewave.com>
401 * doc/invoke.texi (SPARC options): Document -threads
402 @@ -252,18 +563,18 @@
404 Backport from mainline:
405 2004-01-19 Richard Henderson <rth@redhat.com>
406 - * alpha.md (UNSPEC_NT_LDA): Renumber.
407 - (UNSPEC_CVTLQ, cvtlq): New.
408 - (extendsidi2_1): Rename from extendsidi2_nofix; remove f/f.
409 - (extendsidi2_fix): Remove.
410 - (extendsidi2 splitter): Use cvtlq.
411 - (extendsidi2 fp peepholes): Remove.
412 - (cvtql): Use SFmode instead of SImode.
413 - (fix_trunc?fsi): Update to match.
414 - (floatsisf2_ieee, floatsisf2, floatsidf2_ieee, floatsidf2): New.
415 - (movsi): Rename from movsi_nofix, remove f alternatives.
416 - (movsi_nt_vms): Similarly.
417 - (movsi_fix, movsi_nt_vms_fix): Remove.
418 + * alpha.md (UNSPEC_NT_LDA): Renumber.
419 + (UNSPEC_CVTLQ, cvtlq): New.
420 + (extendsidi2_1): Rename from extendsidi2_nofix; remove f/f.
421 + (extendsidi2_fix): Remove.
422 + (extendsidi2 splitter): Use cvtlq.
423 + (extendsidi2 fp peepholes): Remove.
424 + (cvtql): Use SFmode instead of SImode.
425 + (fix_trunc?fsi): Update to match.
426 + (floatsisf2_ieee, floatsisf2, floatsidf2_ieee, floatsidf2): New.
427 + (movsi): Rename from movsi_nofix, remove f alternatives.
428 + (movsi_nt_vms): Similarly.
429 + (movsi_fix, movsi_nt_vms_fix): Remove.
431 2004-05-26 Hans-Peter Nilsson <hp@axis.com>
433 Index: gcc/aclocal.m4
434 ===================================================================
435 RCS file: /cvs/gcc/gcc/gcc/aclocal.m4,v
436 retrieving revision 1.61.2.4
437 retrieving revision 1.61.2.5
438 diff -u -r1.61.2.4 -r1.61.2.5
439 --- gcc/gcc/aclocal.m4 1 Oct 2003 21:56:34 -0000 1.61.2.4
440 +++ gcc/gcc/aclocal.m4 4 Dec 2004 01:51:47 -0000 1.61.2.5
442 # read() to the same fd. The only system known to have a problem here
443 # is VMS, where text files have record structure.
447 gcc_cv_func_mmap_file=no ;;
449 gcc_cv_func_mmap_file=yes;;
451 ===================================================================
452 RCS file: /cvs/gcc/gcc/gcc/alias.c,v
453 retrieving revision 1.181.2.6
454 retrieving revision 1.181.2.7
455 diff -u -r1.181.2.6 -r1.181.2.7
456 --- gcc/gcc/alias.c 28 May 2004 17:27:27 -0000 1.181.2.6
457 +++ gcc/gcc/alias.c 10 Dec 2004 17:25:00 -0000 1.181.2.7
459 /* If we haven't computed the actual alias set, do it now. */
460 if (DECL_POINTER_ALIAS_SET (decl) == -2)
462 + tree pointed_to_type = TREE_TYPE (TREE_TYPE (decl));
464 /* No two restricted pointers can point at the same thing.
465 However, a restricted pointer can point at the same thing
466 as an unrestricted pointer, if that unrestricted pointer
467 @@ -516,11 +518,22 @@
468 alias set for the type pointed to by the type of the
470 HOST_WIDE_INT pointed_to_alias_set
471 - = get_alias_set (TREE_TYPE (TREE_TYPE (decl)));
472 + = get_alias_set (pointed_to_type);
474 if (pointed_to_alias_set == 0)
475 /* It's not legal to make a subset of alias set zero. */
477 + DECL_POINTER_ALIAS_SET (decl) = 0;
478 + else if (AGGREGATE_TYPE_P (pointed_to_type))
479 + /* For an aggregate, we must treat the restricted
480 + pointer the same as an ordinary pointer. If we
481 + were to make the type pointed to by the
482 + restricted pointer a subset of the pointed-to
483 + type, then we would believe that other subsets
484 + of the pointed-to type (such as fields of that
485 + type) do not conflict with the type pointed to
486 + by the restricted pointer. */
487 + DECL_POINTER_ALIAS_SET (decl)
488 + = pointed_to_alias_set;
491 DECL_POINTER_ALIAS_SET (decl) = new_alias_set ();
492 Index: gcc/c-parse.in
493 ===================================================================
494 RCS file: /cvs/gcc/gcc/gcc/c-parse.in,v
495 retrieving revision 1.152.14.1
496 retrieving revision 1.152.14.2
497 diff -u -r1.152.14.1 -r1.152.14.2
498 --- gcc/gcc/c-parse.in 28 Jan 2003 01:54:03 -0000 1.152.14.1
499 +++ gcc/gcc/c-parse.in 21 Dec 2004 21:51:26 -0000 1.152.14.2
500 @@ -2177,6 +2177,7 @@
503 $$ = add_stmt (build_stmt (COMPOUND_STMT, last_tree));
504 + last_expr_type = NULL_TREE;
509 ===================================================================
510 RCS file: /cvs/gcc/gcc/gcc/combine.c,v
511 retrieving revision 1.325.2.17
512 retrieving revision 1.325.2.19
513 diff -u -r1.325.2.17 -r1.325.2.19
514 --- gcc/gcc/combine.c 25 Jul 2004 18:49:54 -0000 1.325.2.17
515 +++ gcc/gcc/combine.c 18 Jan 2005 08:39:05 -0000 1.325.2.19
516 @@ -10138,13 +10138,8 @@
518 result = gen_lowpart_common (mode, x);
519 #ifdef CANNOT_CHANGE_MODE_CLASS
521 - && GET_CODE (result) == SUBREG
522 - && GET_CODE (SUBREG_REG (result)) == REG
523 - && REGNO (SUBREG_REG (result)) >= FIRST_PSEUDO_REGISTER)
524 - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (result))
526 - + GET_MODE (result));
527 + if (result != 0 && GET_CODE (result) == SUBREG)
528 + record_subregs_of_mode (result);
532 @@ -10818,34 +10813,61 @@
536 - /* Check for the case where we are comparing A - C1 with C2,
537 - both constants are smaller than 1/2 the maximum positive
538 - value in MODE, and the comparison is equality or unsigned.
539 - In that case, if A is either zero-extended to MODE or has
540 - sufficient sign bits so that the high-order bit in MODE
541 - is a copy of the sign in the inner mode, we can prove that it is
542 - safe to do the operation in the wider mode. This simplifies
543 - many range checks. */
544 + /* Check for the case where we are comparing A - C1 with C2, that is
546 + (subreg:MODE (plus (A) (-C1))) op (C2)
548 + with C1 a constant, and try to lift the SUBREG, i.e. to do the
549 + comparison in the wider mode. One of the following two conditions
550 + must be true in order for this to be valid:
552 + 1. The mode extension results in the same bit pattern being added
553 + on both sides and the comparison is equality or unsigned. As
554 + C2 has been truncated to fit in MODE, the pattern can only be
557 + 2. The mode extension results in the sign bit being copied on
560 + The difficulty here is that we have predicates for A but not for
561 + (A - C1) so we need to check that C1 is within proper bounds so
562 + as to perturbate A as little as possible. */
564 if (mode_width <= HOST_BITS_PER_WIDE_INT
565 && subreg_lowpart_p (op0)
566 + && GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0))) > mode_width
567 && GET_CODE (SUBREG_REG (op0)) == PLUS
568 - && GET_CODE (XEXP (SUBREG_REG (op0), 1)) == CONST_INT
569 - && INTVAL (XEXP (SUBREG_REG (op0), 1)) < 0
570 - && (-INTVAL (XEXP (SUBREG_REG (op0), 1))
571 - < (HOST_WIDE_INT) (GET_MODE_MASK (mode) / 2))
572 - && (unsigned HOST_WIDE_INT) const_op < GET_MODE_MASK (mode) / 2
573 - && (0 == (nonzero_bits (XEXP (SUBREG_REG (op0), 0),
574 - GET_MODE (SUBREG_REG (op0)))
575 - & ~GET_MODE_MASK (mode))
576 - || (num_sign_bit_copies (XEXP (SUBREG_REG (op0), 0),
577 - GET_MODE (SUBREG_REG (op0)))
579 - (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (op0)))
580 - - GET_MODE_BITSIZE (mode)))))
581 + && GET_CODE (XEXP (SUBREG_REG (op0), 1)) == CONST_INT)
583 - op0 = SUBREG_REG (op0);
585 + enum machine_mode inner_mode = GET_MODE (SUBREG_REG (op0));
586 + rtx a = XEXP (SUBREG_REG (op0), 0);
587 + HOST_WIDE_INT c1 = -INTVAL (XEXP (SUBREG_REG (op0), 1));
590 + && (unsigned HOST_WIDE_INT) c1
591 + < (unsigned HOST_WIDE_INT) 1 << (mode_width - 1)
592 + && (equality_comparison_p || unsigned_comparison_p)
593 + /* (A - C1) zero-extends if it is positive and sign-extends
594 + if it is negative, C2 both zero- and sign-extends. */
595 + && ((0 == (nonzero_bits (a, inner_mode)
596 + & ~GET_MODE_MASK (mode))
598 + /* (A - C1) sign-extends if it is positive and 1-extends
599 + if it is negative, C2 both sign- and 1-extends. */
600 + || (num_sign_bit_copies (a, inner_mode)
601 + > (unsigned int) (GET_MODE_BITSIZE (inner_mode)
604 + || ((unsigned HOST_WIDE_INT) c1
605 + < (unsigned HOST_WIDE_INT) 1 << (mode_width - 2)
606 + /* (A - C1) always sign-extends, like C2. */
607 + && num_sign_bit_copies (a, inner_mode)
608 + > (unsigned int) (GET_MODE_BITSIZE (inner_mode)
609 + - mode_width - 1)))
611 + op0 = SUBREG_REG (op0);
616 /* If the inner mode is narrower and we are extracting the low part,
618 ===================================================================
619 RCS file: /cvs/gcc/gcc/gcc/configure,v
620 retrieving revision 1.641.2.23
621 retrieving revision 1.641.2.24
622 diff -u -r1.641.2.23 -r1.641.2.24
623 --- gcc/gcc/configure 1 Apr 2004 16:55:23 -0000 1.641.2.23
624 +++ gcc/gcc/configure 4 Dec 2004 01:51:43 -0000 1.641.2.24
625 @@ -2399,7 +2399,7 @@
628 # Find some useful tools
629 -for ac_prog in gawk mawk nawk awk
630 +for ac_prog in mawk gawk nawk awk
632 # Extract the first word of "$ac_prog", so it can be a program name with args.
633 set dummy $ac_prog; ac_word=$2
634 @@ -3947,7 +3947,7 @@
635 # read() to the same fd. The only system known to have a problem here
636 # is VMS, where text files have record structure.
640 gcc_cv_func_mmap_file=no ;;
642 gcc_cv_func_mmap_file=yes;;
643 @@ -8120,7 +8120,7 @@
644 echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
646 echo $ac_n "checking linker --as-needed support""... $ac_c" 1>&6
647 -echo "configure:8250: checking linker --as-needed support" >&5
648 +echo "configure:8124: checking linker --as-needed support" >&5
649 gcc_cv_ld_as_needed=no
650 if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
651 if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
652 @@ -8144,7 +8144,7 @@
655 echo $ac_n "checking whether libgloss uses STARTUP directives consistently""... $ac_c" 1>&6
656 -echo "configure:8127: checking whether libgloss uses STARTUP directives consistently" >&5
657 +echo "configure:8148: checking whether libgloss uses STARTUP directives consistently" >&5
658 gcc_cv_mips_libgloss_startup=no
659 gcc_cv_libgloss_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/libgloss
660 if test "x$exec_prefix" = xNONE; then
661 @@ -8349,7 +8349,7 @@
664 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
665 -echo "configure:8332: checking whether to enable maintainer-specific portions of Makefiles" >&5
666 +echo "configure:8353: checking whether to enable maintainer-specific portions of Makefiles" >&5
667 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
668 if test "${enable_maintainer_mode+set}" = set; then
669 enableval="$enable_maintainer_mode"
670 Index: gcc/emit-rtl.c
671 ===================================================================
672 RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
673 retrieving revision 1.303.2.5
674 retrieving revision 1.303.2.7
675 diff -u -r1.303.2.5 -r1.303.2.7
676 --- gcc/gcc/emit-rtl.c 18 Jun 2004 17:08:48 -0000 1.303.2.5
677 +++ gcc/gcc/emit-rtl.c 14 Dec 2004 04:06:08 -0000 1.303.2.7
678 @@ -2890,11 +2890,19 @@
680 rtx insn = first_insn;
685 - insn = next_insn (insn);
686 - if (insn == 0 || GET_CODE (insn) != NOTE)
689 + for (insn = next_insn (insn);
690 + insn && NOTE_P (insn);
691 + insn = next_insn (insn))
695 + if (GET_CODE (insn) == INSN
696 + && GET_CODE (PATTERN (insn)) == SEQUENCE)
697 + insn = XVECEXP (PATTERN (insn), 0, 0);
702 @@ -2908,11 +2916,20 @@
704 rtx insn = last_insn;
709 - insn = previous_insn (insn);
710 - if (insn == 0 || GET_CODE (insn) != NOTE)
713 + for (insn = previous_insn (insn);
714 + insn && NOTE_P (insn);
715 + insn = previous_insn (insn))
719 + if (GET_CODE (insn) == INSN
720 + && GET_CODE (PATTERN (insn)) == SEQUENCE)
721 + insn = XVECEXP (PATTERN (insn), 0,
722 + XVECLEN (PATTERN (insn), 0) - 1);
728 ===================================================================
729 RCS file: /cvs/gcc/gcc/gcc/expr.c,v
730 retrieving revision 1.498.2.31
731 retrieving revision 1.498.2.32
732 diff -u -r1.498.2.31 -r1.498.2.32
733 --- gcc/gcc/expr.c 16 May 2004 20:27:15 -0000 1.498.2.31
734 +++ gcc/gcc/expr.c 20 Dec 2004 02:43:00 -0000 1.498.2.32
735 @@ -8462,9 +8462,14 @@
736 /* At this point, a MEM target is no longer useful; we will get better
739 - if (GET_CODE (target) == MEM)
740 + if (! REG_P (target))
741 target = gen_reg_rtx (mode);
743 + /* We generate better code and avoid problems with op1 mentioning
744 + target by forcing op1 into a pseudo if it isn't a constant. */
745 + if (! CONSTANT_P (op1))
746 + op1 = force_reg (mode, op1);
749 emit_move_insn (target, op0);
752 ===================================================================
753 RCS file: /cvs/gcc/gcc/gcc/flow.c,v
754 retrieving revision 1.541.2.6
755 retrieving revision 1.541.2.7
756 diff -u -r1.541.2.6 -r1.541.2.7
757 --- gcc/gcc/flow.c 5 Mar 2004 17:55:50 -0000 1.541.2.6
758 +++ gcc/gcc/flow.c 4 Dec 2004 00:36:35 -0000 1.541.2.7
760 SET_HARD_REG_BIT (elim_reg_set, FRAME_POINTER_REGNUM);
764 #ifdef CANNOT_CHANGE_MODE_CLASS
765 - bitmap_initialize (&subregs_of_mode, 1);
766 + init_subregs_of_mode ();
770 @@ -3851,11 +3850,7 @@
773 #ifdef CANNOT_CHANGE_MODE_CLASS
774 - if (GET_CODE (SUBREG_REG (x)) == REG
775 - && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER)
776 - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (x))
779 + record_subregs_of_mode (x);
782 /* While we're here, optimize this case. */
783 @@ -3900,12 +3895,8 @@
784 || GET_CODE (testreg) == SUBREG)
786 #ifdef CANNOT_CHANGE_MODE_CLASS
787 - if (GET_CODE (testreg) == SUBREG
788 - && GET_CODE (SUBREG_REG (testreg)) == REG
789 - && REGNO (SUBREG_REG (testreg)) >= FIRST_PSEUDO_REGISTER)
790 - bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (testreg))
792 - + GET_MODE (testreg));
793 + if (GET_CODE (testreg) == SUBREG)
794 + record_subregs_of_mode (testreg);
797 /* Modifying a single register in an alternate mode
798 Index: gcc/function.c
799 ===================================================================
800 RCS file: /cvs/gcc/gcc/gcc/function.c,v
801 retrieving revision 1.389.2.16
802 retrieving revision 1.389.2.18
803 diff -u -r1.389.2.16 -r1.389.2.18
804 --- gcc/gcc/function.c 16 May 2004 20:27:16 -0000 1.389.2.16
805 +++ gcc/gcc/function.c 16 Dec 2004 14:04:34 -0000 1.389.2.18
807 int, struct function *));
808 static struct temp_slot *find_temp_slot_from_address PARAMS ((rtx));
809 static void put_reg_into_stack PARAMS ((struct function *, rtx, tree,
810 - enum machine_mode, enum machine_mode,
811 - int, unsigned int, int,
813 + enum machine_mode, unsigned int,
814 + int, int, int, htab_t));
815 static void schedule_fixup_var_refs PARAMS ((struct function *, rtx, tree,
819 ALIGN controls the amount of alignment for the address of the slot:
820 0 means according to MODE,
821 -1 means use BIGGEST_ALIGNMENT and round size to multiple of that,
822 + -2 means use BITS_PER_UNIT,
823 positive specifies alignment boundary in bits.
825 We do not round to stack_boundary here.
827 alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
828 size = CEIL_ROUND (size, alignment);
830 + else if (align == -2)
831 + alignment = 1; /* BITS_PER_UNIT / BITS_PER_UNIT */
833 alignment = align / BITS_PER_UNIT;
835 @@ -1342,9 +1344,9 @@
836 enum machine_mode promoted_mode, decl_mode;
837 struct function *function = 0;
839 - int can_use_addressof;
840 - int volatilep = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl);
841 - int usedp = (TREE_USED (decl)
842 + int can_use_addressof_p;
843 + int volatile_p = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl);
844 + int used_p = (TREE_USED (decl)
845 || (TREE_CODE (decl) != SAVE_EXPR && DECL_INITIAL (decl) != 0));
847 context = decl_function_context (decl);
848 @@ -1391,7 +1393,7 @@
849 /* If this variable lives in the current function and we don't need to put it
850 in the stack for the sake of setjmp or the non-locality, try to keep it in
851 a register until we know we actually need the address. */
853 + can_use_addressof_p
855 && ! (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl))
857 @@ -1404,7 +1406,8 @@
859 /* If we can't use ADDRESSOF, make sure we see through one we already
861 - if (! can_use_addressof && GET_CODE (reg) == MEM
862 + if (! can_use_addressof_p
863 + && GET_CODE (reg) == MEM
864 && GET_CODE (XEXP (reg, 0)) == ADDRESSOF)
865 reg = XEXP (XEXP (reg, 0), 0);
867 @@ -1412,11 +1415,11 @@
869 if (GET_CODE (reg) == REG)
871 - if (can_use_addressof)
872 + if (can_use_addressof_p)
873 gen_mem_addressof (reg, decl, rescan);
875 - put_reg_into_stack (function, reg, TREE_TYPE (decl), promoted_mode,
876 - decl_mode, volatilep, 0, usedp, 0);
877 + put_reg_into_stack (function, reg, TREE_TYPE (decl), decl_mode,
878 + 0, volatile_p, used_p, 0, 0);
880 else if (GET_CODE (reg) == CONCAT)
882 @@ -1432,14 +1435,14 @@
883 #ifdef FRAME_GROWS_DOWNWARD
884 /* Since part 0 should have a lower address, do it second. */
885 put_reg_into_stack (function, hipart, part_type, part_mode,
886 - part_mode, volatilep, 0, 0, 0);
887 + 0, volatile_p, 0, 0, 0);
888 put_reg_into_stack (function, lopart, part_type, part_mode,
889 - part_mode, volatilep, 0, 0, 0);
890 + 0, volatile_p, 0, 1, 0);
892 put_reg_into_stack (function, lopart, part_type, part_mode,
893 - part_mode, volatilep, 0, 0, 0);
894 + 0, volatile_p, 0, 0, 0);
895 put_reg_into_stack (function, hipart, part_type, part_mode,
896 - part_mode, volatilep, 0, 0, 0);
897 + 0, volatile_p, 0, 1, 0);
900 /* Change the CONCAT into a combined MEM for both parts. */
901 @@ -1460,7 +1463,7 @@
902 /* Prevent sharing of rtl that might lose. */
903 if (GET_CODE (XEXP (reg, 0)) == PLUS)
904 XEXP (reg, 0) = copy_rtx (XEXP (reg, 0));
905 - if (usedp && rescan)
906 + if (used_p && rescan)
908 schedule_fixup_var_refs (function, reg, TREE_TYPE (decl),
910 @@ -1474,26 +1477,29 @@
912 /* Subroutine of put_var_into_stack. This puts a single pseudo reg REG
913 into the stack frame of FUNCTION (0 means the current function).
914 + TYPE is the user-level data type of the value hold in the register.
915 DECL_MODE is the machine mode of the user-level data type.
916 - PROMOTED_MODE is the machine mode of the register.
917 - VOLATILE_P is nonzero if this is for a "volatile" decl.
918 - USED_P is nonzero if this reg might have already been used in an insn. */
919 + ORIGINAL_REGNO must be set if the real regno is not visible in REG.
920 + VOLATILE_P is true if this is for a "volatile" decl.
921 + USED_P is true if this reg might have already been used in an insn.
922 + CONSECUTIVE_P is true if the stack slot assigned to reg must be
923 + consecutive with the previous stack slot. */
926 -put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p,
927 - original_regno, used_p, ht)
928 +put_reg_into_stack (function, reg, type, decl_mode, original_regno,
929 + volatile_p, used_p, consecutive_p, ht)
930 struct function *function;
933 - enum machine_mode promoted_mode, decl_mode;
935 + enum machine_mode decl_mode;
936 unsigned int original_regno;
938 + int volatile_p, used_p, consecutive_p;
941 struct function *func = function ? function : cfun;
943 + enum machine_mode mode = GET_MODE (reg);
944 unsigned int regno = original_regno;
949 @@ -1506,7 +1512,8 @@
953 - new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func);
954 + new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode),
955 + consecutive_p ? -2 : 0, func);
958 PUT_MODE (reg, decl_mode);
959 @@ -1528,7 +1535,7 @@
963 - schedule_fixup_var_refs (function, reg, type, promoted_mode, ht);
964 + schedule_fixup_var_refs (function, reg, type, mode, ht);
967 /* Make sure that all refs to the variable, previously made
968 @@ -1716,7 +1723,7 @@
970 ime = (struct insns_for_mem_entry *) htab_find (ht, &tmp);
971 for (insn_list = ime->insns; insn_list != 0; insn_list = XEXP (insn_list, 1))
972 - if (INSN_P (XEXP (insn_list, 0)))
973 + if (INSN_P (XEXP (insn_list, 0)) && !INSN_DELETED_P (XEXP (insn_list, 0)))
974 fixup_var_refs_insn (XEXP (insn_list, 0), var, promoted_mode,
975 unsignedp, 1, may_share);
977 @@ -3025,8 +3032,8 @@
981 - put_reg_into_stack (0, reg, type, GET_MODE (reg), GET_MODE (reg),
982 - volatile_p, ADDRESSOF_REGNO (r), used_p, ht);
983 + put_reg_into_stack (0, reg, type, GET_MODE (reg), ADDRESSOF_REGNO (r),
984 + volatile_p, used_p, 0, ht);
987 /* List of replacements made below in purge_addressof_1 when creating
989 ===================================================================
990 RCS file: /cvs/gcc/gcc/gcc/gccbug.in,v
991 retrieving revision 1.15.34.1
992 retrieving revision 1.15.34.2
993 diff -u -r1.15.34.1 -r1.15.34.2
994 --- gcc/gcc/gccbug.in 2 Jan 2003 05:22:37 -0000 1.15.34.1
995 +++ gcc/gcc/gccbug.in 21 Jan 2005 10:08:47 -0000 1.15.34.2
999 # spam does not need to be listed here
1000 -CATEGORIES="ada bootstrap c++ c debug driver fortran inline-asm java libf2c libgcj libobjc libstdc++ middle-end objc optimization other preprocessor target web"
1001 +CATEGORIES="ada bootstrap c++ c debug driver fortran inline-asm java libf2c libgcj libobjc libstdc++ middle-end objc other preprocessor rtl-optimization target tree-optimization web"
1004 lisp) echo "$CATEGORIES" | \
1005 Index: gcc/regclass.c
1006 ===================================================================
1007 RCS file: /cvs/gcc/gcc/gcc/regclass.c,v
1008 retrieving revision 1.160.4.5
1009 retrieving revision 1.160.4.8
1010 diff -u -r1.160.4.5 -r1.160.4.8
1011 --- gcc/gcc/regclass.c 3 Mar 2003 11:00:15 -0000 1.160.4.5
1012 +++ gcc/gcc/regclass.c 4 Dec 2004 00:36:37 -0000 1.160.4.8
1017 +#include "hashtab.h"
1019 #ifndef REGISTER_MOVE_COST
1020 #define REGISTER_MOVE_COST(m, x, y) 2
1021 @@ -105,6 +106,13 @@
1022 char call_really_used_regs[] = CALL_REALLY_USED_REGISTERS;
1025 +#ifdef CALL_REALLY_USED_REGISTERS
1026 +#define CALL_REALLY_USED_REGNO_P(X) call_really_used_regs[X]
1028 +#define CALL_REALLY_USED_REGNO_P(X) call_used_regs[X]
1032 /* Indexed by hard register number, contains 1 for registers that are
1033 fixed use or call used registers that cannot hold quantities across
1034 calls even if we are willing to save and restore them. call fixed
1035 @@ -228,12 +236,6 @@
1037 #endif /* FORBIDDEN_INC_DEC_CLASSES */
1039 -#ifdef CANNOT_CHANGE_MODE_CLASS
1040 -/* All registers that have been subreged. Indexed by regno * MAX_MACHINE_MODE
1042 -bitmap_head subregs_of_mode;
1045 /* Sample MEM values for use by memory_move_secondary_cost. */
1047 static GTY(()) rtx top_of_stack[MAX_MACHINE_MODE];
1048 @@ -447,7 +449,11 @@
1049 If we are generating PIC code, the PIC offset table register is
1050 preserved across calls, though the target can override that. */
1052 - if (i == STACK_POINTER_REGNUM || i == FRAME_POINTER_REGNUM)
1053 + if (i == STACK_POINTER_REGNUM)
1055 + else if (global_regs[i])
1056 + SET_HARD_REG_BIT (regs_invalidated_by_call, i);
1057 + else if (i == FRAME_POINTER_REGNUM)
1059 #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
1060 else if (i == HARD_FRAME_POINTER_REGNUM)
1061 @@ -461,13 +467,7 @@
1062 else if (i == PIC_OFFSET_TABLE_REGNUM && fixed_regs[i])
1066 -#ifdef CALL_REALLY_USED_REGISTERS
1067 - || call_really_used_regs[i]
1069 - || call_used_regs[i]
1071 - || global_regs[i])
1072 + else if (CALL_REALLY_USED_REGNO_P (i))
1073 SET_HARD_REG_BIT (regs_invalidated_by_call, i);
1076 @@ -792,6 +792,12 @@
1080 + /* If we're globalizing the frame pointer, we need to set the
1081 + appropriate regs_invalidated_by_call bit, even if it's already
1082 + set in fixed_regs. */
1083 + if (i != STACK_POINTER_REGNUM)
1084 + SET_HARD_REG_BIT (regs_invalidated_by_call, i);
1086 /* If already fixed, nothing else to do. */
1090 SET_HARD_REG_BIT (fixed_reg_set, i);
1091 SET_HARD_REG_BIT (call_used_reg_set, i);
1092 SET_HARD_REG_BIT (call_fixed_reg_set, i);
1093 - SET_HARD_REG_BIT (regs_invalidated_by_call, i);
1096 /* Now the data and code for the `regclass' pass, which happens
1097 @@ -2415,9 +2420,15 @@
1099 if (regno >= min_regno)
1101 + /* While the following 3 lines means that the inequality
1102 + REGNO_LAST_UID (regno) <= REGNO_LAST_NOTE_UID (regno)
1103 + is true at the end of the scanning, it may be subsequently
1104 + invalidated (e.g. in load_mems) so it should not be relied
1106 REGNO_LAST_NOTE_UID (regno) = INSN_UID (insn);
1108 REGNO_LAST_UID (regno) = INSN_UID (insn);
1110 if (REGNO_FIRST_UID (regno) == 0)
1111 REGNO_FIRST_UID (regno) = INSN_UID (insn);
1112 /* If we are called by reg_scan_update() (indicated by min_regno
1113 @@ -2614,6 +2625,77 @@
1116 #ifdef CANNOT_CHANGE_MODE_CLASS
1118 +struct subregs_of_mode_node
1120 + unsigned int block;
1121 + unsigned char modes[MAX_MACHINE_MODE];
1124 +static htab_t subregs_of_mode;
1126 +static hashval_t som_hash PARAMS ((const void *));
1127 +static int som_eq PARAMS ((const void *, const void *));
1133 + const struct subregs_of_mode_node *a = x;
1142 + const struct subregs_of_mode_node *a = x;
1143 + const struct subregs_of_mode_node *b = y;
1144 + return a->block == b->block;
1148 +init_subregs_of_mode ()
1150 + if (subregs_of_mode)
1151 + htab_empty (subregs_of_mode);
1153 + subregs_of_mode = htab_create (100, som_hash, som_eq, free);
1157 +record_subregs_of_mode (subreg)
1160 + struct subregs_of_mode_node dummy, *node;
1161 + enum machine_mode mode;
1162 + unsigned int regno;
1165 + if (!REG_P (SUBREG_REG (subreg)))
1168 + regno = REGNO (SUBREG_REG (subreg));
1169 + mode = GET_MODE (subreg);
1171 + if (regno < FIRST_PSEUDO_REGISTER)
1174 + dummy.block = regno & -8;
1175 + slot = htab_find_slot_with_hash (subregs_of_mode, &dummy,
1176 + dummy.block, INSERT);
1180 + node = xcalloc (1, sizeof (*node));
1181 + node->block = regno & -8;
1185 + node->modes[mode] |= 1 << (regno & 7);
1188 /* Set bits in *USED which correspond to registers which can't change
1189 their mode from FROM to any mode in which REGNO was encountered. */
1191 @@ -2623,42 +2705,50 @@
1192 enum machine_mode from;
1195 + struct subregs_of_mode_node dummy, *node;
1196 enum machine_mode to;
1198 - int start = regno * MAX_MACHINE_MODE;
1199 + unsigned char mask;
1202 - EXECUTE_IF_SET_IN_BITMAP (&subregs_of_mode, start, n,
1203 - if (n >= MAX_MACHINE_MODE + start)
1206 - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
1207 - if (! TEST_HARD_REG_BIT (*used, i)
1208 - && REG_CANNOT_CHANGE_MODE_P (i, from, to))
1209 - SET_HARD_REG_BIT (*used, i);
1211 + dummy.block = regno & -8;
1212 + node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
1216 + mask = 1 << (regno & 7);
1217 + for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
1218 + if (node->modes[to] & mask)
1219 + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
1220 + if (!TEST_HARD_REG_BIT (*used, i)
1221 + && REG_CANNOT_CHANGE_MODE_P (i, from, to))
1222 + SET_HARD_REG_BIT (*used, i);
1225 /* Return 1 if REGNO has had an invalid mode change in CLASS from FROM
1229 -invalid_mode_change_p (regno, class, from_mode)
1230 +invalid_mode_change_p (regno, class, from)
1232 - enum reg_class class;
1233 - enum machine_mode from_mode;
1234 + enum reg_class class;
1235 + enum machine_mode from;
1237 - enum machine_mode to_mode;
1239 - int start = regno * MAX_MACHINE_MODE;
1241 - EXECUTE_IF_SET_IN_BITMAP (&subregs_of_mode, start, n,
1242 - if (n >= MAX_MACHINE_MODE + start)
1244 - to_mode = n - start;
1245 - if (CANNOT_CHANGE_MODE_CLASS (from_mode, to_mode, class))
1249 + struct subregs_of_mode_node dummy, *node;
1250 + enum machine_mode to;
1251 + unsigned char mask;
1253 + dummy.block = regno & -8;
1254 + node = htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
1258 + mask = 1 << (regno & 7);
1259 + for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
1260 + if (node->modes[to] & mask)
1261 + if (CANNOT_CHANGE_MODE_CLASS (from, to, class))
1266 #endif /* CANNOT_CHANGE_MODE_CLASS */
1269 ===================================================================
1270 RCS file: /cvs/gcc/gcc/gcc/regs.h,v
1271 retrieving revision 1.26.4.1
1272 retrieving revision 1.26.4.3
1273 diff -u -r1.26.4.1 -r1.26.4.3
1274 --- gcc/gcc/regs.h 3 Mar 2003 11:00:15 -0000 1.26.4.1
1275 +++ gcc/gcc/regs.h 4 Dec 2004 00:36:38 -0000 1.26.4.3
1277 int first_uid; /* UID of first insn to use (REG n) */
1278 int last_uid; /* UID of last insn to use (REG n) */
1279 int last_note_uid; /* UID of last note to use (REG n) */
1280 + /* See the comment in reg_scan_mark_refs on
1281 + the relationship between last_uid and
1284 /* fields set by reg_scan & flow_analysis */
1285 int sets; /* # of times (REG n) is set */
1288 extern varray_type reg_n_info;
1290 -extern bitmap_head subregs_of_mode;
1292 /* Indexed by n, gives number of times (REG n) is used or set. */
1294 #define REG_N_REFS(N) (VARRAY_REG (reg_n_info, N)->refs)
1295 Index: gcc/reload1.c
1296 ===================================================================
1297 RCS file: /cvs/gcc/gcc/gcc/reload1.c,v
1298 retrieving revision 1.366.2.11
1299 retrieving revision 1.366.2.12
1300 diff -u -r1.366.2.11 -r1.366.2.12
1301 --- gcc/gcc/reload1.c 13 Sep 2004 08:54:35 -0000 1.366.2.11
1302 +++ gcc/gcc/reload1.c 26 Nov 2004 05:08:45 -0000 1.366.2.12
1303 @@ -3389,6 +3389,16 @@
1304 num_not_at_initial_offset = 0;
1307 +/* Subroutine of set_initial_label_offsets called via for_each_eh_label. */
1309 +static void set_initial_eh_label_offset PARAMS ((rtx));
1311 +set_initial_eh_label_offset (label)
1314 + set_label_offsets (label, NULL_RTX, 1);
1317 /* Initialize the known label offsets.
1318 Set a known offset for each forced label to be at the initial offset
1319 of each elimination. We do this because we assume that all
1320 @@ -3405,6 +3415,8 @@
1321 for (x = forced_labels; x; x = XEXP (x, 1))
1323 set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
1325 + for_each_eh_label (set_initial_eh_label_offset);
1328 /* Set all elimination offsets to the known values for the code label given
1330 ===================================================================
1331 RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
1332 retrieving revision 1.375.2.8
1333 retrieving revision 1.375.2.9
1334 diff -u -r1.375.2.8 -r1.375.2.9
1335 --- gcc/gcc/rtl.h 24 Apr 2004 19:40:45 -0000 1.375.2.8
1336 +++ gcc/gcc/rtl.h 4 Dec 2004 00:36:38 -0000 1.375.2.9
1337 @@ -2120,6 +2120,8 @@
1338 extern void reg_scan PARAMS ((rtx, unsigned int, int));
1339 extern void reg_scan_update PARAMS ((rtx, rtx, unsigned int));
1340 extern void fix_register PARAMS ((const char *, int, int));
1341 +extern void init_subregs_of_mode PARAMS ((void));
1342 +extern void record_subregs_of_mode PARAMS ((rtx));
1344 extern void cannot_change_mode_set_regs PARAMS ((HARD_REG_SET *,
1346 Index: gcc/tree-inline.c
1347 ===================================================================
1348 RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
1349 retrieving revision 1.38.2.12
1350 retrieving revision 1.38.2.13
1351 diff -u -r1.38.2.12 -r1.38.2.13
1352 --- gcc/gcc/tree-inline.c 12 Mar 2004 22:43:29 -0000 1.38.2.12
1353 +++ gcc/gcc/tree-inline.c 21 Jan 2005 10:02:12 -0000 1.38.2.13
1354 @@ -1173,7 +1173,8 @@
1355 if (!inlinable_function_p (fn, id))
1357 if (warn_inline && DECL_INLINE (fn) && !DID_INLINE_FUNC (fn)
1358 - && !DECL_IN_SYSTEM_HEADER (fn))
1359 + && !DECL_IN_SYSTEM_HEADER (fn)
1360 + && !lookup_attribute ("noinline", DECL_ATTRIBUTES (fn)))
1362 warning_with_decl (fn, "inlining failed in call to `%s'");
1363 warning ("called from here");
1365 ===================================================================
1366 RCS file: /cvs/gcc/gcc/gcc/Attic/unroll.c,v
1367 retrieving revision 1.184.2.9
1368 retrieving revision 1.184.2.10
1369 diff -u -r1.184.2.9 -r1.184.2.10
1370 --- gcc/gcc/unroll.c 17 May 2004 21:05:48 -0000 1.184.2.9
1371 +++ gcc/gcc/unroll.c 27 Nov 2004 16:59:15 -0000 1.184.2.10
1372 @@ -794,6 +794,10 @@
1373 for (r = FIRST_PSEUDO_REGISTER; r < max_reg_before_loop; ++r)
1374 if (REGNO_FIRST_UID (r) > 0 && REGNO_FIRST_UID (r) < max_uid_for_loop
1375 && REGNO_FIRST_LUID (r) >= copy_start_luid
1376 + /* See the comment in reg_scan_mark_refs on the relationship between
1377 + last_uid and last_note_uid. */
1378 + && REGNO_LAST_UID (r) > 0 && REGNO_LAST_UID (r) < max_uid_for_loop
1379 + && REGNO_LAST_LUID (r) <= copy_end_luid
1380 && REGNO_LAST_NOTE_UID (r) > 0 && REGNO_LAST_NOTE_UID (r) < max_uid_for_loop
1381 && REGNO_LAST_NOTE_LUID (r) <= copy_end_luid)
1383 Index: gcc/unwind-dw2.c
1384 ===================================================================
1385 RCS file: /cvs/gcc/gcc/gcc/unwind-dw2.c,v
1386 retrieving revision 1.22.2.9
1387 retrieving revision 1.22.2.11
1388 diff -u -r1.22.2.9 -r1.22.2.11
1389 --- gcc/gcc/unwind-dw2.c 8 May 2004 21:52:42 -0000 1.22.2.9
1390 +++ gcc/gcc/unwind-dw2.c 29 Jan 2005 11:54:24 -0000 1.22.2.11
1392 /* DWARF2 exception handling and frame unwind runtime interface routines.
1393 - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
1394 + Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
1395 Free Software Foundation, Inc.
1397 This file is part of GCC.
1398 @@ -165,6 +165,11 @@
1400 _Unwind_GetGR (struct _Unwind_Context *context, int index)
1402 +#ifdef DWARF_ZERO_REG
1403 + if (index == DWARF_ZERO_REG)
1407 /* This will segfault if the register hasn't been saved. */
1408 return * (_Unwind_Word *) context->reg[index];
1410 @@ -604,6 +609,10 @@
1421 Index: gcc/config/freebsd-spec.h
1422 ===================================================================
1423 RCS file: /cvs/gcc/gcc/gcc/config/freebsd-spec.h,v
1424 retrieving revision 1.2.4.1
1425 retrieving revision 1.2.4.2
1426 diff -u -r1.2.4.1 -r1.2.4.2
1427 --- gcc/gcc/config/freebsd-spec.h 12 Mar 2003 02:38:01 -0000 1.2.4.1
1428 +++ gcc/gcc/config/freebsd-spec.h 14 Jan 2005 02:06:26 -0000 1.2.4.2
1429 @@ -130,13 +130,7 @@
1433 -#if FBSD_MAJOR >= 5
1434 -#define FBSD_LIB_SPEC " \
1436 - %{!pg: %{pthread:-lc_r} -lc} \
1437 - %{pg: %{pthread:-lc_r_p} -lc_p} \
1441 #define FBSD_LIB_SPEC " \
1444 @@ -146,5 +140,11 @@
1446 %{pthread:-lc_r_p}} \
1449 +#define FBSD_LIB_SPEC " \
1451 + %{!pg: %{pthread:-lpthread} -lc} \
1452 + %{pg: %{pthread:-lpthread_p} -lc_p} \
1456 Index: gcc/config/alpha/alpha.c
1457 ===================================================================
1458 RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.c,v
1459 retrieving revision 1.282.4.11
1460 retrieving revision 1.282.4.12
1461 diff -u -r1.282.4.11 -r1.282.4.12
1462 --- gcc/gcc/config/alpha/alpha.c 8 Mar 2004 03:21:46 -0000 1.282.4.11
1463 +++ gcc/gcc/config/alpha/alpha.c 30 Sep 2004 19:36:26 -0000 1.282.4.12
1464 @@ -6766,11 +6766,6 @@
1466 imask |= 1L << regno;
1469 - /* Glibc likes to use $31 as an unwind stopper for crt0. To
1470 - avoid hackery in unwind-dw2.c, we need to actively store a
1471 - zero in the prologue of _Unwind_RaiseException et al. */
1472 - imask |= 1UL << 31;
1475 /* If any register spilled, then spill the return address also. */
1476 @@ -7236,24 +7231,6 @@
1480 - /* Store a zero if requested for unwinding. */
1481 - if (imask & (1UL << 31))
1485 - mem = gen_rtx_MEM (DImode, plus_constant (sa_reg, reg_offset));
1486 - set_mem_alias_set (mem, alpha_sr_alias_set);
1487 - insn = emit_move_insn (mem, const0_rtx);
1489 - RTX_FRAME_RELATED_P (insn) = 1;
1490 - t = gen_rtx_REG (Pmode, 31);
1491 - t = gen_rtx_SET (VOIDmode, mem, t);
1492 - t = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR, t, REG_NOTES (insn));
1493 - REG_NOTES (insn) = t;
1498 for (i = 0; i < 31; i++)
1499 if (fmask & (1L << i))
1501 @@ -7674,9 +7651,6 @@
1505 - if (imask & (1UL << 31))
1508 for (i = 0; i < 31; ++i)
1509 if (fmask & (1L << i))
1511 Index: gcc/config/alpha/alpha.h
1512 ===================================================================
1513 RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.h,v
1514 retrieving revision 1.185.4.6
1515 retrieving revision 1.185.4.7
1516 diff -u -r1.185.4.6 -r1.185.4.7
1517 --- gcc/gcc/config/alpha/alpha.h 27 Aug 2004 00:01:15 -0000 1.185.4.6
1518 +++ gcc/gcc/config/alpha/alpha.h 30 Sep 2004 19:36:28 -0000 1.185.4.7
1519 @@ -1299,6 +1299,7 @@
1520 #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, 26)
1521 #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (26)
1522 #define DWARF_ALT_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (64)
1523 +#define DWARF_ZERO_REG 31
1525 /* Describe how we implement __builtin_eh_return. */
1526 #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 16 : INVALID_REGNUM)
1527 Index: gcc/config/alpha/alpha.md
1528 ===================================================================
1529 RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.md,v
1530 retrieving revision 1.199.4.6
1531 retrieving revision 1.199.4.7
1532 diff -u -r1.199.4.6 -r1.199.4.7
1533 --- gcc/gcc/config/alpha/alpha.md 28 May 2004 00:02:03 -0000 1.199.4.6
1534 +++ gcc/gcc/config/alpha/alpha.md 5 Dec 2004 19:58:42 -0000 1.199.4.7
1536 (UNSPECV_PLDGP2 11) ; prologue ldgp
1539 + (UNSPECV_SETJMPR_ER 14) ; builtin_setjmp_receiver fragment
1542 ;; Where necessary, the suffixes _le and _be are used to distinguish between
1543 @@ -6764,70 +6765,44 @@
1545 [(set_attr "type" "ibr")])
1547 -(define_insn "*builtin_setjmp_receiver_er_sl_1"
1548 - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
1549 - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF && TARGET_AS_CAN_SUBTRACT_LABELS"
1550 - "lda $27,$LSJ%=-%l0($27)\n$LSJ%=:")
1552 -(define_insn "*builtin_setjmp_receiver_er_1"
1553 - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
1554 - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF"
1555 - "br $27,$LSJ%=\n$LSJ%=:"
1556 - [(set_attr "type" "ibr")])
1559 - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
1560 - "TARGET_EXPLICIT_RELOCS && TARGET_ABI_OSF
1561 - && prev_nonnote_insn (insn) == operands[0]"
1565 - emit_note (NULL, NOTE_INSN_DELETED);
1569 -(define_insn "*builtin_setjmp_receiver_1"
1570 +(define_expand "builtin_setjmp_receiver"
1571 [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
1573 - "br $27,$LSJ%=\n$LSJ%=:\;ldgp $29,0($27)"
1574 - [(set_attr "length" "12")
1575 - (set_attr "type" "multi")])
1578 -(define_expand "builtin_setjmp_receiver_er"
1579 - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)
1580 +(define_insn_and_split "*builtin_setjmp_receiver_1"
1581 + [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR)]
1584 + if (TARGET_EXPLICIT_RELOCS)
1587 + return "br $27,$LSJ%=\n$LSJ%=:\;ldgp $29,0($27)";
1589 + "&& TARGET_EXPLICIT_RELOCS && reload_completed"
1590 + [(unspec_volatile [(match_dup 0)] UNSPECV_SETJMPR_ER)
1592 (unspec_volatile:DI [(match_dup 2) (match_dup 3)] UNSPECV_LDGP1))
1594 (unspec:DI [(match_dup 1) (match_dup 3)] UNSPEC_LDGP2))]
1597 operands[1] = pic_offset_table_rtx;
1598 operands[2] = gen_rtx_REG (Pmode, 27);
1599 operands[3] = GEN_INT (alpha_next_sequence_number++);
1602 + [(set_attr "length" "12")
1603 + (set_attr "type" "multi")])
1605 -(define_expand "builtin_setjmp_receiver"
1606 - [(unspec_volatile [(label_ref (match_operand 0 "" ""))] UNSPECV_SETJMPR)]
1609 - if (TARGET_EXPLICIT_RELOCS)
1611 - emit_insn (gen_builtin_setjmp_receiver_er (operands[0]));
1615 +(define_insn "*builtin_setjmp_receiver_er_sl_1"
1616 + [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR_ER)]
1617 + "TARGET_ABI_OSF && TARGET_EXPLICIT_RELOCS && TARGET_AS_CAN_SUBTRACT_LABELS"
1618 + "lda $27,$LSJ%=-%l0($27)\n$LSJ%=:")
1620 -(define_expand "exception_receiver_er"
1621 - [(set (match_dup 0)
1622 - (unspec_volatile:DI [(match_dup 1) (match_dup 2)] UNSPECV_LDGP1))
1623 - (set (match_dup 0)
1624 - (unspec:DI [(match_dup 0) (match_dup 2)] UNSPEC_LDGP2))]
1627 - operands[0] = pic_offset_table_rtx;
1628 - operands[1] = gen_rtx_REG (Pmode, 26);
1629 - operands[2] = GEN_INT (alpha_next_sequence_number++);
1631 +(define_insn "*builtin_setjmp_receiver_er_1"
1632 + [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_SETJMPR_ER)]
1633 + "TARGET_ABI_OSF && TARGET_EXPLICIT_RELOCS"
1634 + "br $27,$LSJ%=\n$LSJ%=:"
1635 + [(set_attr "type" "ibr")])
1637 (define_expand "exception_receiver"
1638 [(unspec_volatile [(match_dup 0)] UNSPECV_EHR)]
1639 @@ -6835,28 +6810,38 @@
1641 if (TARGET_LD_BUGGY_LDGP)
1642 operands[0] = alpha_gp_save_rtx ();
1643 - else if (TARGET_EXPLICIT_RELOCS)
1645 - emit_insn (gen_exception_receiver_er ());
1649 operands[0] = const0_rtx;
1652 -(define_insn "*exception_receiver_1"
1653 - [(unspec_volatile [(const_int 0)] UNSPECV_EHR)]
1654 - "! TARGET_LD_BUGGY_LDGP"
1656 - [(set_attr "length" "8")
1657 - (set_attr "type" "multi")])
1659 (define_insn "*exception_receiver_2"
1660 [(unspec_volatile [(match_operand:DI 0 "memory_operand" "m")] UNSPECV_EHR)]
1661 - "TARGET_LD_BUGGY_LDGP"
1662 + "TARGET_ABI_OSF && TARGET_LD_BUGGY_LDGP"
1664 [(set_attr "type" "ild")])
1666 +(define_insn_and_split "*exception_receiver_1"
1667 + [(unspec_volatile [(const_int 0)] UNSPECV_EHR)]
1670 + if (TARGET_EXPLICIT_RELOCS)
1671 + return "ldah $29,0($26)\t\t!gpdisp!%*\;lda $29,0($29)\t\t!gpdisp!%*";
1673 + return "ldgp $29,0($26)";
1675 + "&& TARGET_EXPLICIT_RELOCS && reload_completed"
1676 + [(set (match_dup 0)
1677 + (unspec_volatile:DI [(match_dup 1) (match_dup 2)] UNSPECV_LDGP1))
1678 + (set (match_dup 0)
1679 + (unspec:DI [(match_dup 0) (match_dup 2)] UNSPEC_LDGP2))]
1681 + operands[0] = pic_offset_table_rtx;
1682 + operands[1] = gen_rtx_REG (Pmode, 26);
1683 + operands[2] = GEN_INT (alpha_next_sequence_number++);
1685 + [(set_attr "length" "8")
1686 + (set_attr "type" "multi")])
1688 (define_expand "nonlocal_goto_receiver"
1689 [(unspec_volatile [(const_int 0)] UNSPECV_BLOCKAGE)
1690 (set (reg:DI 27) (mem:DI (reg:DI 29)))
1691 Index: gcc/config/alpha/qrnnd.asm
1692 ===================================================================
1693 RCS file: /cvs/gcc/gcc/gcc/config/alpha/qrnnd.asm,v
1694 retrieving revision 1.1
1695 retrieving revision 1.1.60.1
1696 diff -u -r1.1 -r1.1.60.1
1697 --- gcc/gcc/config/alpha/qrnnd.asm 15 Apr 2000 16:34:38 -0000 1.1
1698 +++ gcc/gcc/config/alpha/qrnnd.asm 30 Sep 2004 19:36:28 -0000 1.1.60.1
1700 # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
1701 # MA 02111-1307, USA.
1704 +.section .note.GNU-stack,""
1710 Index: gcc/config/i386/i386-protos.h
1711 ===================================================================
1712 RCS file: /cvs/gcc/gcc/gcc/config/i386/i386-protos.h,v
1713 retrieving revision 1.86.2.2
1714 retrieving revision 1.86.2.3
1715 diff -u -r1.86.2.2 -r1.86.2.3
1716 --- gcc/gcc/config/i386/i386-protos.h 8 Jul 2003 19:16:44 -0000 1.86.2.2
1717 +++ gcc/gcc/config/i386/i386-protos.h 12 Dec 2004 21:00:44 -0000 1.86.2.3
1719 extern int cmpsi_operand PARAMS ((rtx, enum machine_mode));
1720 extern int long_memory_operand PARAMS ((rtx, enum machine_mode));
1721 extern int aligned_operand PARAMS ((rtx, enum machine_mode));
1722 +extern int compare_operator PARAMS ((rtx, enum machine_mode));
1723 +extern int flags_reg_operand PARAMS ((rtx, enum machine_mode));
1724 extern enum machine_mode ix86_cc_mode PARAMS ((enum rtx_code, rtx, rtx));
1726 extern int ix86_expand_movstr PARAMS ((rtx, rtx, rtx, rtx));
1727 Index: gcc/config/i386/i386.c
1728 ===================================================================
1729 RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
1730 retrieving revision 1.495.2.36
1731 retrieving revision 1.495.2.37
1732 diff -u -r1.495.2.36 -r1.495.2.37
1733 --- gcc/gcc/config/i386/i386.c 18 May 2004 05:07:52 -0000 1.495.2.36
1734 +++ gcc/gcc/config/i386/i386.c 12 Dec 2004 21:00:44 -0000 1.495.2.37
1735 @@ -3609,6 +3609,20 @@
1736 return ANY_QI_REG_P (op);
1739 +/* Return true if op is an flags register. */
1742 +flags_reg_operand (op, mode)
1744 + enum machine_mode mode;
1746 + if (mode != VOIDmode && GET_MODE (op) != mode)
1748 + return (GET_CODE (op) == REG
1749 + && REGNO (op) == FLAGS_REG
1750 + && GET_MODE (op) != VOIDmode);
1753 /* Return true if op is a NON_Q_REGS class register. */
1756 @@ -3969,6 +3983,14 @@
1757 /* Didn't find one -- this must be an aligned address. */
1762 +compare_operator (op, mode)
1764 + enum machine_mode mode ATTRIBUTE_UNUSED;
1766 + return GET_CODE (op) == COMPARE;
1769 /* Return true if the constant is something that can be loaded with
1770 a special instruction. Only handle 0.0 and 1.0; others are less
1771 Index: gcc/config/i386/i386.h
1772 ===================================================================
1773 RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
1774 retrieving revision 1.309.2.11
1775 retrieving revision 1.309.2.12
1776 diff -u -r1.309.2.11 -r1.309.2.12
1777 --- gcc/gcc/config/i386/i386.h 6 Feb 2004 19:43:31 -0000 1.309.2.11
1778 +++ gcc/gcc/config/i386/i386.h 12 Dec 2004 21:00:47 -0000 1.309.2.12
1779 @@ -3319,6 +3319,7 @@
1780 SYMBOL_REF, LABEL_REF, SUBREG, REG, MEM}}, \
1781 {"nonmemory_no_elim_operand", {CONST_INT, REG, SUBREG}}, \
1782 {"index_register_operand", {SUBREG, REG}}, \
1783 + {"flags_reg_operand", {REG}}, \
1784 {"q_regs_operand", {SUBREG, REG}}, \
1785 {"non_q_regs_operand", {SUBREG, REG}}, \
1786 {"fcmov_comparison_operator", {EQ, NE, LTU, GTU, LEU, GEU, UNORDERED, \
1787 @@ -3354,6 +3355,7 @@
1788 {"fp_register_operand", {REG}}, \
1789 {"register_and_not_fp_reg_operand", {REG}}, \
1790 {"vector_move_operand", {CONST_VECTOR, SUBREG, REG, MEM}}, \
1791 + {"compare_operator", {COMPARE}},
1793 /* A list of predicates that do special things with modes, and so
1794 should not elicit warnings for VOIDmode match_operand. */
1795 Index: gcc/config/i386/i386.md
1796 ===================================================================
1797 RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
1798 retrieving revision 1.404.2.24
1799 retrieving revision 1.404.2.29
1800 diff -u -r1.404.2.24 -r1.404.2.29
1801 --- gcc/gcc/config/i386/i386.md 28 Apr 2004 17:00:03 -0000 1.404.2.24
1802 +++ gcc/gcc/config/i386/i386.md 23 Jan 2005 05:15:59 -0000 1.404.2.29
1803 @@ -1188,10 +1188,9 @@
1806 [(set_attr "type" "imov")
1807 + (set_attr "mode" "SI")
1808 (set_attr "pent_pair" "np")
1809 (set_attr "athlon_decode" "vector")
1810 - (set_attr "mode" "SI")
1811 - (set_attr "modrm" "0")
1812 (set_attr "ppro_uops" "few")])
1814 (define_expand "movhi"
1815 @@ -1304,12 +1303,12 @@
1816 (match_operand:HI 1 "register_operand" "+r"))
1819 - "TARGET_PARTIAL_REG_STALL"
1821 + "!TARGET_PARTIAL_REG_STALL || optimize_size"
1822 + "xchg{l}\t%k1, %k0"
1823 [(set_attr "type" "imov")
1824 + (set_attr "mode" "SI")
1825 (set_attr "pent_pair" "np")
1826 - (set_attr "mode" "HI")
1827 - (set_attr "modrm" "0")
1828 + (set_attr "athlon_decode" "vector")
1829 (set_attr "ppro_uops" "few")])
1831 (define_insn "*swaphi_2"
1832 @@ -1317,12 +1316,12 @@
1833 (match_operand:HI 1 "register_operand" "+r"))
1836 - "! TARGET_PARTIAL_REG_STALL"
1837 - "xchg{l}\t%k1, %k0"
1838 + "TARGET_PARTIAL_REG_STALL"
1840 [(set_attr "type" "imov")
1841 + (set_attr "mode" "HI")
1842 (set_attr "pent_pair" "np")
1843 - (set_attr "mode" "SI")
1844 - (set_attr "modrm" "0")
1845 + (set_attr "athlon_decode" "vector")
1846 (set_attr "ppro_uops" "few")])
1848 (define_expand "movstricthi"
1849 @@ -1470,17 +1469,30 @@
1853 -(define_insn "*swapqi"
1854 +(define_insn "*swapqi_1"
1855 [(set (match_operand:QI 0 "register_operand" "+r")
1856 (match_operand:QI 1 "register_operand" "+r"))
1861 + "!TARGET_PARTIAL_REG_STALL || optimize_size"
1862 + "xchg{l}\t%k1, %k0"
1863 [(set_attr "type" "imov")
1864 + (set_attr "mode" "SI")
1865 (set_attr "pent_pair" "np")
1866 + (set_attr "athlon_decode" "vector")
1867 + (set_attr "ppro_uops" "few")])
1869 +(define_insn "*swapqi_2"
1870 + [(set (match_operand:QI 0 "register_operand" "+q")
1871 + (match_operand:QI 1 "register_operand" "+q"))
1872 + (set (match_dup 1)
1874 + "TARGET_PARTIAL_REG_STALL"
1876 + [(set_attr "type" "imov")
1877 (set_attr "mode" "QI")
1878 - (set_attr "modrm" "0")
1879 + (set_attr "pent_pair" "np")
1880 + (set_attr "athlon_decode" "vector")
1881 (set_attr "ppro_uops" "few")])
1883 (define_expand "movstrictqi"
1884 @@ -1987,13 +1999,11 @@
1887 [(set_attr "type" "imov")
1888 + (set_attr "mode" "DI")
1889 (set_attr "pent_pair" "np")
1890 (set_attr "athlon_decode" "vector")
1891 - (set_attr "mode" "DI")
1892 - (set_attr "modrm" "0")
1893 (set_attr "ppro_uops" "few")])
1896 (define_expand "movsf"
1897 [(set (match_operand:SF 0 "nonimmediate_operand" "")
1898 (match_operand:SF 1 "general_operand" ""))]
1899 @@ -7559,17 +7569,21 @@
1903 -(define_insn "*testqi_1"
1904 +(define_insn "*testqi_1_maybe_si"
1906 - (compare (and:QI (match_operand:QI 0 "nonimmediate_operand" "%*a,q,qm,r")
1907 - (match_operand:QI 1 "nonmemory_operand" "n,n,qn,n"))
1909 - "ix86_match_ccmode (insn, CCNOmode)"
1912 + (match_operand:QI 0 "nonimmediate_operand" "%*a,q,qm,r")
1913 + (match_operand:QI 1 "nonmemory_operand" "n,n,qn,n"))
1915 + "(GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)
1916 + && ix86_match_ccmode (insn,
1917 + GET_CODE (operands[1]) == CONST_INT
1918 + && INTVAL (operands[1]) >= 0 ? CCNOmode : CCZmode)"
1920 if (which_alternative == 3)
1922 - if (GET_CODE (operands[1]) == CONST_INT
1923 - && (INTVAL (operands[1]) & 0xffffff00))
1924 + if (GET_CODE (operands[1]) == CONST_INT && INTVAL (operands[1]) < 0)
1925 operands[1] = GEN_INT (INTVAL (operands[1]) & 0xff);
1926 return "test{l}\t{%1, %k0|%k0, %1}";
1928 @@ -7580,6 +7594,18 @@
1929 (set_attr "mode" "QI,QI,QI,SI")
1930 (set_attr "pent_pair" "uv,np,uv,np")])
1932 +(define_insn "*testqi_1"
1934 + (compare (and:QI (match_operand:QI 0 "nonimmediate_operand" "%*a,q,qm")
1935 + (match_operand:QI 1 "nonmemory_operand" "n,n,qn"))
1937 + "ix86_match_ccmode (insn, CCNOmode)"
1938 + "test{b}\t{%1, %0|%0, %1}"
1939 + [(set_attr "type" "test")
1940 + (set_attr "modrm" "0,1,1")
1941 + (set_attr "mode" "QI")
1942 + (set_attr "pent_pair" "uv,np,uv")])
1944 (define_expand "testqi_ext_ccno_0"
1947 @@ -7697,51 +7723,53 @@
1952 - (compare (zero_extract
1953 - (match_operand 0 "nonimmediate_operand" "")
1954 - (match_operand 1 "const_int_operand" "")
1955 - (match_operand 2 "const_int_operand" ""))
1957 + [(set (match_operand 0 "flags_reg_operand" "")
1958 + (match_operator 1 "compare_operator"
1960 + (match_operand 2 "nonimmediate_operand" "")
1961 + (match_operand 3 "const_int_operand" "")
1962 + (match_operand 4 "const_int_operand" ""))
1964 "ix86_match_ccmode (insn, CCNOmode)"
1965 - [(set (reg:CCNO 17) (compare:CCNO (match_dup 3) (const_int 0)))]
1966 + [(set (match_dup 0) (match_op_dup 1 [(match_dup 2) (const_int 0)]))]
1968 - HOST_WIDE_INT len = INTVAL (operands[1]);
1969 - HOST_WIDE_INT pos = INTVAL (operands[2]);
1970 + rtx val = operands[2];
1971 + HOST_WIDE_INT len = INTVAL (operands[3]);
1972 + HOST_WIDE_INT pos = INTVAL (operands[4]);
1974 enum machine_mode mode, submode;
1976 - mode = GET_MODE (operands[0]);
1977 - if (GET_CODE (operands[0]) == MEM)
1978 + mode = GET_MODE (val);
1979 + if (GET_CODE (val) == MEM)
1981 /* ??? Combine likes to put non-volatile mem extractions in QImode
1982 no matter the size of the test. So find a mode that works. */
1983 - if (! MEM_VOLATILE_P (operands[0]))
1984 + if (! MEM_VOLATILE_P (val))
1986 mode = smallest_mode_for_size (pos + len, MODE_INT);
1987 - operands[0] = adjust_address (operands[0], mode, 0);
1988 + val = adjust_address (val, mode, 0);
1991 - else if (GET_CODE (operands[0]) == SUBREG
1992 - && (submode = GET_MODE (SUBREG_REG (operands[0])),
1993 + else if (GET_CODE (val) == SUBREG
1994 + && (submode = GET_MODE (SUBREG_REG (val)),
1995 GET_MODE_BITSIZE (mode) > GET_MODE_BITSIZE (submode))
1996 && pos + len <= GET_MODE_BITSIZE (submode))
1998 /* Narrow a paradoxical subreg to prevent partial register stalls. */
2000 - operands[0] = SUBREG_REG (operands[0]);
2001 + val = SUBREG_REG (val);
2003 else if (mode == HImode && pos + len <= 8)
2005 /* Small HImode tests can be converted to QImode. */
2007 - operands[0] = gen_lowpart (QImode, operands[0]);
2008 + val = gen_lowpart (QImode, val);
2011 mask = ((HOST_WIDE_INT)1 << (pos + len)) - 1;
2012 mask &= ~(((HOST_WIDE_INT)1 << pos) - 1);
2014 - operands[3] = gen_rtx_AND (mode, operands[0], gen_int_mode (mask, mode));
2015 + operands[2] = gen_rtx_AND (mode, val, gen_int_mode (mask, mode));
2018 ;; Convert HImode/SImode test instructions with immediate to QImode ones.
2019 @@ -7750,46 +7778,44 @@
2020 ;; Do the converison only post-reload to avoid limiting of the register class
2025 - (and (match_operand 0 "register_operand" "")
2026 - (match_operand 1 "const_int_operand" ""))
2028 + [(set (match_operand 0 "flags_reg_operand" "")
2029 + (match_operator 1 "compare_operator"
2030 + [(and (match_operand 2 "register_operand" "")
2031 + (match_operand 3 "const_int_operand" ""))
2034 - && QI_REG_P (operands[0])
2035 + && QI_REG_P (operands[2])
2036 + && GET_MODE (operands[2]) != QImode
2037 && ((ix86_match_ccmode (insn, CCZmode)
2038 - && !(INTVAL (operands[1]) & ~(255 << 8)))
2039 + && !(INTVAL (operands[3]) & ~(255 << 8)))
2040 || (ix86_match_ccmode (insn, CCNOmode)
2041 - && !(INTVAL (operands[1]) & ~(127 << 8))))
2042 - && GET_MODE (operands[0]) != QImode"
2043 - [(set (reg:CCNO 17)
2045 - (and:SI (zero_extract:SI (match_dup 0) (const_int 8) (const_int 8))
2048 - "operands[0] = gen_lowpart (SImode, operands[0]);
2049 - operands[1] = gen_int_mode (INTVAL (operands[1]) >> 8, SImode);")
2050 + && !(INTVAL (operands[3]) & ~(127 << 8))))"
2051 + [(set (match_dup 0)
2053 + [(and:SI (zero_extract:SI (match_dup 2) (const_int 8) (const_int 8))
2056 + "operands[2] = gen_lowpart (SImode, operands[2]);
2057 + operands[3] = gen_int_mode (INTVAL (operands[3]) >> 8, SImode);")
2062 - (and (match_operand 0 "nonimmediate_operand" "")
2063 - (match_operand 1 "const_int_operand" ""))
2065 + [(set (match_operand 0 "flags_reg_operand" "")
2066 + (match_operator 1 "compare_operator"
2067 + [(and (match_operand 2 "nonimmediate_operand" "")
2068 + (match_operand 3 "const_int_operand" ""))
2071 - && (!REG_P (operands[0]) || ANY_QI_REG_P (operands[0]))
2072 + && GET_MODE (operands[2]) != QImode
2073 + && (!REG_P (operands[2]) || ANY_QI_REG_P (operands[2]))
2074 && ((ix86_match_ccmode (insn, CCZmode)
2075 - && !(INTVAL (operands[1]) & ~255))
2076 + && !(INTVAL (operands[3]) & ~255))
2077 || (ix86_match_ccmode (insn, CCNOmode)
2078 - && !(INTVAL (operands[1]) & ~127)))
2079 - && GET_MODE (operands[0]) != QImode"
2080 - [(set (reg:CCNO 17)
2082 - (and:QI (match_dup 0)
2085 - "operands[0] = gen_lowpart (QImode, operands[0]);
2086 - operands[1] = gen_lowpart (QImode, operands[1]);")
2087 + && !(INTVAL (operands[3]) & ~127)))"
2088 + [(set (match_dup 0)
2089 + (match_op_dup 1 [(and:QI (match_dup 2) (match_dup 3))
2091 + "operands[2] = gen_lowpart (QImode, operands[2]);
2092 + operands[3] = gen_lowpart (QImode, operands[3]);")
2095 ;; %%% This used to optimize known byte-wide and operations to memory,
2096 @@ -8066,7 +8092,7 @@
2097 [(set_attr "type" "alu1")
2098 (set_attr "mode" "QI")])
2100 -(define_insn "*andqi_2"
2101 +(define_insn "*andqi_2_maybe_si"
2104 (match_operand:QI 1 "nonimmediate_operand" "%0,0,0")
2105 @@ -8074,13 +8100,14 @@
2107 (set (match_operand:QI 0 "nonimmediate_operand" "=q,qm,*r")
2108 (and:QI (match_dup 1) (match_dup 2)))]
2109 - "ix86_match_ccmode (insn, CCNOmode)
2110 - && ix86_binary_operator_ok (AND, QImode, operands)"
2111 + "ix86_binary_operator_ok (AND, QImode, operands)
2112 + && ix86_match_ccmode (insn,
2113 + GET_CODE (operands[2]) == CONST_INT
2114 + && INTVAL (operands[2]) >= 0 ? CCNOmode : CCZmode)"
2116 if (which_alternative == 2)
2118 - if (GET_CODE (operands[2]) == CONST_INT
2119 - && (INTVAL (operands[2]) & 0xffffff00))
2120 + if (GET_CODE (operands[2]) == CONST_INT && INTVAL (operands[2]) < 0)
2121 operands[2] = GEN_INT (INTVAL (operands[2]) & 0xff);
2122 return "and{l}\t{%2, %k0|%k0, %2}";
2124 @@ -8089,6 +8116,20 @@
2125 [(set_attr "type" "alu")
2126 (set_attr "mode" "QI,QI,SI")])
2128 +(define_insn "*andqi_2"
2131 + (match_operand:QI 1 "nonimmediate_operand" "%0,0")
2132 + (match_operand:QI 2 "general_operand" "qim,qi"))
2134 + (set (match_operand:QI 0 "nonimmediate_operand" "=q,qm")
2135 + (and:QI (match_dup 1) (match_dup 2)))]
2136 + "ix86_match_ccmode (insn, CCNOmode)
2137 + && ix86_binary_operator_ok (AND, QImode, operands)"
2138 + "and{b}\t{%2, %0|%0, %2}"
2139 + [(set_attr "type" "alu")
2140 + (set_attr "mode" "QI")])
2142 (define_insn "*andqi_2_slp"
2145 @@ -10147,17 +10188,19 @@
2146 (set_attr "mode" "DI")])
2150 - (compare (not:DI (match_operand:DI 1 "nonimmediate_operand" ""))
2152 - (set (match_operand:DI 0 "nonimmediate_operand" "")
2153 - (not:DI (match_dup 1)))]
2154 + [(set (match_operand 0 "flags_reg_operand" "")
2155 + (match_operator 2 "compare_operator"
2156 + [(not:DI (match_operand:DI 3 "nonimmediate_operand" ""))
2158 + (set (match_operand:DI 1 "nonimmediate_operand" "")
2159 + (not:DI (match_dup 3)))]
2160 "TARGET_64BIT && ix86_match_ccmode (insn, CCNOmode)"
2161 - [(parallel [(set (reg:CCNO 17)
2162 - (compare:CCNO (xor:DI (match_dup 1) (const_int -1))
2164 - (set (match_dup 0)
2165 - (xor:DI (match_dup 1) (const_int -1)))])]
2166 + [(parallel [(set (match_dup 0)
2168 + [(xor:DI (match_dup 3) (const_int -1))
2170 + (set (match_dup 1)
2171 + (xor:DI (match_dup 3) (const_int -1)))])]
2174 (define_expand "one_cmplsi2"
2175 @@ -10196,17 +10239,18 @@
2176 (set_attr "mode" "SI")])
2180 - (compare (not:SI (match_operand:SI 1 "nonimmediate_operand" ""))
2182 - (set (match_operand:SI 0 "nonimmediate_operand" "")
2183 - (not:SI (match_dup 1)))]
2184 + [(set (match_operand 0 "flags_reg_operand" "")
2185 + (match_operator 2 "compare_operator"
2186 + [(not:SI (match_operand:SI 3 "nonimmediate_operand" ""))
2188 + (set (match_operand:SI 1 "nonimmediate_operand" "")
2189 + (not:SI (match_dup 3)))]
2190 "ix86_match_ccmode (insn, CCNOmode)"
2191 - [(parallel [(set (reg:CCNO 17)
2192 - (compare:CCNO (xor:SI (match_dup 1) (const_int -1))
2194 - (set (match_dup 0)
2195 - (xor:SI (match_dup 1) (const_int -1)))])]
2196 + [(parallel [(set (match_dup 0)
2197 + (match_op_dup 2 [(xor:SI (match_dup 3) (const_int -1))
2199 + (set (match_dup 1)
2200 + (xor:SI (match_dup 3) (const_int -1)))])]
2203 ;; ??? Currently never generated - xor is used instead.
2204 @@ -10223,17 +10267,18 @@
2205 (set_attr "mode" "SI")])
2209 - (compare (not:SI (match_operand:SI 1 "register_operand" ""))
2211 - (set (match_operand:DI 0 "register_operand" "")
2212 - (zero_extend:DI (not:SI (match_dup 1))))]
2213 + [(set (match_operand 0 "flags_reg_operand" "")
2214 + (match_operator 2 "compare_operator"
2215 + [(not:SI (match_operand:SI 3 "register_operand" ""))
2217 + (set (match_operand:DI 1 "register_operand" "")
2218 + (zero_extend:DI (not:SI (match_dup 3))))]
2219 "ix86_match_ccmode (insn, CCNOmode)"
2220 - [(parallel [(set (reg:CCNO 17)
2221 - (compare:CCNO (xor:SI (match_dup 1) (const_int -1))
2223 - (set (match_dup 0)
2224 - (zero_extend:DI (xor:SI (match_dup 1) (const_int -1))))])]
2225 + [(parallel [(set (match_dup 0)
2226 + (match_op_dup 2 [(xor:SI (match_dup 3) (const_int -1))
2228 + (set (match_dup 1)
2229 + (zero_extend:DI (xor:SI (match_dup 3) (const_int -1))))])]
2232 (define_expand "one_cmplhi2"
2233 @@ -10263,17 +10308,18 @@
2234 (set_attr "mode" "HI")])
2238 - (compare (not:HI (match_operand:HI 1 "nonimmediate_operand" ""))
2240 - (set (match_operand:HI 0 "nonimmediate_operand" "")
2241 - (not:HI (match_dup 1)))]
2242 + [(set (match_operand 0 "flags_reg_operand" "")
2243 + (match_operator 2 "compare_operator"
2244 + [(not:HI (match_operand:HI 3 "nonimmediate_operand" ""))
2246 + (set (match_operand:HI 1 "nonimmediate_operand" "")
2247 + (not:HI (match_dup 3)))]
2248 "ix86_match_ccmode (insn, CCNOmode)"
2249 - [(parallel [(set (reg:CCNO 17)
2250 - (compare:CCNO (xor:HI (match_dup 1) (const_int -1))
2252 - (set (match_dup 0)
2253 - (xor:HI (match_dup 1) (const_int -1)))])]
2254 + [(parallel [(set (match_dup 0)
2255 + (match_op_dup 2 [(xor:HI (match_dup 3) (const_int -1))
2257 + (set (match_dup 1)
2258 + (xor:HI (match_dup 3) (const_int -1)))])]
2261 ;; %%% Potential partial reg stall on alternative 1. What to do?
2262 @@ -10306,17 +10352,18 @@
2263 (set_attr "mode" "QI")])
2267 - (compare (not:QI (match_operand:QI 1 "nonimmediate_operand" ""))
2269 - (set (match_operand:QI 0 "nonimmediate_operand" "")
2270 - (not:QI (match_dup 1)))]
2271 + [(set (match_operand 0 "flags_reg_operand" "")
2272 + (match_operator 2 "compare_operator"
2273 + [(not:QI (match_operand:QI 3 "nonimmediate_operand" ""))
2275 + (set (match_operand:QI 1 "nonimmediate_operand" "")
2276 + (not:QI (match_dup 3)))]
2277 "ix86_match_ccmode (insn, CCNOmode)"
2278 - [(parallel [(set (reg:CCNO 17)
2279 - (compare:CCNO (xor:QI (match_dup 1) (const_int -1))
2281 - (set (match_dup 0)
2282 - (xor:QI (match_dup 1) (const_int -1)))])]
2283 + [(parallel [(set (match_dup 0)
2284 + (match_op_dup 2 [(xor:QI (match_dup 3) (const_int -1))
2286 + (set (match_dup 1)
2287 + (xor:QI (match_dup 3) (const_int -1)))])]
2290 ;; Arithmetic shift instructions
2291 @@ -16639,10 +16686,12 @@
2292 (set (subreg:TI (match_dup 0) 0) (ior:TI (subreg:TI (match_dup 6) 0)
2293 (subreg:TI (match_dup 7) 0)))]
2295 - /* If op2 == op3, op3 will be clobbered before it is used.
2296 - This should be optimized out though. */
2297 + /* If op2 == op3, op3 would be clobbered before it is used. */
2298 if (operands_match_p (operands[2], operands[3]))
2301 + emit_move_insn (operands[0], operands[2]);
2304 PUT_MODE (operands[1], GET_MODE (operands[0]));
2305 if (operands_match_p (operands[0], operands[4]))
2306 operands[6] = operands[4], operands[7] = operands[2];
2307 @@ -16863,52 +16912,56 @@
2308 ; instruction size is unchanged, except in the %eax case for
2309 ; which it is increased by one byte, hence the ! optimize_size.
2312 - (compare (and (match_operand 1 "aligned_operand" "")
2313 - (match_operand 2 "const_int_operand" ""))
2315 - (set (match_operand 0 "register_operand" "")
2316 - (and (match_dup 1) (match_dup 2)))]
2317 + [(set (match_operand 0 "flags_reg_operand" "")
2318 + (match_operator 2 "compare_operator"
2319 + [(and (match_operand 3 "aligned_operand" "")
2320 + (match_operand 4 "const_int_operand" ""))
2322 + (set (match_operand 1 "register_operand" "")
2323 + (and (match_dup 3) (match_dup 4)))]
2324 "! TARGET_PARTIAL_REG_STALL && reload_completed
2325 /* Ensure that the operand will remain sign-extended immediate. */
2326 - && ix86_match_ccmode (insn, INTVAL (operands[2]) >= 0 ? CCNOmode : CCZmode)
2327 + && ix86_match_ccmode (insn, INTVAL (operands[4]) >= 0 ? CCNOmode : CCZmode)
2329 - && ((GET_MODE (operands[0]) == HImode && ! TARGET_FAST_PREFIX)
2330 - || (GET_MODE (operands[0]) == QImode && TARGET_PROMOTE_QImode))"
2331 - [(parallel [(set (reg:CCNO 17)
2332 - (compare:CCNO (and:SI (match_dup 1) (match_dup 2))
2334 - (set (match_dup 0)
2335 - (and:SI (match_dup 1) (match_dup 2)))])]
2337 - = gen_int_mode (INTVAL (operands[2])
2338 - & GET_MODE_MASK (GET_MODE (operands[0])),
2340 - operands[0] = gen_lowpart (SImode, operands[0]);
2341 - operands[1] = gen_lowpart (SImode, operands[1]);")
2342 + && ((GET_MODE (operands[1]) == HImode && ! TARGET_FAST_PREFIX)
2343 + || (GET_MODE (operands[1]) == QImode && TARGET_PROMOTE_QImode))"
2344 + [(parallel [(set (match_dup 0)
2345 + (match_op_dup 2 [(and:SI (match_dup 3) (match_dup 4))
2347 + (set (match_dup 1)
2348 + (and:SI (match_dup 3) (match_dup 4)))])]
2351 + = gen_int_mode (INTVAL (operands[4])
2352 + & GET_MODE_MASK (GET_MODE (operands[1])), SImode);
2353 + operands[1] = gen_lowpart (SImode, operands[1]);
2354 + operands[3] = gen_lowpart (SImode, operands[3]);
2357 ; Don't promote the QImode tests, as i386 doesn't have encoding of
2358 ; the TEST instruction with 32-bit sign-extended immediate and thus
2359 ; the instruction size would at least double, which is not what we
2360 ; want even with ! optimize_size.
2363 - (compare (and (match_operand:HI 0 "aligned_operand" "")
2364 - (match_operand:HI 1 "const_int_operand" ""))
2366 + [(set (match_operand 0 "flags_reg_operand" "")
2367 + (match_operator 1 "compare_operator"
2368 + [(and (match_operand:HI 2 "aligned_operand" "")
2369 + (match_operand:HI 3 "const_int_operand" ""))
2371 "! TARGET_PARTIAL_REG_STALL && reload_completed
2372 /* Ensure that the operand will remain sign-extended immediate. */
2373 - && ix86_match_ccmode (insn, INTVAL (operands[1]) >= 0 ? CCNOmode : CCZmode)
2374 + && ix86_match_ccmode (insn, INTVAL (operands[3]) >= 0 ? CCNOmode : CCZmode)
2375 && ! TARGET_FAST_PREFIX
2377 - [(set (reg:CCNO 17)
2378 - (compare:CCNO (and:SI (match_dup 0) (match_dup 1))
2381 - = gen_int_mode (INTVAL (operands[1])
2382 - & GET_MODE_MASK (GET_MODE (operands[0])),
2384 - operands[0] = gen_lowpart (SImode, operands[0]);")
2385 + [(set (match_dup 0)
2386 + (match_op_dup 1 [(and:SI (match_dup 2) (match_dup 3))
2390 + = gen_int_mode (INTVAL (operands[3])
2391 + & GET_MODE_MASK (GET_MODE (operands[2])), SImode);
2392 + operands[2] = gen_lowpart (SImode, operands[2]);
2396 [(set (match_operand 0 "register_operand" "")
2397 @@ -17081,13 +17134,14 @@
2399 ;; Don't compare memory with zero, load and use a test instead.
2402 - (compare (match_operand:SI 0 "memory_operand" "")
2404 + [(set (match_operand 0 "flags_reg_operand" "")
2405 + (match_operator 1 "compare_operator"
2406 + [(match_operand:SI 2 "memory_operand" "")
2408 (match_scratch:SI 3 "r")]
2409 "ix86_match_ccmode (insn, CCNOmode) && ! optimize_size"
2410 - [(set (match_dup 3) (match_dup 0))
2411 - (set (reg:CCNO 17) (compare:CCNO (match_dup 3) (const_int 0)))]
2412 + [(set (match_dup 3) (match_dup 2))
2413 + (set (match_dup 0) (match_op_dup 1 [(match_dup 3) (const_int 0)]))]
2416 ;; NOT is not pairable on Pentium, while XOR is, but one byte longer.
2417 @@ -17151,77 +17205,77 @@
2418 ;; versions if we're concerned about partial register stalls.
2422 - (compare (and:SI (match_operand:SI 0 "register_operand" "")
2423 - (match_operand:SI 1 "immediate_operand" ""))
2425 + [(set (match_operand 0 "flags_reg_operand" "")
2426 + (match_operator 1 "compare_operator"
2427 + [(and:SI (match_operand:SI 2 "register_operand" "")
2428 + (match_operand:SI 3 "immediate_operand" ""))
2430 "ix86_match_ccmode (insn, CCNOmode)
2431 - && (true_regnum (operands[0]) != 0
2432 - || (GET_CODE (operands[1]) == CONST_INT
2433 - && CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'K')))
2434 - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
2435 + && (true_regnum (operands[2]) != 0
2436 + || (GET_CODE (operands[3]) == CONST_INT
2437 + && CONST_OK_FOR_LETTER_P (INTVAL (operands[3]), 'K')))
2438 + && peep2_reg_dead_p (1, operands[2])"
2440 - [(set (reg:CCNO 17)
2441 - (compare:CCNO (and:SI (match_dup 0)
2444 - (set (match_dup 0)
2445 - (and:SI (match_dup 0) (match_dup 1)))])]
2446 + [(set (match_dup 0)
2447 + (match_op_dup 1 [(and:SI (match_dup 2) (match_dup 3))
2449 + (set (match_dup 2)
2450 + (and:SI (match_dup 2) (match_dup 3)))])]
2453 ;; We don't need to handle HImode case, because it will be promoted to SImode
2454 ;; on ! TARGET_PARTIAL_REG_STALL
2458 - (compare (and:QI (match_operand:QI 0 "register_operand" "")
2459 - (match_operand:QI 1 "immediate_operand" ""))
2461 + [(set (match_operand 0 "flags_reg_operand" "")
2462 + (match_operator 1 "compare_operator"
2463 + [(and:QI (match_operand:QI 2 "register_operand" "")
2464 + (match_operand:QI 3 "immediate_operand" ""))
2466 "! TARGET_PARTIAL_REG_STALL
2467 && ix86_match_ccmode (insn, CCNOmode)
2468 - && true_regnum (operands[0]) != 0
2469 - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
2470 + && true_regnum (operands[2]) != 0
2471 + && peep2_reg_dead_p (1, operands[2])"
2473 - [(set (reg:CCNO 17)
2474 - (compare:CCNO (and:QI (match_dup 0)
2477 - (set (match_dup 0)
2478 - (and:QI (match_dup 0) (match_dup 1)))])]
2479 + [(set (match_dup 0)
2480 + (match_op_dup 1 [(and:QI (match_dup 2) (match_dup 3))
2482 + (set (match_dup 2)
2483 + (and:QI (match_dup 2) (match_dup 3)))])]
2491 - (match_operand 0 "ext_register_operand" "")
2494 - (match_operand 1 "const_int_operand" ""))
2496 + [(set (match_operand 0 "flags_reg_operand" "")
2497 + (match_operator 1 "compare_operator"
2500 + (match_operand 2 "ext_register_operand" "")
2503 + (match_operand 3 "const_int_operand" ""))
2505 "! TARGET_PARTIAL_REG_STALL
2506 && ix86_match_ccmode (insn, CCNOmode)
2507 - && true_regnum (operands[0]) != 0
2508 - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
2509 - [(parallel [(set (reg:CCNO 17)
2518 - (set (zero_extract:SI (match_dup 0)
2519 + && true_regnum (operands[2]) != 0
2520 + && peep2_reg_dead_p (1, operands[2])"
2521 + [(parallel [(set (match_dup 0)
2530 + (set (zero_extract:SI (match_dup 2)
2539 - (match_dup 1)))])]
2540 + (match_dup 3)))])]
2543 ;; Don't do logical operations with memory inputs.
2544 @@ -17523,66 +17577,20 @@
2547 ;; Convert compares with 1 to shorter inc/dec operations when CF is not
2548 -;; required and register dies.
2551 - (compare (match_operand:SI 0 "register_operand" "")
2552 - (match_operand:SI 1 "incdec_operand" "")))]
2553 - "ix86_match_ccmode (insn, CCGCmode)
2554 - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
2555 - [(parallel [(set (reg:CCGC 17)
2556 - (compare:CCGC (match_dup 0)
2558 - (clobber (match_dup 0))])]
2561 +;; required and register dies. Similarly for 128 to plus -128.
2564 - (compare (match_operand:HI 0 "register_operand" "")
2565 - (match_operand:HI 1 "incdec_operand" "")))]
2566 - "ix86_match_ccmode (insn, CCGCmode)
2567 - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
2568 - [(parallel [(set (reg:CCGC 17)
2569 - (compare:CCGC (match_dup 0)
2571 - (clobber (match_dup 0))])]
2576 - (compare (match_operand:QI 0 "register_operand" "")
2577 - (match_operand:QI 1 "incdec_operand" "")))]
2578 - "ix86_match_ccmode (insn, CCGCmode)
2579 - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
2580 - [(parallel [(set (reg:CCGC 17)
2581 - (compare:CCGC (match_dup 0)
2583 - (clobber (match_dup 0))])]
2586 -;; Convert compares with 128 to shorter add -128
2589 - (compare (match_operand:SI 0 "register_operand" "")
2590 - (const_int 128)))]
2591 - "ix86_match_ccmode (insn, CCGCmode)
2592 - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
2593 - [(parallel [(set (reg:CCGC 17)
2594 - (compare:CCGC (match_dup 0)
2596 - (clobber (match_dup 0))])]
2601 - (compare (match_operand:HI 0 "register_operand" "")
2602 - (const_int 128)))]
2603 - "ix86_match_ccmode (insn, CCGCmode)
2604 - && find_regno_note (insn, REG_DEAD, true_regnum (operands[0]))"
2605 - [(parallel [(set (reg:CCGC 17)
2606 - (compare:CCGC (match_dup 0)
2608 - (clobber (match_dup 0))])]
2609 + [(set (match_operand 0 "flags_reg_operand" "")
2610 + (match_operator 1 "compare_operator"
2611 + [(match_operand 2 "register_operand" "")
2612 + (match_operand 3 "const_int_operand" "")]))]
2613 + "(INTVAL (operands[3]) == -1
2614 + || INTVAL (operands[3]) == 1
2615 + || INTVAL (operands[3]) == 128)
2616 + && ix86_match_ccmode (insn, CCGCmode)
2617 + && peep2_reg_dead_p (1, operands[2])"
2618 + [(parallel [(set (match_dup 0)
2619 + (match_op_dup 1 [(match_dup 2) (match_dup 3)]))
2620 + (clobber (match_dup 2))])]
2624 @@ -17780,9 +17788,9 @@
2627 if (SIBLING_CALL_P (insn))
2628 - return "jmp\t%*%1";
2629 + return "jmp\t%A1";
2631 - return "call\t%*%1";
2632 + return "call\t%A1";
2634 [(set_attr "type" "callv")])
2636 Index: gcc/config/ia64/ia64.c
2637 ===================================================================
2638 RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
2639 retrieving revision 1.198.2.22
2640 retrieving revision 1.198.2.24
2641 diff -u -r1.198.2.22 -r1.198.2.24
2642 --- gcc/gcc/config/ia64/ia64.c 17 Sep 2004 17:56:32 -0000 1.198.2.22
2643 +++ gcc/gcc/config/ia64/ia64.c 14 Jan 2005 19:15:40 -0000 1.198.2.24
2644 @@ -2884,10 +2884,13 @@
2645 preserve those input registers used as arguments to the sibling call.
2646 It is unclear how to compute that number here. */
2647 if (current_frame_info.n_input_regs != 0)
2648 - emit_insn (gen_alloc (gen_rtx_REG (DImode, fp),
2649 - GEN_INT (0), GEN_INT (0),
2650 - GEN_INT (current_frame_info.n_input_regs),
2653 + rtx n_inputs = GEN_INT (current_frame_info.n_input_regs);
2654 + insn = emit_insn (gen_alloc (gen_rtx_REG (DImode, fp),
2655 + const0_rtx, const0_rtx,
2656 + n_inputs, const0_rtx));
2657 + RTX_FRAME_RELATED_P (insn) = 1;
2662 @@ -3021,15 +3024,16 @@
2665 if (size == (TARGET_ILP32 ? 4 : 8)
2667 && !(TARGET_NO_PIC || TARGET_AUTO_PIC)
2668 && GET_CODE (x) == SYMBOL_REF
2669 && SYMBOL_REF_FLAG (x))
2672 - fputs ("\tdata4\t@fptr(", asm_out_file);
2674 - fputs ("\tdata8\t@fptr(", asm_out_file);
2675 + static const char * const directive[2][2] = {
2676 + /* 64-bit pointer */ /* 32-bit pointer */
2677 + { "\tdata8.ua\t@fptr(", "\tdata4.ua\t@fptr("}, /* unaligned */
2678 + { "\tdata8\t@fptr(", "\tdata4\t@fptr("} /* aligned */
2680 + fputs (directive[aligned_p != 0][TARGET_ILP32 != 0], asm_out_file);
2681 output_addr_const (asm_out_file, x);
2682 fputs (")\n", asm_out_file);
2684 @@ -7451,13 +7455,24 @@
2686 dest_regno = REGNO (dest);
2688 - /* If this isn't the final destination for ar.pfs, the alloc
2689 - shouldn't have been marked frame related. */
2690 - if (dest_regno != current_frame_info.reg_save_ar_pfs)
2693 - fprintf (asm_out_file, "\t.save ar.pfs, r%d\n",
2694 - ia64_dbx_register_number (dest_regno));
2695 + /* If this is the final destination for ar.pfs, then this must
2696 + be the alloc in the prologue. */
2697 + if (dest_regno == current_frame_info.reg_save_ar_pfs)
2698 + fprintf (asm_out_file, "\t.save ar.pfs, r%d\n",
2699 + ia64_dbx_register_number (dest_regno));
2702 + /* This must be an alloc before a sibcall. We must drop the
2703 + old frame info. The easiest way to drop the old frame
2704 + info is to ensure we had a ".restore sp" directive
2705 + followed by a new prologue. If the procedure doesn't
2706 + have a memory-stack frame, we'll issue a dummy ".restore
2708 + if (current_frame_info.total_size == 0 && !frame_pointer_needed)
2709 + /* if haven't done process_epilogue() yet, do it now */
2710 + process_epilogue ();
2711 + fprintf (asm_out_file, "\t.prologue\n");
2716 Index: gcc/config/m68hc11/t-m68hc11-gas
2717 ===================================================================
2718 RCS file: /cvs/gcc/gcc/gcc/config/m68hc11/t-m68hc11-gas,v
2719 retrieving revision 1.7.14.3
2720 retrieving revision 1.7.14.4
2721 diff -u -r1.7.14.3 -r1.7.14.4
2722 --- gcc/gcc/config/m68hc11/t-m68hc11-gas 4 Oct 2003 19:45:57 -0000 1.7.14.3
2723 +++ gcc/gcc/config/m68hc11/t-m68hc11-gas 28 Jan 2005 22:21:39 -0000 1.7.14.4
2725 dp-bit.c: $(srcdir)/config/fp-bit.c
2726 echo '#define SMALL_MACHINE' >> dp-bit.c
2727 echo '#define CMPtype HItype' >> dp-bit.c
2728 - echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c
2729 + echo '#ifdef __LITTLE_ENDIAN__' >> dp-bit.c
2730 echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c
2731 echo '#endif' >> dp-bit.c
2732 cat $(srcdir)/config/fp-bit.c >> dp-bit.c
2733 Index: gcc/config/mips/mips-protos.h
2734 ===================================================================
2735 RCS file: /cvs/gcc/gcc/gcc/config/mips/mips-protos.h,v
2736 retrieving revision 1.30.4.1
2737 retrieving revision 1.30.4.2
2738 diff -u -r1.30.4.1 -r1.30.4.2
2739 --- gcc/gcc/config/mips/mips-protos.h 31 Jan 2003 23:51:22 -0000 1.30.4.1
2740 +++ gcc/gcc/config/mips/mips-protos.h 8 Jan 2005 14:33:32 -0000 1.30.4.2
2742 /* Prototypes of target machine for GNU compiler. MIPS version.
2743 Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2744 - 1999, 2001, 2002 Free Software Foundation, Inc.
2745 + 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
2746 Contributed by A. Lichnewsky (lich@inria.inria.fr).
2747 Changed by Michael Meissner (meissner@osf.org).
2748 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and
2750 extern const char * current_section_name PARAMS ((void));
2751 extern unsigned int current_section_flags PARAMS ((void));
2752 extern int mips_can_use_return_insn PARAMS ((void));
2753 -extern void mips_declare_object PARAMS ((FILE *, const char *,
2755 - const char *, int));
2756 +extern void mips_output_aligned_decl_common
2757 + PARAMS ((FILE *, tree, const char *,
2758 + unsigned HOST_WIDE_INT,
2760 +extern void mips_declare_object
2761 + PARAMS ((FILE *, const char *, const char *,
2762 + const char *, ...));
2763 extern void mips_expand_epilogue PARAMS ((void));
2764 extern void mips_expand_prologue PARAMS ((void));
2765 extern void mips_output_filename PARAMS ((FILE *, const char *));
2766 Index: gcc/config/mips/mips.c
2767 ===================================================================
2768 RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
2769 retrieving revision 1.241.2.4
2770 retrieving revision 1.241.2.5
2771 diff -u -r1.241.2.4 -r1.241.2.5
2772 --- gcc/gcc/config/mips/mips.c 27 Jun 2003 11:44:23 -0000 1.241.2.4
2773 +++ gcc/gcc/config/mips/mips.c 8 Jan 2005 14:33:33 -0000 1.241.2.5
2775 /* Subroutines for insn-output.c for MIPS
2776 Copyright (C) 1989, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
2777 - 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2778 + 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
2779 Contributed by A. Lichnewsky, lich@inria.inria.fr.
2780 Changes by Michael Meissner, meissner@osf.org.
2781 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
2782 @@ -6562,26 +6562,84 @@
2783 fatal_io_error ("can't close temp file");
2786 -/* Emit either a label, .comm, or .lcomm directive, and mark that the symbol
2787 - is used, so that we don't emit an .extern for it in mips_asm_file_end. */
2788 +/* Implement ASM_OUTPUT_ALIGNED_DECL_COMMON. This is usually the same as
2789 + the elfos.h version, but we also need to handle -muninit-const-in-rodata
2790 + and the limitations of the SGI o32 assembler. */
2793 -mips_declare_object (stream, name, init_string, final_string, size)
2794 +mips_output_aligned_decl_common (stream, decl, name, size, align)
2798 - const char *init_string;
2799 - const char *final_string;
2801 + unsigned HOST_WIDE_INT size;
2802 + unsigned int align;
2804 - fputs (init_string, stream); /* "", "\t.comm\t", or "\t.lcomm\t" */
2805 + const char *format;
2807 + /* If the target wants uninitialized const declarations in
2808 + .rdata then don't put them in .comm. */
2809 + if (TARGET_EMBEDDED_DATA && TARGET_UNINIT_CONST_IN_RODATA
2810 + && TREE_CODE (decl) == VAR_DECL && TREE_READONLY (decl)
2811 + && (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node))
2813 + if (TREE_PUBLIC (decl) && DECL_NAME (decl))
2814 + targetm.asm_out.globalize_label (stream, name);
2816 + readonly_data_section ();
2817 + ASM_OUTPUT_ALIGN (stream, floor_log2 (align / BITS_PER_UNIT));
2819 + format = ACONCAT ((":\n\t.space\t", HOST_WIDE_INT_PRINT_UNSIGNED,
2821 + mips_declare_object (stream, name, "", format, size);
2823 +#ifdef TARGET_IRIX6
2824 + /* The SGI o32 assembler doesn't accept an alignment, so round up
2825 + the size instead. */
2826 + else if (mips_abi == ABI_32 && !TARGET_GAS)
2828 + size += (align / BITS_PER_UNIT) - 1;
2829 + size -= size % (align / BITS_PER_UNIT);
2830 + format = ACONCAT ((",", HOST_WIDE_INT_PRINT_UNSIGNED, "\n", NULL));
2831 + mips_declare_object (stream, name, "\n\t.comm\t", format, size);
2836 + format = ACONCAT ((",", HOST_WIDE_INT_PRINT_UNSIGNED, ",%u\n", NULL));
2837 + mips_declare_object (stream, name, "\n\t.comm\t", format,
2838 + size, align / BITS_PER_UNIT);
2842 +/* Emit either a label, .comm, or .lcomm directive. When using assembler
2843 + macros, mark the symbol as written so that mips_file_end won't emit an
2844 + .extern for it. STREAM is the output file, NAME is the name of the
2845 + symbol, INIT_STRING is the string that should be written before the
2846 + symbol and FINAL_STRING is the string that shoulbe written after it.
2847 + FINAL_STRING is a printf() format that consumes the remaining arguments. */
2850 +mips_declare_object VPARAMS ((FILE *stream, const char *name,
2851 + const char *init_string,
2852 + const char *final_string, ...))
2854 + VA_OPEN (ap, final_string);
2855 + VA_FIXEDARG (ap, FILE *, stream);
2856 + VA_FIXEDARG (ap, const char *, name);
2857 + VA_FIXEDARG (ap, const char *, init_string);
2858 + VA_FIXEDARG (ap, const char *, final_string);
2860 + fputs (init_string, stream);
2861 assemble_name (stream, name);
2862 - fprintf (stream, final_string, size); /* ":\n", ",%u\n", ",%u\n" */
2863 + vfprintf (stream, final_string, ap);
2867 tree name_tree = get_identifier (name);
2868 TREE_ASM_WRITTEN (name_tree) = 1;
2874 /* Return the bytes needed to compute the frame pointer from the current
2875 Index: gcc/config/mips/mips.h
2876 ===================================================================
2877 RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
2878 retrieving revision 1.227.4.6
2879 retrieving revision 1.227.4.7
2880 diff -u -r1.227.4.6 -r1.227.4.7
2881 --- gcc/gcc/config/mips/mips.h 30 May 2003 12:00:42 -0000 1.227.4.6
2882 +++ gcc/gcc/config/mips/mips.h 8 Jan 2005 14:33:34 -0000 1.227.4.7
2884 /* Definitions of target machine for GNU compiler. MIPS version.
2885 Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998
2886 - 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
2887 + 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
2888 Contributed by A. Lichnewsky (lich@inria.inria.fr).
2889 Changed by Michael Meissner (meissner@osf.org).
2890 64 bit r4000 support by Ian Lance Taylor (ian@cygnus.com) and
2891 @@ -4326,28 +4326,7 @@
2893 /* This says how to define a global common symbol. */
2895 -#define ASM_OUTPUT_ALIGNED_DECL_COMMON(STREAM, DECL, NAME, SIZE, ALIGN) \
2897 - /* If the target wants uninitialized const declarations in \
2898 - .rdata then don't put them in .comm */ \
2899 - if (TARGET_EMBEDDED_DATA && TARGET_UNINIT_CONST_IN_RODATA \
2900 - && TREE_CODE (DECL) == VAR_DECL && TREE_READONLY (DECL) \
2901 - && (DECL_INITIAL (DECL) == 0 \
2902 - || DECL_INITIAL (DECL) == error_mark_node)) \
2904 - if (TREE_PUBLIC (DECL) && DECL_NAME (DECL)) \
2905 - (*targetm.asm_out.globalize_label) (STREAM, NAME); \
2907 - readonly_data_section (); \
2908 - ASM_OUTPUT_ALIGN (STREAM, floor_log2 (ALIGN / BITS_PER_UNIT)); \
2909 - mips_declare_object (STREAM, NAME, "", ":\n\t.space\t%u\n", \
2913 - mips_declare_object (STREAM, NAME, "\n\t.comm\t", ",%u\n", \
2917 +#define ASM_OUTPUT_ALIGNED_DECL_COMMON mips_output_aligned_decl_common
2919 /* This says how to define a local common symbol (ie, not visible to
2921 Index: gcc/config/mips/mips.md
2922 ===================================================================
2923 RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.md,v
2924 retrieving revision 1.153.2.5
2925 retrieving revision 1.153.2.6
2926 diff -u -r1.153.2.5 -r1.153.2.6
2927 --- gcc/gcc/config/mips/mips.md 27 Mar 2004 10:35:03 -0000 1.153.2.5
2928 +++ gcc/gcc/config/mips/mips.md 8 Jan 2005 14:11:12 -0000 1.153.2.6
2930 ;; Mips.md Machine Description for MIPS based processors
2931 ;; Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
2932 -;; 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2933 +;; 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
2934 ;; Contributed by A. Lichnewsky, lich@inria.inria.fr
2935 ;; Changes by Michael Meissner, meissner@osf.org
2936 ;; 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
2939 ;; Describe a user's asm statement.
2940 (define_asm_attributes
2941 - [(set_attr "type" "multi")])
2942 + [(set_attr "type" "multi")
2943 + (set_attr "can_delay" "no")])
2945 ;; whether or not generating calls to position independent functions
2946 (define_attr "abicalls" "no,yes"
2947 Index: gcc/config/pa/pa32-linux.h
2948 ===================================================================
2949 RCS file: /cvs/gcc/gcc/gcc/config/pa/pa32-linux.h,v
2950 retrieving revision 1.10
2951 retrieving revision 1.10.2.1
2952 diff -u -r1.10 -r1.10.2.1
2953 --- gcc/gcc/config/pa/pa32-linux.h 6 Dec 2002 02:54:38 -0000 1.10
2954 +++ gcc/gcc/config/pa/pa32-linux.h 27 Dec 2004 02:55:49 -0000 1.10.2.1
2956 pointer into the frame. This target does not need multiple
2957 subspace stubs, so we allow sibcalls to all functions. */
2958 #undef FUNCTION_OK_FOR_SIBCALL
2959 -#define FUNCTION_OK_FOR_SIBCALL(DECL) 1
2960 +#define FUNCTION_OK_FOR_SIBCALL(DECL) (!TARGET_PORTABLE_RUNTIME)
2962 /* The libcall __canonicalize_funcptr_for_compare is referenced in
2963 crtend.o and the reference isn't resolved in objects that don't
2964 Index: gcc/config/rs6000/rs6000.c
2965 ===================================================================
2966 RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
2967 retrieving revision 1.403.2.14
2968 retrieving revision 1.403.2.16
2969 diff -u -r1.403.2.14 -r1.403.2.16
2970 --- gcc/gcc/config/rs6000/rs6000.c 14 Jan 2004 14:03:58 -0000 1.403.2.14
2971 +++ gcc/gcc/config/rs6000/rs6000.c 1 Dec 2004 06:13:16 -0000 1.403.2.16
2973 /* Call distance, overridden by -mlongcall and #pragma longcall(1).
2974 The only place that looks at this is rs6000_set_default_type_attributes;
2975 everywhere else should rely on the presence or absence of a longcall
2976 - attribute on the function declaration. */
2977 + attribute on the function declaration. Exception: init_cumulative_args
2978 + looks at it too, for libcalls. */
2979 int rs6000_default_long_calls;
2980 const char *rs6000_longcall_switch;
2982 @@ -2910,10 +2911,11 @@
2983 cum->orig_nargs = cum->nargs_prototype;
2985 /* Check for a longcall attribute. */
2987 - && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype))
2988 - && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype)))
2989 - cum->call_cookie = CALL_LONG;
2990 + if ((!fntype && rs6000_default_long_calls)
2992 + && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype))
2993 + && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))))
2994 + cum->call_cookie |= CALL_LONG;
2996 if (TARGET_DEBUG_ARG)
2998 @@ -10356,8 +10358,10 @@
2999 rtx reg, mem, vrsave;
3002 - /* Get VRSAVE onto a GPR. */
3003 - reg = gen_rtx_REG (SImode, 12);
3004 + /* Get VRSAVE onto a GPR. Note that ABI_V4 might be using r12
3005 + as frame_reg_rtx and r11 as the static chain pointer for
3006 + nested functions. */
3007 + reg = gen_rtx_REG (SImode, 0);
3008 vrsave = gen_rtx_REG (SImode, VRSAVE_REGNO);
3010 emit_insn (gen_get_vrsave_internal (reg));
3011 Index: gcc/config/rs6000/rs6000.md
3012 ===================================================================
3013 RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
3014 retrieving revision 1.224.2.6
3015 retrieving revision 1.224.2.7
3016 diff -u -r1.224.2.6 -r1.224.2.7
3017 --- gcc/gcc/config/rs6000/rs6000.md 8 Mar 2004 04:20:45 -0000 1.224.2.6
3018 +++ gcc/gcc/config/rs6000/rs6000.md 24 Dec 2004 23:17:06 -0000 1.224.2.7
3019 @@ -3124,61 +3124,6 @@
3021 [(set_attr "length" "8")])
3023 -(define_insn_and_split "*andsi3_internal7"
3024 - [(set (match_operand:CC 2 "cc_reg_operand" "=x,?y")
3025 - (compare:CC (and:SI (match_operand:SI 0 "gpc_reg_operand" "r,r")
3026 - (match_operand:SI 1 "mask_operand_wrap" "i,i"))
3028 - (clobber (match_scratch:SI 3 "=r,r"))]
3029 - "TARGET_POWERPC64"
3031 - "TARGET_POWERPC64"
3032 - [(parallel [(set (match_dup 2)
3033 - (compare:CC (and:SI (rotate:SI (match_dup 0) (match_dup 4))
3036 - (clobber (match_dup 3))])]
3039 - int mb = extract_MB (operands[1]);
3040 - int me = extract_ME (operands[1]);
3041 - operands[4] = GEN_INT (me + 1);
3042 - operands[5] = GEN_INT (~((HOST_WIDE_INT) -1 << (33 + me - mb)));
3044 - [(set_attr "type" "delayed_compare,compare")
3045 - (set_attr "length" "4,8")])
3047 -(define_insn_and_split "*andsi3_internal8"
3048 - [(set (match_operand:CC 3 "cc_reg_operand" "=x,??y")
3049 - (compare:CC (and:SI (match_operand:SI 1 "gpc_reg_operand" "r,r")
3050 - (match_operand:SI 2 "mask_operand_wrap" "i,i"))
3052 - (set (match_operand:SI 0 "gpc_reg_operand" "=r,r")
3053 - (and:SI (match_dup 1)
3055 - "TARGET_POWERPC64"
3057 - "TARGET_POWERPC64"
3058 - [(parallel [(set (match_dup 3)
3059 - (compare:CC (and:SI (rotate:SI (match_dup 1) (match_dup 4))
3062 - (set (match_dup 0)
3063 - (and:SI (rotate:SI (match_dup 1) (match_dup 4))
3065 - (set (match_dup 0)
3066 - (rotate:SI (match_dup 0) (match_dup 6)))]
3069 - int mb = extract_MB (operands[2]);
3070 - int me = extract_ME (operands[2]);
3071 - operands[4] = GEN_INT (me + 1);
3072 - operands[6] = GEN_INT (32 - (me + 1));
3073 - operands[5] = GEN_INT (~((HOST_WIDE_INT) -1 << (33 + me - mb)));
3075 - [(set_attr "type" "delayed_compare,compare")
3076 - (set_attr "length" "8,12")])
3078 (define_expand "iorsi3"
3079 [(set (match_operand:SI 0 "gpc_reg_operand" "")
3080 (ior:SI (match_operand:SI 1 "gpc_reg_operand" "")
3081 Index: gcc/config/s390/s390.md
3082 ===================================================================
3083 RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.md,v
3084 retrieving revision 1.41.2.12
3085 retrieving revision 1.41.2.13
3086 diff -u -r1.41.2.12 -r1.41.2.13
3087 --- gcc/gcc/config/s390/s390.md 3 Aug 2004 20:06:51 -0000 1.41.2.12
3088 +++ gcc/gcc/config/s390/s390.md 27 Jan 2005 23:38:39 -0000 1.41.2.13
3089 @@ -910,11 +910,13 @@
3092 (define_expand "reload_outti"
3093 - [(parallel [(match_operand:TI 0 "memory_operand" "")
3094 + [(parallel [(match_operand:TI 0 "" "")
3095 (match_operand:TI 1 "register_operand" "d")
3096 (match_operand:DI 2 "register_operand" "=&a")])]
3099 + if (GET_CODE (operands[0]) != MEM)
3101 s390_load_address (operands[2], XEXP (operands[0], 0));
3102 operands[0] = replace_equiv_address (operands[0], operands[2]);
3103 emit_move_insn (operands[0], operands[1]);
3104 @@ -1060,11 +1062,13 @@
3107 (define_expand "reload_outdi"
3108 - [(parallel [(match_operand:DI 0 "memory_operand" "")
3109 + [(parallel [(match_operand:DI 0 "" "")
3110 (match_operand:DI 1 "register_operand" "d")
3111 (match_operand:SI 2 "register_operand" "=&a")])]
3114 + if (GET_CODE (operands[0]) != MEM)
3116 s390_load_address (operands[2], XEXP (operands[0], 0));
3117 operands[0] = replace_equiv_address (operands[0], operands[2]);
3118 emit_move_insn (operands[0], operands[1]);
3119 @@ -1374,11 +1378,13 @@
3122 (define_expand "reload_outdf"
3123 - [(parallel [(match_operand:DF 0 "memory_operand" "")
3124 + [(parallel [(match_operand:DF 0 "" "")
3125 (match_operand:DF 1 "register_operand" "d")
3126 (match_operand:SI 2 "register_operand" "=&a")])]
3129 + if (GET_CODE (operands[0]) != MEM)
3131 s390_load_address (operands[2], XEXP (operands[0], 0));
3132 operands[0] = replace_equiv_address (operands[0], operands[2]);
3133 emit_move_insn (operands[0], operands[1]);
3134 Index: gcc/config/sparc/sparc.c
3135 ===================================================================
3136 RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
3137 retrieving revision 1.233.4.12
3138 retrieving revision 1.233.4.13
3139 diff -u -r1.233.4.12 -r1.233.4.13
3140 --- gcc/gcc/config/sparc/sparc.c 17 Jul 2004 19:49:21 -0000 1.233.4.12
3141 +++ gcc/gcc/config/sparc/sparc.c 14 Oct 2004 06:54:26 -0000 1.233.4.13
3143 static void sparc_encode_section_info PARAMS ((tree, int));
3144 static void sparc_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
3145 HOST_WIDE_INT, tree));
3146 +static bool sparc_can_output_mi_thunk PARAMS ((tree, HOST_WIDE_INT,
3147 + HOST_WIDE_INT, tree));
3149 /* Option handling. */
3152 #undef TARGET_ASM_OUTPUT_MI_THUNK
3153 #define TARGET_ASM_OUTPUT_MI_THUNK sparc_output_mi_thunk
3154 #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
3155 -#define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall
3156 +#define TARGET_ASM_CAN_OUTPUT_MI_THUNK sparc_can_output_mi_thunk
3158 struct gcc_target targetm = TARGET_INITIALIZER;
3160 @@ -8622,18 +8624,21 @@
3161 SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
3164 -/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
3165 - Used for C++ multiple inheritance. */
3166 +/* Output the assembler code for a thunk function. THUNK_DECL is the
3167 + declaration for the thunk function itself, FUNCTION is the decl for
3168 + the target function. DELTA is an immediate constant offset to be
3169 + added to THIS. If VCALL_OFFSET is nonzero, the word at address
3170 + (*THIS + VCALL_OFFSET) should be additionally added to THIS. */
3173 sparc_output_mi_thunk (file, thunk_fndecl, delta, vcall_offset, function)
3175 tree thunk_fndecl ATTRIBUTE_UNUSED;
3176 HOST_WIDE_INT delta;
3177 - HOST_WIDE_INT vcall_offset ATTRIBUTE_UNUSED;
3178 + HOST_WIDE_INT vcall_offset;
3181 - rtx this, insn, funexp, delta_rtx, tmp;
3182 + rtx this, insn, funexp;
3184 reload_completed = 1;
3186 @@ -8650,26 +8655,73 @@
3188 /* Add DELTA. When possible use a plain add, otherwise load it into
3189 a register first. */
3190 - delta_rtx = GEN_INT (delta);
3191 - if (!SPARC_SIMM13_P (delta))
3194 + rtx delta_rtx = GEN_INT (delta);
3196 + if (! SPARC_SIMM13_P (delta))
3198 + rtx scratch = gen_rtx_REG (Pmode, 1);
3199 + emit_move_insn (scratch, delta_rtx);
3200 + delta_rtx = scratch;
3203 + /* THIS += DELTA. */
3204 + emit_insn (gen_add2_insn (this, delta_rtx));
3207 + /* Add the word at address (*THIS + VCALL_OFFSET). */
3210 + rtx vcall_offset_rtx = GEN_INT (vcall_offset);
3211 rtx scratch = gen_rtx_REG (Pmode, 1);
3213 - if (input_operand (delta_rtx, GET_MODE (scratch)))
3214 - emit_insn (gen_rtx_SET (VOIDmode, scratch, delta_rtx));
3215 + if (vcall_offset >= 0)
3218 + /* SCRATCH = *THIS. */
3219 + emit_move_insn (scratch, gen_rtx_MEM (Pmode, this));
3221 + /* Prepare for adding VCALL_OFFSET. The difficulty is that we
3222 + may not have any available scratch register at this point. */
3223 + if (SPARC_SIMM13_P (vcall_offset))
3225 + /* This is the case if ARCH64 (unless -ffixed-g5 is passed). */
3226 + else if (! fixed_regs[5]
3227 + /* The below sequence is made up of at least 2 insns,
3228 + while the default method may need only one. */
3229 + && vcall_offset < -8192)
3231 + rtx scratch2 = gen_rtx_REG (Pmode, 5);
3232 + emit_move_insn (scratch2, vcall_offset_rtx);
3233 + vcall_offset_rtx = scratch2;
3237 - if (TARGET_ARCH64)
3238 - sparc_emit_set_const64 (scratch, delta_rtx);
3240 - sparc_emit_set_const32 (scratch, delta_rtx);
3241 + rtx increment = GEN_INT (-4096);
3243 + /* VCALL_OFFSET is a negative number whose typical range can be
3244 + estimated as -32768..0 in 32-bit mode. In almost all cases
3245 + it is therefore cheaper to emit multiple add insns than
3246 + spilling and loading the constant into a register (at least
3248 + while (! SPARC_SIMM13_P (vcall_offset))
3250 + emit_insn (gen_add2_insn (scratch, increment));
3251 + vcall_offset += 4096;
3253 + vcall_offset_rtx = GEN_INT (vcall_offset); /* cannot be 0 */
3256 - delta_rtx = scratch;
3258 + /* SCRATCH = *(*THIS + VCALL_OFFSET). */
3259 + emit_move_insn (scratch, gen_rtx_MEM (Pmode,
3260 + gen_rtx_PLUS (Pmode,
3262 + vcall_offset_rtx)));
3264 - tmp = gen_rtx_PLUS (Pmode, this, delta_rtx);
3265 - emit_insn (gen_rtx_SET (VOIDmode, this, tmp));
3266 + /* THIS += *(*THIS + VCALL_OFFSET). */
3267 + emit_insn (gen_add2_insn (this, scratch));
3270 /* Generate a tail call to the target function. */
3271 if (! TREE_USED (function))
3272 @@ -8697,4 +8749,18 @@
3276 +/* Return true if sparc_output_mi_thunk would be able to output the
3277 + assembler code for the thunk function specified by the arguments
3278 + it is passed, and false otherwise. */
3280 +sparc_can_output_mi_thunk (thunk_fndecl, delta, vcall_offset, function)
3281 + tree thunk_fndecl ATTRIBUTE_UNUSED;
3282 + HOST_WIDE_INT delta ATTRIBUTE_UNUSED;
3283 + HOST_WIDE_INT vcall_offset;
3284 + tree function ATTRIBUTE_UNUSED;
3286 + /* Bound the loop used in the default method above. */
3287 + return (vcall_offset >= -32768 || ! fixed_regs[5]);
3290 #include "gt-sparc.h"
3291 Index: gcc/config/sparc/sparc.md
3292 ===================================================================
3293 RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.md,v
3294 retrieving revision 1.181.4.13
3295 retrieving revision 1.181.4.14
3296 diff -u -r1.181.4.13 -r1.181.4.14
3297 --- gcc/gcc/config/sparc/sparc.md 17 Jul 2004 19:49:21 -0000 1.181.4.13
3298 +++ gcc/gcc/config/sparc/sparc.md 14 Oct 2004 06:54:27 -0000 1.181.4.14
3299 @@ -2048,7 +2048,6 @@
3300 if (! CONSTANT_P (operands[1]) || input_operand (operands[1], DImode))
3302 else if (TARGET_ARCH64
3303 - && CONSTANT_P (operands[1])
3304 && GET_CODE (operands[1]) != HIGH
3305 && GET_CODE (operands[1]) != LO_SUM)
3307 Index: gcc/config/vax/vax.c
3308 ===================================================================
3309 RCS file: /cvs/gcc/gcc/gcc/config/vax/vax.c,v
3310 retrieving revision 1.38
3311 retrieving revision 1.38.4.1
3312 diff -u -r1.38 -r1.38.4.1
3313 --- gcc/gcc/config/vax/vax.c 22 Oct 2002 23:05:24 -0000 1.38
3314 +++ gcc/gcc/config/vax/vax.c 28 Dec 2004 06:29:59 -0000 1.38.4.1
3317 /* byte offsets cost nothing (on a VAX 2, they cost 1 cycle) */
3319 - offset = (unsigned)(INTVAL(addr)+128) > 256;
3320 + offset = (unsigned HOST_WIDE_INT)(INTVAL(addr)+128) > 256;
3324 @@ -595,13 +595,13 @@
3325 fmt = "e"; /* all constant rotate counts are short */
3328 - /* Check for small negative integer operand: subl2 can be used with
3329 - a short positive constant instead. */
3330 - if (GET_CODE (XEXP (x, 1)) == CONST_INT)
3331 - if ((unsigned)(INTVAL (XEXP (x, 1)) + 63) < 127)
3334 c = (mode == DFmode) ? 13 : 8; /* 6/8 on VAX 9000, 16/15 on VAX 2 */
3335 + /* Small integer operands can use subl2 and addl2. */
3336 + if ((GET_CODE (XEXP (x, 1)) == CONST_INT)
3337 + && (unsigned HOST_WIDE_INT)(INTVAL (XEXP (x, 1)) + 63) < 127)
3345 if (GET_CODE (XEXP (x, 0)) == CONST_INT)
3347 - if ((unsigned)~INTVAL (XEXP (x, 0)) > 63)
3348 + if ((unsigned HOST_WIDE_INT)~INTVAL (XEXP (x, 0)) > 63)
3356 - if ((unsigned)INTVAL (op) > 63 && GET_MODE (x) != QImode)
3357 + if ((unsigned HOST_WIDE_INT)INTVAL (op) > 63
3358 + && GET_MODE (x) != QImode)
3359 c += 1; /* 2 on VAX 2 */
3362 Index: gcc/config/vax/vax.h
3363 ===================================================================
3364 RCS file: /cvs/gcc/gcc/gcc/config/vax/vax.h,v
3365 retrieving revision 1.54
3366 retrieving revision 1.54.4.1
3367 diff -u -r1.54 -r1.54.4.1
3368 --- gcc/gcc/config/vax/vax.h 22 Oct 2002 23:05:24 -0000 1.54
3369 +++ gcc/gcc/config/vax/vax.h 28 Dec 2004 06:28:01 -0000 1.54.4.1
3370 @@ -800,11 +800,6 @@
3371 Do not define this if the table should contain absolute addresses. */
3372 #define CASE_VECTOR_PC_RELATIVE 1
3374 -/* Define this if the case instruction drops through after the table
3375 - when the index is out of range. Don't define it if the case insn
3376 - jumps to the default label instead. */
3377 -#define CASE_DROPS_THROUGH
3379 /* Indicate that jump tables go in the text section. This is
3380 necessary when compiling PIC code. */
3381 #define JUMP_TABLES_IN_TEXT_SECTION 1
3382 Index: gcc/config/vax/vax.md
3383 ===================================================================
3384 RCS file: /cvs/gcc/gcc/gcc/config/vax/vax.md,v
3385 retrieving revision 1.23
3386 retrieving revision 1.23.4.1
3387 diff -u -r1.23 -r1.23.4.1
3388 --- gcc/gcc/config/vax/vax.md 1 Oct 2002 20:16:04 -0000 1.23
3389 +++ gcc/gcc/config/vax/vax.md 28 Dec 2004 06:28:01 -0000 1.23.4.1
3390 @@ -1969,68 +1969,63 @@
3393 ;; This is here to accept 5 arguments (as passed by expand_end_case)
3394 -;; and pass the first 4 along to the casesi1 pattern that really does the work.
3395 +;; and pass the first 4 along to the casesi1 pattern that really does
3396 +;; the actual casesi work. We emit a jump here to the default label
3397 +;; _before_ the casesi so that we can be sure that the casesi never
3399 +;; This is suboptimal perhaps, but so is much of the rest of this
3400 +;; machine description. For what it's worth, HPPA uses the same trick.
3402 +;; operand 0 is index
3403 +;; operand 1 is the minimum bound (a const_int)
3404 +;; operand 2 is the maximum bound - minimum bound + 1 (also a const_int)
3405 +;; operand 3 is CODE_LABEL for the table;
3406 +;; operand 4 is the CODE_LABEL to go to if index out of range (ie. default).
3409 +;; i = index - minimum_bound
3410 +;; if (i > (maximum_bound - minimum_bound + 1) goto default;
3411 +;; casesi (i, 0, table);
3413 (define_expand "casesi"
3414 - [(match_operand:SI 0 "general_operand" "") ; index
3415 - (match_operand:SI 1 "general_operand" "") ; lower
3416 - (match_operand:SI 2 "general_operand" "") ; upper-lower
3417 - (match_operand 3 "" "") ; table label
3418 - (match_operand 4 "" "")] ; default label
3421 - emit_jump_insn (gen_casesi1 (operands[0], operands[1],
3422 - operands[2], operands[3]));
3423 + [(match_operand:SI 0 "general_operand" "")
3424 + (match_operand:SI 1 "general_operand" "")
3425 + (match_operand:SI 2 "general_operand" "")
3426 + (match_operand 3 "" "")
3427 + (match_operand 4 "" "")]
3430 + /* i = index - minimum_bound;
3431 + But only if the lower bound is not already zero. */
3432 + if (operands[1] != const0_rtx)
3434 + rtx index = gen_reg_rtx (SImode);
3435 + emit_insn (gen_addsi3 (index,
3437 + GEN_INT (-INTVAL (operands[1]))));
3438 + operands[0] = index;
3441 + /* if (i > (maximum_bound - minimum_bound + 1) goto default; */
3442 + emit_insn (gen_cmpsi (operands[0], operands[2]));
3443 + emit_jump_insn (gen_bgtu (operands[4]));
3445 + /* casesi (i, 0, table); */
3446 + emit_jump_insn (gen_casesi1 (operands[0], operands[2], operands[3]));
3450 +;; This insn is a bit of a lier. It actually falls through if no case
3451 +;; matches. But, we prevent that from ever happening by emiting a jump
3452 +;; before this, see the define_expand above.
3453 (define_insn "casesi1"
3456 - (leu (minus:SI (match_operand:SI 0 "general_operand" "g")
3457 - (match_operand:SI 1 "general_operand" "g"))
3458 - (match_operand:SI 2 "general_operand" "g"))
3459 - (plus:SI (sign_extend:SI
3460 - (mem:HI (plus:SI (mult:SI (minus:SI (match_dup 0)
3464 - (label_ref:SI (match_operand 3 "" "")))
3469 -;; This can arise by simplification when operand 1 is a constant int.
3473 - (leu (plus:SI (match_operand:SI 0 "general_operand" "g")
3474 - (match_operand:SI 1 "const_int_operand" "n"))
3475 - (match_operand:SI 2 "general_operand" "g"))
3476 - (plus:SI (sign_extend:SI
3477 - (mem:HI (plus:SI (mult:SI (plus:SI (match_dup 0)
3481 - (label_ref:SI (match_operand 3 "" "")))
3486 - operands[1] = GEN_INT (-INTVAL (operands[1]));
3487 - return \"casel %0,%1,%2\";
3490 -;; This can arise by simplification when the base for the case insn is zero.
3493 - (if_then_else (leu (match_operand:SI 0 "general_operand" "g")
3494 - (match_operand:SI 1 "general_operand" "g"))
3495 - (plus:SI (sign_extend:SI
3496 - (mem:HI (plus:SI (mult:SI (match_dup 0)
3499 - (label_ref:SI (match_operand 2 "" "")))
3501 + [(match_operand:SI 1 "const_int_operand" "n")
3503 + (plus:SI (sign_extend:SI
3504 + (mem:HI (plus:SI (mult:SI (match_operand:SI 0 "general_operand" "g")
3507 + (label_ref:SI (match_operand 2 "" ""))))]
3511 Index: gcc/cp/ChangeLog
3512 ===================================================================
3513 RCS file: /cvs/gcc/gcc/gcc/cp/ChangeLog,v
3514 retrieving revision 1.3076.2.277
3515 retrieving revision 1.3076.2.281
3516 diff -u -r1.3076.2.277 -r1.3076.2.281
3517 --- gcc/gcc/cp/ChangeLog 30 Sep 2004 16:44:00 -0000 1.3076.2.277
3518 +++ gcc/gcc/cp/ChangeLog 18 Dec 2004 20:26:04 -0000 1.3076.2.281
3520 +2004-12-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3523 + * cvt.c (convert_to_void): Set expr to void_zero_node after
3526 +2004-12-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3529 + * error.c (dump_expr) [BASELINK]: Use dump_expr.
3531 +2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3534 + * error.c (dump_expr): Add missing case for RDIV_EXPR.
3536 +2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
3539 + * init.c (build_zero_init): Build a RANGE_EXPR for an array
3542 2004-09-30 Release Manager
3544 * GCC 3.3.5 Released.
3546 ===================================================================
3547 RCS file: /cvs/gcc/gcc/gcc/cp/cvt.c,v
3548 retrieving revision 1.126.2.4
3549 retrieving revision 1.126.2.5
3550 diff -u -r1.126.2.4 -r1.126.2.5
3551 --- gcc/gcc/cp/cvt.c 23 Feb 2004 12:50:50 -0000 1.126.2.4
3552 +++ gcc/gcc/cp/cvt.c 18 Dec 2004 20:26:10 -0000 1.126.2.5
3554 of an overloaded function, and this is not one of them. */
3555 pedwarn ("%s cannot resolve address of overloaded function",
3556 implicit ? implicit : "void cast");
3557 + expr = void_zero_node;
3559 else if (implicit && probe == expr && is_overloaded_fn (probe))
3560 /* Only warn when there is no &. */
3561 Index: gcc/cp/error.c
3562 ===================================================================
3563 RCS file: /cvs/gcc/gcc/gcc/cp/error.c,v
3564 retrieving revision 1.192.2.9
3565 retrieving revision 1.192.2.11
3566 diff -u -r1.192.2.9 -r1.192.2.11
3567 --- gcc/gcc/cp/error.c 24 Jul 2004 13:03:23 -0000 1.192.2.9
3568 +++ gcc/gcc/cp/error.c 15 Dec 2004 16:45:23 -0000 1.192.2.11
3569 @@ -1724,6 +1724,7 @@
3571 case FLOOR_DIV_EXPR:
3572 case ROUND_DIV_EXPR:
3574 dump_binary_op ("/", t, flags);
3577 @@ -2070,7 +2071,7 @@
3581 - print_tree_identifier (scratch_buffer, DECL_NAME (get_first_fn (t)));
3582 + dump_expr (get_first_fn (t), flags & ~TFF_EXPR_IN_PARENS);
3586 Index: gcc/cp/init.c
3587 ===================================================================
3588 RCS file: /cvs/gcc/gcc/gcc/cp/init.c,v
3589 retrieving revision 1.299.2.18
3590 retrieving revision 1.299.2.19
3591 diff -u -r1.299.2.18 -r1.299.2.19
3592 --- gcc/gcc/cp/init.c 28 Jul 2004 02:17:28 -0000 1.299.2.18
3593 +++ gcc/gcc/cp/init.c 9 Dec 2004 15:09:19 -0000 1.299.2.19
3596 else if (TREE_CODE (type) == ARRAY_TYPE)
3602 @@ -249,15 +248,17 @@
3603 /* A zero-sized array, which is accepted as an extension, will
3604 have an upper bound of -1. */
3605 if (!tree_int_cst_equal (max_index, integer_minus_one_node))
3606 - for (index = size_zero_node;
3607 - !tree_int_cst_lt (max_index, index);
3608 - index = size_binop (PLUS_EXPR, index, size_one_node))
3609 - inits = tree_cons (index,
3610 - build_zero_init (TREE_TYPE (type),
3611 - /*nelts=*/NULL_TREE,
3612 - static_storage_p),
3614 - CONSTRUCTOR_ELTS (init) = nreverse (inits);
3616 + tree elt_init = build_zero_init (TREE_TYPE (type),
3617 + /*nelts=*/NULL_TREE,
3618 + static_storage_p);
3619 + tree range = build (RANGE_EXPR,
3620 + sizetype, size_zero_node, max_index);
3622 + inits = tree_cons (range, elt_init, inits);
3625 + CONSTRUCTOR_ELTS (init) = nreverse (inits);
3627 else if (TREE_CODE (type) == REFERENCE_TYPE)
3629 Index: gcc/doc/install.texi
3630 ===================================================================
3631 RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
3632 retrieving revision 1.151.2.53
3633 retrieving revision 1.151.2.56
3634 diff -u -r1.151.2.53 -r1.151.2.56
3635 --- gcc/gcc/doc/install.texi 8 May 2004 17:37:31 -0000 1.151.2.53
3636 +++ gcc/gcc/doc/install.texi 14 Oct 2004 12:31:38 -0000 1.151.2.56
3637 @@ -3098,8 +3098,19 @@
3638 @file{/usr/bin} before @file{/usr/xpg4/bin} for the duration of the build.
3640 All releases of GNU binutils prior to 2.11.2 have known bugs on this
3641 -platform. We recommend the use of GNU binutils 2.11.2 or the vendor
3642 -tools (Sun @command{as}, Sun @command{ld}).
3643 +platform. We recommend the use of GNU binutils 2.11.2 or later, or the
3644 +vendor tools (Sun @command{as}, Sun @command{ld}). Note that your mileage
3645 +may vary if you use a combination of the GNU tools and the Sun tools: while
3646 +the combination GNU @command{as} + Sun @command{ld} should reasonably work,
3647 +the reverse combination Sun @command{as} + GNU @command{ld} is known to
3648 +cause memory corruption at runtime in some cases for C++ programs.
3650 +The stock GNU binutils 2.15 release is broken on this platform because of a
3651 +single bug. It has been fixed on the 2.15 branch in the CVS repository.
3652 +You can obtain a working version by checking out the binutils-2_15-branch
3653 +from the CVS repository or applying the patch
3654 +@uref{http://sources.redhat.com/ml/binutils-cvs/2004-09/msg00036.html} to the
3657 Sun bug 4296832 turns up when compiling X11 headers with GCC 2.95 or
3658 newer: @command{g++} will complain that types are missing. These headers assume
3659 @@ -3115,6 +3126,17 @@
3660 108377-20 for Intel), and Solaris 8 (108652-24 or newer for SPARC,
3661 108653-22 for Intel) that fix this bug.
3663 +Sun bug 4927647 sometimes causes random spurious testsuite failures
3664 +related to missing diagnostic output. This bug doesn't affect GCC
3665 +itself, rather it is a kernel bug triggered by the @command{expect}
3666 +program which is used only by the GCC testsuite driver. When the bug
3667 +causes the @command{expect} program to miss anticipated output, extra
3668 +testsuite failures appear.
3670 +There are patches for Solaris 8 (117350-12 or newer for SPARC,
3671 +117351-12 or newer for Intel) and Solaris 9 (117171-11 or newer for
3672 +SPARC, 117172-11 or newer for Intel) that address this problem.
3677 Index: gcc/doc/tm.texi
3678 ===================================================================
3679 RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v
3680 retrieving revision 1.182.2.8
3681 retrieving revision 1.182.2.9
3682 diff -u -r1.182.2.8 -r1.182.2.9
3683 --- gcc/gcc/doc/tm.texi 5 Mar 2004 17:55:57 -0000 1.182.2.8
3684 +++ gcc/gcc/doc/tm.texi 14 Oct 2004 06:54:32 -0000 1.182.2.9
3685 @@ -4160,7 +4160,7 @@
3688 @findex TARGET_ASM_OUTPUT_MI_THUNK
3689 -@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, tree @var{function})
3690 +@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, HOST_WIDE_INT @var{vcall_offset}, tree @var{function})
3691 A function that outputs the assembler code for a thunk
3692 function, used to implement C++ virtual function calls with multiple
3693 inheritance. The thunk acts as a wrapper around a virtual function,
3694 @@ -4174,7 +4174,15 @@
3695 e.g.@: @samp{%o0} on a sparc. The addition must preserve the values of
3696 all other incoming arguments.
3698 -After the addition, emit code to jump to @var{function}, which is a
3699 +Then, if @var{vcall_offset} is nonzero, an additional adjustment should be
3700 +made after adding @code{delta}. In particular, if @var{p} is the
3701 +adjusted pointer, the following adjustment should be made:
3704 +p += (*((ptrdiff_t **)p))[vcall_offset/sizeof(ptrdiff_t)]
3707 +After the additions, emit code to jump to @var{function}, which is a
3708 @code{FUNCTION_DECL}. This is a direct pure jump, not a call, and does
3709 not touch the return address. Hence returning from @var{FUNCTION} will
3710 return to whoever called the current @samp{thunk}.
3711 @@ -4194,21 +4202,13 @@
3712 not support varargs.
3715 -@findex TARGET_ASM_OUTPUT_MI_VCALL_THUNK
3716 -@deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_VCALL_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, int @var{vcall_offset}, tree @var{function})
3717 -A function like @code{TARGET_ASM_OUTPUT_MI_THUNK}, except that if
3718 -@var{vcall_offset} is nonzero, an additional adjustment should be made
3719 -after adding @code{delta}. In particular, if @var{p} is the
3720 -adjusted pointer, the following adjustment should be made:
3723 -p += (*((ptrdiff_t **)p))[vcall_offset/sizeof(ptrdiff_t)]
3727 -If this function is defined, it will always be used in place of
3728 -@code{TARGET_ASM_OUTPUT_MI_THUNK}.
3730 +@findex TARGET_ASM_CAN_OUTPUT_MI_THUNK
3731 +@deftypefn {Target Hook} bool TARGET_ASM_CAN_OUTPUT_MI_THUNK (tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, HOST_WIDE_INT @var{vcall_offset}, tree @var{function})
3732 +A function that returns true if TARGET_ASM_OUTPUT_MI_THUNK would be able
3733 +to output the assembler code for the thunk function specified by the
3734 +arguments it is passed, and false otherwise. In the latter case, the
3735 +generic approach will be used by the C++ front end, with the limitations
3736 +previously exposed.
3740 Index: gcc/testsuite/ChangeLog
3741 ===================================================================
3742 RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
3743 retrieving revision 1.2261.2.384
3744 retrieving revision 1.2261.2.398
3745 diff -u -r1.2261.2.384 -r1.2261.2.398
3746 --- gcc/gcc/testsuite/ChangeLog 30 Sep 2004 16:45:41 -0000 1.2261.2.384
3747 +++ gcc/gcc/testsuite/ChangeLog 23 Jan 2005 05:16:05 -0000 1.2261.2.398
3749 +2005-01-22 Roger Sayle <roger@eyesopen.com>
3752 + Backport from mainline
3753 + 2003-02-05 Jakub Jelinek <jakub@redhat.com>
3755 + PR optimization/8555
3756 + * gcc.dg/20030204-1.c: New test.
3758 +2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3761 + * g++.dg/warn/Winline-4.C: New test.
3763 +2005-01-18 Eric Botcazou <ebotcazou@libertysurf.fr>
3765 + * gcc.dg/short-compare-1.c: New test.
3766 + * gcc.dg/short-compare-2.c: Likewise.
3768 +2005-01-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3771 + 2003-10-13 Geoffrey Keating <geoffk@apple.com>
3773 + * gcc.dg/asm-names.c: Use scan-assembler-not rather
3774 + than linker trickery.
3776 +2005-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3778 + * gcc.c-torture/execute/20020720-1.x: XFAIL for x86 when using
3781 +2004-12-21 Joseph S. Myers <jsm@polyomino.org.uk>
3784 + * gcc.dg/pr14765-1.c: New test.
3786 +2004-12-20 Andrew Pinski <pinskia@physics.uc.edu>
3789 + * g++.dg/opt/max1.C: Fix for 64bit targets.
3791 +2004-12-19 Roger Sayle <roger@eyesopen.com>
3793 + PR middle-end/19068
3794 + * g++.dg/opt/max1.C: New test case.
3796 +2004-12-16 Wolfgang Bangerth <bangerth@dealii.com>
3798 + * g++.dg/other/complex1.C: New test.
3800 +2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3802 + PR rtl-optimization/16536
3803 + * gcc.c-torture/execute/restrict-1.c: New test.
3805 +2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
3808 + * g++.dg/init/array15.C: New.
3809 + * g++.dg/init/array16.C: New.
3811 +2004-11-29 Roger Sayle <roger@eyesopen.com>
3813 + PR rtl-optimization/9771
3814 + * gcc.dg/pr9771-1.c: New test case.
3816 +2004-11-27 Falk Hueffner <falk@debian.org>
3818 + * gcc.dg/loop-6.c: New test.
3820 +2004-10-13 Eric Botcazou <ebotcazou@libertysurf.fr>
3822 + * g++.dg/inherit/thunk1.C: Run on the SPARC.
3824 2004-09-30 Release Manager
3826 * GCC 3.3.5 Released.
3827 Index: gcc/testsuite/g++.dg/inherit/thunk1.C
3828 ===================================================================
3829 RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.dg/inherit/thunk1.C,v
3830 retrieving revision 1.5
3831 retrieving revision 1.5.12.1
3832 diff -u -r1.5 -r1.5.12.1
3833 --- gcc/gcc/testsuite/g++.dg/inherit/thunk1.C 24 Oct 2002 09:16:36 -0000 1.5
3834 +++ gcc/gcc/testsuite/g++.dg/inherit/thunk1.C 14 Oct 2004 06:54:49 -0000 1.5.12.1
3836 -// { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* alpha*-*-* ia64-*-* } }
3837 +// { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* alpha*-*-* ia64-*-* sparc*-*-* } }
3841 Index: gcc/testsuite/g++.dg/init/array15.C
3842 ===================================================================
3843 RCS file: gcc/testsuite/g++.dg/init/array15.C
3844 diff -N gcc/testsuite/g++.dg/init/array15.C
3845 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
3846 +++ gcc/gcc/testsuite/g++.dg/init/array15.C 9 Dec 2004 15:09:32 -0000 1.1.6.1
3850 +// Copyright (C) 2004 Free Software Foundation, Inc.
3851 +// Contributed by Nathan Sidwell 8 Dec 2004 <nathan@codesourcery.com>
3853 +// PR 16681 too much memory used
3854 +// Origin: Matt LaFary <lafary@activmedia.com>
3857 + unsigned char buffer[4111222];
3859 + bool check () const;
3866 +bool foo::check () const
3868 + for (unsigned ix = sizeof (buffer); ix--;)
3874 +void *operator new (__SIZE_TYPE__ size, void *p)
3879 +char heap[5000000];
3883 + for (unsigned ix = sizeof (heap); ix--;)
3886 + foo *f = new (heap) foo ();
3894 Index: gcc/testsuite/g++.dg/init/array16.C
3895 ===================================================================
3896 RCS file: gcc/testsuite/g++.dg/init/array16.C
3897 diff -N gcc/testsuite/g++.dg/init/array16.C
3898 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
3899 +++ gcc/gcc/testsuite/g++.dg/init/array16.C 9 Dec 2004 15:09:32 -0000 1.1.6.1
3903 +// Copyright (C) 2004 Free Software Foundation, Inc.
3904 +// Contributed by Nathan Sidwell 8 Dec 2004 <nathan@codesourcery.com>
3906 +// PR 16681 too much memory used
3907 +// Origin: Matt LaFary <lafary@activmedia.com>
3954 + elt buffer[4111222];
3956 + bool check () const;
3963 +bool foo::check () const
3965 + for (unsigned ix = sizeof (buffer)/ sizeof (buffer[0]); ix--;)
3971 +void *operator new (__SIZE_TYPE__ size, void *p)
3976 +char heap[5000000];
3980 + for (unsigned ix = sizeof (heap); ix--;)
3985 + foo *f = new (heap) foo ();
3993 + return elt::abort + 3;
3996 + for (unsigned ix = sizeof (heap); ix--;)
4000 + foo *f = new (heap) foo ();
4007 Index: gcc/testsuite/g++.dg/opt/max1.C
4008 ===================================================================
4009 RCS file: gcc/testsuite/g++.dg/opt/max1.C
4010 diff -N gcc/testsuite/g++.dg/opt/max1.C
4011 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
4012 +++ gcc/gcc/testsuite/g++.dg/opt/max1.C 20 Dec 2004 21:12:34 -0000 1.2.2.2
4014 +/* PR middle-end/19068 */
4015 +/* Test case by Andrew Pinski <pinskia@physics.uc.edu> */
4016 +/* { dg-do run } */
4017 +/* { dg-options "-O2" } */
4019 +extern "C" void abort (void);
4026 + a = *((long*)(a+1+sizeof(long))) >? *((long*)(a+1));
4035 + long a[2] = {10,5};
4037 + for(i = 0;i<10;i++)
4043 Index: gcc/testsuite/g++.dg/other/complex1.C
4044 ===================================================================
4045 RCS file: gcc/testsuite/g++.dg/other/complex1.C
4046 diff -N gcc/testsuite/g++.dg/other/complex1.C
4047 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
4048 +++ gcc/gcc/testsuite/g++.dg/other/complex1.C 16 Dec 2004 14:04:52 -0000 1.1.4.1
4050 +// PR middle-end/18882
4051 +// Origin: Petr Mikulik <mikulik@physics.muni.cz>
4052 +// Testcase by Wolfgang Bangerth <bangerth@dealii.com>
4055 +// { dg-options "" }
4057 +extern "C" void abort ();
4060 + __complex__ long double c;
4068 + C y = (n==1) ? x : (C){3+3i};
4069 + if (__imag__ y.c != 2)
4078 Index: gcc/testsuite/g++.dg/warn/Winline-4.C
4079 ===================================================================
4080 RCS file: gcc/testsuite/g++.dg/warn/Winline-4.C
4081 diff -N gcc/testsuite/g++.dg/warn/Winline-4.C
4082 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
4083 +++ gcc/gcc/testsuite/g++.dg/warn/Winline-4.C 21 Jan 2005 10:02:30 -0000 1.1.42.1
4085 +// { dg-do compile }
4086 +// { dg-options "-O2 -Winline" }
4087 +// Origin: <markus at oberhumer dot com>
4088 +// PR 17115: We should not emit -Winline warning for functions marked with
4092 + __attribute__((noinline)) int a(int r) { return r & 1; }
4093 + virtual __attribute__((noinline)) int b(int r) { return r & 1; }
4094 + static __attribute__((noinline)) int c(int r) { return r & 1; }
4099 + int k = 1; k &= f.a(r); k &= f.b(r); k &= f.a(r);
4102 Index: gcc/testsuite/gcc.c-torture/execute/20020720-1.x
4103 ===================================================================
4104 RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/20020720-1.x,v
4105 retrieving revision 1.8.6.2
4106 retrieving revision 1.8.6.3
4107 diff -u -r1.8.6.2 -r1.8.6.3
4108 --- gcc/gcc/testsuite/gcc.c-torture/execute/20020720-1.x 8 Mar 2003 14:34:06 -0000 1.8.6.2
4109 +++ gcc/gcc/testsuite/gcc.c-torture/execute/20020720-1.x 3 Jan 2005 01:43:45 -0000 1.8.6.3
4111 # and can make the optimization.
4113 # Don't XFAIL at -O0, that should never fail.
4114 +if { [istarget "i?86-*-*"] } {
4115 + set torture_eval_before_compile {
4116 + global compiler_conditional_xfail_data
4117 + set compiler_conditional_xfail_data {
4120 + { "-fpic" "-fPIC" } \
4127 set torture_eval_before_compile {
4128 global compiler_conditional_xfail_data
4129 set compiler_conditional_xfail_data {
4130 Index: gcc/testsuite/gcc.c-torture/execute/restrict-1.c
4131 ===================================================================
4132 RCS file: gcc/testsuite/gcc.c-torture/execute/restrict-1.c
4133 diff -N gcc/testsuite/gcc.c-torture/execute/restrict-1.c
4134 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
4135 +++ gcc/gcc/testsuite/gcc.c-torture/execute/restrict-1.c 10 Dec 2004 17:25:07 -0000 1.2.44.1
4137 +/* PR rtl-optimization/16536
4138 + Origin: Jeremy Denise <jeremy.denise@libertysurf.fr>
4139 + Reduced: Wolfgang Bangerth <bangerth@dealii.org>
4140 + Volker Reichelt <reichelt@igpm.rwth-aachen.de> */
4142 +extern void abort ();
4149 +inline A foo (const A* p, const A* q)
4151 + return (A){p->i+q->i};
4154 +void bar (A* __restrict__ p)
4167 Index: gcc/testsuite/gcc.dg/20030204-1.c
4168 ===================================================================
4169 RCS file: gcc/testsuite/gcc.dg/20030204-1.c
4170 diff -N gcc/testsuite/gcc.dg/20030204-1.c
4171 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
4172 +++ gcc/gcc/testsuite/gcc.dg/20030204-1.c 23 Jan 2005 05:16:14 -0000 1.3.6.1
4174 +/* PR optimization/8555 */
4175 +/* { dg-do compile } */
4176 +/* { dg-options "-O -ffast-math -funroll-loops" } */
4177 +/* { dg-options "-march=pentium3 -O -ffast-math -funroll-loops" { target i?86-*-* } } */
4179 +float foo (float *a, int i)
4182 + float x = a[j = i - 1], y;
4184 + for (j = i; --j >= 0; )
4185 + if ((y = a[j]) > x)
4190 Index: gcc/testsuite/gcc.dg/asm-names.c
4191 ===================================================================
4192 RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/asm-names.c,v
4193 retrieving revision 1.2
4194 retrieving revision 1.2.44.1
4195 diff -u -r1.2 -r1.2.44.1
4196 --- gcc/gcc/testsuite/gcc.dg/asm-names.c 27 Aug 2001 19:23:11 -0000 1.2
4197 +++ gcc/gcc/testsuite/gcc.dg/asm-names.c 4 Jan 2005 00:20:35 -0000 1.2.44.1
4199 to have an underscore prefixed, even if normal symbols are.
4200 Problem reported by Krister Walfridsson <cato@df.lth.se>. */
4202 -/* { dg-do link } */
4203 +/* { dg-do compile } */
4204 /* { dg-options "-fleading-underscore" } */
4205 +/* { dg-final { scan-assembler-not "____frob14" } } */
4207 extern void frobnicate (void) asm ("___frob14"); /* three underscores */
4209 -void __frob14 (void) {} /* two underscores */
4218 -/* In case built where the runtime expects no leading underscore on
4220 -extern int xmain (void) asm ("main");
4222 -int xmain (void) { return main(); }
4224 -/* In case built where the runtime calls __main. */
4225 -extern int ymain (void) asm ("___main");
4226 -int ymain (void) { return main(); }
4227 Index: gcc/testsuite/gcc.dg/loop-6.c
4228 ===================================================================
4229 RCS file: gcc/testsuite/gcc.dg/loop-6.c
4230 diff -N gcc/testsuite/gcc.dg/loop-6.c
4231 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
4232 +++ gcc/gcc/testsuite/gcc.dg/loop-6.c 27 Nov 2004 16:59:16 -0000 1.1.4.1
4234 +/* PR optimization/18577 */
4235 +/* Origin: Falk Hueffner <falk@debian.org> */
4237 +/* { dg-do run } */
4238 +/* { dg-options "-O2 -funroll-all-loops" } */
4240 +static float tfcos12[3];
4241 +__attribute__((noinline)) double f(double x) { return x; }
4247 + for (i = 0; i < 1; i++)
4250 + for (i = 0; i < 1; i++)
4252 + tfcos12[i] = 0.5 * f(i);
4253 + for (j = 0; j < 12; j++)
4259 Index: gcc/testsuite/gcc.dg/pr14765-1.c
4260 ===================================================================
4261 RCS file: gcc/testsuite/gcc.dg/pr14765-1.c
4262 diff -N gcc/testsuite/gcc.dg/pr14765-1.c
4263 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
4264 +++ gcc/gcc/testsuite/gcc.dg/pr14765-1.c 21 Dec 2004 21:51:29 -0000 1.1.48.1
4266 +/* Empty statement expressions should get void type. Bug 14765 from
4267 + Serge Belyshev <belyshev@lubercy.com>. */
4268 +/* { dg-do compile } */
4269 +/* { dg-options "" } */
4275 + a = ({}); /* { dg-error "not ignored" "void stmt expr" } */
4277 Index: gcc/testsuite/gcc.dg/pr9771-1.c
4278 ===================================================================
4279 RCS file: gcc/testsuite/gcc.dg/pr9771-1.c
4280 diff -N gcc/testsuite/gcc.dg/pr9771-1.c
4281 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
4282 +++ gcc/gcc/testsuite/gcc.dg/pr9771-1.c 30 Nov 2004 04:34:21 -0000 1.1.44.1
4284 +/* PR rtl-optimization/9771 */
4285 +/* { dg-do run { target i?86-*-* } } */
4286 +/* { dg-options "-O2 -fomit-frame-pointer -ffixed-ebp" } */
4288 +extern void abort(void);
4289 +extern void exit(int);
4291 +register long *B asm ("ebp");
4319 + if (x != 10 || y != 20)
4322 + /* We can't return, as our caller may assume %ebp is preserved! */
4323 + /* We could save/restore it (like foo), but its easier to exit. */
4327 Index: gcc/testsuite/gcc.dg/short-compare-1.c
4328 ===================================================================
4329 RCS file: gcc/testsuite/gcc.dg/short-compare-1.c
4330 diff -N gcc/testsuite/gcc.dg/short-compare-1.c
4331 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
4332 +++ gcc/gcc/testsuite/gcc.dg/short-compare-1.c 18 Jan 2005 08:39:29 -0000 1.1.4.1
4334 +/* PR rtl-optimization/19296 */
4335 +/* Origin: Falk Hueffner <falk@debian.org> */
4337 +/* { dg-do run } */
4338 +/* { dg-options "-O" } */
4339 +/* { dg-options "-O -mcpu=i686" { target i?86-*-* } } */
4340 +/* { dg-options "-O -m32 -mcpu=i686" { target x86_64-*-* } } */
4342 +extern void abort(void);
4344 +void f(unsigned short ad)
4346 + if (ad >= 0x4000 && ad < 0xc000)
4355 Index: gcc/testsuite/gcc.dg/short-compare-2.c
4356 ===================================================================
4357 RCS file: gcc/testsuite/gcc.dg/short-compare-2.c
4358 diff -N gcc/testsuite/gcc.dg/short-compare-2.c
4359 --- gcc//dev/null 1 Jan 1970 00:00:00 -0000
4360 +++ gcc/gcc/testsuite/gcc.dg/short-compare-2.c 18 Jan 2005 08:39:29 -0000 1.1.4.1
4362 +/* PR rtl-optimization/19296 */
4363 +/* Origin: Falk Hueffner <falk@debian.org> */
4364 +/* Testcase by Andrew Pinski <pinskia@gcc.gnu.org> */
4366 +/* { dg-do run } */
4367 +/* { dg-options "-O" } */
4368 +/* { dg-options "-O -mcpu=i686" { target i?86-*-* } } */
4369 +/* { dg-options "-O -m32 -mcpu=i686" { target x86_64-*-* } } */
4371 +extern void abort();
4373 +void f(unsigned short ad)
4375 + if ((short) (ad - 0x4000) >= 0)
4384 Index: libstdc++-v3/ChangeLog
4385 ===================================================================
4386 RCS file: /cvs/gcc/gcc/libstdc++-v3/ChangeLog,v
4387 retrieving revision 1.1464.2.192
4388 retrieving revision 1.1464.2.195
4389 diff -u -r1.1464.2.192 -r1.1464.2.195
4390 --- gcc/libstdc++-v3/ChangeLog 30 Sep 2004 16:47:23 -0000 1.1464.2.192
4391 +++ gcc/libstdc++-v3/ChangeLog 21 Jan 2005 23:52:45 -0000 1.1464.2.195
4393 +2005-01-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4395 + PR libstdc++/19510
4396 + * include/bits/stl_list.h (_List_iterator_base): Initialize _M_node
4398 + (_List_iterator): Initialize _List_iterator_base in constructor.
4399 + * include/bits/stl_tree.h (_Rb_tree_iterator): Initialize _M_node
4402 +2004-12-03 Richard Henderson <rth@redhat.com>
4405 + * config/cpu/i486/atomicity.h (__exchange_and_add, __atomic_add):
4406 + Split in-out memory constraints.
4408 2004-09-30 Release Manager
4410 * GCC 3.3.5 Released.
4411 Index: libstdc++-v3/config/cpu/i486/atomicity.h
4412 ===================================================================
4413 RCS file: /cvs/gcc/gcc/libstdc++-v3/config/cpu/i486/atomicity.h,v
4414 retrieving revision 1.1.22.1
4415 retrieving revision 1.1.22.2
4416 diff -u -r1.1.22.1 -r1.1.22.2
4417 --- gcc/libstdc++-v3/config/cpu/i486/atomicity.h 2 Jun 2003 18:48:52 -0000 1.1.22.1
4418 +++ gcc/libstdc++-v3/config/cpu/i486/atomicity.h 3 Dec 2004 23:44:07 -0000 1.1.22.2
4420 // Low-level functions for atomic operations: x86, x >= 4 version -*- C++ -*-
4422 -// Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
4423 +// Copyright (C) 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
4425 // This file is part of the GNU ISO C++ Library. This library is free
4426 // software; you can redistribute it and/or modify it under the
4429 register _Atomic_word __result;
4430 __asm__ __volatile__ ("lock; xadd{l} {%0,%1|%1,%0}"
4431 - : "=r" (__result), "+m" (*__mem)
4433 + : "=r" (__result), "=m" (*__mem)
4434 + : "0" (__val), "m"(*__mem)
4439 __atomic_add (volatile _Atomic_word* __mem, int __val)
4441 __asm__ __volatile__ ("lock; add{l} {%1,%0|%0,%1}"
4442 - : "+m" (*__mem) : "ir" (__val) : "memory");
4444 + : "ir" (__val), "m"(*__mem)
4448 #endif /* atomicity.h */
4449 Index: libstdc++-v3/include/bits/c++config
4450 ===================================================================
4451 RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/c++config,v
4452 retrieving revision 1.574.2.657
4453 retrieving revision 1.574.2.779
4454 diff -u -r1.574.2.657 -r1.574.2.779
4455 --- gcc/libstdc++-v3/include/bits/c++config 30 Sep 2004 00:16:09 -0000 1.574.2.657
4456 +++ gcc/libstdc++-v3/include/bits/c++config 30 Jan 2005 00:16:14 -0000 1.574.2.779
4458 #include <bits/os_defines.h>
4460 // The current version of the C++ library in compressed ISO date format.
4461 -#define __GLIBCPP__ 20040930
4462 +#define __GLIBCPP__ 20050130
4464 // This is necessary until GCC supports separate template compilation.
4465 #define _GLIBCPP_NO_TEMPLATE_EXPORT 1
4466 Index: libstdc++-v3/include/bits/stl_list.h
4467 ===================================================================
4468 RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_list.h,v
4469 retrieving revision 1.20
4470 retrieving revision 1.20.8.1
4471 diff -u -r1.20 -r1.20.8.1
4472 --- gcc/libstdc++-v3/include/bits/stl_list.h 10 Sep 2002 23:19:10 -0000 1.20
4473 +++ gcc/libstdc++-v3/include/bits/stl_list.h 21 Jan 2005 23:52:48 -0000 1.20.8.1
4475 // List implementation -*- C++ -*-
4477 -// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
4478 +// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
4480 // This file is part of the GNU ISO C++ Library. This library is free
4481 // software; you can redistribute it and/or modify it under the
4485 _List_iterator_base()
4489 /// Walk the %list forward.
4494 + : _List_iterator_base()
4497 _List_iterator(const iterator& __x)
4498 Index: libstdc++-v3/include/bits/stl_tree.h
4499 ===================================================================
4500 RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_tree.h,v
4501 retrieving revision 1.17
4502 retrieving revision 1.17.2.1
4503 diff -u -r1.17 -r1.17.2.1
4504 --- gcc/libstdc++-v3/include/bits/stl_tree.h 22 Nov 2002 18:53:53 -0000 1.17
4505 +++ gcc/libstdc++-v3/include/bits/stl_tree.h 21 Jan 2005 23:52:49 -0000 1.17.2.1
4507 // RB tree implementation -*- C++ -*-
4509 -// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
4510 +// Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
4512 // This file is part of the GNU ISO C++ Library. This library is free
4513 // software; you can redistribute it and/or modify it under the
4515 typedef _Rb_tree_iterator<_Val, _Ref, _Ptr> _Self;
4516 typedef _Rb_tree_node<_Val>* _Link_type;
4518 - _Rb_tree_iterator() {}
4519 + _Rb_tree_iterator() { _M_node = 0; }
4520 _Rb_tree_iterator(_Link_type __x) { _M_node = __x; }
4521 _Rb_tree_iterator(const iterator& __it) { _M_node = __it._M_node; }