From cbab3205286065bef3f77788d973d62378b6d6f0 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sat, 22 Jan 2000 02:59:08 +0000 Subject: Bring in bug fixes from the GCC anoncvs server's "gcc-2_95-branch" branch on Jan 20th, 2000. --- contrib/gcc/ChangeLog | 87 +++++++++++++++++++++++++++++++++++++++ contrib/gcc/cccp.c | 2 + contrib/gcc/config/i386/sol2gas.h | 6 +-- contrib/gcc/config/sparc/sparc.md | 4 +- contrib/gcc/configure.in | 11 +++-- contrib/gcc/cp/ChangeLog | 5 +++ contrib/gcc/cp/decl2.c | 10 +++-- contrib/gcc/cppinit.c | 2 +- contrib/gcc/cse.c | 61 +++++++-------------------- contrib/gcc/fold-const.c | 2 +- contrib/gcc/invoke.texi | 39 ++++++++++++++---- contrib/gcc/loop.c | 10 ++++- contrib/gcc/stmt.c | 12 +++--- 13 files changed, 172 insertions(+), 79 deletions(-) (limited to 'contrib/gcc') diff --git a/contrib/gcc/ChangeLog b/contrib/gcc/ChangeLog index 41cfebf6a07d..b6b2b55a8257 100644 --- a/contrib/gcc/ChangeLog +++ b/contrib/gcc/ChangeLog @@ -1,3 +1,90 @@ +Thu Jan 20 10:02:07 2000 Richard Henderson + + 2000-01-03 Anthony Green + * config/i386/i386.md (builtin_setjmp_receiver): New pattern. + Restore the pic register if required. + +Fri Jan 7 14:40:05 2000 Richard Henderson + + Thu Oct 28 18:06:50 1999 Richard Kenner + * stmt.c (expand_value_return): Correctly convert VAL when promoting + function return. + +Tue Jan 4 02:22:27 2000 Jeffrey A Law (law@cygnus.com) + + Mon Oct 18 18:50:51 1999 Andreas Schwab + * config/m68k/m68k.h (INITIAL_FRAME_POINTER_OFFSET): Add one word + if the pic register is used. + + Sat Sep 25 13:11:07 1999 Jeffrey A Law (law@cygnus.com) + * cse.c: Update comments. + (cse_insn): When converting a conditional/computed jump into + an unconditional jump, always make sure a BARRIER immediately + follows the converted jump. Do not delete unreachable code. + (cse_basic_block): Do not delete unreachable code. + * toplev.c (rest_of_compilation): Move call to + delete_trivially_dead_insns after the conditional call to + jump_optimize. + + +Wed Dec 29 22:47:43 1999 Jeffrey A Law (law@cygnus.com) + + 1999-12-12 Stephen L Moshier + * loop.c (load_mems): Don't hoist written floating point mem + if -ffloat-store. + + * cppinit.c (is_idchar): Only use special initialization for + gcc-2.8 and later versions of the compiler. + + Wed Oct 27 01:42:26 1999 Scott Christley + * sparc.md (call): Don't bound structure return size to 0xfff. + +Mon Dec 27 07:32:59 1999 Jeffrey A Law (law@cygnus.com) + + Fri Sep 3 10:16:37 HST 1999 Glen Nakamura + * cccp.c (rescan): Fixed obp pointer handling around call to + check_expand subroutine. + + Thu Sep 16 00:46:35 1999 Geoff Keating + * loop.c (basic_induction_var): A non-integer variable which is + being set by a paradoxical subreg is probably not a biv. + + 1999-08-31 12:20 -0700 Zack Weinberg + * loop.c (check_dbra_loop): Check bl->biv->add_val is a + CONST_INT before using its INTVAL. + + Tue Nov 2 15:27:31 1999 Alexandre Oliva + * configure.in (m68k-hp-hpux*, xm_alloca.h): The underscore should + have been an hyphen, fixed. + * configure: Rebuilt. + +Thu Dec 23 11:59:56 1999 Jeffrey A Law (law@cygnus.com) + + 1999-12-23 Martin v. Löwis + * fold-const.c (operand_equal_p): Use memcmp to compare string + constants. + Suggested by D. J. Bernstein + + Thu Dec 16 02:26:11 1999 Jeffrey A Law (law@cygnus.com) + * h8300.md (HImode preinc peephole): Fix typo. + + 1999-12-14 Bernd Schmidt + * loop.c (check_dbra_loop): Can't reverse a biv that has + maybe_multiple set. + +1999-12-07 Martin v. Löwis + + * invoke.texi (C Dialect Options): Remove -flang-c9x, add -std + documentation. + +Sun Oct 31 22:32:17 1999 Alexandre Oliva + + * config/i386/sol2gas.h: I had installed the wrong version of Sept + 22's patch in the release branch. Fixed. + * configure.in: Likewise. + * configure: Rebuilt. + Reported by Jason Beardsley + Sun Oct 24 23:54:10 PDT 1999 Jeff Law (law@cygnus.com) * gcc-2.95.2 Released. diff --git a/contrib/gcc/cccp.c b/contrib/gcc/cccp.c index 6e2d519f6263..473ff4532b25 100644 --- a/contrib/gcc/cccp.c +++ b/contrib/gcc/cccp.c @@ -3299,7 +3299,9 @@ randomchar: #endif if (output_marks) { + op->bufp = obp; check_expand (op, limit - ibp + 2); + obp = op->bufp; *obp++ = '\n'; *obp++ = '-'; } diff --git a/contrib/gcc/config/i386/sol2gas.h b/contrib/gcc/config/i386/sol2gas.h index 7f2c9629d7c8..558183aecd57 100644 --- a/contrib/gcc/config/i386/sol2gas.h +++ b/contrib/gcc/config/i386/sol2gas.h @@ -4,8 +4,6 @@ Copyright (C) 1999 Free Software Foundation, Inc. */ -#ifndef GAS_DOES_NOT_SUPPORT_MINUS_S -#define GAS_DOES_NOT_SUPPORT_MINUS_S 1 +#ifndef GAS_REJECTS_MINUS_S +#define GAS_REJECTS_MINUS_S 1 #endif - -#include "i386/sol2.h" diff --git a/contrib/gcc/config/sparc/sparc.md b/contrib/gcc/config/sparc/sparc.md index cb008b169b1c..aafb7a63ea41 100644 --- a/contrib/gcc/config/sparc/sparc.md +++ b/contrib/gcc/config/sparc/sparc.md @@ -7355,7 +7355,7 @@ gen_rtvec (3, gen_rtx_SET (VOIDmode, pc_rtx, XEXP (operands[0], 0)), - GEN_INT (INTVAL (operands[3]) & 0xfff), + operands[3], gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (Pmode, 15))))); else @@ -7387,7 +7387,7 @@ emit_call_insn (gen_rtx_PARALLEL (VOIDmode, gen_rtvec (3, gen_rtx_CALL (VOIDmode, fn_rtx, nregs_rtx), - GEN_INT (INTVAL (operands[3]) & 0xfff), + operands[3], gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (Pmode, 15))))); else diff --git a/contrib/gcc/configure.in b/contrib/gcc/configure.in index e43c1571cf32..c9e2bbf20571 100644 --- a/contrib/gcc/configure.in +++ b/contrib/gcc/configure.in @@ -1399,11 +1399,10 @@ changequote(,)dnl changequote([,])dnl xm_file="xm-siglist.h xm-alloca.h ${xm_file}" xm_defines="USG POSIX SMALL_ARG_MAX" + tm_file=i386/sol2.h if test x$gas = xyes; then # Only needed if gas does not support -s - tm_file=i386/sol2gas.h - else - tm_file=i386/sol2.h + tm_file="i386/sol2gas.h ${tm_file}" fi tmake_file=i386/t-sol2 extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o" @@ -1689,7 +1688,7 @@ changequote([,])dnl extra_headers=math-68881.h ;; m68000-hp-hpux*) # HP 9000 series 300 - xm_file="xm_alloca.h ${xm_file}" + xm_file="xm-alloca.h ${xm_file}" xm_defines="USG NO_SYS_SIGLIST" if test x$gas = xyes then @@ -1890,7 +1889,7 @@ changequote([,])dnl extra_headers=math-68881.h ;; m68k-hp-hpux7*) # HP 9000 series 300 running HPUX version 7. - xm_file="xm_alloca.h ${xm_file}" + xm_file="xm-alloca.h ${xm_file}" xm_defines="USG NO_SYS_SIGLIST" if test x$gas = xyes then @@ -1906,7 +1905,7 @@ changequote([,])dnl float_format=m68k ;; m68k-hp-hpux*) # HP 9000 series 300 - xm_file="xm_alloca.h ${xm_file}" + xm_file="xm-alloca.h ${xm_file}" xm_defines="USG NO_SYS_SIGLIST" if test x$gas = xyes then diff --git a/contrib/gcc/cp/ChangeLog b/contrib/gcc/cp/ChangeLog index efa30edcad2b..605bafc0a52c 100644 --- a/contrib/gcc/cp/ChangeLog +++ b/contrib/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-11-01 Jason Merrill + + * decl2.c (maybe_make_one_only): Always make things comdat on + ELF targets, too. + Sun Oct 24 23:54:10 PDT 1999 Jeff Law (law@cygnus.com) * gcc-2.95.2 Released. diff --git a/contrib/gcc/cp/decl2.c b/contrib/gcc/cp/decl2.c index d6fb7bf90fad..bdeadb502611 100644 --- a/contrib/gcc/cp/decl2.c +++ b/contrib/gcc/cp/decl2.c @@ -2485,9 +2485,13 @@ void maybe_make_one_only (decl) tree decl; { - /* This is not necessary on targets that support weak symbols, because - the implicit instantiations will defer to the explicit one. */ - if (! supports_one_only () || SUPPORTS_WEAK) + /* We used to say that this was not necessary on targets that support weak + symbols, because the implicit instantiations will defer to the explicit + one. However, that's not actually the case in SVR4; a strong definition + after a weak one is an error. Also, not making explicit + instantiations one_only means that we can end up with two copies of + some template instantiations. */ + if (! supports_one_only ()) return; /* We can't set DECL_COMDAT on functions, or finish_file will think diff --git a/contrib/gcc/cppinit.c b/contrib/gcc/cppinit.c index 4fb3ca8d94d9..86e0d68a78fe 100644 --- a/contrib/gcc/cppinit.c +++ b/contrib/gcc/cppinit.c @@ -210,7 +210,7 @@ enum { QUOTE = 0, BRACKET, SYSTEM, AFTER }; /* If gcc is in use (stage2/stage3) we can make these tables initialized data. */ #if defined __GNUC__ && (__GNUC__ > 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ > 6)) + || (__GNUC__ == 2 && __GNUC_MINOR__ > 8)) /* Table to tell if a character is legal as the second or later character of a C identifier. */ U_CHAR is_idchar[256] = diff --git a/contrib/gcc/cse.c b/contrib/gcc/cse.c index 7182b74024e9..e315610b3e28 100644 --- a/contrib/gcc/cse.c +++ b/contrib/gcc/cse.c @@ -1,5 +1,5 @@ /* Common subexpression elimination for GNU compiler. - Copyright (C) 1987, 88, 89, 92-7, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1987, 88, 89, 92-99, 2000 Free Software Foundation, Inc. This file is part of GNU CC. @@ -42,12 +42,14 @@ Boston, MA 02111-1307, USA. */ expressions encountered with the cheapest equivalent expression. It is too complicated to keep track of the different possibilities - when control paths merge; so, at each label, we forget all that is - known and start fresh. This can be described as processing each - basic block separately. Note, however, that these are not quite - the same as the basic blocks found by a later pass and used for - data flow analysis and register packing. We do not need to start fresh - after a conditional jump instruction if there is no label there. + when control paths merge in this code; so, at each label, we forget all + that is known and start fresh. This can be described as processing each + extended basic block separately. We have a separate pass to perform + global CSE. + + Note CSE can turn a conditional or computed jump into a nop or + an unconditional jump. When this occurs we arrange to run the jump + optimizer after CSE to delete the unreachable code. We use two data structures to record the equivalent expressions: a hash table for most expressions, and several vectors together @@ -7468,7 +7470,6 @@ cse_insn (insn, libcall_insn) rtx new = emit_jump_insn_before (gen_jump (XEXP (src, 0)), insn); JUMP_LABEL (new) = XEXP (src, 0); LABEL_NUSES (XEXP (src, 0))++; - delete_insn (insn); insn = new; } else @@ -7479,42 +7480,11 @@ cse_insn (insn, libcall_insn) Until the right place is found, might as well do this here. */ INSN_CODE (insn) = -1; - /* Now that we've converted this jump to an unconditional jump, - there is dead code after it. Delete the dead code until we - reach a BARRIER, the end of the function, or a label. Do - not delete NOTEs except for NOTE_INSN_DELETED since later - phases assume these notes are retained. */ - - p = insn; - - while (NEXT_INSN (p) != 0 - && GET_CODE (NEXT_INSN (p)) != BARRIER - && GET_CODE (NEXT_INSN (p)) != CODE_LABEL) - { - /* Note, we must update P with the return value from - delete_insn, otherwise we could get an infinite loop - if NEXT_INSN (p) had INSN_DELETED_P set. */ - if (GET_CODE (NEXT_INSN (p)) != NOTE - || NOTE_LINE_NUMBER (NEXT_INSN (p)) == NOTE_INSN_DELETED) - p = PREV_INSN (delete_insn (NEXT_INSN (p))); - else - p = NEXT_INSN (p); - } - - /* If we don't have a BARRIER immediately after INSN, put one there. - Much code assumes that there are no NOTEs between a JUMP_INSN and - BARRIER. */ - - if (NEXT_INSN (insn) == 0 - || GET_CODE (NEXT_INSN (insn)) != BARRIER) - emit_barrier_before (NEXT_INSN (insn)); - - /* We might have two BARRIERs separated by notes. Delete the second - one if so. */ - - if (p != insn && NEXT_INSN (p) != 0 - && GET_CODE (NEXT_INSN (p)) == BARRIER) - delete_insn (NEXT_INSN (p)); + /* Now emit a BARRIER after the unconditional jump. Do not bother + deleting any unreachable code, let jump/flow do that. */ + if (NEXT_INSN (insn) != 0 + && GET_CODE (NEXT_INSN (insn)) != BARRIER) + emit_barrier_after (insn); cse_jumps_altered = 1; sets[i].rtl = 0; @@ -9007,9 +8977,6 @@ cse_basic_block (from, to, next_branch, around_loop) insn = NEXT_INSN (to); - if (LABEL_NUSES (to) == 0) - insn = delete_insn (to); - /* If TO was the last insn in the function, we are done. */ if (insn == 0) return 0; diff --git a/contrib/gcc/fold-const.c b/contrib/gcc/fold-const.c index 55dcf9bf1cf3..cbd004e40843 100644 --- a/contrib/gcc/fold-const.c +++ b/contrib/gcc/fold-const.c @@ -2131,7 +2131,7 @@ operand_equal_p (arg0, arg1, only_const) case STRING_CST: return (TREE_STRING_LENGTH (arg0) == TREE_STRING_LENGTH (arg1) - && ! strncmp (TREE_STRING_POINTER (arg0), + && ! memcmp (TREE_STRING_POINTER (arg0), TREE_STRING_POINTER (arg1), TREE_STRING_LENGTH (arg0))); diff --git a/contrib/gcc/invoke.texi b/contrib/gcc/invoke.texi index 230174c036c6..571348e151fc 100644 --- a/contrib/gcc/invoke.texi +++ b/contrib/gcc/invoke.texi @@ -93,7 +93,7 @@ in the following sections. @item C Language Options @xref{C Dialect Options,,Options Controlling C Dialect}. @smallexample --ansi -flang-isoc9x -fallow-single-precision -fcond-mismatch -fno-asm +-ansi -fstd -fallow-single-precision -fcond-mismatch -fno-asm -fno-builtin -ffreestanding -fhosted -fsigned-bitfields -fsigned-char -funsigned-bitfields -funsigned-char -fwritable-strings -traditional -traditional-cpp -trigraphs @@ -667,14 +667,37 @@ programs that might use these names for other things. The functions @code{alloca}, @code{abort}, @code{exit}, and @code{_exit} are not builtin functions when @samp{-ansi} is used. -@item -flang-isoc9x -Enable support for features found in the C9X standard. In particular, -enable support for the C9X @code{restrict} keyword. +@item -fstd= +Determine the language standard. A value for this option must be provided; +possible values are -Even when this option is not specified, you can still use some C9X -features in so far as they do not conflict with previous C standards. -For example, you may use @code{__restrict__} even when -flang-isoc9x -is not specified. +@itemize @minus +@item iso9899:1990 +Same as -ansi + +@item iso9899:199409 +ISO C as modified in amend. 1 + +@item iso9899:199x +ISO C 9x + +@item c89 +same as -std=iso9899:1990 + +@item c9x +same as -std=iso9899:199x + +@item gnu89 +default, iso9899:1990 + gnu extensions + +@item gnu9x +iso9899:199x + gnu extensions +@end itemize + +Even when this option is not specified, you can still use some of the +features of newer standards in so far as they do not conflict with +previous C standards. For example, you may use @code{__restrict__} even +when -fstd=c9x is not specified. @item -fno-asm Do not recognize @code{asm}, @code{inline} or @code{typeof} as a diff --git a/contrib/gcc/loop.c b/contrib/gcc/loop.c index 7ee92e143a69..a5c50529d813 100644 --- a/contrib/gcc/loop.c +++ b/contrib/gcc/loop.c @@ -5998,6 +5998,8 @@ basic_induction_var (x, mode, dest_reg, p, inc_val, mult_val, location) || (GET_CODE (SET_DEST (set)) == SUBREG && (GET_MODE_SIZE (GET_MODE (SET_DEST (set))) <= UNITS_PER_WORD) + && (GET_MODE_CLASS (GET_MODE (SET_DEST (set))) + == MODE_INT) && SUBREG_REG (SET_DEST (set)) == x)) && basic_induction_var (SET_SRC (set), (GET_MODE (SET_SRC (set)) == VOIDmode @@ -7696,6 +7698,7 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info) for (bl = loop_iv_list; bl; bl = bl->next) { if (bl->biv_count == 1 + && ! bl->biv->maybe_multiple && bl->biv->dest_reg == XEXP (comparison, 0) && ! reg_used_between_p (regno_reg_rtx[bl->regno], bl->biv->insn, first_compare)) @@ -7761,7 +7764,8 @@ check_dbra_loop (loop_end, insn_count, loop_start, loop_info) } } } - else if (INTVAL (bl->biv->add_val) > 0) + else if (GET_CODE (bl->biv->add_val) == CONST_INT + && INTVAL (bl->biv->add_val) > 0) { /* Try to change inc to dec, so can apply above optimization. */ /* Can do this if: @@ -9551,6 +9555,10 @@ load_mems (scan_start, end, loop_top, start) mem_list_entry = XEXP (mem_list_entry, 1); } + if (flag_float_store && written + && GET_MODE_CLASS (GET_MODE (mem)) == MODE_FLOAT) + loop_mems[i].optimize = 0; + /* If this MEM is written to, we must be sure that there are no reads from another MEM that aliases this one. */ if (loop_mems[i].optimize && written) diff --git a/contrib/gcc/stmt.c b/contrib/gcc/stmt.c index 018e1907b7c9..f55b2c955ded 100644 --- a/contrib/gcc/stmt.c +++ b/contrib/gcc/stmt.c @@ -2511,15 +2511,15 @@ expand_value_return (val) #ifdef PROMOTE_FUNCTION_RETURN tree type = TREE_TYPE (DECL_RESULT (current_function_decl)); int unsignedp = TREE_UNSIGNED (type); + enum machine_mode old_mode + = DECL_MODE (DECL_RESULT (current_function_decl)); enum machine_mode mode - = promote_mode (type, DECL_MODE (DECL_RESULT (current_function_decl)), - &unsignedp, 1); + = promote_mode (type, old_mode, &unsignedp, 1); - if (GET_MODE (val) != VOIDmode && GET_MODE (val) != mode) - convert_move (return_reg, val, unsignedp); - else + if (mode != old_mode) + val = convert_modes (mode, old_mode, val, unsignedp); #endif - emit_move_insn (return_reg, val); + emit_move_insn (return_reg, val); } if (GET_CODE (return_reg) == REG && REGNO (return_reg) < FIRST_PSEUDO_REGISTER) -- cgit v1.2.3