summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1998-04-04 06:32:39 -0700
committerJeff Law <law@gcc.gnu.org>1998-04-04 06:32:39 -0700
commite5e809f4194e578b5fbd48fc5a1df2377f28d197 (patch)
tree6743f11e58bd7a933b08900d973d89026cd11c43
parent31031eddacda46a500b2390f52cd4474bcaf84ca (diff)
downloadgcc-e5e809f4194e578b5fbd48fc5a1df2377f28d197.tar.gz
* Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12
for details. * haifa-sched.c: Mirror recent changes from gcc2. From-SVN: r18984
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/ChangeLog.1139
-rw-r--r--gcc/ChangeLog.12999
-rw-r--r--gcc/Makefile.in177
-rw-r--r--gcc/NEWS9
-rw-r--r--gcc/README.RS60001
-rw-r--r--gcc/acconfig.h2
-rw-r--r--gcc/c-common.c57
-rw-r--r--gcc/c-decl.c10
-rw-r--r--gcc/c-gperf.h2
-rw-r--r--gcc/c-lex.c28
-rw-r--r--gcc/c-parse.in2
-rw-r--r--gcc/c-parse.y2
-rw-r--r--gcc/c-typeck.c414
-rw-r--r--gcc/calls.c145
-rw-r--r--gcc/cccp.c534
-rw-r--r--gcc/cexp.c6
-rw-r--r--gcc/combine.c76
-rw-r--r--gcc/config.in5
-rwxr-xr-xgcc/config.sub38
-rw-r--r--gcc/config/alpha/elf.h2
-rw-r--r--gcc/config/arm/arm.c18
-rw-r--r--gcc/config/arm/arm.md2
-rw-r--r--gcc/config/arm/t-semi2
-rw-r--r--gcc/config/i386/cygwin32.h9
-rw-r--r--gcc/config/i386/gnu.h3
-rw-r--r--gcc/config/i386/i386.h9
-rw-r--r--gcc/config/i386/i386.md344
-rw-r--r--gcc/config/i386/mingw32.h8
-rw-r--r--gcc/config/i386/xm-go32.h3
-rw-r--r--gcc/config/i386/xm-mingw32.h3
-rw-r--r--gcc/config/i386/xm-sco5.h11
-rw-r--r--gcc/config/i386/xm-sysv4.h11
-rw-r--r--gcc/config/i860/i860.c7
-rw-r--r--gcc/config/i960/i960.c9
-rw-r--r--gcc/config/i960/i960.md32
-rw-r--r--gcc/config/linux.h4
-rw-r--r--gcc/config/m68k/m68k.h2
-rw-r--r--gcc/config/m68k/m68k.md2
-rw-r--r--gcc/config/m68k/xm-mot3300.h5
-rw-r--r--gcc/config/m88k/xm-sysv3.h2
-rw-r--r--gcc/config/mips/abi64.h11
-rw-r--r--gcc/config/mips/ecoff.h2
-rw-r--r--gcc/config/mips/elf.h2
-rw-r--r--gcc/config/mips/iris5.h4
-rw-r--r--gcc/config/mips/iris5gas.h2
-rw-r--r--gcc/config/mips/mips.c5
-rw-r--r--gcc/config/mips/mips.md5
-rw-r--r--gcc/config/mips/rtems64.h4
-rw-r--r--gcc/config/msdos/top.sed4
-rw-r--r--gcc/config/rs6000/rs6000.c2
-rw-r--r--gcc/config/rs6000/rs6000.h6
-rw-r--r--gcc/config/rs6000/x-aix311
-rw-r--r--gcc/config/rs6000/xm-cygwin32.h25
-rw-r--r--gcc/config/rs6000/xm-sysv4.h4
-rw-r--r--gcc/config/sparc/linux.h2
-rw-r--r--gcc/config/sparc/linux64.h2
-rw-r--r--gcc/config/sparc/sparc.c35
-rw-r--r--gcc/config/sparc/sparc.h7
-rw-r--r--gcc/config/sparc/sysv4.h10
-rw-r--r--gcc/config/sparc/xm-linux.h2
-rw-r--r--gcc/config/sparc/xm-sol2.h2
-rw-r--r--gcc/config/t-svr43
-rw-r--r--gcc/config/vax/vax.md13
-rw-r--r--gcc/config/vax/vms.h6
-rw-r--r--gcc/config/winnt/config-nt.sed2
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/call.c4
-rw-r--r--gcc/cp/config-lang.in2
-rw-r--r--gcc/cp/decl.c7
-rw-r--r--gcc/cp/except.c2
-rw-r--r--gcc/cp/exception.cc2
-rw-r--r--gcc/cp/method.c2
-rw-r--r--gcc/cpp.texi60
-rw-r--r--gcc/cpplib.c8
-rw-r--r--gcc/crtstuff.c9
-rw-r--r--gcc/cse.c4
-rw-r--r--gcc/dwarf2out.c14
-rw-r--r--gcc/enquire.c49
-rw-r--r--gcc/except.c2
-rw-r--r--gcc/explow.c5
-rw-r--r--gcc/expmed.c12
-rw-r--r--gcc/expr.c327
-rw-r--r--gcc/expr.h11
-rw-r--r--gcc/extend.texi15
-rw-r--r--gcc/final.c17
-rwxr-xr-xgcc/fixincludes17
-rw-r--r--gcc/flow.c43
-rw-r--r--gcc/fold-const.c24
-rw-r--r--gcc/function.c182
-rw-r--r--gcc/function.h4
-rw-r--r--gcc/gansidecl.h7
-rw-r--r--gcc/gbl-ctors.h4
-rw-r--r--gcc/gcc.c96
-rw-r--r--gcc/gcc.hlp3
-rw-r--r--gcc/gcc.texi343
-rw-r--r--gcc/genattrtab.c1
-rw-r--r--gcc/install.texi50
-rw-r--r--gcc/install1.texi2
-rw-r--r--gcc/integrate.c62
-rw-r--r--gcc/integrate.h5
-rw-r--r--gcc/invoke.texi59
-rw-r--r--gcc/libgcc2.c41
-rw-r--r--gcc/loop.c2
-rw-r--r--gcc/machmode.def6
-rw-r--r--gcc/md.texi10
-rw-r--r--gcc/mips-tfile.c5
-rw-r--r--gcc/objc/Make-lang.in16
-rw-r--r--gcc/objc/objc-parse.c6
-rw-r--r--gcc/objc/objc-parse.y2
-rw-r--r--gcc/obstack.c1
-rw-r--r--gcc/obstack.h173
-rw-r--r--gcc/optabs.c9
-rw-r--r--gcc/prefix.c11
-rw-r--r--gcc/profile.c7
-rw-r--r--gcc/protoize.c88
-rw-r--r--gcc/reg-stack.c8
-rw-r--r--gcc/reload.c47
-rw-r--r--gcc/rtl.h10
-rw-r--r--gcc/rtl.texi12
-rw-r--r--gcc/rtlanal.c2
-rw-r--r--gcc/sched.c22
-rw-r--r--gcc/sdbout.c8
-rw-r--r--gcc/stab.def24
-rw-r--r--gcc/stmt.c15
-rw-r--r--gcc/texinfo.tex303
-rw-r--r--gcc/tm.texi50
-rw-r--r--gcc/toplev.c26
-rw-r--r--gcc/tree.c52
-rw-r--r--gcc/tree.h11
-rw-r--r--gcc/unroll.c50
-rw-r--r--gcc/varasm.c71
-rw-r--r--gcc/version.c2
133 files changed, 3634 insertions, 2118 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 193a62322be..542ef82df62 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+Sat Apr 4 10:23:41 1998 Jeffrey A Law (law@cygnus.com)
+
+ * Check in merge from gcc2. See ChangeLog.11 and ChangeLog.12
+ for details.
+
+ * haifa-sched.c: Mirror recent changes from gcc2.
+
Fri Apr 3 00:17:01 1998 Jeffrey A Law (law@cygnus.com)
* Makefile.in (insn*.o): Depend on system.h.
diff --git a/gcc/ChangeLog.11 b/gcc/ChangeLog.11
index 108f95a354f..c244bb65eb5 100644
--- a/gcc/ChangeLog.11
+++ b/gcc/ChangeLog.11
@@ -1,42 +1,3 @@
-Wed Jan 7 18:02:42 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
-
- * Version 2.8.0 released.
-
-Wed Jan 7 17:54:41 1998 J. Kean Johnston <jkj@sco.com>
-
- * i386/sco5.h ({END,START}FILE_SPEC): Link with correct crtbegin.o
- and crtend.o when using -static.
-
-Wed Jan 7 17:49:14 1998 Jan Christiaan van Winkel <Jan.Christiaan.van.Winkel@ATComputing.nl>
-
- * cppexp.c (gansidecl.h): Include.
-
-Wed Jan 7 17:45:07 1998 Tristan Gingold <gingold@puccini.enst.fr>
-
- * expr.c (get_push_address): Use copy_to_reg instead of force_operand.
- (emit_push_insn): Avoid null pointer deference if aggregate has no
- types.
- (expand_expr): Avoid finite but useless recursion.
- (expand_builtin): Fix typo in calling function.
- * function.c (assign_parms): Avoid useless call to chkr_set_right.
-
-Wed Jan 7 17:31:13 1998 Christian Iseli <Christian.Iseli@lslsun.epfl.ch>
-
- * combine.c (force_to_mode): Return if operand is a CLOBBER.
-
-Wed Jan 7 17:23:24 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
-
- * x-rs6000 (INSTALL): Remove.
-
- * jump.c (jump_optimize): Don't use a hard reg as an operand
- of a conditional move if small register classes.
-
-Wed Jan 7 17:09:28 1998 Jim Wilson <wilson@cygnus.com>
-
- * cse.c (max_insn_uid): New variable.
- (cse_around_loop): Use it.
- (cse_main): Set it.
-
Wed Dec 31 18:40:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* stmt.c (expand_asm_operands): Treat ASM with no outputs as volatile.
diff --git a/gcc/ChangeLog.12 b/gcc/ChangeLog.12
new file mode 100644
index 00000000000..a7585f71090
--- /dev/null
+++ b/gcc/ChangeLog.12
@@ -0,0 +1,999 @@
+Mon Mar 30 13:56:30 1998 Jim Wilson <wilson@cygnus.com>
+
+ * mips/ultrix.h (SUBTARGET_CPP_SPEC): Define.
+
+Wed Mar 25 16:09:01 1998 Michael Meissner <meissner@cygnus.com>
+
+ * rs6000.h (FUNCTION_ARG_PADDING): Cast result to be enum
+ direction.
+ (function_arg_padding): Declare.
+
+ * rs6000.c: Include stdlib.h if we have it.
+ (function_arg_padding): Change return type to int, cast enum's to
+ int.
+
+ (From Kaveh R. Ghazi <ghazi@caip.rutgers.edu>)
+ * rs6000.c (rs6000_override_options): Change type of `i', `j' and
+ `ptt_size' from int to size_t.
+ (rs6000_file_start): Likewise for `i'.
+ (rs6000_replace_regno): Add default case in enumeration switch.
+ (output_epilog): Remove unused variable `i'.
+ (rs6000_longcall_ref): Remove unused variables `len', `p', `reg1'
+ and `reg2'.
+
+ * rs6000.h (ADDITIONAL_REGISTER_NAMES): Add missing braces around
+ initializer.
+ (get_issue_rate, non_logical_cint_operand): Add prototype.
+ (rs6000_output_load_toc_table): Ditto.
+
+ * rs6000.md (udivmodsi4): Add explicit braces to avoid ambiguous
+ `else'.
+
+Wed Mar 25 02:39:01 1998 Paul Eggert <eggert@twinsun.com>
+
+ * configure.in (i[[34567]]86-*-solaris2*, powerpcle-*-solaris2*,
+ sparc-*-solaris2*): Use fixinc.svr4 if Solaris 2.0 through 2.4.
+
+Mon Mar 23 07:27:19 1998 Philippe De Muyter <phdm@macqel.be>
+
+ * m68k.md (ashldi_const): Allow shift count in range ]32,63].
+ (ashldi3): Allow constant shift count in range ]32,63].
+ (ashrdi_const, ashrid3, lshrdi_const, lshrdi3): Likewise.
+
+ * m68k.md (zero_extend[qh]idi2, iordi_zext): New patterns.
+ (zero_extendsidi2): Avoid useless copy.
+ (iorsi_zexthi_ashl16): Avoid "0" constraint for operand 2.
+ (iorsi_zext): New name for old unnamed pattern; indentation fixes.
+
+Mon Mar 23 07:12:05 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * final.c (only_leaf_regs_used): If pic_offset_table_rtx used,
+ make sure it is a permitted register.
+
+Sun Mar 22 06:57:04 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * expmed.c (extract_bit_field): Don't confuse SUBREG_WORD with
+ endian adjustment in SUBREG case.
+ Don't abort if can't make SUBREG needed for extv/extzv.
+
+Sat Mar 21 08:02:17 1998 Richard Gorton <gorton@amt.tay1.dec.com>
+
+ * alpha.md (zero_extendqi[hsd]i2): Use "and", not "zapnot".
+
+Sat Mar 21 07:47:04 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * unroll.c (verify_addresses): Use validate_replace_rtx.
+ (find_splittable_givs): If invalid address, show nothing same_insn.
+
+Fri Mar 20 10:24:12 1998 Philippe De Muyter <phdm@macqel.be>
+
+ * fold-const.c (fold, case CONVERT_EXPR): Replace sign-extension of
+ a zero-extended value by a single zero-extension.
+
+Thu Mar 19 14:59:32 1998 Andrew Pochinsky <avp@ctp.mit.edu>
+
+ * sparc.h (ASM_OUTPUT_LOOP_ALIGN): Fix error in last change.
+
+Thu Mar 19 14:48:35 1998 Michael Meissner <meissner@cygnus.com>
+
+ * gcc.c (default_arg): Don't wander off the end of allocated memory.
+
+ * rs6000/sysv4.h (RELATIVE_PREFIX_NOT_LINKDIR): Undef for System V
+ and EABI.
+
+Thu Mar 19 06:17:59 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * Makefile.in (toplev.o): Depend on Makefile.
+
+Wed Mar 18 17:40:09 1998 Michael P. Hayes <michaelh@ongaonga.chch.cri.nz>
+
+ * expr.c (convert_move): Add [QH]Imode/P[QH]Imode conversions.
+ * machmode.def (PQImode, PHImode): New modes.
+
+Wed Mar 18 17:11:18 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * m68k.md (movsf+1): Optimize moving a CONST_DOUBLE zero.
+
+Wed Mar 18 17:07:54 1998 Ken Raeburn <raeburn@cygnus.com>
+
+ * regclass.c (init_reg_sets): Delete init of reg-move cost tables.
+ (init_reg_sets_1): Put it here.
+
+Wed Mar 18 16:43:11 1998 Jim Wilson <wilson@cygnus.com>
+
+ * i960.md (tablejump): Handle flag_pic.
+
+ * profile.c (branch_prob): If see computed goto, call fatal.
+
+ * calls.c (expand_call): Fix typos in n_named_args computation.
+
+Wed Mar 18 05:54:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * fold-const.c (operand_equal_for_comparison_p): See if equal
+ when nop conversions are removed.
+
+ * expr.c (expand_expr, case COND_EXPR): If have conditional move,
+ don't use ORIGINAL_TARGET unless REG.
+
+ * function.c (fixup_var_refs_insns): Also delete insn storing pseudo
+ back into arg list.
+
+ * combine.c (gen_binary): Don't make AND that does nothing.
+ (simplify_comparison, case AND): Commute AND and SUBREG.
+ * i386.h (CONST_CONSTS, case CONST_INT): One-byte integers are cost 0.
+
+Mon Mar 16 15:57:17 1998 Geoffrey Keating <geoffk@ozemail.com.au>
+
+ * rs6000.c (small_data_operand): Ensure any address referenced
+ relative to small data area is inside SDA.
+
+Sun Mar 15 16:01:19 1998 Andrew Pochinsky <avp@ctp.mit.edu>
+
+ * sparc.h (ASM_OUTPUT_LOOP_ALIGN): Write nop's.
+
+Sun Mar 15 15:53:39 1998 Philippe De Muyter <phdm@macqel.be>
+
+ * libgcc2.c (exit): Don't call __bb_exit_func if HAVE_ATEXIT.
+
+Sun Mar 15 15:44:41 1998 Paul Eggert <eggert@twinsun.com>
+
+ * cccp.c: Fix bugs relating to NUL in input file name,
+ e.g. with `#line 2 "x\0y"'.
+ (PRINTF_PROTO_4): New macro.
+ (struct {file_buf,definition,if_stack}): New member nominal_fname_len.
+ (main, expand_to_temp_buffer): Store length of input file names.
+ (finclude, create_definition, do_line, conditional_skip): Likewise.
+ (skip_if_group, macroexpand): Likewise.
+ (make_{definition,undef,assertion}): Likewise.
+ (special_symbol, do_include): Use stored length of input file names.
+ (do_define, do_elif, do_else, output_line_directive, verror): Likewise.
+ (error_from_errno, vwarning, verror_with_line): Likewise.
+ (vwarning_with_line, pedwarn_with_file_and_line): Likewise.
+ (print_containing_files): Likewise.
+ (do_line): Fix off-by-1 problem: 1 too many bytes were being allocated.
+ (quote_string, pedwarn_with_file_and_line): New arg specifies length.
+ All callers changed.
+
+Sun Mar 15 15:38:16 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * c-typeck.c: Collect pending initializers in AVL tree instead of list.
+ (add_pending_init, pending_init_member): New functions.
+ (output_init_element): Use them.
+ (output_pending_init_elements): Rewritten to exploit AVL order.
+
+Sun Mar 15 05:10:49 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * gnu.h (GNU_CPP_PREDEFINES): Deleted; not valid in traditional C.
+ * {i386,mips}/gnu.h (CPP_PREDEFINES): Don't call GNU_CPP_PREDEFINES.
+
+ * flow.c (insn_dead_p): A CLOBBER of a dead pseudo is dead.
+
+ * alpha.h (REG_ALLOC_ORDER): Put $f1 after other nonsaved.
+
+ * sparc.c (sparc_type_code): Fix error in previous change.
+
+Sat Mar 14 05:45:21 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * i386/xm-aix.h, i386/xm-osf.h (i386/xm-i386.h): Don't include.
+ (USG): Don't define.
+ * i386/xm-isc.h (i386/xm-sysv3.h): Don't include.
+ * i386/xm-sco.h (i386/xm-sysv3.h): Likewise.
+ (BROKEN_LDEXP, SMALL_ARG_MAX, NO_SYS_SIGLIST): Don't define.
+ * m68k/xm-3b1.h (m68k/xm-m68k.h): Don't include.
+ (USG): Don't define.
+ * m68k/xm-atari.h (m68k/xm-m68kv.h): Don't include.
+ (HAVE_VPRINTF, FULL_PROTOTYPES): Don't define.
+ * m68k/xm-crds.h (m68k/xm-m68k.h): Don't include.
+ (USE_C_ALLOCA, unos, USG): Don't define.
+ * m68k/xm-mot3300.h (m68k/xm-m68k.h): Don't include.
+ (USE_C_ALLOCA, NO_SYS_SIGLIST): Don't define.
+ * m68k/xm-plexus.h (m68k/xm-m68k.h): Don't include.
+ (USE_C_ALLOCA, USG): Don't define.
+ * m88k/xm-sysv3.h (m88k/xm-m88k.h): Don't include.
+ * m68k/xm-next.h (m68k/xm-m68k.h): Don't include.
+ * ns32k/xm-pc532-min.h (ns32k/xm-ns32k.h): Don't include.
+ (USG): Don't define.
+ * rs6000/xm-mach.h: Don't include xm-rs6000.h.
+ * rs6000/xm-cygwin32.h (rs6000/xm-rs6000.h): Don't include.
+ (NO_STAB_H): Don't define.
+ * sparc/xm-linux.h (xm-linux.h): Don't include.
+ * sparc/xm-sol2.h (sparc/xm-sysv4.h): Don't include.
+ * a29k/xm-unix.h, alpha/xm-linux.h, arm/xm-linux.h: Deleted.
+ * arm/xm-netbsd.h, i386/xm-bsd386.h, i386/xm-gnu.h: Deleted.
+ * i386/xm-linux.h, i386/xm-sun.h, i386/xm-sysv3.h: Deleted.
+ * i386/xm-winnt.h, m68k/xm-altos3068.h, m68k/xm-amix.h: Deleted.
+ * m68k/xm-amix.h, m68k/xm-hp320.h, m68k/xm-linux.h: Deleted.
+ * m68k/xm-m68kv.h, mips/xm-iris5.h, ns32k/xm-genix.h: Deleted.
+ * sparc/xm-pbd.h, vax/xm-vaxv.h, xm-svr3.h, xm-linux.h: Deleted.
+ * configure.in: Reflect above changes.
+
+ * xm-siglist.h, xm-alloca.h: New files.
+ * i386/xm-sysv4.h (i386/xm-i386.h, xm-svr4.h): Don't include.
+ (USE_C_ALLOCA, SMALL_ARG_MAX): Don't define.
+ * i386/xm-sco5.h (i386/xm-sysv3.h): Don't include.
+ (SYS_SIGLIST_DECLARED, USE_C_ALLOCA): Don't define.
+ * rs6000/xm-sysv4.h, sparc/xm-sysv4.h: Don't include xm-svr4.h.
+ * xm-svr4.h, i386/xm-dgux.h, mips/xm-news.h, mips/xm-sysv4.h: Deleted.
+ * configure.in: Reflect above changes.
+
+ * configure.in ({,host_,build_}xm_defines): New variables.
+ Set to USG instead of including xm-usg.h.
+ Write #define lines in config.h files from xm_defines vars.
+ * xm-usg.h: Deleted.
+
+Fri Mar 13 07:10:59 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * calls.c (expand_call): Fix typo in previous change.
+
+ * sparc.c (sparc_type_code): Avoid infinite loop when have
+ pointer to array of same pointer.
+ (sparc_type_code, case REAL_TYPE): Process subtypes here too.
+
+ * mips/bsd-4.h, mips/iris3.h, mips/news{4,5}.h: Don't include mips.h.
+ * mips/news5.h, mips/osfrose.h, mips/svr{3,4}-4.h: Likewise.
+ * mips/ultrix.h: Likewise.
+ * mips/cross64.h: Don't include iris6.h.
+ * mips/ecoff.h: Don't include mips.h or gofast.h.
+ * mips/elforion.h: Don't include elf64.h.
+ * mips/iris4.h: Don't include iris3.h.
+ * mips/iris4loser.h: Don't include iris4.h.
+ * mips/iris5gas.h: Don't include iris5.h.
+ * mips/elflorion.h, mips/nws3250v4.h, mips/xm-iris{3,4}.h: Deleted.
+ * mips/xm-nws3250v4.h, mips/xm-sysv.h: Deleted.
+ * mips/rtems64.h: Don't include elflorion.h.
+ * mips/sni-gas.h: Don't include sni-svr4.h.
+ * mips/svr4-t.h: Don't include svr4-5.h.
+ * mips/dec-osf1.h: Also include mips.h.
+ * mips/ecoffl.h, mips/elf.h: Also include mips.h and gofast.h.
+ * mips/iris5.h: Also include iris3.h and mips.h.
+ * xm-usg.h: New file.
+ * mips/xm-iris5.h: Don't include xm-mips.h; don't define USG.
+ * mips/xm-news.h, mips/xm-sysv4.h: Don't include xm-sysv.h.
+ * configure.in: Reflect above changes.
+
+Thu Mar 12 07:18:48 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * expr.h (STRICT_ARGUMENT_NAMING): Provide default value of 0.
+ * calls.c (expand_call): Use value of STRICT_ARGUMENT_NAMING.
+ * function.c (assign_parm): Likewise.
+ * mips/abi64.h (STRICT_ARGUMENT_NAMING): Return 0 for ABI_32.
+ * sparc.h (STRICT_ARGUMENT_NAMING): Only nonzero for V9.
+
+ * calls.c (expand_call, expand_library_call{,_value}, store_one_arg):
+ Rework handling of REG_PARM_STACK_SPACE to treat return value of
+ zero as if macro not defined; add new arg to emit_push_insn.
+ * expr.c (emit_push_insn): New arg, REG_PARM_STACK_SPACE.
+ * expr.h (emit_push_insn): Likewise.
+ * mips/abi64.h (REG_PARM_STACK_SPACE): Define.
+
+Wed Mar 11 06:58:13 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * m68k.h (CONST_OK_FOR_LETTER_P, case 'M'): Correct range check.
+
+Wed Mar 11 06:15:52 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * expr.c (emit_push_insn): Use loop to find movstr patterns
+ instead of explicit tests.
+
+ * Makefile.in (extraclean): Don't delete install1.texi.
+
+Tue Mar 10 14:27:51 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * combine.c (make_field_assignment): Don't get confused if OTHER
+ has VOIDmode and don't do anything if DEST is wider than a host word.
+
+ * vax.c (check_float_value): Cast bcopy args to char *.
+
+Tue Mar 10 13:56:12 1998 Jim Wilson <wilson@cygnus.com>
+
+ * mips/abi64.h (LONG_MAX_SPEC): Check MIPS_ABI_DEFAULT and
+ TARGET_DEFAULT and define __LONG_MAX__ appropriately.
+ Add support for -mabi=X, -mlong64, and -mgp{32,64} options.
+ * mips.c (mips_abi): Change type to int.
+ * mips.h (enum mips_abi_type): Delete.
+ (ABI_32, ABI_N32, ABI_64, ABI_EABI): Define as constants.
+ (mips_abi): Change type to int.
+
+Mon Mar 2 08:06:58 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * Version 2.8.1 released.
+
+ * Makefile.in (mostlyclean): Remove duplicate deletion of temp
+ files. Delete more stamp files and [df]p-bit.c
+ (clean): Don't delete stamp files here.
+ (VERSION_DEP): New variable.
+ (distdir-finish): Pass a value of null for it.
+ (version.c): Use it.
+ Avoid broken pipe with cvs log.
+
+ * objc/Make-lang.in (objc/runtime-info.h): Rename emptyfile to
+ tmp-runtime and delete at end.
+
+Sun Mar 1 05:50:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * tree.c (build_reference_type): Handle obstacks like
+ build_pointer_type.
+
+ * Makefile.in (tmp-gcc.xtar): Renamed from gcc.xtar.
+ (gcc.xtar.gz): Deleted; merged with `dist'.
+ (diff): Create gcc-$(oldversion)-$(version).diff.
+ (distdir): Depend on distdir-cvs.
+ (distdir-cvs): New rule.
+ (distdir-start): Depend on version.c and TAGS.
+ (TAGS): Use tmp-tags instead of temp.
+ (dist): Create gcc-$(version).tar.gz.
+
+ * varasm.c (compare_constant_1): Fix typo in previous change.
+
+ * objc/Make-lang.in (objc-distdir): Properly rebuild objc-parse.c.
+
+Sat Feb 28 16:58:08 1998 Tristan Gingold <gingold@rossini.enst.fr>
+
+ * stmt.c (expand_decl): If -fcheck-memory-usage, put vars in memory.
+ * expr.c (get_memory_usage_from_modifier): Convert
+ EXPAND_{CONST_ADDRESS, INITIALIZER} to MEMORY_USE_DONT.
+
+Sat Feb 28 08:13:43 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * i860/fx2800.h (DATA_ALIGNMENT): Use POINTER_TYPE_P.
+ * m68k/a-ux.h (FUNCTION_VALUE): Likewise.
+ * expr.c (get_pointer_alignment, compare, do_store_flag): Likewise.
+ (expand_builtin): Likewise.
+ * fold-const.c (force_fit_type, fold_convert, fold): Likewise.
+ * function.c (assign_parms): Likewise.
+ * integrate.c (expand_inline_function): Likewise.
+ * sdbout.c (sdbout_field_types): Likewise.
+ * tree.c (integer_pow2p, tree_log2, valid_machine_attribute): Likewise.
+ * stmt.c (expand_decl): Likewise.
+ ({,bc_}expand_decl_init): Also test for REFERENCE_TYPE.
+
+ * configure.in (version_dep): New variable; if srcdir is CVS working
+ directory, set to ChangeLog.
+ (version): Supply default if no version.c.
+ * Makefile.in (version.c): New rule.
+
+ * gcc.c (snapshot_warning): New function.
+ (main): Call it for snapshots.
+
+ * dwarf2out.c (expand_builtin_dwarf_reg_size): If reg_raw_mode
+ not valid for reg, use last size. Also refine range assertion.
+
+Sat Feb 28 05:04:47 1998 Michael P. Hayes <michaelh@ongaonga.chch.cri.nz>
+
+ * enquire.c (cprop): Don't perform exhaustive search for char_min
+ and char_max when bits_per_byte > 16.
+
+Thu Feb 26 15:12:03 1998 Christopher Taylor <cit@ckshq.com>
+
+ * fixincludes: Avoid using '0-~' in egrep.
+
+Thu Feb 26 08:04:05 1998 Tristan Gingold <gingold@messiaen.enst.fr>
+
+ * function.c (assign_parms): Call 'chkr_set_right' when DECL_RTL
+ is stack_parm.
+ * expr.c (get_memory_usage_from_modifier): Convert
+ EXPAND_{SUM, CONST_ADDRESS, INITIALIZER} to MEMORY_USE_RO.
+
+Thu Feb 26 07:33:53 1998 Paul Eggert <eggert@twinsun.com>
+
+ * c-lex.c (yylex): Don't munge errno before using it.
+ * cccp.c (error_from_errno, perror_with_name): Likewise.
+ * cpplib.c (cpp_error_from_errno): Likewise.
+ * gcc.c (pfatal_pexecute): Likewise.
+ * protoize.c (safe_write, find_file, process_aux_info_file): Likewise.
+ (rename_c_file, edit_file): Likewise.
+
+ * c-lex.c (yylex): Remove unused variable exceeds_double.
+
+Thu Feb 26 07:05:14 1998 Michael P. Hayes <michaelh@ongaonga.chch.cri.nz>
+
+ * reorg.c (fill_slots_from_thread): Don't steal delay list from target
+ if condition code of jump conflicts with opposite_needed.
+
+Thu Feb 26 06:45:23 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * Makefile.in (distdir-start): Don't copy CVS subdirectory of config.
+
+ * varasm.c ({compare,record}_constant_1, case CONSTRUCTOR):
+ Handle the case when we have TREE_PURPOSE values.
+
+Thu Feb 26 05:59:01 1998 Philippe De Muyter <phdm@macqel.be>
+
+ * fixincludes (sys/limits.h): Fix a nested comment problem with
+ HUGE_VAL definition on sysV68 R3V7.1.
+
+Wed Feb 25 21:09:38 1998 Philippe De Muyter <phdm@macqel.be>
+
+ * toplev.c (TICKS_PER_SECOND): Renamed from CLOCKS_PER_SECOND.
+
+Wed Feb 25 20:50:08 1998 Michael P. Hayes <michaelh@ongaonga.chch.cri.nz>
+
+ * reorg.c (fill_slots_from_thread): Mark resources referenced in
+ opposite_needed thread. Return delay_list even when cannot get
+ any more delay insns from end of subroutine.
+
+Wed Feb 25 19:50:01 1998 Mikael Pettersson <Mikael.Pettersson@sophia.inria.fr>
+
+ * gcc.c (lookup_compiler): Remove redundant test.
+
+Wed Feb 25 07:24:22 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * vax.md (call insns): Second operand to CALL rtl is SImode.
+
+ * configure.in (i[34567]86-*-mingw32): Support msv and crt suffix.
+ * i386/crtdll.h: New file.
+
+ * sparc.c (pic_setup_code): If -O0, write USE of pic_offset_table_rtx.
+
+ * expr.c (safe_from_p): Add new arg, TOP_P; all callers changed.
+
+Sat Feb 21 07:02:39 1998 Jim Wilson <wilson@cygnus.com>
+
+ * mips/iris5.h (DWARF2_UNWIND_INFO): Define to 0.
+ * mips/iris5gas.h (DWARF2_UNWIND_INFO): Define to 1.
+
+Fri Feb 20 08:27:46 1998 Paul Eggert <eggert@twinsun.com>
+
+ * sparc/sol2-sld.h: New file.
+ * configure.in (sparc-*-solaris2*): Use it when using system linker.
+ * toplev.c (main): Don't default to DWARF2_DEBUG with -ggdb
+ if LINKER_DOES_NOT_WORK_WITH_DWARF2 is defined.
+
+Fri Feb 20 08:21:49 1998 H.J. Lu (hjl@gnu.org)
+
+ * alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Support shared library.
+ (LIB_SPEC, DEFAULT_VTABLE_THUNKS): Defined #ifndef USE_GNULIBC_1.
+ * sparc/linux.h (DEFAULT_VTABLE_THUNKS): Likewise.
+ (LIB_SPEC): Add -lc for -shared #ifndef USE_GNULIBC_1.
+ * linux.h (LIB_SPEC): Likewise.
+ * sparc/linux64.h (LIB_SPEC): Likewise; also updated for glibc 2.
+ (LIBGCC_SPEC): Removed.
+ (CPP_SUBTARGET_SPEC): Add %{pthread:-D_REENTRANT}.
+
+Fri Feb 20 05:22:12 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * Makefile.in (distdir-start): Add dependence on bi-parser.[ch].
+
+Thu Feb 19 18:07:11 1998 Jim Wilson <wilson@cygnus.com>
+
+ * m68k.h (TARGET_SWITCHES): For 68000, 68302, subtract MASK_68881.
+ For 68303, 68332, cpu32, subtract MASK_68040_ONLY.
+
+Wed Feb 18 09:37:29 1998 Paul Eggert <eggert@twinsun.com>
+
+ * fixincludes (stdlib.h): Do not double-wrap the size_t typedef.
+
+Wed Feb 18 07:32:11 1998 Jim Wilson <wilson@cygnus.com>
+
+ * i960.c (emit_move_sequence): Handle unaligned stores to pseudos.
+ * i960.md (store_unaligned_[dt]i_reg): Handle register dest.
+ (store_unaligned_ti_reg): Likewise.
+
+ * m68k.h (MACHINE_STATE_{SAVE,RESTORE} [MOTOROLA]): Add %# and %/;
+ add : to make them into extended asms.
+
+Wed Feb 18 07:08:05 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * reg-stack.c (compare_for_stack_reg): Only handle FP conditional
+ move as next insn specially.
+
+ * reload.c (find_reloads): Always convert address reload for
+ non-reloaded operand to RELOAD_FOR_OPERAND_ADDRESS.
+
+ * emit-rtl.c (hard-reg-set.h): Include.
+ (get_lowpart_common): Don't make new REG for hard reg in a
+ class that cannot change size.
+ * Makefile.in (emit-rtl.o): Depend on hard-reg-set.h.
+
+Sat Feb 14 09:59:00 1998 Richard Earnshaw (rearnsha@arm.com)
+
+ * arm.md (movsfcc): Also validate operands[3] for hard float.
+ (movdfcc): Only accept fpu_add_operand for operands[3].8
+
+Sat Feb 14 09:32:34 1998 Jim Wilson <wilson@cygnus.com>
+
+ * dwarf2out.c (expand_builtin_dwarf_reg_size): New variable mode.
+ Convert CCmode to word_mode before calling GET_MODE_SIZE.
+
+Sat Feb 14 09:27:42 1998 David Edelsohn <edelsohn@mhpcc.edu>
+
+ * rs6000.h (MY_ISCOFF): Check for U803XTOCMAGIC.
+
+Sat Feb 14 08:29:43 1998 Arvind Sankar <arvind@cse.iitb.ernet.in>
+
+ * t-svr4 (TARGET_LIBGCC_CFLAGS): New definition.
+
+Sat Feb 14 07:45:16 1998 Ken Rose (rose@acm.org)
+
+ * reorg.c (fill_slots_from_thread): New parameter, delay_list.
+ All callers changed.
+
+Sat Feb 14 07:14:02 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * reload.c (debug_reload): Properly output insn codes.
+
+ * pa.c (emit_move_sequence): If in reload, call find_replacement.
+
+ * gansidecl.h (bcopy, bzero, {,r}index): Don't define if IN_LIBGCC2.
+
+ * combine.c (distribute_notes, case REG_DEAD): When seeing if place
+ to put new note sets register, use reg_bitfield_target_p, as in
+ original code.
+
+ * gcc.c (process_command): If file is for linker, set lang to "*".
+ (lookup_compiler): Return 0 for language of "*".
+
+ * sched.c (attach_deaths, case SUBREG): Fix error in last change.
+
+ * i386.md (mov[sdx]fcc): Disable for now.
+ (mov[sd]fcc_1): Add earlyclobber for output on last alternative.
+
+Sat Feb 14 06:42:50 1998 Jason Merrill <jason@yorick.cygnus.com>
+
+ * except.c (get_dynamic_handler_chain): Only make call once per func.
+ (expand_fixup_region_{start,end}): New functions.
+ (expand_eh_region_start_tree): Store cleanup into finalization here.
+ * stmt.c (expand_cleanups): Use new functions to protect fixups.
+
+ * except.c (get_dynamic_handler_chain): Build up a FUNCTION_DECL.
+ * optabs.c (init_optabs): Don't init get_dynamic_handler_chain_libfunc.
+ * expr.h (get_dynamic_handler_chain_libfunc): Deleted.
+
+Sat Feb 14 06:34:41 1998 Peter Lawrence <Peter.Lawrence@Eng.Sun.COM>
+
+ * optabs.c (emit_conditional_move): Don't reverse condition for FP.
+
+Fri Feb 13 07:22:04 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * Makefile.in (mostlyclean): Only use s-* convention for stamp
+ files in main dir.
+
+ * configure.in: Add support for i786 (Pentium II); same as i686.
+
+Thu Feb 12 20:16:35 1998 Michael Meissner <meissner@cygnus.com>
+
+ * rs6000.md: Replace gen_rtx (CONST_INT,...) with GEN_INT.
+
+Thu Feb 12 10:08:14 1998 John Hassey <hassey@dg-rtp.dg.com>
+
+ * configure.in (i[3456]86-dg-dgux*): Don't need fixincludes.
+
+Thu Feb 12 07:27:39 1998 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * i386/cygwin32.h (NO_IMPLICIT_EXTERN_C): Define.
+ about system headers.
+ (LIB_SPEC): Add -ladvapi32 -lshell32.
+
+Thu Feb 12 07:19:31 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * expr.c (expand_assignment): Fix typo in checking OFFSET.
+
+ * gbl-ctors.h (atexit): Don't define unless needed.
+
+ * combine.c (distribute_notes): Completely check for note operand being
+ only partially set on potential note target; adjust what notes
+ we make in that case.
+
+ * i386/xm-go32.h (HAVE_{BCOPY,BZERO,INDEX,RINDEX}): Deleted.
+
+Wed Feb 11 08:53:27 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * calls.c (emit_call_1): Size args now HOST_WIDE_INT.
+ (expand_call): struct_value_size now HOST_WIDE_INT.
+
+Tue Feb 10 09:04:39 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * integrate.c (initialize_for_inline): Ensure DECL_INCOMING_RTL
+ is always copied.
+
+Tue Feb 10 06:10:49 1998 Paul Eggert <eggert@twinsun.com>
+
+ * cccp.c (rescan): Fix bug with macro name appearing
+ immediately after L'x'.
+
+Mon Feb 9 20:45:32 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
+
+ * c-common.c (format_char_info): Add new field zlen.
+ (print_char_table): Remove entry for 'Z' as a format character.
+ Initialize zlen field as appropriate.
+ (scan_char_table): Set zlen field to NULL in each entry.
+ (check_format_info): Recognize 'Z' as a length modifier, with a
+ warning in pedantic mode.
+ Avoid infinite loop when a repeated flag character is detected.
+
+Mon Feb 9 09:24:04 1998 Paul Eggert <eggert@twinsun.com>
+
+ * c-parse.in (primary): Minor wording fix in diagnostic.
+
+Mon Feb 9 07:50:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * c-decl.c (grokdeclarator): Remove warning on inline of varargs.
+
+ * reload.c (find_reloads): Check for const_to_mem case before
+ checking for invalid reload; use force_const_mem if no_input_reloads.
+
+ * function.c (push_function_context_to): Call init_emit last.
+
+ * protoize.c (my_link): Define as -1 in mingw32.
+ (link): Remove declaration.
+
+ * rs6000.c (setup_incoming_varargs): Always set rs6000_sysv_varargs_p.
+
+ * integrate.c (expand_inline_function): Clear label_map with bzero.
+
+ * unroll.c (copy_loop_body, case JUMP_INSN): Correct error in last
+ change: call single_set on COPY, not INSN.
+
+Sun Feb 8 08:07:37 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * msdos/top.sed, winnt/config-nt.sed: Change version number to 2.8.1.
+
+ * configure.in (i[3456]86-*-sco3.2v5*): Use cpio for headers.
+
+Sat Feb 7 07:32:46 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * i386/mingw32.h (LIBGCC_SPEC, STARTFILE_SPEC, MATH_LIBRARY):
+ Use msvcrt, not crtdll.
+
+Fri Feb 6 20:32:06 1998 Geert Bosch <bosch@gnat.com>
+
+ * i386/xm-os2.h (EMX, USG, BSTRING, HAVE_{PUTENV,VPRINTF,STRERROR}):
+ Define ifdef __EMX__.
+ (strcasecmp): Define to be stricmp if __EMX__.
+ (spawnv{,p}): Don't define if EMX.
+ (OBJECT_SUFFIX): Don't define if EMX.
+ (MKTEMP_EACH_FILE): Define.
+
+Fri Feb 6 16:37:29 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * objc/Make-lang.in (objc.stage1): Depend on stage1-start.
+ (objc.stage2, objc.stage3, objc.stage4): Likewise for the
+ respective stageN-start targets.
+ (objc/sendmsg.o): Depend on objc/runtime-info.h.
+
+Fri Feb 6 16:27:09 1998 Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE>
+
+ * stmt.c (expand_asm_operands): Properly treat asm statement
+ statements with no operands as volatile.
+
+Fri Feb 6 16:03:25 1998 Greg McGary <gkm@gnu.org>
+
+ * c-decl.c (pushdecl): Set DECL_ORIGINAL_TYPE once only.
+
+Fri Feb 6 15:57:36 1998 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * i386/cygwin32.h (STRIP_NAME_ENCODING): New macro.
+
+Fri Feb 6 15:50:42 1998 Paul Eggert <eggert@twinsun.com>
+
+ * libgcc2.c (__floatdi[xtds]f): Round properly even when rounding
+ large negative integer to plus or minus infinity.
+
+Fri Feb 6 15:45:16 1998 Philippe De Muyter <phdm@macqel.be>
+
+ * sdbout.c (plain_type_1): Return T_DOUBLE, not T_VOID, for
+ long double #ifndef EXTENDED_SDB_BASIC_TYPES.
+
+Fri Feb 6 15:23:49 1998 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * vax/ultrix.h (HAVE_ATEXIT): Define.
+ * x-vax: File deleted.
+
+Fri Feb 6 14:34:19 1998 Douglas Rupp <rupp@gnat.com>
+
+ * gcc.c (process_command, case "-dumpversion"): Print spec_version.
+
+Fri Feb 6 11:01:13 1998 Josh Littlefield <josh@american.com>
+
+ * i386/gmon-sol2.c (internal_mcount): Do set-up when program starts
+ and install hook to do clean-up when it exits.
+ * i386/sol2-c1.asm (_mcount): Make a weak instead of global symbol.
+ * i386/sol2dbg.h (ASM_SPEC): Support Solaris bundled assembler's -V
+ argument; pass -s argument to assembler.
+
+Fri Feb 6 09:13:21 1998 Jim Wilson (wilson@cygnus.com)
+
+ * function.c (assign_parms): New variable named_arg, with value
+ depending on STRICT_ARGUMENT_NAMING. Use instead of ! last_named.
+
+ * crtstuff.c (__frame_dummy): New function for irix6.
+ (__do_global_ctors): Call __frame_dummy for irix6.
+ * mips/iris6.h (LINK_SPEC): Hide __frame_dummy too.
+
+Fri Feb 6 09:08:21 1998 Mike Stump <mrs@wrs.com>
+
+ * rtlanal.c (dead_or_set_regno_p): Ignore REG_DEAD notes after reload.
+ * genattrtab.c (reload_completed): Define.
+
+ * configure.in (i960-wrs-vxworks): Same as i960-wrs-vxworks5*.
+
+Fri Feb 6 08:47:38 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * Makefile.in (diff): Add INSTALL, configure, and config.in;
+ remove objc-*.
+ * objc/config-lang.in (diff_excludes): Add objc-parse.[cy].
+
+ * i386/xm-mingw32.h (link): Delete macro.
+
+ * alpha.c (output_prolog): Write out frame sizes as longs and
+ print too large sizes as zero.
+
+ * function.c (combine_temp_slots): No need to allocate and free rtx.
+ Don't do anything if too many slots in the list.
+ (put_var_into_stack): Don't use ADDRESSOF if not optimizing.
+
+ * function.c (purge_addressof_1): Force into mem if VOLATILE reference.
+
+ * calls.c (expand_call): Show VAR_DECL made for structure return
+ address is used; remove bogus set of MEM_IN_STRUCT_P.
+ * expr.c (expand_expr, case SAVE_EXPR, case TARGET_EXPR): Show used.
+ (expand_builtin, case BUILT_IN_LONGJMP): Show __dummy used.
+ * function.c (put_reg_into_stack): New arg USED_P; all callers changed.
+
+ * expr.c (expand_expr, case SAVE_EXPR): assign_temp with KEEP of 3.
+ * function.c (var_temp_slot_level): New variable.
+ (push_function_context_to, pop_function_context_from): Save/restore
+ it and target_temp_slot_level.
+ (assign_stack_temp): Implement KEEP of 3.
+ (push_temp_slots_for_block): New function.
+ (init_temp_slots): Initialize var_temp_slot_level.
+ * function.h (struct function, fields {var,target}_temp_slot_level):
+ New fields.
+ * stmt.c (expand_start_bindings): Call push_temp_slots_for_block.
+
+ * function.c (struct temp_slot): SIZE, BASE_OFF_SET, and FULL_SIZE
+ now HOST_WIDE_INT.
+ (assign_{,outer_}stack_local, assign_{,stack_}temp): Size arg is
+ now HOST_WIDE_INT.
+ (assign_stack_temp): Do size computations in HOST_WIDE_INT.
+ (fixup_var_refs_1, optimize_bit_field, instantiate_decls): Likewise.
+ (instantiate_virtual_regs_1, fix_lexical_address): Likewise.
+ * rtl.h (assign_stack_{local,temp}): Size arg is HOST_WIDE_INT.
+ (assign_temp): Likewise.
+ * expr.h (struct args_size): Field CONSTANT is now HOST_WIDE_INT.
+
+ * sched.c (attach_deaths, case REG): Don't check for REG_UNUSED.
+ (attach_deaths, case SUBREG, STRICT_LOW_PART, {ZERO,SIGN}_EXTRACT):
+ Don't pass set_p of 1 if partial assignment.
+
+ * tree.h (size_in_bytes): Returns HOST_WIDE_INT.
+ * tree.c (size_in_bytes): Likewise.
+ Tighen up logic some to avoid returning a bogus value instead of -1.
+
+ * expr.c (get_inner_reference, case ARRAY_EXPR): Make WITH_RECORD_EXPR
+ just for index.
+ (expand_expr, case PLACEHOLDER_EXPR): Refine search again; look
+ at each expression and look for pointer to type.
+
+ * expr.c (safe_from_p, case ADDR_EXPR): If TREE_STATIC, no trampoline.
+ (expand_expr, case ADDR_EXPR): Likewise.
+
+ * expr.c (emit_block_move): Use conservative range for movstr mode.
+
+ * configure.in: See if "cp -p" works if "ln -s" doesn't; else "cp".
+
+ * combine.c (try_combine.c): Pass elim_i2 and elim_i1 to
+ distribute_notes for i3dest_killed REG_DEAD note.
+
+ * configure.in (mips-dec-netbsd*): Remove bogus setting of prefix.
+
+ * c-decl.c (duplicate_decls): Set DECL_IGNORED_P in newdecl if
+ different bindings levels.
+
+ * configure.in: Test ln -s by symlinking gcc.c.
+
+ * configure.in (i[3456]86-dg-dgux): Add wildcard for version.
+
+ * crtstuff.c (__do_global_ctors_aux): Switch back to text section
+ in proper place.
+
+ * rtlanal.c (rtx_varies_p, case REG): pic_offset_table_rtx is fixed.
+ * genattrtab.c (pic_offset_table_rtx): Define (dummy).
+ * cse.c (set_nonvarying_address_components): Understand PIC refs.
+
+ * loop.c (strength_reduce): When placing increment for auto-inc
+ case, do comparison in loop order.
+
+ * i860.c (output_delayed_branch): Add missing arg to recog.
+ (output_delay_insn): Add missing arg to constrain_operands.
+
+ * configure.in: Truncate target after finished comparing it with host.
+
+ * i386.h (MAX_FIXED_MODE_SIZE): Delete.
+
+ * c-parse.in (expr_no_comma): Clarify undefined error.
+
+ * prefix.c (get_key_value): Don't default to PREFIX here.
+ (translate_name): Remove bogus addition of "$" if getenv fails;
+ clean up application of default value of PREFIX.
+
+ * fold-const.c (fold_convert): Call force_fit_type even if input
+ already overflows.
+
+Fri Feb 6 07:45:01 1998 Robert Hoehne <robert.hoehne@gmx.net>
+
+ * i386/xm-go32.h (HAVE_{BCOPY,BZERO,BCMP,RINDEX,INDEX}): Define.
+
+ * gcc.c (main): Treat paths starting with '$' or DOS drives
+ as absolute in standard_startfile_prefix.
+
+Thu Feb 5 21:07:12 1998 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * cpplib.c (IS_INCLUDE_DIRECTIVE_TYPE): Add casts from enum to int.
+ * cccp.c (IS_INCLUDE_DIRECTIVE_TYPE, handle_directive): Likewise.
+
+Thu Feb 5 19:00:44 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * expr.c (expand_expr, case CONSTRUCTOR): Correct shift count
+ when making signed bit field; use EXPAND_NORMAL, not 0.
+
+Thu Feb 5 17:42:43 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * libgcc2.c (__clear_insn_cache): On sysV68 enable the memctl
+ stuff only if MCT_TEXT is #define'd.
+
+Thu Feb 5 17:32:01 1998 Robert Hoehne <robert.hoehne@gmx.net>
+
+ * Makefile.in: Changed most stamp-* to s-*.
+
+Tue Feb 3 19:45:50 1998 James Hawtin <oolon@ankh.org>
+
+ * i386/sol2.h (STARTFILE_SPEC, LIB_SPEC): Update -pg files.
+ * configure.in (i[3456]86-*-solaris2*): Add gcrt1.o and gmon.o
+ to extra_parts.
+
+Tue Feb 3 17:28:48 1998 Christopher C Chimelis <chris@classnet.med.miami.edu>
+
+ * configure.in (alpha*-*-linux-gnu*): Add extra_parts for crtstuff.
+
+Tue Feb 3 17:18:19 1998 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm.c (find_barrier): Fix one-too-many bug if fail to find barrier.
+
+ * arm.c (arm_reload_in_hi): Handle cases where the MEM is too
+ complex for a simple offset.
+
+Tue Feb 3 16:14:21 1998 Robert Hoehne <robert.hoehne@gmx.net>
+
+ * i386/xm-go32.h (EXECUTABLE_SUFFIX): Define.
+
+ * configure.in (i[3456]86-pc-msdosdjgpp*): New entry.
+
+Tue Feb 3 07:33:58 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * explow.c (probe_stack_range): Properly check for small
+ number of probes.
+
+ * gcc.c (process_command, case 'V'): Validate arg.
+
+ * configure.in (sbrk): Add check for needed declaration.
+ * acconfig.h (NEED_DECLARATION_SBRK): New entry.
+ * toplev.c (sbrk): Update declaration conditional.
+ * mips-tfile.c (sbrk, free): Likewise.
+
+ * sparc/sysv4.h (DBX_REGISTER_NUMBER): Remove abort.
+
+ * mips.c (mips_expand_prologue): Pass reg 25 to gen_loadgp.
+ * mips.md (loadgp): Add second operand for register number to add.
+ (builtin_setjmp_receiver): Pass new label and reg 31 to loadgp.
+
+ * toplev.c: Include insn-codes.h, insn-config.h, and recog.h.
+ (compile_file): Try to emit nop to separate gcc_compiled symbol.
+ * Makefile.in (toplev.o): Depends on insn-{codes,config}.h, recog.h.
+
+Tue Feb 3 06:58:46 1998 Mark Mitchell <mmitchell@usa.net>
+
+ * integrate.c (get_label_from_map): New function.
+ (expand_inline_function): Use it.
+ Initialize label_map to NULL_RTX instead of gen_label_rtx.
+ (copy_rtx_and_substitute): Use get_label_from_map.
+ * integrate.h (get_label_from_map): New function.
+ (set_label_from_map): New macro.
+ * unroll.c (unroll_loop, copy_loop_body): Use them.
+
+Mon Feb 2 16:33:01 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * i386.md (mov{si,hi,sf,df,xf}cc{,_1}): Remove cases with branches.
+
+ * rs6000/x-aix31 (INSTALL): Deleted.
+ * mips/x-dec-osf1, mips/x-osfrose, i386/x-osfrose: Likewise.
+ * arm/x-riscix: Likewise.
+
+ * c-typeck.c (signed_or_unsigned_type): Properly handle pointer types.
+
+Mon Feb 2 15:33:58 1998 Michael P. Hayes <michaelh@ongaonga.chch.cri.nz>
+
+ * unroll.c (copy_loop_body): Use single_set instead of
+ PATTERN to detect increment of an iv inside a PARALLEL.
+
+Fri Jan 16 20:29:50 1998 Paul Eggert <eggert@twinsun.com>
+
+ * toplev.c (<unistd.h>): New include.
+ (get_run_time): Prefer CLK_TCK (if available) to HZ, and
+ prefer sysconf (_SC_CLK_TCK) (if available) to CLK_TCK.
+ * configure.in (sysconf): Call AC_CHECK_FUNCS.
+
+Wed Jan 14 20:10:51 1998 Paul Eggert <eggert@twinsun.com>
+
+ * cccp.c: (rescan): Don't report line 0 as the possible real start
+ of an unterminated string constant.
+ Don't mishandle backslash-newlines that in are the output of
+ a macro expansion. Properly skip // style comments between a function
+ macro name and '(', as well as backslash-newlines in comments there.
+ (handle_directive): Handle / \ newline * between # and directive name.
+ In #include directives, \ does not escape ".
+ (do_include): For `#include "file', do not bother expanding into temp
+ buffer. When error encountered when expanding, do not try result.
+ (skip_if_group): When skipping an include directive, use include
+ tokenization, not normal tokenization. Backslash-newline is still
+ special when skipping. Handle * \ newline / correctly in comments
+ when skipping.
+ (skip_quoted_string): After \ newline, set *backslash_newlines_p
+ even if count_newlines is 0.
+ (macroexpand): Newline space is not a special marker inside a string.
+ (macroexpand, macarg): Do not generate \ddd for control characters
+ when stringifying; the C Standard does not allow this.
+ (macarg1): New arg MACRO. All callers changed.
+ Do not treat /*, //, or backslash-newline specially when processing
+ the output of a macro.
+ (discard_comments): Don't go past limit if looking for end of comment.
+ Discard backslash-newline properly when discarding comments.
+ (change_newlines): \" does not end a string.
+ (make_definition): Do not treat backslash-newline specially, as it
+ has already been removed before we get here.
+
+ * profile.c (output_func_start_profiler): Don't fflush output
+ if -quiet.
+ * toplev.c (rest_of_compilation): Likewise.
+
+ * i386/x-sco5 (CC): Remove trailing white space.
+ * x-convex (CCLIBFLAGS): Likewise.
+ * arm/t-semi (LIBGCC2_CFLAGS): Likewise.
+
+Wed Jan 7 18:02:42 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * Version 2.8.0 released.
+
+Wed Jan 7 17:54:41 1998 J. Kean Johnston <jkj@sco.com>
+
+ * i386/sco5.h ({END,START}FILE_SPEC): Link with correct crtbegin.o
+ and crtend.o when using -static.
+
+Wed Jan 7 17:49:14 1998 Jan Christiaan van Winkel <Jan.Christiaan.van.Winkel@ATComputing.nl>
+
+ * cppexp.c (gansidecl.h): Include.
+
+Wed Jan 7 17:45:07 1998 Tristan Gingold <gingold@puccini.enst.fr>
+
+ * expr.c (get_push_address): Use copy_to_reg instead of force_operand.
+ (emit_push_insn): Avoid null pointer deference if aggregate has no
+ types.
+ (expand_expr): Avoid finite but useless recursion.
+ (expand_builtin): Fix typo in calling function.
+ * function.c (assign_parms): Avoid useless call to chkr_set_right.
+
+Wed Jan 7 17:31:13 1998 Christian Iseli <Christian.Iseli@lslsun.epfl.ch>
+
+ * combine.c (force_to_mode): Return if operand is a CLOBBER.
+
+Wed Jan 7 17:23:24 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * x-rs6000 (INSTALL): Remove.
+
+ * jump.c (jump_optimize): Don't use a hard reg as an operand
+ of a conditional move if small register classes.
+
+Wed Jan 7 17:09:28 1998 Jim Wilson <wilson@cygnus.com>
+
+ * cse.c (max_insn_uid): New variable.
+ (cse_around_loop): Use it.
+ (cse_main): Set it.
+
+See ChangeLog.11 for earlier changes.
+
+Use a consistent time stamp format in ChangeLog entries.
+Not everyone has Emacs 20 yet, so stick with Emacs 19 format for now.
+
+Local Variables:
+add-log-time-format: current-time-string
+End:
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 902c9a09c35..ea37a4eaeb9 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1,5 +1,5 @@
# Makefile for GNU C compiler.
-# Copyright (C) 1987, 88, 90-96, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1987, 88, 90-97, 1998 Free Software Foundation, Inc.
#This file is part of GNU CC.
@@ -234,6 +234,8 @@ libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
# Directory in which the compiler finds g++ includes.
gxx_include_dir= @gxx_include_dir@
# Directory in which the old g++ header files may be found.
+# The reason we use $(libdir)/g++-include rather than using libsubdir
+# is for compatibility with older versions of libg++.
old_gxx_include_dir= $(libdir)/g++-include
# Directory to search for site-specific includes.
includedir = $(local_prefix)/include
@@ -612,9 +614,9 @@ CCCP=cccp
STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
insn-attr.h insn-attrtab.c insn-opinit.c genrtl.c genrtl.h \
- stamp-flags stamp-config stamp-codes stamp-mlib \
- stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
- stamp-attr stamp-attrtab stamp-opinit stamp-crt stamp-crtS stamp-crt0 \
+ s-flags s-config s-codes s-mlib \
+ s-output s-recog s-emit s-extract s-peep \
+ s-attr s-attrtab s-opinit s-crt s-crtS s-crt0 \
genemit$(build_exeext) genoutput$(build_exeext) genrecog$(build_exeext) \
genextract$(build_exeext) genflags$(build_exeext) gencodes$(build_exeext) \
genconfig$(build_exeext) genpeep$(build_exeext) genattrtab$(build_exeext) \
@@ -1093,8 +1095,8 @@ libgcc.a: $(LIBGCC1) $(LIBGCC2)
# Use the genmultilib shell script to generate the information the gcc
# driver program needs to select the library directory based on the
# switches.
-multilib.h: stamp-mlib; @true
-stamp-mlib: $(srcdir)/genmultilib Makefile
+multilib.h: s-mlib; @true
+s-mlib: $(srcdir)/genmultilib Makefile
$(SHELL) $(srcdir)/genmultilib \
"$(MULTILIB_OPTIONS)" \
"$(MULTILIB_DIRNAMES)" \
@@ -1102,7 +1104,7 @@ stamp-mlib: $(srcdir)/genmultilib Makefile
"$(MULTILIB_EXCEPTIONS)" \
"$(MULTILIB_EXTRA_OPTS)" > tmp-mlib.h
$(srcdir)/move-if-change tmp-mlib.h multilib.h
- touch stamp-mlib
+ touch s-mlib
# Build multiple copies of libgcc.a, one for each target switch.
stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \
@@ -1189,9 +1191,9 @@ $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
# On some systems we also want to install versions of these files
# compiled using PIC for use in shared libraries.
-crtbeginS.o crtendS.o: stamp-crtS ; @true
+crtbeginS.o crtendS.o: s-crtS ; @true
-stamp-crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
+s-crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
defaults.h frame.h gbl-ctors.h
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
-DCRT_BEGIN -finhibit-size-directive -fno-inline-functions \
@@ -1200,18 +1202,18 @@ stamp-crtS: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CRTSTUFF_T_CFLAGS_S) \
-DCRT_END -finhibit-size-directive -fno-inline-functions \
-g0 -c $(srcdir)/crtstuff.c -o crtendS$(objext)
- touch stamp-crtS
+ touch s-crtS
# Compile the start modules crt0.o and mcrt0.o that are linked with every program
-crt0.o: stamp-crt0 ; @true
-mcrt0.o: stamp-crt0; @true
+crt0.o: s-crt0 ; @true
+mcrt0.o: s-crt0; @true
-stamp-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
+s-crt0: $(CRT0_S) $(MCRT0_S) $(GCC_PASSES) $(CONFIG_H)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
-o crt0.o -c $(CRT0_S)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(CRT0STUFF_T_CFLAGS) \
-o mcrt0.o -c $(MCRT0_S)
- touch stamp-crt0
+ touch s-crt0
#
# Compiling object files from source files.
@@ -1274,9 +1276,9 @@ tlink.o: tlink.c $(DEMANGLE_H) hash.h $(CONFIG_H) system.h
hash.o: hash.c hash.h system.h
cplus-dem.o: cplus-dem.c $(DEMANGLE_H)
-underscore.c: stamp-under ; @true
+underscore.c: s-under ; @true
-stamp-under: $(GCC_PASSES)
+s-under: $(GCC_PASSES)
echo "int xxy_us_dummy;" >tmp-dum.c
$(GCC_FOR_TARGET) -S tmp-dum.c
echo '/*WARNING: This file is automatically generated!*/' >tmp-under.c
@@ -1287,7 +1289,7 @@ stamp-under: $(GCC_PASSES)
fi
$(srcdir)/move-if-change tmp-under.c underscore.c
-rm -f tmp-dum.c tmp-dum.s
- touch stamp-under
+ touch s-under
# A file used by all variants of C.
@@ -1327,6 +1329,7 @@ stor-layout.o : stor-layout.c $(CONFIG_H) system.h $(TREE_H) flags.h \
fold-const.o : fold-const.c $(CONFIG_H) system.h $(TREE_H) flags.h
toplev.o : toplev.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) \
flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
+ insn-codes.h insn-config.h recog.h Makefile \
$(lang_options_files)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
-DTARGET_NAME=\"$(target_alias)\" \
@@ -1476,7 +1479,7 @@ alloca.o: alloca.c
# Each of the other insn-* files is handled by a similar pair of rules.
# This causes an anomaly in the results of make -n
-# because insn-* is older than stamp-*
+# because insn-* is older than s-*
# and thus make -n thinks that insn-* will be updated
# and force recompilation of things that depend on it.
# We use move-if-change precisely to avoid such recompilation.
@@ -1488,84 +1491,84 @@ alloca.o: alloca.c
# versions of make which don't like empty commands (nothing after the
# trailing `;'), we call true for each.
-insn-config.h: stamp-config ; @true
-stamp-config : $(md_file) genconfig $(srcdir)/move-if-change
+insn-config.h: s-config ; @true
+s-config : $(md_file) genconfig $(srcdir)/move-if-change
./genconfig $(md_file) > tmp-config.h
$(srcdir)/move-if-change tmp-config.h insn-config.h
- touch stamp-config
+ touch s-config
-insn-flags.h: stamp-flags ; @true
-stamp-flags : $(md_file) genflags $(srcdir)/move-if-change
+insn-flags.h: s-flags ; @true
+s-flags : $(md_file) genflags $(srcdir)/move-if-change
./genflags $(md_file) > tmp-flags.h
$(srcdir)/move-if-change tmp-flags.h insn-flags.h
- touch stamp-flags
+ touch s-flags
-insn-codes.h: stamp-codes ; @true
-stamp-codes : $(md_file) gencodes $(srcdir)/move-if-change
+insn-codes.h: s-codes ; @true
+s-codes : $(md_file) gencodes $(srcdir)/move-if-change
./gencodes $(md_file) > tmp-codes.h
$(srcdir)/move-if-change tmp-codes.h insn-codes.h
- touch stamp-codes
+ touch s-codes
insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
insn-config.h insn-flags.h insn-codes.h system.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
-insn-emit.c: stamp-emit ; @true
-stamp-emit : $(md_file) genemit $(srcdir)/move-if-change
+insn-emit.c: s-emit ; @true
+s-emit : $(md_file) genemit $(srcdir)/move-if-change
./genemit $(md_file) > tmp-emit.c
$(srcdir)/move-if-change tmp-emit.c insn-emit.c
- touch stamp-emit
+ touch s-emit
insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h $(RECOG_H) \
real.h output.h flags.h system.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
-insn-recog.c: stamp-recog ; @true
-stamp-recog : $(md_file) genrecog $(srcdir)/move-if-change
+insn-recog.c: s-recog ; @true
+s-recog : $(md_file) genrecog $(srcdir)/move-if-change
./genrecog $(md_file) > tmp-recog.c
$(srcdir)/move-if-change tmp-recog.c insn-recog.c
- touch stamp-recog
+ touch s-recog
insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
insn-config.h flags.h $(RECOG_H) expr.h reload.h system.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
-insn-opinit.c: stamp-opinit ; @true
-stamp-opinit : $(md_file) genopinit $(srcdir)/move-if-change
+insn-opinit.c: s-opinit ; @true
+s-opinit : $(md_file) genopinit $(srcdir)/move-if-change
./genopinit $(md_file) > tmp-opinit.c
$(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
- touch stamp-opinit
+ touch s-opinit
insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H) system.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
-insn-extract.c: stamp-extract ; @true
-stamp-extract : $(md_file) genextract $(srcdir)/move-if-change
+insn-extract.c: s-extract ; @true
+s-extract : $(md_file) genextract $(srcdir)/move-if-change
./genextract $(md_file) > tmp-extract.c
$(srcdir)/move-if-change tmp-extract.c insn-extract.c
- touch stamp-extract
+ touch s-extract
insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h system.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
-insn-peep.c: stamp-peep ; @true
-stamp-peep : $(md_file) genpeep $(srcdir)/move-if-change
+insn-peep.c: s-peep ; @true
+s-peep : $(md_file) genpeep $(srcdir)/move-if-change
./genpeep $(md_file) > tmp-peep.c
$(srcdir)/move-if-change tmp-peep.c insn-peep.c
- touch stamp-peep
+ touch s-peep
insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
insn-attr.h insn-config.h system.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
-insn-attr.h: stamp-attr ; @true
-stamp-attr : $(md_file) genattr $(srcdir)/move-if-change
+insn-attr.h: s-attr ; @true
+s-attr : $(md_file) genattr $(srcdir)/move-if-change
./genattr $(md_file) > tmp-attr.h
$(srcdir)/move-if-change tmp-attr.h insn-attr.h
- touch stamp-attr
+ touch s-attr
-insn-attrtab.c: stamp-attrtab ; @true
-stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
+insn-attrtab.c: s-attrtab ; @true
+s-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
if cmp -s $(PREMADE_ATTRTAB_MD) $(md_file); \
then \
echo Using $(PREMADE_ATTRTAB); \
@@ -1574,28 +1577,28 @@ stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
./genattrtab $(md_file) > tmp-attrtab.c; \
fi
$(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
- touch stamp-attrtab
+ touch s-attrtab
insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h $(RECOG_H) \
insn-codes.h system.h
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
-insn-output.c: stamp-output ; @true
-stamp-output : $(md_file) genoutput $(srcdir)/move-if-change
+insn-output.c: s-output ; @true
+s-output : $(md_file) genoutput $(srcdir)/move-if-change
./genoutput $(md_file) > tmp-output.c
$(srcdir)/move-if-change tmp-output.c insn-output.c
- touch stamp-output
+ touch s-output
genrtl.o : genrtl.c $(CONFIG_H) $(RTL_H)
-genrtl.c genrtl.h : stamp-genrtl
+genrtl.c genrtl.h : s-genrtl
@true # force gnu make to recheck modification times.
-stamp-genrtl: gengenrtl $(srcdir)/move-if-change $(RTL_BASE_H)
+s-genrtl: gengenrtl $(srcdir)/move-if-change $(RTL_BASE_H)
./gengenrtl tmp-genrtl.h tmp-genrtl.c
$(srcdir)/move-if-change tmp-genrtl.h genrtl.h
$(srcdir)/move-if-change tmp-genrtl.c genrtl.c
- touch stamp-genrtl
+ touch s-genrtl
#
# Compile the programs that generate insn-* from the machine description.
@@ -1754,8 +1757,6 @@ $(srcdir)/cexp.c: $(srcdir)/cexp.y
cd $(srcdir); $(BISON) -o cexp.c cexp.y
cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
-# The reason we use $(libdir)/g++-include rather than using libsubdir
-# is for compatibility with the current version of libg++.
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
@@ -1875,7 +1876,7 @@ gcov$(exeext): gcov.o $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) gcov.o $(LIBS) -o $@
#
# Build the include directory. The stamp files are stmp-* rather than
-# stamp-* so that mostlyclean does not force the include directory to
+# s-* so that mostlyclean does not force the include directory to
# be rebuilt.
# Build the include directory except for float.h (which depends upon
@@ -2061,14 +2062,10 @@ mostlyclean: lang.mostlyclean
# Delete the temp files made in the course of building libgcc.a.
-rm -f tmplibgcc* tmpcopy xlimits.h libgcc1-test
for name in $(LIB1FUNCS); do rm -f $${name}.c; done
-# Delete other temporary files.
- -rm -f tmp-float.h tmp-gcc.xtar.gz
- -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
- -rm -f tmp-c-parse.y tmp-gperf.h
- -rm -f tmp-specs t-float.h-cross tmp-xlimits.h
- -rm -f tmp-fixtmp.c xsys-protos.hT
-# Delete the stamp files.
- -rm -f stamp-* tmp-*
+# Delete other built files.
+ -rm -f t-float.h-cross xsys-protos.hT fp-bit.c dp-bit.c
+# Delete the stamp and temporary files.
+ -rm -f s-* tmp-* stamp-* stmp-*
-rm -f */stamp-* */tmp-*
# Delete debugging dump files.
-rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
@@ -2106,8 +2103,7 @@ clean: mostlyclean lang.clean
rm -f md ; \
fi
# Delete the include directory.
- -rm -rf stmp-* include
- -rm -f */stmp-*
+ -rm -rf include
# Delete files used by the "multilib" facility (including libgcc subdirs).
-rm -f multilib.h tmpmultilib*
-if [ "x$(MULTILIB_DIRNAMES)" != x ] ; then \
@@ -2142,7 +2138,7 @@ extraclean: distclean lang.extraclean
-rm -f *.dvi *.ps *.oaux *.d *.[zZ] *.gz
-rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
-rm -f *lose config/*lose config/*/*lose
- -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
+ -rm -f *.s *.s[0-9] *.i config/ChangeLog
-rm -f */=* */"#"* */*~*
-rm -f */patch* */*.orig */*.rej
-rm -f */*.dvi */*.oaux */*.d */*.[zZ] */*.gz
@@ -2516,32 +2512,29 @@ check-g77: testsuite/site.exp
# Update the tags table.
TAGS: force
cd $(srcdir); \
- mkdir temp; \
- mv -f c-parse.[ch] cexp.c =*.[chy] temp; \
+ mkdir tmp-tags; \
+ mv -f c-parse.[ch] cexp.c =*.[chy] tmp-tags; \
etags *.y *.h *.c; \
- mv temp/* .; \
- rmdir temp
-
-# Create the distribution tar file.
-#dist: gcc-$(version).tar.gz
-dist: gcc.xtar.gz
+ mv tmp-tags/* .; \
+ rmdir tmp-tags
-gcc.xtar.gz: gcc.xtar
- gzip --best < gcc.xtar > tmp-gcc.xtar.gz
- mv tmp-gcc.xtar.gz gcc.xtar.gz
+# Create the distribution tar.gz file.
+dist: tmp-gcc.xtar
+ gzip --best < tmp-gcc.xtar > tmp-gcc.xtar.gz
+ mv tmp-gcc.xtar.gz gcc-$(version).tar.gz
-#gcc-$(version).tar.gz: gcc-$(version).tar
-# gzip < gcc-$(version).tar > gcc-$(version).tar.gz
-
-#gcc-$(version).tar:
-gcc.xtar: distdir
+tmp-gcc.xtar: distdir
# Make the distribution.
- tar -chf gcc.xtar gcc-$(version)
+ tar -chf tmp-gcc.xtar gcc-$(version)
+
+distdir-cvs: force
+ if [ -d $(srcdir)/CVS ]; then cvs -r update; fi
# This target exists to do the initial work before the language specific
# stuff gets done.
distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
- $(srcdir)/c-parse.c $(srcdir)/cexp.c $(srcdir)/config.in
+ $(srcdir)/c-parse.c $(srcdir)/cexp.c $(srcdir)/config.in \
+ $(srcdir)/bi-parser.h $(srcdir)/bi-parser.c $(srcdir)/version.c TAGS
@if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
then true; \
else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
@@ -2563,7 +2556,7 @@ distdir-start: doc $(srcdir)/INSTALL $(srcdir)/c-parse.y $(srcdir)/c-gperf.h \
done
cd config; \
for file in *[0-9a-zA-Z+]; do \
- if test -d $$file && test "$$file" != RCS; then \
+ if test -d $$file && test "$$file" != RCS && test "$$file" != CVS; then \
mkdir ../tmp/config/$$file; \
cd $$file; \
for subfile in *[0-9a-zA-Z+]; do \
@@ -2590,21 +2583,21 @@ distdir-finish:
# Get rid of everything we don't want in the distribution. We'd want
# this to use Makefile.in, but it doesn't have the `lang.foo' targets
# expanded.
- cd gcc-$(version); make extraclean
+ cd gcc-$(version); make extraclean VERSION_DEP=
-distdir: distdir-start lang.distdir distdir-finish
+distdir: distdir-cvs distdir-start lang.distdir distdir-finish
# make diff oldversion=M.N
# creates a diff file between an older distribution and this one.
# The -P option assumes this is GNU diff.
diff:
diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x c-gperf.h \
- -x cexp.c -x objc-parse.y -x objc-parse.c \
- -x TAGS \
+ -x cexp.c -x bi-parser.c -x bi-parser.h -x TAGS -x INSTALL \
+ -x configure -x config.in \
-x "gcc.??" -x "gcc.??s" -x gcc.aux -x "gcc.info*" \
-x "cpp.??" -x "cpp.??s" -x cpp.aux -x "cpp.info*" \
$(LANG_DIFF_EXCLUDES) \
- gcc-$(oldversion) gcc-$(version) > diffs
+ gcc-$(oldversion) gcc-$(version) > gcc-$(oldversion)-$(version).diff
bootstrap bootstrap-lean: force
# Only build the C compiler for stage1, because that is the only one that
diff --git a/gcc/NEWS b/gcc/NEWS
index 5f671a3ce61..28950fa190f 100644
--- a/gcc/NEWS
+++ b/gcc/NEWS
@@ -1,5 +1,14 @@
Noteworthy changes in GCC for EGCS.
+Noteworthy changes in GCC version 2.8.1
+---------------------------------------
+
+Numerous bugs have been fixed and some minor performance
+improvements (compilation speed) have been made.
+
+Noteworthy changes in GCC version 2.8.0
+---------------------------------------
+
A major change in this release is the addition of a framework for
exception handling, currently used by C++. Many internal changes and
optimization improvements have been made. These increase the
diff --git a/gcc/README.RS6000 b/gcc/README.RS6000
index 6507633ce2e..6a32c164ff7 100644
--- a/gcc/README.RS6000
+++ b/gcc/README.RS6000
@@ -120,4 +120,3 @@ an assembler modified after October 16th, 1995 in order to build the GNU C
compiler. This is because the GNU C compiler wants to build a variant of its
library, libgcc.a with the -mcpu=common switch to support building programs
that can run on either the Power or PowerPC machines.
-
diff --git a/gcc/acconfig.h b/gcc/acconfig.h
index 91173766d75..ea5dc51034b 100644
--- a/gcc/acconfig.h
+++ b/gcc/acconfig.h
@@ -40,7 +40,7 @@
/* Whether atol must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_ATOL
-/* Whether sbrk must be declared even if <unistd.h> is included. */
+/* Whether sbrk must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_SBRK
/* Whether abort must be declared even if <stdlib.h> is included. */
diff --git a/gcc/c-common.c b/gcc/c-common.c
index efc6051dc3f..2422741ccee 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1,5 +1,5 @@
/* Subroutines shared by all languages that are variants of C.
- Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -975,37 +975,39 @@ typedef struct {
/* Type of argument if length modifier `L' is used.
If NULL, then this modifier is not allowed. */
tree *bigllen;
+ /* Type of argument if length modifier `Z' is used.
+ If NULL, then this modifier is not allowed. */
+ tree *zlen;
/* List of other modifier characters allowed with these options. */
char *flag_chars;
} format_char_info;
static format_char_info print_char_table[] = {
- { "di", 0, T_I, T_I, T_L, T_LL, T_LL, "-wp0 +" },
- { "oxX", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, "-wp0#" },
- { "u", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, "-wp0" },
-/* Two GNU extensions. */
- { "Z", 0, T_ST, NULL, NULL, NULL, NULL, "-wp0" },
- { "m", 0, T_V, NULL, NULL, NULL, NULL, "-wp" },
- { "feEgGaA", 0, T_D, NULL, NULL, NULL, T_LD, "-wp0 +#" },
- { "c", 0, T_I, NULL, T_W, NULL, NULL, "-w" },
- { "C", 0, T_W, NULL, NULL, NULL, NULL, "-w" },
- { "s", 1, T_C, NULL, T_W, NULL, NULL, "-wp" },
- { "S", 1, T_W, NULL, NULL, NULL, NULL, "-wp" },
- { "p", 1, T_V, NULL, NULL, NULL, NULL, "-w" },
- { "n", 1, T_I, T_S, T_L, T_LL, NULL, "" },
+ { "di", 0, T_I, T_I, T_L, T_LL, T_LL, T_ST, "-wp0 +" },
+ { "oxX", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, "-wp0#" },
+ { "u", 0, T_UI, T_UI, T_UL, T_ULL, T_ULL, T_ST, "-wp0" },
+/* A GNU extension. */
+ { "m", 0, T_V, NULL, NULL, NULL, NULL, NULL, "-wp" },
+ { "feEgGaA", 0, T_D, NULL, NULL, NULL, T_LD, NULL, "-wp0 +#" },
+ { "c", 0, T_I, NULL, T_W, NULL, NULL, NULL, "-w" },
+ { "C", 0, T_W, NULL, NULL, NULL, NULL, NULL, "-w" },
+ { "s", 1, T_C, NULL, T_W, NULL, NULL, NULL, "-wp" },
+ { "S", 1, T_W, NULL, NULL, NULL, NULL, NULL, "-wp" },
+ { "p", 1, T_V, NULL, NULL, NULL, NULL, NULL, "-w" },
+ { "n", 1, T_I, T_S, T_L, T_LL, NULL, NULL, "" },
{ NULL }
};
static format_char_info scan_char_table[] = {
- { "di", 1, T_I, T_S, T_L, T_LL, T_LL, "*" },
- { "ouxX", 1, T_UI, T_US, T_UL, T_ULL, T_ULL, "*" },
- { "efgEGaA", 1, T_F, NULL, T_D, NULL, T_LD, "*" },
- { "sc", 1, T_C, NULL, T_W, NULL, NULL, "*a" },
- { "[", 1, T_C, NULL, NULL, NULL, NULL, "*a" },
- { "C", 1, T_W, NULL, NULL, NULL, NULL, "*" },
- { "S", 1, T_W, NULL, NULL, NULL, NULL, "*" },
- { "p", 2, T_V, NULL, NULL, NULL, NULL, "*" },
- { "n", 1, T_I, T_S, T_L, T_LL, NULL, "" },
+ { "di", 1, T_I, T_S, T_L, T_LL, T_LL, NULL, "*" },
+ { "ouxX", 1, T_UI, T_US, T_UL, T_ULL, T_ULL, NULL, "*" },
+ { "efgEGaA", 1, T_F, NULL, T_D, NULL, T_LD, NULL, "*" },
+ { "sc", 1, T_C, NULL, T_W, NULL, NULL, NULL, "*a" },
+ { "[", 1, T_C, NULL, NULL, NULL, NULL, NULL, "*a" },
+ { "C", 1, T_W, NULL, NULL, NULL, NULL, NULL, "*" },
+ { "S", 1, T_W, NULL, NULL, NULL, NULL, NULL, "*" },
+ { "p", 2, T_V, NULL, NULL, NULL, NULL, NULL, "*" },
+ { "n", 1, T_I, T_S, T_L, T_LL, NULL, NULL, "" },
{ NULL }
};
@@ -1345,7 +1347,7 @@ check_format_info (info, params)
if (index (flag_chars, *format_chars) != 0)
{
sprintf (message, "repeated `%c' flag in format",
- *format_chars);
+ *format_chars++);
warning (message);
}
else
@@ -1453,6 +1455,12 @@ check_format_info (info, params)
pedwarn ("ANSI C does not support the `%c' length modifier",
length_char);
}
+ else if (*format_chars == 'Z')
+ {
+ length_char = *format_chars++;
+ if (pedantic)
+ pedwarn ("ANSI C does not support the `Z' length modifier");
+ }
else
length_char = 0;
if (length_char == 'l' && *format_chars == 'l')
@@ -1575,6 +1583,7 @@ check_format_info (info, params)
case 'l': wanted_type = fci->llen ? *(fci->llen) : 0; break;
case 'q': wanted_type = fci->qlen ? *(fci->qlen) : 0; break;
case 'L': wanted_type = fci->bigllen ? *(fci->bigllen) : 0; break;
+ case 'Z': wanted_type = fci->zlen ? *fci->zlen : 0; break;
}
if (wanted_type == 0
|| (pedantic && length_char == 'L' && integral_format))
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index bf5d3ac6080..74ed9075d34 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1981,13 +1981,14 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
}
if (different_binding_level)
{
- /* Don't output a duplicate symbol for this declaration. */
- TREE_ASM_WRITTEN (newdecl) = 1;
+ /* Don't output a duplicate symbol or debugging information for this
+ declaration. */
+ TREE_ASM_WRITTEN (newdecl) = DECL_IGNORED_P (newdecl) = 1;
return 0;
}
/* Copy most of the decl-specific fields of NEWDECL into OLDDECL.
- But preserve OLDdECL's DECL_UID. */
+ But preserve OLDDECL's DECL_UID. */
{
register unsigned olddecl_uid = DECL_UID (olddecl);
@@ -5163,9 +5164,6 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if (! strcmp (IDENTIFIER_POINTER (declarator), "main"))
warning ("cannot inline function `main'");
- else if (last && (TYPE_MAIN_VARIANT (TREE_VALUE (last))
- != void_type_node))
- warning ("inline declaration ignored for function with `...'");
else
/* Assume that otherwise the function can be inlined. */
DECL_INLINE (decl) = 1;
diff --git a/gcc/c-gperf.h b/gcc/c-gperf.h
index 361b9d971df..b20f82b85ff 100644
--- a/gcc/c-gperf.h
+++ b/gcc/c-gperf.h
@@ -1,5 +1,5 @@
/* C code produced by gperf version 2.5 (GNU C++ version) */
-/* Command-line: gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ ./c-parse.gperf */
+/* Command-line: gperf -p -j1 -i 1 -g -o -t -G -N is_reserved_word -k1,3,$ /puke/law/tmp/merge/egcs/gcc/c-parse.gperf */
/* Command-line: gperf -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
struct resword { char *name; short token; enum rid rid; };
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index a9863aaf2fd..99b21c0382f 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -1,5 +1,5 @@
/* Lexical analyzer for C and Objective C.
- Copyright (C) 1987, 88, 89, 92, 94-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92, 94-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -1513,8 +1513,8 @@ yylex ()
if (floatflag != NOT_FLOAT)
{
tree type = double_type_node;
- int exceeds_double = 0;
int imag = 0;
+ int conversion_errno = 0;
REAL_VALUE_TYPE value;
jmp_buf handler;
@@ -1543,7 +1543,6 @@ yylex ()
}
*p = 0;
- errno = 0;
/* Convert string to a double, checking for overflow. */
if (setjmp (handler))
@@ -1613,7 +1612,9 @@ yylex ()
error ("both `f' and `l' in floating constant");
type = float_type_node;
+ errno = 0;
value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
+ conversion_errno = errno;
/* A diagnostic is required here by some ANSI C testsuites.
This is not pedwarn, become some people don't want
an error for this. */
@@ -1623,13 +1624,17 @@ yylex ()
else if (lflag)
{
type = long_double_type_node;
+ errno = 0;
value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
+ conversion_errno = errno;
if (REAL_VALUE_ISINF (value) && pedantic)
warning ("floating point number exceeds range of `long double'");
}
else
{
+ errno = 0;
value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
+ conversion_errno = errno;
if (REAL_VALUE_ISINF (value) && pedantic)
warning ("floating point number exceeds range of `double'");
}
@@ -1637,17 +1642,12 @@ yylex ()
set_float_handler (NULL_PTR);
}
#ifdef ERANGE
- if (errno == ERANGE && !flag_traditional && pedantic)
- {
- /* ERANGE is also reported for underflow,
- so test the value to distinguish overflow from that. */
- if (REAL_VALUES_LESS (dconst1, value)
- || REAL_VALUES_LESS (value, dconstm1))
- {
- warning ("floating point number exceeds range of `double'");
- exceeds_double = 1;
- }
- }
+ /* ERANGE is also reported for underflow,
+ so test the value to distinguish overflow from that. */
+ if (conversion_errno == ERANGE && !flag_traditional && pedantic
+ && (REAL_VALUES_LESS (dconst1, value)
+ || REAL_VALUES_LESS (value, dconstm1)))
+ warning ("floating point number exceeds range of `double'");
#endif
/* If the result is not a number, assume it must have been
diff --git a/gcc/c-parse.in b/gcc/c-parse.in
index c8705576243..76e7ca9dcf1 100644
--- a/gcc/c-parse.in
+++ b/gcc/c-parse.in
@@ -1,5 +1,5 @@
/* YACC parser for C syntax and for Objective C. -*-c-*-
- Copyright (C) 1987, 88, 89, 92-6, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/gcc/c-parse.y b/gcc/c-parse.y
index bb783f0acf6..ac9138df393 100644
--- a/gcc/c-parse.y
+++ b/gcc/c-parse.y
@@ -1,6 +1,6 @@
/*WARNING: This file is automatically generated!*/
/* YACC parser for C syntax and for Objective C. -*-c-*-
- Copyright (C) 1987, 88, 89, 92-6, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index b6480f0b17f..2dc4693d141 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -1,5 +1,5 @@
/* Build expressions with type checking for C compiler.
- Copyright (C) 1987, 88, 91-7, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 91-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -70,6 +70,8 @@ static tree digest_init PROTO((tree, tree, int, int));
static void check_init_type_bitfields PROTO((tree));
static void output_init_element PROTO((tree, tree, tree, int));
static void output_pending_init_elements PROTO((int));
+static void add_pending_init PROTO((tree, tree));
+static int pending_init_member PROTO((tree));
/* Do `exp = require_complete_type (exp);' to make sure exp
does not have an incomplete type. (That includes void types.) */
@@ -785,7 +787,7 @@ signed_or_unsigned_type (unsignedp, type)
int unsignedp;
tree type;
{
- if (! INTEGRAL_TYPE_P (type)
+ if ((! INTEGRAL_TYPE_P (type) && ! POINTER_TYPE_P (type))
|| TREE_UNSIGNED (type) == unsignedp)
return type;
if (TYPE_PRECISION (type) == TYPE_PRECISION (signed_char_type_node))
@@ -5080,11 +5082,23 @@ static int constructor_erroneous;
/* 1 if have called defer_addressed_constants. */
static int constructor_subconstants_deferred;
-/* List of pending elements at this constructor level.
+/* Structure for managing pending initializer elements, organized as an
+ AVL tree. */
+
+struct init_node
+{
+ struct init_node *left, *right;
+ struct init_node *parent;
+ int balance;
+ tree purpose;
+ tree value;
+};
+
+/* Tree of pending elements at this constructor level.
These are elements encountered out of order
which belong at places we haven't reached yet in actually
writing the output. */
-static tree constructor_pending_elts;
+static struct init_node *constructor_pending_elts;
/* The SPELLING_DEPTH of this constructor. */
static int constructor_depth;
@@ -5128,7 +5142,7 @@ struct constructor_stack
tree bit_index;
tree elements;
int offset;
- tree pending_elts;
+ struct init_node *pending_elts;
int depth;
/* If nonzero, this value should replace the entire
constructor at this level. */
@@ -5871,6 +5885,251 @@ set_init_label (fieldname)
}
}
+/* Add a new initializer to the tree of pending initializers. PURPOSE
+ indentifies the initializer, either array index or field in a structure.
+ VALUE is the value of that index or field. */
+
+static void
+add_pending_init (purpose, value)
+ tree purpose, value;
+{
+ struct init_node *p, **q, *r;
+
+ q = &constructor_pending_elts;
+ p = 0;
+
+ if (TREE_CODE (constructor_type) == ARRAY_TYPE)
+ {
+ while (*q != 0)
+ {
+ p = *q;
+ if (tree_int_cst_lt (purpose, p->purpose))
+ q = &p->left;
+ else if (tree_int_cst_lt (p->purpose, purpose))
+ q = &p->right;
+ else
+ abort ();
+ }
+ }
+ else
+ {
+ while (*q != NULL)
+ {
+ p = *q;
+ if (tree_int_cst_lt (DECL_FIELD_BITPOS (purpose),
+ DECL_FIELD_BITPOS (p->purpose)))
+ q = &p->left;
+ else if (tree_int_cst_lt (DECL_FIELD_BITPOS (p->purpose),
+ DECL_FIELD_BITPOS (purpose)))
+ q = &p->right;
+ else
+ abort ();
+ }
+ }
+
+ r = (struct init_node *) oballoc (sizeof (struct init_node));
+ r->purpose = purpose;
+ r->value = value;
+
+ *q = r;
+ r->parent = p;
+ r->left = 0;
+ r->right = 0;
+ r->balance = 0;
+
+ while (p)
+ {
+ struct init_node *s;
+
+ if (r == p->left)
+ {
+ if (p->balance == 0)
+ p->balance = -1;
+ else if (p->balance < 0)
+ {
+ if (r->balance < 0)
+ {
+ /* L rotation. */
+ p->left = r->right;
+ if (p->left)
+ p->left->parent = p;
+ r->right = p;
+
+ p->balance = 0;
+ r->balance = 0;
+
+ s = p->parent;
+ p->parent = r;
+ r->parent = s;
+ if (s)
+ {
+ if (s->left == p)
+ s->left = r;
+ else
+ s->right = r;
+ }
+ else
+ constructor_pending_elts = r;
+ }
+ else
+ {
+ /* LR rotation. */
+ struct init_node *t = r->right;
+
+ r->right = t->left;
+ if (r->right)
+ r->right->parent = r;
+ t->left = r;
+
+ p->left = t->right;
+ if (p->left)
+ p->left->parent = p;
+ t->right = p;
+
+ p->balance = t->balance < 0;
+ r->balance = -(t->balance > 0);
+ t->balance = 0;
+
+ s = p->parent;
+ p->parent = t;
+ r->parent = t;
+ t->parent = s;
+ if (s)
+ {
+ if (s->left == p)
+ s->left = t;
+ else
+ s->right = t;
+ }
+ else
+ constructor_pending_elts = t;
+ }
+ break;
+ }
+ else
+ {
+ /* p->balance == +1; growth of left side balances the node. */
+ p->balance = 0;
+ break;
+ }
+ }
+ else /* r == p->right */
+ {
+ if (p->balance == 0)
+ /* Growth propagation from right side. */
+ p->balance++;
+ else if (p->balance > 0)
+ {
+ if (r->balance > 0)
+ {
+ /* R rotation. */
+ p->right = r->left;
+ if (p->right)
+ p->right->parent = p;
+ r->left = p;
+
+ p->balance = 0;
+ r->balance = 0;
+
+ s = p->parent;
+ p->parent = r;
+ r->parent = s;
+ if (s)
+ {
+ if (s->left == p)
+ s->left = r;
+ else
+ s->right = r;
+ }
+ else
+ constructor_pending_elts = r;
+ }
+ else /* r->balance == -1 */
+ {
+ /* RL rotation */
+ struct init_node *t = r->left;
+
+ r->left = t->right;
+ if (r->left)
+ r->left->parent = r;
+ t->right = r;
+
+ p->right = t->left;
+ if (p->right)
+ p->right->parent = p;
+ t->left = p;
+
+ r->balance = (t->balance < 0);
+ p->balance = -(t->balance > 0);
+ t->balance = 0;
+
+ s = p->parent;
+ p->parent = t;
+ r->parent = t;
+ t->parent = s;
+ if (s)
+ {
+ if (s->left == p)
+ s->left = t;
+ else
+ s->right = t;
+ }
+ else
+ constructor_pending_elts = t;
+ }
+ break;
+ }
+ else
+ {
+ /* p->balance == -1; growth of right side balances the node. */
+ p->balance = 0;
+ break;
+ }
+ }
+
+ r = p;
+ p = p->parent;
+ }
+}
+
+/* Return nonzero if FIELD is equal to the index of a pending initializer. */
+
+static int
+pending_init_member (field)
+ tree field;
+{
+ struct init_node *p;
+
+ p = constructor_pending_elts;
+ if (TREE_CODE (constructor_type) == ARRAY_TYPE)
+ {
+ while (p)
+ {
+ if (tree_int_cst_equal (field, p->purpose))
+ return 1;
+ else if (tree_int_cst_lt (field, p->purpose))
+ p = p->left;
+ else
+ p = p->right;
+ }
+ }
+ else
+ {
+ while (p)
+ {
+ if (field == p->purpose)
+ return 1;
+ else if (tree_int_cst_lt (DECL_FIELD_BITPOS (field),
+ DECL_FIELD_BITPOS (p->purpose)))
+ p = p->left;
+ else
+ p = p->right;
+ }
+ }
+
+ return 0;
+}
+
/* "Output" the next constructor element.
At top level, really output it to assembler code now.
Otherwise, collect it in a list from which we will make a CONSTRUCTOR.
@@ -5929,25 +6188,10 @@ output_init_element (value, type, field, pending)
if (pending)
{
if (TREE_CODE (constructor_type) == RECORD_TYPE
- || TREE_CODE (constructor_type) == UNION_TYPE)
+ || TREE_CODE (constructor_type) == UNION_TYPE
+ || TREE_CODE (constructor_type) == ARRAY_TYPE)
{
- if (purpose_member (field, constructor_pending_elts))
- {
- error_init ("duplicate initializer%s", " for `%s'", NULL);
- duplicate = 1;
- }
- }
- if (TREE_CODE (constructor_type) == ARRAY_TYPE)
- {
- tree tail;
- for (tail = constructor_pending_elts; tail;
- tail = TREE_CHAIN (tail))
- if (TREE_PURPOSE (tail) != 0
- && TREE_CODE (TREE_PURPOSE (tail)) == INTEGER_CST
- && tree_int_cst_equal (TREE_PURPOSE (tail), constructor_index))
- break;
-
- if (tail != 0)
+ if (pending_init_member (field))
{
error_init ("duplicate initializer%s", " for `%s'", NULL);
duplicate = 1;
@@ -5963,11 +6207,9 @@ output_init_element (value, type, field, pending)
if (! duplicate)
/* The copy_node is needed in case field is actually
constructor_index, which is modified in place. */
- constructor_pending_elts
- = tree_cons (copy_node (field),
- digest_init (type, value, require_constant_value,
- require_constant_elements),
- constructor_pending_elts);
+ add_pending_init (copy_node (field),
+ digest_init (type, value, require_constant_value,
+ require_constant_elements));
}
else if (TREE_CODE (constructor_type) == RECORD_TYPE
&& field != constructor_unfilled_fields)
@@ -5976,11 +6218,9 @@ output_init_element (value, type, field, pending)
no matter which field is specified, it can be initialized
right away since it starts at the beginning of the union. */
if (!duplicate)
- constructor_pending_elts
- = tree_cons (field,
- digest_init (type, value, require_constant_value,
- require_constant_elements),
- constructor_pending_elts);
+ add_pending_init (field,
+ digest_init (type, value, require_constant_value,
+ require_constant_elements));
}
else
{
@@ -6080,56 +6320,109 @@ static void
output_pending_init_elements (all)
int all;
{
- tree tail;
+ struct init_node *elt = constructor_pending_elts;
tree next;
retry:
- /* Look thru the whole pending list.
+ /* Look thru the whole pending tree.
If we find an element that should be output now,
output it. Otherwise, set NEXT to the element
that comes first among those still pending. */
next = 0;
- for (tail = constructor_pending_elts; tail;
- tail = TREE_CHAIN (tail))
+ while (elt)
{
if (TREE_CODE (constructor_type) == ARRAY_TYPE)
{
- if (tree_int_cst_equal (TREE_PURPOSE (tail),
+ if (tree_int_cst_equal (elt->purpose,
constructor_unfilled_index))
+ output_init_element (elt->value,
+ TREE_TYPE (constructor_type),
+ constructor_unfilled_index, 0);
+ else if (tree_int_cst_lt (constructor_unfilled_index,
+ elt->purpose))
{
- output_init_element (TREE_VALUE (tail),
- TREE_TYPE (constructor_type),
- constructor_unfilled_index, 0);
- goto retry;
+ /* Advance to the next smaller node. */
+ if (elt->left)
+ elt = elt->left;
+ else
+ {
+ /* We have reached the smallest node bigger than the
+ current unfilled index. Fill the space first. */
+ next = elt->purpose;
+ break;
+ }
+ }
+ else
+ {
+ /* Advance to the next bigger node. */
+ if (elt->right)
+ elt = elt->right;
+ else
+ {
+ /* We have reached the biggest node in a subtree. Find
+ the parent of it, which is the next bigger node. */
+ while (elt->parent && elt->parent->right == elt)
+ elt = elt->parent;
+ elt = elt->parent;
+ if (elt && tree_int_cst_lt (constructor_unfilled_index,
+ elt->purpose))
+ {
+ next = elt->purpose;
+ break;
+ }
+ }
}
- else if (tree_int_cst_lt (TREE_PURPOSE (tail),
- constructor_unfilled_index))
- ;
- else if (next == 0
- || tree_int_cst_lt (TREE_PURPOSE (tail), next))
- next = TREE_PURPOSE (tail);
}
else if (TREE_CODE (constructor_type) == RECORD_TYPE
|| TREE_CODE (constructor_type) == UNION_TYPE)
{
- if (TREE_PURPOSE (tail) == constructor_unfilled_fields)
+ /* If the current record is complete we are done. */
+ if (constructor_unfilled_fields == 0)
+ break;
+ if (elt->purpose == constructor_unfilled_fields)
{
- output_init_element (TREE_VALUE (tail),
+ output_init_element (elt->value,
TREE_TYPE (constructor_unfilled_fields),
constructor_unfilled_fields,
0);
- goto retry;
}
- else if (constructor_unfilled_fields == 0
- || tree_int_cst_lt (DECL_FIELD_BITPOS (TREE_PURPOSE (tail)),
- DECL_FIELD_BITPOS (constructor_unfilled_fields)))
- ;
- else if (next == 0
- || tree_int_cst_lt (DECL_FIELD_BITPOS (TREE_PURPOSE (tail)),
- DECL_FIELD_BITPOS (next)))
- next = TREE_PURPOSE (tail);
+ else if (tree_int_cst_lt (DECL_FIELD_BITPOS (constructor_unfilled_fields),
+ DECL_FIELD_BITPOS (elt->purpose)))
+ {
+ /* Advance to the next smaller node. */
+ if (elt->left)
+ elt = elt->left;
+ else
+ {
+ /* We have reached the smallest node bigger than the
+ current unfilled field. Fill the space first. */
+ next = elt->purpose;
+ break;
+ }
+ }
+ else
+ {
+ /* Advance to the next bigger node. */
+ if (elt->right)
+ elt = elt->right;
+ else
+ {
+ /* We have reached the biggest node in a subtree. Find
+ the parent of it, which is the next bigger node. */
+ while (elt->parent && elt->parent->right == elt)
+ elt = elt->parent;
+ elt = elt->parent;
+ if (elt
+ && tree_int_cst_lt (DECL_FIELD_BITPOS (constructor_unfilled_fields),
+ DECL_FIELD_BITPOS (elt->purpose)))
+ {
+ next = elt->purpose;
+ break;
+ }
+ }
+ }
}
}
@@ -6147,6 +6440,7 @@ output_pending_init_elements (all)
if (TREE_CODE (constructor_type) == RECORD_TYPE
|| TREE_CODE (constructor_type) == UNION_TYPE)
{
+ tree tail;
/* Find the last field written out, if any. */
for (tail = TYPE_FIELDS (constructor_type); tail;
tail = TREE_CHAIN (tail))
@@ -6212,6 +6506,8 @@ output_pending_init_elements (all)
}
}
+ /* ELT now points to the node in the pending tree with the next
+ initializer to output. */
goto retry;
}
diff --git a/gcc/calls.c b/gcc/calls.c
index bb9197a5f0e..2716caff6cb 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -125,7 +125,8 @@ int stack_arg_under_construction;
static int calls_function PROTO((tree, int));
static int calls_function_1 PROTO((tree, int));
-static void emit_call_1 PROTO((rtx, tree, tree, int, int, rtx, rtx,
+static void emit_call_1 PROTO((rtx, tree, tree, HOST_WIDE_INT,
+ HOST_WIDE_INT, rtx, rtx,
int, rtx, int));
static void store_one_arg PROTO ((struct arg_data *, rtx, int, int,
tree, int));
@@ -347,8 +348,8 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, struct_value_size,
rtx funexp;
tree fndecl;
tree funtype;
- int stack_size;
- int struct_value_size;
+ HOST_WIDE_INT stack_size;
+ HOST_WIDE_INT struct_value_size;
rtx next_arg_reg;
rtx valreg;
int old_inhibit_defer_pop;
@@ -509,7 +510,7 @@ expand_call (exp, target, ignore)
/* Size of aggregate value wanted, or zero if none wanted
or if we are using the non-reentrant PCC calling convention
or expecting the value in registers. */
- int struct_value_size = 0;
+ HOST_WIDE_INT struct_value_size = 0;
/* Nonzero if called function returns an aggregate in memory PCC style,
by returning the address of where to find it. */
int pcc_struct_value = 0;
@@ -543,15 +544,11 @@ expand_call (exp, target, ignore)
So the entire argument block must then be preallocated (i.e., we
ignore PUSH_ROUNDING in that case). */
-#if defined(REG_PARM_STACK_SPACE) && ! defined(OUTGOING_REG_PARM_STACK_SPACE)
- int must_preallocate = 1;
-#else
#ifdef PUSH_ROUNDING
int must_preallocate = 0;
#else
int must_preallocate = 1;
#endif
-#endif
/* Size of the stack reserved for parameter registers. */
int reg_parm_stack_space = 0;
@@ -662,6 +659,11 @@ expand_call (exp, target, ignore)
#endif
#endif
+#if defined(PUSH_ROUNDING) && ! defined(OUTGOING_REG_PARM_STACK_SPACE)
+ if (reg_parm_stack_space > 0)
+ must_preallocate = 1;
+#endif
+
/* Warn if this value is an aggregate type,
regardless of which calling convention we are using for it. */
if (warn_aggregate_return && AGGREGATE_TYPE_P (TREE_TYPE (exp)))
@@ -712,8 +714,7 @@ expand_call (exp, target, ignore)
DECL_RTL (d) = assign_temp (TREE_TYPE (exp), 1, 0, 1);
mark_addressable (d);
structure_value_addr = XEXP (DECL_RTL (d), 0);
- MEM_IN_STRUCT_P (structure_value_addr)
- = AGGREGATE_TYPE_P (TREE_TYPE (exp));
+ TREE_USED (d) = 1;
target = 0;
}
}
@@ -771,18 +772,18 @@ expand_call (exp, target, ignore)
outgoing argument list in addition to the requested
space, but there is no way to ask for stack space such
that an argument list of a certain length can be
- safely constructed. */
+ safely constructed.
- int adjust = OUTGOING_ARGS_SIZE (DECL_SAVED_INSNS (fndecl));
-#ifdef REG_PARM_STACK_SPACE
- /* Add the stack space reserved for register arguments
- in the inline function. What is really needed is the
+ Add the stack space reserved for register arguments, if
+ any, in the inline function. What is really needed is the
largest value of reg_parm_stack_space in the inline
function, but that is not available. Using the current
value of reg_parm_stack_space is wrong, but gives
correct results on all supported machines. */
- adjust += reg_parm_stack_space;
-#endif
+
+ int adjust = (OUTGOING_ARGS_SIZE (DECL_SAVED_INSNS (fndecl))
+ + reg_parm_stack_space);
+
start_sequence ();
emit_stack_save (SAVE_BLOCK, &old_stack_level, NULL_RTX);
allocate_dynamic_stack_space (GEN_INT (adjust),
@@ -965,11 +966,11 @@ expand_call (exp, target, ignore)
/* Compute number of named args.
Normally, don't include the last named arg if anonymous args follow.
- We do include the last named arg if STRICT_ARGUMENT_NAMING is defined.
+ We do include the last named arg if STRICT_ARGUMENT_NAMING is nonzero.
(If no anonymous args follow, the result of list_length is actually
one too large. This is harmless.)
- If SETUP_INCOMING_VARARGS is defined and STRICT_ARGUMENT_NAMING is not,
+ If SETUP_INCOMING_VARARGS is defined and STRICT_ARGUMENT_NAMING is zero,
this machine will be able to place unnamed args that were passed in
registers into the stack. So treat all args as named. This allows the
insns emitting for a specific argument list to be independent of the
@@ -978,18 +979,20 @@ expand_call (exp, target, ignore)
If SETUP_INCOMING_VARARGS is not defined, we do not have any reliable
way to pass unnamed args in registers, so we must force them into
memory. */
-#if !defined(SETUP_INCOMING_VARARGS) || defined(STRICT_ARGUMENT_NAMING)
- if (TYPE_ARG_TYPES (funtype) != 0)
+
+ if ((STRICT_ARGUMENT_NAMING
+#ifndef SETUP_INCOMING_VARARGS
+ || 1
+#endif
+ )
+ && TYPE_ARG_TYPES (funtype) != 0)
n_named_args
= (list_length (TYPE_ARG_TYPES (funtype))
-#ifndef STRICT_ARGUMENT_NAMING
/* Don't include the last named arg. */
- - 1
-#endif
+ - (STRICT_ARGUMENT_NAMING ? 0 : -1)
/* Count the struct value address, if it is passed as a parm. */
+ structure_value_addr_parm);
else
-#endif
/* If we know nothing, treat all args as named. */
n_named_args = num_actuals;
@@ -1164,9 +1167,7 @@ expand_call (exp, target, ignore)
/* Compute the stack-size of this argument. */
if (args[i].reg == 0 || args[i].partial != 0
-#ifdef REG_PARM_STACK_SPACE
|| reg_parm_stack_space > 0
-#endif
|| args[i].pass_on_stack)
locate_and_pad_parm (mode, type,
#ifdef STACK_PARMS_IN_REG_PARM_AREA
@@ -1181,14 +1182,12 @@ expand_call (exp, target, ignore)
args[i].slot_offset = args_size;
#endif
-#ifndef REG_PARM_STACK_SPACE
/* If a part of the arg was put into registers,
don't include that part in the amount pushed. */
- if (! args[i].pass_on_stack)
+ if (reg_parm_stack_space == 0 && ! args[i].pass_on_stack)
args[i].size.constant -= ((args[i].partial * UNITS_PER_WORD)
/ (PARM_BOUNDARY / BITS_PER_UNIT)
* (PARM_BOUNDARY / BITS_PER_UNIT));
-#endif
/* Update ARGS_SIZE, the total stack space for args so far. */
@@ -1245,12 +1244,11 @@ expand_call (exp, target, ignore)
args_size.var = round_up (args_size.var, STACK_BYTES);
#endif
-#ifdef REG_PARM_STACK_SPACE
if (reg_parm_stack_space > 0)
{
args_size.var
= size_binop (MAX_EXPR, args_size.var,
- size_int (REG_PARM_STACK_SPACE (fndecl)));
+ size_int (reg_parm_stack_space));
#ifndef OUTGOING_REG_PARM_STACK_SPACE
/* The area corresponding to register parameters is not to count in
@@ -1260,7 +1258,6 @@ expand_call (exp, target, ignore)
size_int (reg_parm_stack_space));
#endif
}
-#endif
}
else
{
@@ -1269,17 +1266,17 @@ expand_call (exp, target, ignore)
/ STACK_BYTES) * STACK_BYTES);
#endif
-#ifdef REG_PARM_STACK_SPACE
args_size.constant = MAX (args_size.constant,
reg_parm_stack_space);
+
#ifdef MAYBE_REG_PARM_STACK_SPACE
if (reg_parm_stack_space == 0)
args_size.constant = 0;
#endif
+
#ifndef OUTGOING_REG_PARM_STACK_SPACE
args_size.constant -= reg_parm_stack_space;
#endif
-#endif
}
/* See if we have or want to preallocate stack space.
@@ -1444,7 +1441,7 @@ expand_call (exp, target, ignore)
Another approach might be to try to reorder the argument
evaluations to avoid this conflicting stack usage. */
-#if defined(REG_PARM_STACK_SPACE) && ! defined(OUTGOING_REG_PARM_STACK_SPACE)
+#ifndef OUTGOING_REG_PARM_STACK_SPACE
/* Since we will be writing into the entire argument area, the
map must be allocated for its entire size, not just the part that
is the responsibility of the caller. */
@@ -1516,7 +1513,7 @@ expand_call (exp, target, ignore)
to initialize an argument. */
if (stack_arg_under_construction)
{
-#if defined(REG_PARM_STACK_SPACE) && ! defined(OUTGOING_REG_PARM_STACK_SPACE)
+#ifndef OUTGOING_REG_PARM_STACK_SPACE
rtx push_size = GEN_INT (reg_parm_stack_space + args_size.constant);
#else
rtx push_size = GEN_INT (args_size.constant);
@@ -1695,6 +1692,7 @@ expand_call (exp, target, ignore)
}
#if defined(ACCUMULATE_OUTGOING_ARGS) && defined(REG_PARM_STACK_SPACE)
+
/* The argument list is the property of the called routine and it
may clobber it. If the fixed area has been used for previous
parameters, we must save and restore it.
@@ -2322,6 +2320,7 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
struct arg *argvec;
int old_inhibit_defer_pop = inhibit_defer_pop;
rtx call_fusage = 0;
+ int reg_parm_stack_space = 0;
#if defined(ACCUMULATE_OUTGOING_ARGS) && defined(REG_PARM_STACK_SPACE)
/* Define the boundary of the register parm stack space that needs to be
save, if any. */
@@ -2337,7 +2336,6 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
#ifdef REG_PARM_STACK_SPACE
/* Size of the stack reserved for parameter registers. */
- int reg_parm_stack_space = 0;
#ifdef MAYBE_REG_PARM_STACK_SPACE
reg_parm_stack_space = MAYBE_REG_PARM_STACK_SPACE;
#else
@@ -2433,16 +2431,11 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
if (argvec[count].size.var)
abort ();
-#ifndef REG_PARM_STACK_SPACE
- if (argvec[count].partial)
+ if (reg_parm_stack_space == 0 && argvec[count].partial)
argvec[count].size.constant -= argvec[count].partial * UNITS_PER_WORD;
-#endif
if (argvec[count].reg == 0 || argvec[count].partial != 0
-#ifdef REG_PARM_STACK_SPACE
- || 1
-#endif
- )
+ || reg_parm_stack_space > 0)
args_size.constant += argvec[count].size.constant;
FUNCTION_ARG_ADVANCE (args_so_far, mode, (tree) 0, 1);
@@ -2464,13 +2457,12 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
/ STACK_BYTES) * STACK_BYTES);
#endif
-#ifdef REG_PARM_STACK_SPACE
args_size.constant = MAX (args_size.constant,
reg_parm_stack_space);
+
#ifndef OUTGOING_REG_PARM_STACK_SPACE
args_size.constant -= reg_parm_stack_space;
#endif
-#endif
if (args_size.constant > current_function_outgoing_args_size)
current_function_outgoing_args_size = args_size.constant;
@@ -2489,7 +2481,8 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
evaluations to avoid this conflicting stack usage. */
needed = args_size.constant;
-#if defined(REG_PARM_STACK_SPACE) && ! defined(OUTGOING_REG_PARM_STACK_SPACE)
+
+#ifndef OUTGOING_REG_PARM_STACK_SPACE
/* Since we will be writing into the entire argument area, the
map must be allocated for its entire size, not just the part that
is the responsibility of the caller. */
@@ -2638,17 +2631,14 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
for (i = lower_bound; i < upper_bound; i++)
if (stack_usage_map[i]
-#ifdef REG_PARM_STACK_SPACE
/* Don't store things in the fixed argument area at this point;
it has already been saved. */
- && i > reg_parm_stack_space
-#endif
- )
+ && i > reg_parm_stack_space)
break;
if (i != upper_bound)
{
- /* We need to make a save area. See what mode we can make it. */
+ /* We need to make a save area. See what mode we can make it. */
enum machine_mode save_mode
= mode_for_size (argvec[argnum].size.constant * BITS_PER_UNIT,
MODE_INT, 1);
@@ -2661,7 +2651,8 @@ emit_library_call VPROTO((rtx orgfun, int no_queue, enum machine_mode outmode,
}
#endif
emit_push_insn (val, mode, NULL_TREE, NULL_RTX, 0, partial, reg, 0,
- argblock, GEN_INT (argvec[argnum].offset.constant));
+ argblock, GEN_INT (argvec[argnum].offset.constant),
+ reg_parm_stack_space);
#ifdef ACCUMULATE_OUTGOING_ARGS
/* Now mark the segment we just used. */
@@ -2825,6 +2816,7 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
int pcc_struct_value = 0;
int struct_value_size = 0;
int is_const;
+ int reg_parm_stack_space = 0;
#ifdef ACCUMULATE_OUTGOING_ARGS
int needed;
#endif
@@ -2838,7 +2830,6 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
#ifdef ACCUMULATE_OUTGOING_ARGS
/* Size of the stack reserved for parameter registers. */
- int reg_parm_stack_space = 0;
int initial_highest_arg_in_use = highest_outgoing_arg_in_use;
char *initial_stack_usage_map = stack_usage_map;
#endif
@@ -2938,10 +2929,7 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
if (argvec[count].reg == 0 || argvec[count].partial != 0
-#ifdef REG_PARM_STACK_SPACE
- || 1
-#endif
- )
+ || reg_parm_stack_space > 0)
args_size.constant += argvec[count].size.constant;
FUNCTION_ARG_ADVANCE (args_so_far, Pmode, (tree) 0, 1);
@@ -3008,16 +2996,11 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
if (argvec[count].size.var)
abort ();
-#ifndef REG_PARM_STACK_SPACE
- if (argvec[count].partial)
+ if (reg_parm_stack_space == 0 && argvec[count].partial)
argvec[count].size.constant -= argvec[count].partial * UNITS_PER_WORD;
-#endif
if (argvec[count].reg == 0 || argvec[count].partial != 0
-#ifdef REG_PARM_STACK_SPACE
- || 1
-#endif
- )
+ || reg_parm_stack_space > 0)
args_size.constant += argvec[count].size.constant;
FUNCTION_ARG_ADVANCE (args_so_far, mode, (tree) 0, 1);
@@ -3038,13 +3021,12 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
/ STACK_BYTES) * STACK_BYTES);
#endif
-#ifdef REG_PARM_STACK_SPACE
args_size.constant = MAX (args_size.constant,
reg_parm_stack_space);
+
#ifndef OUTGOING_REG_PARM_STACK_SPACE
args_size.constant -= reg_parm_stack_space;
#endif
-#endif
if (args_size.constant > current_function_outgoing_args_size)
current_function_outgoing_args_size = args_size.constant;
@@ -3063,7 +3045,8 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
evaluations to avoid this conflicting stack usage. */
needed = args_size.constant;
-#if defined(REG_PARM_STACK_SPACE) && ! defined(OUTGOING_REG_PARM_STACK_SPACE)
+
+#ifndef OUTGOING_REG_PARM_STACK_SPACE
/* Since we will be writing into the entire argument area, the
map must be allocated for its entire size, not just the part that
is the responsibility of the caller. */
@@ -3212,17 +3195,14 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
for (i = lower_bound; i < upper_bound; i++)
if (stack_usage_map[i]
-#ifdef REG_PARM_STACK_SPACE
/* Don't store things in the fixed argument area at this point;
it has already been saved. */
- && i > reg_parm_stack_space
-#endif
- )
+ && i > reg_parm_stack_space)
break;
if (i != upper_bound)
{
- /* We need to make a save area. See what mode we can make it. */
+ /* We need to make a save area. See what mode we can make it. */
enum machine_mode save_mode
= mode_for_size (argvec[argnum].size.constant * BITS_PER_UNIT,
MODE_INT, 1);
@@ -3236,7 +3216,8 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
}
#endif
emit_push_insn (val, mode, NULL_TREE, NULL_RTX, 0, partial, reg, 0,
- argblock, GEN_INT (argvec[argnum].offset.constant));
+ argblock, GEN_INT (argvec[argnum].offset.constant),
+ reg_parm_stack_space);
#ifdef ACCUMULATE_OUTGOING_ARGS
/* Now mark the segment we just used. */
@@ -3491,12 +3472,9 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl,
for (i = lower_bound; i < upper_bound; i++)
if (stack_usage_map[i]
-#ifdef REG_PARM_STACK_SPACE
/* Don't store things in the fixed argument area at this point;
it has already been saved. */
- && i > reg_parm_stack_space
-#endif
- )
+ && i > reg_parm_stack_space)
break;
if (i != upper_bound)
@@ -3642,9 +3620,9 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl,
/* This isn't already where we want it on the stack, so put it there.
This can either be done with push or copy insns. */
- emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX,
- 0, partial, reg, used - size,
- argblock, ARGS_SIZE_RTX (arg->offset));
+ emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX, 0,
+ partial, reg, used - size, argblock,
+ ARGS_SIZE_RTX (arg->offset), reg_parm_stack_space);
}
else
{
@@ -3676,7 +3654,8 @@ store_one_arg (arg, argblock, may_be_alloca, variable_size, fndecl,
emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx,
TYPE_ALIGN (TREE_TYPE (pval)) / BITS_PER_UNIT, partial,
- reg, excess, argblock, ARGS_SIZE_RTX (arg->offset));
+ reg, excess, argblock, ARGS_SIZE_RTX (arg->offset),
+ reg_parm_stack_space);
}
diff --git a/gcc/cccp.c b/gcc/cccp.c
index ac7ae8a99e1..edaf5440b85 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -1,5 +1,5 @@
/* C Compatible Compiler Preprocessor (CCCP)
- Copyright (C) 1986, 87, 89, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1986, 87, 89, 92-97, 1998 Free Software Foundation, Inc.
Written by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -130,6 +130,7 @@ extern char *getenv ();
#define PRINTF_PROTO_1(ARGS) PRINTF_PROTO(ARGS, 1, 2)
#define PRINTF_PROTO_2(ARGS) PRINTF_PROTO(ARGS, 2, 3)
#define PRINTF_PROTO_3(ARGS) PRINTF_PROTO(ARGS, 3, 4)
+#define PRINTF_PROTO_4(ARGS) PRINTF_PROTO(ARGS, 4, 5)
/* VMS-specific definitions */
#ifdef VMS
@@ -412,6 +413,8 @@ static struct file_buf {
char *fname;
/* Filename specified with #line directive. */
char *nominal_fname;
+ /* The length of nominal_fname, which may contain embedded NULs. */
+ size_t nominal_fname_len;
/* Include file description. */
struct include_file *inc;
/* Record where in the search path this file was found.
@@ -650,6 +653,7 @@ struct definition {
U_CHAR *expansion;
int line; /* Line number of definition */
char *file; /* File of definition */
+ size_t file_len; /* Length of file (which can contain NULs) */
char rest_args; /* Nonzero if last arg. absorbs the rest */
struct reflist {
struct reflist *next;
@@ -872,7 +876,8 @@ struct directive {
enum node_type type; /* Code which describes which directive. */
};
-#define IS_INCLUDE_DIRECTIVE_TYPE(t) (T_INCLUDE <= (t) && (t) <= T_IMPORT)
+#define IS_INCLUDE_DIRECTIVE_TYPE(t) \
+((int) T_INCLUDE <= (int) (t) && (int) (t) <= (int) T_IMPORT)
/* These functions are declared to return int instead of void since they
are going to be placed in the table and some old compilers have trouble with
@@ -954,6 +959,7 @@ static char *out_fname;
struct if_stack {
struct if_stack *next; /* for chaining to the next stack frame */
char *fname; /* copied from input when frame is made */
+ size_t fname_len; /* similarly */
int lineno; /* similarly */
int if_succeeded; /* true if a leg of this if-group
has been passed through rescan */
@@ -1053,7 +1059,7 @@ static void validate_else PROTO((U_CHAR *, U_CHAR *));
static U_CHAR *skip_to_end_of_comment PROTO((FILE_BUF *, int *, int));
static U_CHAR *skip_quoted_string PROTO((U_CHAR *, U_CHAR *, int, int *, int *, int *));
-static char *quote_string PROTO((char *, char *));
+static char *quote_string PROTO((char *, char *, size_t));
static U_CHAR *skip_paren_group PROTO((FILE_BUF *));
/* Last arg to output_line_directive. */
@@ -1065,7 +1071,7 @@ static void macroexpand PROTO((HASHNODE *, FILE_BUF *));
struct argdata;
static char *macarg PROTO((struct argdata *, int));
-static U_CHAR *macarg1 PROTO((U_CHAR *, U_CHAR *, int *, int *, int *, int));
+static U_CHAR *macarg1 PROTO((U_CHAR *, U_CHAR *, struct hashnode *, int *, int *, int *, int));
static int discard_comments PROTO((U_CHAR *, int, int));
@@ -1083,7 +1089,7 @@ static void vwarning_with_line PROTO((int, char *, va_list));
static void warning_with_line PRINTF_PROTO_2((int, char *, ...));
void pedwarn PRINTF_PROTO_1((char *, ...));
void pedwarn_with_line PRINTF_PROTO_2((int, char *, ...));
-static void pedwarn_with_file_and_line PRINTF_PROTO_3((char *, int, char *, ...));
+static void pedwarn_with_file_and_line PRINTF_PROTO_4((char *, size_t, int, char *, ...));
static void print_containing_files PROTO((void));
@@ -1726,6 +1732,7 @@ main (argc, argv)
if (in_fname == NULL)
in_fname = "";
fp->nominal_fname = fp->fname = in_fname;
+ fp->nominal_fname_len = strlen (in_fname);
fp->lineno = 0;
/* In C++, wchar_t is a distinct basic type, and we can expect
@@ -2147,6 +2154,7 @@ main (argc, argv)
if (fstat (f, &st) != 0)
pfatal_with_name (in_fname);
fp->nominal_fname = fp->fname = in_fname;
+ fp->nominal_fname_len = strlen (in_fname);
fp->lineno = 1;
fp->system_header_p = 0;
/* JF all this is mine about reading pipes and ttys */
@@ -2822,9 +2830,11 @@ do { ip = &instack[indepth]; \
/* Handle any pending identifier;
but the L in L'...' or L"..." is not an identifier. */
- if (ident_length
- && ! (ident_length == 1 && hash == HASHSTEP (0, 'L')))
- goto specialchar;
+ if (ident_length) {
+ if (! (ident_length == 1 && hash == HASHSTEP (0, 'L')))
+ goto specialchar;
+ ident_length = hash = 0;
+ }
start_line = ip->lineno;
@@ -2843,9 +2853,11 @@ do { ip = &instack[indepth]; \
if (!traditional) {
error_with_line (line_for_error (start_line),
"unterminated string or character constant");
- error_with_line (multiline_string_line,
- "possible real start of unterminated constant");
- multiline_string_line = 0;
+ if (multiline_string_line) {
+ error_with_line (multiline_string_line,
+ "possible real start of unterminated constant");
+ multiline_string_line = 0;
+ }
}
break;
}
@@ -2874,20 +2886,25 @@ do { ip = &instack[indepth]; \
break;
case '\\':
- if (ibp >= limit)
- break;
if (*ibp == '\n') {
- /* Backslash newline is replaced by nothing at all,
- but keep the line counts correct. */
- --obp;
+ /* Backslash newline is replaced by nothing at all, but
+ keep the line counts correct. But if we are reading
+ from a macro, keep the backslash newline, since backslash
+ newlines have already been processed. */
+ if (ip->macro)
+ *obp++ = '\n';
+ else
+ --obp;
++ibp;
++ip->lineno;
} else {
/* ANSI stupidly requires that in \\ the second \
is *not* prevented from combining with a newline. */
- while (*ibp == '\\' && ibp[1] == '\n') {
- ibp += 2;
- ++ip->lineno;
+ if (!ip->macro) {
+ while (*ibp == '\\' && ibp[1] == '\n') {
+ ibp += 2;
+ ++ip->lineno;
+ }
}
*obp++ = *ibp++;
}
@@ -2904,14 +2921,13 @@ do { ip = &instack[indepth]; \
break;
case '/':
+ if (ip->macro != 0)
+ goto randomchar;
if (*ibp == '\\' && ibp[1] == '\n')
newline_fix (ibp);
-
if (*ibp != '*'
&& !(cplusplus_comments && *ibp == '/'))
goto randomchar;
- if (ip->macro != 0)
- goto randomchar;
if (ident_length)
goto specialchar;
@@ -3062,9 +3078,11 @@ do { ip = &instack[indepth]; \
if (ident_length == 0) {
for (;;) {
- while (ibp[0] == '\\' && ibp[1] == '\n') {
- ++ip->lineno;
- ibp += 2;
+ if (!ip->macro) {
+ while (ibp[0] == '\\' && ibp[1] == '\n') {
+ ++ip->lineno;
+ ibp += 2;
+ }
}
c = *ibp++;
if (!is_idchar[c] && c != '.') {
@@ -3075,9 +3093,11 @@ do { ip = &instack[indepth]; \
/* A sign can be part of a preprocessing number
if it follows an `e' or `p'. */
if (c == 'e' || c == 'E' || c == 'p' || c == 'P') {
- while (ibp[0] == '\\' && ibp[1] == '\n') {
- ++ip->lineno;
- ibp += 2;
+ if (!ip->macro) {
+ while (ibp[0] == '\\' && ibp[1] == '\n') {
+ ++ip->lineno;
+ ibp += 2;
+ }
}
if (*ibp == '+' || *ibp == '-') {
*obp++ = *ibp++;
@@ -3337,35 +3357,6 @@ randomchar:
old_iln = ip->lineno;
old_oln = op->lineno;
}
- /* A comment: copy it unchanged or discard it. */
- else if (*ibp == '/' && ibp[1] == '*') {
- if (put_out_comments) {
- *obp++ = '/';
- *obp++ = '*';
- } else if (! traditional) {
- *obp++ = ' ';
- }
- ibp += 2;
- while (ibp + 1 != limit
- && !(ibp[0] == '*' && ibp[1] == '/')) {
- /* We need not worry about newline-marks,
- since they are never found in comments. */
- if (*ibp == '\n') {
- /* Newline in a file. Count it. */
- ++ip->lineno;
- ++op->lineno;
- }
- if (put_out_comments)
- *obp++ = *ibp++;
- else
- ibp++;
- }
- ibp += 2;
- if (put_out_comments) {
- *obp++ = '*';
- *obp++ = '/';
- }
- }
else if (is_space[*ibp]) {
*obp++ = *ibp++;
if (ibp[-1] == '\n') {
@@ -3392,6 +3383,59 @@ randomchar:
}
}
}
+ else if (ip->macro)
+ break;
+ else if (*ibp == '/') {
+ /* If a comment, copy it unchanged or discard it. */
+ if (ibp[1] == '\\' && ibp[2] == '\n')
+ newline_fix (ibp + 1);
+ if (ibp[1] == '*') {
+ if (put_out_comments) {
+ *obp++ = '/';
+ *obp++ = '*';
+ } else if (! traditional) {
+ *obp++ = ' ';
+ }
+ for (ibp += 2; ibp < limit; ibp++) {
+ /* We need not worry about newline-marks,
+ since they are never found in comments. */
+ if (ibp[0] == '*') {
+ if (ibp[1] == '\\' && ibp[2] == '\n')
+ newline_fix (ibp + 1);
+ if (ibp[1] == '/') {
+ ibp += 2;
+ if (put_out_comments) {
+ *obp++ = '*';
+ *obp++ = '/';
+ }
+ break;
+ }
+ }
+ if (*ibp == '\n') {
+ /* Newline in a file. Count it. */
+ ++ip->lineno;
+ ++op->lineno;
+ }
+ if (put_out_comments)
+ *obp++ = *ibp;
+ }
+ } else if (ibp[1] == '/' && cplusplus_comments) {
+ if (put_out_comments) {
+ *obp++ = '/';
+ *obp++ = '/';
+ } else if (! traditional) {
+ *obp++ = ' ';
+ }
+ for (ibp += 2; *ibp != '\n' || ibp[-1] == '\\'; ibp++)
+ if (put_out_comments)
+ *obp++ = *ibp;
+ } else
+ break;
+ }
+ else if (ibp[0] == '\\' && ibp[1] == '\n') {
+ ibp += 2;
+ ++ip->lineno;
+ }
else break;
}
if (*ibp != '(') {
@@ -3552,6 +3596,7 @@ expand_to_temp_buffer (buf, limit, output_marks, assertions)
ip = &instack[indepth];
ip->fname = 0;
ip->nominal_fname = 0;
+ ip->nominal_fname_len = 0;
ip->inc = 0;
ip->system_header_p = 0;
ip->macro = 0;
@@ -3618,8 +3663,11 @@ handle_directive (ip, op)
if (*bp != ' ' && *bp != '\t' && pedantic)
pedwarn ("%s in preprocessing directive", char_name[*bp]);
bp++;
- } else if (*bp == '/' && (bp[1] == '*'
- || (cplusplus_comments && bp[1] == '/'))) {
+ } else if (*bp == '/') {
+ if (bp[1] == '\\' && bp[2] == '\n')
+ newline_fix (bp + 1);
+ if (! (bp[1] == '*' || (cplusplus_comments && bp[1] == '/')))
+ break;
ip->bufp = bp + 2;
skip_to_end_of_comment (ip, &ip->lineno, 0);
bp = ip->bufp;
@@ -3737,8 +3785,25 @@ handle_directive (ip, op)
}
break;
+ case '"':
+ /* "..." is special for #include. */
+ if (IS_INCLUDE_DIRECTIVE_TYPE (kt->type)) {
+ while (bp < limit && *bp != '\n') {
+ if (*bp == '"') {
+ bp++;
+ break;
+ }
+ if (*bp == '\\' && bp[1] == '\n') {
+ ip->lineno++;
+ copy_directive = 1;
+ bp++;
+ }
+ bp++;
+ }
+ break;
+ }
+ /* Fall through. */
case '\'':
- case '\"':
bp = skip_quoted_string (bp - 1, limit, ip->lineno, &ip->lineno, &copy_directive, &unterminated);
/* Don't bother calling the directive if we already got an error
message due to unterminated string. Skip everything and pretend
@@ -3904,13 +3969,7 @@ handle_directive (ip, op)
= skip_quoted_string (xp - 1, bp, ip->lineno,
NULL_PTR, NULL_PTR, NULL_PTR);
while (xp != bp1)
- if (*xp == '\\') {
- if (*++xp != '\n')
- *cp++ = '\\';
- else
- xp++;
- } else
- *cp++ = *xp++;
+ *cp++ = *xp++;
}
break;
@@ -3947,7 +4006,7 @@ handle_directive (ip, op)
directives through. */
if (!no_output && already_output == 0
- && (kt->type == T_DEFINE ? dump_names <= dump_macros
+ && (kt->type == T_DEFINE ? (int) dump_names <= (int) dump_macros
: IS_INCLUDE_DIRECTIVE_TYPE (kt->type) ? dump_includes
: kt->type == T_PRAGMA)) {
int len;
@@ -4047,16 +4106,14 @@ special_symbol (hp, op)
case T_FILE:
case T_BASE_FILE:
{
- char *string;
- if (hp->type == T_FILE)
- string = ip->nominal_fname;
- else
- string = instack[0].nominal_fname;
+ FILE_BUF *p = hp->type == T_FILE ? ip : &instack[0];
+ char *string = p->nominal_fname;
if (string)
{
- buf = (char *) alloca (3 + 4 * strlen (string));
- quote_string (buf, string);
+ size_t string_len = p->nominal_fname_len;
+ buf = (char *) alloca (3 + 4 * string_len);
+ quote_string (buf, string, string_len);
}
else
buf = "\"\"";
@@ -4274,10 +4331,15 @@ get_filename:
FILE_BUF *fp;
/* Copy the operand text, concatenating the strings. */
{
- while (fin != limit) {
- while (fin != limit && *fin != '\"')
- *fend++ = *fin++;
- fin++;
+ for (;;) {
+ for (;;) {
+ if (fin == limit)
+ goto invalid_include_file_name;
+ *fend = *fin++;
+ if (*fend == '"')
+ break;
+ fend++;
+ }
if (fin == limit)
break;
/* If not at the end, there had better be another string. */
@@ -4305,7 +4367,8 @@ get_filename:
/* Found a named file. Figure out dir of the file,
and put it in front of the search list. */
dsp = ((struct file_name_list *)
- alloca (sizeof (struct file_name_list) + strlen (nam)));
+ alloca (sizeof (struct file_name_list)
+ + fp->nominal_fname_len));
strcpy (dsp->fname, nam);
simplify_filename (dsp->fname);
nam = base_name (dsp->fname);
@@ -4360,16 +4423,18 @@ get_filename:
#endif
fail:
- if (retried) {
- error ("`#%s' expects \"FILENAME\" or <FILENAME>", keyword->name);
- return 0;
- } else {
+ if (! retried) {
/* Expand buffer and then remove any newline markers.
We can't just tell expand_to_temp_buffer to omit the markers,
since it would put extra spaces in include file names. */
FILE_BUF trybuf;
U_CHAR *src;
+ int errors_before_expansion = errors;
trybuf = expand_to_temp_buffer (buf, limit, 1, 0);
+ if (errors != errors_before_expansion) {
+ free (trybuf.buf);
+ goto invalid_include_file_name;
+ }
src = trybuf.buf;
buf = (U_CHAR *) alloca (trybuf.bufp - trybuf.buf + 1);
limit = buf;
@@ -4393,9 +4458,13 @@ get_filename:
}
*limit = 0;
free (trybuf.buf);
- retried++;
+ retried = 1;
goto get_filename;
}
+
+ invalid_include_file_name:
+ error ("`#%s' expects \"FILENAME\" or <FILENAME>", keyword->name);
+ return 0;
}
/* For #include_next, skip in the search path
@@ -5049,6 +5118,7 @@ finclude (f, inc, op, system_header_p, dirptr)
fp = &instack[indepth + 1];
bzero ((char *) fp, sizeof (FILE_BUF));
fp->nominal_fname = fp->fname = fname;
+ fp->nominal_fname_len = strlen (fname);
fp->inc = inc;
fp->length = 0;
fp->lineno = 1;
@@ -5436,7 +5506,8 @@ write_output ()
line_directive_len *= 2);
sprintf (line_directive, "\n# %d ", next_string->lineno);
strcpy (quote_string (line_directive + strlen (line_directive),
- (char *) next_string->filename),
+ (char *) next_string->filename,
+ strlen ((char *) next_string->filename)),
"\n");
safe_write (fileno (stdout), line_directive, strlen (line_directive));
safe_write (fileno (stdout),
@@ -5518,6 +5589,7 @@ create_definition (buf, limit, op)
int sym_length; /* and how long it is */
int line = instack[indepth].lineno;
char *file = instack[indepth].nominal_fname;
+ size_t file_len = instack[indepth].nominal_fname_len;
int rest_args = 0;
DEFINITION *defn;
@@ -5667,6 +5739,7 @@ create_definition (buf, limit, op)
defn->line = line;
defn->file = file;
+ defn->file_len = file_len;
/* OP is null if this is a predefinition */
defn->predefined = !op;
@@ -5727,7 +5800,9 @@ do_define (buf, limit, op, keyword)
pedwarn ("`%.*s' redefined", mdef.symlen, mdef.symnam);
if (hp->type == T_MACRO)
- pedwarn_with_file_and_line (hp->value.defn->file, hp->value.defn->line,
+ pedwarn_with_file_and_line (hp->value.defn->file,
+ hp->value.defn->file_len,
+ hp->value.defn->line,
"this is the location of the previous definition");
}
/* Replace the old definition. */
@@ -6640,7 +6715,7 @@ do_line (buf, limit, op, keyword)
break;
case '\"':
- p[-1] = 0;
+ *--p = 0;
goto fname_done;
}
fname_done:
@@ -6686,6 +6761,7 @@ do_line (buf, limit, op, keyword)
if (hp->length == fname_length &&
bcmp (hp->value.cpval, fname, fname_length) == 0) {
ip->nominal_fname = hp->value.cpval;
+ ip->nominal_fname_len = fname_length;
break;
}
if (hp == 0) {
@@ -6694,9 +6770,9 @@ do_line (buf, limit, op, keyword)
hp->next = *hash_bucket;
*hash_bucket = hp;
- hp->length = fname_length;
ip->nominal_fname = hp->value.cpval = ((char *) hp) + sizeof (HASHNODE);
- bcopy (fname, hp->value.cpval, fname_length);
+ ip->nominal_fname_len = hp->length = fname_length;
+ bcopy (fname, hp->value.cpval, fname_length + 1);
}
} else if (*bp) {
error ("invalid format `#line' directive");
@@ -6965,9 +7041,13 @@ do_elif (buf, limit, op, keyword)
if (if_stack->type != T_IF && if_stack->type != T_ELIF) {
error ("`#elif' after `#else'");
fprintf (stderr, " (matches line %d", if_stack->lineno);
- if (if_stack->fname != NULL && ip->fname != NULL
- && strcmp (if_stack->fname, ip->nominal_fname) != 0)
- fprintf (stderr, ", file %s", if_stack->fname);
+ if (! (if_stack->fname_len == ip->nominal_fname_len
+ && !bcmp (if_stack->fname, ip->nominal_fname,
+ if_stack->fname_len))) {
+ fprintf (stderr, ", file ");
+ fwrite (if_stack->fname, sizeof if_stack->fname[0],
+ if_stack->fname_len, stderr);
+ }
fprintf (stderr, ")\n");
}
if_stack->type = T_ELIF;
@@ -7127,6 +7207,7 @@ conditional_skip (ip, skip, type, control_macro, op)
temp = (IF_STACK_FRAME *) xcalloc (1, sizeof (IF_STACK_FRAME));
temp->fname = ip->nominal_fname;
+ temp->fname_len = ip->nominal_fname_len;
temp->lineno = ip->lineno;
temp->next = if_stack;
temp->control_macro = control_macro;
@@ -7163,6 +7244,7 @@ skip_if_group (ip, any, op)
/* Save info about where the group starts. */
U_CHAR *beg_of_group = bp;
int beg_lineno = ip->lineno;
+ int skipping_include_directive = 0;
if (output_conditionals && op != 0) {
char *ptr = "#failed\n";
@@ -7191,22 +7273,49 @@ skip_if_group (ip, any, op)
bp = skip_to_end_of_comment (ip, &ip->lineno, 0);
}
break;
+ case '<':
+ if (skipping_include_directive) {
+ while (bp < endb && *bp != '>' && *bp != '\n') {
+ if (*bp == '\\' && bp[1] == '\n') {
+ ip->lineno++;
+ bp++;
+ }
+ bp++;
+ }
+ }
+ break;
case '\"':
+ if (skipping_include_directive) {
+ while (bp < endb && *bp != '\n') {
+ if (*bp == '"') {
+ bp++;
+ break;
+ }
+ if (*bp == '\\' && bp[1] == '\n') {
+ ip->lineno++;
+ bp++;
+ }
+ bp++;
+ }
+ break;
+ }
+ /* Fall through. */
case '\'':
bp = skip_quoted_string (bp - 1, endb, ip->lineno, &ip->lineno,
NULL_PTR, NULL_PTR);
break;
case '\\':
- /* Char after backslash loses its special meaning. */
- if (bp < endb) {
- if (*bp == '\n')
- ++ip->lineno; /* But do update the line-count. */
+ /* Char after backslash loses its special meaning in some cases. */
+ if (*bp == '\n') {
+ ++ip->lineno;
+ bp++;
+ } else if (traditional && bp < endb)
bp++;
- }
break;
case '\n':
++ip->lineno;
beg_of_line = bp;
+ skipping_include_directive = 0;
break;
case '%':
if (beg_of_line == 0 || traditional)
@@ -7268,6 +7377,8 @@ skip_if_group (ip, any, op)
else if (*bp == '\\' && bp[1] == '\n')
bp += 2;
else if (*bp == '/') {
+ if (bp[1] == '\\' && bp[2] == '\n')
+ newline_fix (bp + 1);
if (bp[1] == '*') {
for (bp += 2; ; bp++) {
if (*bp == '\n')
@@ -7275,6 +7386,8 @@ skip_if_group (ip, any, op)
else if (*bp == '*') {
if (bp[-1] == '/' && warn_comments)
warning ("`/*' within comment");
+ if (bp[1] == '\\' && bp[2] == '\n')
+ newline_fix (bp + 1);
if (bp[1] == '/')
break;
}
@@ -7369,6 +7482,7 @@ skip_if_group (ip, any, op)
if_stack = temp;
temp->lineno = ip->lineno;
temp->fname = ip->nominal_fname;
+ temp->fname_len = ip->nominal_fname_len;
temp->type = kt->type;
break;
case T_ELSE:
@@ -7395,7 +7509,13 @@ skip_if_group (ip, any, op)
free (temp);
break;
- default:
+ case T_INCLUDE:
+ case T_INCLUDE_NEXT:
+ case T_IMPORT:
+ skipping_include_directive = 1;
+ break;
+
+ default:
break;
}
break;
@@ -7464,8 +7584,13 @@ do_else (buf, limit, op, keyword)
if (if_stack->type != T_IF && if_stack->type != T_ELIF) {
error ("`#else' after `#else'");
fprintf (stderr, " (matches line %d", if_stack->lineno);
- if (strcmp (if_stack->fname, ip->nominal_fname) != 0)
- fprintf (stderr, ", file %s", if_stack->fname);
+ if (! (if_stack->fname_len == ip->nominal_fname_len
+ && !bcmp (if_stack->fname, ip->nominal_fname,
+ if_stack->fname_len))) {
+ fprintf (stderr, ", file ");
+ fwrite (if_stack->fname, sizeof if_stack->fname[0],
+ if_stack->fname_len, stderr);
+ }
fprintf (stderr, ")\n");
}
if_stack->type = T_ELSE;
@@ -7719,10 +7844,11 @@ skip_quoted_string (bp, limit, start_line, count_newlines, backslash_newlines_p,
++*count_newlines;
bp += 2;
}
- if (*bp == '\n' && count_newlines) {
+ if (*bp == '\n') {
if (backslash_newlines_p)
*backslash_newlines_p = 1;
- ++*count_newlines;
+ if (count_newlines)
+ ++*count_newlines;
}
bp++;
} else if (c == '\n') {
@@ -7757,16 +7883,19 @@ skip_quoted_string (bp, limit, start_line, count_newlines, backslash_newlines_p,
}
/* Place into DST a quoted string representing the string SRC.
+ SRCLEN is the length of SRC; SRC may contain null bytes.
Return the address of DST's terminating null. */
static char *
-quote_string (dst, src)
+quote_string (dst, src, srclen)
char *dst, *src;
+ size_t srclen;
{
U_CHAR c;
+ char *srclim = src + srclen;
*dst++ = '\"';
- for (;;)
+ while (src != srclim)
switch ((c = *src++))
{
default:
@@ -7784,12 +7913,11 @@ quote_string (dst, src)
*dst++ = '\\';
*dst++ = c;
break;
-
- case '\0':
- *dst++ = '\"';
- *dst = '\0';
- return dst;
}
+
+ *dst++ = '\"';
+ *dst = '\0';
+ return dst;
}
/* Skip across a group of balanced parens, starting from IP->bufp.
@@ -7888,10 +8016,10 @@ output_line_directive (ip, op, conditional, file_change)
ip->bufp++;
}
- line_directive_buf = (char *) alloca (4 * strlen (ip->nominal_fname) + 100);
+ line_directive_buf = (char *) alloca (4 * ip->nominal_fname_len + 100);
sprintf (line_directive_buf, "# %d ", ip->lineno);
line_end = quote_string (line_directive_buf + strlen (line_directive_buf),
- ip->nominal_fname);
+ ip->nominal_fname, ip->nominal_fname_len);
if (file_change != same_file) {
*line_end++ = ' ';
*line_end++ = file_change == enter_file ? '1' : '2';
@@ -8156,29 +8284,30 @@ macroexpand (hp, op)
for (; i < arglen; i++) {
c = arg->raw[i];
- /* Special markers Newline Space
- generate nothing for a stringified argument. */
- if (c == '\n' && arg->raw[i+1] != '\n') {
- i++;
- continue;
- }
+ if (! in_string) {
+ /* Special markers Newline Space
+ generate nothing for a stringified argument. */
+ if (c == '\n' && arg->raw[i+1] != '\n') {
+ i++;
+ continue;
+ }
- /* Internal sequences of whitespace are replaced by one space
- except within an string or char token. */
- if (! in_string
- && (c == '\n' ? arg->raw[i+1] == '\n' : is_space[c])) {
- while (1) {
- /* Note that Newline Space does occur within whitespace
- sequences; consider it part of the sequence. */
- if (c == '\n' && is_space[arg->raw[i+1]])
- i += 2;
- else if (c != '\n' && is_space[c])
- i++;
- else break;
- c = arg->raw[i];
+ /* Internal sequences of whitespace are replaced by one space
+ except within an string or char token. */
+ if (c == '\n' ? arg->raw[i+1] == '\n' : is_space[c]) {
+ while (1) {
+ /* Note that Newline Space does occur within whitespace
+ sequences; consider it part of the sequence. */
+ if (c == '\n' && is_space[arg->raw[i+1]])
+ i += 2;
+ else if (c != '\n' && is_space[c])
+ i++;
+ else break;
+ c = arg->raw[i];
+ }
+ i--;
+ c = ' ';
}
- i--;
- c = ' ';
}
if (escaped)
@@ -8196,12 +8325,10 @@ macroexpand (hp, op)
/* Escape these chars */
if (c == '\"' || (in_string && c == '\\'))
xbuf[totlen++] = '\\';
- if (isprint (c))
- xbuf[totlen++] = c;
- else {
- sprintf ((char *) &xbuf[totlen], "\\%03o", (unsigned int) c);
- totlen += 4;
- }
+ /* We used to output e.g. \008 for control characters here,
+ but this doesn't conform to the C Standard.
+ Just output the characters as-is. */
+ xbuf[totlen++] = c;
}
if (!traditional)
xbuf[totlen++] = '\"'; /* insert ending quote */
@@ -8317,6 +8444,7 @@ macroexpand (hp, op)
ip2->fname = 0;
ip2->nominal_fname = 0;
+ ip2->nominal_fname_len = 0;
ip2->inc = 0;
/* This may not be exactly correct, but will give much better error
messages for nested macro calls than using a line number of zero. */
@@ -8355,7 +8483,7 @@ macarg (argptr, rest_args)
/* Try to parse as much of the argument as exists at this
input stack level. */
- U_CHAR *bp = macarg1 (ip->bufp, ip->buf + ip->length,
+ U_CHAR *bp = macarg1 (ip->bufp, ip->buf + ip->length, ip->macro,
&paren, &newlines, &comments, rest_args);
/* If we find the end of the argument at this level,
@@ -8393,7 +8521,7 @@ macarg (argptr, rest_args)
ip = &instack[--indepth];
newlines = 0;
comments = 0;
- bp = macarg1 (ip->bufp, ip->buf + ip->length, &paren,
+ bp = macarg1 (ip->bufp, ip->buf + ip->length, ip->macro, &paren,
&newlines, &comments, rest_args);
final_start = bufsize;
bufsize += bp - ip->bufp;
@@ -8456,8 +8584,6 @@ macarg (argptr, rest_args)
#endif
if (c == '\"' || c == '\\') /* escape these chars */
totlen++;
- else if (!isprint (c))
- totlen += 3;
}
argptr->stringified_length = totlen;
}
@@ -8465,6 +8591,7 @@ macarg (argptr, rest_args)
}
/* Scan text from START (inclusive) up to LIMIT (exclusive),
+ taken from the expansion of MACRO,
counting parens in *DEPTHPTR,
and return if reach LIMIT
or before a `)' that would make *DEPTHPTR negative
@@ -8478,9 +8605,10 @@ macarg (argptr, rest_args)
Set *COMMENTS to 1 if a comment is seen. */
static U_CHAR *
-macarg1 (start, limit, depthptr, newlines, comments, rest_args)
+macarg1 (start, limit, macro, depthptr, newlines, comments, rest_args)
U_CHAR *start;
register U_CHAR *limit;
+ struct hashnode *macro;
int *depthptr, *newlines, *comments;
int rest_args;
{
@@ -8497,18 +8625,15 @@ macarg1 (start, limit, depthptr, newlines, comments, rest_args)
break;
case '\\':
/* Traditionally, backslash makes following char not special. */
- if (bp + 1 < limit && traditional)
- {
- bp++;
- /* But count source lines anyway. */
- if (*bp == '\n')
- ++*newlines;
- }
+ if (traditional && bp + 1 < limit && bp[1] != '\n')
+ bp++;
break;
case '\n':
++*newlines;
break;
case '/':
+ if (macro)
+ break;
if (bp[1] == '\\' && bp[2] == '\n')
newline_fix (bp + 1);
if (bp[1] == '*') {
@@ -8549,8 +8674,11 @@ macarg1 (start, limit, depthptr, newlines, comments, rest_args)
bp++;
if (*bp == '\n')
++*newlines;
- while (*bp == '\\' && bp[1] == '\n') {
- bp += 2;
+ if (!macro) {
+ while (*bp == '\\' && bp[1] == '\n') {
+ bp += 2;
+ ++*newlines;
+ }
}
} else if (*bp == '\n') {
++*newlines;
@@ -8646,16 +8774,16 @@ discard_comments (start, length, newlines)
obp--;
else
obp[-1] = ' ';
- ibp++;
- while (ibp + 1 < limit) {
- if (ibp[0] == '*'
- && ibp[1] == '\\' && ibp[2] == '\n')
- newline_fix (ibp + 1);
- if (ibp[0] == '*' && ibp[1] == '/')
- break;
- ibp++;
+ while (++ibp < limit) {
+ if (ibp[0] == '*') {
+ if (ibp[1] == '\\' && ibp[2] == '\n')
+ newline_fix (ibp + 1);
+ if (ibp[1] == '/') {
+ ibp += 2;
+ break;
+ }
+ }
}
- ibp += 2;
break;
case '\'':
@@ -8671,10 +8799,16 @@ discard_comments (start, length, newlines)
break;
if (c == '\n' && quotec == '\'')
break;
- if (c == '\\' && ibp < limit) {
- while (*ibp == '\\' && ibp[1] == '\n')
- ibp += 2;
- *obp++ = *ibp++;
+ if (c == '\\') {
+ if (ibp < limit && *ibp == '\n') {
+ ibp++;
+ obp--;
+ } else {
+ while (*ibp == '\\' && ibp[1] == '\n')
+ ibp += 2;
+ if (ibp < limit)
+ *obp++ = *ibp++;
+ }
}
}
}
@@ -8725,7 +8859,7 @@ change_newlines (start, length)
int quotec = c;
while (ibp < limit) {
*obp++ = c = *ibp++;
- if (c == quotec)
+ if (c == quotec && ibp[-2] != '\\')
break;
if (c == '\n' && quotec == '\'')
break;
@@ -8799,8 +8933,11 @@ verror (msg, args)
break;
}
- if (ip != NULL)
- fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno);
+ if (ip != NULL) {
+ fwrite (ip->nominal_fname, sizeof ip->nominal_fname[0],
+ ip->nominal_fname_len, stderr);
+ fprintf (stderr, ":%d: ", ip->lineno);
+ }
vfprintf (stderr, msg, args);
fprintf (stderr, "\n");
errors++;
@@ -8812,6 +8949,7 @@ static void
error_from_errno (name)
char *name;
{
+ int e = errno;
int i;
FILE_BUF *ip = NULL;
@@ -8823,10 +8961,13 @@ error_from_errno (name)
break;
}
- if (ip != NULL)
- fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno);
+ if (ip != NULL) {
+ fwrite (ip->nominal_fname, sizeof ip->nominal_fname[0],
+ ip->nominal_fname_len, stderr);
+ fprintf (stderr, ":%d: ", ip->lineno);
+ }
- fprintf (stderr, "%s: %s\n", name, my_strerror (errno));
+ fprintf (stderr, "%s: %s\n", name, my_strerror (e));
errors++;
}
@@ -8866,8 +9007,11 @@ vwarning (msg, args)
break;
}
- if (ip != NULL)
- fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno);
+ if (ip != NULL) {
+ fwrite (ip->nominal_fname, sizeof ip->nominal_fname[0],
+ ip->nominal_fname_len, stderr);
+ fprintf (stderr, ":%d: ", ip->lineno);
+ }
fprintf (stderr, "warning: ");
vfprintf (stderr, msg, args);
fprintf (stderr, "\n");
@@ -8906,8 +9050,11 @@ verror_with_line (line, msg, args)
break;
}
- if (ip != NULL)
- fprintf (stderr, "%s:%d: ", ip->nominal_fname, line);
+ if (ip != NULL) {
+ fwrite (ip->nominal_fname, sizeof ip->nominal_fname[0],
+ ip->nominal_fname_len, stderr);
+ fprintf (stderr, ":%d: ", line);
+ }
vfprintf (stderr, msg, args);
fprintf (stderr, "\n");
errors++;
@@ -8952,8 +9099,11 @@ vwarning_with_line (line, msg, args)
break;
}
- if (ip != NULL)
- fprintf (stderr, line ? "%s:%d: " : "%s: ", ip->nominal_fname, line);
+ if (ip != NULL) {
+ fwrite (ip->nominal_fname, sizeof ip->nominal_fname[0],
+ ip->nominal_fname_len, stderr);
+ fprintf (stderr, line ? ":%d: " : ": ", line);
+ }
fprintf (stderr, "warning: ");
vfprintf (stderr, msg, args);
fprintf (stderr, "\n");
@@ -8999,10 +9149,12 @@ pedwarn_with_line (line, PRINTF_ALIST (msg))
static void
#if defined (__STDC__) && defined (HAVE_VPRINTF)
-pedwarn_with_file_and_line (char *file, int line, PRINTF_ALIST (msg))
+pedwarn_with_file_and_line (char *file, size_t file_len, int line,
+ PRINTF_ALIST (msg))
#else
-pedwarn_with_file_and_line (file, line, PRINTF_ALIST (msg))
+pedwarn_with_file_and_line (file, file_len, line, PRINTF_ALIST (msg))
char *file;
+ size_t file_len;
int line;
PRINTF_DCL (msg)
#endif
@@ -9011,8 +9163,10 @@ pedwarn_with_file_and_line (file, line, PRINTF_ALIST (msg))
if (!pedantic_errors && inhibit_warnings)
return;
- if (file != NULL)
- fprintf (stderr, "%s:%d: ", file, line);
+ if (file) {
+ fwrite (file, sizeof file[0], file_len, stderr);
+ fprintf (stderr, ":%d: ", line);
+ }
if (pedantic_errors)
errors++;
if (!pedantic_errors)
@@ -9059,7 +9213,10 @@ print_containing_files ()
fprintf (stderr, ",\n ");
}
- fprintf (stderr, " from %s:%d", ip->nominal_fname, ip->lineno);
+ fprintf (stderr, " from ");
+ fwrite (ip->nominal_fname, sizeof ip->nominal_fname[0],
+ ip->nominal_fname_len, stderr);
+ fprintf (stderr, ":%d", ip->lineno);
}
if (! first)
fprintf (stderr, ":\n");
@@ -9660,10 +9817,7 @@ make_definition (str, op)
if (unterminated)
return;
while (p != p1)
- if (*p == '\\' && p[1] == '\n')
- p += 2;
- else
- *q++ = *p++;
+ *q++ = *p++;
} else if (*p == '\\' && p[1] == '\n')
p += 2;
/* Change newline chars into newline-markers. */
@@ -9681,6 +9835,7 @@ make_definition (str, op)
ip = &instack[++indepth];
ip->nominal_fname = ip->fname = "*Initialization*";
+ ip->nominal_fname_len = strlen (ip->nominal_fname);
ip->buf = ip->bufp = buf;
ip->length = strlen ((char *) buf);
@@ -9710,6 +9865,7 @@ make_undef (str, op)
ip = &instack[++indepth];
ip->nominal_fname = ip->fname = "*undef*";
+ ip->nominal_fname_len = strlen (ip->nominal_fname);
ip->buf = ip->bufp = (U_CHAR *) str;
ip->length = strlen (str);
@@ -9766,6 +9922,7 @@ make_assertion (option, str)
ip = &instack[++indepth];
ip->nominal_fname = ip->fname = "*Initialization*";
+ ip->nominal_fname_len = strlen (ip->nominal_fname);
ip->buf = ip->bufp = buf;
ip->length = strlen ((char *) buf);
@@ -10048,8 +10205,7 @@ static void
perror_with_name (name)
char *name;
{
- fprintf (stderr, "%s: ", progname);
- fprintf (stderr, "%s: %s\n", name, my_strerror (errno));
+ fprintf (stderr, "%s: %s: %s\n", progname, name, my_strerror (errno));
errors++;
}
diff --git a/gcc/cexp.c b/gcc/cexp.c
index 9f44faae3ca..de021e09559 100644
--- a/gcc/cexp.c
+++ b/gcc/cexp.c
@@ -433,7 +433,7 @@ static const short yycheck[] = { 4,
26, 27, 23, 24, 25, 26, 27, 0, 9
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/share/bison.simple"
+#line 3 "/usr/cygnus/latest-940103/share/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -626,7 +626,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif
#endif
-#line 196 "/usr/share/bison.simple"
+#line 196 "/usr/cygnus/latest-940103/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -1207,7 +1207,7 @@ case 40:
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 498 "/usr/share/bison.simple"
+#line 498 "/usr/cygnus/latest-940103/share/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
diff --git a/gcc/combine.c b/gcc/combine.c
index 4bef563f1b8..8a03a3ded67 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -7072,8 +7072,8 @@ make_field_assignment (x)
pos = get_pos_from_mask ((~ c1) & GET_MODE_MASK (GET_MODE (dest)), &len);
if (pos < 0 || pos + len > GET_MODE_BITSIZE (GET_MODE (dest))
- || (GET_MODE_BITSIZE (GET_MODE (other)) <= HOST_BITS_PER_WIDE_INT
- && (c1 & nonzero_bits (other, GET_MODE (other))) != 0))
+ || GET_MODE_BITSIZE (GET_MODE (dest)) > HOST_BITS_PER_WIDE_INT
+ || (c1 & nonzero_bits (other, GET_MODE (dest))) != 0)
return x;
assign = make_extraction (VOIDmode, dest, pos, NULL_RTX, len, 1, 1, 0);
@@ -9324,6 +9324,13 @@ gen_binary (code, mode, op0, op1)
&& GET_RTX_CLASS (GET_CODE (op1)) != 'o')))
return gen_rtx_combine (code, mode, op1, op0);
+ /* If we are turning off bits already known off in OP0, we need not do
+ an AND. */
+ else if (code == AND && GET_CODE (op1) == CONST_INT
+ && GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT
+ && (nonzero_bits (op0, mode) & ~ INTVAL (op1)) == 0)
+ return op0;
+
return gen_rtx_combine (code, mode, op0, op1);
}
@@ -10127,6 +10134,32 @@ simplify_comparison (code, pop0, pop1)
op0 = gen_lowpart_for_combine (tmode, XEXP (op0, 0));
continue;
}
+
+ /* If this is (and:M1 (subreg:M2 X 0) (const_int C1)) where C1 fits
+ in both M1 and M2 and the SUBREG is either paradoxical or
+ represents the low part, permute the SUBREG and the AND and
+ try again. */
+ if (GET_CODE (XEXP (op0, 0)) == SUBREG
+ && ((mode_width
+ >= GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (XEXP (op0, 0)))))
+ || subreg_lowpart_p (XEXP (op0, 0)))
+ && GET_CODE (XEXP (op0, 1)) == CONST_INT
+ && mode_width <= HOST_BITS_PER_WIDE_INT
+ && (GET_MODE_BITSIZE (GET_MODE (SUBREG_REG (XEXP (op0, 0))))
+ <= HOST_BITS_PER_WIDE_INT)
+ && (INTVAL (XEXP (op0, 1)) & ~ mask) == 0
+ && 0 == (~ GET_MODE_MASK (GET_MODE (SUBREG_REG (XEXP (op0, 0))))
+ & INTVAL (XEXP (op0, 1))))
+
+ {
+ op0
+ = gen_lowpart_for_combine
+ (mode,
+ gen_binary (AND, GET_MODE (SUBREG_REG (XEXP (op0, 0))),
+ SUBREG_REG (XEXP (op0, 0)), XEXP (op0, 1)));
+ continue;
+ }
+
break;
case ASHIFT:
@@ -11459,15 +11492,21 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
if (reg_set_p (XEXP (note, 0), PATTERN (tem)))
{
rtx set = single_set (tem);
+ rtx inner_dest = 0;
+
+ if (set != 0)
+ for (inner_dest = SET_DEST (set);
+ GET_CODE (inner_dest) == STRICT_LOW_PART
+ || GET_CODE (inner_dest) == SUBREG
+ || GET_CODE (inner_dest) == ZERO_EXTRACT;
+ inner_dest = XEXP (inner_dest, 0))
+ ;
/* Verify that it was the set, and not a clobber that
modified the register. */
if (set != 0 && ! side_effects_p (SET_SRC (set))
- && (rtx_equal_p (XEXP (note, 0), SET_DEST (set))
- || (GET_CODE (SET_DEST (set)) == SUBREG
- && rtx_equal_p (XEXP (note, 0),
- XEXP (SET_DEST (set), 0)))))
+ && rtx_equal_p (XEXP (note, 0), inner_dest))
{
/* Move the notes and links of TEM elsewhere.
This might delete other dead insns recursively.
@@ -11484,6 +11523,20 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
NOTE_LINE_NUMBER (tem) = NOTE_INSN_DELETED;
NOTE_SOURCE_FILE (tem) = 0;
}
+ /* If the register is both set and used here, put the
+ REG_DEAD note here, but place a REG_UNUSED note
+ here too unless there already is one. */
+ else if (reg_referenced_p (XEXP (note, 0),
+ PATTERN (tem)))
+ {
+ place = tem;
+
+ if (! find_regno_note (tem, REG_UNUSED,
+ REGNO (XEXP (note, 0))))
+ REG_NOTES (tem)
+ = gen_rtx (EXPR_LIST, REG_UNUSED, XEXP (note, 0),
+ REG_NOTES (tem));
+ }
else
{
PUT_REG_NOTE_KIND (note, REG_UNUSED);
@@ -11540,13 +11593,12 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
}
/* If the register is set or already dead at PLACE, we needn't do
- anything with this note if it is still a REG_DEAD note.
+ anything with this note if it is still a REG_DEAD note.
+ We can here if it is set at all, not if is it totally replace,
+ which is what `dead_or_set_p' checks, so also check for it being
+ set partially. */
+
- Note that we cannot use just `dead_or_set_p' here since we can
- convert an assignment to a register into a bit-field assignment.
- Therefore, we must also omit the note if the register is the
- target of a bitfield assignment. */
-
if (place && REG_NOTE_KIND (note) == REG_DEAD)
{
int regno = REGNO (XEXP (note, 0));
diff --git a/gcc/config.in b/gcc/config.in
index 6ca695d2bc1..8dc98e6e15f 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -41,7 +41,7 @@
/* Whether atol must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_ATOL
-/* Whether sbrk must be declared even if <unistd.h> is included. */
+/* Whether sbrk must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_SBRK
/* Whether abort must be declared even if <stdlib.h> is included. */
@@ -101,6 +101,9 @@
/* Define if you have the strtoul function. */
#undef HAVE_STRTOUL
+/* Define if you have the sysconf function. */
+#undef HAVE_SYSCONF
+
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
diff --git a/gcc/config.sub b/gcc/config.sub
index dd52e87aee8..b491c9f5ce0 100755
--- a/gcc/config.sub
+++ b/gcc/config.sub
@@ -1,6 +1,6 @@
#! /bin/sh
# Configuration validation subroutine script, version 1.1.
-# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
@@ -165,7 +165,7 @@ case $basic_machine in
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
- i[3456]86)
+ i[34567]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
@@ -174,7 +174,7 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
- vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
+ vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
@@ -368,19 +368,19 @@ case $basic_machine in
os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i[3456]86v32)
+ i[34567]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
- i[3456]86v4*)
+ i[34567]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
- i[3456]86v)
+ i[34567]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
- i[3456]86sol2)
+ i[34567]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
@@ -487,25 +487,23 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pentium | p5)
- basic_machine=i586-intel
+ pentium | p5 | k5 | nexen)
+ basic_machine=i586-pc
;;
- pentiumpro | p6)
- basic_machine=i686-intel
+ pentiumpro | p6 | k6 | 6x86)
+ basic_machine=i686-pc
;;
- pentium-* | p5-*)
+ pentiumii | pentium2)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | nexen-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumpro-* | p6-*)
+ pentiumpro-* | p6-* | k6-* | 6x86-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- k5)
- # We don't have specific support for AMD's K5 yet, so just call it a Pentium
- basic_machine=i586-amd
- ;;
- nexen)
- # We don't have specific support for Nexgen yet, so just call it a Pentium
- basic_machine=i586-nexgen
+ pentiumii-* | pentium2-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
diff --git a/gcc/config/alpha/elf.h b/gcc/config/alpha/elf.h
index 04bd3350be9..d28847c44d9 100644
--- a/gcc/config/alpha/elf.h
+++ b/gcc/config/alpha/elf.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for DEC Alpha w/ELF.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Richard Henderson (rth@tamu.edu).
This file is part of GNU CC.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 6a0f593b9f3..e8d5f8453f4 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -1,5 +1,5 @@
/* Output routines for GCC for ARM/RISCiX.
- Copyright (C) 1991, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
and Martin Simmons (@harleqn.co.uk).
More major hacks by Richard Earnshaw (rwe11@cl.cam.ac.uk)
@@ -3271,6 +3271,16 @@ arm_reload_in_hi (operands)
rtx base = find_replacement (&XEXP (operands[1], 0));
emit_insn (gen_zero_extendqisi2 (operands[2], gen_rtx (MEM, QImode, base)));
+ /* Handle the case where the address is too complex to be offset by 1. */
+ if (GET_CODE (base) == MINUS
+ || (GET_CODE (base) == PLUS && GET_CODE (XEXP (base, 1)) != CONST_INT))
+ {
+ rtx base_plus = gen_rtx (REG, SImode, REGNO (operands[0]));
+
+ emit_insn (gen_rtx (SET, VOIDmode, base_plus, base));
+ base = base_plus;
+ }
+
emit_insn (gen_zero_extendqisi2 (gen_rtx (SUBREG, SImode, operands[0], 0),
gen_rtx (MEM, QImode,
plus_constant (base, 1))));
@@ -3524,6 +3534,7 @@ find_barrier (from, max_count)
{
int count = 0;
rtx found_barrier = 0;
+ rtx last = from;
while (from && count < max_count)
{
@@ -3537,11 +3548,12 @@ find_barrier (from, max_count)
&& CONSTANT_POOL_ADDRESS_P (SET_SRC (PATTERN (from))))
{
rtx src = SET_SRC (PATTERN (from));
- count += 2;
+ count += 8;
}
else
count += get_attr_length (from);
+ last = from;
from = NEXT_INSN (from);
}
@@ -3552,7 +3564,7 @@ find_barrier (from, max_count)
rtx label = gen_label_rtx ();
if (from)
- from = PREV_INSN (from);
+ from = PREV_INSN (last);
else
from = get_last_insn ();
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index ec70983d6ee..ee4a9086ed7 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -1,5 +1,5 @@
;;- Machine description for Advanced RISC Machines' ARM for GNU compiler
-;; Copyright (C) 1991, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 93-97, 1998 Free Software Foundation, Inc.
;; Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
;; and Martin Simmons (@harleqn.co.uk).
;; More major hacks by Richard Earnshaw (rwe11@cl.cam.ac.uk)
diff --git a/gcc/config/arm/t-semi b/gcc/config/arm/t-semi
index 74fdef49920..61c1c37c529 100644
--- a/gcc/config/arm/t-semi
+++ b/gcc/config/arm/t-semi
@@ -1,6 +1,6 @@
# Just for these, we omit the frame pointer since it makes such a big
# difference. It is then pointless adding debugging.
-LIBGCC2_CFLAGS=-O2 -fomit-frame-pointer $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g0
+LIBGCC2_CFLAGS=-O2 -fomit-frame-pointer $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g0
# Don't build enquire
ENQUIRE=
diff --git a/gcc/config/i386/cygwin32.h b/gcc/config/i386/cygwin32.h
index 536b91c6ca0..15963bdb299 100644
--- a/gcc/config/i386/cygwin32.h
+++ b/gcc/config/i386/cygwin32.h
@@ -21,7 +21,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-
#define YES_UNDERSCORES
#define DBX_DEBUGGING_INFO
@@ -150,10 +149,9 @@ do \
while (0)
#endif
-/* This macro gets just the user-specified name
- out of the string in a SYMBOL_REF. Discard
- trailing @[NUM] encoded by ENCODE_SECTION_INFO.
- Do we need the stripping of leading '*'? */
+/* This macro gets just the user-specified name out of the string in a
+ SYMBOL_REF. Discard trailing @[NUM] encoded by ENCODE_SECTION_INFO. */
+
#undef STRIP_NAME_ENCODING
#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
do { \
@@ -172,7 +170,6 @@ do { \
(VAR) = _name; \
} while (0)
-
/* Emit code to check the stack when allocating more that 4000
bytes in one go. */
diff --git a/gcc/config/i386/gnu.h b/gcc/config/i386/gnu.h
index bdce3ed000b..971a5f880c2 100644
--- a/gcc/config/i386/gnu.h
+++ b/gcc/config/i386/gnu.h
@@ -4,7 +4,8 @@
#include <i386/linux.h>
#undef CPP_PREDEFINES
-#define CPP_PREDEFINES GNU_CPP_PREDEFINES("i386")
+#define CPP_PREDEFINES "-Di386 -Acpu(i386) -Amachine(i386) \
+-Dunix -Asystem(unix) -DMACH -Asystem(mach) -D__GNU__ -Asystem(gnu)"
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (i386 GNU)");
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index b910e77fd65..adab26d549c 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler for Intel X86
(386, 486, Pentium).
- Copyright (C) 1988, 92, 94-97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1988, 92, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -436,12 +436,6 @@ extern int ix86_arch;
/* Required on the 386 since it doesn't have bitfield insns. */
#define PCC_BITFIELD_TYPE_MATTERS 1
-/* An integer expression for the size in bits of the largest integer
- machine mode that should actually be used. All integer machine modes of
- this size or smaller can be used for structures and unions with the
- appropriate sizes. */
-#define MAX_FIXED_MODE_SIZE 32
-
/* Maximum power of 2 that code can be aligned to. */
#define MAX_CODE_ALIGN 6 /* 64 byte alignment */
@@ -1870,6 +1864,7 @@ while (0)
#define CONST_COSTS(RTX,CODE,OUTER_CODE) \
case CONST_INT: \
+ return (unsigned) INTVAL (RTX) < 256 ? 0 : 1; \
case CONST: \
case LABEL_REF: \
case SYMBOL_REF: \
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 9de8a93e1fb..ea6a9c8a487 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -1,5 +1,5 @@
; GCC machine description for Intel X86.
-;; Copyright (C) 1988, 94-97, 1998 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
;; Mostly by William Schelter.
;; This file is part of GNU CC.
@@ -7378,11 +7378,10 @@ byte_xor_operation:
(define_expand "movsicc"
[(match_dup 4)
- (parallel [(set (match_operand 0 "register_operand" "")
+ (set (match_operand 0 "register_operand" "")
(if_then_else:SI (match_operand 1 "comparison_operator" "")
- (match_operand:SI 2 "general_operand" "")
- (match_operand:SI 3 "general_operand" "")))
- (clobber (match_scratch:SI 4 "=&r"))])]
+ (match_operand:SI 2 "nonimmediate_operand" "")
+ (match_operand:SI 3 "nonimmediate_operand" "")))]
"TARGET_CMOVE"
"
{
@@ -7391,11 +7390,10 @@ byte_xor_operation:
(define_expand "movhicc"
[(match_dup 4)
- (parallel [(set (match_operand 0 "register_operand" "")
+ (set (match_operand 0 "register_operand" "")
(if_then_else:HI (match_operand 1 "comparison_operator" "")
- (match_operand:HI 2 "general_operand" "")
- (match_operand:HI 3 "general_operand" "")))
- (clobber (match_scratch:SI 4 "=&r"))])]
+ (match_operand:HI 2 "nonimmediate_operand" "")
+ (match_operand:HI 3 "nonimmediate_operand" "")))]
"TARGET_CMOVE"
"
{
@@ -7403,146 +7401,80 @@ byte_xor_operation:
}")
(define_insn "movsicc_1"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,&r,rm")
+ [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,&r")
(if_then_else:SI (match_operator 1 "comparison_operator"
- [(cc0) (const_int 0)])
- (match_operand:SI 2 "general_operand" "rm,0,rm,g")
- (match_operand:SI 3 "general_operand" "0,rm,rm,g")))
- (clobber (match_scratch:SI 4 "X,X,X,=&r"))]
+ [(cc0) (const_int 0)])
+ (match_operand:SI 2 "nonimmediate_operand" "rm,0,rm")
+ (match_operand:SI 3 "nonimmediate_operand" "0,rm,rm")))]
"TARGET_CMOVE"
"*
{
- if (which_alternative == 0)
+ switch (which_alternative)
{
+ case 0:
/* r <- cond ? arg : r */
output_asm_insn (AS2 (cmov%C1,%2,%0), operands);
- }
- else if (which_alternative == 1)
- {
+ break;
+
+ case 1:
/* r <- cond ? r : arg */
output_asm_insn (AS2 (cmov%c1,%3,%0), operands);
- }
- else if (which_alternative == 2)
- {
+ break;
+
+ case 2:
/* r <- cond ? arg1 : arg2 */
output_asm_insn (AS2 (cmov%C1,%2,%0), operands);
output_asm_insn (AS2 (cmov%c1,%3,%0), operands);
+ break;
}
- else if (which_alternative == 3)
- {
- /* r <- cond ? arg1 : arg2 */
- rtx xops[3];
-
- xops[0] = gen_label_rtx ();
- xops[1] = gen_label_rtx ();
- xops[2] = operands[1];
-
- output_asm_insn (\"j%c2 %l0\", xops);
- if (! rtx_equal_p (operands[0], operands[2]))
- if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[2]) == MEM)
- {
- output_asm_insn (AS2 (mov%z2,%2,%4), operands);
- output_asm_insn (AS2 (mov%z2,%4,%0), operands);
- }
- else
- output_asm_insn (AS2 (mov%z0,%2,%0), operands);
- output_asm_insn (\"jmp %l1\", xops);
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (xops[0]));
- if (! rtx_equal_p (operands[0], operands[3]))
- {
- if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[3]) == MEM)
- {
- output_asm_insn (AS2 (mov%z3,%3,%4), operands);
- output_asm_insn (AS2 (mov%z3,%4,%0), operands);
- }
- else
- output_asm_insn (AS2 (mov%z0,%3,%0), operands);
- }
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (xops[1]));
- }
+
RET;
}")
(define_insn "movhicc_1"
- [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,&r,rm")
+ [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,&r")
(if_then_else:HI (match_operator 1 "comparison_operator"
- [(cc0) (const_int 0)])
- (match_operand:HI 2 "general_operand" "rm,0,rm,g")
- (match_operand:HI 3 "general_operand" "0,rm,rm,g")))
- (clobber (match_scratch:SI 4 "X,X,X,=&r"))]
+ [(cc0) (const_int 0)])
+ (match_operand:HI 2 "nonimmediate_operand" "rm,0,rm")
+ (match_operand:HI 3 "nonimmediate_operand" "0,rm,rm")))]
"TARGET_CMOVE"
"*
{
- if (which_alternative == 0)
+ switch (which_alternative)
{
+ case 0:
/* r <- cond ? arg : r */
output_asm_insn (AS2 (cmov%C1,%2,%0), operands);
- }
- else if (which_alternative == 1)
- {
+ break;
+
+ case 1:
/* r <- cond ? r : arg */
output_asm_insn (AS2 (cmov%c1,%3,%0), operands);
- }
- else if (which_alternative == 2)
- {
+ break;
+
+ case 2:
/* r <- cond ? arg1 : arg2 */
output_asm_insn (AS2 (cmov%C1,%2,%0), operands);
output_asm_insn (AS2 (cmov%c1,%3,%0), operands);
+ break;
}
- else if (which_alternative == 3)
- {
- /* r <- cond ? arg1 : arg2 */
- rtx xops[3];
-
- xops[0] = gen_label_rtx ();
- xops[1] = gen_label_rtx ();
- xops[2] = operands[1];
-
- output_asm_insn (\"j%c2 %l0\", xops);
- if (! rtx_equal_p (operands[0], operands[2]))
- if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[2]) == MEM)
- {
- output_asm_insn (AS2 (mov%z2,%2,%4), operands);
- output_asm_insn (AS2 (mov%z2,%4,%0), operands);
- }
- else
- output_asm_insn (AS2 (mov%z0,%2,%0), operands);
- output_asm_insn (\"jmp %l1\", xops);
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (xops[0]));
- if (! rtx_equal_p (operands[0], operands[3]))
- {
- if (GET_CODE (operands[0]) == MEM && GET_CODE (operands[3]) == MEM)
- {
- output_asm_insn (AS2 (mov%z3,%3,%4), operands);
- output_asm_insn (AS2 (mov%z3,%4,%0), operands);
- }
- else
- output_asm_insn (AS2 (mov%z0,%3,%0), operands);
- }
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (xops[1]));
- }
+
RET;
}")
+;; We need to disable the FP forms of these since they do not support
+;; memory as written, but no input reloads are permitted for insns
+;; that use cc0. Also, movxfcc is not present.
+
(define_expand "movsfcc"
[(match_dup 4)
- (set (match_operand 0 "general_operand" "")
+ (set (match_operand 0 "register_operand" "")
(if_then_else:SF (match_operand 1 "comparison_operator" "")
- (match_operand:SF 2 "general_operand" "")
- (match_operand:SF 3 "general_operand" "")))]
- "TARGET_CMOVE"
+ (match_operand:SF 2 "register_operand" "")
+ (match_operand:SF 3 "register_operand" "")))]
+ "0 && TARGET_CMOVE"
"
{
- int i;
-
- for (i = 2; i <= 3; i++)
- {
- if ((reload_in_progress | reload_completed) == 0
- && CONSTANT_P (operands[i]))
- {
- operands[i] = force_const_mem (SFmode, operands[i]);
- }
- }
operands[4] = i386_compare_gen (i386_compare_op0, i386_compare_op1);
}")
@@ -7550,211 +7482,85 @@ byte_xor_operation:
[(match_dup 4)
(set (match_operand 0 "register_operand" "t")
(if_then_else:DF (match_operand 1 "comparison_operator" "")
- (match_operand:DF 2 "general_operand" "")
- (match_operand:DF 3 "general_operand" "")))]
- "TARGET_CMOVE"
+ (match_operand:DF 2 "register_operand" "")
+ (match_operand:DF 3 "register_operand" "")))]
+ "0 && TARGET_CMOVE"
"
{
- int i;
-
- for (i = 2; i <= 3; i++)
- {
- if ((reload_in_progress | reload_completed) == 0
- && CONSTANT_P (operands[i]))
- {
- operands[i] = force_const_mem (DFmode, operands[i]);
- }
- }
operands[4] = i386_compare_gen (i386_compare_op0, i386_compare_op1);
}")
(define_expand "movxfcc"
[(match_dup 4)
- (set (match_operand 0 "register_operand" "t")
+ (set (match_operand 0 "register_operand" "")
(if_then_else:XF (match_operand 1 "comparison_operator" "")
- (match_operand:XF 2 "general_operand" "")
- (match_operand:XF 3 "general_operand" "")))]
- "TARGET_CMOVE"
+ (match_operand:XF 2 "register_operand" "")
+ (match_operand:XF 3 "register_operand" "")))]
+ "0 && TARGET_CMOVE"
"
{
- int i;
-
- for (i = 2; i <= 3; i++)
- {
- if ((reload_in_progress | reload_completed) == 0
- && CONSTANT_P (operands[i]))
- {
- operands[i] = force_const_mem (XFmode, operands[i]);
- }
- }
operands[4] = i386_compare_gen (i386_compare_op0, i386_compare_op1);
}")
(define_insn "movsfcc_1"
- [(set (match_operand:SF 0 "general_operand" "=f,=f,=f,=f")
+ [(set (match_operand:SF 0 "general_operand" "=f,f,&f")
(if_then_else:SF (match_operator 1 "comparison_operator"
- [(cc0) (const_int 0)])
- (match_operand:SF 2 "general_operand" "0,f,f,fFm")
- (match_operand:SF 3 "general_operand" "f,0,f,fFm")))]
+ [(cc0) (const_int 0)])
+ (match_operand:SF 2 "register_operand" "0,f,f")
+ (match_operand:SF 3 "register_operand" "f,0,f")))]
"TARGET_CMOVE"
"*
{
- if (which_alternative == 0)
+ switch (which_alternative)
{
+ case 0:
/* r <- cond ? arg : r */
output_asm_insn (AS2 (fcmov%f1,%3,%0), operands);
- }
- else if (which_alternative == 1)
- {
+ break;
+
+ case 1:
/* r <- cond ? r : arg */
output_asm_insn (AS2 (fcmov%F1,%2,%0), operands);
- }
- else if (which_alternative == 2)
- {
+ break;
+
+ case 2:
/* r <- cond ? r : arg */
output_asm_insn (AS2 (fcmov%F1,%2,%0), operands);
output_asm_insn (AS2 (fcmov%f1,%3,%0), operands);
+ break;
}
- else if (which_alternative == 3)
- {
- /* r <- cond ? arg1 : arg2 */
- rtx xops[3];
-
- xops[0] = gen_label_rtx ();
- xops[1] = gen_label_rtx ();
- xops[2] = operands[1];
- output_asm_insn (\"j%f2 %l0\", xops);
- if (STACK_REG_P (operands[2]) || GET_CODE (operands[2]) == MEM)
- output_asm_insn (AS1 (fld%z2,%y2), operands);
- else
- {
- operands[2] = XEXP (operands[2], 0);
- output_asm_insn (AS1 (fld%z2,%y2), operands);
- }
- output_asm_insn (\"jmp %l1\", xops);
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (xops[0]));
- if (STACK_REG_P (operands[3]) || GET_CODE (operands[0]) == MEM)
- output_asm_insn (AS1 (fld%z3,%y3), operands);
- else
- {
- operands[3] = XEXP (operands[3], 0);
- output_asm_insn (AS1 (fld%z3,%y3), operands);
- }
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (xops[1]));
-}
RET;
}")
(define_insn "movdfcc_1"
- [(set (match_operand:DF 0 "general_operand" "=f,=f,=f,=f")
+ [(set (match_operand:DF 0 "general_operand" "=f,f,&f")
(if_then_else:DF (match_operator 1 "comparison_operator"
- [(cc0) (const_int 0)])
- (match_operand:DF 2 "general_operand" "0,f,f,fFm")
- (match_operand:DF 3 "general_operand" "f,0,f,fFm")))]
+ [(cc0) (const_int 0)])
+ (match_operand:DF 2 "register_operand" "0,f,f")
+ (match_operand:DF 3 "register_operand" "f,0,f")))]
"TARGET_CMOVE"
"*
{
- if (which_alternative == 0)
+ switch (which_alternative)
{
+ case 0:
/* r <- cond ? arg : r */
output_asm_insn (AS2 (fcmov%f1,%3,%0), operands);
- }
- else if (which_alternative == 1)
- {
- /* r <- cond ? r : arg */
- output_asm_insn (AS2 (fcmov%F1,%2,%0), operands);
- }
- else if (which_alternative == 2)
- {
- /* r <- cond ? r : arg */
- output_asm_insn (AS2 (fcmov%F1,%2,%0), operands);
- output_asm_insn (AS2 (fcmov%f1,%3,%0), operands);
- }
- else if (which_alternative == 3)
- {
- /* r <- cond ? arg1 : arg2 */
- rtx xops[3];
-
- xops[0] = gen_label_rtx ();
- xops[1] = gen_label_rtx ();
- xops[2] = operands[1];
-
- output_asm_insn (\"j%f2 %l0\", xops);
- if (STACK_REG_P (operands[2]) || GET_CODE (operands[2]) == MEM)
- output_asm_insn (AS1 (fld%z2,%y2), operands);
- else
- {
- operands[2] = XEXP (operands[2], 0);
- output_asm_insn (AS1 (fld%z2,%y2), operands);
- }
- output_asm_insn (\"jmp %l1\", xops);
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (xops[0]));
- if (STACK_REG_P (operands[3]) || GET_CODE (operands[0]) == MEM)
- output_asm_insn (AS1 (fld%z3,%y3), operands);
- else
- {
- operands[3] = XEXP (operands[3], 0);
- output_asm_insn (AS1 (fld%z3,%y3), operands);
- }
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (xops[1]));
-}
- RET;
-}")
+ break;
-(define_insn "movxfcc_1"
- [(set (match_operand:XF 0 "register_operand" "=f,=f,=f,=f")
- (if_then_else:XF (match_operator 1 "comparison_operator"
- [(cc0) (const_int 0)])
- (match_operand:XF 2 "register_operand" "0,f,f,fFm")
- (match_operand:XF 3 "register_operand" "f,0,f,fFm")))]
- "TARGET_CMOVE"
- "*
-{
- if (which_alternative == 0)
- {
- /* r <- cond ? arg : r */
- output_asm_insn (AS2 (fcmov%f1,%3,%0), operands);
- }
- else if (which_alternative == 1)
- {
+ case 1:
/* r <- cond ? r : arg */
output_asm_insn (AS2 (fcmov%F1,%2,%0), operands);
- }
- else if (which_alternative == 2)
- {
+ break;
+
+ case 2:
/* r <- cond ? r : arg */
output_asm_insn (AS2 (fcmov%F1,%2,%0), operands);
output_asm_insn (AS2 (fcmov%f1,%3,%0), operands);
+ break;
}
- else if (which_alternative == 3)
- {
- /* r <- cond ? arg1 : arg2 */
- rtx xops[3];
-
- xops[0] = gen_label_rtx ();
- xops[1] = gen_label_rtx ();
- xops[2] = operands[1];
- output_asm_insn (\"j%f2 %l0\", xops);
- if (STACK_REG_P (operands[2]) || GET_CODE (operands[2]) == MEM)
- output_asm_insn (AS1 (fld%z2,%y2), operands);
- else
- {
- operands[2] = XEXP (operands[2], 0);
- output_asm_insn (AS1 (fld%z2,%y2), operands);
- }
- output_asm_insn (\"jmp %l1\", xops);
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (xops[0]));
- if (STACK_REG_P (operands[3]) || GET_CODE (operands[0]) == MEM)
- output_asm_insn (AS1 (fld%z3,%y3), operands);
- else
- {
- operands[3] = XEXP (operands[3], 0);
- output_asm_insn (AS1 (fld%z3,%y3), operands);
- }
- ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, \"L\", CODE_LABEL_NUMBER (xops[1]));
-}
RET;
}")
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index a1eb464b3b1..7c7a3bbc6fa 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -2,7 +2,7 @@
hosting on Windows32, using GNU tools and the Windows32 API Library,
as distinct from winnt.h, which is used to build GCC for use with a
windows style library and tool set and uses the Microsoft tools.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -47,7 +47,7 @@ Boston, MA 02111-1307, USA. */
/* Include in the mingw32 libraries with libgcc */
#undef LIBGCC_SPEC
-#define LIBGCC_SPEC "-lmingw32 -lgcc -lmoldname -lcrtdll"
+#define LIBGCC_SPEC "-lmingw32 -lgcc -lmoldname -lmsvcrt"
/* Specify a different entry point when linking a DLL */
#undef LINK_SPEC
@@ -55,9 +55,9 @@ Boston, MA 02111-1307, USA. */
"%{mwindows:--subsystem windows} %{mdll:--dll -e _DllMainCRTStartup@12}"
#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%{mdll:dllcrt1%O%s} %{!mdll:crt1%O%s}"
+#define STARTFILE_SPEC "%{mdll:dllcrt2%O%s} %{!mdll:crt2%O%s}"
-#define MATH_LIBRARY "-lcrtdll"
+#define MATH_LIBRARY "-lmsvcrt"
/* Output STRING, a string representing a filename, to FILE. We canonicalize
it to be in MS-DOS format. */
diff --git a/gcc/config/i386/xm-go32.h b/gcc/config/i386/xm-go32.h
index e83bb4b12bb..3cfd6b39992 100644
--- a/gcc/config/i386/xm-go32.h
+++ b/gcc/config/i386/xm-go32.h
@@ -1,5 +1,5 @@
/* Configuration for GNU C-compiler for Intel 80386 running GO32.
- Copyright (C) 1988, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1996, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -33,4 +33,3 @@ Boston, MA 02111-1307, USA. */
#define DIR_SEPARATOR '\\'
#define NO_SYS_SIGLIST 1
-
diff --git a/gcc/config/i386/xm-mingw32.h b/gcc/config/i386/xm-mingw32.h
index 47356f568d1..38c9b6d06b0 100644
--- a/gcc/config/i386/xm-mingw32.h
+++ b/gcc/config/i386/xm-mingw32.h
@@ -1,6 +1,6 @@
/* Configuration for GNU C-compiler for hosting on Windows32.
using GNU tools and the Windows32 API Library.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -34,7 +34,6 @@ Boston, MA 02111-1307, USA. */
#endif
#define NO_SYS_SIGLIST 1
-#define link(a,b) -1
#define environ _environ
/* Even though we support "/", allow "\" since everybody tests both. */
diff --git a/gcc/config/i386/xm-sco5.h b/gcc/config/i386/xm-sco5.h
index 99bc53c2bc5..6b22b1d549f 100644
--- a/gcc/config/i386/xm-sco5.h
+++ b/gcc/config/i386/xm-sco5.h
@@ -1,18 +1,7 @@
/* Configuration for GCC for Intel i386 running SCO. */
-#include "i386/xm-sysv3.h"
-
/* Big buffers improve performance. */
#define IO_BUFFER_SIZE (0x8000 - 1024)
-/* OpenServer provides no sys_siglist,
- but does offer the same data under another name. */
-#define sys_siglist _sys_siglist
-#undef SYS_SIGLIST_DECLARED
-#define SYS_SIGLIST_DECLARED
-/* If not compiled with GNU C, use the portable alloca. */
-#ifndef __GNUC__
-#define USE_C_ALLOCA
-#endif
diff --git a/gcc/config/i386/xm-sysv4.h b/gcc/config/i386/xm-sysv4.h
index 49d52b4e7f3..1365064a5a6 100644
--- a/gcc/config/i386/xm-sysv4.h
+++ b/gcc/config/i386/xm-sysv4.h
@@ -1,16 +1,5 @@
/* Configuration for GCC for Intel i386 running System V Release 4. */
-#include "i386/xm-i386.h"
-#include "xm-svr4.h"
-
-/* If not compiled with GNU C, use the portable alloca. */
-#ifndef __GNUC__
-#define USE_C_ALLOCA
-#endif
#ifdef __HIGHC__
#include <alloca.h> /* for MetaWare High-C on NCR System 3000 */
#endif
-
-/* Univel, at least, has a small ARG_MAX. Defining this is harmless
- except for causing extra stat calls in the driver program. */
-#define SMALL_ARG_MAX
diff --git a/gcc/config/i860/i860.c b/gcc/config/i860/i860.c
index cedbeb1885a..31dd07e07a4 100644
--- a/gcc/config/i860/i860.c
+++ b/gcc/config/i860/i860.c
@@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for Intel 860
- Copyright (C) 1989, 1991, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1991, 1997, 1998 Free Software Foundation, Inc.
Derived from sparc.c.
Written by Richard Stallman (rms@ai.mit.edu).
@@ -1435,7 +1435,8 @@ output_delayed_branch (template, operands, insn)
/* Now recognize the insn which we put in its delay slot.
We must do this after outputting the branch insn,
since operands may just be a pointer to `recog_operand'. */
- INSN_CODE (delay_insn) = insn_code_number = recog (pat, delay_insn);
+ INSN_CODE (delay_insn) = insn_code_number
+ = recog (pat, delay_insn, NULL_PTR);
if (insn_code_number == -1)
abort ();
@@ -1489,7 +1490,7 @@ output_delay_insn (delay_insn)
}
#ifdef REGISTER_CONSTRAINTS
- if (! constrain_operands (insn_code_number))
+ if (! constrain_operands (insn_code_number, 1))
abort ();
#endif
diff --git a/gcc/config/i960/i960.c b/gcc/config/i960/i960.c
index 32903afbaf0..11b2a21f9be 100644
--- a/gcc/config/i960/i960.c
+++ b/gcc/config/i960/i960.c
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on intel 80960.
- Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Steven McGeady, Intel Corp.
Additional Work by Glenn Colon-Bonet, Jonathan Shapiro, Andy Wilson
Converted to GCC 2.0 by Jim Wilson and Michael Tiemann, Cygnus Support.
@@ -589,8 +589,13 @@ emit_move_sequence (operands, mode)
adding 4 to the memory address may not yield a valid insn. */
/* ??? We don't always need the scratch, but that would complicate things.
Maybe later. */
+ /* ??? We must also handle stores to pseudos here, because the pseudo may be
+ replaced with a MEM later. This would be cleaner if we didn't have
+ a separate pattern for unaligned DImode/TImode stores. */
if (GET_MODE_SIZE (mode) > UNITS_PER_WORD
- && GET_CODE (operands[0]) == MEM
+ && (GET_CODE (operands[0]) == MEM
+ || (GET_CODE (operands[0]) == REG
+ && REGNO (operands[0]) >= FIRST_PSEUDO_REGISTER))
&& GET_CODE (operands[1]) == REG
&& REGNO (operands[1]) < FIRST_PSEUDO_REGISTER
&& ! HARD_REGNO_MODE_OK (REGNO (operands[1]), mode))
diff --git a/gcc/config/i960/i960.md b/gcc/config/i960/i960.md
index 55b6ebf511a..43cb7ba5bee 100644
--- a/gcc/config/i960/i960.md
+++ b/gcc/config/i960/i960.md
@@ -1,5 +1,5 @@
;;- Machine description for Intel 80960 chip for GNU C compiler
-;; Copyright (C) 1992, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1995, 1998 Free Software Foundation, Inc.
;; Contributed by Steven McGeady, Intel Corp.
;; Additional work by Glenn Colon-Bonet, Jonathan Shapiro, Andy Wilson
;; Converted to GCC 2.0 by Jim Wilson and Michael Tiemann, Cygnus Support.
@@ -867,17 +867,20 @@
[(set_attr "type" "move,move,load,load,store")])
(define_insn "*store_unaligned_di_reg"
- [(set (match_operand:DI 0 "memory_operand" "=m")
- (match_operand:DI 1 "register_operand" "d"))
- (clobber (match_scratch:SI 2 "=&d"))]
+ [(set (match_operand:DI 0 "general_operand" "=d,m")
+ (match_operand:DI 1 "register_operand" "d,d"))
+ (clobber (match_scratch:SI 2 "=X,&d"))]
""
"*
{
+ if (which_alternative == 0)
+ return i960_output_move_double (operands[0], operands[1]);
+
operands[3] = gen_rtx (MEM, word_mode, operands[2]);
operands[4] = adj_offsettable_operand (operands[3], UNITS_PER_WORD);
return \"lda %0,%2\;st %1,%3\;st %D1,%4\";
}"
- [(set_attr "type" "store")])
+ [(set_attr "type" "move,store")])
(define_expand "movti"
[(set (match_operand:TI 0 "general_operand" "")
@@ -946,19 +949,22 @@
[(set_attr "type" "move,move,load,load,store")])
(define_insn "*store_unaligned_ti_reg"
- [(set (match_operand:TI 0 "memory_operand" "=m")
- (match_operand:TI 1 "register_operand" "d"))
- (clobber (match_scratch:SI 2 "=&d"))]
+ [(set (match_operand:TI 0 "general_operand" "=d,m")
+ (match_operand:TI 1 "register_operand" "d,d"))
+ (clobber (match_scratch:SI 2 "=X,&d"))]
""
"*
{
+ if (which_alternative == 0)
+ return i960_output_move_quad (operands[0], operands[1]);
+
operands[3] = gen_rtx (MEM, word_mode, operands[2]);
operands[4] = adj_offsettable_operand (operands[3], UNITS_PER_WORD);
operands[5] = adj_offsettable_operand (operands[4], UNITS_PER_WORD);
operands[6] = adj_offsettable_operand (operands[5], UNITS_PER_WORD);
return \"lda %0,%2\;st %1,%3\;st %D1,%4\;st %E1,%5\;st %F1,%6\";
}"
- [(set_attr "type" "store")])
+ [(set_attr "type" "move,store")])
(define_expand "store_multiple"
[(set (match_operand:SI 0 "" "") ;;- dest
@@ -2209,7 +2215,13 @@
[(set (pc) (match_operand:SI 0 "register_operand" "d"))
(use (label_ref (match_operand 1 "" "")))]
""
- "bx (%0)"
+ "*
+{
+ if (flag_pic)
+ return \"bx %l1(%0)\";
+ else
+ return \"bx (%0)\";
+}"
[(set_attr "type" "branch")])
;;- jump to subroutine
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index 64dc91a67de..b619d01cdf5 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -1,7 +1,7 @@
/* Definitions for Linux-based GNU systems with ELF format
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Eric Youngdale.
- Modified for stabs-in-ELF by H.J. Lu.
+ Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
This file is part of GNU CC.
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index 5a9e0c0006c..90a65849c59 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Sun 68000/68020 version.
- Copyright (C) 1987, 88, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 93-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/gcc/config/m68k/m68k.md b/gcc/config/m68k/m68k.md
index 3a9f3310eec..881b2886c86 100644
--- a/gcc/config/m68k/m68k.md
+++ b/gcc/config/m68k/m68k.md
@@ -1,5 +1,5 @@
;;- Machine description for GNU compiler, Motorola 68000 Version
-;; Copyright (C) 1987, 88, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 88, 93-97, 1998 Free Software Foundation, Inc.
;; This file is part of GNU CC.
diff --git a/gcc/config/m68k/xm-mot3300.h b/gcc/config/m68k/xm-mot3300.h
index c61bd293e25..ea3b5589dbe 100644
--- a/gcc/config/m68k/xm-mot3300.h
+++ b/gcc/config/m68k/xm-mot3300.h
@@ -22,13 +22,8 @@ Boston, MA 02111-1307, USA. */
#define USG 1
-#include "m68k/xm-m68k.h"
-
-#define NO_SYS_SIGLIST
-
/* do not use alloca from -lPW with cc, because function epilogues use %sp */
#ifndef __GNUC__
-#define USE_C_ALLOCA
#ifdef __STDC__
extern void *alloca ();
#else
diff --git a/gcc/config/m88k/xm-sysv3.h b/gcc/config/m88k/xm-sysv3.h
index 3e8ab39dc95..84110d7474d 100644
--- a/gcc/config/m88k/xm-sysv3.h
+++ b/gcc/config/m88k/xm-sysv3.h
@@ -19,8 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "m88k/xm-m88k.h"
-
#define R_OK 4
#define W_OK 2
#define X_OK 1
diff --git a/gcc/config/mips/abi64.h b/gcc/config/mips/abi64.h
index 4f6fccfafb9..188939497ce 100644
--- a/gcc/config/mips/abi64.h
+++ b/gcc/config/mips/abi64.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. 64 bit ABI support.
- Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -63,16 +63,10 @@ Boston, MA 02111-1307, USA. */
#define MAX_ARGS_IN_REGISTERS (mips_abi == ABI_32 ? 4 : 8)
#undef REG_PARM_STACK_SPACE
-#if 0
-/* ??? This is necessary in order for the ABI_32 support to work. However,
- expr.c (emit_push_insn) has no support for a REG_PARM_STACK_SPACE
- definition that returns zero. That would have to be fixed before this
- can be enabled. */
#define REG_PARM_STACK_SPACE(FNDECL) \
(mips_abi == ABI_32 \
? (MAX_ARGS_IN_REGISTERS*UNITS_PER_WORD) - FIRST_PARM_OFFSET (FNDECL) \
: 0)
-#endif
#define FUNCTION_ARG_PADDING(MODE, TYPE) \
(! BYTES_BIG_ENDIAN \
@@ -184,8 +178,7 @@ extern struct rtx_def *mips_function_value ();
} \
}
-/* ??? Should disable for mips_abi == ABI32. */
-#define STRICT_ARGUMENT_NAMING
+#define STRICT_ARGUMENT_NAMING (mips_abi != ABI_32)
/* A C expression that indicates when an argument must be passed by
reference. If nonzero for an argument, a copy of that argument is
diff --git a/gcc/config/mips/ecoff.h b/gcc/config/mips/ecoff.h
index 813f148009e..8da0ae6351e 100644
--- a/gcc/config/mips/ecoff.h
+++ b/gcc/config/mips/ecoff.h
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler. MIPS version with
GOFAST floating point library.
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/gcc/config/mips/elf.h b/gcc/config/mips/elf.h
index 334484169ae..334bd5b8363 100644
--- a/gcc/config/mips/elf.h
+++ b/gcc/config/mips/elf.h
@@ -29,6 +29,8 @@ Boston, MA 02111-1307, USA. */
#endif
/* Mostly like ECOFF. */
+#include "mips/mips.h"
+#include "gofast.h"
#include "mips/ecoff.h"
/* We need to use .esize and .etype instead of .size and .type to
diff --git a/gcc/config/mips/iris5.h b/gcc/config/mips/iris5.h
index af6868d90ec..f81fe1c0fda 100644
--- a/gcc/config/mips/iris5.h
+++ b/gcc/config/mips/iris5.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Iris version 5.
- Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1996, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -23,6 +23,8 @@ Boston, MA 02111-1307, USA. */
#endif
#define ABICALLS_ASM_OP ".option pic2"
+#include "mips/iris3.h"
+#include "mips/mips.h"
#include "mips/iris4.h"
/* Irix 5 doesn't use COFF, so disable special COFF handling in collect2.c. */
diff --git a/gcc/config/mips/iris5gas.h b/gcc/config/mips/iris5gas.h
index adc90e83223..f1c2c483f88 100644
--- a/gcc/config/mips/iris5gas.h
+++ b/gcc/config/mips/iris5gas.h
@@ -1,7 +1,5 @@
/* Definitions of target machine for GNU compiler. Irix version 5 with gas. */
-#include "mips/iris5.h"
-
/* Enable debugging. */
#define DBX_DEBUGGING_INFO
#define SDB_DEBUGGING_INFO
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 82b0ce5316c..e2f03f92c96 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -5036,7 +5036,7 @@ mips_output_external (file, decl, name)
#ifdef ASM_OUTPUT_UNDEF_FUNCTION
if (TREE_CODE (decl) == FUNCTION_DECL
/* ??? Don't include alloca, since gcc will always expand it
- inline. If we don't do this, libg++ fails to build. */
+ inline. If we don't do this, the C++ library fails to build. */
&& strcmp (name, "alloca")
/* ??? Don't include __builtin_next_arg, because then gcc will not
bootstrap under Irix 5.1. */
@@ -6616,7 +6616,8 @@ mips_expand_prologue ()
}
if (TARGET_ABICALLS && mips_abi != ABI_32)
- emit_insn (gen_loadgp (XEXP (DECL_RTL (current_function_decl), 0)));
+ emit_insn (gen_loadgp (XEXP (DECL_RTL (current_function_decl), 0),
+ gen_rtx (REG, DImode, 25)));
}
/* If we are profiling, make sure no instructions are scheduled before
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 114ad10bd37..e6a750f812e 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -5639,10 +5639,11 @@ move\\t%0,%z4\\n\\
(define_insn "loadgp"
[(set (reg:DI 28)
- (unspec_volatile:DI [(match_operand:DI 0 "address_operand" "")] 2))
+ (unspec_volatile:DI [(match_operand:DI 0 "address_operand" "")
+ (match_operand:DI 1 "register_operand" "")] 2))
(clobber (reg:DI 1))]
""
- "%[lui\\t$1,%%hi(%%neg(%%gp_rel(%a0)))\\n\\taddiu\\t$1,$1,%%lo(%%neg(%%gp_rel(%a0)))\\n\\tdaddu\\t$gp,$1,$25%]"
+ "%[lui\\t$1,%%hi(%%neg(%%gp_rel(%a0)))\\n\\taddiu\\t$1,$1,%%lo(%%neg(%%gp_rel(%a0)))\\n\\tdaddu\\t$gp,$1,%1%]"
[(set_attr "type" "move")
(set_attr "mode" "DI")
(set_attr "length" "3")])
diff --git a/gcc/config/mips/rtems64.h b/gcc/config/mips/rtems64.h
index a321d0df576..42c7a65cb40 100644
--- a/gcc/config/mips/rtems64.h
+++ b/gcc/config/mips/rtems64.h
@@ -1,5 +1,5 @@
/* Definitions for rtems targeting a MIPS ORION using ecoff.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Joel Sherrill (joel@OARcorp.com).
This file is part of GNU CC.
@@ -19,8 +19,6 @@ along with GNU CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "mips/elforion.h"
-
/* Specify predefined symbols in preprocessor. */
#undef CPP_PREDEFINES
diff --git a/gcc/config/msdos/top.sed b/gcc/config/msdos/top.sed
index f123c9ab90a..64027f55355 100644
--- a/gcc/config/msdos/top.sed
+++ b/gcc/config/msdos/top.sed
@@ -19,9 +19,9 @@ host_xm_file=config/i386/xm-dos.h
/^xmake_file=/ d
/^tmake_file=/ d
/^version=/ c\
-version=2.8.0
+version=2.8.1
/^mainversion=/ c\
-mainversion=2.8.0
+mainversion=2.8.1
s/CC = cc/CC = gcc/
s/:\$/: \$/g
s/^ \ *\.\// /
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index db906be0fa3..d98662ad750 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on IBM RS/6000.
- Copyright (C) 1991, 93-7, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index e50bf5d948f..7ac3cf60c9c 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for IBM RS/6000.
- Copyright (C) 1992, 93-7, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
@@ -2054,8 +2054,8 @@ typedef struct rs6000_args
/* Define the magic numbers that we recognize as COFF.
AIX 4.3 adds U803XTOCMAGIC (0757) for 64-bit executables, but collect2.c
- does not include files in the correct order to conditionally define
- the symbolic name in this macro. */
+ does not include these files in the right order to conditionally define
+ the value in the macro. */
#define MY_ISCOFF(magic) \
((magic) == U802WRMAGIC || (magic) == U802ROMAGIC \
diff --git a/gcc/config/rs6000/x-aix31 b/gcc/config/rs6000/x-aix31
index e5bbc191b99..9f171fc9926 100644
--- a/gcc/config/rs6000/x-aix31
+++ b/gcc/config/rs6000/x-aix31
@@ -1,5 +1,4 @@
# configuration for IBM rs6000 running aix
-
# Show we need to use the C version of ALLOCA
ALLOCA=alloca.o
diff --git a/gcc/config/rs6000/xm-cygwin32.h b/gcc/config/rs6000/xm-cygwin32.h
index 677254b371c..ca548319c10 100644
--- a/gcc/config/rs6000/xm-cygwin32.h
+++ b/gcc/config/rs6000/xm-cygwin32.h
@@ -1,26 +1 @@
-/* Configuration for GNU C-compiler for hosting on Windows NT.
- using a unix style C library.
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-
-#define NO_STAB_H
-
-#include "rs6000/xm-rs6000.h"
-
#define EXECUTABLE_SUFFIX ".exe"
diff --git a/gcc/config/rs6000/xm-sysv4.h b/gcc/config/rs6000/xm-sysv4.h
index 7184d8892db..cf56eb4ad33 100644
--- a/gcc/config/rs6000/xm-sysv4.h
+++ b/gcc/config/rs6000/xm-sysv4.h
@@ -1,5 +1,5 @@
/* Configuration for GNU C-compiler for PowerPC running System V.4.
- Copyright (C) 1995 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1998 Free Software Foundation, Inc.
Cloned from sparc/xm-sysv4.h by Michael Meissner (meissner@cygnus.com).
@@ -48,8 +48,6 @@ Boston, MA 02111-1307, USA. */
#ifdef __linux__
#include "xm-linux.h"
-#else
-#include "xm-svr4.h"
#endif
/* if not compiled with GNU C, use the C alloca and use only int bitfields. */
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
index f9f869320c0..a5807ecc632 100644
--- a/gcc/config/sparc/linux.h
+++ b/gcc/config/sparc/linux.h
@@ -1,5 +1,5 @@
/* Definitions for SPARC running Linux-based GNU systems with ELF.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Eddie C. Dost (ecd@skynet.be)
This file is part of GNU CC.
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
index aba0417c850..b676e72a50f 100644
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -1,5 +1,5 @@
/* Definitions for 64-bit SPARC running Linux-based GNU systems with ELF.
- Copyright 1996, 1997 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by David S. Miller (davem@caip.rutgers.edu)
This file is part of GNU CC.
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 327ee2730b5..36ccb15095f 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -1505,6 +1505,10 @@ pic_setup_code ()
start_sequence ();
+ /* If -O0, show the PIC register remains live before this. */
+ if (obey_regdecls)
+ emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
+
l1 = gen_label_rtx ();
pic_pc_rtx = gen_rtx (CONST, Pmode,
@@ -5124,14 +5128,14 @@ sparc_type_code (type)
register tree type;
{
register unsigned long qualifiers = 0;
- register unsigned shift = 6;
+ register unsigned shift;
/* Only the first 30 bits of the qualifier are valid. We must refrain from
setting more, since some assemblers will give an error for this. Also,
we must be careful to avoid shifts of 32 bits or more to avoid getting
unpredictable results. */
- for (;;)
+ for (shift = 6; shift < 30; shift += 2, type = TREE_TYPE (type))
{
switch (TREE_CODE (type))
{
@@ -5139,27 +5143,18 @@ sparc_type_code (type)
return qualifiers;
case ARRAY_TYPE:
- if (shift < 30)
- qualifiers |= (3 << shift);
- shift += 2;
- type = TREE_TYPE (type);
+ qualifiers |= (3 << shift);
break;
case FUNCTION_TYPE:
case METHOD_TYPE:
- if (shift < 30)
- qualifiers |= (2 << shift);
- shift += 2;
- type = TREE_TYPE (type);
+ qualifiers |= (2 << shift);
break;
case POINTER_TYPE:
case REFERENCE_TYPE:
case OFFSET_TYPE:
- if (shift < 30)
- qualifiers |= (1 << shift);
- shift += 2;
- type = TREE_TYPE (type);
+ qualifiers |= (1 << shift);
break;
case RECORD_TYPE:
@@ -5179,10 +5174,7 @@ sparc_type_code (type)
/* If this is a range type, consider it to be the underlying
type. */
if (TREE_TYPE (type) != 0)
- {
- type = TREE_TYPE (type);
- break;
- }
+ break;
/* Carefully distinguish all the standard types of C,
without messing up if the language is not C. We do this by
@@ -5208,6 +5200,11 @@ sparc_type_code (type)
return (qualifiers | (TREE_UNSIGNED (type) ? 15 : 5));
case REAL_TYPE:
+ /* If this is a range type, consider it to be the underlying
+ type. */
+ if (TREE_TYPE (type) != 0)
+ break;
+
/* Carefully distinguish all the standard types of C,
without messing up if the language is not C. */
@@ -5234,6 +5231,8 @@ sparc_type_code (type)
abort (); /* Not a type! */
}
}
+
+ return qualifiers;
}
/* Nested function support. */
diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h
index ce57192135b..1659e68b22e 100644
--- a/gcc/config/sparc/sparc.h
+++ b/gcc/config/sparc/sparc.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for Sun SPARC.
- Copyright (C) 1987, 88, 89, 92, 94-7, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92, 94-97, 1998 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com).
64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
at Cygnus Support.
@@ -2162,9 +2162,8 @@ extern struct rtx_def *sparc_builtin_saveregs ();
is defined, then all arguments are treated as named. Otherwise, all named
arguments except the last are treated as named.
For the v9 we want NAMED to mean what it says it means. */
-/* ??? This needn't be set for v8, but I don't want to make this runtime
- selectable if I don't have to. */
-#define STRICT_ARGUMENT_NAMING
+
+#define STRICT_ARGUMENT_NAMING TARGET_V9
/* Generate RTL to flush the register windows so as to make arbitrary frames
available. */
diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h
index e8a9a603b6f..3a1a82d9fe9 100644
--- a/gcc/config/sparc/sysv4.h
+++ b/gcc/config/sparc/sysv4.h
@@ -1,7 +1,6 @@
/* Target definitions for GNU compiler for Sparc running System V.4
- Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
-
- Written by Ron Guilmette (rfg@netcom.com).
+ Copyright (C) 1991, 92, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Contributed by Ron Guilmette (rfg@monkeys.com).
This file is part of GNU CC.
@@ -136,10 +135,7 @@ do { ASM_OUTPUT_ALIGN ((FILE), Pmode == SImode ? 2 : 3); \
f0-f31 32-63 40-71
*/
-#define DBX_REGISTER_NUMBER(REGNO) \
- (((REGNO) < 32) ? (REGNO) \
- : ((REGNO) < 63) ? ((REGNO) + 8) \
- : (abort (), 0))
+#define DBX_REGISTER_NUMBER(REGNO) ((REGNO) < 32 ? (REGNO) : (REGNO) + 8)
/* A set of symbol definitions for assembly pseudo-ops which will
get us switched to various sections of interest. These are used
diff --git a/gcc/config/sparc/xm-linux.h b/gcc/config/sparc/xm-linux.h
index f68f5715662..691c7d16784 100644
--- a/gcc/config/sparc/xm-linux.h
+++ b/gcc/config/sparc/xm-linux.h
@@ -24,5 +24,3 @@ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#include <string.h>
#endif
-
-#include <xm-linux.h>
diff --git a/gcc/config/sparc/xm-sol2.h b/gcc/config/sparc/xm-sol2.h
index a799f12b946..5613b086b57 100644
--- a/gcc/config/sparc/xm-sol2.h
+++ b/gcc/config/sparc/xm-sol2.h
@@ -1,5 +1,3 @@
-#include "sparc/xm-sysv4.h"
-
/* If not compiled with GNU C, include the system's <alloca.h> header. */
#ifndef __GNUC__
#include <alloca.h>
diff --git a/gcc/config/t-svr4 b/gcc/config/t-svr4
index 7d34cc82995..e6be0c3b0c8 100644
--- a/gcc/config/t-svr4
+++ b/gcc/config/t-svr4
@@ -2,8 +2,7 @@
# crtstuff.c. This is only really needed when we are going to use gcc/g++
# to produce a shared library, but since we don't know ahead of time when
# we will be doing that, we just always use -fPIC when compiling the
-# routines in crtstuff.c.
-# Similarly for TARGET_LIBGCC2_CFLAGS
+# routines in crtstuff.c. Likewise for libgcc2.c.
CRTSTUFF_T_CFLAGS = -fPIC
TARGET_LIBGCC2_CFLAGS = -fPIC
diff --git a/gcc/config/vax/vax.md b/gcc/config/vax/vax.md
index fce9a8e0bff..25ca7bcce5d 100644
--- a/gcc/config/vax/vax.md
+++ b/gcc/config/vax/vax.md
@@ -1,5 +1,5 @@
;;- Machine description for GNU compiler, Vax Version
-;; Copyright (C) 1987, 88, 91, 94, 95, 1996 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 88, 91, 94-96, 1998 Free Software Foundation, Inc.
;; This file is part of GNU CC.
@@ -1837,9 +1837,12 @@
;; Note that operand 1 is total size of args, in bytes,
;; and what the call insn wants is the number of words.
+;; It is used in the call instruction as a byte, but in the addl2 as
+;; a word. Since the only time we actually use it in the call instruction
+;; is when it is a constant, SImode (for addl2) is the proper mode.
(define_insn "call_pop"
[(call (match_operand:QI 0 "memory_operand" "m")
- (match_operand:QI 1 "general_operand" "g"))
+ (match_operand:SI 1 "general_operand" "g"))
(set (reg:SI 14) (plus:SI (reg:SI 14)
(match_operand:SI 3 "immediate_operand" "i")))]
""
@@ -1854,7 +1857,7 @@
(define_insn "call_value_pop"
[(set (match_operand 0 "" "=g")
(call (match_operand:QI 1 "memory_operand" "m")
- (match_operand:QI 2 "general_operand" "g")))
+ (match_operand:SI 2 "general_operand" "g")))
(set (reg:SI 14) (plus:SI (reg:SI 14)
(match_operand:SI 4 "immediate_operand" "i")))]
""
@@ -1870,7 +1873,7 @@
;; operands. In that case, combine may simplify the adjustment of sp.
(define_insn ""
[(call (match_operand:QI 0 "memory_operand" "m")
- (match_operand:QI 1 "general_operand" "g"))
+ (match_operand:SI 1 "general_operand" "g"))
(set (reg:SI 14) (reg:SI 14))]
""
"*
@@ -1884,7 +1887,7 @@
(define_insn ""
[(set (match_operand 0 "" "=g")
(call (match_operand:QI 1 "memory_operand" "m")
- (match_operand:QI 2 "general_operand" "g")))
+ (match_operand:SI 2 "general_operand" "g")))
(set (reg:SI 14) (reg:SI 14))]
""
"*
diff --git a/gcc/config/vax/vms.h b/gcc/config/vax/vms.h
index 1dd3c7b0fa6..35c1665f05a 100644
--- a/gcc/config/vax/vms.h
+++ b/gcc/config/vax/vms.h
@@ -304,9 +304,9 @@ const_section () \
/* The following definitions are used in libgcc2.c with the __main
function. The _SHR symbol is used when the sharable image library
- for libg++ is used - this is picked up automatically by the linker
- and this symbol points to the start of the __CTOR_LIST__ from libg++.
- If libg++ is not being used, then __CTOR_LIST_SHR__ occurs just after
+ for the C++ library is used - this is picked up automatically by the linker
+ and this symbol points to the start of __CTOR_LIST__ from the C++ library.
+ If the C++ library is not used, then __CTOR_LIST_SHR__ occurs just after
__CTOR_LIST__, and essentially points to the same list as __CTOR_LIST. */
#ifdef L__main
diff --git a/gcc/config/winnt/config-nt.sed b/gcc/config/winnt/config-nt.sed
index 995158e2244..9beceabf2ec 100644
--- a/gcc/config/winnt/config-nt.sed
+++ b/gcc/config/winnt/config-nt.sed
@@ -13,7 +13,7 @@ s/$(srcdir)\/c-gperf/c-gperf/g
/^lang_specs_files=/ d
/^lang_options_files=/ d
/^version=/ c\
-version=2.8.0
+version=2.8.1
s/CC = cc/CC = cl/
s/^SHELL =.*/SHELL =/
s/CFLAGS = -g/CFLAGS =/
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 99555d8bc4f..46bd0f32935 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1036,6 +1036,10 @@ Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
* parse.y (nomods_initdcl0): Add constructor_declarator case.
+Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * config-lang.in (diff_excludes): Use basename only.
+
Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
* tinfo2.cc: Add tinfo for signed char.
@@ -1937,6 +1941,8 @@ Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
* decl2.c (delete_sanity): resolve_offset_ref.
+ * except.c: Call terminate without caching so many bits.
+
* except.c (expand_start_catch_block): Fix catching a reference
to pointer.
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index b475015990a..192640c7c65 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -1,7 +1,7 @@
/* Functions related to invoking methods and overloaded functions.
- Copyright (C) 1987, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 92-97, 1998 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) and
- hacked by Brendan Kehoe (brendan@cygnus.com).
+ modified by Brendan Kehoe (brendan@cygnus.com).
This file is part of GNU CC.
diff --git a/gcc/cp/config-lang.in b/gcc/cp/config-lang.in
index 4ba5cdffe32..9b39d51ed87 100644
--- a/gcc/cp/config-lang.in
+++ b/gcc/cp/config-lang.in
@@ -32,7 +32,7 @@ compilers="cc1plus\$(exeext)"
stagestuff="g++\$(exeext) g++-cross\$(exeext) cc1plus\$(exeext)"
-diff_excludes="-x cp/parse.c -x cp/parse.h"
+diff_excludes="-x parse.c -x parse.h"
headers='$(CXX_EXTRA_HEADERS)'
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index e8916133ed3..32009a98f57 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -1,6 +1,6 @@
-/* Process declarations and variables for C++ compiler.
- Copyright (C) 1988, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
- Hacked by Michael Tiemann (tiemann@cygnus.com)
+/* Process declarations and variables for C compiler.
+ Copyright (C) 1988, 92-97, 1998 Free Software Foundation, Inc.
+ Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -170,7 +170,6 @@ static void record_builtin_type PROTO((enum rid, char *, tree));
static int member_function_or_else PROTO((tree, tree, char *));
static void bad_specifiers PROTO((tree, char *, int, int, int, int,
int));
-static tree make_implicit_typename PROTO((tree, tree));
/* a node which has tree code ERROR_MARK, and whose type is itself.
All erroneous expressions are replaced with this node. All functions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 230769c949b..63593eece4f 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -1,5 +1,5 @@
/* Handle exceptional things in C++.
- Copyright (C) 1989, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 92-97, 1998 Free Software Foundation, Inc.
Contributed by Michael Tiemann <tiemann@cygnus.com>
Rewritten by Mike Stump <mrs@cygnus.com>, based upon an
initial re-implementation courtesy Tad Hunt.
diff --git a/gcc/cp/exception.cc b/gcc/cp/exception.cc
index 0276ed7dad8..8072e5c4549 100644
--- a/gcc/cp/exception.cc
+++ b/gcc/cp/exception.cc
@@ -1,5 +1,5 @@
// Functions for Exception Support for -*- C++ -*-
-// Copyright (C) 1994, 1995, 1996 Free Software Foundation
+// Copyright (C) 1994, 1995, 1996, 1998 Free Software Foundation
// This file is part of GNU CC.
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 04d674d5a4b..952fe9cd03b 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -3,7 +3,7 @@
Copyright (C) 1987, 89, 92-97, 1998 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
- This file is part of GNU CC.
+This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gcc/cpp.texi b/gcc/cpp.texi
index 9424b48f985..fb730e2ef23 100644
--- a/gcc/cpp.texi
+++ b/gcc/cpp.texi
@@ -934,7 +934,7 @@ to test whether a header is compiled by a C compiler or a C++ compiler.
@item __STRICT_ANSI__
@findex __STRICT_ANSI__
-This macro is defined if and only if the @samp{-ansi} switch was
+GNU C defines this macro if and only if the @samp{-ansi} switch was
specified when GNU C was invoked. Its definition is the null string.
This macro exists primarily to direct certain GNU header files not to
define certain traditional Unix constructs which are incompatible with
@@ -956,48 +956,46 @@ the nesting level is zero.
@item __VERSION__
@findex __VERSION__
-This macro expands to a string which describes the version number of
+This macro expands to a string constant which describes the version number of
GNU C@. The string is normally a sequence of decimal numbers separated
-by periods, such as @samp{"2.6.0"}. The only reasonable use of this
-macro is to incorporate it into a string constant.
+by periods, such as @samp{"2.6.0"}.
@item __OPTIMIZE__
@findex __OPTIMIZE__
-This macro is defined in optimizing compilations. It causes certain
-GNU header files to define alternative macro definitions for some
-system library functions. It is unwise to refer to or test the
-definition of this macro unless you make very sure that programs will
-execute with the same effect regardless.
+GNU CC defines this macro in optimizing compilations. It causes certain
+GNU header files to define alternative macro definitions for some system
+library functions. You should not refer to or test the definition of
+this macro unless you make very sure that programs will execute with the
+same effect regardless.
@item __CHAR_UNSIGNED__
@findex __CHAR_UNSIGNED__
-This macro is defined if and only if the data type @code{char} is
-unsigned on the target machine. It exists to cause the standard
-header file @file{limits.h} to work correctly. It is bad practice
-to refer to this macro yourself; instead, refer to the standard
-macros defined in @file{limits.h}. The preprocessor uses
-this macro to determine whether or not to sign-extend large character
-constants written in octal; see @ref{#if Directive,,The @samp{#if} Directive}.
+GNU C defines this macro if and only if the data type @code{char} is
+unsigned on the target machine. It exists to cause the standard header
+file @file{limits.h} to work correctly. You should not refer to this
+macro yourself; instead, refer to the standard macros defined in
+@file{limits.h}. The preprocessor uses this macro to determine whether
+or not to sign-extend large character constants written in octal; see
+@ref{#if Directive,,The @samp{#if} Directive}.
@item __REGISTER_PREFIX__
@findex __REGISTER_PREFIX__
-This macro expands to a string describing the prefix applied to cpu
-registers in assembler code. It can be used to write assembler code
-that is usable in multiple environments. For example, in the
-@samp{m68k-aout} environment it expands to the string @samp{""},
-but in the @samp{m68k-coff} environment it expands to the string
-@samp{"%"}.
+This macro expands to a string (not a string constant) describing the
+prefix applied to CPU registers in assembler code. You can use it to
+write assembler code that is usable in multiple environments. For
+example, in the @samp{m68k-aout} environment it expands to the null
+string, but in the @samp{m68k-coff} environment it expands to the string
+@samp{%}.
@item __USER_LABEL_PREFIX__
@findex __USER_LABEL_PREFIX__
-This macro expands to a string describing the prefix applied to user
-generated labels in assembler code. It can be used to write assembler
-code that is usable in multiple environments. For example, in the
-@samp{m68k-aout} environment it expands to the string @samp{"_"}, but in
-the @samp{m68k-coff} environment it expands to the string @samp{""}.
-This does not work with the @samp{-mno-underscores} option that the
-i386 OSF/rose and m88k targets provide nor with the @samp{-mcall*} options
-of the rs6000 System V Release 4 target.
+Similar to @code{__REGISTER_PREFIX__}, but describes the prefix applied
+to user generated labels in assembler code. For example, in the
+@samp{m68k-aout} environment it expands to the string @samp{_}, but in
+the @samp{m68k-coff} environment it expands to the null string. This
+does not work with the @samp{-mno-underscores} option that the i386
+OSF/rose and m88k targets provide nor with the @samp{-mcall*} options of
+the rs6000 System V Release 4 target.
@end table
@node Nonstandard Predefined,, Standard Predefined, Predefined
@@ -2687,7 +2685,7 @@ Only the directories you have specified with @samp{-I} options
@findex -nostdinc++
Do not search for header files in the C++-specific standard directories,
but do still search the other standard directories.
-(This option is used when building libg++.)
+(This option is used when building the C++ library.)
@item -remap
@findex -remap
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 8528861282a..bd689112333 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -1,5 +1,5 @@
/* CPP Library.
- Copyright (C) 1986, 87, 89, 92-7, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1986, 87, 89, 92-97, 1998 Free Software Foundation, Inc.
Contributed by Per Bothner, 1994-95.
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
@@ -369,7 +369,8 @@ struct directive {
char command_reads_line; /* One if rest of line is read by func. */
};
-#define IS_INCLUDE_DIRECTIVE_TYPE(t) (T_INCLUDE <= (t) && (t) <= T_IMPORT)
+#define IS_INCLUDE_DIRECTIVE_TYPE(t) \
+((int) T_INCLUDE <= (int) (t) && (int) (t) <= (int) T_IMPORT)
/* Here is the actual list of #-directives, most-often-used first.
The initialize_builtins function assumes #define is the very first. */
@@ -7494,6 +7495,7 @@ cpp_error_from_errno (pfile, name)
cpp_reader *pfile;
char *name;
{
+ int e = errno;
cpp_buffer *ip = cpp_file_buffer (pfile);
cpp_print_containing_files (pfile);
@@ -7501,7 +7503,7 @@ cpp_error_from_errno (pfile, name)
if (ip != NULL)
cpp_file_line_for_message (ip->nominal_fname, ip->lineno, -1);
- cpp_message (pfile, 1, "%s: %s", name, my_strerror (errno));
+ cpp_message (pfile, 1, "%s: %s", name, my_strerror (e));
}
void
diff --git a/gcc/crtstuff.c b/gcc/crtstuff.c
index be555b02aed..e6238de5e9b 100644
--- a/gcc/crtstuff.c
+++ b/gcc/crtstuff.c
@@ -1,6 +1,6 @@
/* Specialized bits of code needed to support construction and
destruction of file-scope objects in C++ code.
- Copyright (C) 1991, 94-97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1991, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@monkeys.com).
This file is part of GNU CC.
@@ -389,10 +389,13 @@ __do_global_ctors_aux () /* prologue goes in .text section */
asm (INIT_SECTION_ASM_OP);
DO_GLOBAL_CTORS_BODY;
ON_EXIT (__do_global_dtors, 0);
+} /* epilogue and body go in .init section */
+
#ifdef FORCE_INIT_SECTION_ALIGN
- FORCE_INIT_SECTION_ALIGN;
+FORCE_INIT_SECTION_ALIGN;
#endif
-} /* epilogue and body go in .init section */
+
+asm (TEXT_SECTION_ASM_OP);
#endif /* OBJECT_FORMAT_ELF */
diff --git a/gcc/cse.c b/gcc/cse.c
index 064ce348772..990ef5f1700 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -2277,6 +2277,10 @@ set_nonvarying_address_components (addr, size, pbase, pstart, pend)
start = 0;
end = 0;
+ if (flag_pic && GET_CODE (base) == PLUS
+ && XEXP (base, 0) == pic_offset_table_rtx)
+ base = XEXP (base, 1);
+
/* Registers with nonvarying addresses usually have constant equivalents;
but the frame pointer register is also possible. */
if (GET_CODE (base) == REG
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 56d20040277..9d431832975 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -1,5 +1,5 @@
/* Output Dwarf2 format symbol table information from the GNU C compiler.
- Copyright (C) 1992, 1993, 95-97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 95, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by Gary Funck (gary@intrepid.com).
Derived from DWARF 1 implementation of Ron Guilmette (rfg@monkeys.com).
Extensively modified by Jason Merrill (jason@cygnus.com).
@@ -578,18 +578,26 @@ expand_builtin_dwarf_reg_size (reg_tree, target)
continue;
mode = reg_raw_mode[i];
+
/* CCmode is arbitrarily given a size of 4 bytes. It is more useful
to use the same size as word_mode, since that reduces the number
of ranges we need. It should not matter, since the result should
never be used for a condition code register anyways. */
- if (mode == CCmode)
+ if (GET_MODE_CLASS (mode) == MODE_CC)
mode = word_mode;
+
size = GET_MODE_SIZE (mode);
+ /* If this register is not valid in the specified mode and
+ we have a previous size, use that for the size of this
+ register to avoid making junk tiny ranges. */
+ if (! HARD_REGNO_MODE_OK (i, mode) && last_size != -1)
+ size = last_size;
+
if (size != last_size)
{
ranges[n_ranges].beg = i;
- ranges[n_ranges].size = last_size = GET_MODE_SIZE (reg_raw_mode[i]);
+ ranges[n_ranges].size = last_size = size;
++n_ranges;
if (n_ranges >= 5)
abort ();
diff --git a/gcc/enquire.c b/gcc/enquire.c
index e8adb038c0d..bb5ea0be604 100644
--- a/gcc/enquire.c
+++ b/gcc/enquire.c
@@ -1412,21 +1412,42 @@ int cprop() {
c=0; char_max=0;
c++;
- if (setjmp(lab)==0) { /* Yields char_max */
- while (c>char_max) {
- char_max=c;
- c++;
- }
+ if (bits_per_byte <= 16) {
+ if (setjmp(lab)==0) { /* Yields char_max */
+ while (c>char_max) {
+ char_max=c;
+ c++;
+ }
+ } else {
+ Vprintf("%sCharacter overflow generates a trap!%s\n",
+ co, oc);
+ }
+ c=0; char_min=0;
+ c--;
+ if (setjmp(lab)==0) { /* Yields char_min */
+ while (c<char_min) {
+ char_min=c;
+ c--;
+ }
+ }
} else {
- Vprintf("%sCharacter overflow generates a trap!%s\n", co, oc);
- }
- c=0; char_min=0;
- c--;
- if (setjmp(lab)==0) { /* Yields char_min */
- while (c<char_min) {
- char_min=c;
- c--;
- }
+ /* An exhaustive search here is impracticable ;-) */
+ c = (1 << (bits_per_byte - 1)) - 1;
+ char_max = c;
+ c++;
+ if (c > char_max)
+ char_max = ~0;
+ c = 0;
+ char_min = 0;
+ c--;
+ if (c < char_min) {
+ c = (1 << (bits_per_byte - 1)) - 1;
+ c = -c;
+ char_min = c;
+ c--;
+ if (c < char_min)
+ char_min = c;
+ }
}
if (c_signed && char_min == 0) {
Vprintf("%sBEWARE! Chars are pseudo-unsigned:%s\n", co, oc);
diff --git a/gcc/except.c b/gcc/except.c
index 46795835b82..1b4c41193c1 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1,5 +1,5 @@
/* Implements exception handling.
- Copyright (C) 1989, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 92-97, 1998 Free Software Foundation, Inc.
Contributed by Mike Stump <mrs@cygnus.com>.
This file is part of GNU CC.
diff --git a/gcc/explow.c b/gcc/explow.c
index 6b08946e687..cda07af7b2e 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -1,5 +1,5 @@
/* Subroutines for manipulating rtx's in semantically interesting ways.
- Copyright (C) 1987, 91, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1987, 91, 94-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -1366,7 +1366,8 @@ probe_stack_range (first, size)
/* If we have to generate explicit probes, see if we have a constant
small number of them to generate. If so, that's the easy case. */
- if (GET_CODE (size) == CONST_INT && INTVAL (size) < 10)
+ if (GET_CODE (size) == CONST_INT
+ && INTVAL (size) < 10 * STACK_CHECK_PROBE_INTERVAL)
{
HOST_WIDE_INT offset;
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 7ac64c64437..8f0ba071364 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -1,6 +1,6 @@
/* Medium-level subroutines: convert bit-field store and extract
and shifts, multiplies and divides to rtl instructions.
- Copyright (C) 1987, 88, 89, 92-6, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -907,6 +907,8 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
offset += SUBREG_WORD (op0);
+ inner_size = MIN (inner_size, BITS_PER_WORD);
+
if (BYTES_BIG_ENDIAN && (outer_size < inner_size))
{
bitpos += inner_size - outer_size;
@@ -1076,7 +1078,7 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
{
int xbitpos = bitpos, xoffset = offset;
rtx bitsize_rtx, bitpos_rtx;
- rtx last = get_last_insn();
+ rtx last = get_last_insn ();
rtx xop0 = op0;
rtx xtarget = target;
rtx xspec_target = spec_target;
@@ -1140,7 +1142,7 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
/* If op0 is a register, we need it in MAXMODE (which is usually
SImode). to make it acceptable to the format of extzv. */
if (GET_CODE (xop0) == SUBREG && GET_MODE (xop0) != maxmode)
- abort ();
+ goto extzv_loses;
if (GET_CODE (xop0) == REG && GET_MODE (xop0) != maxmode)
xop0 = gen_rtx_SUBREG (maxmode, xop0, 0);
@@ -1216,7 +1218,7 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
{
int xbitpos = bitpos, xoffset = offset;
rtx bitsize_rtx, bitpos_rtx;
- rtx last = get_last_insn();
+ rtx last = get_last_insn ();
rtx xop0 = op0, xtarget = target;
rtx xspec_target = spec_target;
rtx xspec_target_subreg = spec_target_subreg;
@@ -1274,7 +1276,7 @@ extract_bit_field (str_rtx, bitsize, bitnum, unsignedp,
/* If op0 is a register, we need it in MAXMODE (which is usually
SImode) to make it acceptable to the format of extv. */
if (GET_CODE (xop0) == SUBREG && GET_MODE (xop0) != maxmode)
- abort ();
+ goto extv_loses;
if (GET_CODE (xop0) == REG && GET_MODE (xop0) != maxmode)
xop0 = gen_rtx_SUBREG (maxmode, xop0, 0);
diff --git a/gcc/expr.c b/gcc/expr.c
index f1397c5ebac..2e79f00a3b1 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -169,7 +169,7 @@ static rtx store_field PROTO((rtx, int, int, enum machine_mode, tree,
enum machine_mode, int, int, int));
static tree save_noncopied_parts PROTO((tree, tree));
static tree init_noncopied_parts PROTO((tree, tree));
-static int safe_from_p PROTO((rtx, tree));
+static int safe_from_p PROTO((rtx, tree, int));
static int fixed_type_p PROTO((tree));
static rtx var_rtx PROTO((tree));
static int get_pointer_alignment PROTO((tree, unsigned));
@@ -930,6 +930,41 @@ convert_move (to, from, unsignedp)
}
/* Handle pointer conversion */ /* SPEE 900220 */
+ if (to_mode == PQImode)
+ {
+ if (from_mode != QImode)
+ from = convert_to_mode (QImode, from, unsignedp);
+
+#ifdef HAVE_truncqipqi2
+ if (HAVE_truncqipqi2)
+ {
+ emit_unop_insn (CODE_FOR_truncqipqi2, to, from, UNKNOWN);
+ return;
+ }
+#endif /* HAVE_truncqipqi2 */
+ abort ();
+ }
+
+ if (from_mode == PQImode)
+ {
+ if (to_mode != QImode)
+ {
+ from = convert_to_mode (QImode, from, unsignedp);
+ from_mode = QImode;
+ }
+ else
+ {
+#ifdef HAVE_extendpqiqi2
+ if (HAVE_extendpqiqi2)
+ {
+ emit_unop_insn (CODE_FOR_extendpqiqi2, to, from, UNKNOWN);
+ return;
+ }
+#endif /* HAVE_extendpqiqi2 */
+ abort ();
+ }
+ }
+
if (to_mode == PSImode)
{
if (from_mode != SImode)
@@ -1595,7 +1630,7 @@ emit_block_move (x, y, size, align)
actual mode mask. */
&& ((GET_CODE (size) == CONST_INT
&& ((unsigned HOST_WIDE_INT) INTVAL (size)
- <= GET_MODE_MASK (mode)))
+ <= (GET_MODE_MASK (mode) >> 1)))
|| GET_MODE_BITSIZE (mode) >= BITS_PER_WORD)
&& (insn_operand_predicate[(int) code][0] == 0
|| (*insn_operand_predicate[(int) code][0]) (x, BLKmode))
@@ -2096,7 +2131,7 @@ clear_storage (object, size, align)
definitely be less than the actual mode mask. */
&& ((GET_CODE (size) == CONST_INT
&& ((unsigned HOST_WIDE_INT) INTVAL (size)
- <= GET_MODE_MASK (mode)))
+ <= (GET_MODE_MASK (mode) >> 1)))
|| GET_MODE_BITSIZE (mode) >= BITS_PER_WORD)
&& (insn_operand_predicate[(int) code][0] == 0
|| (*insn_operand_predicate[(int) code][0]) (object,
@@ -2418,11 +2453,15 @@ get_push_address (size)
to store the arg. On machines with push insns, ARGS_ADDR is 0 when a
argument block has not been preallocated.
- ARGS_SO_FAR is the size of args previously pushed for this call. */
+ ARGS_SO_FAR is the size of args previously pushed for this call.
+
+ REG_PARM_STACK_SPACE is nonzero if functions require stack space
+ for arguments passed in registers. If nonzero, it will be the number
+ of bytes required. */
void
emit_push_insn (x, mode, type, size, align, partial, reg, extra,
- args_addr, args_so_far)
+ args_addr, args_so_far, reg_parm_stack_space)
register rtx x;
enum machine_mode mode;
tree type;
@@ -2433,6 +2472,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
int extra;
rtx args_addr;
rtx args_so_far;
+ int reg_parm_stack_space;
{
rtx xinner;
enum direction stack_direction
@@ -2479,11 +2519,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
skip the part of stack space corresponding to the registers.
Otherwise, start copying to the beginning of the stack space,
by setting SKIP to 0. */
-#ifndef REG_PARM_STACK_SPACE
- skip = 0;
-#else
- skip = used;
-#endif
+ skip = (reg_parm_stack_space == 0) ? 0 : used;
#ifdef PUSH_ROUNDING
/* Do it with several push insns if that doesn't take lots of insns
@@ -2598,75 +2634,54 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
INTVAL (size), align);
goto ret;
}
- /* Try the most limited insn first, because there's no point
- including more than one in the machine description unless
- the more limited one has some advantage. */
-#ifdef HAVE_movstrqi
- if (HAVE_movstrqi
- && GET_CODE (size) == CONST_INT
- && ((unsigned HOST_WIDE_INT) INTVAL (size)
- <= GET_MODE_MASK (QImode)))
- {
- rtx pat = gen_movstrqi (gen_rtx_MEM (BLKmode, temp),
- xinner, size, GEN_INT (align));
- if (pat != 0)
- {
- emit_insn (pat);
- goto ret;
- }
- }
-#endif
-#ifdef HAVE_movstrhi
- if (HAVE_movstrhi
- && GET_CODE (size) == CONST_INT
- && ((unsigned HOST_WIDE_INT) INTVAL (size)
- <= GET_MODE_MASK (HImode)))
- {
- rtx pat = gen_movstrhi (gen_rtx_MEM (BLKmode, temp),
- xinner, size, GEN_INT (align));
- if (pat != 0)
- {
- emit_insn (pat);
- goto ret;
- }
- }
-#endif
-#ifdef HAVE_movstrsi
- if (HAVE_movstrsi)
- {
- rtx pat = gen_movstrsi (gen_rtx_MEM (BLKmode, temp),
- xinner, size, GEN_INT (align));
- if (pat != 0)
- {
- emit_insn (pat);
- goto ret;
- }
- }
-#endif
-#ifdef HAVE_movstrdi
- if (HAVE_movstrdi)
+ else
{
- rtx pat = gen_movstrdi (gen_rtx_MEM (BLKmode, temp),
- xinner, size, GEN_INT (align));
- if (pat != 0)
+ rtx opalign = GEN_INT (align);
+ enum machine_mode mode;
+ rtx target = gen_rtx (MEM, BLKmode, temp);
+
+ for (mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
+ mode != VOIDmode;
+ mode = GET_MODE_WIDER_MODE (mode))
{
- emit_insn (pat);
- goto ret;
+ enum insn_code code = movstr_optab[(int) mode];
+
+ if (code != CODE_FOR_nothing
+ && ((GET_CODE (size) == CONST_INT
+ && ((unsigned HOST_WIDE_INT) INTVAL (size)
+ <= (GET_MODE_MASK (mode) >> 1)))
+ || GET_MODE_BITSIZE (mode) >= BITS_PER_WORD)
+ && (insn_operand_predicate[(int) code][0] == 0
+ || ((*insn_operand_predicate[(int) code][0])
+ (target, BLKmode)))
+ && (insn_operand_predicate[(int) code][1] == 0
+ || ((*insn_operand_predicate[(int) code][1])
+ (xinner, BLKmode)))
+ && (insn_operand_predicate[(int) code][3] == 0
+ || ((*insn_operand_predicate[(int) code][3])
+ (opalign, VOIDmode))))
+ {
+ rtx op2 = convert_to_mode (mode, size, 1);
+ rtx last = get_last_insn ();
+ rtx pat;
+
+ if (insn_operand_predicate[(int) code][2] != 0
+ && ! ((*insn_operand_predicate[(int) code][2])
+ (op2, mode)))
+ op2 = copy_to_mode_reg (mode, op2);
+
+ pat = GEN_FCN ((int) code) (target, xinner,
+ op2, opalign);
+ if (pat)
+ {
+ emit_insn (pat);
+ goto ret;
+ }
+ else
+ delete_insns_since (last);
+ }
}
}
-#endif
-#ifdef HAVE_movstrti
- if (HAVE_movstrti)
- {
- rtx pat = gen_movstrti (gen_rtx (MEM, BLKmode, temp),
- xinner, size, GEN_INT (align));
- if (pat != 0)
- {
- emit_insn (pat);
- goto ret;
- }
- }
-#endif
#ifndef ACCUMULATE_OUTGOING_ARGS
/* If the source is referenced relative to the stack pointer,
@@ -2732,11 +2747,7 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
skip the part of stack space corresponding to the registers.
Otherwise, start copying to the beginning of the stack space,
by setting SKIP to 0. */
-#ifndef REG_PARM_STACK_SPACE
- skip = 0;
-#else
- skip = not_stack;
-#endif
+ skip = (reg_parm_stack_space == 0) ? 0 : not_stack;
if (CONSTANT_P (x) && ! LEGITIMATE_CONSTANT_P (x))
x = validize_mem (force_const_mem (mode, x));
@@ -2760,7 +2771,8 @@ emit_push_insn (x, mode, type, size, align, partial, reg, extra,
word_mode, NULL_TREE, NULL_RTX, align, 0, NULL_RTX,
0, args_addr,
GEN_INT (args_offset + ((i - not_stack + skip)
- * UNITS_PER_WORD)));
+ * UNITS_PER_WORD)),
+ reg_parm_stack_space);
}
else
{
@@ -4389,12 +4401,12 @@ get_inner_reference (exp, pbitsize, pbitpos, poffset, pmode,
*pbitpos += TREE_INT_CST_LOW (index);
else
{
+ if (contains_placeholder_p (index))
+ index = build (WITH_RECORD_EXPR, sizetype, index, exp);
+
offset = size_binop (PLUS_EXPR, offset,
- convert (sizetype,
- size_binop (FLOOR_DIV_EXPR, index,
- size_int (BITS_PER_UNIT))));
- if (contains_placeholder_p (offset))
- offset = build (WITH_RECORD_EXPR, sizetype, offset, exp);
+ size_binop (FLOOR_DIV_EXPR, index,
+ size_int (BITS_PER_UNIT)));
}
}
else if (TREE_CODE (exp) != NON_LVALUE_EXPR
@@ -4444,6 +4456,7 @@ get_memory_usage_from_modifier (modifier)
switch (modifier)
{
case EXPAND_NORMAL:
+ case EXPAND_SUM:
return MEMORY_USE_RO;
break;
case EXPAND_MEMORY_USE_WO:
@@ -4452,10 +4465,12 @@ get_memory_usage_from_modifier (modifier)
case EXPAND_MEMORY_USE_RW:
return MEMORY_USE_RW;
break;
- case EXPAND_INITIALIZER:
case EXPAND_MEMORY_USE_DONT:
- case EXPAND_SUM:
+ /* EXPAND_CONST_ADDRESS and EXPAND_INITIALIZER are converted into
+ MEMORY_USE_DONT, because they are modifiers to a call of
+ expand_expr in the ADDR_EXPR case of expand_expr. */
case EXPAND_CONST_ADDRESS:
+ case EXPAND_INITIALIZER:
return MEMORY_USE_DONT;
case EXPAND_MEMORY_USE_BAD:
default:
@@ -4599,12 +4614,15 @@ init_noncopied_parts (lhs, list)
}
/* Subroutine of expand_expr: return nonzero iff there is no way that
- EXP can reference X, which is being modified. */
+ EXP can reference X, which is being modified. TOP_P is nonzero if this
+ call is going to be used to determine whether we need a temporary
+ for EXP, as opposed to a recursive call to this function. */
static int
-safe_from_p (x, exp)
+safe_from_p (x, exp, top_p)
rtx x;
tree exp;
+ int top_p;
{
rtx exp_rtl = 0;
int i, nops;
@@ -4615,8 +4633,8 @@ safe_from_p (x, exp)
(except for arrays that have TYPE_ARRAY_MAX_SIZE set).
So we assume here that something at a higher level has prevented a
clash. This is somewhat bogus, but the best we can do. Only
- do this when X is BLKmode. */
- || (TREE_TYPE (exp) != 0 && TYPE_SIZE (TREE_TYPE (exp)) != 0
+ do this when X is BLKmode and when we are at the top level. */
+ || (top_p && TREE_TYPE (exp) != 0 && TYPE_SIZE (TREE_TYPE (exp)) != 0
&& TREE_CODE (TYPE_SIZE (TREE_TYPE (exp))) != INTEGER_CST
&& (TREE_CODE (TREE_TYPE (exp)) != ARRAY_TYPE
|| TYPE_ARRAY_MAX_SIZE (TREE_TYPE (exp)) == NULL_TREE
@@ -4653,19 +4671,19 @@ safe_from_p (x, exp)
case 'x':
if (TREE_CODE (exp) == TREE_LIST)
return ((TREE_VALUE (exp) == 0
- || safe_from_p (x, TREE_VALUE (exp)))
+ || safe_from_p (x, TREE_VALUE (exp), 0))
&& (TREE_CHAIN (exp) == 0
- || safe_from_p (x, TREE_CHAIN (exp))));
+ || safe_from_p (x, TREE_CHAIN (exp), 0)));
else
return 0;
case '1':
- return safe_from_p (x, TREE_OPERAND (exp, 0));
+ return safe_from_p (x, TREE_OPERAND (exp, 0), 0);
case '2':
case '<':
- return (safe_from_p (x, TREE_OPERAND (exp, 0))
- && safe_from_p (x, TREE_OPERAND (exp, 1)));
+ return (safe_from_p (x, TREE_OPERAND (exp, 0), 0)
+ && safe_from_p (x, TREE_OPERAND (exp, 1), 0));
case 'e':
case 'r':
@@ -4678,7 +4696,8 @@ safe_from_p (x, exp)
{
case ADDR_EXPR:
return (staticp (TREE_OPERAND (exp, 0))
- || safe_from_p (x, TREE_OPERAND (exp, 0)));
+ || safe_from_p (x, TREE_OPERAND (exp, 0), 0)
+ || TREE_STATIC (exp));
case INDIRECT_REF:
if (GET_CODE (x) == MEM)
@@ -4713,7 +4732,7 @@ safe_from_p (x, exp)
break;
case CLEANUP_POINT_EXPR:
- return safe_from_p (x, TREE_OPERAND (exp, 0));
+ return safe_from_p (x, TREE_OPERAND (exp, 0), 0);
case SAVE_EXPR:
exp_rtl = SAVE_EXPR_RTL (exp);
@@ -4722,7 +4741,7 @@ safe_from_p (x, exp)
case BIND_EXPR:
/* The only operand we look at is operand 1. The rest aren't
part of the expression. */
- return safe_from_p (x, TREE_OPERAND (exp, 1));
+ return safe_from_p (x, TREE_OPERAND (exp, 1), 0);
case METHOD_CALL_EXPR:
/* This takes a rtx argument, but shouldn't appear here. */
@@ -4739,7 +4758,7 @@ safe_from_p (x, exp)
nops = tree_code_length[(int) TREE_CODE (exp)];
for (i = 0; i < nops; i++)
if (TREE_OPERAND (exp, i) != 0
- && ! safe_from_p (x, TREE_OPERAND (exp, i)))
+ && ! safe_from_p (x, TREE_OPERAND (exp, i), 0))
return 0;
}
@@ -5190,7 +5209,7 @@ expand_expr (exp, target, tmode, modifier)
if (mode == VOIDmode)
temp = const0_rtx;
else
- temp = assign_temp (type, 0, 0, 0);
+ temp = assign_temp (type, 3, 0, 0);
SAVE_EXPR_RTL (exp) = temp;
if (!optimize && GET_CODE (temp) == REG)
@@ -5215,6 +5234,8 @@ expand_expr (exp, target, tmode, modifier)
EXPAND_MEMORY_USE_BAD);
else
store_expr (TREE_OPERAND (exp, 0), temp, 0);
+
+ TREE_USED (exp) = 1;
}
/* If the mode of SAVE_EXPR_RTL does not match that of the expression, it
@@ -5247,7 +5268,7 @@ expand_expr (exp, target, tmode, modifier)
tree placeholder_expr;
/* If there is an object on the head of the placeholder list,
- see if some object in its references is of type TYPE. For
+ see if some object in it of type TYPE or a pointer to it. For
further information, see tree.def. */
for (placeholder_expr = placeholder_list;
placeholder_expr != 0;
@@ -5258,26 +5279,38 @@ expand_expr (exp, target, tmode, modifier)
tree old_list = placeholder_list;
tree elt;
- /* See if the object is the type that we want. */
- if ((TYPE_MAIN_VARIANT (TREE_TYPE
- (TREE_PURPOSE (placeholder_expr)))
- == need_type))
- object = TREE_PURPOSE (placeholder_expr);
+ /* Find the outermost reference that is of the type we want.
+ If none, see if any object has a type that is a pointer to
+ the type we want. */
+ for (elt = TREE_PURPOSE (placeholder_expr);
+ elt != 0 && object == 0;
+ elt
+ = ((TREE_CODE (elt) == COMPOUND_EXPR
+ || TREE_CODE (elt) == COND_EXPR)
+ ? TREE_OPERAND (elt, 1)
+ : (TREE_CODE_CLASS (TREE_CODE (elt)) == 'r'
+ || TREE_CODE_CLASS (TREE_CODE (elt)) == '1'
+ || TREE_CODE_CLASS (TREE_CODE (elt)) == '2'
+ || TREE_CODE_CLASS (TREE_CODE (elt)) == 'e')
+ ? TREE_OPERAND (elt, 0) : 0))
+ if (TYPE_MAIN_VARIANT (TREE_TYPE (elt)) == need_type)
+ object = elt;
- /* Find the outermost reference that is of the type we want. */
for (elt = TREE_PURPOSE (placeholder_expr);
- elt != 0 && object == 0
- && (TREE_CODE_CLASS (TREE_CODE (elt)) == 'r'
- || TREE_CODE_CLASS (TREE_CODE (elt)) == '1'
- || TREE_CODE_CLASS (TREE_CODE (elt)) == '2'
- || TREE_CODE_CLASS (TREE_CODE (elt)) == 'e');
- elt = ((TREE_CODE (elt) == COMPOUND_EXPR
- || TREE_CODE (elt) == COND_EXPR)
- ? TREE_OPERAND (elt, 1) : TREE_OPERAND (elt, 0)))
- if (TREE_CODE_CLASS (TREE_CODE (elt)) == 'r'
- && (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_OPERAND (elt, 0)))
+ elt != 0 && object == 0;
+ elt
+ = ((TREE_CODE (elt) == COMPOUND_EXPR
+ || TREE_CODE (elt) == COND_EXPR)
+ ? TREE_OPERAND (elt, 1)
+ : (TREE_CODE_CLASS (TREE_CODE (elt)) == 'r'
+ || TREE_CODE_CLASS (TREE_CODE (elt)) == '1'
+ || TREE_CODE_CLASS (TREE_CODE (elt)) == '2'
+ || TREE_CODE_CLASS (TREE_CODE (elt)) == 'e')
+ ? TREE_OPERAND (elt, 0) : 0))
+ if (POINTER_TYPE_P (TREE_TYPE (elt))
+ && (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (elt)))
== need_type))
- object = TREE_OPERAND (elt, 0);
+ object = build1 (INDIRECT_REF, need_type, elt);
if (object != 0)
{
@@ -5387,7 +5420,7 @@ expand_expr (exp, target, tmode, modifier)
all operands are constant, put it in memory as well. */
else if ((TREE_STATIC (exp)
&& ((mode == BLKmode
- && ! (target != 0 && safe_from_p (target, exp)))
+ && ! (target != 0 && safe_from_p (target, exp, 1)))
|| TREE_ADDRESSABLE (exp)
|| (TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
&& (move_by_pieces_ninsns
@@ -5414,7 +5447,7 @@ expand_expr (exp, target, tmode, modifier)
{
/* Handle calls that pass values in multiple non-contiguous
locations. The Irix 6 ABI has examples of this. */
- if (target == 0 || ! safe_from_p (target, exp)
+ if (target == 0 || ! safe_from_p (target, exp, 1)
|| GET_CODE (target) == PARALLEL)
{
if (mode != BLKmode && ! TREE_ADDRESSABLE (exp))
@@ -5622,8 +5655,6 @@ expand_expr (exp, target, tmode, modifier)
if (DECL_BIT_FIELD (TREE_PURPOSE (elt)))
{
int bitsize = DECL_FIELD_SIZE (TREE_PURPOSE (elt));
- enum machine_mode imode
- = TYPE_MODE (TREE_TYPE (TREE_PURPOSE (elt)));
if (TREE_UNSIGNED (TREE_TYPE (TREE_PURPOSE (elt))))
{
@@ -5632,8 +5663,11 @@ expand_expr (exp, target, tmode, modifier)
}
else
{
+ enum machine_mode imode
+ = TYPE_MODE (TREE_TYPE (TREE_PURPOSE (elt)));
tree count
- = build_int_2 (imode - bitsize, 0);
+ = build_int_2 (GET_MODE_BITSIZE (imode) - bitsize,
+ 0);
op0 = expand_shift (LSHIFT_EXPR, imode, op0, count,
target, 0);
@@ -5673,7 +5707,8 @@ expand_expr (exp, target, tmode, modifier)
!= INTEGER_CST)
? target : NULL_RTX),
VOIDmode,
- modifier == EXPAND_INITIALIZER ? modifier : 0);
+ modifier == EXPAND_INITIALIZER
+ ? modifier : EXPAND_NORMAL);
/* If this is a constant, put it into a register if it is a
legitimate constant and memory if it isn't. */
@@ -6166,7 +6201,7 @@ expand_expr (exp, target, tmode, modifier)
goto binop;
preexpand_calls (exp);
- if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1)))
+ if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1), 1))
subtarget = 0;
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, ro_modifier);
@@ -6311,7 +6346,7 @@ expand_expr (exp, target, tmode, modifier)
GEN_INT (TREE_INT_CST_LOW (TREE_OPERAND (exp, 1))));
}
- if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1)))
+ if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1), 1))
subtarget = 0;
/* Check for multiplying things that have been extended
@@ -6394,7 +6429,7 @@ expand_expr (exp, target, tmode, modifier)
case ROUND_DIV_EXPR:
case EXACT_DIV_EXPR:
preexpand_calls (exp);
- if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1)))
+ if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1), 1))
subtarget = 0;
/* Possible optimization: compute the dividend with EXPAND_SUM
then if the divisor is constant can optimize the case
@@ -6412,7 +6447,7 @@ expand_expr (exp, target, tmode, modifier)
case CEIL_MOD_EXPR:
case ROUND_MOD_EXPR:
preexpand_calls (exp);
- if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1)))
+ if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1), 1))
subtarget = 0;
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
@@ -6464,12 +6499,12 @@ expand_expr (exp, target, tmode, modifier)
return op0;
return expand_abs (mode, op0, target, unsignedp,
- safe_from_p (target, TREE_OPERAND (exp, 0)));
+ safe_from_p (target, TREE_OPERAND (exp, 0), 1));
case MAX_EXPR:
case MIN_EXPR:
target = original_target;
- if (target == 0 || ! safe_from_p (target, TREE_OPERAND (exp, 1))
+ if (target == 0 || ! safe_from_p (target, TREE_OPERAND (exp, 1), 1)
|| (GET_CODE (target) == MEM && MEM_VOLATILE_P (target))
|| GET_MODE (target) != mode
|| (GET_CODE (target) == REG
@@ -6584,7 +6619,7 @@ expand_expr (exp, target, tmode, modifier)
case LROTATE_EXPR:
case RROTATE_EXPR:
preexpand_calls (exp);
- if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1)))
+ if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1), 1))
subtarget = 0;
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
return expand_shift (code, mode, op0, TREE_OPERAND (exp, 1), target,
@@ -6632,7 +6667,7 @@ expand_expr (exp, target, tmode, modifier)
case TRUTH_ANDIF_EXPR:
case TRUTH_ORIF_EXPR:
if (! ignore
- && (target == 0 || ! safe_from_p (target, exp)
+ && (target == 0 || ! safe_from_p (target, exp, 1)
/* Make sure we don't have a hard reg (such as function's return
value) live across basic blocks, if not optimizing. */
|| (!optimize && GET_CODE (target) == REG
@@ -6760,7 +6795,7 @@ expand_expr (exp, target, tmode, modifier)
if (ignore)
temp = 0;
else if (original_target
- && (safe_from_p (original_target, TREE_OPERAND (exp, 0))
+ && (safe_from_p (original_target, TREE_OPERAND (exp, 0), 1)
|| (singleton && GET_CODE (original_target) == REG
&& REGNO (original_target) >= FIRST_PSEUDO_REGISTER
&& original_target == var_rtx (singleton)))
@@ -6809,7 +6844,7 @@ expand_expr (exp, target, tmode, modifier)
= invert_truthvalue (TREE_OPERAND (exp, 0));
result = do_store_flag (TREE_OPERAND (exp, 0),
- (safe_from_p (temp, singleton)
+ (safe_from_p (temp, singleton, 1)
? temp : NULL_RTX),
mode, BRANCH_COST <= 1);
@@ -6819,7 +6854,7 @@ expand_expr (exp, target, tmode, modifier)
(TREE_OPERAND
(binary_op, 1)),
0),
- (safe_from_p (temp, singleton)
+ (safe_from_p (temp, singleton, 1)
? temp : NULL_RTX), 0);
if (result)
@@ -6846,7 +6881,7 @@ expand_expr (exp, target, tmode, modifier)
if it is a hard register, because evaluating the condition
might clobber it. */
if ((binary_op
- && ! safe_from_p (temp, TREE_OPERAND (binary_op, 1)))
+ && ! safe_from_p (temp, TREE_OPERAND (binary_op, 1), 1))
|| (GET_CODE (temp) == REG
&& REGNO (temp) < FIRST_PSEUDO_REGISTER))
temp = gen_reg_rtx (mode);
@@ -6887,7 +6922,7 @@ expand_expr (exp, target, tmode, modifier)
TREE_OPERAND (exp, 1), 0)
&& (! TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 0))
|| TREE_CODE (TREE_OPERAND (exp, 1)) == SAVE_EXPR)
- && safe_from_p (temp, TREE_OPERAND (exp, 2)))
+ && safe_from_p (temp, TREE_OPERAND (exp, 2), 1))
{
if (GET_CODE (temp) == REG && REGNO (temp) < FIRST_PSEUDO_REGISTER)
temp = gen_reg_rtx (mode);
@@ -6905,7 +6940,7 @@ expand_expr (exp, target, tmode, modifier)
TREE_OPERAND (exp, 2), 0)
&& (! TREE_SIDE_EFFECTS (TREE_OPERAND (exp, 0))
|| TREE_CODE (TREE_OPERAND (exp, 2)) == SAVE_EXPR)
- && safe_from_p (temp, TREE_OPERAND (exp, 1)))
+ && safe_from_p (temp, TREE_OPERAND (exp, 1), 1))
{
if (GET_CODE (temp) == REG && REGNO (temp) < FIRST_PSEUDO_REGISTER)
temp = gen_reg_rtx (mode);
@@ -7039,6 +7074,7 @@ expand_expr (exp, target, tmode, modifier)
/* Mark it as expanded. */
TREE_OPERAND (exp, 1) = NULL_TREE;
+ TREE_USED (slot) = 1;
store_expr (exp1, target, 0);
expand_decl_cleanup (NULL_TREE, cleanups);
@@ -7153,7 +7189,8 @@ expand_expr (exp, target, tmode, modifier)
/* Are we taking the address of a nested function? */
if (TREE_CODE (TREE_OPERAND (exp, 0)) == FUNCTION_DECL
&& decl_function_context (TREE_OPERAND (exp, 0)) != 0
- && ! DECL_NO_STATIC_CHAIN (TREE_OPERAND (exp, 0)))
+ && ! DECL_NO_STATIC_CHAIN (TREE_OPERAND (exp, 0))
+ && ! TREE_STATIC (exp))
{
op0 = trampoline_address (TREE_OPERAND (exp, 0));
op0 = force_operand (op0, target);
@@ -7367,7 +7404,7 @@ expand_expr (exp, target, tmode, modifier)
from the optab already placed in `this_optab'. */
binop:
preexpand_calls (exp);
- if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1)))
+ if (! safe_from_p (subtarget, TREE_OPERAND (exp, 1), 1))
subtarget = 0;
op0 = expand_expr (TREE_OPERAND (exp, 0), subtarget, VOIDmode, 0);
op1 = expand_expr (TREE_OPERAND (exp, 1), NULL_RTX, VOIDmode, 0);
@@ -8017,7 +8054,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
case BUILT_IN_APPLY:
if (arglist == 0
/* Arg could be non-pointer if user redeclared this fcn wrong. */
- || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE
+ || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist)))
|| TREE_CHAIN (arglist) == 0
|| TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist)))) != POINTER_TYPE
|| TREE_CHAIN (TREE_CHAIN (arglist)) == 0
@@ -10600,7 +10637,7 @@ do_store_flag (exp, target, mode, only_cheap)
if (subtarget == 0 || GET_CODE (subtarget) != REG
|| GET_MODE (subtarget) != operand_mode
- || ! safe_from_p (subtarget, inner))
+ || ! safe_from_p (subtarget, inner, 1))
subtarget = 0;
op0 = expand_expr (inner, subtarget, VOIDmode, 0);
@@ -10650,7 +10687,7 @@ do_store_flag (exp, target, mode, only_cheap)
preexpand_calls (exp);
if (subtarget == 0 || GET_CODE (subtarget) != REG
|| GET_MODE (subtarget) != operand_mode
- || ! safe_from_p (subtarget, arg1))
+ || ! safe_from_p (subtarget, arg1, 1))
subtarget = 0;
op0 = expand_expr (arg0, subtarget, VOIDmode, 0);
diff --git a/gcc/expr.h b/gcc/expr.h
index 080992f3dd9..b19c170cc8b 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -1,5 +1,5 @@
/* Definitions for code generation pass of GNU compiler.
- Copyright (C) 1987, 91-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 91-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -138,7 +138,7 @@ extern int target_temp_slot_level;
struct args_size
{
- int constant;
+ HOST_WIDE_INT constant;
tree var;
};
#endif
@@ -200,6 +200,11 @@ enum direction {none, upward, downward}; /* Value has this type. */
#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) PARM_BOUNDARY
#endif
+/* Provide a default value for STRICT_ARGUMENT_NAMING. */
+#ifndef STRICT_ARGUMENT_NAMING
+#define STRICT_ARGUMENT_NAMING 0
+#endif
+
/* Nonzero if we do not know how to pass TYPE solely in registers.
We cannot do so in the following cases:
@@ -729,7 +734,7 @@ extern rtx gen_push_operand PROTO((void));
#ifdef TREE_CODE
/* Generate code to push something onto the stack, given its mode and type. */
extern void emit_push_insn PROTO((rtx, enum machine_mode, tree, rtx, int,
- int, rtx, int, rtx, rtx));
+ int, rtx, int, rtx, rtx, int));
/* Emit library call. */
extern void emit_library_call PVPROTO((rtx orgfun, int no_queue,
diff --git a/gcc/extend.texi b/gcc/extend.texi
index 16f535c7a89..f7598b84d3c 100644
--- a/gcc/extend.texi
+++ b/gcc/extend.texi
@@ -2726,16 +2726,17 @@ In addition, operating systems on one type of cpu may differ in how they
name the registers; then you would need additional conditionals. For
example, some 68000 operating systems call this register @code{%a5}.
-Eventually there may be a way of asking the compiler to choose a register
-automatically, but first we need to figure out how it should choose and
-how to enable you to guide the choice. No solution is evident.
-
Defining such a register variable does not reserve the register; it
remains available for other uses in places where flow control determines
the variable's value is not live. However, these registers are made
-unavailable for use in the reload pass. I would not be surprised if
-excessive use of this feature leaves the compiler too few available
-registers to compile certain functions.
+unavailable for use in the reload pass; excessive use of this feature
+leaves the compiler too few available registers to compile certain
+functions.
+
+This option does not guarantee that GNU CC will generate code that has
+this variable in the register you specify at all times. You may not
+code an explicit reference to this register in an @code{asm} statement
+and assume it will always refer to this variable.
@node Alternate Keywords
@section Alternate Keywords
diff --git a/gcc/final.c b/gcc/final.c
index 6b851f20be7..12e39830784 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1,5 +1,5 @@
/* Convert RTL to assembler code and output it, for GNU compiler.
- Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -3825,11 +3825,16 @@ only_leaf_regs_used ()
int i;
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- {
- if ((regs_ever_live[i] || global_regs[i])
- && ! permitted_reg_in_leaf_functions[i])
- return 0;
- }
+ if ((regs_ever_live[i] || global_regs[i])
+ && ! permitted_reg_in_leaf_functions[i])
+ return 0;
+
+ if (current_function_uses_pic_offset_table
+ && pic_offset_table_rtx != 0
+ && GET_CODE (pic_offset_table_rtx) == REG
+ && ! permitted_reg_in_leaf_functions[REGNO (pic_offset_table_rtx)])
+ return 0;
+
return 1;
}
diff --git a/gcc/fixincludes b/gcc/fixincludes
index 9320094b04f..08c857f73d5 100755
--- a/gcc/fixincludes
+++ b/gcc/fixincludes
@@ -252,9 +252,10 @@ while [ $# != 0 ]; do
# But the argument to egrep must be kept small, or many versions of egrep
# won't be able to handle it.
#
-# We use the pattern [!-.0-~] instead of [^/ ] to match a noncomment
+# We use the pattern [!-.0-z{|}~] instead of [^/ ] to match a noncomment
# following #else or #endif because some buggy egreps think [^/] matches
# newline, and they thus think `#else ' matches `#e[ndiflse]*[ ]+[^/ ]'.
+# [!-.0-~] does not work properly on AIX 4.1.
#
# We use the pattern [^a-zA-Z0-9_][_a-ce-km-z][a-z0-9] to match an identifier
# following #if or #elif that is not surrounded by __. The `a-ce-km-z'
@@ -263,7 +264,7 @@ while [ $# != 0 ]; do
# identifiers below start with `d' or `l'. It also greatly improves
# performance, since many files contain lines of the form `#if ... defined ...'
# or `#if lint'.
- if egrep '//|[ _]_IO|CTRL|^#define.NULL|^#e[nl][ds][ief]*[ ]+[!-.0-~]|^#[el]*if.*[^a-zA-Z0-9_][_a-ce-km-zA-Z][a-zA-Z0-9]' $file >/dev/null; then
+ if egrep '//|[ _]_IO|CTRL|^#define.NULL|^#e[nl][ds][ief]*[ ]+[!-.0-z\{\|\}\~]|^#[el]*if.*[^a-zA-Z0-9_][_a-ce-km-zA-Z][a-zA-Z0-9]' $file >/dev/null; then
if [ -r $file ]; then
cp $file $2/$file >/dev/null 2>&1 \
|| echo "Can't copy $file"
@@ -922,17 +923,21 @@ fi
if [ -r ${LIB}/$file ]; then
echo Fixing $file
+ if grep _GCC_SIZE_T ${LIB}/$file >/dev/null
+ then size_t_pattern='<<< do not double-wrap the size_t typedef >>>'
+ else size_t_pattern='typedef[ a-zA-Z_]*[ ]size_t[ ]*;'
+ fi
sed -e 's/int abort/void abort/g' \
-e 's/int free/void free/g' \
-e 's/char[ ]*\*[ ]*calloc/void \* calloc/g' \
-e 's/char[ ]*\*[ ]*malloc/void \* malloc/g' \
-e 's/char[ ]*\*[ ]*realloc/void \* realloc/g' \
-e 's/int[ ][ ]*exit/void exit/g' \
- -e '/typedef[ a-zA-Z_]*[ ]size_t[ ]*;/i\
+ -e "/$size_t_pattern/"'i\
#ifndef _GCC_SIZE_T\
#define _GCC_SIZE_T
' \
- -e '/typedef[ a-zA-Z_]*[ ]size_t[ ]*;/a\
+ -e "/$size_t_pattern/"'a\
#endif
' \
${LIB}/$file > ${LIB}/${file}.sed
@@ -1856,6 +1861,7 @@ fi
# comment. Fortunately, HP/UX already uses #ifndefs in limits.h; if
# we find a #ifndef FLT_MIN we assume that all the required #ifndefs
# are there, and we do not add them ourselves.
+# Also fix a nested comment problem in sys/limits.h on Motorola sysV68 R3V7.1
for file in limits.h sys/limits.h; do
if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
mkdir ${LIB}/sys 2>/dev/null
@@ -1905,6 +1911,7 @@ for file in limits.h sys/limits.h; do
-e '/[ ]DBL_DIG[ ]/a\
#endif
'\
+ -e '/^\(\/\*#define HUGE_VAL 3\.[0-9e+]* *\)\/\*/s//\1/'\
${LIB}/$file > ${LIB}/${file}.sed
rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
fi
@@ -2871,7 +2878,7 @@ if [ -r ${LIB}/$file ]; then
fi
# sys/lc_core.h on some versions of OSF1/4.x pollutes the namespace by
-# defining regex.h related types. This causes libg++ build and usage failures.
+# defining regex.h types. This causes C++ library build and usage failures.
# Fixing this correctly requires checking and modifying 3 files.
for file in reg_types.h regex.h sys/lc_core.h; do
if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
diff --git a/gcc/flow.c b/gcc/flow.c
index 7c6a17f0e75..a304a915d62 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -1853,13 +1853,15 @@ insn_dead_p (x, needed, call_ok)
regset needed;
int call_ok;
{
- register RTX_CODE code = GET_CODE (x);
+ enum rtx_code code = GET_CODE (x);
+
/* If setting something that's a reg or part of one,
see if that register's altered value will be live. */
if (code == SET)
{
- register rtx r = SET_DEST (x);
+ rtx r = SET_DEST (x);
+
/* A SET that is a subroutine call cannot be dead. */
if (! call_ok && GET_CODE (SET_SRC (x)) == CALL)
return 0;
@@ -1873,15 +1875,13 @@ insn_dead_p (x, needed, call_ok)
&& rtx_equal_p (r, last_mem_set))
return 1;
- while (GET_CODE (r) == SUBREG
- || GET_CODE (r) == STRICT_LOW_PART
- || GET_CODE (r) == ZERO_EXTRACT
- || GET_CODE (r) == SIGN_EXTRACT)
+ while (GET_CODE (r) == SUBREG || GET_CODE (r) == STRICT_LOW_PART
+ || GET_CODE (r) == ZERO_EXTRACT)
r = SUBREG_REG (r);
if (GET_CODE (r) == REG)
{
- register int regno = REGNO (r);
+ int regno = REGNO (r);
/* Don't delete insns to set global regs. */
if ((regno < FIRST_PSEUDO_REGISTER && global_regs[regno])
@@ -1913,26 +1913,33 @@ insn_dead_p (x, needed, call_ok)
return 1;
}
}
+
/* If performing several activities,
insn is dead if each activity is individually dead.
Also, CLOBBERs and USEs can be ignored; a CLOBBER or USE
that's inside a PARALLEL doesn't make the insn worth keeping. */
else if (code == PARALLEL)
{
- register int i = XVECLEN (x, 0);
+ int i = XVECLEN (x, 0);
+
for (i--; i >= 0; i--)
- {
- rtx elt = XVECEXP (x, 0, i);
- if (!insn_dead_p (elt, needed, call_ok)
- && GET_CODE (elt) != CLOBBER
- && GET_CODE (elt) != USE)
- return 0;
- }
+ if (GET_CODE (XVECEXP (x, 0, i)) != CLOBBER
+ && GET_CODE (XVECEXP (x, 0, i)) != USE
+ && ! insn_dead_p (XVECEXP (x, 0, i), needed, call_ok))
+ return 0;
+
return 1;
}
- /* We do not check CLOBBER or USE here.
- An insn consisting of just a CLOBBER or just a USE
- should not be deleted. */
+
+ /* A CLOBBER of a pseudo-register that is dead serves no purpose. That
+ is not necessarily true for hard registers. */
+ else if (code == CLOBBER && GET_CODE (XEXP (x, 0)) == REG
+ && REGNO (XEXP (x, 0)) >= FIRST_PSEUDO_REGISTER
+ && ! REGNO_REG_SET_P (needed, REGNO (XEXP (x, 0))))
+ return 1;
+
+ /* We do not check other CLOBBER or USE here. An insn consisting of just
+ a CLOBBER or just a USE should not be deleted. */
return 0;
}
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 99b913a284e..648dc3b81b3 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -176,7 +176,7 @@ force_fit_type (t, overflow)
low = TREE_INT_CST_LOW (t);
high = TREE_INT_CST_HIGH (t);
- if (TREE_CODE (TREE_TYPE (t)) == POINTER_TYPE)
+ if (POINTER_TYPE_P (TREE_TYPE (t)))
prec = POINTER_SIZE;
else
prec = TYPE_PRECISION (TREE_TYPE (t));
@@ -1499,7 +1499,7 @@ fold_convert (t, arg1)
register tree type = TREE_TYPE (t);
int overflow = 0;
- if (TREE_CODE (type) == POINTER_TYPE || INTEGRAL_TYPE_P (type))
+ if (POINTER_TYPE_P (type) || INTEGRAL_TYPE_P (type))
{
if (TREE_CODE (arg1) == INTEGER_CST)
{
@@ -1519,12 +1519,12 @@ fold_convert (t, arg1)
if ARG1 is a too-large unsigned value and T is signed.
But don't indicate an overflow if converting a pointer. */
TREE_OVERFLOW (t)
- = (TREE_OVERFLOW (arg1)
- || (force_fit_type (t,
- (TREE_INT_CST_HIGH (arg1) < 0
- && (TREE_UNSIGNED (type)
- < TREE_UNSIGNED (TREE_TYPE (arg1)))))
- && TREE_CODE (TREE_TYPE (arg1)) != POINTER_TYPE));
+ = ((force_fit_type (t,
+ (TREE_INT_CST_HIGH (arg1) < 0
+ & (TREE_UNSIGNED (type)
+ < TREE_UNSIGNED (TREE_TYPE (arg1)))))
+ && ! POINTER_TYPE_P (TREE_TYPE (arg1)))
+ || TREE_OVERFLOW (arg1));
TREE_CONSTANT_OVERFLOW (t)
= TREE_OVERFLOW (t) | TREE_CONSTANT_OVERFLOW (arg1);
}
@@ -5128,7 +5128,7 @@ fold (expr)
if CONST+INCR overflows or if foo+incr might overflow.
This optimization is invalid for floating point due to rounding.
For pointer types we assume overflow doesn't happen. */
- if (TREE_CODE (TREE_TYPE (varop)) == POINTER_TYPE
+ if (POINTER_TYPE_P (TREE_TYPE (varop))
|| (! FLOAT_TYPE_P (TREE_TYPE (varop))
&& (code == EQ_EXPR || code == NE_EXPR)))
{
@@ -5163,7 +5163,7 @@ fold (expr)
}
else if (constop && TREE_CODE (varop) == POSTDECREMENT_EXPR)
{
- if (TREE_CODE (TREE_TYPE (varop)) == POINTER_TYPE
+ if (POINTER_TYPE_P (TREE_TYPE (varop))
|| (! FLOAT_TYPE_P (TREE_TYPE (varop))
&& (code == EQ_EXPR || code == NE_EXPR)))
{
@@ -5357,7 +5357,7 @@ fold (expr)
/* An unsigned comparison against 0 can be simplified. */
if (integer_zerop (arg1)
&& (INTEGRAL_TYPE_P (TREE_TYPE (arg1))
- || TREE_CODE (TREE_TYPE (arg1)) == POINTER_TYPE)
+ || POINTER_TYPE_P (TREE_TYPE (arg1)))
&& TREE_UNSIGNED (TREE_TYPE (arg1)))
{
switch (TREE_CODE (t))
@@ -5392,7 +5392,7 @@ fold (expr)
&& TREE_INT_CST_LOW (arg1) == ((HOST_WIDE_INT) 1 << (width - 1)) - 1
&& TREE_INT_CST_HIGH (arg1) == 0
&& (INTEGRAL_TYPE_P (TREE_TYPE (arg1))
- || TREE_CODE (TREE_TYPE (arg1)) == POINTER_TYPE)
+ || POINTER_TYPE_P (TREE_TYPE (arg1)))
&& TREE_UNSIGNED (TREE_TYPE (arg1)))
{
switch (TREE_CODE (t))
diff --git a/gcc/function.c b/gcc/function.c
index 31201b4564a..873c430baf5 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -360,7 +360,7 @@ struct temp_slot
slot above. May be an EXPR_LIST if multiple addresses exist. */
rtx address;
/* The size, in units, of the slot. */
- int size;
+ HOST_WIDE_INT size;
/* The value of `sequence_rtl_expr' when this temporary is allocated. */
tree rtl_expr;
/* Non-zero if this temporary is currently in use. */
@@ -373,10 +373,10 @@ struct temp_slot
int keep;
/* The offset of the slot from the frame_pointer, including extra space
for alignment. This info is for combine_temp_slots. */
- int base_offset;
+ HOST_WIDE_INT base_offset;
/* The size of the slot, including extra space for alignment. This
info is for combine_temp_slots. */
- int full_size;
+ HOST_WIDE_INT full_size;
};
/* List of all temporaries allocated, both available and in use. */
@@ -386,6 +386,10 @@ struct temp_slot *temp_slots;
/* Current nesting level for temporaries. */
int temp_slot_level;
+
+/* Current nesting level for variables in a block. */
+
+int var_temp_slot_level;
/* This structure is used to record MEMs or pseudos used to replace VAR, any
SUBREGs of VAR, and any MEMs containing VAR as an address. We need to
@@ -404,7 +408,7 @@ struct fixup_replacement
static struct temp_slot *find_temp_slot_from_address PROTO((rtx));
static void put_reg_into_stack PROTO((struct function *, rtx, tree,
enum machine_mode, enum machine_mode,
- int, int));
+ int, int, int));
static void fixup_var_refs PROTO((rtx, enum machine_mode, int));
static struct fixup_replacement
*find_fixup_replacement PROTO((struct fixup_replacement **, rtx));
@@ -448,9 +452,11 @@ find_function_data (decl)
tree decl;
{
struct function *p;
+
for (p = outer_function_chain; p; p = p->next)
if (p->decl == decl)
return p;
+
abort ();
}
@@ -513,6 +519,8 @@ push_function_context_to (context)
p->function_call_count = function_call_count;
p->temp_slots = temp_slots;
p->temp_slot_level = temp_slot_level;
+ p->target_temp_slot_level = target_temp_slot_level;
+ p->var_temp_slot_level = var_temp_slot_level;
p->fixup_var_refs_queue = 0;
p->epilogue_delay_list = current_function_epilogue_delay_list;
p->args_info = current_function_args_info;
@@ -523,9 +531,10 @@ push_function_context_to (context)
save_expr_status (p);
save_stmt_status (p);
save_varasm_status (p, context);
-
if (save_machine_status)
(*save_machine_status) (p);
+
+ init_emit ();
}
void
@@ -542,6 +551,7 @@ pop_function_context_from (context)
tree context;
{
struct function *p = outer_function_chain;
+ struct var_refs_queue *queue;
outer_function_chain = p->next;
@@ -592,6 +602,8 @@ pop_function_context_from (context)
function_call_count = p->function_call_count;
temp_slots = p->temp_slots;
temp_slot_level = p->temp_slot_level;
+ target_temp_slot_level = p->target_temp_slot_level;
+ var_temp_slot_level = p->var_temp_slot_level;
current_function_epilogue_delay_list = p->epilogue_delay_list;
reg_renumber = 0;
current_function_args_info = p->args_info;
@@ -608,11 +620,8 @@ pop_function_context_from (context)
/* Finish doing put_var_into_stack for any of our variables
which became addressable during the nested function. */
- {
- struct var_refs_queue *queue = p->fixup_var_refs_queue;
- for (; queue; queue = queue->next)
- fixup_var_refs (queue->modified, queue->promoted_mode, queue->unsignedp);
- }
+ for (queue = p->fixup_var_refs_queue; queue; queue = queue->next)
+ fixup_var_refs (queue->modified, queue->promoted_mode, queue->unsignedp);
free (p);
@@ -655,7 +664,7 @@ get_frame_size ()
rtx
assign_stack_local (mode, size, align)
enum machine_mode mode;
- int size;
+ HOST_WIDE_INT size;
int align;
{
register rtx x, addr;
@@ -724,7 +733,7 @@ assign_stack_local (mode, size, align)
rtx
assign_outer_stack_local (mode, size, align, function)
enum machine_mode mode;
- int size;
+ HOST_WIDE_INT size;
int align;
struct function *function;
{
@@ -792,13 +801,15 @@ assign_outer_stack_local (mode, size, align, function)
KEEP is 1 if this slot is to be retained after a call to
free_temp_slots. Automatic variables for a block are allocated
- with this flag. KEEP is 2, if we allocate a longer term temporary,
- whose lifetime is controlled by CLEANUP_POINT_EXPRs. */
+ with this flag. KEEP is 2 if we allocate a longer term temporary,
+ whose lifetime is controlled by CLEANUP_POINT_EXPRs. KEEP is 3
+ if we are to allocate something at an inner level to be treated as
+ a variable in the block (e.g., a SAVE_EXPR). */
rtx
assign_stack_temp (mode, size, keep)
enum machine_mode mode;
- int size;
+ HOST_WIDE_INT size;
int keep;
{
struct temp_slot *p, *best_p = 0;
@@ -831,7 +842,7 @@ assign_stack_temp (mode, size, keep)
if (GET_MODE (best_p->slot) == BLKmode)
{
int alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT;
- int rounded_size = CEIL_ROUND (size, alignment);
+ HOST_WIDE_INT rounded_size = CEIL_ROUND (size, alignment);
if (best_p->size - rounded_size >= alignment)
{
@@ -862,11 +873,14 @@ assign_stack_temp (mode, size, keep)
/* If we still didn't find one, make a new temporary. */
if (p == 0)
{
- int frame_offset_old = frame_offset;
+ HOST_WIDE_INT frame_offset_old = frame_offset;
+
p = (struct temp_slot *) oballoc (sizeof (struct temp_slot));
+
/* If the temp slot mode doesn't indicate the alignment,
use the largest possible, so no one will be disappointed. */
p->slot = assign_stack_local (mode, size, mode == BLKmode ? -1 : 0);
+
/* The following slot size computation is necessary because we don't
know the actual size of the temporary slot until assign_stack_local
has performed all the frame alignment and size rounding for the
@@ -879,6 +893,7 @@ assign_stack_temp (mode, size, keep)
#else
p->size = size;
#endif
+
/* Now define the fields used by combine_temp_slots. */
#ifdef FRAME_GROWS_DOWNWARD
p->base_offset = frame_offset;
@@ -901,6 +916,11 @@ assign_stack_temp (mode, size, keep)
p->level = target_temp_slot_level;
p->keep = 0;
}
+ else if (keep == 3)
+ {
+ p->level = var_temp_slot_level;
+ p->keep = 0;
+ }
else
{
p->level = temp_slot_level;
@@ -933,7 +953,7 @@ assign_temp (type, keep, memory_required, dont_promote)
if (mode == BLKmode || memory_required)
{
- int size = int_size_in_bytes (type);
+ HOST_WIDE_INT size = int_size_in_bytes (type);
rtx tmp;
/* Unfortunately, we don't yet know how to allocate variable-sized
@@ -969,12 +989,19 @@ combine_temp_slots ()
{
struct temp_slot *p, *q;
struct temp_slot *prev_p, *prev_q;
- /* Determine where to free back to after this function. */
- rtx free_pointer = rtx_alloc (CONST_INT);
+ int num_slots;
+
+ /* If there are a lot of temp slots, don't do anything unless
+ high levels of optimizaton. */
+ if (! flag_expensive_optimizations)
+ for (p = temp_slots, num_slots = 0; p; p = p->next, num_slots++)
+ if (num_slots > 100 || (num_slots > 10 && optimize == 0))
+ return;
for (p = temp_slots, prev_p = 0; p; p = prev_p ? prev_p->next : temp_slots)
{
int delete_p = 0;
+
if (! p->in_use && GET_MODE (p->slot) == BLKmode)
for (q = p->next, prev_q = p; q; q = prev_q->next)
{
@@ -1014,9 +1041,6 @@ combine_temp_slots ()
else
prev_p = p;
}
-
- /* Free all the RTL made by plus_constant. */
- rtx_free (free_pointer);
}
/* Find the temp slot corresponding to the object at address X. */
@@ -1032,6 +1056,7 @@ find_temp_slot_from_address (x)
{
if (! p->in_use)
continue;
+
else if (XEXP (p->slot, 0) == x
|| p->address == x
|| (GET_CODE (x) == PLUS
@@ -1051,7 +1076,7 @@ find_temp_slot_from_address (x)
}
/* Indicate that NEW is an alternate way of referring to the temp slot
- that previous was known by OLD. */
+ that previously was known by OLD. */
void
update_temp_slot_address (old, new)
@@ -1254,6 +1279,17 @@ push_temp_slots ()
temp_slot_level++;
}
+/* Likewise, but save the new level as the place to allocate variables
+ for blocks. */
+
+void
+push_temp_slots_for_block ()
+{
+ push_temp_slots ();
+
+ var_temp_slot_level = temp_slot_level;
+}
+
/* Pop a temporary nesting level. All slots in use in the current level
are freed. */
@@ -1279,6 +1315,7 @@ init_temp_slots ()
/* We have not allocated any temporaries yet. */
temp_slots = 0;
temp_slot_level = 0;
+ var_temp_slot_level = 0;
target_temp_slot_level = 0;
}
@@ -1332,6 +1369,7 @@ put_var_into_stack (decl)
can_use_addressof
= (function == 0
+ && optimize > 0
/* FIXME make it work for promoted modes too */
&& decl_mode == promoted_mode
#ifdef NON_SAVING_SETJMP
@@ -1357,7 +1395,9 @@ put_var_into_stack (decl)
else
put_reg_into_stack (function, reg, TREE_TYPE (decl),
promoted_mode, decl_mode,
- TREE_SIDE_EFFECTS (decl), 0);
+ TREE_SIDE_EFFECTS (decl), 0,
+ TREE_USED (decl)
+ || DECL_INITIAL (decl) != 0);
}
else if (GET_CODE (reg) == CONCAT)
{
@@ -1368,14 +1408,18 @@ put_var_into_stack (decl)
#ifdef FRAME_GROWS_DOWNWARD
/* Since part 0 should have a lower address, do it second. */
put_reg_into_stack (function, XEXP (reg, 1), part_type, part_mode,
- part_mode, TREE_SIDE_EFFECTS (decl), 0);
+ part_mode, TREE_SIDE_EFFECTS (decl), 0,
+ TREE_USED (decl) || DECL_INITIAL (decl) != 0);
put_reg_into_stack (function, XEXP (reg, 0), part_type, part_mode,
- part_mode, TREE_SIDE_EFFECTS (decl), 0);
+ part_mode, TREE_SIDE_EFFECTS (decl), 0,
+ TREE_USED (decl) || DECL_INITIAL (decl) != 0);
#else
put_reg_into_stack (function, XEXP (reg, 0), part_type, part_mode,
- part_mode, TREE_SIDE_EFFECTS (decl), 0);
+ part_mode, TREE_SIDE_EFFECTS (decl), 0,
+ TREE_USED (decl) || DECL_INITIAL (decl) != 0);
put_reg_into_stack (function, XEXP (reg, 1), part_type, part_mode,
- part_mode, TREE_SIDE_EFFECTS (decl), 0);
+ part_mode, TREE_SIDE_EFFECTS (decl), 0,
+ TREE_USED (decl) || DECL_INITIAL (decl) != 0);
#endif
/* Change the CONCAT into a combined MEM for both parts. */
@@ -1405,17 +1449,19 @@ put_var_into_stack (decl)
into the stack frame of FUNCTION (0 means the current function).
DECL_MODE is the machine mode of the user-level data type.
PROMOTED_MODE is the machine mode of the register.
- VOLATILE_P is nonzero if this is for a "volatile" decl. */
+ VOLATILE_P is nonzero if this is for a "volatile" decl.
+ USED_P is nonzero if this reg might have already been used in an insn. */
static void
put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p,
- original_regno)
+ original_regno, used_p)
struct function *function;
rtx reg;
tree type;
enum machine_mode promoted_mode, decl_mode;
int volatile_p;
int original_regno;
+ int used_p;
{
rtx new = 0;
int regno = original_regno;
@@ -1454,7 +1500,8 @@ put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p,
/* Now make sure that all refs to the variable, previously made
when it was a register, are fixed up to be valid again. */
- if (function)
+
+ if (used_p && function != 0)
{
struct var_refs_queue *temp;
@@ -1473,7 +1520,7 @@ put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p,
function->fixup_var_refs_queue = temp;
pop_obstacks ();
}
- else
+ else if (used_p)
/* Variable is local; fix it up now. */
fixup_var_refs (reg, promoted_mode, TREE_UNSIGNED (type));
}
@@ -1561,7 +1608,9 @@ fixup_var_refs_insns (var, promoted_mode, unsignedp, insn, toplevel)
while (insn)
{
rtx next = NEXT_INSN (insn);
+ rtx set, prev, prev_set;
rtx note;
+
if (GET_RTX_CLASS (GET_CODE (insn)) == 'i')
{
/* If this is a CLOBBER of VAR, delete it.
@@ -1587,14 +1636,22 @@ fixup_var_refs_insns (var, promoted_mode, unsignedp, insn, toplevel)
}
/* The insn to load VAR from a home in the arglist
- is now a no-op. When we see it, just delete it. */
+ is now a no-op. When we see it, just delete it.
+ Similarly if this is storing VAR from a register from which
+ it was loaded in the previous insn. This will occur
+ when an ADDRESSOF was made for an arglist slot. */
else if (toplevel
- && GET_CODE (PATTERN (insn)) == SET
- && SET_DEST (PATTERN (insn)) == var
+ && (set = single_set (insn)) != 0
+ && SET_DEST (set) == var
/* If this represents the result of an insn group,
don't delete the insn. */
&& find_reg_note (insn, REG_RETVAL, NULL_RTX) == 0
- && rtx_equal_p (SET_SRC (PATTERN (insn)), var))
+ && (rtx_equal_p (SET_SRC (set), var)
+ || (GET_CODE (SET_SRC (set)) == REG
+ && (prev = prev_nonnote_insn (insn)) != 0
+ && (prev_set = single_set (prev)) != 0
+ && SET_DEST (prev_set) == SET_SRC (set)
+ && rtx_equal_p (SET_SRC (prev_set), var))))
{
/* In unoptimized compilation, we shouldn't call delete_insn
except in jump.c doing warnings. */
@@ -1862,7 +1919,7 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
{
enum machine_mode wanted_mode = VOIDmode;
enum machine_mode is_mode = GET_MODE (tem);
- int pos = INTVAL (XEXP (x, 2));
+ HOST_WIDE_INT pos = INTVAL (XEXP (x, 2));
#ifdef HAVE_extzv
if (GET_CODE (x) == ZERO_EXTRACT)
@@ -1876,7 +1933,7 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
if (wanted_mode != VOIDmode
&& GET_MODE_SIZE (wanted_mode) < GET_MODE_SIZE (is_mode))
{
- int offset = pos / BITS_PER_UNIT;
+ HOST_WIDE_INT offset = pos / BITS_PER_UNIT;
rtx old_pos = XEXP (x, 2);
rtx newmem;
@@ -2062,12 +2119,12 @@ fixup_var_refs_1 (var, promoted_mode, loc, insn, replacements)
enum machine_mode wanted_mode
= insn_operand_mode[(int) CODE_FOR_insv][0];
enum machine_mode is_mode = GET_MODE (tem);
- int pos = INTVAL (XEXP (outerdest, 2));
+ HOST_WIDE_INT pos = INTVAL (XEXP (outerdest, 2));
/* If we have a narrower mode, we can do something. */
if (GET_MODE_SIZE (wanted_mode) < GET_MODE_SIZE (is_mode))
{
- int offset = pos / BITS_PER_UNIT;
+ HOST_WIDE_INT offset = pos / BITS_PER_UNIT;
rtx old_pos = XEXP (outerdest, 2);
rtx newmem;
@@ -2472,7 +2529,7 @@ optimize_bit_field (body, insn, equiv_mem)
that we are now getting rid of,
and then for which byte of the word is wanted. */
- register int offset = INTVAL (XEXP (bitfield, 2));
+ HOST_WIDE_INT offset = INTVAL (XEXP (bitfield, 2));
rtx insns;
/* Adjust OFFSET to count bits from low-address byte. */
@@ -2638,7 +2695,9 @@ gen_mem_addressof (reg, decl)
MEM_VOLATILE_P (reg) = TREE_SIDE_EFFECTS (decl);
MEM_IN_STRUCT_P (reg) = AGGREGATE_TYPE_P (type);
- fixup_var_refs (reg, GET_MODE (reg), TREE_UNSIGNED (type));
+ if (TREE_USED (decl) || DECL_INITIAL (decl) != 0)
+ fixup_var_refs (reg, GET_MODE (reg), TREE_UNSIGNED (type));
+
return reg;
}
@@ -2670,7 +2729,8 @@ put_addressof_into_stack (r)
put_reg_into_stack (0, reg, TREE_TYPE (decl), GET_MODE (reg),
DECL_MODE (decl), TREE_SIDE_EFFECTS (decl),
- ADDRESSOF_REGNO (r));
+ ADDRESSOF_REGNO (r),
+ TREE_USED (decl) || DECL_INITIAL (decl) != 0);
}
/* Helper function for purge_addressof. See if the rtx expression at *LOC
@@ -2721,9 +2781,16 @@ purge_addressof_1 (loc, insn, force)
else if (code == MEM && GET_CODE (XEXP (x, 0)) == ADDRESSOF && ! force)
{
rtx sub = XEXP (XEXP (x, 0), 0);
+
if (GET_CODE (sub) == MEM)
sub = gen_rtx_MEM (GET_MODE (x), copy_rtx (XEXP (sub, 0)));
- if (GET_CODE (sub) == REG && GET_MODE (x) != GET_MODE (sub))
+
+ if (GET_CODE (sub) == REG && MEM_VOLATILE_P (x))
+ {
+ put_addressof_into_stack (XEXP (x, 0));
+ return;
+ }
+ else if (GET_CODE (sub) == REG && GET_MODE (x) != GET_MODE (sub))
{
if (! BYTES_BIG_ENDIAN && ! WORDS_BIG_ENDIAN)
{
@@ -2847,7 +2914,8 @@ instantiate_decls (fndecl, valid_only)
/* Process all parameters of the function. */
for (decl = DECL_ARGUMENTS (fndecl); decl; decl = TREE_CHAIN (decl))
{
- int size = int_size_in_bytes (TREE_TYPE (decl));
+ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (decl));
+
instantiate_decl (DECL_RTL (decl), size, valid_only);
/* If the parameter was promoted, then the incoming RTL mode may be
@@ -2977,7 +3045,7 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
rtx x;
RTX_CODE code;
rtx new = 0;
- int offset = 0;
+ HOST_WIDE_INT offset;
rtx temp;
rtx seq;
int i, j;
@@ -3652,17 +3720,7 @@ assign_parms (fndecl, second_time)
/* Set NAMED_ARG if this arg should be treated as a named arg. For
most machines, if this is a varargs/stdarg function, then we treat
the last named arg as if it were anonymous too. */
-#ifdef STRICT_ARGUMENT_NAMING
- int named_arg = 1;
-#else
- int named_arg = ! last_named;
-#endif
- /* If this is a varargs function, then we want to treat the last named
- argument as if it was an aggregate, because it might be accessed as
- one by the va_arg macros. This is necessary to make the aliasing
- code handle this parm correctly. */
- if (hide_last_arg && last_named)
- aggregate = 1;
+ int named_arg = STRICT_ARGUMENT_NAMING ? 1 : ! last_named;
if (TREE_TYPE (parm) == error_mark_node
/* This can happen after weird syntax errors
@@ -4269,7 +4327,7 @@ assign_parms (fndecl, second_time)
}
/* For pointer data type, suggest pointer register. */
- if (TREE_CODE (TREE_TYPE (parm)) == POINTER_TYPE)
+ if (POINTER_TYPE_P (TREE_TYPE (parm)))
mark_reg_pointer (parmreg,
(TYPE_ALIGN (TREE_TYPE (TREE_TYPE (parm)))
/ BITS_PER_UNIT));
@@ -4324,9 +4382,7 @@ assign_parms (fndecl, second_time)
emit_move_insn (validize_mem (stack_parm),
validize_mem (entry_parm));
}
- if (flag_check_memory_usage
- && entry_parm != stack_parm
- && promoted_mode != nominal_mode)
+ if (flag_check_memory_usage)
{
push_to_sequence (conversion_insns);
emit_library_call (chkr_set_right_libfunc, 1, VOIDmode, 3,
@@ -4811,7 +4867,7 @@ fix_lexical_addr (addr, var)
tree var;
{
rtx basereg;
- int displacement;
+ HOST_WIDE_INT displacement;
tree context = decl_function_context (var);
struct function *fp;
rtx base = 0;
diff --git a/gcc/function.h b/gcc/function.h
index a0a37467ab5..f90830b94f4 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -1,5 +1,5 @@
/* Structure for saving state for a nested function.
- Copyright (C) 1989, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -108,6 +108,8 @@ struct function
int function_call_count;
struct temp_slot *temp_slots;
int temp_slot_level;
+ int target_temp_slot_level;
+ int var_temp_slot_level;
/* This slot is initialized as 0 and is added to
during the nested function. */
struct var_refs_queue *fixup_var_refs_queue;
diff --git a/gcc/gansidecl.h b/gcc/gansidecl.h
index fff81d494e2..09a369afd4e 100644
--- a/gcc/gansidecl.h
+++ b/gcc/gansidecl.h
@@ -1,5 +1,5 @@
/* ANSI and traditional C compatibility macros.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -77,6 +77,9 @@ Boston, MA 02111-1307, USA. */
#endif /* ! __STDC__ */
+/* We don't have autoconf for libgcc2.c since it's a target, so don't
+ define these functions, which aren't used there anyway. */
+#ifndef IN_LIBGCC2
#ifndef bcopy
# ifdef HAVE_BCOPY
# ifdef NEED_DECLARATION_BCOPY
@@ -119,4 +122,6 @@ int bcmp ();
# endif
#endif
+#endif /* IN_LIBGCC2 */
+
#endif /* ANSIDECL_H */
diff --git a/gcc/gbl-ctors.h b/gcc/gbl-ctors.h
index 6393a9045ab..50e0e567636 100644
--- a/gcc/gbl-ctors.h
+++ b/gcc/gbl-ctors.h
@@ -2,7 +2,7 @@
for getting g++ file-scope static objects constructed. This file
will get included either by libgcc2.c (for systems that don't support
a .init section) or by crtstuff.c (for those that do).
- Copyright (C) 1991, 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1995, 1996, 1998 Free Software Foundation, Inc.
Contributed by Ron Guilmette (rfg@segfault.us.com)
This file is part of GNU CC.
@@ -39,8 +39,6 @@ Boston, MA 02111-1307, USA. */
#ifdef HAVE_ATEXIT
#if defined (WINNT) || defined (NEED_ATEXIT)
extern int atexit (void (*) (void));
-#else
-extern void atexit (void (*) (void));
#endif
#define ON_EXIT(FUNC,ARG) atexit ((FUNC))
#else
diff --git a/gcc/gcc.c b/gcc/gcc.c
index ac0b36c10bc..37d5ebc6cad 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -2527,7 +2527,7 @@ process_command (argc, argv)
}
else if (! strcmp (argv[i], "-dumpversion"))
{
- printf ("%s\n", version_string);
+ printf ("%s\n", spec_version);
exit (0);
}
else if (! strcmp (argv[i], "-dumpmachine"))
@@ -2746,6 +2746,36 @@ process_command (argc, argv)
spec_version = p + 1;
compiler_version = spec_version;
warn_std_ptr = &warn_std;
+
+ /* Validate the version number. Use the same checks
+ done when inserting it into a spec.
+
+ The format of the version string is
+ ([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)? */
+ {
+ char *v = compiler_version;
+
+ /* Ignore leading non-digits. i.e. "foo-" in "foo-2.7.2". */
+ while (! isdigit (*v))
+ v++;
+
+ if (v > compiler_version && v[-1] != '-')
+ fatal ("invalid version number format");
+
+ /* Set V after the first period. */
+ while (isdigit (*v))
+ v++;
+
+ if (*v != '.')
+ fatal ("invalid version number format");
+
+ v++;
+ while (isdigit (*v))
+ v++;
+
+ if (*v != 0 && *v != ' ' && *v != '.' && *v != '-')
+ fatal ("invalid version number format");
+ }
break;
case 'c':
@@ -2901,23 +2931,23 @@ process_command (argc, argv)
for (j = 4; argv[i][j]; j++)
if (argv[i][j] == ',')
{
- infiles[n_infiles].language = 0;
+ infiles[n_infiles].language = "*";
infiles[n_infiles++].name
= save_string (argv[i] + prev, j - prev);
prev = j + 1;
}
/* Record the part after the last comma. */
- infiles[n_infiles].language = 0;
+ infiles[n_infiles].language = "*";
infiles[n_infiles++].name = argv[i] + prev;
}
else if (strcmp (argv[i], "-Xlinker") == 0)
{
- infiles[n_infiles].language = 0;
+ infiles[n_infiles].language = "*";
infiles[n_infiles++].name = argv[++i];
}
else if (strncmp (argv[i], "-l", 2) == 0)
{
- infiles[n_infiles].language = 0;
+ infiles[n_infiles].language = "*";
infiles[n_infiles++].name = argv[i];
}
else if (strcmp (argv[i], "-specs") == 0)
@@ -4528,7 +4558,15 @@ main (argc, argv)
as a unit. If GCC_EXEC_PREFIX is defined, base
standard_startfile_prefix on that as well. */
if (*standard_startfile_prefix == '/'
- || *standard_startfile_prefix == DIR_SEPARATOR)
+ || *standard_startfile_prefix == DIR_SEPARATOR
+ || *standard_startfile_prefix == '$'
+#ifdef __MSDOS__
+ /* Check for disk name on MS-DOS-based systems. */
+ || (standard_startfile_prefix[1] == ':'
+ && (standard_startfile_prefix[2] == DIR_SEPARATOR
+ || standard_startfile_prefix[2] == '/'))
+#endif
+ )
add_prefix (&startfile_prefixes, standard_startfile_prefix, "BINUTILS",
0, 0, NULL_PTR);
else
@@ -4796,7 +4834,7 @@ main (argc, argv)
/* Find the proper compilation spec for the file name NAME,
whose length is LENGTH. LANGUAGE is the specified language,
- or 0 if none specified. */
+ or 0 if this file is to be passed to the linker. */
static struct compiler *
lookup_compiler (name, length, language)
@@ -4806,19 +4844,19 @@ lookup_compiler (name, length, language)
{
struct compiler *cp;
- /* Look for the language, if one is spec'd. */
+ /* If this was specified by the user to be a linker input, indicate that. */
+ if (language != 0 && language[0] == '*')
+ return 0;
+
+ /* Otherwise, look for the language, if one is spec'd. */
if (language != 0)
{
for (cp = compilers + n_compilers - 1; cp >= compilers; cp--)
- {
- if (language != 0)
- {
- if (cp->suffix[0] == '@'
- && !strcmp (cp->suffix + 1, language))
- return cp;
- }
- }
+ if (cp->suffix[0] == '@' && !strcmp (cp->suffix + 1, language))
+ return cp;
+
error ("language %s not recognized", language);
+ return 0;
}
/* Look for a suffix. */
@@ -4826,23 +4864,24 @@ lookup_compiler (name, length, language)
{
if (/* The suffix `-' matches only the file name `-'. */
(!strcmp (cp->suffix, "-") && !strcmp (name, "-"))
- ||
- (strlen (cp->suffix) < length
- /* See if the suffix matches the end of NAME. */
+ || (strlen (cp->suffix) < length
+ /* See if the suffix matches the end of NAME. */
#ifdef OS2
- && (!strcmp (cp->suffix,
- name + length - strlen (cp->suffix))
- || !strpbrk (cp->suffix, "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
- && !strcasecmp (cp->suffix,
- name + length - strlen (cp->suffix)))))
+ && ((!strcmp (cp->suffix,
+ name + length - strlen (cp->suffix))
+ || !strpbrk (cp->suffix, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"))
+ && !strcasecmp (cp->suffix,
+ name + length - strlen (cp->suffix)))
#else
- && !strcmp (cp->suffix,
- name + length - strlen (cp->suffix))))
+ && !strcmp (cp->suffix,
+ name + length - strlen (cp->suffix))
#endif
+ ))
{
if (cp->spec[0][0] == '@')
{
struct compiler *new;
+
/* An alias entry maps a suffix to a language.
Search for the language; pass 0 for NAME and LENGTH
to avoid infinite recursion if language not found.
@@ -4854,6 +4893,7 @@ lookup_compiler (name, length, language)
(char *) new->spec, sizeof new->spec);
return new;
}
+
/* A non-alias entry: return it. */
return cp;
}
@@ -4968,6 +5008,8 @@ pfatal_pexecute (errmsg_fmt, errmsg_arg)
char *errmsg_fmt;
char *errmsg_arg;
{
+ int save_errno = errno;
+
if (errmsg_arg)
{
/* Space for trailing '\0' is in %s. */
@@ -4976,7 +5018,7 @@ pfatal_pexecute (errmsg_fmt, errmsg_arg)
errmsg_fmt = msg;
}
- fatal ("%s: %s", errmsg_fmt, my_strerror (errno));
+ fatal ("%s: %s", errmsg_fmt, my_strerror (save_errno));
}
/* More 'friendly' abort that prints the line and file.
diff --git a/gcc/gcc.hlp b/gcc/gcc.hlp
index 7ba1264a234..26e22faba29 100644
--- a/gcc/gcc.hlp
+++ b/gcc/gcc.hlp
@@ -86,9 +86,6 @@
In the case of the sharable library, only one library needs to be
linked to.
- If you need to link to libg++, it is easiest to use the command
- procedure supplied with libg++ to link your program.
-
2 /CASE_HACK
/[NO]CASE_HACK D=/CASE_HACK
diff --git a/gcc/gcc.texi b/gcc/gcc.texi
index 2a54a70900b..da2804ddc87 100644
--- a/gcc/gcc.texi
+++ b/gcc/gcc.texi
@@ -111,23 +111,21 @@ notice identical to this one except for the removal of this paragraph
@end ignore
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
-sections entitled ``GNU General Public License,'' ``Funding for Free
-Software,'' and ``Protect Your Freedom---Fight `Look And Feel'@w{}'' are
-included exactly as in the original, and provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
+sections entitled ``GNU General Public License'' and ``Funding for Free
+Software'' are included exactly as in the original, and provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
-except that the sections entitled ``GNU General Public License,''
-``Funding for Free Software,'' and ``Protect Your Freedom---Fight `Look
-And Feel'@w{}'', and this permission notice, may be included in
-translations approved by the Free Software Foundation instead of in the
-original English.
+except that the sections entitled ``GNU General Public License'' and
+``Funding for Free Software'', and this permission notice, may be
+included in translations approved by the Free Software Foundation
+instead of in the original English.
@end ifinfo
@setchapternewpage odd
-
+@c @finalout
@titlepage
@ifset INTERNALS
@ifset USING
@@ -144,23 +142,23 @@ original English.
@sp 2
@center Richard M. Stallman
@sp 3
-@center Last updated 7 January 1998
+@center Last updated 16 March 1998
@sp 1
-@c The version number appears three times more in this file.
+@c The version number appears five times more in this file.
@center for egcs-1.0
@page
@vskip 0pt plus 1filll
-Copyright @copyright{} 1988, 89, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
+Copyright @copyright{} 1988, 89, 92, 93, 94, 95, 96, 98 Free Software Foundation, Inc.
@sp 2
For EGCS Version 1.0@*
@sp 1
Published by the Free Software Foundation @*
59 Temple Place - Suite 330@*
Boston, MA 02111-1307, USA@*
-Last printed November, 1995.@*
+Last printed April, 1998.@*
Printed copies are available for $50 each.@*
-ISBN 1-882114-36-1
+ISBN 1-882114-37-X
@sp 1
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -168,19 +166,17 @@ are preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
-sections entitled ``GNU General Public License,'' ``Funding for Free
-Software,'' and ``Protect Your Freedom---Fight `Look And Feel'@w{}'' are
-included exactly as in the original, and provided that the entire
-resulting derived work is distributed under the terms of a permission
-notice identical to this one.
+sections entitled ``GNU General Public License'' and ``Funding for Free
+Software'' are included exactly as in the original, and provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
-except that the sections entitled ``GNU General Public License,''
-``Funding for Free Software,'' and ``Protect Your Freedom---Fight `Look
-And Feel'@w{}'', and this permission notice, may be included in
-translations approved by the Free Software Foundation instead of in the
-original English.
+except that the sections entitled ``GNU General Public License'' and
+``Funding for Free Software'', and this permission notice, may be
+included in translations approved by the Free Software Foundation
+instead of in the original English.
@end titlepage
@page
@@ -236,7 +232,7 @@ bugs. It corresponds to EGCS version 1.0.
@end ifset
* Funding:: How to help assure funding for free software.
-* Look and Feel:: Protect your freedom---fight ``look and feel''.
+* GNU/Linux:: Linux and the GNU Project
* Copying:: GNU General Public License says
how you can copy and share GNU CC.
@@ -1122,7 +1118,7 @@ the ordinary C compiler. If you do so, you must specify the following
options:
@smallexample
--L/usr/local/lib/gcc-lib/we32k-att-sysv/2.7.1 -lgcc -lc_s
+-L/usr/local/lib/gcc-lib/we32k-att-sysv/2.8.1 -lgcc -lc_s
@end smallexample
The first specifies where to find the library @file{libgcc.a}
@@ -3864,9 +3860,9 @@ procedure will build all combinations of compatible options.
For example, if you set @code{MULTILIB_OPTIONS} to @samp{m68000/m68020
msoft-float}, @file{Makefile} will build special versions of
-@file{libgcc.a} using the sets of options @samp{-m68000}, @samp{-m68020},
-@samp{-msoft-float}, @samp{-m68000 -msoft-float}, and @samp{-m68020
--msoft-float}.
+@file{libgcc.a} using the following sets of options: @samp{-m68000},
+@samp{-m68020}, @samp{-msoft-float}, @samp{-m68000 -msoft-float}, and
+@samp{-m68020 -msoft-float}.
@findex MULTILIB_DIRNAMES
@item MULTILIB_DIRNAMES
@@ -3877,7 +3873,7 @@ Write one element in @code{MULTILIB_DIRNAMES} for each element in
default value will be @code{MULTILIB_OPTIONS}, with all slashes treated
as spaces.
-For example, if @code{MULTILIB_OPTIONS} is specified as @samp{m68000/m68020
+For example, if @code{MULTILIB_OPTIONS} is set to @samp{m68000/m68020
msoft-float}, then the default value of @code{MULTILIB_DIRNAMES} is
@samp{m68000 m68020 msoft-float}. You may specify a different value if
you desire a different set of directory names.
@@ -3992,191 +3988,104 @@ Verbatim copying and redistribution of this section is permitted
without royalty; alteration is not permitted.
@end display
-@node Look and Feel
-@unnumbered Protect Your Freedom---Fight ``Look And Feel''
-@c the above chapter heading overflows onto the next line. --mew 1/26/93
-
-@quotation
-@i{This section is a political message from the League for Programming
-Freedom to the users of GNU CC. We have included it here because the
-issue of interface copyright is important to the GNU project.}
-@end quotation
-
-Apple, Lotus, and now CDC have tried to create a new form of legal
-monopoly: a copyright on a user interface.
-
-An interface is a kind of language---a set of conventions for
-communication between two entities, human or machine. Until a few years
-ago, the law seemed clear: interfaces were outside the domain of
-copyright, so programmers could program freely and implement whatever
-interface the users demanded. Imitating de-facto standard interfaces,
-sometimes with improvements, was standard practice in the computer
-field. These improvements, if accepted by the users, caught on and
-became the norm; in this way, much progress took place.
-
-Computer users, and most software developers, were happy with this state
-of affairs. However, large companies such as Apple and Lotus would
-prefer a different system---one in which they can own interfaces and
-thereby rid themselves of all serious competitors. They hope that
-interface copyright will give them, in effect, monopolies on major
-classes of software.
-
-Other large companies such as IBM and Digital also favor interface
-monopolies, for the same reason: if languages become property, they
-expect to own many de-facto standard languages. But Apple and Lotus are
-the ones who have actually sued. Apple's lawsuit was defeated, for
-reasons only partly related to the general issue of interface copyright.
-
-Lotus won lawsuits against two small companies, which were thus put out
-of business. Then Lotus sued Borland; Lotus won in the trial court (no
-surprise, since it was the same court that had ruled for Lotus twice
-before), but the court of appeals ruled in favor of Borland, which was
-assisted by a friend-of-the-court brief from the League for Programming
-Freedom.
-
-Lotus appealed the case to the Supreme Court, which heard the case but
-was unable to reach a decision. This failure means that the appeals
-court decision stands, in one portion of the United States, and may
-influence the other appeals courts, but it does not set a nationwide
-precedent. The battle is not over, and it is not limited to the United
-States.
-
-The battle is extending into other areas of software as well. In 1995 a
-company that produced a simulator for a CDC computer was shut down by a
-copyright lawsuit, in which CDC charged that the simulator infringed the
-copyright on the manuals for the computer.
-
-If the monopolists get their way, they will hobble the software field:
-
-@itemize @bullet
-@item
-Gratuitous incompatibilities will burden users. Imagine if each car
-manufacturer had to design a different way to start, stop, and steer a
-car.
-
-@item
-Users will be ``locked in'' to whichever interface they learn; then they
-will be prisoners of one supplier, who will charge a monopolistic price.
-
-@item
-Large companies have an unfair advantage wherever lawsuits become
-commonplace. Since they can afford to sue, they can intimidate smaller
-developers with threats even when they don't really have a case.
-
-@item
-Interface improvements will come slower, since incremental evolution
-through creative partial imitation will no longer occur.
-@end itemize
-
-If interface monopolies are accepted, other large companies are waiting
-to grab theirs:
-
-@itemize @bullet
-@item
-Adobe is expected to claim a monopoly on the interfaces of various
-popular application programs, if Lotus ultimately wins the case against
-Borland.
-
-@item
-Open Computing magazine reported a Microsoft vice president as threatening
-to sue people who imitate the interface of Windows.
-@end itemize
-
-Users invest a great deal of time and money in learning to use computer
-interfaces. Far more, in fact, than software developers invest in
-developing @emph{and even implementing} the interfaces. Whoever can own
-an interface, has made its users into captives, and misappropriated
-their investment.
-
-To protect our freedom from monopolies like these, a group of
-programmers and users have formed a grass-roots political organization,
-the League for Programming Freedom.
-
-The purpose of the League is to oppose monopolistic practices such as
-interface copyright and software patents. The League calls for a return
-to the legal policies of the recent past, in which programmers could
-program freely. The League is not concerned with free software as an
-issue, and is not affiliated with the Free Software Foundation.
-
-The League's activities include publicizing the issues, as is being done
-here, and filing friend-of-the-court briefs on behalf of defendants sued
-by monopolists.
-
-The League's membership rolls include Donald Knuth, the foremost
-authority on algorithms, John McCarthy, inventor of Lisp, Marvin Minsky,
-founder of the MIT Artificial Intelligence lab, Guy L. Steele, Jr.,
-author of well-known books on Lisp and C, as well as Richard Stallman,
-the developer of GNU CC. Please join and add your name to the list.
-Membership dues in the League are $42 per year for programmers, managers
-and professionals; $10.50 for students; $21 for others.
-
-Activist members are especially important, but members who have no time
-to give are also important. Surveys at major ACM conferences have
-indicated a vast majority of attendees agree with the League on both
-issues (interface copyrights and software patents). If just ten percent
-of the programmers who agree with the League join the League, we will
-probably triumph.
-
-To join, or for more information, send electronic mail to
-the address @code{lpf@@uunet.uu.net} or write to:
-
-@display
-League for Programming Freedom
-1 Kendall Square #143
-P.O. Box 9171
-Cambridge, MA 02139
-@end display
-
-In addition to joining the League, here are some suggestions from the
-League for other things you can do to protect your freedom to write
-programs:
-
-@itemize @bullet
-@item
-Tell your friends and colleagues about this issue and how it threatens
-to ruin the computer industry.
-
-@item
-Mention that you are a League member in your @file{.signature}, and
-mention the League's email address for inquiries.
-
-@item
-Ask the companies you consider working for or working with to make
-statements against software monopolies, and give preference to those
-that do.
-
-@item
-When employers ask you to sign contracts giving them copyright on your
-work, insist on a clause saying they will not claim the copyright covers
-imitating the interface.
-
-@item
-When employers ask you to sign contracts giving them patent rights,
-insist on clauses saying they can use these rights only defensively.
-Don't rely on ``company policy,'' since that can change at any time;
-don't rely on an individual executive's private word, since that person
-may be replaced. Get a commitment just as binding as the commitment
-they get from you.
-
-@item
-Write to Congress to explain the importance of these issues.
-
-@display
-House Subcommittee on Intellectual Property
-2137 Rayburn Bldg
-Washington, DC 20515
-
-Senate Subcommittee on Patents, Trademarks and Copyrights
-United States Senate
-Washington, DC 20510
-@end display
-
-(These committees have received lots of mail already; let's give them
-even more.)
-@end itemize
-
-Democracy means nothing if you don't use it. Stand up and be counted!
-
+@node GNU/Linux
+@unnumbered Linux and the GNU Project
+
+Many computer users run a modified version of the GNU system every
+day, without realizing it. Through a peculiar turn of events, the
+version of GNU which is widely used today is more often known as
+``Linux'', and many users are not aware of the extent of its
+connection with the GNU Project.
+
+There really is a Linux; it is a kernel, and these people are using
+it. But you can't use a kernel by itself; a kernel is useful only as
+part of a whole system. The system in which Linux is typically used
+is a modified variant of the GNU system---in other words, a Linux-based
+GNU system.
+
+Many users are not fully aware of the distinction between the kernel,
+which is Linux, and the whole system, which they also call ``Linux''.
+The ambiguous use of the name doesn't promote understanding.
+
+Programmers generally know that Linux is a kernel. But since they
+have generally heard the whole system called ``Linux'' as well, they
+often envisage a history which fits that name. For example, many
+believe that once Linus Torvalds finished writing the kernel, his
+friends looked around for other free software, and for no particular
+reason most everything necessary to make a Unix-like system was
+already available.
+
+What they found was no accident---it was the GNU system. The available
+free software added up to a complete system because the GNU Project
+had been working since 1984 to make one. The GNU Manifesto
+had set forth the goal of developing a free Unix-like system, called
+GNU. By the time Linux was written, the system was almost finished.
+
+Most free software projects have the goal of developing a particular
+program for a particular job. For example, Linus Torvalds set out to
+write a Unix-like kernel (Linux); Donald Knuth set out to write a text
+formatter (TeX); Bob Scheifler set out to develop a window system (X
+Windows). It's natural to measure the contribution of this kind of
+project by specific programs that came from the project.
+
+If we tried to measure the GNU Project's contribution in this way,
+what would we conclude? One CD-ROM vendor found that in their ``Linux
+distribution'', GNU software was the largest single contingent, around
+28% of the total source code, and this included some of the essential
+major components without which there could be no system. Linux itself
+was about 3%. So if you were going to pick a name for the system
+based on who wrote the programs in the system, the most appropriate
+single choice would be ``GNU''.
+
+But we don't think that is the right way to consider the question.
+The GNU Project was not, is not, a project to develop specific
+software packages. It was not a project to develop a C compiler,
+although we did. It was not a project to develop a text editor,
+although we developed one. The GNU Project's aim was to develop
+@emph{a complete free Unix-like system}.
+
+Many people have made major contributions to the free software in the
+system, and they all deserve credit. But the reason it is @emph{a
+system}---and not just a collection of useful programs---is because the
+GNU Project set out to make it one. We wrote the programs that were
+needed to make a @emph{complete} free system. We wrote essential but
+unexciting major components, such as the assembler and linker, because
+you can't have a system without them. A complete system needs more
+than just programming tools, so we wrote other components as well,
+such as the Bourne Again SHell, the PostScript interpreter
+Ghostscript, and the GNU C library.
+
+By the early 90s we had put together the whole system aside from the
+kernel (and we were also working on a kernel, the GNU Hurd, which runs
+on top of Mach). Developing this kernel has been a lot harder than we
+expected, and we are still working on finishing it.
+
+Fortunately, you don't have to wait for it, because Linux is working
+now. When Linus Torvalds wrote Linux, he filled the last major gap.
+People could then put Linux together with the GNU system to make a
+complete free system: a Linux-based GNU system (or GNU/Linux system,
+for short).
+
+Putting them together sounds simple, but it was not a trivial job.
+The GNU C library (called glibc for short) needed substantial changes.
+Integrating a complete system as a distribution that would work ``out
+of the box'' was a big job, too. It required addressing the issue of
+how to install and boot the system---a problem we had not tackled,
+because we hadn't yet reached that point. The people who developed
+the various system distributions made a substantial contribution.
+
+The GNU Project supports GNU/Linux systems as well as @emph{the}
+GNU system---even with funds. We funded the rewriting of the
+Linux-related extensions to the GNU C library, so that now they are
+well integrated, and the newest GNU/Linux systems use the current
+library release with no changes. We also funded an early stage of the
+development of Debian GNU/Linux.
+
+We use Linux-based GNU systems today for most of our work, and we hope
+you use them too. But please don't confuse the public by using the
+name ``Linux'' ambiguously. Linux is the kernel, one of the essential
+major components of the system. The system as a whole is more or less
+the GNU system.
@node Copying
@unnumbered GNU GENERAL PUBLIC LICENSE
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index 0ddd2a8a141..d0b481ec997 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -361,6 +361,7 @@ int optimize = 0;
They won't actually be used. */
struct _global_rtl global_rtl;
+rtx pic_offset_table_rtx;
static rtx attr_rtx PVPROTO((enum rtx_code, ...));
#ifdef HAVE_VPRINTF
diff --git a/gcc/install.texi b/gcc/install.texi
index 09fcfcb4865..5f6882605d9 100644
--- a/gcc/install.texi
+++ b/gcc/install.texi
@@ -67,8 +67,8 @@ to specify a configuration when building a native compiler unless
wrong.
In those cases, specify the build machine's @dfn{configuration name}
-with the @samp{--build} option; the host and target will default to be
-the same as the build machine. (If you are building a cross-compiler,
+with the @samp{--host} option; the host and target will default to be
+the same as the host machine. (If you are building a cross-compiler,
see @ref{Cross-Compiler}.)
Here is an example:
@@ -261,18 +261,19 @@ If you want to install its files somewhere else, specify
is a directory name to use instead of @file{/usr/local} for all purposes
with one exception: the directory @file{/usr/local/include} is searched
for header files no matter where you install the compiler. To override
-this name, use the @code{--local-prefix} option below.
+this name, use the @code{--with-local-prefix} option below. The directory
+you specify need not exist, but its parent directory must exist.
@item
-Specify @samp{--local-prefix=@var{dir}} if you want the compiler to
+Specify @samp{--with-local-prefix=@var{dir}} if you want the compiler to
search directory @file{@var{dir}/include} for locally installed header
files @emph{instead} of @file{/usr/local/include}.
-You should specify @samp{--local-prefix} @strong{only} if your site has
+You should specify @samp{--with-local-prefix} @strong{only} if your site has
a different convention (not @file{/usr/local}) for where to put
site-specific files.
-The default value for @samp{--local-prefix} is @file{/usr/local}
+The default value for @samp{--with-local-prefix} is @file{/usr/local}
regardless of the value of @samp{--prefix}. Specifying @samp{--prefix}
has no effect on which directory GNU CC searches for local header files.
This may seem counterintuitive, but actually it is logical.
@@ -283,8 +284,8 @@ any in that directory---are not part of GNU CC. They are part of other
programs---perhaps many others. (GNU CC installs its own header files
in another directory which is based on the @samp{--prefix} value.)
-@strong{Do not} specify @file{/usr} as the @samp{--local-prefix}! The
-directory you use for @samp{--local-prefix} @strong{must not} contain
+@strong{Do not} specify @file{/usr} as the @samp{--with-local-prefix}! The
+directory you use for @samp{--with-local-prefix} @strong{must not} contain
any of the system's standard header files. If it did contain them,
certain programs would be miscompiled (including GNU Emacs, on certain
targets), because this would override and nullify the header file
@@ -507,11 +508,11 @@ This copies the files @file{cc1}, @file{cpp} and @file{libgcc.a} to
files @file{cc1}, @file{cpp} and @file{libgcc.a} in the directory
@file{/usr/local/lib/gcc-lib/@var{target}/@var{version}}, which is where
the compiler driver program looks for them. Here @var{target} is the
-target machine type specified when you ran @file{configure}, and
-@var{version} is the version number of GNU CC. This naming scheme
-permits various versions and/or cross-compilers to coexist.
-It also copies the executables for compilers for other languages
-(e.g., @file{cc1plus} for C++) to the same directory.
+canonicalized form of target machine type specified when you ran
+@file{configure}, and @var{version} is the version number of GNU CC.
+This naming scheme permits various versions and/or cross-compilers to
+coexist. It also copies the executables for compilers for other
+languages (e.g., @file{cc1plus} for C++) to the same directory.
This also copies the driver program @file{xgcc} into
@file{/usr/local/bin/gcc}, so that it appears in typical execution
@@ -542,7 +543,13 @@ distribute a C runtime library, it also does not include a C++ runtime
library. All I/O functionality, special class libraries, etc., are
provided by the C++ runtime library.
-Here's one way to build and install a C++ runtime library for GNU CC:
+The standard C++ runtime library for GNU CC is called @samp{libstdc++}.
+An obsolescent library @samp{libg++} may also be available, but it's
+necessary only for older software that hasn't been converted yet; if
+you don't know whether you need @samp{libg++} then you probably don't
+need it.
+
+Here's one way to build and install @samp{libstdc++} for GNU CC:
@itemize @bullet
@item
@@ -856,9 +863,10 @@ particular configuration.
AMD Am29050 used in a system running a variant of BSD Unix.
@item decstation-*
-DECstations can support three different personalities: Ultrix,
-DEC OSF/1, and OSF/rose. To configure GCC for these platforms
-use the following configurations:
+MIPS-based DECstations can support three different personalities:
+Ultrix, DEC OSF/1, and OSF/rose. (Alpha-based DECstation products have
+a configuration name beginning with @samp{alpha-dec}.) To configure GCC
+for these platforms use the following configurations:
@table @samp
@item decstation-ultrix
@@ -1109,7 +1117,7 @@ that configuration with + the @samp{--with-gnu-as} and @samp{--with-gnu-ld}
options to @code{configure}.
Note the C compiler that comes
-with this system cannot compile GNU CC. You can fine binaries of GNU CC
+with this system cannot compile GNU CC. You can find binaries of GNU CC
for bootstrapping on @code{jagubox.gsfc.nasa.gov}.
You will also a patched version of @file{/bin/ld} there that
raises some of the arbitrary limits found in the original.
@@ -1962,9 +1970,13 @@ To install the cross-compiler, use @samp{make install}, as usual.
@cindex Sun installation
@cindex installing GNU CC on the Sun
-On Solaris (version 2.1), do not use the linker or other tools in
+On Solaris, do not use the linker or other tools in
@file{/usr/ucb} to build GNU CC. Use @code{/usr/ccs/bin}.
+If the assembler reports @samp{Error: misaligned data} when bootstrapping,
+you are probably using an obsolete version of the GNU assembler. Upgrade
+to the latest version of GNU @code{binutils}, or use the Solaris assembler.
+
Make sure the environment variable @code{FLOAT_OPTION} is not set when
you compile @file{libgcc.a}. If this option were set to @code{f68881}
when @file{libgcc.a} is compiled, the resulting code would demand to be
diff --git a/gcc/install1.texi b/gcc/install1.texi
index 82ef9b6ba67..21c08b93401 100644
--- a/gcc/install1.texi
+++ b/gcc/install1.texi
@@ -1,7 +1,7 @@
@setfilename INSTALL
@set INSTALLONLY
-@c This file itself, install1.texi, does not apear in the GCC distribution.
+@c This file itself, install1.texi, does not appear in the GCC distribution.
@c The immediately following lines apply to the INSTALL file
@c which is generated using this file.
This file documents the installation of the GNU compiler.
diff --git a/gcc/integrate.c b/gcc/integrate.c
index cde8b6f3e7d..ea1acc4161b 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -82,13 +82,13 @@ static void set_block_abstract_flags PROTO((tree, int));
void set_decl_abstract_flags PROTO((tree, int));
/* Returns the Ith entry in the label_map contained in MAP. If the
- Ith entry has not yet been set, it is assumed to be a fresh label.
- Essentially, we use this function to perform a lazy initialization
- of label_map, thereby avoiding huge memory explosions when the
- label_map gets very large. */
+ Ith entry has not yet been set, return a fresh label. This function
+ performs a lazy initialization of label_map, thereby avoiding huge memory
+ explosions when the label_map gets very large. */
+
rtx
get_label_from_map (map, i)
- struct inline_remap* map;
+ struct inline_remap *map;
int i;
{
rtx x = map->label_map[i];
@@ -99,7 +99,6 @@ get_label_from_map (map, i)
return x;
}
-
/* Zero if the current function (whose FUNCTION_DECL is FNDECL)
is safe and reasonable to integrate into other functions.
Nonzero means value is a warning message with a single %s
@@ -116,9 +115,7 @@ function_cannot_inline_p (fndecl)
register tree parms;
rtx result;
- /* No inlines with varargs. `grokdeclarator' gives a warning
- message about that if `inline' is specified. This code
- it put in to catch the volunteers. */
+ /* No inlines with varargs. */
if ((last && TREE_VALUE (last) != void_type_node)
|| current_function_varargs)
return "varargs function cannot be inline";
@@ -298,6 +295,7 @@ initialize_for_inline (fndecl, min_labelno, max_labelno, max_reg, copy)
parms = TREE_CHAIN (parms), i++)
{
rtx p = DECL_RTL (parms);
+ int copied_incoming = 0;
/* If we have (mem (addressof (mem ...))), use the inner MEM since
otherwise the copy_rtx call below will not unshare the MEM since
@@ -320,7 +318,8 @@ initialize_for_inline (fndecl, min_labelno, max_labelno, max_reg, copy)
&& GET_CODE (DECL_INCOMING_RTL (parms)) == MEM
&& (XEXP (DECL_RTL (parms), 0)
== XEXP (DECL_INCOMING_RTL (parms), 0))))
- DECL_INCOMING_RTL (parms) = new;
+ DECL_INCOMING_RTL (parms) = new, copied_incoming = 1;
+
DECL_RTL (parms) = new;
}
@@ -342,6 +341,23 @@ initialize_for_inline (fndecl, min_labelno, max_labelno, max_reg, copy)
/* This flag is cleared later
if the function ever modifies the value of the parm. */
TREE_READONLY (parms) = 1;
+
+ /* Copy DECL_INCOMING_RTL if not done already. This can
+ happen if DECL_RTL is a reg. */
+ if (copy && ! copied_incoming)
+ {
+ p = DECL_INCOMING_RTL (parms);
+
+ /* If we have (mem (addressof (mem ...))), use the inner MEM since
+ otherwise the copy_rtx call below will not unshare the MEM since
+ it shares ADDRESSOF. */
+ if (GET_CODE (p) == MEM && GET_CODE (XEXP (p, 0)) == ADDRESSOF
+ && GET_CODE (XEXP (XEXP (p, 0), 0)) == MEM)
+ p = XEXP (XEXP (p, 0), 0);
+
+ if (GET_CODE (p) == MEM)
+ DECL_INCOMING_RTL (parms) = copy_rtx (p);
+ }
}
/* Assume we start out in the insns that set up the parameters. */
@@ -1423,7 +1439,7 @@ expand_inline_function (fndecl, parms, target, ignore, type,
arg_vals[i] = copy_to_mode_reg (GET_MODE (loc), arg_vals[i]);
if (arg_vals[i] != 0 && GET_CODE (arg_vals[i]) == REG
- && TREE_CODE (TREE_TYPE (formal)) == POINTER_TYPE)
+ && POINTER_TYPE_P (TREE_TYPE (formal)))
mark_reg_pointer (arg_vals[i],
(TYPE_ALIGN (TREE_TYPE (TREE_TYPE (formal)))
/ BITS_PER_UNIT));
@@ -1790,9 +1806,10 @@ expand_inline_function (fndecl, parms, target, ignore, type,
pushlevel (0);
expand_start_bindings (0);
- /* Make new label equivalences for the labels in the called function. */
- for (i = min_labelno; i < max_labelno; i++)
- map->label_map[i] = NULL_RTX;
+ /* Initialize label_map. get_label_from_map will actually make
+ the labels. */
+ bzero ((char *) &map->label_map [min_labelno],
+ (max_labelno - min_labelno) * sizeof (rtx));
/* Perform postincrements before actually calling the function. */
emit_queue ();
@@ -1991,9 +2008,8 @@ expand_inline_function (fndecl, parms, target, ignore, type,
break;
case CODE_LABEL:
- copy =
- emit_label (get_label_from_map(map,
- CODE_LABEL_NUMBER (insn)));
+ copy = emit_label (get_label_from_map (map,
+ CODE_LABEL_NUMBER (insn)));
LABEL_NAME (copy) = LABEL_NAME (insn);
map->const_age++;
break;
@@ -2012,12 +2028,14 @@ expand_inline_function (fndecl, parms, target, ignore, type,
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_FUNCTION_BEG
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_DELETED)
{
- copy = emit_note (NOTE_SOURCE_FILE (insn), NOTE_LINE_NUMBER (insn));
- if (copy && (NOTE_LINE_NUMBER (copy) == NOTE_INSN_EH_REGION_BEG
- || NOTE_LINE_NUMBER (copy) == NOTE_INSN_EH_REGION_END))
+ copy = emit_note (NOTE_SOURCE_FILE (insn),
+ NOTE_LINE_NUMBER (insn));
+ if (copy
+ && (NOTE_LINE_NUMBER (copy) == NOTE_INSN_EH_REGION_BEG
+ || NOTE_LINE_NUMBER (copy) == NOTE_INSN_EH_REGION_END))
{
- rtx label =
- get_label_from_map (map, NOTE_BLOCK_NUMBER (copy));
+ rtx label
+ = get_label_from_map (map, NOTE_BLOCK_NUMBER (copy));
/* We have to forward these both to match the new exception
region. */
diff --git a/gcc/integrate.h b/gcc/integrate.h
index f0c46ff1ddc..23e2e561d94 100644
--- a/gcc/integrate.h
+++ b/gcc/integrate.h
@@ -1,5 +1,5 @@
/* Function integration definitions for GNU C-Compiler
- Copyright (C) 1990, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1995, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -126,8 +126,7 @@ extern void mark_stores PROTO((rtx, rtx));
extern rtx get_label_from_map PROTO((struct inline_remap *, int));
/* Set the label indicated. */
-#define set_label_in_map(map, i, x) \
- ((map)->label_map[i] = (x))
+#define set_label_in_map(MAP, I, X) ((MAP)->label_map[I] = (X))
/* Unfortunately, we need a global copy of const_equiv map for communication
with a function called from note_stores. Be *very* careful that this
diff --git a/gcc/invoke.texi b/gcc/invoke.texi
index 903eb70ec4d..b9273ee5c5a 100644
--- a/gcc/invoke.texi
+++ b/gcc/invoke.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1988,89,92-97,1998 Free Software Foundation, Inc.
+@c Copyright (C) 1988,89,92,93,94,95,96,97,1998 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@@ -103,9 +103,10 @@ in the following sections.
@xref{C++ Dialect Options,,Options Controlling C++ Dialect}.
@smallexample
-fall-virtual -fdollars-in-identifiers -felide-constructors
--fenum-int-equiv -fexternal-templates -ffor-scope -fno-for-scope
--fhandle-signatures -fmemoize-lookups -fname-mangling-version-@var{n}
--fno-default-inline -fno-gnu-keywords -fnonnull-objects -fguiding-decls
+-fenum-int-equiv -fexternal-templates -ffor-scope
+-fno-for-scope -fhandle-signatures -fmemoize-lookups
+-fname-mangling-version-@var{n} -fno-default-inline
+-fno-gnu-keywords -fnonnull-objects -fguiding-decls
-foperator-names -fstrict-prototype -fthis-is-variable
-ftemplate-depth-@var{n} -nostdinc++ -traditional +e@var{n}
@end smallexample
@@ -120,11 +121,11 @@ in the following sections.
-Wid-clash-@var{len} -Wimplicit -Wimplicit-int
-Wimplicit-function-declarations -Wimport -Winline
-Wlarger-than-@var{len} -Wmain -Wmissing-declarations
--Wmissing-prototypes -Wnested-externs
--Wno-import -Wold-style-cast -Woverloaded-virtual -Wparentheses
--Wpointer-arith -Wredundant-decls -Wreorder -Wreturn-type -Wshadow
--Wsign-compare -Wstrict-prototypes -Wswitch -Wsynth
--Wtemplate-debugging -Wtraditional -Wtrigraphs
+-Wmissing-prototypes -Wnested-externs -Wno-import
+-Wold-style-cast -Woverloaded-virtual -Wparentheses
+-Wpointer-arith -Wredundant-decls -Wreorder -Wreturn-type
+-Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch
+-Wsynth -Wtemplate-debugging -Wtraditional -Wtrigraphs
-Wundef -Wuninitialized -Wunused -Wwrite-strings
-Wunknown-pragmas
@end smallexample
@@ -205,8 +206,9 @@ in the following sections.
@smallexample
@emph{M680x0 Options}
-m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040
--m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020 -mfpa
--mnobitfield -mrtd -mshort -msoft-float -malign-int
+-m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020
+-mfpa -mnobitfield -mrtd -mshort -msoft-float
+-malign-int
@emph{VAX Options}
-mg -mgnu -munix
@@ -332,14 +334,14 @@ in the following sections.
-malign-functions=@var{num}
@emph{HPPA Options}
--mbig-switch -mdisable-fpregs -mdisable-indexing -mfast-indirect-calls
--mgas -mjump-in-delay -mlong-load-store -mno-big-switch -mno-disable-fpregs
+-mbig-switch -mdisable-fpregs -mdisable-indexing
+-mfast-indirect-calls -mgas -mjump-in-delay
+-mlong-load-store -mno-big-switch -mno-disable-fpregs
-mno-disable-indexing -mno-fast-indirect-calls -mno-gas
--mno-jump-in-delay
--mno-long-load-store
--mno-portable-runtime -mno-soft-float -mno-space -mno-space-regs
--msoft-float
--mpa-risc-1-0 -mpa-risc-1-1 -mportable-runtime
+-mno-jump-in-delay -mno-long-load-store
+-mno-portable-runtime -mno-soft-float -mno-space
+-mno-space-regs -msoft-float -mpa-risc-1-0
+-mpa-risc-1-1 -mportable-runtime
-mschedule=@var{list} -mspace -mspace-regs
@emph{Intel 960 Options}
@@ -564,8 +566,8 @@ compiler that understands the C++ language---and under some
circumstances, you might want to compile programs from standard input,
or otherwise without a suffix that flags them as C++ programs.
@code{g++} is a program that calls GNU CC with the default language
-set to C++, and automatically specifies linking against the GNU class
-library libg++.
+set to C++, and automatically specifies linking against the C++
+library.
@cindex @code{g++ 1.@var{xx}}
@cindex @code{g++}, separate compiler
@cindex @code{g++} older version
@@ -766,8 +768,8 @@ rely on ANSI C features. Some vendors are starting to ship systems with
ANSI C header files and you cannot use @samp{-traditional} on such
systems to compile files that include any system headers.
-The @samp{-traditional} option also enables the @samp{-traditional-cpp}
-option, which is described next.
+The @samp{-traditional} option also enables @samp{-traditional-cpp},
+which is described next.
@item -traditional-cpp
Attempt to support some aspects of traditional C preprocessors.
@@ -1013,7 +1015,7 @@ Support virtual function calls for objects that exceed the size
representable by a @samp{short int}. Users should not use this flag by
default; if you need to use it, the compiler will tell you so. If you
compile any of your code with this flag, you must compile @emph{all} of
-your code with this flag (including libg++, if you use it).
+your code with this flag (including the C++ library, if you use it).
This flag is not useful when compiling with -fvtable-thunks.
@@ -1145,7 +1147,7 @@ conforming programs must not rely on a maximum depth greater than 17.
@item -nostdinc++
Do not search for header files in the standard directories specific to
C++, but do still search the other standard directories. (This option
-is used when building libg++.)
+is used when building the C++ library.)
@item -traditional
For C++ programs (in addition to the effects that apply to both C and
@@ -1266,7 +1268,8 @@ Warn when a declaration does not specify a type.
Warn whenever a function is used before being declared.
@item -Wimplicit
-Same as @samp{-Wimplicit-int} @samp{-Wimplicit-function-declaration}.
+Same as @samp{-Wimplicit-int} and @samp{-Wimplicit-function-}@*
+@samp{declaration}.
@item -Wmain
Warn if the type of @samp{main} is suspicious. @samp{main} should be a
@@ -1507,7 +1510,7 @@ arguments.
@item
A comparison between signed and unsigned values could produce an
incorrect result when the signed value is converted to unsigned.
-(But do not warn if @samp{-Wno-sign-compare} is also specified.)
+(But don't warn if @samp{-Wno-sign-compare} is also specified.)
@item
An aggregate has a partly bracketed initializer.
@@ -2368,7 +2371,7 @@ After running a program compiled with @samp{-fprofile-arcs}
guessing the path a branch might take.
@ifset INTERNALS
-With @samp{-fbranch-probabilities}, GNU CC puts a @samp{REG_EXEC_COUNT}
+With @samp{-fbranch-probabilities}, GCC puts a @samp{REG_EXEC_COUNT}
note on the first instruction of each basic block, and a
@samp{REG_BR_PROB} note on each @samp{JUMP_INSN} and @samp{CALL_INSN}.
These can be used to improve optimization. Currently, they are only
@@ -3229,7 +3232,7 @@ Set the instruction scheduling parameters for machine type
option @samp{-mcpu=}@var{cpu_type} would.
The same values for @samp{-mcpu=}@var{cpu_type} are used for
-@samp{-mtune=}@var{cpu_type}, though the only useful values are those that
+@samp{-mtune=}@*@var{cpu_type}, though the only useful values are those that
select a particular cpu implementation: @samp{cypress}, @samp{supersparc},
@samp{f930}, @samp{f934}, @samp{tsc701}, @samp{ultrasparc}.
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 0cf1b1202fe..dad2dca2101 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -935,17 +935,13 @@ XFtype
__floatdixf (DItype u)
{
XFtype d;
- SItype negate = 0;
- if (u < 0)
- u = -u, negate = 1;
-
- d = (USItype) (u >> WORD_SIZE);
+ d = (SItype) (u >> WORD_SIZE);
d *= HIGH_HALFWORD_COEFF;
d *= HIGH_HALFWORD_COEFF;
d += (USItype) (u & (HIGH_WORD_COEFF - 1));
- return (negate ? -d : d);
+ return d;
}
#endif
@@ -958,17 +954,13 @@ TFtype
__floatditf (DItype u)
{
TFtype d;
- SItype negate = 0;
-
- if (u < 0)
- u = -u, negate = 1;
- d = (USItype) (u >> WORD_SIZE);
+ d = (SItype) (u >> WORD_SIZE);
d *= HIGH_HALFWORD_COEFF;
d *= HIGH_HALFWORD_COEFF;
d += (USItype) (u & (HIGH_WORD_COEFF - 1));
- return (negate ? -d : d);
+ return d;
}
#endif
@@ -981,17 +973,13 @@ DFtype
__floatdidf (DItype u)
{
DFtype d;
- SItype negate = 0;
- if (u < 0)
- u = -u, negate = 1;
-
- d = (USItype) (u >> WORD_SIZE);
+ d = (SItype) (u >> WORD_SIZE);
d *= HIGH_HALFWORD_COEFF;
d *= HIGH_HALFWORD_COEFF;
d += (USItype) (u & (HIGH_WORD_COEFF - 1));
- return (negate ? -d : d);
+ return d;
}
#endif
@@ -1036,10 +1024,6 @@ __floatdisf (DItype u)
so that we don't lose any of the precision of the high word
while multiplying it. */
DFtype f;
- SItype negate = 0;
-
- if (u < 0)
- u = -u, negate = 1;
/* Protect against double-rounding error.
Represent any low-order bits, that might be truncated in DFmode,
@@ -1051,18 +1035,19 @@ __floatdisf (DItype u)
&& DF_SIZE > (DI_SIZE - DF_SIZE + SF_SIZE))
{
#define REP_BIT ((USItype) 1 << (DI_SIZE - DF_SIZE))
- if (u >= ((UDItype) 1 << DF_SIZE))
+ if (! (- ((UDItype) 1 << DF_SIZE) < u
+ && u < ((UDItype) 1 << DF_SIZE)))
{
if ((USItype) u & (REP_BIT - 1))
u |= REP_BIT;
}
}
- f = (USItype) (u >> WORD_SIZE);
+ f = (SItype) (u >> WORD_SIZE);
f *= HIGH_HALFWORD_COEFF;
f *= HIGH_HALFWORD_COEFF;
f += (USItype) (u & (HIGH_WORD_COEFF - 1));
- return (SFtype) (negate ? -f : f);
+ return (SFtype) f;
}
#endif
@@ -2988,9 +2973,9 @@ exit (int status)
#endif /* No NEED_ATEXIT */
#endif /* !defined (INIT_SECTION_ASM_OP) || !defined (OBJECT_FORMAT_ELF) */
/* In gbl-ctors.h, ON_EXIT is defined if HAVE_ATEXIT is defined. In
-__bb_init_func and _bb_init_prg, __bb_exit_func is registered with ON_EXIT if
-ON_EXIT is defined. Thus we must not call __bb_exit_func here anymore if
-HAVE_ATEXIT is defined. */
+ __bb_init_func and _bb_init_prg, __bb_exit_func is registered with
+ ON_EXIT if ON_EXIT is defined. Thus we must not call __bb_exit_func here
+ if HAVE_ATEXIT is defined. */
#ifndef HAVE_ATEXIT
#ifndef inhibit_libc
__bb_exit_func ();
diff --git a/gcc/loop.c b/gcc/loop.c
index 7816d95f9db..d46ca648834 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -1,5 +1,5 @@
/* Perform various loop optimizations, including strength reduction.
- Copyright (C) 1987, 88, 89, 91-7, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 91-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/gcc/machmode.def b/gcc/machmode.def
index 88af09b913e..6517656e271 100644
--- a/gcc/machmode.def
+++ b/gcc/machmode.def
@@ -1,6 +1,6 @@
/* This file contains the definitions and documentation for the
machine modes used in the the GNU compiler.
- Copyright (C) 1987, 1992, 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 1992, 1994, 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -42,7 +42,7 @@ Boston, MA 02111-1307, USA. */
Third argument states the kind of representation:
MODE_INT - integer
MODE_FLOAT - floating
- MODE_PARTIAL_INT - PSImode and PDImode
+ MODE_PARTIAL_INT - PQImode, PHImode, PSImode and PDImode
MODE_CC - modes used for representing the condition code in a register
MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT - complex number
MODE_RANDOM - anything else
@@ -63,7 +63,9 @@ Boston, MA 02111-1307, USA. */
as for example on CONST_INT RTL expressions. */
DEF_MACHMODE (VOIDmode, "VOID", MODE_RANDOM, 0, 0, VOIDmode)
+DEF_MACHMODE (PQImode, "PQI", MODE_PARTIAL_INT, 1, 1, PHImode)
DEF_MACHMODE (QImode, "QI", MODE_INT, 1, 1, HImode) /* int types */
+DEF_MACHMODE (PHImode, "PHI", MODE_PARTIAL_INT, 2, 2, PSImode)
DEF_MACHMODE (HImode, "HI", MODE_INT, 2, 2, SImode)
/* Pointers on some machines use this type to distinguish them from ints.
Useful if a pointer is 4 bytes but has some bits that are not significant,
diff --git a/gcc/md.texi b/gcc/md.texi
index 8ac4d102f30..e9d4e83e637 100644
--- a/gcc/md.texi
+++ b/gcc/md.texi
@@ -1949,7 +1949,14 @@ The @samp{cmp@var{m}} patterns should be used instead.
@item @samp{movstr@var{m}}
Block move instruction. The addresses of the destination and source
strings are the first two operands, and both are in mode @code{Pmode}.
+
The number of bytes to move is the third operand, in mode @var{m}.
+Usually, you specify @code{word_mode} for @var{m}. However, if you can
+generate better code knowing the range of valid lengths is smaller than
+those representable in a full word, you should provide a pattern with a
+mode corresponding to the range of values you can handle efficiently
+(e.g., @code{QImode} for values in the range 0--127; note we avoid numbers
+that appear negative) and also a pattern with @code{word_mode}.
The fourth operand is the known shared alignment of the source and
destination, in the form of a @code{const_int} rtx. Thus, if the
@@ -1969,7 +1976,8 @@ that the source and destination strings might overlap.
@item @samp{clrstr@var{m}}
Block clear instruction. The addresses of the destination string is the
first operand, in mode @code{Pmode}. The number of bytes to clear is
-the second operand, in mode @var{m}.
+the second operand, in mode @var{m}. See @samp{movstr@var{m}} for
+a discussion of the choice of mode.
The third operand is the known alignment of the destination, in the form
of a @code{const_int} rtx. Thus, if the compiler knows that the
diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c
index 8c425c2f11f..8069ddb5597 100644
--- a/gcc/mips-tfile.c
+++ b/gcc/mips-tfile.c
@@ -2,8 +2,8 @@
contain debugging information specified by the GNU compiler
in the form of comments (the mips assembler does not support
assembly access to debug information).
- Copyright (C) 1991, 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
- Contributed by Michael Meissner, meissner@osf.org
+ Copyright (C) 1991, 93, 94, 95, 97, 1998 Free Software Foundation, Inc.
+ Contributed by Michael Meissner (meissner@cygnus.com).
This file is part of GNU CC.
@@ -1761,6 +1761,7 @@ extern char *sbrk __proto((int));
#ifdef NEED_DECLARATION_FREE
extern void free __proto((PTR_T));
#endif
+
extern char *mktemp __proto((char *));
extern long strtol __proto((const char *, char **, int));
diff --git a/gcc/objc/Make-lang.in b/gcc/objc/Make-lang.in
index f5f8289f580..4b41c9a1433 100644
--- a/gcc/objc/Make-lang.in
+++ b/gcc/objc/Make-lang.in
@@ -1,5 +1,5 @@
# Top level makefile fragment for GNU Objective-C
-# Copyright (C) 1997 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
#This file is part of GNU CC.
@@ -130,7 +130,7 @@ objc/sarray.o: $(srcdir)/objc/sarray.c $(GCC_PASSES)
objc/class.o: $(srcdir)/objc/class.c $(GCC_PASSES)
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) \
-c $(srcdir)/objc/class.c -o $@
-objc/sendmsg.o: $(srcdir)/objc/sendmsg.c $(GCC_PASSES)
+objc/sendmsg.o: $(srcdir)/objc/sendmsg.c $(GCC_PASSES) objc/runtime-info.h
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -Iobjc \
-c $(srcdir)/objc/sendmsg.c -o $@
objc/init.o: $(srcdir)/objc/init.c $(GCC_PASSES)
@@ -209,10 +209,10 @@ libobjc.dll: libobjc_s.a objc/libobjc_entry.o
# Platform generated information needed by ObjC runtime
objc/runtime-info.h: cc1obj
- echo "" > emptyfile
+ echo "" > tmp-runtime
echo "/* This file is automatically generated */" >$@
- ./cc1obj -print-objc-runtime-info emptyfile >>$@
-
+ ./cc1obj -print-objc-runtime-info tmp-runtime >>$@
+ rm -f tmp-runtime
#
# Build hooks:
@@ -301,9 +301,11 @@ objc.stage4: stage4-start
# This target creates the files that can be rebuilt, but go in the
# distribution anyway. It then copies the files to the distdir directory.
-objc.distdir:
+# ??? Note that this should be fixed once the Makefile is fixed to do
+# the build in the inner directory.
+objc.distdir: $(srcdir)/objc/objc-parse.c
mkdir tmp/objc
- cd objc ; $(MAKE) $(FLAGS_TO_PASS) objc-parse.c
+# cd objc ; $(MAKE) $(FLAGS_TO_PASS) objc-parse.c
cd objc; \
for file in *[0-9a-zA-Z+]; do \
ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
diff --git a/gcc/objc/objc-parse.c b/gcc/objc/objc-parse.c
index dde94809539..cf3f3f70804 100644
--- a/gcc/objc/objc-parse.c
+++ b/gcc/objc/objc-parse.c
@@ -1638,7 +1638,7 @@ static const short yycheck[] = { 9,
48, 49, 50, 51, 52
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/cygnus/latest-940103/share/bison.simple"
+#line 3 "/usr/cygnus/progressive-97r2/share/bison.simple"
/* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
@@ -1831,7 +1831,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif
#endif
-#line 196 "/usr/cygnus/latest-940103/share/bison.simple"
+#line 196 "/usr/cygnus/progressive-97r2/share/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *.
@@ -4911,7 +4911,7 @@ case 556:
break;}
}
/* the action file gets copied in in place of this dollarsign */
-#line 498 "/usr/cygnus/latest-940103/share/bison.simple"
+#line 498 "/usr/cygnus/progressive-97r2/share/bison.simple"
yyvsp -= yylen;
yyssp -= yylen;
diff --git a/gcc/objc/objc-parse.y b/gcc/objc/objc-parse.y
index 115547325d4..807ad5a952c 100644
--- a/gcc/objc/objc-parse.y
+++ b/gcc/objc/objc-parse.y
@@ -1,6 +1,6 @@
/*WARNING: This file is automatically generated!*/
/* YACC parser for C syntax and for Objective C. -*-c-*-
- Copyright (C) 1987, 88, 89, 92-6, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
diff --git a/gcc/obstack.c b/gcc/obstack.c
index fb66d0c95cb..e5b5d4fd6c9 100644
--- a/gcc/obstack.c
+++ b/gcc/obstack.c
@@ -1,7 +1,6 @@
/* obstack.c - subroutines used implicitly by object stack macros
Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc.
- the C library, however. The master source lives in /gd/gnu/lib.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
diff --git a/gcc/obstack.h b/gcc/obstack.h
index 3edd3f4285e..144998cbcc1 100644
--- a/gcc/obstack.h
+++ b/gcc/obstack.h
@@ -1,7 +1,6 @@
/* obstack.h - object stack macros
- Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc.
+ Copyright (C) 1988,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc.
- the C library, however. The master source lives in /gd/gnu/lib.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
@@ -118,45 +117,39 @@ extern "C" {
may ignore the byte-within-word field of the pointer. */
#ifndef __PTR_TO_INT
-#define __PTR_TO_INT(P) ((P) - (char *) 0)
+# define __PTR_TO_INT(P) ((P) - (char *) 0)
#endif
#ifndef __INT_TO_PTR
-#define __INT_TO_PTR(P) ((P) + (char *) 0)
+# define __INT_TO_PTR(P) ((P) + (char *) 0)
#endif
-/* We need the type of the resulting object. In ANSI C it is ptrdiff_t
- but in traditional C it is usually long. If we are in ANSI C and
- don't already have ptrdiff_t get it. */
-
-#if defined (__STDC__) && __STDC__ && ! defined (offsetof)
-#if defined (__GNUC__) && defined (IN_GCC)
-/* On Next machine, the system's stddef.h screws up if included
- after we have defined just ptrdiff_t, so include all of stddef.h.
- Otherwise, define just ptrdiff_t, which is all we need. */
-#ifndef __NeXT__
-#define __need_ptrdiff_t
-#endif
-#endif
+/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
+ defined, as with GNU C, use that; that way we don't pollute the
+ namespace with <stddef.h>'s symbols. Otherwise, if <stddef.h> is
+ available, include it and use ptrdiff_t. In traditional C, long is
+ the best that we can do. */
-#include <stddef.h>
-#endif
-
-#if defined (__STDC__) && __STDC__
-#define PTR_INT_TYPE ptrdiff_t
+#ifdef __PTRDIFF_TYPE__
+# define PTR_INT_TYPE __PTRDIFF_TYPE__
#else
-#define PTR_INT_TYPE long
+# ifdef HAVE_STDDEF_H
+# include <stddef.h>
+# define PTR_INT_TYPE ptrdiff_t
+# else
+# define PTR_INT_TYPE long
+# endif
#endif
-#if defined (_LIBC) || defined (HAVE_STRING_H)
-#include <string.h>
-#define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
-#else
-#ifdef memcpy
-#define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
+#if defined _LIBC || defined HAVE_STRING_H
+# include <string.h>
+# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
#else
-#define _obstack_memcpy(To, From, N) bcopy ((From), (To), (N))
-#endif
+# ifdef memcpy
+# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
+# else
+# define _obstack_memcpy(To, From, N) bcopy ((From), (To), (N))
+# endif
#endif
struct _obstack_chunk /* Lives at front of each chunk. */
@@ -175,7 +168,7 @@ struct obstack /* control current object in current chunk */
char *chunk_limit; /* address of char after current chunk */
PTR_INT_TYPE temp; /* Temporary for some macros. */
int alignment_mask; /* Mask of alignment for each object. */
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
/* These prototypes vary based on `use_extra_arg', and we use
casts to the prototypeless function type in all assignments,
but having prototypes here quiets -Wstrict-prototypes. */
@@ -199,7 +192,7 @@ struct obstack /* control current object in current chunk */
/* Declare the external functions we use; they are in obstack.c. */
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
extern void _obstack_newchunk (struct obstack *, int);
extern void _obstack_free (struct obstack *, void *);
extern int _obstack_begin (struct obstack *, int, int,
@@ -216,7 +209,7 @@ extern int _obstack_begin_1 ();
extern int _obstack_memory_used ();
#endif
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
/* Do the function-declarations after the structs
but before defining the macros. */
@@ -264,7 +257,7 @@ int obstack_memory_used (struct obstack *obstack);
/* Error handler called when `obstack_chunk_alloc' failed to allocate
more memory. This can be set to a user defined function. The
default action is to print a message and abort. */
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
extern void (*obstack_alloc_failed_handler) (void);
#else
extern void (*obstack_alloc_failed_handler) ();
@@ -293,53 +286,53 @@ extern int obstack_exit_failure;
/* To prevent prototype warnings provide complete argument list in
standard C version. */
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
-#define obstack_init(h) \
+# define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
-#define obstack_begin(h, size) \
+# define obstack_begin(h, size) \
_obstack_begin ((h), (size), 0, \
(void *(*) (long)) obstack_chunk_alloc, (void (*) (void *)) obstack_chunk_free)
-#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
_obstack_begin ((h), (size), (alignment), \
(void *(*) (long)) (chunkfun), (void (*) (void *)) (freefun))
-#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
+# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
_obstack_begin_1 ((h), (size), (alignment), \
(void *(*) (void *, long)) (chunkfun), \
(void (*) (void *, void *)) (freefun), (arg))
-#define obstack_chunkfun(h, newchunkfun) \
+# define obstack_chunkfun(h, newchunkfun) \
((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
-#define obstack_freefun(h, newfreefun) \
+# define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
#else
-#define obstack_init(h) \
+# define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
(void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-#define obstack_begin(h, size) \
+# define obstack_begin(h, size) \
_obstack_begin ((h), (size), 0, \
(void *(*) ()) obstack_chunk_alloc, (void (*) ()) obstack_chunk_free)
-#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
_obstack_begin ((h), (size), (alignment), \
(void *(*) ()) (chunkfun), (void (*) ()) (freefun))
-#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
+# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
_obstack_begin_1 ((h), (size), (alignment), \
(void *(*) ()) (chunkfun), (void (*) ()) (freefun), (arg))
-#define obstack_chunkfun(h, newchunkfun) \
+# define obstack_chunkfun(h, newchunkfun) \
((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
-#define obstack_freefun(h, newfreefun) \
+# define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)()) (newfreefun))
#endif
@@ -350,30 +343,30 @@ extern int obstack_exit_failure;
#define obstack_memory_used(h) _obstack_memory_used (h)
-#if defined (__GNUC__) && defined (__STDC__) && __STDC__
+#if defined __GNUC__ && defined __STDC__ && __STDC__
/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
does not implement __extension__. But that compiler doesn't define
__GNUC_MINOR__. */
-#if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
-#define __extension__
-#endif
+# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
+# define __extension__
+# endif
/* For GNU C, if not -traditional,
we can define these macros to compute all args only once
without using a global variable.
Also, we can avoid using the `temp' slot, to make faster code. */
-#define obstack_object_size(OBSTACK) \
+# define obstack_object_size(OBSTACK) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
(unsigned) (__o->next_free - __o->object_base); })
-#define obstack_room(OBSTACK) \
+# define obstack_room(OBSTACK) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
(unsigned) (__o->chunk_limit - __o->next_free); })
-#define obstack_make_room(OBSTACK,length) \
+# define obstack_make_room(OBSTACK,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
int __len = (length); \
@@ -381,12 +374,12 @@ __extension__ \
_obstack_newchunk (__o, __len); \
(void) 0; })
-#define obstack_empty_p(OBSTACK) \
+# define obstack_empty_p(OBSTACK) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
(__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
-#define obstack_grow(OBSTACK,where,length) \
+# define obstack_grow(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
int __len = (length); \
@@ -396,7 +389,7 @@ __extension__ \
__o->next_free += __len; \
(void) 0; })
-#define obstack_grow0(OBSTACK,where,length) \
+# define obstack_grow0(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
int __len = (length); \
@@ -407,7 +400,7 @@ __extension__ \
*(__o->next_free)++ = 0; \
(void) 0; })
-#define obstack_1grow(OBSTACK,datum) \
+# define obstack_1grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + 1 > __o->chunk_limit) \
@@ -419,7 +412,7 @@ __extension__ \
and that the data added so far to the current object
shares that much alignment. */
-#define obstack_ptr_grow(OBSTACK,datum) \
+# define obstack_ptr_grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
@@ -427,7 +420,7 @@ __extension__ \
*((void **)__o->next_free)++ = ((void *)datum); \
(void) 0; })
-#define obstack_int_grow(OBSTACK,datum) \
+# define obstack_int_grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + sizeof (int) > __o->chunk_limit) \
@@ -435,10 +428,10 @@ __extension__ \
*((int *)__o->next_free)++ = ((int)datum); \
(void) 0; })
-#define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
-#define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
+# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
-#define obstack_blank(OBSTACK,length) \
+# define obstack_blank(OBSTACK,length) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
int __len = (length); \
@@ -447,19 +440,19 @@ __extension__ \
__o->next_free += __len; \
(void) 0; })
-#define obstack_alloc(OBSTACK,length) \
+# define obstack_alloc(OBSTACK,length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_blank (__h, (length)); \
obstack_finish (__h); })
-#define obstack_copy(OBSTACK,where,length) \
+# define obstack_copy(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_grow (__h, (where), (length)); \
obstack_finish (__h); })
-#define obstack_copy0(OBSTACK,where,length) \
+# define obstack_copy0(OBSTACK,where,length) \
__extension__ \
({ struct obstack *__h = (OBSTACK); \
obstack_grow0 (__h, (where), (length)); \
@@ -467,7 +460,7 @@ __extension__ \
/* The local variable is named __o1 to avoid a name conflict
when obstack_blank is called. */
-#define obstack_finish(OBSTACK) \
+# define obstack_finish(OBSTACK) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
void *value; \
@@ -483,7 +476,7 @@ __extension__ \
__o1->object_base = __o1->next_free; \
value; })
-#define obstack_free(OBSTACK, OBJ) \
+# define obstack_free(OBSTACK, OBJ) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
void *__obj = (OBJ); \
@@ -493,13 +486,13 @@ __extension__ \
#else /* not __GNUC__ or not __STDC__ */
-#define obstack_object_size(h) \
+# define obstack_object_size(h) \
(unsigned) ((h)->next_free - (h)->object_base)
-#define obstack_room(h) \
+# define obstack_room(h) \
(unsigned) ((h)->chunk_limit - (h)->next_free)
-#define obstack_empty_p(h) \
+# define obstack_empty_p(h) \
((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0)
/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
@@ -508,19 +501,19 @@ __extension__ \
Casting the third operand to void was tried before,
but some compilers won't accept it. */
-#define obstack_make_room(h,length) \
+# define obstack_make_room(h,length) \
( (h)->temp = (length), \
(((h)->next_free + (h)->temp > (h)->chunk_limit) \
? (_obstack_newchunk ((h), (h)->temp), 0) : 0))
-#define obstack_grow(h,where,length) \
+# define obstack_grow(h,where,length) \
( (h)->temp = (length), \
(((h)->next_free + (h)->temp > (h)->chunk_limit) \
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
_obstack_memcpy ((h)->next_free, (char *) (where), (h)->temp), \
(h)->next_free += (h)->temp)
-#define obstack_grow0(h,where,length) \
+# define obstack_grow0(h,where,length) \
( (h)->temp = (length), \
(((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
@@ -528,40 +521,40 @@ __extension__ \
(h)->next_free += (h)->temp, \
*((h)->next_free)++ = 0)
-#define obstack_1grow(h,datum) \
+# define obstack_1grow(h,datum) \
( (((h)->next_free + 1 > (h)->chunk_limit) \
? (_obstack_newchunk ((h), 1), 0) : 0), \
(*((h)->next_free)++ = (datum)))
-#define obstack_ptr_grow(h,datum) \
+# define obstack_ptr_grow(h,datum) \
( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
(*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum)))
-#define obstack_int_grow(h,datum) \
+# define obstack_int_grow(h,datum) \
( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
(*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum)))
-#define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
-#define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+# define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
+# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
-#define obstack_blank(h,length) \
+# define obstack_blank(h,length) \
( (h)->temp = (length), \
(((h)->chunk_limit - (h)->next_free < (h)->temp) \
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
((h)->next_free += (h)->temp))
-#define obstack_alloc(h,length) \
+# define obstack_alloc(h,length) \
(obstack_blank ((h), (length)), obstack_finish ((h)))
-#define obstack_copy(h,where,length) \
+# define obstack_copy(h,where,length) \
(obstack_grow ((h), (where), (length)), obstack_finish ((h)))
-#define obstack_copy0(h,where,length) \
+# define obstack_copy0(h,where,length) \
(obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-#define obstack_finish(h) \
+# define obstack_finish(h) \
( ((h)->next_free == (h)->object_base \
? (((h)->maybe_empty_object = 1), 0) \
: 0), \
@@ -575,21 +568,21 @@ __extension__ \
(h)->object_base = (h)->next_free, \
__INT_TO_PTR ((h)->temp))
-#if defined (__STDC__) && __STDC__
-#define obstack_free(h,obj) \
+# if defined __STDC__ && __STDC__
+# define obstack_free(h,obj) \
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
? (int) ((h)->next_free = (h)->object_base \
= (h)->temp + (char *) (h)->chunk) \
: (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
-#else
-#define obstack_free(h,obj) \
+# else
+# define obstack_free(h,obj) \
( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
(((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
? (int) ((h)->next_free = (h)->object_base \
= (h)->temp + (char *) (h)->chunk) \
: (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
-#endif
+# endif
#endif /* not __GNUC__ or not __STDC__ */
diff --git a/gcc/optabs.c b/gcc/optabs.c
index e69b4a1756e..dd0c51c16f7 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -3175,15 +3175,14 @@ emit_conditional_move (target, code, op0, op1, cmode, op2, op3, mode,
if (cmode == VOIDmode)
cmode = GET_MODE (op0);
- if ((CONSTANT_P (op2) && ! CONSTANT_P (op3))
- || (GET_CODE (op2) == CONST_INT && GET_CODE (op3) != CONST_INT))
+ if (((CONSTANT_P (op2) && ! CONSTANT_P (op3))
+ || (GET_CODE (op2) == CONST_INT && GET_CODE (op3) != CONST_INT))
+ && (GET_MODE_CLASS (GET_MODE (op1)) != MODE_FLOAT
+ || TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT || flag_fast_math))
{
tem = op2;
op2 = op3;
op3 = tem;
- /* ??? This may not be appropriate (consider IEEE). Perhaps we should
- call can_reverse_comparison_p here and bail out if necessary.
- It's not clear whether we need to do this canonicalization though. */
code = reverse_condition (code);
}
diff --git a/gcc/prefix.c b/gcc/prefix.c
index c07944764d4..1c96c58e54a 100644
--- a/gcc/prefix.c
+++ b/gcc/prefix.c
@@ -240,7 +240,7 @@ translate_name (name)
char *name;
{
char code = name[0];
- char *key, *prefix;
+ char *key, *prefix = 0;
int keylen;
if (code != '@' && code != '$')
@@ -268,11 +268,10 @@ translate_name (name)
prefix = std_prefix;
}
else
- {
- prefix = getenv (key);
- if (prefix == 0)
- prefix = concat ("$", key, NULL_PTR);
- }
+ prefix = getenv (key);
+
+ if (prefix == 0)
+ prefix = PREFIX;
/* Remove any trailing directory separator from what we got. */
if (prefix[strlen (prefix) - 1] == '/'
diff --git a/gcc/profile.c b/gcc/profile.c
index bedeeaea02d..bec6ca36d6a 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -1,5 +1,5 @@
/* Calculate branch probabilities, and basic block execution counts.
- Copyright (C) 1990, 91-94, 97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1990, 91-94, 96, 97, 1998 Free Software Foundation, Inc.
Contributed by James E. Wilson, UC Berkeley/Cygnus Support;
based on some ideas from Dain Samples of UC Berkeley.
Further mangling by Bob Manson, Cygnus Support.
@@ -618,7 +618,7 @@ branch_prob (f, dump_file)
register int i;
int fall_through = 0;
struct adj_list *arcptr;
- int dest = NULL_RTX;
+ int dest = 0;
/* Block 0 always falls through to block 1. */
num_arcs = 0;
@@ -1652,7 +1652,8 @@ output_func_start_profiler ()
/* Reset flag_inline_functions to its original value. */
flag_inline_functions = save_flag_inline_functions;
- fflush (asm_out_file);
+ if (! quiet_flag)
+ fflush (asm_out_file);
current_function_decl = NULL_TREE;
assemble_constructor (IDENTIFIER_POINTER (DECL_NAME (fndecl)));
diff --git a/gcc/protoize.c b/gcc/protoize.c
index 98f3e33d0d2..8efad717662 100644
--- a/gcc/protoize.c
+++ b/gcc/protoize.c
@@ -128,7 +128,11 @@ extern char *version_string;
#define my_access(file,flag) access((char *)file, flag)
#define my_stat(file,pkt) stat((char *)file, pkt)
+#ifdef __MINGW32__
+#define my_link(file1, file2) -1
+#else
#define my_link(file1, file2) link((char *)file1, (char *)file2)
+#endif
#define my_unlink(file) unlink((char *)file)
#define my_open(file, mode, flag) open((char *)file, mode, flag)
#define my_chmod(file, mode) chmod((char *)file, mode)
@@ -212,9 +216,6 @@ extern int atoi ();
extern int puts ();
extern int fputs ();
extern int fputc ();
-#if !defined(_WIN32)
-extern int link ();
-#endif
extern int unlink ();
extern int access ();
@@ -844,12 +845,13 @@ safe_write (desc, ptr, len, out_fname)
int written = write (desc, ptr, len);
if (written < 0)
{
+ int errno_val = errno;
#ifdef EINTR
- if (errno == EINTR)
+ if (errno_val == EINTR)
continue;
#endif
fprintf (stderr, "%s: error writing file `%s': %s\n",
- pname, shortpath (NULL, out_fname), my_strerror(errno));
+ pname, shortpath (NULL, out_fname), my_strerror (errno_val));
return;
}
ptr += written;
@@ -1540,8 +1542,10 @@ find_file (filename, do_not_stat)
{
if (my_stat (filename, &stat_buf) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: %s: can't get status: %s\n",
- pname, shortpath (NULL, filename), my_strerror(errno));
+ pname, shortpath (NULL, filename),
+ my_strerror (errno_val));
stat_buf.st_mtime = (time_t) -1;
}
}
@@ -2231,9 +2235,10 @@ start_over: ;
}
else
{
+ int errno_val = errno;
fprintf (stderr, "%s: can't read aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
errors++;
return;
}
@@ -2259,9 +2264,10 @@ start_over: ;
}
if (my_access (aux_info_filename, R_OK) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: can't read aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
errors++;
return;
}
@@ -2274,9 +2280,10 @@ start_over: ;
if (my_stat (aux_info_filename, &stat_buf) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
errors++;
return;
}
@@ -2301,9 +2308,10 @@ start_over: ;
if (my_stat (base_source_filename, &stat_buf) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: can't get status of aux info file `%s': %s\n",
pname, shortpath (NULL, base_source_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
errors++;
return;
}
@@ -2322,9 +2330,10 @@ start_over: ;
if ((aux_info_file = my_open (aux_info_filename, O_RDONLY, 0444 )) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: can't open aux info file `%s' for reading: %s\n",
pname, shortpath (NULL, aux_info_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
return;
}
@@ -2338,9 +2347,10 @@ start_over: ;
if (safe_read (aux_info_file, aux_info_base, aux_info_size) != aux_info_size)
{
+ int errno_val = errno;
fprintf (stderr, "%s: error reading aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
free (aux_info_base);
close (aux_info_file);
return;
@@ -2350,9 +2360,10 @@ start_over: ;
if (close (aux_info_file))
{
+ int errno_val = errno;
fprintf (stderr, "%s: error closing aux info file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
free (aux_info_base);
close (aux_info_file);
return;
@@ -2364,9 +2375,12 @@ start_over: ;
if (must_create && !keep_it)
if (my_unlink (aux_info_filename) == -1)
- fprintf (stderr, "%s: can't delete aux info file `%s': %s\n",
- pname, shortpath (NULL, aux_info_filename),
- my_strerror(errno));
+ {
+ int errno_val = errno;
+ fprintf (stderr, "%s: can't delete aux info file `%s': %s\n",
+ pname, shortpath (NULL, aux_info_filename),
+ my_strerror (errno_val));
+ }
/* Save a pointer into the first line of the aux_info file which
contains the filename of the directory from which the compiler
@@ -2430,9 +2444,10 @@ start_over: ;
xfree (aux_info_relocated_name);
if (keep_it && my_unlink (aux_info_filename) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: can't delete file `%s': %s\n",
pname, shortpath (NULL, aux_info_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
return;
}
must_create = 1;
@@ -2506,17 +2521,19 @@ rename_c_file (hp)
if (my_link (filename, new_filename) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: warning: can't link file `%s' to `%s': %s\n",
pname, shortpath (NULL, filename),
- shortpath (NULL, new_filename), my_strerror(errno));
+ shortpath (NULL, new_filename), my_strerror (errno_val));
errors++;
return;
}
if (my_unlink (filename) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: warning: can't delete file `%s': %s\n",
- pname, shortpath (NULL, filename), my_strerror(errno));
+ pname, shortpath (NULL, filename), my_strerror (errno_val));
errors++;
return;
}
@@ -4213,8 +4230,10 @@ edit_file (hp)
/* The cast avoids an erroneous warning on AIX. */
if (my_stat ((char *)convert_filename, &stat_buf) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: can't get status for file `%s': %s\n",
- pname, shortpath (NULL, convert_filename), my_strerror(errno));
+ pname, shortpath (NULL, convert_filename),
+ my_strerror (errno_val));
return;
}
orig_size = stat_buf.st_size;
@@ -4247,9 +4266,10 @@ edit_file (hp)
if ((input_file = my_open (convert_filename, O_RDONLY, 0444)) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: can't open file `%s' for reading: %s\n",
pname, shortpath (NULL, convert_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
return;
}
@@ -4259,10 +4279,11 @@ edit_file (hp)
if (safe_read (input_file, new_orig_text_base, orig_size) != orig_size)
{
+ int errno_val = errno;
close (input_file);
fprintf (stderr, "\n%s: error reading input file `%s': %s\n",
pname, shortpath (NULL, convert_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
return;
}
@@ -4293,9 +4314,10 @@ edit_file (hp)
strcat (clean_filename, ".clean");
if ((clean_file = creat (clean_filename, 0666)) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: can't create/open clean file `%s': %s\n",
pname, shortpath (NULL, clean_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
return;
}
@@ -4390,7 +4412,8 @@ edit_file (hp)
strcat (new_filename, save_suffix);
if (my_link (convert_filename, new_filename) == -1)
{
- if (errno == EEXIST)
+ int errno_val = errno;
+ if (errno_val == EEXIST)
{
if (!quiet_flag)
fprintf (stderr, "%s: warning: file `%s' already saved in `%s'\n",
@@ -4404,7 +4427,7 @@ edit_file (hp)
pname,
shortpath (NULL, convert_filename),
shortpath (NULL, new_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
return;
}
}
@@ -4412,8 +4435,10 @@ edit_file (hp)
if (my_unlink (convert_filename) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: can't delete file `%s': %s\n",
- pname, shortpath (NULL, convert_filename), my_strerror(errno));
+ pname, shortpath (NULL, convert_filename),
+ my_strerror (errno_val));
return;
}
@@ -4424,9 +4449,10 @@ edit_file (hp)
if ((output_file = creat (convert_filename, 0666)) == -1)
{
+ int errno_val = errno;
fprintf (stderr, "%s: can't create/open output file `%s': %s\n",
pname, shortpath (NULL, convert_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
return;
}
@@ -4451,8 +4477,12 @@ edit_file (hp)
/* The cast avoids an erroneous warning on AIX. */
if (my_chmod ((char *)convert_filename, stat_buf.st_mode) == -1)
- fprintf (stderr, "%s: can't change mode of file `%s': %s\n",
- pname, shortpath (NULL, convert_filename), my_strerror(errno));
+ {
+ int errno_val = errno;
+ fprintf (stderr, "%s: can't change mode of file `%s': %s\n",
+ pname, shortpath (NULL, convert_filename),
+ my_strerror (errno_val));
+ }
/* Note: We would try to change the owner and group of the output file
to match those of the input file here, except that may not be a good
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 0d17f3f87c4..ab3ded66eb4 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -1,5 +1,5 @@
/* Register to Stack convert for GNU compiler.
- Copyright (C) 1992, 93-97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -1998,11 +1998,13 @@ compare_for_stack_reg (insn, regstack, pat)
src2 = get_true_reg (&XEXP (SET_SRC (pat), 1));
cc0_user = next_cc0_user (insn);
- /* If the insn that uses cc0 is a conditional move, then the destination
+ /* If the insn that uses cc0 is an FP-conditional move, then the destination
must be the top of stack */
if (GET_CODE (PATTERN (cc0_user)) == SET
&& SET_DEST (PATTERN (cc0_user)) != pc_rtx
- && GET_CODE (SET_SRC (PATTERN (cc0_user))) == IF_THEN_ELSE)
+ && GET_CODE (SET_SRC (PATTERN (cc0_user))) == IF_THEN_ELSE
+ && (GET_MODE_CLASS (GET_MODE (SET_DEST (PATTERN (cc0_user))))
+ == MODE_FLOAT))
{
rtx *dest;
diff --git a/gcc/reload.c b/gcc/reload.c
index 65482430234..333b1eae729 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -1,5 +1,5 @@
/* Search an insn for pseudo regs that must be in hard regs and are not.
- Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -3172,16 +3172,6 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
&& this_alternative_matches[i] < 0)
bad = 1;
- /* Alternative loses if it requires a type of reload not
- permitted for this insn. We can always reload SCRATCH
- and objects with a REG_UNUSED note. */
- if (GET_CODE (operand) != SCRATCH
- && modified[i] != RELOAD_READ && no_output_reloads
- && ! find_reg_note (insn, REG_UNUSED, operand))
- bad = 1;
- else if (modified[i] != RELOAD_WRITE && no_input_reloads)
- bad = 1;
-
/* If this is a constant that is reloaded into the desired
class by copying it to memory first, count that as another
reload. This is consistent with other code and is
@@ -3193,9 +3183,10 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
if (CONSTANT_P (operand)
/* force_const_mem does not accept HIGH. */
&& GET_CODE (operand) != HIGH
- && (PREFERRED_RELOAD_CLASS (operand,
+ && ((PREFERRED_RELOAD_CLASS (operand,
(enum reg_class) this_alternative[i])
- == NO_REGS)
+ == NO_REGS)
+ || no_input_reloads)
&& operand_mode[i] != VOIDmode)
{
const_to_mem = 1;
@@ -3215,6 +3206,18 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
== NO_REGS))
bad = 1;
+ /* Alternative loses if it requires a type of reload not
+ permitted for this insn. We can always reload SCRATCH
+ and objects with a REG_UNUSED note. */
+ else if (GET_CODE (operand) != SCRATCH
+ && modified[i] != RELOAD_READ && no_output_reloads
+ && ! find_reg_note (insn, REG_UNUSED, operand))
+ bad = 1;
+ else if (modified[i] != RELOAD_WRITE && no_input_reloads
+ && ! const_to_mem)
+ bad = 1;
+
+
/* We prefer to reload pseudos over reloading other things,
since such reloads may be able to be eliminated later.
If we are reloading a SCRATCH, we won't be generating any
@@ -3540,9 +3543,10 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
&& CONSTANT_P (recog_operand[i])
/* force_const_mem does not accept HIGH. */
&& GET_CODE (recog_operand[i]) != HIGH
- && (PREFERRED_RELOAD_CLASS (recog_operand[i],
+ && ((PREFERRED_RELOAD_CLASS (recog_operand[i],
(enum reg_class) goal_alternative[i])
- == NO_REGS)
+ == NO_REGS)
+ || no_input_reloads)
&& operand_mode[i] != VOIDmode)
{
*recog_operand_loc[i] = recog_operand[i]
@@ -3884,11 +3888,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
reload_when_needed[reload_secondary_out_reload[secondary_out_reload]]
= RELOAD_FOR_OPADDR_ADDR;
}
- if (reload_when_needed[i] == RELOAD_FOR_INPADDR_ADDRESS
- || reload_when_needed[i] == RELOAD_FOR_OUTADDR_ADDRESS)
- reload_when_needed[i] = RELOAD_FOR_OPADDR_ADDR;
- else
- reload_when_needed[i] = RELOAD_FOR_OPERAND_ADDRESS;
+
+ reload_when_needed[i] = RELOAD_FOR_OPERAND_ADDRESS;
}
if ((reload_when_needed[i] == RELOAD_FOR_INPUT_ADDRESS
@@ -6297,12 +6298,14 @@ debug_reload_to_stream (f)
prefix = "\n\t";
if (reload_secondary_in_icode[r] != CODE_FOR_nothing)
{
- fprintf (f, "%ssecondary_in_icode = %s", prefix, insn_name[r]);
+ fprintf (stderr, "%ssecondary_in_icode = %s", prefix,
+ insn_name[reload_secondary_in_icode[r]]);
prefix = ", ";
}
if (reload_secondary_out_icode[r] != CODE_FOR_nothing)
- fprintf (f, "%ssecondary_out_icode = %s", prefix, insn_name[r]);
+ fprintf (stderr, "%ssecondary_out_icode = %s", prefix,
+ insn_name[reload_secondary_out_icode[r]]);
fprintf (f, "\n");
}
diff --git a/gcc/rtl.h b/gcc/rtl.h
index f31d10de7a1..0d3d5b72012 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -754,10 +754,12 @@ extern rtx get_pool_constant PROTO((rtx));
extern enum machine_mode get_pool_mode PROTO((rtx));
extern int get_pool_offset PROTO((rtx));
extern rtx simplify_subtraction PROTO((rtx));
-extern rtx assign_stack_local PROTO((enum machine_mode, int, int));
-extern rtx assign_stack_temp PROTO((enum machine_mode, int, int));
-extern rtx assign_temp PROTO((union tree_node *, int,
- int, int));
+extern rtx assign_stack_local PROTO((enum machine_mode,
+ HOST_WIDE_INT, int));
+extern rtx assign_stack_temp PROTO((enum machine_mode,
+ HOST_WIDE_INT, int));
+extern rtx assign_temp PROTO((union tree_node *,
+ int, int, int));
extern rtx protect_from_queue PROTO((rtx, int));
extern void emit_queue PROTO((void));
extern rtx emit_move_insn PROTO((rtx, rtx));
diff --git a/gcc/rtl.texi b/gcc/rtl.texi
index 6d9cf7f95e1..a715b8a8cf6 100644
--- a/gcc/rtl.texi
+++ b/gcc/rtl.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1988, 1989, 1992, 1994, 1997 Free Software Foundation, Inc.
+@c Copyright (C) 1988, 89, 92, 94, 97, 1998 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@@ -427,10 +427,12 @@ as @samp{/u}.
@item INSN_FROM_TARGET_P (@var{insn})
In an @code{insn} in a delay slot of a branch, indicates that the insn
is from the target of the branch. If the branch insn has
-@code{INSN_ANNULLED_BRANCH_P} set, this insn should only be executed if
-the branch is taken. For annulled branches with this bit clear, the
-insn should be executed only if the branch is not taken. Stored in the
-@code{in_struct} field and printed as @samp{/s}.
+@code{INSN_ANNULLED_BRANCH_P} set, this insn will only be executed if
+the branch is taken. For annulled branches with
+@code{INSN_FROM_TARGET_P} clear, the insn will be executed only if the
+branch is not taken. When @code{INSN_ANNULLED_BRANCH_P} is not set,
+this insn will always be executed. Stored in the @code{in_struct}
+field and printed as @samp{/s}.
@findex CONSTANT_POOL_ADDRESS_P
@cindex @code{symbol_ref} and @samp{/u}
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index ffd420e3c5a..4d75e79086a 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -103,7 +103,7 @@ rtx_varies_p (x)
eliminated the frame and/or arg pointer and are using it
for pseudos. */
return ! (x == frame_pointer_rtx || x == hard_frame_pointer_rtx
- || x == arg_pointer_rtx);
+ || x == arg_pointer_rtx || x == pic_offset_table_rtx);
case LO_SUM:
/* The operand 0 of a LO_SUM is considered constant
diff --git a/gcc/sched.c b/gcc/sched.c
index b539569dfb6..a44002e12a7 100644
--- a/gcc/sched.c
+++ b/gcc/sched.c
@@ -2343,12 +2343,7 @@ attach_deaths (x, insn, set_p)
#endif
&& regno != STACK_POINTER_REGNUM)
{
- /* ??? It is perhaps a dead_or_set_p bug that it does
- not check for REG_UNUSED notes itself. This is necessary
- for the case where the SET_DEST is a subreg of regno, as
- dead_or_set_p handles subregs specially. */
- if (! all_needed && ! dead_or_set_p (insn, x)
- && ! find_reg_note (insn, REG_UNUSED, x))
+ if (! all_needed && ! dead_or_set_p (insn, x))
{
/* Check for the case where the register dying partially
overlaps the register set by this insn. */
@@ -2406,17 +2401,20 @@ attach_deaths (x, insn, set_p)
return;
case SUBREG:
+ attach_deaths (SUBREG_REG (x), insn,
+ set_p && ((GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))
+ <= UNITS_PER_WORD)
+ || (GET_MODE_SIZE (GET_MODE (SUBREG_REG (x)))
+ == GET_MODE_SIZE (GET_MODE ((x))))));
+ return;
+
case STRICT_LOW_PART:
- /* These two cases preserve the value of SET_P, so handle them
- separately. */
- attach_deaths (XEXP (x, 0), insn, set_p);
+ attach_deaths (XEXP (x, 0), insn, 0);
return;
case ZERO_EXTRACT:
case SIGN_EXTRACT:
- /* This case preserves the value of SET_P for the first operand, but
- clears it for the other two. */
- attach_deaths (XEXP (x, 0), insn, set_p);
+ attach_deaths (XEXP (x, 0), insn, 0);
attach_deaths (XEXP (x, 1), insn, 0);
attach_deaths (XEXP (x, 2), insn, 0);
return;
diff --git a/gcc/sdbout.c b/gcc/sdbout.c
index dcef9d8bd6c..7aeb29edafd 100644
--- a/gcc/sdbout.c
+++ b/gcc/sdbout.c
@@ -1,5 +1,5 @@
/* Output sdb-format symbol table information from GNU compiler.
- Copyright (C) 1988, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1988, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -574,6 +574,9 @@ plain_type_1 (type, level)
#ifdef EXTENDED_SDB_BASIC_TYPES
if (precision == LONG_DOUBLE_TYPE_SIZE)
return T_LNGDBL;
+#else
+ if (precision == LONG_DOUBLE_TYPE_SIZE)
+ return T_DOUBLE; /* better than nothing */
#endif
return 0;
}
@@ -1066,8 +1069,9 @@ sdbout_field_types (type)
tree type;
{
tree tail;
+
for (tail = TYPE_FIELDS (type); tail; tail = TREE_CHAIN (tail))
- if (TREE_CODE (TREE_TYPE (tail)) == POINTER_TYPE)
+ if (POINTER_TYPE_P (TREE_TYPE (tail)))
sdbout_one_type (TREE_TYPE (TREE_TYPE (tail)));
else
sdbout_one_type (TREE_TYPE (tail));
diff --git a/gcc/stab.def b/gcc/stab.def
index dd4fbf0e8be..48ea231e603 100644
--- a/gcc/stab.def
+++ b/gcc/stab.def
@@ -1,19 +1,21 @@
/* Table of DBX symbol codes for the GNU system.
- Copyright (C) 1988 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 1, or (at your option)
- any later version.
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
- This program is distributed in the hope that it will be useful,
+ The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
/* This contains contribution from Cygnus Support. */
diff --git a/gcc/stmt.c b/gcc/stmt.c
index b4447352c80..c436555434d 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1,5 +1,5 @@
/* Expands front end tree to back end RTL for GNU C-Compiler
- Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -1162,7 +1162,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
/* The insn we have emitted. */
rtx insn;
- /* An ASM with no outputs needs to be treated as volatile. */
+ /* An ASM with no outputs needs to be treated as volatile, for now. */
if (noutputs == 0)
vol = 1;
@@ -3112,7 +3112,9 @@ expand_decl (decl)
&& TREE_CODE (type) == REAL_TYPE)
&& ! TREE_THIS_VOLATILE (decl)
&& ! TREE_ADDRESSABLE (decl)
- && (DECL_REGISTER (decl) || ! obey_regdecls))
+ && (DECL_REGISTER (decl) || ! obey_regdecls)
+ /* if -fcheck-memory-usage, check all variables. */
+ && ! flag_check_memory_usage)
{
/* Automatic variable that can go in a register. */
int unsignedp = TREE_UNSIGNED (type);
@@ -3122,7 +3124,7 @@ expand_decl (decl)
DECL_RTL (decl) = gen_reg_rtx (reg_mode);
mark_user_reg (DECL_RTL (decl));
- if (TREE_CODE (type) == POINTER_TYPE)
+ if (POINTER_TYPE_P (type))
mark_reg_pointer (DECL_RTL (decl),
(TYPE_ALIGN (TREE_TYPE (TREE_TYPE (decl)))
/ BITS_PER_UNIT));
@@ -3276,8 +3278,9 @@ expand_decl_init (decl)
if (DECL_INITIAL (decl) == error_mark_node)
{
enum tree_code code = TREE_CODE (TREE_TYPE (decl));
+
if (code == INTEGER_TYPE || code == REAL_TYPE || code == ENUMERAL_TYPE
- || code == POINTER_TYPE)
+ || code == POINTER_TYPE || code == REFERENCE_TYPE)
expand_assignment (decl, convert (TREE_TYPE (decl), integer_zero_node),
0, 0);
emit_queue ();
@@ -3629,8 +3632,10 @@ expand_cleanups (list, dont_do, in_fixup, reachable)
/* We may need to protect fixups with rethrow regions. */
int protect = (in_fixup && ! TREE_ADDRESSABLE (tail));
+
if (protect)
expand_fixup_region_start ();
+
expand_expr (TREE_VALUE (tail), const0_rtx, VOIDmode, 0);
if (protect)
expand_fixup_region_end (TREE_VALUE (tail));
diff --git a/gcc/texinfo.tex b/gcc/texinfo.tex
index a78f4dd7e54..7aef13ad20a 100644
--- a/gcc/texinfo.tex
+++ b/gcc/texinfo.tex
@@ -1,32 +1,40 @@
-%% TeX macros to handle Texinfo files.
-%% $Id: texinfo.tex,v 1.1.1.2 1998/01/14 19:38:23 law Exp $
-
-% Copyright (C) 1985, 86, 88, 90, 91, 92, 93,
-% 94, 95, 96, 97 Free Software Foundation, Inc.
-
-%This texinfo.tex file is free software; you can redistribute it and/or
-%modify it under the terms of the GNU General Public License as
-%published by the Free Software Foundation; either version 2, or (at
-%your option) any later version.
-
-%This texinfo.tex file is distributed in the hope that it will be
-%useful, but WITHOUT ANY WARRANTY; without even the implied warranty
-%of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%General Public License for more details.
-
-%You should have received a copy of the GNU General Public License
-%along with this texinfo.tex file; see the file COPYING. If not, write
-%to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-%Boston, MA 02111-1307, USA.
-
-
-%In other words, you are welcome to use, share and improve this program.
-%You are forbidden to forbid anyone else to use, share and improve
-%what you give them. Help stamp out software-hoarding!
-
-
-% Send bug reports to bug-texinfo@prep.ai.mit.edu.
-% Please include a *precise* test case in each bug report.
+% texinfo.tex -- TeX macros to handle Texinfo files.
+% $Id: texinfo.tex,v 1.5 1998/06/29 21:40:12 law Exp $
+%
+% Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98
+% Free Software Foundation, Inc.
+%
+% This texinfo.tex file is free software; you can redistribute it and/or
+% modify it under the terms of the GNU General Public License as
+% published by the Free Software Foundation; either version 2, or (at
+% your option) any later version.
+%
+% This texinfo.tex file is distributed in the hope that it will be
+% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+% General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this texinfo.tex file; see the file COPYING. If not, write
+% to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+% Boston, MA 02111-1307, USA.
+%
+% In other words, you are welcome to use, share and improve this program.
+% You are forbidden to forbid anyone else to use, share and improve
+% what you give them. Help stamp out software-hoarding!
+%
+% Please try the latest version of texinfo.tex before submitting bug
+% reports; you can get the latest version from:
+% ftp://ftp.cs.umb.edu/pub/tex/texinfo.tex
+% /home/gd/gnu/doc/texinfo.tex on the GNU machines.
+%
+% Send bug reports to bug-texinfo@gnu.org.
+% Please include a precise test case in each bug report,
+% including a complete document with which we can reproduce the problem.
+%
+% Texinfo macros (with @macro) are *not* supported by texinfo.tex. You
+% have to run makeinfo -E to expand macros first; the texi2dvi script
+% does this.
% Make it possible to create a .fmt file just by loading this file:
@@ -36,7 +44,7 @@
% This automatically updates the version number based on RCS.
\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
-\deftexinfoversion$Revision: 1.1.1.2 $
+\deftexinfoversion$Revision: 1.5 $
\message{Loading texinfo package [Version \texinfoversion]:}
% If in a .fmt file, print the version number
@@ -54,7 +62,8 @@
\let\ptexdot=\.
\let\ptexdots=\dots
\let\ptexend=\end
-\let\ptexequiv = \equiv
+\let\ptexequiv=\equiv
+\let\ptexexclam=\!
\let\ptexi=\i
\let\ptexlbrace=\{
\let\ptexrbrace=\}
@@ -1278,6 +1287,10 @@ where each line of input produces a line of output.}
%
\textfonts
+% Define these so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
% Count depth in font-changes, for error checks
\newcount\fontdepth \fontdepth=0
@@ -1315,15 +1328,15 @@ where each line of input produces a line of output.}
\null
}
\let\ttfont=\t
-\def\samp #1{`\tclose{#1}'\null}
+\def\samp#1{`\tclose{#1}'\null}
\setfont\smallrm\rmshape{8}{1000}
\font\smallsy=cmsy9
\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{%
- \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{%
+ \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
\vbox{\hrule\kern-0.4pt
- \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}%
+ \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
\kern-0.4pt\hrule}%
- \kern-.06em\raise0.4pt\hbox{$\rangle$}}}}
+ \kern-.06em\raise0.4pt\hbox{\angleright}}}}
% The old definition, with no lozenge:
%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
@@ -1436,7 +1449,7 @@ where each line of input produces a line of output.}
% rms does not like the angle brackets --karl, 17may97.
% So now @email is just like @uref.
-%\def\email#1{$\langle${\tt #1}$\rangle$}
+%\def\email#1{\angleleft{\tt #1}\angleright}
\let\email=\uref
% Check if we are currently using a typewriter font. Since all the
@@ -2058,10 +2071,7 @@ July\or August\or September\or October\or November\or December\fi
% @multitablelinespace is space to leave between table items, baseline
% to baseline.
% 0pt means it depends on current normal line spacing.
-
-%%%%
-% Dimensions
-
+%
\newskip\multitableparskip
\newskip\multitableparindent
\newdimen\multitablecolspace
@@ -2071,15 +2081,15 @@ July\or August\or September\or October\or November\or December\fi
\multitablecolspace=12pt
\multitablelinespace=0pt
-%%%%
% Macros used to set up halign preamble:
+%
\let\endsetuptable\relax
\def\xendsetuptable{\endsetuptable}
\let\columnfractions\relax
\def\xcolumnfractions{\columnfractions}
\newif\ifsetpercent
-%% 2/1/96, to allow fractions to be given with more than one digit.
+% 2/1/96, to allow fractions to be given with more than one digit.
\def\pickupwholefraction#1 {\global\advance\colcount by1 %
\expandafter\xdef\csname col\the\colcount\endcsname{.#1\hsize}%
\setuptable}
@@ -2105,80 +2115,84 @@ July\or August\or September\or October\or November\or December\fi
\ifx\go\pickupwholefraction\else\let\go\setuptable\fi%
\fi\go}
-%%%%
% multitable syntax
\def\tab{&\hskip1sp\relax} % 2/2/96
% tiny skip here makes sure this column space is
% maintained, even if it is never used.
-
-%%%%
% @multitable ... @end multitable definitions:
\def\multitable{\parsearg\dotable}
-
\def\dotable#1{\bgroup
-\let\item\cr
-\tolerance=9500
-\hbadness=9500
-\setmultitablespacing
-\parskip=\multitableparskip
-\parindent=\multitableparindent
-\overfullrule=0pt
-\global\colcount=0\relax%
-\def\Emultitable{\global\setpercentfalse\global\everycr{}\cr\egroup\egroup}%
- % To parse everything between @multitable and @item :
-\setuptable#1 \endsetuptable
- % Need to reset this to 0 after \setuptable.
-\global\colcount=0\relax%
- %
- % This preamble sets up a generic column definition, which will
- % be used as many times as user calls for columns.
- % \vtop will set a single line and will also let text wrap and
- % continue for many paragraphs if desired.
-\halign\bgroup&\global\advance\colcount by 1\relax%
-\multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
- % In order to keep entries from bumping into each other
- % we will add a \leftskip of \multitablecolspace to all columns after
- % the first one.
- % If a template has been used, we will add \multitablecolspace
- % to the width of each template entry.
- % If user has set preamble in terms of percent of \hsize
- % we will use that dimension as the width of the column, and
- % the \leftskip will keep entries from bumping into each other.
- % Table will start at left margin and final column will justify at
- % right margin.
-\ifnum\colcount=1
-\else
- \ifsetpercent
+ \vskip\parskip
+ \let\item\crcr
+ \tolerance=9500
+ \hbadness=9500
+ \setmultitablespacing
+ \parskip=\multitableparskip
+ \parindent=\multitableparindent
+ \overfullrule=0pt
+ \global\colcount=0
+ \def\Emultitable{\global\setpercentfalse\cr\egroup\egroup}%
+ %
+ % To parse everything between @multitable and @item:
+ \setuptable#1 \endsetuptable
+ %
+ % \everycr will reset column counter, \colcount, at the end of
+ % each line. Every column entry will cause \colcount to advance by one.
+ % The table preamble
+ % looks at the current \colcount to find the correct column width.
+ \everycr{\noalign{%
+ %
+ % \filbreak%% keeps underfull box messages off when table breaks over pages.
+ % Maybe so, but it also creates really weird page breaks when the table
+ % breaks over pages. Wouldn't \vfil be better? Wait until the problem
+ % manifests itself, so it can be fixed for real --karl.
+ \global\colcount=0\relax}}%
+ %
+ % This preamble sets up a generic column definition, which will
+ % be used as many times as user calls for columns.
+ % \vtop will set a single line and will also let text wrap and
+ % continue for many paragraphs if desired.
+ \halign\bgroup&\global\advance\colcount by 1\relax
+ \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname
+ %
+ % In order to keep entries from bumping into each other
+ % we will add a \leftskip of \multitablecolspace to all columns after
+ % the first one.
+ %
+ % If a template has been used, we will add \multitablecolspace
+ % to the width of each template entry.
+ %
+ % If the user has set preamble in terms of percent of \hsize we will
+ % use that dimension as the width of the column, and the \leftskip
+ % will keep entries from bumping into each other. Table will start at
+ % left margin and final column will justify at right margin.
+ %
+ % Make sure we don't inherit \rightskip from the outer environment.
+ \rightskip=0pt
+ \ifnum\colcount=1
+ % The first column will be indented with the surrounding text.
+ \advance\hsize by\leftskip
\else
- % If user has <not> set preamble in terms of percent of \hsize
- % we will advance \hsize by \multitablecolspace
- \advance\hsize by \multitablecolspace
+ \ifsetpercent \else
+ % If user has not set preamble in terms of percent of \hsize
+ % we will advance \hsize by \multitablecolspace.
+ \advance\hsize by \multitablecolspace
+ \fi
+ % In either case we will make \leftskip=\multitablecolspace:
+ \leftskip=\multitablecolspace
\fi
- % In either case we will make \leftskip=\multitablecolspace:
-\leftskip=\multitablecolspace
-\fi
- % Ignoring space at the beginning and end avoids an occasional spurious
- % blank line, when TeX decides to break the line at the space before the
- % box from the multistrut, so the strut ends up on a line by itself.
- % For example:
- % @multitable @columnfractions .11 .89
- % @item @code{#}
- % @tab Legal holiday which is valid in major parts of the whole country.
- % Is automatically provided with highlighting sequences respectively marking
- % characters.
- \noindent\ignorespaces##\unskip\multistrut}\cr
- % \everycr will reset column counter, \colcount, at the end of
- % each line. Every column entry will cause \colcount to advance by one.
- % The table preamble
- % looks at the current \colcount to find the correct column width.
-\global\everycr{\noalign{%
-% \filbreak%% keeps underfull box messages off when table breaks over pages.
-% Maybe so, but it also creates really weird page breaks when the table
-% breaks over pages Wouldn't \vfil be better? Wait until the problem
-% manifests itself, so it can be fixed for real --karl.
-\global\colcount=0\relax}}
+ % Ignoring space at the beginning and end avoids an occasional spurious
+ % blank line, when TeX decides to break the line at the space before the
+ % box from the multistrut, so the strut ends up on a line by itself.
+ % For example:
+ % @multitable @columnfractions .11 .89
+ % @item @code{#}
+ % @tab Legal holiday which is valid in major parts of the whole country.
+ % Is automatically provided with highlighting sequences respectively marking
+ % characters.
+ \noindent\ignorespaces##\unskip\multistrut}\cr
}
\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
@@ -2525,6 +2539,11 @@ width0pt\relax} \fi
\indexbreaks
%
% See if the index file exists and is nonempty.
+ % Change catcode of @ here so that if the index file contains
+ % \initial {@}
+ % as its first line, TeX doesn't complain about mismatched braces
+ % (because it thinks @} is a control sequence).
+ \catcode`\@ = 11
\openin 1 \jobname.#1s
\ifeof 1
% \enddoublecolumns gets confused if there is no text in the index,
@@ -2546,7 +2565,6 @@ width0pt\relax} \fi
% to make right now.
\def\indexbackslash{\rawbackslashxx}%
\catcode`\\ = 0
- \catcode`\@ = 11
\escapechar = `\\
\begindoublecolumns
\input \jobname.#1s
@@ -3442,11 +3460,12 @@ width0pt\relax} \fi
% the index entries, but we want to suppress hyphenation here. (We
% can't do that in the \entry macro, since index entries might consist
% of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.)
-%
-% \turnoffactive is for the sake of @" used for umlauts.
\def\tocentry#1#2{\begingroup
\vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks
- \entry{\turnoffactive #1}{\turnoffactive #2}%
+ % Do not use \turnoffactive in these arguments. Since the toc is
+ % typeset in cmr, so characters such as _ would come out wrong; we
+ % have to do the usual translation tricks.
+ \entry{#1}{#2}%
\endgroup}
% Space between chapter (or whatever) number and the title.
@@ -3512,30 +3531,35 @@ width0pt\relax} \fi
% But \@ or @@ will get a plain tex @ character.
\def\tex{\begingroup
-\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
-\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
-\catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
-\catcode `\%=14
-\catcode 43=12 % plus
-\catcode`\"=12
-\catcode`\==12
-\catcode`\|=12
-\catcode`\<=12
-\catcode`\>=12
-\escapechar=`\\
-%
-\let\,=\ptexcomma
-\let\{=\ptexlbrace
-\let\}=\ptexrbrace
-\let\.=\ptexdot
-\let\*=\ptexstar
-\let\dots=\ptexdots
-\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
-\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
-\def\@{@}%
-\let\bullet=\ptexbullet
-\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext
-%
+ \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
+ \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
+ \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie
+ \catcode `\%=14
+ \catcode 43=12 % plus
+ \catcode`\"=12
+ \catcode`\==12
+ \catcode`\|=12
+ \catcode`\<=12
+ \catcode`\>=12
+ \escapechar=`\\
+ %
+ \let\b=\ptexb
+ \let\bullet=\ptexbullet
+ \let\c=\ptexc
+ \let\,=\ptexcomma
+ \let\.=\ptexdot
+ \let\dots=\ptexdots
+ \let\equiv=\ptexequiv
+ \let\!=\ptexexclam
+ \let\i=\ptexi
+ \let\{=\ptexlbrace
+ \let\}=\ptexrbrace
+ \let\*=\ptexstar
+ \let\t=\ptext
+ %
+ \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
+ \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
+ \def\@{@}%
\let\Etex=\endgroup}
% Define @lisp ... @endlisp.
@@ -4388,7 +4412,7 @@ width0pt\relax} \fi
\def\refx#1#2{%
\expandafter\ifx\csname X#1\endcsname\relax
% If not defined, say something at least.
- $\langle$un\-de\-fined$\rangle$%
+ \angleleft un\-de\-fined\angleright
\ifhavexrefs
\message{\linenumber Undefined cross reference `#1'.}%
\else
@@ -4405,10 +4429,13 @@ width0pt\relax} \fi
}
% This is the macro invoked by entries in the aux file.
-\def\xrdef #1#2{{%
- \catcode`\'=\other
- \expandafter\gdef\csname X#1\endcsname{#2}%
-}}
+%
+\def\xrdef#1{\begingroup
+ % Reenable \ as an escape while reading the second argument.
+ \catcode`\\ = 0
+ \afterassignment\endgroup
+ \expandafter\gdef\csname X#1\endcsname
+}
% Read the last existing aux file, if any. No error if none exists.
\def\readauxfile{\begingroup
diff --git a/gcc/tm.texi b/gcc/tm.texi
index 9a8887fdaf9..a5c2729299b 100644
--- a/gcc/tm.texi
+++ b/gcc/tm.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1988,89,92-97,1998 Free Software Foundation, Inc.
+@c Copyright (C) 1988,89,92,93,94,96,97,1998 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@@ -3672,15 +3672,18 @@ not generate any instructions in this case.
@findex STRICT_ARGUMENT_NAMING
@item STRICT_ARGUMENT_NAMING
-Define this macro if the location where a function argument is passed
-depends on whether or not it is a named argument.
+Define this macro to be a nonzero value if the location where a function
+argument is passed depends on whether or not it is a named argument.
This macro controls how the @var{named} argument to @code{FUNCTION_ARG}
-is set for varargs and stdarg functions. With this macro defined,
-the @var{named} argument is always true for named arguments, and false for
-unnamed arguments. If this is not defined, but @code{SETUP_INCOMING_VARARGS}
-is defined, then all arguments are treated as named. Otherwise, all named
-arguments except the last are treated as named.
+is set for varargs and stdarg functions. If this macro returns a
+nonzero value, the @var{named} argument is always true for named
+arguments, and false for unnamed arguments. If it returns a value of
+zero, but @code{SETUP_INCOMING_VARARGS} is defined, then all arguments
+are treated as named. Otherwise, all named arguments except the last
+are treated as named.
+
+You need not define this macro if it always returns zero.
@end table
@node Trampolines
@@ -6058,7 +6061,7 @@ operands to @code{asm_fprintf}.
Define the macros @code{REGISTER_PREFIX}, @code{LOCAL_LABEL_PREFIX},
@code{USER_LABEL_PREFIX} and @code{IMMEDIATE_PREFIX} if you can express
-the variations in assembly language syntax with that mechanism. Define
+the variations in assembler language syntax with that mechanism. Define
@code{ASSEMBLER_DIALECT} and use the @samp{@{option0|option1@}} syntax
if the syntax variant are larger and involve such things as different
opcodes or operand order.
@@ -6344,20 +6347,19 @@ having address @var{x} (an RTL expression). The nominal offset is
@findex PREFERRED_DEBUGGING_TYPE
@item PREFERRED_DEBUGGING_TYPE
-A C expression that returns the type of debugging output GNU CC produces
-when the user specifies @samp{-g} or @samp{-ggdb}. Define this if you
-have arranged for GNU CC to support more than one format of debugging
-output. Currently, the allowable values are @code{DBX_DEBUG},
+A C expression that returns the type of debugging output GNU CC should
+produce when the user specifies just @samp{-g}. Define
+this if you have arranged for GNU CC to support more than one format of
+debugging output. Currently, the allowable values are @code{DBX_DEBUG},
@code{SDB_DEBUG}, @code{DWARF_DEBUG}, @code{DWARF2_DEBUG}, and
@code{XCOFF_DEBUG}.
-If the user specifies @samp{-ggdb}, then there are two special cases
-where this macro's value is ignored and another value is substituted.
-If @code{DWARF2_DEBUGGING_INFO} is defined and
-@code{LINKER_DOES_NOT_WORK_WITH_DWARF2} is not defined, then
-@code{DWARF2_DEBUG} is substituted. Otherwise, if
-@code{DBX_DEBUGGING_INFO} is defined, then @code{DBX_DEBUG} is
-substituted.
+When the user specifies @samp{-ggdb}, GNU CC normally also uses the
+value of this macro to select the debugging output format, but with two
+exceptions. If @code{DWARF2_DEBUGGING_INFO} is defined and
+@code{LINKER_DOES_NOT_WORK_WITH_DWARF2} is not defined, GNU CC uses the
+value @code{DWARF2_DEBUG}. Otherwise, if @code{DBX_DEBUGGING_INFO} is
+defined, GNU CC uses @code{DBX_DEBUG}.
The value of this macro only affects the default debugging output; the
user can always get a specific type of output by using @samp{-gstabs},
@@ -6690,10 +6692,10 @@ as appropriate from @code{FUNCTION_PROLOGUE} if you don't.
@findex LINKER_DOES_NOT_WORK_WITH_DWARF2
@item LINKER_DOES_NOT_WORK_WITH_DWARF2
-Define this macro if the linker does not work with dwarf version 2.
-Normally, if the user specifies only @samp{-ggdb}, then GNU CC will use
-dwarf version 2 if available; this macro causes GNU CC to use the format
-specified by @code{PREFERRED_DEBUGGING_TYPE} instead.
+Define this macro if the linker does not work with Dwarf version 2.
+Normally, if the user specifies only @samp{-ggdb} GNU CC will use Dwarf
+version 2 if available; this macro disables this. See the description
+of the @code{PREFERRED_DEBUGGING_TYPE} macro for more details.
@findex PUT_SDB_@dots{}
@item PUT_SDB_@dots{}
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 18ed3324d7c..d226950dfec 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -49,6 +49,9 @@ Boston, MA 02111-1307, USA. */
#include "rtl.h"
#include "flags.h"
#include "insn-attr.h"
+#include "insn-codes.h"
+#include "insn-config.h"
+#include "recog.h"
#include "defaults.h"
#include "output.h"
#include "except.h"
@@ -993,8 +996,17 @@ get_run_time ()
#ifdef USG
{
struct tms tms;
+# if HAVE_SYSCONF && defined _SC_CLK_TCK
+# define TICKS_PER_SECOND sysconf (_SC_CLK_TCK) /* POSIX 1003.1-1996 */
+# else
+# ifdef CLK_TCK
+# define TICKS_PER_SECOND CLK_TCK /* POSIX 1003.1-1988; obsolescent */
+# else
+# define TICKS_PER_SECOND HZ /* traditional UNIX */
+# endif
+# endif
times (&tms);
- return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
+ return (tms.tms_utime + tms.tms_stime) * (1000000 / TICKS_PER_SECOND);
}
#else
#ifndef VMS
@@ -2485,7 +2497,14 @@ compile_file (name)
/* Don't let the first function fall at the same address
as gcc_compiled., if profiling. */
if (profile_flag || profile_block_flag)
- assemble_zeros (UNITS_PER_WORD);
+ {
+ /* It's best if we can write a nop here since some
+ assemblers don't tolerate zeros in the text section. */
+ if (insn_template[CODE_FOR_nop] != 0)
+ output_asm_insn (insn_template[CODE_FOR_nop], NULL_PTR);
+ else
+ assemble_zeros (UNITS_PER_WORD);
+ }
/* If dbx symbol table desired, initialize writing it
and output the predefined types. */
@@ -3572,7 +3591,8 @@ rest_of_compilation (decl)
final (insns, asm_out_file, optimize, 0);
final_end_function (insns, asm_out_file, optimize);
assemble_end_function (decl, fnname);
- fflush (asm_out_file);
+ if (! quiet_flag)
+ fflush (asm_out_file);
/* Release all memory held by regsets now */
regset_release_memory ();
diff --git a/gcc/tree.c b/gcc/tree.c
index fe36f890da3..b6db322d667 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1671,7 +1671,7 @@ integer_pow2p (expr)
if (TREE_CODE (expr) != INTEGER_CST || TREE_CONSTANT_OVERFLOW (expr))
return 0;
- prec = (TREE_CODE (TREE_TYPE (expr)) == POINTER_TYPE
+ prec = (POINTER_TYPE_P (TREE_TYPE (expr))
? POINTER_SIZE : TYPE_PRECISION (TREE_TYPE (expr)));
high = TREE_INT_CST_HIGH (expr);
low = TREE_INT_CST_LOW (expr);
@@ -1712,7 +1712,7 @@ tree_log2 (expr)
if (TREE_CODE (expr) == COMPLEX_CST)
return tree_log2 (TREE_REALPART (expr));
- prec = (TREE_CODE (TREE_TYPE (expr)) == POINTER_TYPE
+ prec = (POINTER_TYPE_P (TREE_TYPE (expr))
? POINTER_SIZE : TYPE_PRECISION (TREE_TYPE (expr)));
high = TREE_INT_CST_HIGH (expr);
@@ -2172,29 +2172,32 @@ size_in_bytes (type)
return t;
}
-/* Return the size of TYPE (in bytes) as an integer,
- or return -1 if the size can vary. */
+/* Return the size of TYPE (in bytes) as a wide integer
+ or return -1 if the size can vary or is larger than an integer. */
-int
+HOST_WIDE_INT
int_size_in_bytes (type)
tree type;
{
- unsigned int size;
+ tree t;
+
if (type == error_mark_node)
return 0;
+
type = TYPE_MAIN_VARIANT (type);
- if (TYPE_SIZE (type) == 0)
+ if (TYPE_SIZE (type) == 0
+ || TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
return -1;
- if (TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
+
+ if (TREE_INT_CST_HIGH (TYPE_SIZE (type)) == 0)
+ return ((TREE_INT_CST_LOW (TYPE_SIZE (type)) + BITS_PER_UNIT - 1)
+ / BITS_PER_UNIT);
+
+ t = size_binop (CEIL_DIV_EXPR, TYPE_SIZE (type), size_int (BITS_PER_UNIT));
+ if (TREE_CODE (t) != INTEGER_CST || TREE_INT_CST_HIGH (t) != 0)
return -1;
- if (TREE_INT_CST_HIGH (TYPE_SIZE (type)) != 0)
- {
- tree t = size_binop (CEIL_DIV_EXPR, TYPE_SIZE (type),
- size_int (BITS_PER_UNIT));
- return TREE_INT_CST_LOW (t);
- }
- size = TREE_INT_CST_LOW (TYPE_SIZE (type));
- return (size + BITS_PER_UNIT - 1) / BITS_PER_UNIT;
+
+ return TREE_INT_CST_LOW (t);
}
/* Return, as a tree node, the number of elements for TYPE (which is an
@@ -3357,7 +3360,7 @@ valid_machine_attribute (attr_name, attr_args, decl, type)
/* Handle putting a type attribute on pointer-to-function-type by putting
the attribute on the function type. */
- else if (TREE_CODE (type) == POINTER_TYPE
+ else if (POINTER_TYPE_P (type)
&& TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE
&& VALID_MACHINE_TYPE_ATTRIBUTE (TREE_TYPE (type), type_attr_list,
attr_name, attr_args))
@@ -4251,22 +4254,17 @@ build_reference_type (to_type)
tree to_type;
{
register tree t = TYPE_REFERENCE_TO (to_type);
- register struct obstack *ambient_obstack = current_obstack;
- register struct obstack *ambient_saveable_obstack = saveable_obstack;
/* First, if we already have a type for pointers to TO_TYPE, use it. */
if (t)
return t;
- /* We need a new one. If TO_TYPE is permanent, make this permanent too. */
- if (TREE_PERMANENT (to_type))
- {
- current_obstack = &permanent_obstack;
- saveable_obstack = &permanent_obstack;
- }
-
+ /* We need a new one. Put this in the same obstack as TO_TYPE. */
+ push_obstacks (TYPE_OBSTACK (to_type), TYPE_OBSTACK (to_type));
t = make_node (REFERENCE_TYPE);
+ pop_obstacks ();
+
TREE_TYPE (t) = to_type;
/* Record this type as the pointer to TO_TYPE. */
@@ -4274,8 +4272,6 @@ build_reference_type (to_type)
layout_type (t);
- current_obstack = ambient_obstack;
- saveable_obstack = ambient_saveable_obstack;
return t;
}
diff --git a/gcc/tree.h b/gcc/tree.h
index c9930316b9f..8fee5211230 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1,5 +1,5 @@
/* Front-end tree definitions for GNU compiler.
- Copyright (C) 1989, 93-97, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1989, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -204,7 +204,7 @@ struct tree_common
static_flag:
TREE_STATIC in
- VAR_DECL, FUNCTION_DECL, CONSTRUCTOR
+ VAR_DECL, FUNCTION_DECL, CONSTRUCTOR, ADDR_EXPR
TREE_NO_UNUSED_WARNING in
CONVERT_EXPR, NOP_EXPR, COMPOUND_EXPR
TREE_VIA_VIRTUAL in
@@ -253,7 +253,7 @@ struct tree_common
readonly_flag:
TREE_READONLY in
- VAR_DECL, PARM_DECL, FIELD_DECL, ..._REF
+ all expressions
ITERATOR_BOUND_P in
VAR_DECL if iterator (C)
TYPE_READONLY in
@@ -1179,8 +1179,7 @@ struct tree_decl
struct rtx_def *rtl; /* acts as link to register transfer language
(rtl) info */
/* For FUNCTION_DECLs: points to insn that constitutes its definition
- on the permanent obstack. For any other kind of decl, this is the
- alignment. */
+ on the permanent obstack. For FIELD_DECL, this is DECL_FIELD_SIZE. */
union {
struct rtx_def *r;
HOST_WIDE_INT i;
@@ -1415,7 +1414,7 @@ extern tree pedantic_non_lvalue PROTO((tree));
extern tree convert PROTO((tree, tree));
extern tree size_in_bytes PROTO((tree));
-extern int int_size_in_bytes PROTO((tree));
+extern HOST_WIDE_INT int_size_in_bytes PROTO((tree));
extern tree size_binop PROTO((enum tree_code, tree, tree));
extern tree size_int_wide PROTO((unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT, int));
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 2191e0c3f27..7e4483ea495 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -1,5 +1,5 @@
/* Try to unroll loops, and split induction variables.
- Copyright (C) 1992, 93-95, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93, 94, 95, 97, 1998 Free Software Foundation, Inc.
Contributed by James E. Wilson, Cygnus Support/UC Berkeley.
This file is part of GNU CC.
@@ -1452,6 +1452,7 @@ init_reg_map (map, maxregnum)
to the iv. This procedure reconstructs the pattern computing the iv;
verifying that all operands are of the proper form.
+ PATTERN must be the result of single_set.
The return value is the amount that the giv is incremented by. */
static rtx
@@ -1629,7 +1630,7 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
rtx start_label, loop_end, insert_before, copy_notes_from;
{
rtx insn, pattern;
- rtx tem, copy;
+ rtx set, tem, copy;
int dest_reg_was_split, i;
#ifdef HAVE_cc0
rtx cc0_insn = 0;
@@ -1676,15 +1677,15 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
Do this before splitting the giv, since that may map the
SET_DEST to a new register. */
- if (GET_CODE (pattern) == SET
- && GET_CODE (SET_DEST (pattern)) == REG
- && addr_combined_regs[REGNO (SET_DEST (pattern))])
+ if ((set = single_set (insn))
+ && GET_CODE (SET_DEST (set)) == REG
+ && addr_combined_regs[REGNO (SET_DEST (set))])
{
struct iv_class *bl;
struct induction *v, *tv;
- int regno = REGNO (SET_DEST (pattern));
+ int regno = REGNO (SET_DEST (set));
- v = addr_combined_regs[REGNO (SET_DEST (pattern))];
+ v = addr_combined_regs[REGNO (SET_DEST (set))];
bl = reg_biv_class[REGNO (v->src_reg)];
/* Although the giv_inc amount is not needed here, we must call
@@ -1693,7 +1694,7 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
we might accidentally delete insns generated immediately
below by emit_unrolled_add. */
- giv_inc = calculate_giv_inc (pattern, insn, regno);
+ giv_inc = calculate_giv_inc (set, insn, regno);
/* Now find all address giv's that were combined with this
giv 'v'. */
@@ -1767,11 +1768,11 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
dest_reg_was_split = 0;
- if (GET_CODE (pattern) == SET
- && GET_CODE (SET_DEST (pattern)) == REG
- && splittable_regs[REGNO (SET_DEST (pattern))])
+ if ((set = single_set (insn))
+ && GET_CODE (SET_DEST (set)) == REG
+ && splittable_regs[REGNO (SET_DEST (set))])
{
- int regno = REGNO (SET_DEST (pattern));
+ int regno = REGNO (SET_DEST (set));
dest_reg_was_split = 1;
@@ -1779,9 +1780,9 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
already computed above. */
if (giv_inc == 0)
- giv_inc = calculate_giv_inc (pattern, insn, regno);
- giv_dest_reg = SET_DEST (pattern);
- giv_src_reg = SET_DEST (pattern);
+ giv_inc = calculate_giv_inc (set, insn, regno);
+ giv_dest_reg = SET_DEST (set);
+ giv_src_reg = SET_DEST (set);
if (unroll_type == UNROLL_COMPLETELY)
{
@@ -1977,9 +1978,9 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
/* Can't use the label_map for every insn, since this may be
the backward branch, and hence the label was not mapped. */
- if (GET_CODE (pattern) == SET)
+ if ((set = single_set (copy)))
{
- tem = SET_SRC (pattern);
+ tem = SET_SRC (set);
if (GET_CODE (tem) == LABEL_REF)
label = XEXP (tem, 0);
else if (GET_CODE (tem) == IF_THEN_ELSE)
@@ -2651,9 +2652,10 @@ verify_addresses (v, giv_inc, unroll_number)
rtx last_addr = plus_constant (v->dest_reg,
INTVAL (giv_inc) * (unroll_number - 1));
- /* First check to see if either address would fail. */
- if (! validate_change (v->insn, v->location, v->dest_reg, 0)
- || ! validate_change (v->insn, v->location, last_addr, 0))
+ /* First check to see if either address would fail. Handle the fact
+ that we have may have a match_dup. */
+ if (! validate_replace_rtx (*v->location, v->dest_reg, v->insn)
+ || ! validate_replace_rtx (*v->location, last_addr, v->insn))
ret = 0;
/* Now put things back the way they were before. This will always
@@ -2940,6 +2942,10 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment,
if (v->dest_reg == tem
&& ! verify_addresses (v, giv_inc, unroll_number))
{
+ for (v2 = v->next_iv; v2; v2 = v2->next_iv)
+ if (v2->same_insn == v)
+ v2->same_insn = 0;
+
if (loop_dump_stream)
fprintf (loop_dump_stream,
"Invalid address for giv at insn %d\n",
@@ -2986,6 +2992,10 @@ find_splittable_givs (bl, unroll_type, loop_start, loop_end, increment,
if the resulting address would be invalid. */
if (! verify_addresses (v, giv_inc, unroll_number))
{
+ for (v2 = v->next_iv; v2; v2 = v2->next_iv)
+ if (v2->same_insn == v)
+ v2->same_insn = 0;
+
if (loop_dump_stream)
fprintf (loop_dump_stream,
"Invalid address for giv at insn %d\n",
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 634753ea6f2..e4d1d0de4eb 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1,5 +1,5 @@
/* Output variables, constants and external declarations, for GNU compiler.
- Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -2434,6 +2434,11 @@ compare_constant_1 (exp, p)
register tree link;
int length = list_length (CONSTRUCTOR_ELTS (exp));
tree type;
+ int have_purpose = 0;
+
+ for (link = CONSTRUCTOR_ELTS (exp); link; link = TREE_CHAIN (link))
+ if (TREE_PURPOSE (link))
+ have_purpose = 1;
if (bcmp ((char *) &length, p, sizeof length))
return 0;
@@ -2441,7 +2446,9 @@ compare_constant_1 (exp, p)
p += sizeof length;
/* For record constructors, insist that the types match.
- For arrays, just verify both constructors are for arrays. */
+ For arrays, just verify both constructors are for arrays.
+ Then insist that either both or none have any TREE_PURPOSE
+ values. */
if (TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE)
type = TREE_TYPE (exp);
else
@@ -2452,10 +2459,16 @@ compare_constant_1 (exp, p)
p += sizeof type;
+ if (bcmp ((char *) &have_purpose, p, sizeof have_purpose))
+ return 0;
+
+ p += sizeof have_purpose;
+
/* For arrays, insist that the size in bytes match. */
if (TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE)
{
- int size = int_size_in_bytes (TREE_TYPE (exp));
+ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
+
if (bcmp ((char *) &size, p, sizeof size))
return 0;
@@ -2478,6 +2491,30 @@ compare_constant_1 (exp, p)
p += sizeof zero;
}
+
+ if (TREE_PURPOSE (link)
+ && TREE_CODE (TREE_PURPOSE (link)) == FIELD_DECL)
+ {
+ if (bcmp ((char *) &TREE_PURPOSE (link), p,
+ sizeof TREE_PURPOSE (link)))
+ return 0;
+
+ p += sizeof TREE_PURPOSE (link);
+ }
+ else if (TREE_PURPOSE (link))
+ {
+ if ((p = compare_constant_1 (TREE_PURPOSE (link), p)) == 0)
+ return 0;
+ }
+ else if (have_purpose)
+ {
+ int zero = 0;
+
+ if (bcmp ((char *) &zero, p, sizeof zero))
+ return 0;
+
+ p += sizeof zero;
+ }
}
return p;
@@ -2606,21 +2643,30 @@ record_constant_1 (exp)
register tree link;
int length = list_length (CONSTRUCTOR_ELTS (exp));
tree type;
+ int have_purpose = 0;
+
+ for (link = CONSTRUCTOR_ELTS (exp); link; link = TREE_CHAIN (link))
+ if (TREE_PURPOSE (link))
+ have_purpose = 1;
obstack_grow (&permanent_obstack, (char *) &length, sizeof length);
/* For record constructors, insist that the types match.
- For arrays, just verify both constructors are for arrays. */
+ For arrays, just verify both constructors are for arrays.
+ Then insist that either both or none have any TREE_PURPOSE
+ values. */
if (TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE)
type = TREE_TYPE (exp);
else
type = 0;
obstack_grow (&permanent_obstack, (char *) &type, sizeof type);
+ obstack_grow (&permanent_obstack, (char *) &have_purpose,
+ sizeof have_purpose);
/* For arrays, insist that the size in bytes match. */
if (TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE)
{
- int size = int_size_in_bytes (TREE_TYPE (exp));
+ HOST_WIDE_INT size = int_size_in_bytes (TREE_TYPE (exp));
obstack_grow (&permanent_obstack, (char *) &size, sizeof size);
}
@@ -2635,6 +2681,21 @@ record_constant_1 (exp)
obstack_grow (&permanent_obstack,
(char *) &zero, sizeof zero);
}
+
+ if (TREE_PURPOSE (link)
+ && TREE_CODE (TREE_PURPOSE (link)) == FIELD_DECL)
+ obstack_grow (&permanent_obstack,
+ (char *) &TREE_PURPOSE (link),
+ sizeof TREE_PURPOSE (link));
+ else if (TREE_PURPOSE (link))
+ record_constant_1 (TREE_PURPOSE (link));
+ else if (have_purpose)
+ {
+ int zero = 0;
+
+ obstack_grow (&permanent_obstack,
+ (char *) &zero, sizeof zero);
+ }
}
}
return;
diff --git a/gcc/version.c b/gcc/version.c
index d87b06a1e65..0c9fb3af406 100644
--- a/gcc/version.c
+++ b/gcc/version.c
@@ -1 +1 @@
-char *version_string = "egcs-2.91.16 980328 (gcc-2.8.0 release)";
+char *version_string = "egcs-2.91.17 980403 (gcc2 ss-980401 experimental)";