summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/gcc/ChangeLog656
-rw-r--r--gnu/usr.bin/gcc/ChangeLog.01
-rw-r--r--gnu/usr.bin/gcc/ChangeLog.lib18
-rw-r--r--gnu/usr.bin/gcc/INSTALL73
-rw-r--r--gnu/usr.bin/gcc/Makefile.in215
-rw-r--r--gnu/usr.bin/gcc/NEWS6
-rw-r--r--gnu/usr.bin/gcc/README2
-rw-r--r--gnu/usr.bin/gcc/README.RS6000113
-rw-r--r--gnu/usr.bin/gcc/SERVICE39
-rw-r--r--gnu/usr.bin/gcc/acconfig.h3
-rw-r--r--gnu/usr.bin/gcc/c-common.c57
-rw-r--r--gnu/usr.bin/gcc/c-decl.c16
-rw-r--r--gnu/usr.bin/gcc/c-lex.c28
-rw-r--r--gnu/usr.bin/gcc/c-parse.in4
-rw-r--r--gnu/usr.bin/gcc/c-typeck.c4
-rw-r--r--gnu/usr.bin/gcc/calls.c14
-rw-r--r--gnu/usr.bin/gcc/cccp.c393
-rw-r--r--gnu/usr.bin/gcc/combine.c43
-rw-r--r--gnu/usr.bin/gcc/config.guess13
-rw-r--r--gnu/usr.bin/gcc/config.in6
-rw-r--r--gnu/usr.bin/gcc/config.sub38
-rw-r--r--gnu/usr.bin/gcc/config/alpha/alpha.c47
-rw-r--r--gnu/usr.bin/gcc/config/alpha/elf.h19
-rw-r--r--gnu/usr.bin/gcc/config/arm/arm.c18
-rw-r--r--gnu/usr.bin/gcc/config/arm/arm.md10
-rw-r--r--gnu/usr.bin/gcc/config/arm/t-semi2
-rw-r--r--gnu/usr.bin/gcc/config/arm/x-riscix1
-rw-r--r--gnu/usr.bin/gcc/config/convex/x-convex2
-rw-r--r--gnu/usr.bin/gcc/config/i386/cygwin32.h30
-rw-r--r--gnu/usr.bin/gcc/config/i386/gmon-sol2.c23
-rw-r--r--gnu/usr.bin/gcc/config/i386/i386.h8
-rw-r--r--gnu/usr.bin/gcc/config/i386/i386.md344
-rw-r--r--gnu/usr.bin/gcc/config/i386/mingw32.h8
-rw-r--r--gnu/usr.bin/gcc/config/i386/sol2-c1.asm4
-rw-r--r--gnu/usr.bin/gcc/config/i386/sol2-gc1.asm2
-rw-r--r--gnu/usr.bin/gcc/config/i386/sol2.h14
-rw-r--r--gnu/usr.bin/gcc/config/i386/sol2dbg.h11
-rw-r--r--gnu/usr.bin/gcc/config/i386/x-osfrose1
-rw-r--r--gnu/usr.bin/gcc/config/i386/x-sco52
-rw-r--r--gnu/usr.bin/gcc/config/i386/xm-go32.h4
-rw-r--r--gnu/usr.bin/gcc/config/i386/xm-mingw32.h3
-rw-r--r--gnu/usr.bin/gcc/config/i386/xm-os2.h20
-rw-r--r--gnu/usr.bin/gcc/config/i860/fx2800.h4
-rw-r--r--gnu/usr.bin/gcc/config/i860/i860.c7
-rw-r--r--gnu/usr.bin/gcc/config/i960/i960.c9
-rw-r--r--gnu/usr.bin/gcc/config/i960/i960.md24
-rw-r--r--gnu/usr.bin/gcc/config/linux.h7
-rw-r--r--gnu/usr.bin/gcc/config/m68k/a-ux.h10
-rw-r--r--gnu/usr.bin/gcc/config/m68k/m68k.h43
-rw-r--r--gnu/usr.bin/gcc/config/mips/iris5.h5
-rw-r--r--gnu/usr.bin/gcc/config/mips/iris5gas.h4
-rw-r--r--gnu/usr.bin/gcc/config/mips/iris6.h4
-rw-r--r--gnu/usr.bin/gcc/config/mips/mips.c7
-rw-r--r--gnu/usr.bin/gcc/config/mips/mips.md15
-rw-r--r--gnu/usr.bin/gcc/config/mips/x-dec-osf11
-rw-r--r--gnu/usr.bin/gcc/config/mips/x-osfrose1
-rw-r--r--gnu/usr.bin/gcc/config/msdos/top.sed4
-rw-r--r--gnu/usr.bin/gcc/config/pa/pa.c12
-rw-r--r--gnu/usr.bin/gcc/config/rs6000/rs6000.c9
-rw-r--r--gnu/usr.bin/gcc/config/rs6000/rs6000.h10
-rw-r--r--gnu/usr.bin/gcc/config/rs6000/rs6000.md74
-rw-r--r--gnu/usr.bin/gcc/config/rs6000/x-aix312
-rw-r--r--gnu/usr.bin/gcc/config/sparc/linux.h10
-rw-r--r--gnu/usr.bin/gcc/config/sparc/linux64.h16
-rw-r--r--gnu/usr.bin/gcc/config/sparc/sparc.c6
-rw-r--r--gnu/usr.bin/gcc/config/sparc/sysv4.h10
-rw-r--r--gnu/usr.bin/gcc/config/t-svr43
-rw-r--r--gnu/usr.bin/gcc/config/vax/ultrix.h3
-rw-r--r--gnu/usr.bin/gcc/config/vax/vax.md13
-rw-r--r--gnu/usr.bin/gcc/config/vax/vms.h6
-rw-r--r--gnu/usr.bin/gcc/config/vax/x-vax3
-rw-r--r--gnu/usr.bin/gcc/config/winnt/config-nt.sed2
-rw-r--r--gnu/usr.bin/gcc/configure306
-rw-r--r--gnu/usr.bin/gcc/configure.in150
-rw-r--r--gnu/usr.bin/gcc/cp/ChangeLog212
-rw-r--r--gnu/usr.bin/gcc/cp/NEWS25
-rw-r--r--gnu/usr.bin/gcc/cp/call.c184
-rw-r--r--gnu/usr.bin/gcc/cp/class.c28
-rw-r--r--gnu/usr.bin/gcc/cp/config-lang.in2
-rw-r--r--gnu/usr.bin/gcc/cp/cp-tree.h11
-rw-r--r--gnu/usr.bin/gcc/cp/decl.c92
-rw-r--r--gnu/usr.bin/gcc/cp/decl2.c56
-rw-r--r--gnu/usr.bin/gcc/cp/except.c56
-rw-r--r--gnu/usr.bin/gcc/cp/exception.cc13
-rw-r--r--gnu/usr.bin/gcc/cp/init.c131
-rw-r--r--gnu/usr.bin/gcc/cp/method.c21
-rw-r--r--gnu/usr.bin/gcc/cp/parse.y9
-rw-r--r--gnu/usr.bin/gcc/cp/pt.c132
-rw-r--r--gnu/usr.bin/gcc/cp/rtti.c15
-rw-r--r--gnu/usr.bin/gcc/cp/spew.c4
-rw-r--r--gnu/usr.bin/gcc/cp/tree.c5
-rw-r--r--gnu/usr.bin/gcc/cp/typeck.c33
-rw-r--r--gnu/usr.bin/gcc/cp/typeck2.c3
-rw-r--r--gnu/usr.bin/gcc/cpp.texi60
-rw-r--r--gnu/usr.bin/gcc/cpplib.c8
-rw-r--r--gnu/usr.bin/gcc/crtstuff.c26
-rw-r--r--gnu/usr.bin/gcc/cse.c4
-rw-r--r--gnu/usr.bin/gcc/dwarf2out.c25
-rw-r--r--gnu/usr.bin/gcc/emit-rtl.c11
-rw-r--r--gnu/usr.bin/gcc/enquire.c49
-rw-r--r--gnu/usr.bin/gcc/except.c119
-rw-r--r--gnu/usr.bin/gcc/explow.c5
-rw-r--r--gnu/usr.bin/gcc/expr.c201
-rw-r--r--gnu/usr.bin/gcc/expr.h5
-rw-r--r--gnu/usr.bin/gcc/extend.texi19
-rw-r--r--gnu/usr.bin/gcc/fixincludes17
-rw-r--r--gnu/usr.bin/gcc/fold-const.c26
-rw-r--r--gnu/usr.bin/gcc/function.c183
-rw-r--r--gnu/usr.bin/gcc/function.h4
-rw-r--r--gnu/usr.bin/gcc/gansidecl.h9
-rw-r--r--gnu/usr.bin/gcc/gbl-ctors.h4
-rw-r--r--gnu/usr.bin/gcc/gcc.112
-rw-r--r--gnu/usr.bin/gcc/gcc.c161
-rw-r--r--gnu/usr.bin/gcc/gcc.hlp3
-rw-r--r--gnu/usr.bin/gcc/gcc.texi16
-rw-r--r--gnu/usr.bin/gcc/genattrtab.c9
-rw-r--r--gnu/usr.bin/gcc/install.texi59
-rw-r--r--gnu/usr.bin/gcc/integrate.c75
-rw-r--r--gnu/usr.bin/gcc/integrate.h8
-rw-r--r--gnu/usr.bin/gcc/invoke.texi9
-rw-r--r--gnu/usr.bin/gcc/libgcc2.c43
-rw-r--r--gnu/usr.bin/gcc/loop.c12
-rw-r--r--gnu/usr.bin/gcc/md.texi12
-rw-r--r--gnu/usr.bin/gcc/mips-tfile.c10
-rw-r--r--gnu/usr.bin/gcc/objc/Make-lang.in24
-rw-r--r--gnu/usr.bin/gcc/objc/config-lang.in4
-rw-r--r--gnu/usr.bin/gcc/obstack.h172
-rw-r--r--gnu/usr.bin/gcc/optabs.c13
-rw-r--r--gnu/usr.bin/gcc/prefix.c22
-rw-r--r--gnu/usr.bin/gcc/profile.c5
-rw-r--r--gnu/usr.bin/gcc/protoize.c90
-rw-r--r--gnu/usr.bin/gcc/reg-stack.c8
-rw-r--r--gnu/usr.bin/gcc/reload.c47
-rw-r--r--gnu/usr.bin/gcc/reorg.c44
-rw-r--r--gnu/usr.bin/gcc/rtl.h12
-rw-r--r--gnu/usr.bin/gcc/rtl.texi12
-rw-r--r--gnu/usr.bin/gcc/rtlanal.c35
-rw-r--r--gnu/usr.bin/gcc/sched.c24
-rw-r--r--gnu/usr.bin/gcc/sdbout.c8
-rw-r--r--gnu/usr.bin/gcc/stab.def24
-rw-r--r--gnu/usr.bin/gcc/stmt.c37
-rw-r--r--gnu/usr.bin/gcc/texinfo.tex303
-rw-r--r--gnu/usr.bin/gcc/tm.texi32
-rw-r--r--gnu/usr.bin/gcc/toplev.c84
-rw-r--r--gnu/usr.bin/gcc/tree.c54
-rw-r--r--gnu/usr.bin/gcc/tree.h11
-rw-r--r--gnu/usr.bin/gcc/unroll.c74
-rw-r--r--gnu/usr.bin/gcc/varasm.c71
-rw-r--r--gnu/usr.bin/gcc/version.c2
149 files changed, 4345 insertions, 2198 deletions
diff --git a/gnu/usr.bin/gcc/ChangeLog b/gnu/usr.bin/gcc/ChangeLog
index 108f95a354f..bbd60c7043d 100644
--- a/gnu/usr.bin/gcc/ChangeLog
+++ b/gnu/usr.bin/gcc/ChangeLog
@@ -1,3 +1,659 @@
+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.
diff --git a/gnu/usr.bin/gcc/ChangeLog.0 b/gnu/usr.bin/gcc/ChangeLog.0
index 2e413b1c25f..461a66a4e2e 100644
--- a/gnu/usr.bin/gcc/ChangeLog.0
+++ b/gnu/usr.bin/gcc/ChangeLog.0
@@ -1,4 +1,3 @@
-
Wed Dec 21 02:46:34 1988 Richard Stallman (rms at sugar-bombs.ai.mit.edu)
* Version 1.32 released.
diff --git a/gnu/usr.bin/gcc/ChangeLog.lib b/gnu/usr.bin/gcc/ChangeLog.lib
index e87eabe6f55..d70542378bb 100644
--- a/gnu/usr.bin/gcc/ChangeLog.lib
+++ b/gnu/usr.bin/gcc/ChangeLog.lib
@@ -1,3 +1,21 @@
+1998-02-13 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * config.sub: Add PentiumII (i786). Add '7' to all i[3456]
+ entries. Add AMD and Cyrix names for P5 and P6.
+
+1998-02-03 Philip Blundell <pb@nexus.co.uk>
+
+ * config.guess: Add support for Linux/ARM.
+
+1998-02-03 Paul Eggert <eggert@twinsun.com>
+
+ * obstack.h (PTR_INT_TYPE): Use __PTRDIFF_TYPE__ if available.
+
+1998-01-28 Ian Lance Taylor <ian@cygnus.com>
+
+ * config.guess: Use ${UNAME_MACHINE} rather than i386 for cygwin32
+ and mingw32.
+
Wed Jan 1 17:54:47 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
* pexecute.c (pexecute, [_WIN32]): Yes, mask termstat for mingw32.
diff --git a/gnu/usr.bin/gcc/INSTALL b/gnu/usr.bin/gcc/INSTALL
index edbdef6496f..172688e0df9 100644
--- a/gnu/usr.bin/gcc/INSTALL
+++ b/gnu/usr.bin/gcc/INSTALL
@@ -45,8 +45,8 @@ and includes all the necessary compilation tools and libraries.
what your configuration is or guesses wrong.
In those cases, specify the build machine's "configuration name"
- with the `--build' option; the host and target will default to be
- the same as the build machine. (If you are building a
+ with the `--host' option; the host and target will default to be
+ the same as the host machine. (If you are building a
cross-compiler, see *Note Cross-Compiler::.)
Here is an example:
@@ -422,12 +422,12 @@ and includes all the necessary compilation tools and libraries.
This copies the files `cc1', `cpp' and `libgcc.a' to files `cc1',
`cpp' and `libgcc.a' in the directory
`/usr/local/lib/gcc-lib/TARGET/VERSION', which is where the
- compiler driver program looks for them. Here TARGET is the target
- machine type specified when you ran `configure', and 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., `cc1plus' for
- C++) to the same directory.
+ compiler driver program looks for them. Here TARGET is the
+ canonicalized form of target machine type specified when you ran
+ `configure', and 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., `cc1plus' for C++) to the same directory.
This also copies the driver program `xgcc' into
`/usr/local/bin/gcc', so that it appears in typical execution
@@ -454,8 +454,13 @@ and includes all the necessary compilation tools and libraries.
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 `libstdc++'.
+ An obsolescent library `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 `libg++' then you probably don't
+ need it.
+
+ Here's one way to build and install `libstdc++' for GNU CC:
* Build and install GNU CC, so that invoking `gcc' obtains the
GNU CC that was just built.
@@ -731,9 +736,10 @@ special things you must know:
AMD Am29050 used in a system running a variant of BSD Unix.
`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 `alpha-dec'.) To
+ configure GCC for these platforms use the following configurations:
`decstation-ultrix'
Ultrix configuration.
@@ -825,16 +831,12 @@ special things you must know:
Use this for the SCO OpenServer Release family including 5.0.0,
5.0.2, 5.0.4, Internet FastStart 1.0, and Internet FastStart 1.1.
- GNU CC can generate ELF binaries (if you specify `-melf') or COFF
- binaries (the default). If you are going to build your compiler
- in ELF mode (once you have bootstrapped the first stage compiler)
- you *must* specify `-melf' as part of `CC', *not* `CFLAGS', for
- example as `CC="stage1/xgcc -melf -Bstage1/" '. If you do not do
- this, the bootstrap will generate incorrect versions of `libgcc.a'.
+ GNU CC can generate either ELF or COFF binaries. ELF is the
+ default. To get COFF output, you must specify `-mcoff' on the
+ command line.
- You must have TLS597 (from ftp.sco.com/TLS) installed for ELF
- binaries to work correctly. Note that Open Server 5.0.2 *does*
- need TLS597 installed.
+ For 5.0.0 and 5.0.2, you must install TLS597 from ftp.sco.com/TLS.
+ 5.0.4 and later do not require this patch.
*NOTE:* You must follow the instructions about invoking `make
bootstrap' because the native OpenServer compiler builds a
@@ -943,7 +945,7 @@ special things you must know:
`m68000-hp-bsd'
HP 9000 series 200 running BSD. Note that the C compiler that
comes with this system cannot compile GNU CC; contact
- `law@cs.utah.edu' to get binaries of GNU CC for bootstrapping.
+ `law@cygnus.com' to get binaries of GNU CC for bootstrapping.
`m68k-altos'
Altos 3068. You must use the GNU assembler, linker and debugger.
@@ -1237,13 +1239,15 @@ special things you must know:
xlc-1.2.1.8, xlc-1.3.0.0 (distributed with AIX 3.2.5), and
xlc-1.3.0.19. Both xlc-1.2.1.28 and xlc-1.3.0.24 (PTF 432238) are
known to produce working versions of GNU CC, but most other recent
- releases correctly bootstrap GNU CC. Also, releases of AIX prior
- to AIX 3.2.4 include a version of the IBM assembler which does not
- accept debugging directives: assembler updates are available as
- PTFs. Also, if you are using AIX 3.2.5 or greater and the GNU
- assembler, you must have a version modified after October 16th,
- 1995 in order for the GNU C compiler to build. See the file
- `README.RS6000' for more details on of these problems.
+ releases correctly bootstrap GNU CC.
+
+ Release 4.3.0 of AIX and ones prior to AIX 3.2.4 include a version
+ of the IBM assembler which does not accept debugging directives:
+ assembler updates are available as PTFs. Also, if you are using
+ AIX 3.2.5 or greater and the GNU assembler, you must have a
+ version modified after October 16th, 1995 in order for the GNU C
+ compiler to build. See the file `README.RS6000' for more details
+ on any of these problems.
GNU CC does not yet support the 64-bit PowerPC instructions.
@@ -1734,8 +1738,13 @@ must specify a 68030 as the host when you configure it.
Installing GNU CC on the Sun
============================
- On Solaris (version 2.1), do not use the linker or other tools in
-`/usr/ucb' to build GNU CC. Use `/usr/ccs/bin'.
+ On Solaris, do not use the linker or other tools in `/usr/ucb' to
+build GNU CC. Use `/usr/ccs/bin'.
+
+ If the assembler reports `Error: misaligned data' when bootstrapping,
+you are probably using an obsolete version of the GNU assembler.
+Upgrade to the latest version of GNU `binutils', or use the Solaris
+assembler.
Make sure the environment variable `FLOAT_OPTION' is not set when
you compile `libgcc.a'. If this option were set to `f68881' when
diff --git a/gnu/usr.bin/gcc/Makefile.in b/gnu/usr.bin/gcc/Makefile.in
index 80ad429fcad..ebb2200317c 100644
--- a/gnu/usr.bin/gcc/Makefile.in
+++ b/gnu/usr.bin/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.
@@ -228,6 +228,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
@@ -358,6 +360,10 @@ TAROUTOPTS = xpBf
# This value is overridden directly by configure.
FIXINCLUDES = @fixincludes@
+# Set to ChangeLog if we are in a CVS working directory. This lets
+# us automatically build version.c.
+VERSION_DEP = @version_dep@
+
# Additional directories of header files to run fixincludes on.
# These should be directories searched automatically by default
# just as /usr/include is.
@@ -594,14 +600,14 @@ 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 \
- 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-proto 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-proto s-crt s-crtS s-crt0 \
genemit$(exeext) genoutput$(exeext) genrecog$(exeext) genextract$(exeext) \
genflags$(exeext) gencodes$(exeext) genconfig$(exeext) genpeep$(exeext) \
genattrtab$(exeext) genattr$(exeext) genopinit$(exeext) \
$(BC_ALL) \
- stamp-bcarity stamp-bcopcode stamp-bcopname \
+ s-bcarity s-bcopcode s-bcopname \
bi-arity$(exeext) bi-opcode$(exeext) bi-opname$(exeext) \
xgcc$(exeext) cc1$(exeext) cpp$(exeext) $(EXTRA_PASSES) \
$(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross$(exeext) \
@@ -676,6 +682,16 @@ RECOG_H = recog.h gansidecl.h
# Avoid a lot of time thinking about remaking Makefile.in and *.def.
.SUFFIXES: .in .def
+$(srcdir)/version.c: $(VERSION_DEP)
+ cd $(srcdir); cvs log -h $? >tmp-ver
+ tag=`sed '1,/^sym/d;s/ *gcc-//;s/:.*$$//;q' tmp-ver`; \
+ ver=`echo $${tag} | sed 's/-.*//' | sed 's/_/./g'`; \
+ date=`echo $${tag} | sed 's/.*-//'`; \
+ if [ $${date} != RELEASE ]; then ver="testgcc-$${ver} $${date} experimental"; fi; \
+ echo "char *version_string = \"$${ver}\";" >>tmp-version.c
+ rm -f tmp-ver
+ $(srcdir)/move-if-change tmp-version.c $(srcdir)/version.c
+
Makefile: $(srcdir)/Makefile.in config.status $(srcdir)/version.c \
$(xmake_file) $(tmake_file) $(LANG_MAKEFILES)
$(SHELL) $(srcdir)/configure.frag $(srcdir) "$(SUBDIRS)" \
@@ -1051,8 +1067,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)" \
@@ -1060,7 +1076,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) \
@@ -1147,9 +1163,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 \
@@ -1158,18 +1174,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.
@@ -1228,9 +1244,9 @@ collect2.o : collect2.c $(CONFIG_H) gansidecl.h gstab.h obstack.h $(DEMANGLE_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
@@ -1241,7 +1257,7 @@ stamp-under: $(GCC_PASSES)
fi
sh $(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.
@@ -1278,7 +1294,8 @@ print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) flags.h function.h
fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h
toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) bytecode.h bc-emit.h \
- flags.h input.h insn-attr.h xcoffout.h defaults.h output.h \
+ flags.h input.h insn-attr.h insn-codes.h insn-config.h recog.h xcoffout.h \
+ defaults.h output.h \
$(lang_options_files)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(MAYBE_USE_COLLECT2) \
-DTARGET_NAME=\"$(target_alias)\" \
@@ -1327,7 +1344,7 @@ xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h except.h \
function.h regs.h insn-config.h $(RECOG_H) real.h expr.h obstack.h \
bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h \
- bc-opname.h
+ bc-opname.h hard-reg-set.h
real.o : real.c $(CONFIG_H) $(TREE_H)
getpwd.o : getpwd.c $(CONFIG_H)
@@ -1423,7 +1440,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.
@@ -1435,84 +1452,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
sh $(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
sh $(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
sh $(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
$(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
sh $(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
$(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
sh $(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
$(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
sh $(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)
$(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
sh $(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
$(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
sh $(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
$(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
sh $(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); \
@@ -1521,18 +1538,18 @@ stamp-attrtab : $(md_file) genattrtab $(srcdir)/move-if-change
./genattrtab $(md_file) > tmp-attrtab.c; \
fi
sh $(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
$(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
sh $(srcdir)/move-if-change tmp-output.c insn-output.c
- touch stamp-output
+ touch s-output
#
# Compile the programs that generate insn-* from the machine description.
# They are compiled with $(HOST_CC), and associated libraries,
@@ -1707,23 +1724,23 @@ bi-reverse.o: bi-reverse.c bi-defs.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
$(srcdir)/bi-reverse.c
-bc-arity.h: stamp-bcarity ; @true
-stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
+bc-arity.h: s-bcarity ; @true
+s-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
sh $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
- touch stamp-bcarity
+ touch s-bcarity
-bc-opcode.h: stamp-bcopcode ; @true
-stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
+bc-opcode.h: s-bcopcode ; @true
+s-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
sh $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
- touch stamp-bcopcode
+ touch s-bcopcode
-bc-opname.h: stamp-bcopname ; @true
-stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
+bc-opname.h: s-bcopname ; @true
+s-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
sh $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
- touch stamp-bcopname
+ touch s-bcopname
bytecode.mostlyclean:
-rm -f bc-arity.h bc-opcode.h bc-opname.h
@@ -1751,8 +1768,6 @@ cexp.c: $(srcdir)/cexp.y
$(BISON) -o cexp.c $(srcdir)/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)\" \
@@ -1797,16 +1812,16 @@ protoize: protoize.o getopt.o getopt1.o getpwd.o version.o \
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
protoize.o getopt.o getopt1.o getpwd.o version.o \
pexecute.o choose-temp.o $(LIBS)
-protoize.o: stamp-proto ; @true
+protoize.o: s-proto ; @true
unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o \
pexecute.o choose-temp.o $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \
unprotoize.o getopt.o getopt1.o getpwd.o version.o \
pexecute.o choose-temp.o $(LIBS)
-unprotoize.o: stamp-proto ; @true
+unprotoize.o: s-proto ; @true
-stamp-proto: protoize.c getopt.h $(CONFIG_H)
+s-proto: protoize.c getopt.h $(CONFIG_H)
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
@@ -1824,7 +1839,7 @@ stamp-proto: protoize.c getopt.h $(CONFIG_H)
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
-DSTD_PROTO_DIR=\"$(libsubdir)\" \
$(srcdir)/protoize.c
- touch stamp-proto
+ touch s-proto
getopt.o: getopt.c getopt.h
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
@@ -1872,7 +1887,7 @@ gcov: 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
@@ -2054,14 +2069,10 @@ mostlyclean: bytecode.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
@@ -2099,8 +2110,7 @@ clean: mostlyclean bytecode.clean 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 \
@@ -2415,32 +2425,29 @@ uninstall: lang.uninstall
# 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
+ mv tmp-tags/* .; \
+ rmdir tmp-tags
-# Create the distribution tar file.
-#dist: gcc-$(version).tar.gz
-dist: 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.xtar.gz: gcc.xtar
- gzip --best < gcc.xtar > tmp-gcc.xtar.gz
- mv tmp-gcc.xtar.gz gcc.xtar.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;\
@@ -2462,7 +2469,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 \
@@ -2488,21 +2495,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 bi-parser.c -x objc-parse.y -x objc-parse.c \
- -x bi-parser.h -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: force
# Only build the C compiler for stage1, because that is the only one that
diff --git a/gnu/usr.bin/gcc/NEWS b/gnu/usr.bin/gcc/NEWS
index dd0b422cc76..d6d48942af7 100644
--- a/gnu/usr.bin/gcc/NEWS
+++ b/gnu/usr.bin/gcc/NEWS
@@ -1,3 +1,9 @@
+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
---------------------------------------
diff --git a/gnu/usr.bin/gcc/README b/gnu/usr.bin/gcc/README
index 6e4fed8153a..6426d4e9c32 100644
--- a/gnu/usr.bin/gcc/README
+++ b/gnu/usr.bin/gcc/README
@@ -1,4 +1,4 @@
-This directory contains the version 2.8.0 release of the GNU C
+This directory contains the version 2.8.1 release of the GNU C
compiler. It includes all of the support for compiling C++ and
Objective C, including a run-time library for Objective C.
diff --git a/gnu/usr.bin/gcc/README.RS6000 b/gnu/usr.bin/gcc/README.RS6000
index d29604f968a..6a32c164ff7 100644
--- a/gnu/usr.bin/gcc/README.RS6000
+++ b/gnu/usr.bin/gcc/README.RS6000
@@ -1,51 +1,25 @@
- AIX 3.1 and 3.2 assembler problems
+ AIX 4.3 assembler
-Specifying the -g flag to GCC on the RS/6000 requires upgrading the
-standard AIX assembler distributed with AIX 3.1 and versions of AIX
-3.2 earlier than 3.2.4 with a replacement that is available from IBM.
-Note that Makefile.in specifies the -g when compiling libgcc2.c.
+The AIX 4.3.0.0 assembler generates incorrect object files if the ".bs"
+pseudo-op references symbols in certain sections. If GCC is invoked with
+the -g debugging option (including during bootstrapping), incorrect object
+files will be produced and the AIX linker will fail with a severe error.
+A fix for APAR IX74254 (64BIT DISASSEMBLED OUPUT FROM COMPILER FAILS TO
+ASSEMBLE/BIND) is available from IBM Customer Support and IBM's
+service.boulder.ibm.com website.
-You can test for the presence of a fixed assembler by entering the following:
- % as -u < /dev/null
-If the command exits normally, the assembler fix already is installed.
-If the assembler complains that "-u" is an unknown flag, you need to order
-the fix.
-If you are running AIX 3.1 (lslpp -h bos.obj output reports
-03.01.0005.XXXX where the 0005 can be any higher number and the XXXX
-can be any value), call IBM Support at 800-237-5511 and ask for
-shipment of AIX/6000 fix PTF U403044 for APAR IX22829 (.extern foo
-conflicts with defining foo).
-
-If you are running AIX 3.2 but not 3.2.4 or later (lslpp -h bos.obj
-output reports 03.02.0000.0000), a newer update to the assembler fix
-is available. Ask for shipment of AIX/6000 fix PTF U416277 for
-IX32992 (.global prevents detection of duplicate symbol).
-
-If you are running AIX 3.2.4 or later, you already have the new
-assembler.
+ AIX 4.1 binder
-Any customer can order and get the replacement assembler, and install it on
-one or more machines. It is available on diskette from IBM Customer Support
-and from the IBM Internet fix anonymous ftp server (FixDist) at
-aix.boulder.ibm.com (198.17.57.66).
-
-If you contact IBM Customer Support, they may also ask you for your customer
-number. If you do not know it, you will still be able to get the fix, but
-you will have to be persistent. IBM has corresponding support organizations
-outside of North America. Call your IBM branch office and ask them to put
-you in touch with the department that handles fixes for AIX/6000. If that
-doesn't work, ask for the department that handles software defect support
-for AIX/6000 and ask for the APAR fix.
-
-If you use the GNU assembler instead of the system supplied assembler, you need
-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.
+Due to changes in the way that GCC invokes the binder (linker) for AIX 4.1,
+the link step now may produce warnings of duplicate symbols which were not
+reported before. The assembly files generated by GCC for AIX always have
+included multiple symbol definitions for certain global variable and
+function declarations in the original program. The warnings should not
+prevent the linker from producing a correct library or runnable executable.
- AIX NLS problems
+ AIX NLS problems
AIX on the RS/6000 provides support (NLS) for environments outside of
the United States. Compilers and assemblers use NLS to support
@@ -56,7 +30,7 @@ not produce the same floating-point formats that the assembler accepts.
If you have this problem, set the LANG environment variable to "C" or
"En_US".
-
+
AIX 3.2.5 XLC-1.3 problems
XLC version 1.3.0.0 distributed with AIX 3.2.5 will miscompile jump.c when
@@ -72,7 +46,7 @@ releases of xlc-1.2.1, including xlc-1.2.1.8. Newer releases of xlc-1.2.1
do not exhibit this problem: xlc-1.2.1.28 is known to bootstrap properly.
- AIX 3.2 common-mode support
+ AIX 3.2 common-mode support
AIX common-mode providing transparent support of both the POWER and PowerPC
architectures is usable in AIX 3.2.3 and above but an export file and
@@ -101,11 +75,48 @@ __quous 0x3380
and then link with -Wl,-bI:milli.exp.
- AIX 4.1 binder
+ AIX 3.1 and 3.2 assembler problems
+
+Specifying the -g flag to GCC on the RS/6000 requires upgrading the
+standard AIX assembler distributed with AIX 3.1 and versions of AIX
+3.2 earlier than 3.2.4 with a replacement that is available from IBM.
+Note that Makefile.in specifies the -g when compiling libgcc2.c.
-Due to changes in the way that GCC invokes the binder (linker) for AIX 4.1,
-the link step now may produce warnings of duplicate symbols which were not
-reported before. The assembly files generated by GCC for AIX always have
-included multiple symbol definitions for certain global variable and
-function declarations in the original program. The warnings should not
-prevent the linker from producing a correct library or runnable executable.
+You can test for the presence of a fixed assembler by entering the following:
+ % as -u < /dev/null
+If the command exits normally, the assembler fix already is installed.
+If the assembler complains that "-u" is an unknown flag, you need to order
+the fix.
+
+If you are running AIX 3.1 (lslpp -h bos.obj output reports
+03.01.0005.XXXX where the 0005 can be any higher number and the XXXX
+can be any value), call IBM Support at 800-237-5511 and ask for
+shipment of AIX/6000 fix PTF U403044 for APAR IX22829 (.extern foo
+conflicts with defining foo).
+
+If you are running AIX 3.2 but not 3.2.4 or later (lslpp -h bos.obj
+output reports 03.02.0000.0000), a newer update to the assembler fix
+is available. Ask for shipment of AIX/6000 fix PTF U416277 for
+IX32992 (.global prevents detection of duplicate symbol).
+
+If you are running AIX 3.2.4 or later, you already have the new
+assembler.
+
+Any customer can order and get the replacement assembler, and install it on
+one or more machines. It is available on diskette from IBM Customer Support
+and from the IBM Internet fix anonymous ftp server (FixDist) at
+aix.boulder.ibm.com (198.17.57.66).
+
+If you contact IBM Customer Support, they may also ask you for your customer
+number. If you do not know it, you will still be able to get the fix, but
+you will have to be persistent. IBM has corresponding support organizations
+outside of North America. Call your IBM branch office and ask them to put
+you in touch with the department that handles fixes for AIX/6000. If that
+doesn't work, ask for the department that handles software defect support
+for AIX/6000 and ask for the APAR fix.
+
+If you use the GNU assembler instead of the system supplied assembler, you need
+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/gnu/usr.bin/gcc/SERVICE b/gnu/usr.bin/gcc/SERVICE
index 46441675fd0..80f2853a019 100644
--- a/gnu/usr.bin/gcc/SERVICE
+++ b/gnu/usr.bin/gcc/SERVICE
@@ -35,7 +35,7 @@ have nothing to go by. Please put each e-mail address inside "<>".
Please put nothing else inside "<>". Thanks!
For a current copy of this directory, or to have yourself listed, ask:
- gnu@prep.ai.mit.edu
+ gnu@gnu.org
** Please keep the entries in this file alphabetical **

@@ -746,7 +746,7 @@ Crows Nest, NSW 2065
AUSTRALIA
+61 411250024
-* The human face behind the bug-g++@prep.ai.mit.edu mailing list - known
+* The human face behind the bug-g++@gnu.org mailing list - known
in the past as <rjl@iassf.easams.com.au> and <rjl@ot.com.au> - now
known as <rjl@wr.com.au>.
@@ -898,6 +898,32 @@ Rates: $90-$150 / hour, negotiable, depending on many variables.
Updated: 1997-05-07

+Mark P. Mitchell <mmitchell@usa.net>
+3421 El Camino Real #35
+Atherton, CA 94027
+(650) 364-5360
+http://home.earthlink.net/~mbmitchell/consulting.html
+
+Experience
+----------
+I am an experienced software engineer, with particular expertise in
+the field of programming tools. I am responsible for the
+implementation of member templates in currently available versions of
+G++ as well as many other G++ bug-fixes, and continue to work actively on
+improving G++.
+
+I am willing to work on any and all projects involving free software.
+
+Please see my resume at the above URL for further information on
+my experience and qualifications.
+
+Rates
+-----
+My standard rate is $125/hr, but I am willing to negotiate flat fees, and
+discounts for deserving organizations.
+
+Updated: 1998-02-13
+
Erik Naggum <erik@naggum.no>
P.O. Box 1570 Vika http://www.naggum.no
0118 OSLO phone: +47 8800 8879
@@ -1291,7 +1317,7 @@ non-profit organizations.
Updated: 1997-05-19

-Leonard H. Tower Jr. <tower@prep.ai.mit.edu>
+Leonard H. Tower Jr. <tower@ai.mit.edu>
36 Porter Street
Somerville, MA 02143
USA
@@ -1300,13 +1326,14 @@ USA
Will work on most GNU software.
Installation, handholding, trouble shooting, extensions, teaching.
-Rates: $ 150.00/hour + travel expenses. Negotiable for non-profits.
+Rates: $ 150.00/hour + travel expenses. Fixed fee quotes available.
+ Negotiable for non-profits.
Experience: Have hacked on over a dozen architectures in many languages. Have
system mothered too many varieties of Unixes. Assisted rms with the front end
of gcc and its back-end support. Resume available on request.
-Updated: 1997-05-24
+Updated: 1998-02-10

noris network GmbH
Matthias Urlichs
@@ -1415,6 +1442,6 @@ Updated: 1996-12-04

For a current copy of this directory, or to have yourself listed, ask:
- gnu@prep.ai.mit.edu
+ gnu@gnu.org
** Please keep the entries in this file alphabetical **
diff --git a/gnu/usr.bin/gcc/acconfig.h b/gnu/usr.bin/gcc/acconfig.h
index 41c0cf8b1d6..cca3a4d37ff 100644
--- a/gnu/usr.bin/gcc/acconfig.h
+++ b/gnu/usr.bin/gcc/acconfig.h
@@ -21,4 +21,7 @@
/* Whether getenv must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_GETENV
+
+/* Whether sbrk must be declared even if <stdlib.h> is included. */
+#undef NEED_DECLARATION_SBRK
@TOP@
diff --git a/gnu/usr.bin/gcc/c-common.c b/gnu/usr.bin/gcc/c-common.c
index e7d7f71ac8b..aa5e4cea500 100644
--- a/gnu/usr.bin/gcc/c-common.c
+++ b/gnu/usr.bin/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.
@@ -918,37 +918,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 }
};
@@ -1287,7 +1289,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
@@ -1395,6 +1397,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')
@@ -1517,6 +1525,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)
{
diff --git a/gnu/usr.bin/gcc/c-decl.c b/gnu/usr.bin/gcc/c-decl.c
index 9c315eeef96..9691e7c423c 100644
--- a/gnu/usr.bin/gcc/c-decl.c
+++ b/gnu/usr.bin/gcc/c-decl.c
@@ -1,5 +1,5 @@
/* Process declarations and variables for C 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.
@@ -776,6 +776,7 @@ c_decode_option (p)
warn_unused = 1;
warn_switch = 1;
warn_format = 1;
+ warn_char_subscripts = 1;
warn_parentheses = 1;
warn_missing_braces = 1;
/* We set this to 2 here, but 1 in -Wmain, so -ffreestanding can turn
@@ -1967,13 +1968,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);
@@ -2131,7 +2133,8 @@ pushdecl (x)
if (TYPE_NAME (TREE_TYPE (x)) == 0)
TYPE_NAME (TREE_TYPE (x)) = x;
}
- else if (TREE_TYPE (x) != error_mark_node)
+ else if (TREE_TYPE (x) != error_mark_node
+ && DECL_ORIGINAL_TYPE (x) == NULL_TREE)
{
tree tt = TREE_TYPE (x);
DECL_ORIGINAL_TYPE (x) = tt;
@@ -5151,9 +5154,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/gnu/usr.bin/gcc/c-lex.c b/gnu/usr.bin/gcc/c-lex.c
index 77d40a40573..33fecf07c03 100644
--- a/gnu/usr.bin/gcc/c-lex.c
+++ b/gnu/usr.bin/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.
@@ -1474,8 +1474,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;
@@ -1504,7 +1504,6 @@ yylex ()
}
*p = 0;
- errno = 0;
/* Convert string to a double, checking for overflow. */
if (setjmp (handler))
@@ -1574,7 +1573,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. */
@@ -1584,13 +1585,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'");
}
@@ -1598,17 +1603,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/gnu/usr.bin/gcc/c-parse.in b/gnu/usr.bin/gcc/c-parse.in
index f62806dc168..728c5e13acb 100644
--- a/gnu/usr.bin/gcc/c-parse.in
+++ b/gnu/usr.bin/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.
@@ -682,7 +682,7 @@ end ifobjc
if (IDENTIFIER_GLOBAL_VALUE ($1) != error_mark_node
|| IDENTIFIER_ERROR_LOCUS ($1) != current_function_decl)
{
- error ("`%s' undeclared (first use this function)",
+ error ("`%s' undeclared (first use in this function)",
IDENTIFIER_POINTER ($1));
if (! undeclared_variable_notice)
diff --git a/gnu/usr.bin/gcc/c-typeck.c b/gnu/usr.bin/gcc/c-typeck.c
index 135ca9b09c2..e0989582a98 100644
--- a/gnu/usr.bin/gcc/c-typeck.c
+++ b/gnu/usr.bin/gcc/c-typeck.c
@@ -1,5 +1,5 @@
/* Build expressions with type checking for C compiler.
- Copyright (C) 1987, 88, 91-6, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 91-7, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -802,7 +802,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))
diff --git a/gnu/usr.bin/gcc/calls.c b/gnu/usr.bin/gcc/calls.c
index 095c2f37707..bec7f344228 100644
--- a/gnu/usr.bin/gcc/calls.c
+++ b/gnu/usr.bin/gcc/calls.c
@@ -1,5 +1,5 @@
/* Convert function calls to rtl insns, for GNU C compiler.
- 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.
@@ -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;
@@ -710,8 +711,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;
}
}
diff --git a/gnu/usr.bin/gcc/cccp.c b/gnu/usr.bin/gcc/cccp.c
index 368298b90cb..28ff4ca601b 100644
--- a/gnu/usr.bin/gcc/cccp.c
+++ b/gnu/usr.bin/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
@@ -866,7 +866,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
@@ -1059,7 +1060,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));
@@ -2755,9 +2756,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;
@@ -2776,9 +2779,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;
}
@@ -2807,20 +2812,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++;
}
@@ -2837,14 +2847,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;
@@ -2995,9 +3004,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 != '.') {
@@ -3008,9 +3019,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++;
@@ -3270,35 +3283,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') {
@@ -3325,6 +3309,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 != '(') {
@@ -3546,8 +3583,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;
@@ -3665,8 +3705,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
@@ -3832,13 +3889,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;
@@ -3875,7 +3926,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;
@@ -4202,10 +4253,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. */
@@ -4288,16 +4344,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;
@@ -4321,9 +4379,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
@@ -7089,6 +7151,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";
@@ -7117,22 +7180,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)
@@ -7194,6 +7284,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')
@@ -7201,6 +7293,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;
}
@@ -7321,7 +7415,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;
@@ -7645,10 +7745,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') {
@@ -8082,29 +8183,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)
@@ -8122,12 +8224,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 */
@@ -8281,7 +8381,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,
@@ -8319,7 +8419,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;
@@ -8382,8 +8482,6 @@ macarg (argptr, rest_args)
#endif
if (c == '\"' || c == '\\') /* escape these chars */
totlen++;
- else if (!isprint (c))
- totlen += 3;
}
argptr->stringified_length = totlen;
}
@@ -8391,6 +8489,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
@@ -8404,9 +8503,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;
{
@@ -8423,18 +8523,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] == '*') {
@@ -8475,8 +8572,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;
@@ -8572,16 +8672,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 '\'':
@@ -8597,10 +8697,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++;
+ }
}
}
}
@@ -8651,7 +8757,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;
@@ -8738,6 +8844,7 @@ static void
error_from_errno (name)
char *name;
{
+ int e = errno;
int i;
FILE_BUF *ip = NULL;
@@ -8752,7 +8859,7 @@ error_from_errno (name)
if (ip != NULL)
fprintf (stderr, "%s:%d: ", ip->nominal_fname, ip->lineno);
- fprintf (stderr, "%s: %s\n", name, my_strerror (errno));
+ fprintf (stderr, "%s: %s\n", name, my_strerror (e));
errors++;
}
@@ -9586,10 +9693,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. */
@@ -9974,8 +10078,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/gnu/usr.bin/gcc/combine.c b/gnu/usr.bin/gcc/combine.c
index 0888113cf6a..cd843158db3 100644
--- a/gnu/usr.bin/gcc/combine.c
+++ b/gnu/usr.bin/gcc/combine.c
@@ -2351,12 +2351,12 @@ try_combine (i3, i2, i1)
if (newi2pat && reg_set_p (i3dest_killed, newi2pat))
distribute_notes (gen_rtx (EXPR_LIST, REG_DEAD, i3dest_killed,
NULL_RTX),
- NULL_RTX, i2, NULL_RTX, NULL_RTX, NULL_RTX);
+ NULL_RTX, i2, NULL_RTX, elim_i2, elim_i1);
else
distribute_notes (gen_rtx (EXPR_LIST, REG_DEAD, i3dest_killed,
NULL_RTX),
NULL_RTX, i3, newi2pat ? i2 : NULL_RTX,
- NULL_RTX, NULL_RTX);
+ elim_i2, elim_i1);
}
if (i2dest_in_i2src)
@@ -11307,15 +11307,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.
@@ -11332,6 +11338,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);
@@ -11388,13 +11408,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/gnu/usr.bin/gcc/config.guess b/gnu/usr.bin/gcc/config.guess
index 413ed41c0f5..30230b3dfe9 100644
--- a/gnu/usr.bin/gcc/config.guess
+++ b/gnu/usr.bin/gcc/config.guess
@@ -1,6 +1,6 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# 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 free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -478,10 +478,10 @@ EOF
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
exit 0 ;;
i*:CYGWIN*:*)
- echo i386-pc-cygwin32
+ echo ${UNAME_MACHINE}-pc-cygwin32
exit 0 ;;
i*:MINGW*:*)
- echo i386-pc-mingw32
+ echo ${UNAME_MACHINE}-pc-mingw32
exit 0 ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin32
@@ -493,6 +493,12 @@ EOF
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
+ # uname on the ARM produces all sorts of strangeness, and we need to
+ # filter it out.
+ case "$UNAME_MACHINE" in
+ arm* | sa110*) UNAME_MACHINE="arm" ;;
+ esac
+
# The BFD linker knows what the default object file format is, so
# first see if it will tell us.
ld_help_string=`ld --help 2>&1`
@@ -506,6 +512,7 @@ EOF
i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
diff --git a/gnu/usr.bin/gcc/config.in b/gnu/usr.bin/gcc/config.in
index a99b05fc19c..d5018c1ce11 100644
--- a/gnu/usr.bin/gcc/config.in
+++ b/gnu/usr.bin/gcc/config.in
@@ -23,6 +23,9 @@
/* Whether getenv must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_GETENV
+/* Whether sbrk must be declared even if <stdlib.h> is included. */
+#undef NEED_DECLARATION_SBRK
+
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
@@ -65,6 +68,9 @@
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
+/* Define if you have the sysconf function. */
+#undef HAVE_SYSCONF
+
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
diff --git a/gnu/usr.bin/gcc/config.sub b/gnu/usr.bin/gcc/config.sub
index 68939140959..ce31dcd4137 100644
--- a/gnu/usr.bin/gcc/config.sub
+++ b/gnu/usr.bin/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.
@@ -162,7 +162,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.
@@ -171,7 +171,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-* \
@@ -350,19 +350,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
;;
@@ -469,25 +469,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/^[^-]*-//'`
;;
mips-arc-*)
basic_machine=mips-r4kle
diff --git a/gnu/usr.bin/gcc/config/alpha/alpha.c b/gnu/usr.bin/gcc/config/alpha/alpha.c
index 8371a5d5943..de032d28828 100644
--- a/gnu/usr.bin/gcc/config/alpha/alpha.c
+++ b/gnu/usr.bin/gcc/config/alpha/alpha.c
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on the DEC Alpha.
- 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.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
@@ -2083,8 +2083,18 @@ output_prolog (file, size)
STACK_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM);
/* Describe our frame. */
- fprintf (file, "\t.frame $%d,%d,$26,%d\n",
- unwind_regno, frame_size, rsa_offset);
+ fprintf (file, "\t.frame $%d,", unwind_regno);
+
+ /* If the frame size is larger than an integer, print it as zero to
+ avoid an assembler error. We won't be properly describing such a
+ frame, but that's the best we can do. */
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC,
+#if HOST_BITS_PER_WIDE_INT == 64
+ frame_size >= (1l << 31) ? 0:
+#endif
+ frame_size
+ );
+ fprintf (file, ",$26,%d\n", rsa_offset);
/* If we have to allocate space for outgoing args, do it now. */
if (current_function_outgoing_args_size != 0)
@@ -2229,7 +2239,7 @@ vms_valid_decl_attribute_p (decl, attributes, identifier, args)
void
output_prolog (file, size)
FILE *file;
- int size;
+ HOST_WIDE_INT size;
{
HOST_WIDE_INT out_args_size
= ALPHA_ROUND (current_function_outgoing_args_size);
@@ -2384,10 +2394,20 @@ output_prolog (file, size)
/* Describe our frame. */
if (!flag_inhibit_size_directive)
{
- fprintf (file, "\t.frame $%d,%d,$26,%d\n",
+ fprintf (file, "\t.frame $%d,",
(frame_pointer_needed
- ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM),
- frame_size, current_function_pretend_args_size);
+ ? HARD_FRAME_POINTER_REGNUM : STACK_POINTER_REGNUM));
+
+ /* If the frame size is larger than an integer, print it as zero to
+ avoid an assembler error. We won't be properly describing such a
+ frame, but that's the best we can do. */
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC,
+#if HOST_BITS_PER_WIDE_INT == 64
+ frame_size >= (1l << 31) ? 0 :
+#endif
+ frame_size
+ );
+ fprintf (file, ",$26,%d\n", current_function_pretend_args_size);
}
/* Save register 26 if any other register needs to be saved. */
@@ -2411,8 +2431,15 @@ output_prolog (file, size)
/* Print the register mask and do floating-point saves. */
if (reg_mask && !flag_inhibit_size_directive)
- fprintf (file, "\t.mask 0x%x,%d\n", reg_mask,
- actual_start_reg_offset - frame_size);
+ {
+ fprintf (file, "\t.mask 0x%x,", reg_mask);
+ fprintf (file, HOST_WIDE_INT_PRINT_DEC,
+#if HOST_BITS_PER_WIDE_INT == 64
+ frame_size >= (1l << 31) ? 0 :
+#endif
+ actual_start_reg_offset - frame_size);
+ fprintf (file, "\n");
+ }
start_reg_offset = reg_offset;
reg_mask = 0;
@@ -2606,7 +2633,7 @@ alpha_output_filename (stream, name)
}
else if (name != current_function_file
- && strcmp (name, current_function_file) != 0)
+ && strcmp (name, current_function_file) != 0)
{
if (inside_function && ! TARGET_GAS)
fprintf (stream, "\t#.file\t%d ", num_source_filenames);
diff --git a/gnu/usr.bin/gcc/config/alpha/elf.h b/gnu/usr.bin/gcc/config/alpha/elf.h
index 8a7f06a928b..343244dc309 100644
--- a/gnu/usr.bin/gcc/config/alpha/elf.h
+++ b/gnu/usr.bin/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.
@@ -57,6 +57,19 @@ Boston, MA 02111-1307, USA. */
%{static:-static}}"
#endif
+#ifndef USE_GNULIBC_1
+#undef DEFAULT_VTABLE_THUNKS
+#define DEFAULT_VTABLE_THUNKS 1
+#endif
+
+#ifndef USE_GNULIBC_1
+#undef LIB_SPEC
+#define LIB_SPEC \
+ "%{shared: -lc} \
+ %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
+ %{profile:-lc_p} %{!profile: -lc}}"
+#endif
+
/* Output at beginning of assembler file. */
#undef ASM_FILE_START
@@ -493,7 +506,7 @@ do { \
#define STARTFILE_SPEC \
"%{!shared: \
%{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}}\
- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
+ crti.o%s crtbegin.o%s"
/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on
the GNU/Linux magical crtend.o file (see crtstuff.c) which
@@ -503,4 +516,4 @@ do { \
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
- "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+ "crtend.o%s crtn.o%s"
diff --git a/gnu/usr.bin/gcc/config/arm/arm.c b/gnu/usr.bin/gcc/config/arm/arm.c
index 5e12e8d30f6..947504277d7 100644
--- a/gnu/usr.bin/gcc/config/arm/arm.c
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/config/arm/arm.md b/gnu/usr.bin/gcc/config/arm/arm.md
index eb38b1967ec..5e299000309 100644
--- a/gnu/usr.bin/gcc/config/arm/arm.md
+++ b/gnu/usr.bin/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)
@@ -3918,8 +3918,10 @@
enum rtx_code code = GET_CODE (operands[1]);
rtx ccreg;
- /* When compiling for SOFT_FLOAT, ensure both arms are in registers. */
- if (! TARGET_HARD_FLOAT)
+ /* When compiling for SOFT_FLOAT, ensure both arms are in registers.
+ Otherwise, ensure it is a valid FP add operand */
+ if ((! TARGET_HARD_FLOAT)
+ || (! fpu_add_operand (operands[3], SFmode)))
operands[3] = force_reg (SFmode, operands[3]);
ccreg = gen_compare_reg (code, arm_compare_op0, arm_compare_op1,
@@ -3932,7 +3934,7 @@
[(set (match_operand:DF 0 "s_register_operand" "")
(if_then_else:DF (match_operand 1 "comparison_operator" "")
(match_operand:DF 2 "s_register_operand" "")
- (match_operand:DF 3 "nonmemory_operand" "")))]
+ (match_operand:DF 3 "fpu_add_operand" "")))]
"TARGET_HARD_FLOAT"
"
{
diff --git a/gnu/usr.bin/gcc/config/arm/t-semi b/gnu/usr.bin/gcc/config/arm/t-semi
index 9e4ddba3716..7840e2f90fa 100644
--- a/gnu/usr.bin/gcc/config/arm/t-semi
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/config/arm/x-riscix b/gnu/usr.bin/gcc/config/arm/x-riscix
index 7ab40649816..4584f95244a 100644
--- a/gnu/usr.bin/gcc/config/arm/x-riscix
+++ b/gnu/usr.bin/gcc/config/arm/x-riscix
@@ -6,4 +6,3 @@ X_CFLAGS= -DPOSIX -Dopterr=gcc_opterr -Doptind=gcc_optind \
OLDCC=/usr/ucb/cc
CC=$(OLDCC)
FIXPROTO_DEFINES= -D_POSIX_SOURCE -D_XOPEN_C -D_BSD_C -D_XOPEN_SOURCE
-INSTALL=$(srcdir)/install.sh -c
diff --git a/gnu/usr.bin/gcc/config/convex/x-convex b/gnu/usr.bin/gcc/config/convex/x-convex
index e1fbe742d03..8029ac5b91f 100644
--- a/gnu/usr.bin/gcc/config/convex/x-convex
+++ b/gnu/usr.bin/gcc/config/convex/x-convex
@@ -1,5 +1,5 @@
# ld can make exe's c2-only if this lib is searched even though not loaded
-CCLIBFLAGS = -tm c1
+CCLIBFLAGS = -tm c1
# Use -pcc to avoid surprises.
CC = cc -pcc
diff --git a/gnu/usr.bin/gcc/config/i386/cygwin32.h b/gnu/usr.bin/gcc/config/i386/cygwin32.h
index 952d8488b34..0e162869603 100644
--- a/gnu/usr.bin/gcc/config/i386/cygwin32.h
+++ b/gnu/usr.bin/gcc/config/i386/cygwin32.h
@@ -2,7 +2,7 @@
hosting on Windows NT 3.x, using a Unix style C library and tools,
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) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -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
@@ -51,7 +50,8 @@ Boston, MA 02111-1307, USA. */
ld, but that doesn't work just yet. */
#undef LIB_SPEC
-#define LIB_SPEC "-lcygwin %{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32"
+#define LIB_SPEC "-lcygwin %{mwindows:-luser32 -lgdi32 -lcomdlg32} -lkernel32 \
+ -ladvapi32 -lshell32"
#define LINK_SPEC "%{mwindows:--subsystem windows}"
@@ -149,6 +149,27 @@ 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. */
+
+#undef STRIP_NAME_ENCODING
+#define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
+do { \
+ char *_p; \
+ char *_name = ((SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*')); \
+ for (_p = _name; *_p && *_p != '@'; ++_p) \
+ ; \
+ if (*_p == '@') \
+ { \
+ int _len = _p - _name; \
+ (VAR) = (char *) alloca (_len + 1); \
+ strncpy ((VAR), _name, _len); \
+ (VAR)[_len] = '\0'; \
+ } \
+ else \
+ (VAR) = _name; \
+} while (0)
+
/* Emit code to check the stack when allocating more that 4000
bytes in one go. */
@@ -205,3 +226,6 @@ do { \
#undef ASM_COMMENT_START
#define ASM_COMMENT_START " #"
+
+/* Don't assume anything about the header files. */
+#define NO_IMPLICIT_EXTERN_C
diff --git a/gnu/usr.bin/gcc/config/i386/gmon-sol2.c b/gnu/usr.bin/gcc/config/i386/gmon-sol2.c
index c0743958f90..35ac1c9abb7 100644
--- a/gnu/usr.bin/gcc/config/i386/gmon-sol2.c
+++ b/gnu/usr.bin/gcc/config/i386/gmon-sol2.c
@@ -31,23 +31,18 @@
* SUCH DAMAGE.
*/
-/*
- * Re rework of the solaris 2 version of gmon by J.W.Hawtin 12/8/1996
- * Does not work right yet.
- */
-
/*
- * This is a modified gmon.c by J.W.Hawtin <J.W.Hawtin@lboro.ac.uk>,
+ * This is a modified gmon.c by J.W.Hawtin <oolon@ankh.org>,
* 14/8/96 based on the original gmon.c in GCC and the hacked version
* solaris 2 sparc version (config/sparc/gmon-sol.c) by Mark Eichin. To do
- * process profiling on solaris 2.4 X86
+ * process profiling on solaris 2.X X86
*
* It must be used in conjunction with sol2-gc1.asm, which is used to start
* and stop process monitoring.
*
* Differences.
*
- * On Solaris 2 _mcount is called my library functions not mcount, so support
+ * On Solaris 2 _mcount is called by library functions not mcount, so support
* has been added for both.
*
* Also the prototype for profil() is different
@@ -264,6 +259,7 @@ internal_mcount()
register struct tostruct *top;
register struct tostruct *prevtop;
register long toindex;
+ static char already_setup;
/*
* find the return address for mcount,
@@ -277,6 +273,17 @@ internal_mcount()
This identifies the caller of the function just entered. */
frompcindex = (void *) __builtin_return_address (1);
+ if(!already_setup) {
+ extern etext();
+ already_setup = 1;
+/* monstartup(0, etext); */
+ monstartup(0x08040000, etext);
+#ifdef USE_ONEXIT
+ on_exit(_mcleanup, 0);
+#else
+ atexit(_mcleanup);
+#endif
+ }
/*
* check that we are profiling
* and that we aren't recursively invoked.
diff --git a/gnu/usr.bin/gcc/config/i386/i386.h b/gnu/usr.bin/gcc/config/i386/i386.h
index 6fb08a120d2..bd90ab1844d 100644
--- a/gnu/usr.bin/gcc/config/i386/i386.h
+++ b/gnu/usr.bin/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, 95, 96, 1997 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 */
diff --git a/gnu/usr.bin/gcc/config/i386/i386.md b/gnu/usr.bin/gcc/config/i386/i386.md
index ea72a98a65e..b08e68d2323 100644
--- a/gnu/usr.bin/gcc/config/i386/i386.md
+++ b/gnu/usr.bin/gcc/config/i386/i386.md
@@ -1,5 +1,5 @@
; GCC machine description for Intel X86.
-;; Copyright (C) 1988, 1994, 1995, 1996, 1997 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.
@@ -7253,11 +7253,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"
"
{
@@ -7266,11 +7265,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"
"
{
@@ -7278,146 +7276,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%z2,%3,%4), operands);
- output_asm_insn (AS2 (mov%z2,%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%z2,%3,%4), operands);
- output_asm_insn (AS2 (mov%z2,%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);
}")
@@ -7425,211 +7357,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/gnu/usr.bin/gcc/config/i386/mingw32.h b/gnu/usr.bin/gcc/config/i386/mingw32.h
index 984a3692c30..5ae1926d1cd 100644
--- a/gnu/usr.bin/gcc/config/i386/mingw32.h
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/config/i386/sol2-c1.asm b/gnu/usr.bin/gcc/config/i386/sol2-c1.asm
index 72fdfb87cc2..d08bcbd4aec 100644
--- a/gnu/usr.bin/gcc/config/i386/sol2-c1.asm
+++ b/gnu/usr.bin/gcc/config/i386/sol2-c1.asm
@@ -1,6 +1,6 @@
! crt1.s for Solaris 2, x86
-! Copyright (C) 1993 Free Software Foundation, Inc.
+! Copyright (C) 1993, 1998 Free Software Foundation, Inc.
! Written By Fred Fish, Nov 1992
!
! This file is free software; you can redistribute it and/or modify it
@@ -149,7 +149,7 @@ _start:
! A dummy profiling support routine for non-profiling executables,
! in case we link in some objects that have been compiled for profiling.
- .globl _mcount
+ .weak _mcount
_mcount:
ret
.type _mcount,@function
diff --git a/gnu/usr.bin/gcc/config/i386/sol2-gc1.asm b/gnu/usr.bin/gcc/config/i386/sol2-gc1.asm
index 8983a672ac2..24a1965f37e 100644
--- a/gnu/usr.bin/gcc/config/i386/sol2-gc1.asm
+++ b/gnu/usr.bin/gcc/config/i386/sol2-gc1.asm
@@ -41,7 +41,7 @@
! information obtained by single stepping executables on other i386 SVR4
! implementations. This file is the first thing linked into any executable.
-! This is a modified crt1.s by J.W.Hawtin <J.W.Hawtin@lboro.ac.uk> 15/8/96,
+! This is a modified crt1.s by J.W.Hawtin <oolon@ankh.org> 15/8/96,
! to allow program profiling, by calling monstartup on entry and _mcleanup
! on exit
diff --git a/gnu/usr.bin/gcc/config/i386/sol2.h b/gnu/usr.bin/gcc/config/i386/sol2.h
index 64172359c4e..fc93bf1e99e 100644
--- a/gnu/usr.bin/gcc/config/i386/sol2.h
+++ b/gnu/usr.bin/gcc/config/i386/sol2.h
@@ -1,5 +1,5 @@
/* Target definitions for GNU compiler for Intel 80386 running Solaris 2
- Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Contributed by Fred Fish (fnf@cygnus.com).
This file is part of GNU CC.
@@ -53,7 +53,7 @@ Boston, MA 02111-1307, USA. */
#define STARTFILE_SPEC "%{!shared: \
%{!symbolic: \
%{pg:gcrt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}}}}\
- %{pg:gmon.o%s}%{!pg:crti.o%s} \
+ %{pg:gmon.o%s} crti.o%s \
%{ansi:values-Xc.o%s} \
%{!ansi: \
%{traditional:values-Xt.o%s} \
@@ -72,12 +72,14 @@ Boston, MA 02111-1307, USA. */
%{YP,*} \
%{R*} \
%{compat-bsd: \
- %{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
- %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
+ %{!YP,*:%{pg:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
+ %{!pg:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
+ %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}}} \
-R /usr/ucblib} \
%{!compat-bsd: \
- %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
- %{!p:-Y P,/usr/ccs/lib:/usr/lib}}} \
+ %{!YP,*:%{pg:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
+ %{!pg:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
+ %{!p:-Y P,/usr/ccs/lib:/usr/lib}}}} \
%{Qy:} %{!Qn:-Qy}"
/* This defines which switch letters take arguments.
diff --git a/gnu/usr.bin/gcc/config/i386/sol2dbg.h b/gnu/usr.bin/gcc/config/i386/sol2dbg.h
index 9d09c8fd043..9f95333b4b9 100644
--- a/gnu/usr.bin/gcc/config/i386/sol2dbg.h
+++ b/gnu/usr.bin/gcc/config/i386/sol2dbg.h
@@ -14,3 +14,14 @@
#ifdef DWARF_DEBUGGING_INFO
#undef DWARF_DEBUGGING_INFO
#endif
+
+/*
+ Changed from config/svr4.h in the following ways:
+
+ - Added "%{V}".
+ - Modified "{%v:-V}" to take into account "%{V}".
+ - Added "-s" so that stabs are saved in the final executable. */
+
+#undef ASM_SPEC
+#define ASM_SPEC \
+ "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} -s"
diff --git a/gnu/usr.bin/gcc/config/i386/x-osfrose b/gnu/usr.bin/gcc/config/i386/x-osfrose
index 27c36fe4fe7..2c5e3ba13c7 100644
--- a/gnu/usr.bin/gcc/config/i386/x-osfrose
+++ b/gnu/usr.bin/gcc/config/i386/x-osfrose
@@ -17,7 +17,6 @@ DEBUG =
DEBUG_COLLECT = # -DDEBUG
CCLIBFLAGS = -O -DNO_HALF_PIC
GCC_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -B./ -DPOSIX -DNO_HALF_PIC
-INSTALL = installbsd -c
LDFLAGS =
MSTATS = # -mstats
OLDCC = /usr/ccs/gcc/gcc
diff --git a/gnu/usr.bin/gcc/config/i386/x-sco5 b/gnu/usr.bin/gcc/config/i386/x-sco5
index 276d74045ed..e13ed742540 100644
--- a/gnu/usr.bin/gcc/config/i386/x-sco5
+++ b/gnu/usr.bin/gcc/config/i386/x-sco5
@@ -1,6 +1,6 @@
RANLIB = :
RANLIB_TEST = false
-CC = cc
+CC = cc
OLDCC = cc
CCLIBFLAGS =
# We avoid the ALLOCA in -lPW becuase it gives us an evil index()
diff --git a/gnu/usr.bin/gcc/config/i386/xm-go32.h b/gnu/usr.bin/gcc/config/i386/xm-go32.h
index d8182132ac6..88cadd1f127 100644
--- a/gnu/usr.bin/gcc/config/i386/xm-go32.h
+++ b/gnu/usr.bin/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.
@@ -26,3 +26,5 @@ Boston, MA 02111-1307, USA. */
/* Use semicolons to separate elements of a path. */
#define PATH_SEPARATOR ';'
+
+#define EXECUTABLE_SUFFIX ".exe"
diff --git a/gnu/usr.bin/gcc/config/i386/xm-mingw32.h b/gnu/usr.bin/gcc/config/i386/xm-mingw32.h
index 47356f568d1..38c9b6d06b0 100644
--- a/gnu/usr.bin/gcc/config/i386/xm-mingw32.h
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/config/i386/xm-os2.h b/gnu/usr.bin/gcc/config/i386/xm-os2.h
index f74bee5ebb2..aed925e993c 100644
--- a/gnu/usr.bin/gcc/config/i386/xm-os2.h
+++ b/gnu/usr.bin/gcc/config/i386/xm-os2.h
@@ -1,6 +1,6 @@
/* Configuration for GNU compiler
for an Intel i386 or later processor running OS/2 2.x.
- Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1997, 1998 Free Software Foundation, Inc.
Contributed by Samuel Figueroa (figueroa@apple.com)
This file is part of GNU CC.
@@ -33,9 +33,19 @@ Boston, MA 02111-1307, USA. */
#define kill(a,b) raise(b)
#define mktemp tmpnam
#else
+#ifdef __EMX__
+#define EMX
+#define USG
+#define BSTRING
+#define HAVE_PUTENV
+#define HAVE_VPRINTF
+#define HAVE_STRERROR
+#define strcasecmp stricmp
+#else
#define ____386BSD____
int spawnv (int modeflag, char *path, char *argv[]);
int spawnvp (int modeflag, char *path, char *argv[]);
+#endif /* __EMX__ */
#endif /* __IBMC__ */
#ifndef PATH_SEPARATOR
@@ -46,6 +56,14 @@ int spawnvp (int modeflag, char *path, char *argv[]);
#endif
#define EXECUTABLE_SUFFIX ".exe"
+
+/* The EMX compiler uses regular .o files */
+#ifndef __EMX__
#define OBJECT_SUFFIX ".obj"
+#endif
+
+/* This is required to make temporary file names unique on file
+ systems which severely restrict the length of file names. */
+#define MKTEMP_EACH_FILE
#include "i386/xm-i386.h"
diff --git a/gnu/usr.bin/gcc/config/i860/fx2800.h b/gnu/usr.bin/gcc/config/i860/fx2800.h
index 41c5bae3d06..26c7c253755 100644
--- a/gnu/usr.bin/gcc/config/i860/fx2800.h
+++ b/gnu/usr.bin/gcc/config/i860/fx2800.h
@@ -1,6 +1,6 @@
/* Target definitions for GNU compiler for Alliant FX/2800
running Concentrix 2.2
- Copyright (C) 1991, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1996, 1998 Free Software Foundation, Inc.
Contributed by Howard Chu (hyc@hanauma.jpl.nasa.gov).
This file is part of GNU CC.
@@ -252,7 +252,7 @@ Boston, MA 02111-1307, USA. */
#define DATA_ALIGNMENT(dummy,align) \
((TREE_PUBLIC (decl) && \
- (TREE_CODE (TREE_TYPE (decl))==POINTER_TYPE)) ? 64:align)
+ (POINTER_TYPE_P (TREE_TYPE (decl)))) ? 64: align)
#undef FUNCTION_PROFILER
#define FUNCTION_PROFILER(FILE, LABELNO) \
diff --git a/gnu/usr.bin/gcc/config/i860/i860.c b/gnu/usr.bin/gcc/config/i860/i860.c
index 23a3522a7a7..dd9a6f56329 100644
--- a/gnu/usr.bin/gcc/config/i860/i860.c
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/config/i960/i960.c b/gnu/usr.bin/gcc/config/i960/i960.c
index 6e86645fe61..902ed0bbb01 100644
--- a/gnu/usr.bin/gcc/config/i960/i960.c
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/config/i960/i960.md b/gnu/usr.bin/gcc/config/i960/i960.md
index 32acd924ed1..f24a9401b31 100644
--- a/gnu/usr.bin/gcc/config/i960/i960.md
+++ b/gnu/usr.bin/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
diff --git a/gnu/usr.bin/gcc/config/linux.h b/gnu/usr.bin/gcc/config/linux.h
index 3d5a8f78565..e56e62a4792 100644
--- a/gnu/usr.bin/gcc/config/linux.h
+++ b/gnu/usr.bin/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.
@@ -102,7 +102,8 @@ Boston, MA 02111-1307, USA. */
%{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
#else
#define LIB_SPEC \
- "%{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
+ "%{shared: -lc} \
+ %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
%{profile:-lc_p} %{!profile: -lc}}"
#endif
#else
diff --git a/gnu/usr.bin/gcc/config/m68k/a-ux.h b/gnu/usr.bin/gcc/config/m68k/a-ux.h
index 74aaa4ea9ad..69ecb537224 100644
--- a/gnu/usr.bin/gcc/config/m68k/a-ux.h
+++ b/gnu/usr.bin/gcc/config/m68k/a-ux.h
@@ -1,5 +1,5 @@
/* Definitions for Motorola 680x0 running A/UX
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -114,10 +114,10 @@ crt2.o%s "
For A/UX generate the result in d0, a0, or fp0 as appropriate. */
#undef FUNCTION_VALUE
-#define FUNCTION_VALUE(VALTYPE, FUNC) \
- (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 \
- ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16) \
- : (TREE_CODE (VALTYPE) == POINTER_TYPE \
+#define FUNCTION_VALUE(VALTYPE, FUNC) \
+ (TREE_CODE (VALTYPE) == REAL_TYPE && TARGET_68881 \
+ ? gen_rtx (REG, TYPE_MODE (VALTYPE), 16) \
+ : (POINTER_TYPE_P (VALTYPE) \
? gen_rtx (REG, TYPE_MODE (VALTYPE), 8) \
: gen_rtx (REG, TYPE_MODE (VALTYPE), 0)))
diff --git a/gnu/usr.bin/gcc/config/m68k/m68k.h b/gnu/usr.bin/gcc/config/m68k/m68k.h
index 654f24c7b57..fcce3455c3c 100644
--- a/gnu/usr.bin/gcc/config/m68k/m68k.h
+++ b/gnu/usr.bin/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.
@@ -135,9 +135,9 @@ extern int target_flags;
{ "68020", (MASK_68020|MASK_BITFIELD)}, \
{ "c68020", (MASK_68020|MASK_BITFIELD)}, \
{ "68000", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY \
- |MASK_68020|MASK_BITFIELD)}, \
+ |MASK_68020|MASK_BITFIELD|MASK_68881)}, \
{ "c68000", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY \
- |MASK_68020|MASK_BITFIELD)}, \
+ |MASK_68020|MASK_BITFIELD|MASK_68881)}, \
{ "bitfield", MASK_BITFIELD}, \
{ "nobitfield", - MASK_BITFIELD}, \
{ "rtd", MASK_RTD}, \
@@ -169,10 +169,13 @@ extern int target_flags;
{ "5200", (MASK_5200)}, \
{ "68851", 0}, \
{ "no-68851", 0}, \
- { "68302", - (MASK_5200|MASK_68060|MASK_68040|MASK_68020|MASK_BITFIELD)}, \
- { "68332", - (MASK_5200|MASK_68060|MASK_68040|MASK_BITFIELD)}, \
+ { "68302", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY \
+ |MASK_68020|MASK_BITFIELD|MASK_68881)}, \
+ { "68332", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY \
+ |MASK_BITFIELD)}, \
{ "68332", MASK_68020}, \
- { "cpu32", - (MASK_5200|MASK_68060|MASK_68040|MASK_BITFIELD)}, \
+ { "cpu32", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY \
+ |MASK_BITFIELD)}, \
{ "cpu32", MASK_68020}, \
{ "align-int", MASK_ALIGN_INT }, \
{ "no-align-int", -MASK_ALIGN_INT }, \
@@ -1078,23 +1081,23 @@ while(0)
#if defined(__mcf5200__)
#define MACHINE_STATE_SAVE(id) \
{ \
- asm ("subl 20,sp"); \
- asm ("movml d0/d1/a0/a1,sp@(4)"); \
- asm ("movew cc,d0"); \
- asm ("movml d0,sp@"); \
+ asm ("subl %#20,%/sp" : ); \
+ asm ("movml %/d0/%/d1/%/a0/%/a1,%/sp@(4)" : ); \
+ asm ("movew %/cc,%/d0" : ); \
+ asm ("movml %/d0,%/sp@" : ); \
}
#else /* !__mcf5200__ */
#if defined(MACHINE_STATE_m68010_up)
#define MACHINE_STATE_SAVE(id) \
{ \
- asm ("movew cc,sp@-"); \
- asm ("moveml d0/d1/a0/a1,sp@-"); \
+ asm ("movew %/cc,%/sp@-" : ); \
+ asm ("moveml %/d0/%/d1/%/a0/%/a1,%/sp@-" : ); \
}
#else /* !MACHINE_STATE_m68010_up */
#define MACHINE_STATE_SAVE(id) \
{ \
- asm ("movew sr,sp@-"); \
- asm ("moveml d0/d1/a0/a1,sp@-"); \
+ asm ("movew %/sr,%/sp@-" : ); \
+ asm ("moveml %/d0/%/d1/%/a0/%/a1,%/sp@-" : ); \
}
#endif /* MACHINE_STATE_m68010_up */
#endif /* __mcf5200__ */
@@ -1131,16 +1134,16 @@ while(0)
#if defined(__mcf5200__)
#define MACHINE_STATE_RESTORE(id) \
{ \
- asm ("movml sp@,d0"); \
- asm ("movew d0,cc"); \
- asm ("movml sp@(4),d0/d1/a0/a1"); \
- asm ("addl 20,sp"); \
+ asm ("movml %/sp@,%/d0" : ); \
+ asm ("movew %/d0,%/cc" : ); \
+ asm ("movml %/sp@(4),%/d0/%/d1/%/a0/%/a1" : ); \
+ asm ("addl %#20,%/sp" : ); \
}
#else /* !__mcf5200__ */
#define MACHINE_STATE_RESTORE(id) \
{ \
- asm ("moveml sp@+,d0/d1/a0/a1"); \
- asm ("movew sp@+,cc"); \
+ asm ("moveml %/sp@+,%/d0/%/d1/%/a0/%/a1" : ); \
+ asm ("movew %/sp@+,%/cc" : ); \
}
#endif /* __mcf5200__ */
#endif /* MOTOROLA */
diff --git a/gnu/usr.bin/gcc/config/mips/iris5.h b/gnu/usr.bin/gcc/config/mips/iris5.h
index d7840b45a4a..54cedc4fcd3 100644
--- a/gnu/usr.bin/gcc/config/mips/iris5.h
+++ b/gnu/usr.bin/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.
@@ -122,6 +122,9 @@ Boston, MA 02111-1307, USA. */
#undef SDB_DEBUGGING_INFO
#undef MIPS_DEBUGGING_INFO
+/* Likewise, the assembler doesn't handle DWARF2 directives. */
+#define DWARF2_UNWIND_INFO 0
+
#undef MACHINE_TYPE
#define MACHINE_TYPE "SGI running IRIX 5.x"
diff --git a/gnu/usr.bin/gcc/config/mips/iris5gas.h b/gnu/usr.bin/gcc/config/mips/iris5gas.h
index e519df72b25..adc90e83223 100644
--- a/gnu/usr.bin/gcc/config/mips/iris5gas.h
+++ b/gnu/usr.bin/gcc/config/mips/iris5gas.h
@@ -7,6 +7,10 @@
#define SDB_DEBUGGING_INFO
#define MIPS_DEBUGGING_INFO
+/* GNU as does handle DWARF2 directives. */
+#undef DWARF2_UNWIND_INFO
+#define DWARF2_UNWIND_INFO 1
+
/* Irix 5 does not have some strange restrictions that Irix 3 had. */
#undef SET_FILE_NUMBER
#define SET_FILE_NUMBER() ++num_source_filenames
diff --git a/gnu/usr.bin/gcc/config/mips/iris6.h b/gnu/usr.bin/gcc/config/mips/iris6.h
index 5bc733cb427..0d88750f7b8 100644
--- a/gnu/usr.bin/gcc/config/mips/iris6.h
+++ b/gnu/usr.bin/gcc/config/mips/iris6.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler. Iris version 6.
- Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -541,5 +541,5 @@ do { \
%{!static: \
%{!shared: %{!non_shared: %{!call_shared: -call_shared -no_unresolved}}}} \
%{rpath} -init __do_global_ctors -fini __do_global_dtors \
-%{shared:-hidden_symbol __do_global_ctors,__do_global_dtors,__EH_FRAME_BEGIN__} \
+%{shared:-hidden_symbol __do_global_ctors,__do_global_dtors,__EH_FRAME_BEGIN__,__frame_dummy} \
-_SYSTYPE_SVR4 %{mabi=32: -32}%{mabi=n32: -n32}%{mabi=64: -64} %{!mabi*: -n32}"
diff --git a/gnu/usr.bin/gcc/config/mips/mips.c b/gnu/usr.bin/gcc/config/mips/mips.c
index 9614398b26f..82fbf2080f4 100644
--- a/gnu/usr.bin/gcc/config/mips/mips.c
+++ b/gnu/usr.bin/gcc/config/mips/mips.c
@@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for MIPS
- Copyright (C) 1989, 90, 91, 93-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 90, 91, 93-97, 1998 Free Software Foundation, Inc.
Contributed by A. Lichnewsky, lich@inria.inria.fr.
Changes by Michael Meissner, meissner@osf.org.
64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
@@ -4319,7 +4319,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. */
@@ -5508,7 +5508,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/gnu/usr.bin/gcc/config/mips/mips.md b/gnu/usr.bin/gcc/config/mips/mips.md
index 8b81221ea3f..a3ac491de70 100644
--- a/gnu/usr.bin/gcc/config/mips/mips.md
+++ b/gnu/usr.bin/gcc/config/mips/mips.md
@@ -3,7 +3,7 @@
;; Changes by Michael Meissner, meissner@osf.org
;; 64 bit r4000 support by Ian Lance Taylor, ian@cygnus.com, and
;; Brendan Eich, brendan@microunity.com.
-;; Copyright (C) 1989, 90-96, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1989, 90-97, 1998 Free Software Foundation, Inc.
;; This file is part of GNU CC.
@@ -4075,10 +4075,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")])
@@ -6462,13 +6463,19 @@ move\\t%0,%z4\\n\\
;; For n32/n64, we need to restore gp after a builtin setjmp. We do this
;; by making use of the fact that we've just called __dummy.
+;; ??? Note that nothing guarantees that we're *right* after the return, but
+;; we usually are. There seems to be no way to make that guarantee.
(define_expand "builtin_setjmp_receiver"
[(const_int 0)]
"TARGET_ABICALLS && mips_abi != ABI_32"
"
{
- emit_insn (gen_loadgp (gen_rtx (SYMBOL_REF, Pmode, \"__dummy\")));
+ rtx label = gen_label_rtx ();
+
+ emit_label (label);
+ emit_insn (gen_loadgp (gen_rtx (LABEL_REF, Pmode, label),
+ gen_rtx (REG, DImode, 31)));
emit_insn (gen_blockage ());
}")
diff --git a/gnu/usr.bin/gcc/config/mips/x-dec-osf1 b/gnu/usr.bin/gcc/config/mips/x-dec-osf1
index a3aff92b37b..6e46f0eafd5 100644
--- a/gnu/usr.bin/gcc/config/mips/x-dec-osf1
+++ b/gnu/usr.bin/gcc/config/mips/x-dec-osf1
@@ -11,7 +11,6 @@
CC = $(OLDCC)
OPT = -O1
OLDCC = cc -Wf,-XNg1500 -Olimit 3000 $(OPT)
-INSTALL = installbsd -c
# The bison output files are machine-indep,
# so different flags for a particular machine are not useful.
diff --git a/gnu/usr.bin/gcc/config/mips/x-osfrose b/gnu/usr.bin/gcc/config/mips/x-osfrose
index 20ed4772863..825276c25c7 100644
--- a/gnu/usr.bin/gcc/config/mips/x-osfrose
+++ b/gnu/usr.bin/gcc/config/mips/x-osfrose
@@ -17,7 +17,6 @@ DEBUG =
DEBUG_COLLECT = # -DDEBUG
CCLIBFLAGS = -O -DNO_HALF_PIC
GCC_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -B./ -DPOSIX -DNO_HALF_PIC
-INSTALL = installbsd -c
LIBGCC2_CFLAGS = -O2 $(GCC_CFLAGS) -g1 -pic-extern
LDFLAGS =
MSTATS = # -mstats
diff --git a/gnu/usr.bin/gcc/config/msdos/top.sed b/gnu/usr.bin/gcc/config/msdos/top.sed
index 95236e55971..0dd99c4908f 100644
--- a/gnu/usr.bin/gcc/config/msdos/top.sed
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/config/pa/pa.c b/gnu/usr.bin/gcc/config/pa/pa.c
index d32195f23a7..d2265e6efba 100644
--- a/gnu/usr.bin/gcc/config/pa/pa.c
+++ b/gnu/usr.bin/gcc/config/pa/pa.c
@@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for HPPA.
- 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.
Contributed by Tim Moore (moore@cs.utah.edu), based on sparc.c
This file is part of GNU CC.
@@ -1062,6 +1062,7 @@ emit_move_sequence (operands, mode, scratch_reg)
{
register rtx operand0 = operands[0];
register rtx operand1 = operands[1];
+ register rtx tem;
if (reload_in_progress && GET_CODE (operand0) == REG
&& REGNO (operand0) >= FIRST_PSEUDO_REGISTER)
@@ -1085,6 +1086,15 @@ emit_move_sequence (operands, mode, scratch_reg)
operand1 = alter_subreg (operand1);
}
+ if (reload_in_progress && GET_CODE (operand0) == MEM
+ && ((tem = find_replacement (&XEXP (operand0, 0)))
+ != XEXP (operand0, 0)))
+ operand0 = gen_rtx (MEM, GET_MODE (operand0), tem);
+ if (reload_in_progress && GET_CODE (operand1) == MEM
+ && ((tem = find_replacement (&XEXP (operand1, 0)))
+ != XEXP (operand1, 0)))
+ operand1 = gen_rtx (MEM, GET_MODE (operand1), tem);
+
/* Handle secondary reloads for loads/stores of FP registers from
REG+D addresses where D does not fit in 5 bits, including
(subreg (mem (addr))) cases. */
diff --git a/gnu/usr.bin/gcc/config/rs6000/rs6000.c b/gnu/usr.bin/gcc/config/rs6000/rs6000.c
index 34964a50fba..48bdc28fdb2 100644
--- a/gnu/usr.bin/gcc/config/rs6000/rs6000.c
+++ b/gnu/usr.bin/gcc/config/rs6000/rs6000.c
@@ -1,5 +1,5 @@
/* Subroutines used for code generation on IBM RS/6000.
- 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 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
@@ -1486,11 +1486,14 @@ setup_incoming_varargs (cum, mode, type, pretend_size, no_rtl)
"setup_vararg: words = %2d, fregno = %2d, nargs = %4d, proto = %d, mode = %4s, no_rtl= %d\n",
cum->words, cum->fregno, cum->nargs_prototype, cum->prototype, GET_MODE_NAME (mode), no_rtl);
- if ((DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS) && !no_rtl)
+ if (DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_SOLARIS)
{
rs6000_sysv_varargs_p = 1;
- save_area = plus_constant (frame_pointer_rtx, RS6000_VARARGS_OFFSET);
+ if (! no_rtl)
+ save_area = plus_constant (frame_pointer_rtx, RS6000_VARARGS_OFFSET);
}
+ else
+ rs6000_sysv_varargs_p = 0;
if (cum->words < 8)
{
diff --git a/gnu/usr.bin/gcc/config/rs6000/rs6000.h b/gnu/usr.bin/gcc/config/rs6000/rs6000.h
index 087ac5ad8ce..6eefaba2f86 100644
--- a/gnu/usr.bin/gcc/config/rs6000/rs6000.h
+++ b/gnu/usr.bin/gcc/config/rs6000/rs6000.h
@@ -1,5 +1,5 @@
/* Definitions of target machine for GNU compiler, for IBM RS/6000.
- 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.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
@@ -2051,10 +2051,14 @@ typedef struct rs6000_args
/* Define if the object format being used is COFF or a superset. */
#define OBJECT_FORMAT_COFF
-/* Define the magic numbers that we recognize as COFF. */
+/* 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 these files in the right order to conditionally define
+ the value in the macro. */
#define MY_ISCOFF(magic) \
- ((magic) == U802WRMAGIC || (magic) == U802ROMAGIC || (magic) == U802TOCMAGIC)
+ ((magic) == U802WRMAGIC || (magic) == U802ROMAGIC \
+ || (magic) == U802TOCMAGIC || (magic) == 0757)
/* This is the only version of nm that collect2 can work with. */
#define REAL_NM_FILE_NAME "/usr/ucb/nm"
diff --git a/gnu/usr.bin/gcc/config/rs6000/rs6000.md b/gnu/usr.bin/gcc/config/rs6000/rs6000.md
index 8f71378244a..8e5c122e680 100644
--- a/gnu/usr.bin/gcc/config/rs6000/rs6000.md
+++ b/gnu/usr.bin/gcc/config/rs6000/rs6000.md
@@ -2119,8 +2119,8 @@
int start = INTVAL (operands[2]) & 31;
int size = INTVAL (operands[1]) & 31;
- operands[4] = gen_rtx (CONST_INT, VOIDmode, 32 - start - size);
- operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1);
+ operands[4] = GEN_INT (32 - start - size);
+ operands[1] = GEN_INT (start + size - 1);
return \"{rlimi|rlwimi} %0,%3,%h4,%h2,%h1\";
}")
@@ -2137,8 +2137,8 @@
int start = INTVAL (operands[2]) & 31;
int size = INTVAL (operands[1]) & 31;
- operands[4] = gen_rtx (CONST_INT, VOIDmode, shift - start - size);
- operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1);
+ operands[4] = GEN_INT (shift - start - size);
+ operands[1] = GEN_INT (start + size - 1);
return \"{rlimi|rlwimi} %0,%3,%h4,%h2,%h1\";
}")
@@ -2155,8 +2155,8 @@
int start = INTVAL (operands[2]) & 31;
int size = INTVAL (operands[1]) & 31;
- operands[4] = gen_rtx (CONST_INT, VOIDmode, 32 - shift - start - size);
- operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1);
+ operands[4] = GEN_INT (32 - shift - start - size);
+ operands[1] = GEN_INT (start + size - 1);
return \"{rlimi|rlwimi} %0,%3,%h4,%h2,%h1\";
}")
@@ -2173,8 +2173,8 @@
int start = INTVAL (operands[2]) & 31;
int size = INTVAL (operands[1]) & 31;
- operands[4] = gen_rtx (CONST_INT, VOIDmode, 32 - shift - start - size);
- operands[1] = gen_rtx (CONST_INT, VOIDmode, start + size - 1);
+ operands[4] = GEN_INT (32 - shift - start - size);
+ operands[1] = GEN_INT (start + size - 1);
return \"{rlimi|rlwimi} %0,%3,%h4,%h2,%h1\";
}")
@@ -2196,7 +2196,7 @@
/* Align extract field with insert field */
operands[5] = gen_rtx (CONST_INT, VOIDmode,
extract_start + extract_size - insert_start - insert_size);
- operands[1] = gen_rtx (CONST_INT, VOIDmode, insert_start + insert_size - 1);
+ operands[1] = GEN_INT (insert_start + insert_size - 1);
return \"{rlimi|rlwimi} %0,%3,%h5,%h2,%h1\";
}")
@@ -2211,7 +2211,7 @@
int start = INTVAL (operands[2]) & 63;
int size = INTVAL (operands[1]) & 63;
- operands[2] = gen_rtx (CONST_INT, VOIDmode, 64 - start - size);
+ operands[2] = GEN_INT (64 - start - size);
return \"rldimi %0,%3,%H2,%H1\";
}")
@@ -2245,7 +2245,7 @@
if (start + size >= 32)
operands[3] = const0_rtx;
else
- operands[3] = gen_rtx (CONST_INT, VOIDmode, start + size);
+ operands[3] = GEN_INT (start + size);
return \"{rlinm|rlwinm} %0,%1,%3,%s2,31\";
}")
@@ -2282,7 +2282,7 @@
if (start + size >= 32)
operands[3] = const0_rtx;
else
- operands[3] = gen_rtx (CONST_INT, VOIDmode, start + size);
+ operands[3] = GEN_INT (start + size);
return \"{rlinm.|rlwinm.} %4,%1,%3,%s2,31\";
}"
[(set_attr "type" "compare")])
@@ -2303,14 +2303,14 @@
if (start >= 16 && start + size == 32)
{
- operands[3] = gen_rtx (CONST_INT, VOIDmode, (1 << (32 - start)) - 1);
+ operands[3] = GEN_INT ((1 << (32 - start)) - 1);
return \"{andil.|andi.} %0,%1,%3\";
}
if (start + size >= 32)
operands[3] = const0_rtx;
else
- operands[3] = gen_rtx (CONST_INT, VOIDmode, start + size);
+ operands[3] = GEN_INT (start + size);
return \"{rlinm.|rlwinm.} %0,%1,%3,%s2,31\";
}"
[(set_attr "type" "delayed_compare")])
@@ -2329,8 +2329,8 @@
if (start + size >= 64)
operands[3] = const0_rtx;
else
- operands[3] = gen_rtx (CONST_INT, VOIDmode, start + size);
- operands[2] = gen_rtx (CONST_INT, VOIDmode, 64 - size);
+ operands[3] = GEN_INT (start + size);
+ operands[2] = GEN_INT (64 - size);
return \"rldicl %0,%1,%3,%2\";
}")
@@ -2350,8 +2350,8 @@
if (start + size >= 64)
operands[3] = const0_rtx;
else
- operands[3] = gen_rtx (CONST_INT, VOIDmode, start + size);
- operands[2] = gen_rtx (CONST_INT, VOIDmode, 64 - size);
+ operands[3] = GEN_INT (start + size);
+ operands[2] = GEN_INT (64 - size);
return \"rldicl. %4,%1,%3,%2\";
}")
@@ -2372,8 +2372,8 @@
if (start + size >= 64)
operands[3] = const0_rtx;
else
- operands[3] = gen_rtx (CONST_INT, VOIDmode, start + size);
- operands[2] = gen_rtx (CONST_INT, VOIDmode, 64 - size);
+ operands[3] = GEN_INT (start + size);
+ operands[2] = GEN_INT (64 - size);
return \"rldicl. %0,%1,%3,%2\";
}")
@@ -2752,7 +2752,7 @@
(subreg:QI
(lshiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "r")
(match_operand:SI 2 "const_int_operand" "i")) 0)))]
- "includes_rshift_p (operands[2], gen_rtx (CONST_INT, VOIDmode, 255))"
+ "includes_rshift_p (operands[2], GEN_INT (255))"
"{rlinm|rlwinm} %0,%1,%s2,0xff")
(define_insn ""
@@ -2764,7 +2764,7 @@
(match_operand:SI 2 "const_int_operand" "i")) 0))
(const_int 0)))
(clobber (match_scratch:SI 3 "=r"))]
- "includes_rshift_p (operands[2], gen_rtx (CONST_INT, VOIDmode, 255))"
+ "includes_rshift_p (operands[2], GEN_INT (255))"
"{rlinm.|rlwinm.} %3,%1,%s2,0xff"
[(set_attr "type" "delayed_compare")])
@@ -2778,7 +2778,7 @@
(const_int 0)))
(set (match_operand:SI 0 "gpc_reg_operand" "=r")
(zero_extend:SI (subreg:QI (lshiftrt:SI (match_dup 1) (match_dup 2)) 0)))]
- "includes_rshift_p (operands[2], gen_rtx (CONST_INT, VOIDmode, 255))"
+ "includes_rshift_p (operands[2], GEN_INT (255))"
"{rlinm.|rlwinm.} %0,%1,%s2,0xff"
[(set_attr "type" "delayed_compare")])
@@ -2788,7 +2788,7 @@
(subreg:HI
(lshiftrt:SI (match_operand:SI 1 "gpc_reg_operand" "r")
(match_operand:SI 2 "const_int_operand" "i")) 0)))]
- "includes_rshift_p (operands[2], gen_rtx (CONST_INT, VOIDmode, 65535))"
+ "includes_rshift_p (operands[2], GEN_INT (65535))"
"{rlinm|rlwinm} %0,%1,%s2,0xffff")
(define_insn ""
@@ -2800,7 +2800,7 @@
(match_operand:SI 2 "const_int_operand" "i")) 0))
(const_int 0)))
(clobber (match_scratch:SI 3 "=r"))]
- "includes_rshift_p (operands[2], gen_rtx (CONST_INT, VOIDmode, 65535))"
+ "includes_rshift_p (operands[2], GEN_INT (65535))"
"{rlinm.|rlwinm.} %3,%1,%s2,0xffff"
[(set_attr "type" "delayed_compare")])
@@ -2814,7 +2814,7 @@
(const_int 0)))
(set (match_operand:SI 0 "gpc_reg_operand" "=r")
(zero_extend:SI (subreg:HI (lshiftrt:SI (match_dup 1) (match_dup 2)) 0)))]
- "includes_rshift_p (operands[2], gen_rtx (CONST_INT, VOIDmode, 65535))"
+ "includes_rshift_p (operands[2], GEN_INT (65535))"
"{rlinm.|rlwinm.} %0,%1,%s2,0xffff"
[(set_attr "type" "delayed_compare")])
@@ -4859,8 +4859,8 @@
second_c = orig | ~ first_c;
- operands[3] = gen_rtx (CONST_INT, VOIDmode, first_c);
- operands[4] = gen_rtx (CONST_INT, VOIDmode, second_c);
+ operands[3] = GEN_INT (first_c);
+ operands[4] = GEN_INT (second_c);
}")
(define_insn "iordi3"
@@ -4908,7 +4908,7 @@
{
operands[3] = gen_rtx (CONST_INT, VOIDmode,
INTVAL (operands[2]) & (~ (HOST_WIDE_INT) 0xffff));
- operands[4] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0xffff);
+ operands[4] = GEN_INT (INTVAL (operands[2]) & 0xffff);
}")
(define_insn "xordi3"
@@ -4956,7 +4956,7 @@
{
operands[3] = gen_rtx (CONST_INT, VOIDmode,
INTVAL (operands[2]) & 0xffff0000);
- operands[4] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[2]) & 0xffff);
+ operands[4] = GEN_INT (INTVAL (operands[2]) & 0xffff);
}")
(define_insn ""
@@ -5355,7 +5355,7 @@
{
operands[2] = gen_rtx (CONST_INT, VOIDmode,
INTVAL (operands[1]) & 0xffff0000);
- operands[3] = gen_rtx (CONST_INT, VOIDmode, INTVAL (operands[1]) & 0xffff);
+ operands[3] = GEN_INT (INTVAL (operands[1]) & 0xffff);
}")
(define_insn ""
@@ -8095,8 +8095,8 @@
int sextc = (c << 16) >> 16;
int xorv = c ^ sextc;
- operands[4] = gen_rtx (CONST_INT, VOIDmode, xorv);
- operands[5] = gen_rtx (CONST_INT, VOIDmode, sextc);
+ operands[4] = GEN_INT (xorv);
+ operands[5] = GEN_INT (sextc);
}")
(define_insn ""
@@ -8223,8 +8223,8 @@
else
count = 32 - (put_bit - is_bit);
- operands[4] = gen_rtx (CONST_INT, VOIDmode, count);
- operands[5] = gen_rtx (CONST_INT, VOIDmode, put_bit);
+ operands[4] = GEN_INT (count);
+ operands[5] = GEN_INT (put_bit);
return \"%D1mfcr %0\;{rlinm|rlwinm} %0,%0,%4,%5,%5\";
}"
@@ -8253,8 +8253,8 @@
else
count = 32 - (put_bit - is_bit);
- operands[5] = gen_rtx (CONST_INT, VOIDmode, count);
- operands[6] = gen_rtx (CONST_INT, VOIDmode, put_bit);
+ operands[5] = GEN_INT (count);
+ operands[6] = GEN_INT (put_bit);
return \"%D1mfcr %4\;{rlinm.|rlwinm.} %4,%4,%5,%6,%6\";
}"
diff --git a/gnu/usr.bin/gcc/config/rs6000/x-aix31 b/gnu/usr.bin/gcc/config/rs6000/x-aix31
index 635167c2ed7..9f171fc9926 100644
--- a/gnu/usr.bin/gcc/config/rs6000/x-aix31
+++ b/gnu/usr.bin/gcc/config/rs6000/x-aix31
@@ -1,6 +1,4 @@
# configuration for IBM rs6000 running aix
-INSTALL=/usr/ucb/install -c
-
# Show we need to use the C version of ALLOCA
ALLOCA=alloca.o
diff --git a/gnu/usr.bin/gcc/config/sparc/linux.h b/gnu/usr.bin/gcc/config/sparc/linux.h
index 9ce30d108ee..a5807ecc632 100644
--- a/gnu/usr.bin/gcc/config/sparc/linux.h
+++ b/gnu/usr.bin/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.
@@ -35,6 +35,11 @@ Boston, MA 02111-1307, USA. */
#define MULTIBYTE_CHARS 1
#endif
+#ifndef USE_GNULIBC_1
+#undef DEFAULT_VTABLE_THUNKS
+#define DEFAULT_VTABLE_THUNKS 1
+#endif
+
/* Use stabs instead of DWARF debug format. */
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
@@ -120,7 +125,8 @@ Boston, MA 02111-1307, USA. */
%{!profile:%{!ggdb:-lc} %{ggdb:-lg}}}"
#else
#define LIB_SPEC \
- "%{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
+ "%{shared: -lc} \
+ %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
%{profile:-lc_p} %{!profile: -lc}}"
#endif
#else
diff --git a/gnu/usr.bin/gcc/config/sparc/linux64.h b/gnu/usr.bin/gcc/config/sparc/linux64.h
index 74f632bb48c..b676e72a50f 100644
--- a/gnu/usr.bin/gcc/config/sparc/linux64.h
+++ b/gnu/usr.bin/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.
@@ -48,10 +48,6 @@ Boston, MA 02111-1307, USA. */
#undef ASM_CPU_DEFAULT_SPEC
#define ASM_CPU_DEFAULT_SPEC "-Av9a"
-#undef LIBGCC_SPEC
-#define LIBGCC_SPEC \
- "%{!shared:-lgcc}"
-
/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
provides part of the support for getting C++ file-scope static
@@ -111,14 +107,14 @@ Boston, MA 02111-1307, USA. */
%{fPIC:-D__PIC__ -D__pic__} \
%{fpic:-D__PIC__ -D__pic__} \
%{posix:-D_POSIX_SOURCE} \
+%{pthread:-D_REENTRANT} \
"
-/* We no longer link with libc_p.a or libg.a by default. If you
- want to profile or debug the GNU/Linux C library, please add
- -lc_p or -ggdb to LDFLAGS at the link time, respectively. */
+
#undef LIB_SPEC
#define LIB_SPEC \
- "%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
- %{!ggdb:-lc} %{ggdb:-lg}}"
+ "%{shared: -lc} \
+ %{!shared: %{mieee-fp:-lieee} %{pthread:-lpthread} \
+ %{profile:-lc_p} %{!profile: -lc}}"
/* Provide a LINK_SPEC appropriate for GNU/Linux. Here we provide support
for the special GCC options -static and -shared, which allow us to
diff --git a/gnu/usr.bin/gcc/config/sparc/sparc.c b/gnu/usr.bin/gcc/config/sparc/sparc.c
index 58da5ac35fc..e3f5ab414c8 100644
--- a/gnu/usr.bin/gcc/config/sparc/sparc.c
+++ b/gnu/usr.bin/gcc/config/sparc/sparc.c
@@ -1,5 +1,5 @@
/* Subroutines for insn-output.c for Sun SPARC.
- Copyright (C) 1987, 88, 89, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-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.
@@ -1494,6 +1494,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,
diff --git a/gnu/usr.bin/gcc/config/sparc/sysv4.h b/gnu/usr.bin/gcc/config/sparc/sysv4.h
index e8a9a603b6f..3a1a82d9fe9 100644
--- a/gnu/usr.bin/gcc/config/sparc/sysv4.h
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/config/t-svr4 b/gnu/usr.bin/gcc/config/t-svr4
index d4abf488905..e6be0c3b0c8 100644
--- a/gnu/usr.bin/gcc/config/t-svr4
+++ b/gnu/usr.bin/gcc/config/t-svr4
@@ -2,6 +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.
+# routines in crtstuff.c. Likewise for libgcc2.c.
CRTSTUFF_T_CFLAGS = -fPIC
+TARGET_LIBGCC2_CFLAGS = -fPIC
diff --git a/gnu/usr.bin/gcc/config/vax/ultrix.h b/gnu/usr.bin/gcc/config/vax/ultrix.h
index 7181e5b0019..3a14419c102 100644
--- a/gnu/usr.bin/gcc/config/vax/ultrix.h
+++ b/gnu/usr.bin/gcc/config/vax/ultrix.h
@@ -7,3 +7,6 @@
#define PTRDIFF_TYPE "int"
#define WCHAR_TYPE "unsigned int"
#define WCHAR_TYPE_SIZE 32
+
+/* True for Ultrix 4.3 and later and possibly earlier. */
+#define HAVE_ATEXIT
diff --git a/gnu/usr.bin/gcc/config/vax/vax.md b/gnu/usr.bin/gcc/config/vax/vax.md
index c3a2ae39588..ea2fba1ba4e 100644
--- a/gnu/usr.bin/gcc/config/vax/vax.md
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/config/vax/vms.h b/gnu/usr.bin/gcc/config/vax/vms.h
index f6f4161ab8d..35020a18858 100644
--- a/gnu/usr.bin/gcc/config/vax/vms.h
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/config/vax/x-vax b/gnu/usr.bin/gcc/config/vax/x-vax
deleted file mode 100644
index bb58a6a1df3..00000000000
--- a/gnu/usr.bin/gcc/config/vax/x-vax
+++ /dev/null
@@ -1,3 +0,0 @@
-# If compiling GCC with the Unix assembler, -J will handle a large function.
-# With GAS, it should have no effect.
-X_CPPFLAGS = -J
diff --git a/gnu/usr.bin/gcc/config/winnt/config-nt.sed b/gnu/usr.bin/gcc/config/winnt/config-nt.sed
index 3e3f86dfd98..8323f7c733b 100644
--- a/gnu/usr.bin/gcc/config/winnt/config-nt.sed
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/configure b/gnu/usr.bin/gcc/configure
index aa412e0dda0..4c39911d380 100644
--- a/gnu/usr.bin/gcc/configure
+++ b/gnu/usr.bin/gcc/configure
@@ -2142,14 +2142,69 @@ else
fi
done
+for ac_func in sysconf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2149: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2154 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:2148: checking whether malloc must be declared" >&5
+echo "configure:2203: checking whether malloc must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_malloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2153 "configure"
+#line 2208 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2176,7 +2231,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:2180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_decl_needed_malloc=no
else
@@ -2198,12 +2253,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:2202: checking whether realloc must be declared" >&5
+echo "configure:2257: checking whether realloc must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_realloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2207 "configure"
+#line 2262 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2230,7 +2285,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:2234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_decl_needed_realloc=no
else
@@ -2252,12 +2307,12 @@ EOF
fi
echo $ac_n "checking whether calloc must be declared""... $ac_c" 1>&6
-echo "configure:2256: checking whether calloc must be declared" >&5
+echo "configure:2311: checking whether calloc must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_calloc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2261 "configure"
+#line 2316 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2284,7 +2339,7 @@ int main() {
char *(*pfn) = (char *(*)) calloc
; return 0; }
EOF
-if { (eval echo configure:2288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_decl_needed_calloc=no
else
@@ -2306,12 +2361,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:2310: checking whether free must be declared" >&5
+echo "configure:2365: checking whether free must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_free'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2315 "configure"
+#line 2370 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2338,7 +2393,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:2342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_decl_needed_free=no
else
@@ -2360,12 +2415,12 @@ EOF
fi
echo $ac_n "checking whether index must be declared""... $ac_c" 1>&6
-echo "configure:2364: checking whether index must be declared" >&5
+echo "configure:2419: checking whether index must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_index'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2369 "configure"
+#line 2424 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2392,7 +2447,7 @@ int main() {
char *(*pfn) = (char *(*)) index
; return 0; }
EOF
-if { (eval echo configure:2396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_decl_needed_index=no
else
@@ -2414,12 +2469,12 @@ EOF
fi
echo $ac_n "checking whether rindex must be declared""... $ac_c" 1>&6
-echo "configure:2418: checking whether rindex must be declared" >&5
+echo "configure:2473: checking whether rindex must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_rindex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2423 "configure"
+#line 2478 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2446,7 +2501,7 @@ int main() {
char *(*pfn) = (char *(*)) rindex
; return 0; }
EOF
-if { (eval echo configure:2450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_decl_needed_rindex=no
else
@@ -2468,12 +2523,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:2472: checking whether getenv must be declared" >&5
+echo "configure:2527: checking whether getenv must be declared" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_needed_getenv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2477 "configure"
+#line 2532 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2500,7 +2555,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:2504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_decl_needed_getenv=no
else
@@ -2521,14 +2576,68 @@ EOF
fi
+echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
+echo "configure:2581: checking whether sbrk must be declared" >&5
+if eval "test \"`echo '$''{'gcc_cv_decl_needed_sbrk'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2586 "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef HAVE_RINDEX
+#define rindex strrchr
+#endif
+#ifndef HAVE_INDEX
+#define index strchr
+#endif
+int main() {
+char *(*pfn) = (char *(*)) sbrk
+; return 0; }
+EOF
+if { (eval echo configure:2613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ gcc_cv_decl_needed_sbrk=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ gcc_cv_decl_needed_sbrk=yes
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$gcc_cv_decl_needed_sbrk" 1>&6
+if test $gcc_cv_decl_needed_sbrk = yes; then
+ gcc_tr_decl=NEED_DECLARATION_`echo sbrk | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $gcc_tr_decl 1
+EOF
+
+fi
+
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
-echo "configure:2527: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+echo "configure:2636: checking for sys_siglist declaration in signal.h or unistd.h" >&5
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2532 "configure"
+#line 2641 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -2540,7 +2649,7 @@ int main() {
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
-if { (eval echo configure:2544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2653: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_sys_siglist=yes
else
@@ -2626,7 +2735,7 @@ for machine in $build $host $target; do
c*-convex-*)
cpu_type=convex
;;
- i[3456]86-*-*)
+ i[34567]86-*-*)
cpu_type=i386
;;
hppa*-*-*)
@@ -2721,6 +2830,7 @@ for machine in $build $host $target; do
xm_file="${xm_file} alpha/xm-linux.h"
target_cpu_default="MASK_GAS"
tmake_file="t-linux alpha/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
xmake_file=none
fixincludes=Makefile.in
gas=yes gnu_ld=yes
@@ -3057,7 +3167,7 @@ for machine in $build $host $target; do
;;
i370-*-mvs*)
;;
- i[3456]86-ibm-aix*) # IBM PS/2 running AIX
+ i[34567]86-ibm-aix*) # IBM PS/2 running AIX
if [ x$gas = xyes ]
then
tm_file=i386/aix386.h
@@ -3083,7 +3193,7 @@ for machine in $build $host $target; do
extra_parts="crtbegin.o crtend.o"
tmake_file=i386/t-crtpic
;;
- i[3456]86-next-*)
+ i[34567]86-next-*)
tm_file=i386/next.h
xm_file=i386/xm-next.h
tmake_file=i386/t-next
@@ -3093,7 +3203,7 @@ for machine in $build $host $target; do
thread_file='mach'
fi
;;
- i[3456]86-sequent-bsd*) # 80386 from Sequent
+ i[34567]86-sequent-bsd*) # 80386 from Sequent
use_collect2=yes
if [ x$gas = xyes ]
then
@@ -3102,7 +3212,7 @@ for machine in $build $host $target; do
tm_file=i386/sequent.h
fi
;;
- i[3456]86-sequent-ptx1*)
+ i[34567]86-sequent-ptx1*)
xm_file=i386/xm-sysv3.h
xmake_file=i386/x-sysv3
tm_file=i386/seq-sysv3.h
@@ -3112,7 +3222,7 @@ for machine in $build $host $target; do
install_headers_dir=install-headers-cpio
broken_install=yes
;;
- i[3456]86-sequent-ptx2* | i[3456]86-sequent-sysv3*)
+ i[34567]86-sequent-ptx2* | i[34567]86-sequent-sysv3*)
xm_file=i386/xm-sysv3.h
xmake_file=i386/x-sysv3
tm_file=i386/seq2-sysv3.h
@@ -3122,7 +3232,7 @@ for machine in $build $host $target; do
install_headers_dir=install-headers-cpio
broken_install=yes
;;
- i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4*)
+ i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*)
xm_file=i386/xm-sysv4.h
xmake_file=x-svr4
tm_file=i386/ptx4-i.h
@@ -3137,23 +3247,23 @@ for machine in $build $host $target; do
tm_file=i386/sun.h
use_collect2=yes
;;
- i[3456]86-*-aout*)
+ i[34567]86-*-aout*)
tm_file=i386/i386-aout.h
tmake_file=i386/t-i386bare
;;
- i[3456]86-*-bsdi* | i[345]86-*-bsd386*)
+ i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
tm_file=i386/bsd386.h
xm_file=i386/xm-bsd386.h
# tmake_file=t-libc-ok
;;
- i[3456]86-*-bsd*)
+ i[34567]86-*-bsd*)
tm_file=i386/386bsd.h
xm_file=i386/xm-bsd386.h
# tmake_file=t-libc-ok
# Next line turned off because both 386BSD and BSD/386 use GNU ld.
# use_collect2=yes
;;
- i[3456]86-*-freebsdelf*)
+ i[34567]86-*-freebsdelf*)
tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
# On FreeBSD, the headers are already ok, except for math.h.
fixincludes=fixinc.math
@@ -3162,30 +3272,30 @@ for machine in $build $host $target; do
gnu_ld=yes
stabs=yes
;;
- i[3456]86-*-freebsd*)
+ i[34567]86-*-freebsd*)
tm_file=i386/freebsd.h
# On FreeBSD, the headers are already ok, except for math.h.
fixincludes=fixinc.math
tmake_file=i386/t-freebsd
;;
- i[3456]86-*-netbsd*)
+ i[34567]86-*-netbsd*)
tm_file=i386/netbsd.h
# On NetBSD, the headers are already okay, except for math.h.
fixincludes=fixinc.math
tmake_file=t-netbsd
;;
- i[3456]86-*-openbsd*)
+ i[34567]86-*-openbsd*)
tm_file=i386/openbsd.h
# On OpenBSD, the headers are already okay.
fixincludes=Makefile.in
tmake_file=t-libc-ok
xmake_file=x-openbsd
;;
- i[3456]86-*-coff*)
+ i[34567]86-*-coff*)
tm_file=i386/i386-coff.h
tmake_file=i386/t-i386bare
;;
- i[3456]86-*-isc*) # 80386 running ISC system
+ i[34567]86-*-isc*) # 80386 running ISC system
xm_file=i386/xm-isc.h
case $machine in
i[345]86-*-isc[34]*)
@@ -3208,7 +3318,7 @@ for machine in $build $host $target; do
install_headers_dir=install-headers-cpio
broken_install=yes
;;
- i[3456]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
+ i[34567]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
xmake_file=x-linux-aout
tmake_file="t-linux-aout i386/t-crtstuff"
@@ -3217,7 +3327,7 @@ for machine in $build $host $target; do
broken_install=yes
gnu_ld=yes
;;
- i[3456]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
+ i[34567]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
xm_file=i386/xm-linux.h # with a.out format
xmake_file=x-linux-aout
tmake_file="t-linux-aout i386/t-crtstuff"
@@ -3226,7 +3336,7 @@ for machine in $build $host $target; do
broken_install=yes
gnu_ld=yes
;;
- i[3456]86-*-linux-gnulibc1)
+ i[34567]86-*-linux-gnulibc1)
xm_file=i386/xm-linux.h # Intel 80386's running GNU/Linux
xmake_file=x-linux # with ELF format using the
tm_file=i386/linux.h # GNU/Linux C library 5
@@ -3239,7 +3349,7 @@ for machine in $build $host $target; do
thread_file='single'
fi
;;
- i[3456]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
+ i[34567]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
xm_file=i386/xm-linux.h # with ELF format using glibc 2
xmake_file=x-linux # aka GNU/Linux C library 6
tm_file=i386/linux.h
@@ -3252,21 +3362,28 @@ for machine in $build $host $target; do
thread_file='posix'
fi
;;
- i[3456]86-*-gnu*)
+ i[34567]86-*-gnu*)
;;
- i[3456]86-go32-msdos | i[3456]86-*-go32*)
+ i[34567]86-go32-msdos | i[34567]86-*-go32*)
xm_file=i386/xm-go32.h
tm_file=i386/go32.h
tmake_file=i386/t-go32
;;
- i[3456]86-moss-msdos* | i[3456]86-*-moss*)
+ i[34567]86-pc-msdosdjgpp*)
+ xm_file=i386/xm-go32.h
+ tm_file=i386/go32.h
+ tmake_file=i386/t-go32
+ gnu_ld=yes
+ gas=yes
+ ;;
+ i[34567]86-moss-msdos* | i[34567]86-*-moss*)
tm_file=i386/moss.h
tmake_file=t-libc-ok
fixincludes=Makefile.in
gnu_ld=yes
gas=yes
;;
- i[3456]86-*-lynxos*)
+ i[34567]86-*-lynxos*)
if [ x$gas = xyes ]
then
tm_file=i386/lynx.h
@@ -3277,12 +3394,12 @@ for machine in $build $host $target; do
tmake_file=i386/t-i386bare
xmake_file=x-lynx
;;
- i[3456]86-*-mach*)
+ i[34567]86-*-mach*)
tm_file=i386/mach.h
# tmake_file=t-libc-ok
use_collect2=yes
;;
- i[3456]86-*-osfrose*) # 386 using OSF/rose
+ i[34567]86-*-osfrose*) # 386 using OSF/rose
if [ x$elf = xyes ]
then
tm_file=i386/osfelf.h
@@ -3296,27 +3413,28 @@ for machine in $build $host $target; do
tmake_file=i386/t-osf
extra_objs=halfpic.o
;;
- i[345]86-go32-rtems*)
+ i[34567]86-go32-rtems*)
cpu_type=i386
xm_file=i386/xm-go32.h
tm_file=i386/go32-rtems.h
tmake_file="i386/t-go32 t-rtems"
;;
- i[345]86-*-rtems*)
+ i[34567]86-*-rtems*)
cpu_type=i386
tm_file=i386/rtems.h
tmake_file="i386/t-i386bare t-rtems"
;;
- i[3456]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
+ i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
xm_file=i386/xm-sco5.h
xmake_file=i386/x-sco5
fixincludes=fixinc.sco
broken_install=yes
+ install_headers_dir=install-headers-cpio
tm_file=i386/sco5.h
tmake_file=i386/t-sco5
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
;;
- i[3456]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
+ i[34567]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
xm_file=i386/xm-sco.h
xmake_file=i386/x-sco4
fixincludes=fixinc.sco
@@ -3334,7 +3452,7 @@ for machine in $build $host $target; do
fi
truncate_target=yes
;;
- i[3456]86-*-sco*) # 80386 running SCO system
+ i[34567]86-*-sco*) # 80386 running SCO system
xm_file=i386/xm-sco.h
xmake_file=i386/x-sco
broken_install=yes
@@ -3351,7 +3469,7 @@ for machine in $build $host $target; do
fi
truncate_target=yes
;;
- i[3456]86-*-solaris2*)
+ i[34567]86-*-solaris2*)
xm_file=i386/xm-sysv4.h
if [ x$stabs = xyes ]
then
@@ -3360,7 +3478,7 @@ for machine in $build $host $target; do
tm_file=i386/sol2.h
fi
tmake_file=i386/t-sol2
- extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
+ extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
xmake_file=x-svr4
fixincludes=fixinc.math
broken_install=yes
@@ -3368,7 +3486,7 @@ for machine in $build $host $target; do
thread_file='solaris'
fi
;;
- i[3456]86-*-sysv4*) # Intel 80386's running system V.4
+ i[34567]86-*-sysv4*) # Intel 80386's running system V.4
xm_file=i386/xm-sysv4.h
tm_file=i386/sysv4.h
if [ x$stabs = xyes ]
@@ -3379,7 +3497,7 @@ for machine in $build $host $target; do
xmake_file=x-svr4
extra_parts="crtbegin.o crtend.o"
;;
- i[3456]86-*-sysv*) # Intel 80386's running system V
+ i[34567]86-*-sysv*) # Intel 80386's running system V
xm_file=i386/xm-sysv3.h
xmake_file=i386/x-sysv3
if [ x$gas = xyes ]
@@ -3406,7 +3524,7 @@ for machine in $build $host $target; do
tmake_file=i386/t-vsta
xmake_file=i386/x-vsta
;;
- i[3456]86-*-pe | i[3456]86-*-cygwin32)
+ i[34567]86-*-pe | i[34567]86-*-cygwin32)
xm_file="${xm_file} i386/xm-cygwin32.h"
tmake_file=i386/t-cygwin32
tm_file=i386/cygwin32.h
@@ -3418,7 +3536,7 @@ for machine in $build $host $target; do
fi
exeext=.exe
;;
- i[3456]86-*-mingw32)
+ i[34567]86-*-mingw32*)
tm_file=i386/mingw32.h
xm_file="${xm_file} i386/xm-mingw32.h"
tmake_file=i386/t-cygwin32
@@ -3429,8 +3547,15 @@ for machine in $build $host $target; do
thread_file='win32'
fi
exeext=.exe
+ case $machine in
+ *mingw32msv*)
+ ;;
+ *minwg32crt* | *mingw32*)
+ tm_file="${tm_file} i386/crtdll.h"
+ ;;
+ esac
;;
- i[3456]86-*-winnt3*)
+ i[34567]86-*-winnt3*)
tm_file=i386/win-nt.h
out_file=i386/i386.c
xm_file=i386/xm-winnt.h
@@ -3447,13 +3572,13 @@ for machine in $build $host $target; do
thread_file='win32'
fi
;;
- i[3456]86-dg-dgux)
+ i[34567]86-dg-dgux*)
xm_file=i386/xm-dgux.h
out_file=i386/dgux.c
tm_file=i386/dgux.h
tmake_file=i386/t-dgux
xmake_file=i386/x-dgux
- fixincludes=fixinc.dgux
+ fixincludes=Makefile.in # There is nothing to fix
install_headers_dir=install-headers-cpio
;;
i860-alliant-*) # Alliant FX/2800
@@ -3499,7 +3624,7 @@ for machine in $build $host $target; do
tmake_file=i960/t-vxworks960
use_collect2=yes
;;
- i960-wrs-vxworks5*)
+ i960-wrs-vxworks5* | i960-wrs-vxworks)
tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
tmake_file=i960/t-vxworks960
use_collect2=yes
@@ -4168,7 +4293,6 @@ for machine in $build $host $target; do
if [ x$prefix = xNONE ]; then
prefix=$native_prefix
fi
- prefix=$native_prefix
;;
mips*el-*-openbsd*) # MIPS running OpenBSD
tm_file=mips/openbsd-le.h
@@ -4836,7 +4960,12 @@ for machine in $build $host $target; do
tm_file=sparc/rtems.h
;;
sparc-*-solaris2*)
- tm_file=sparc/sol2.h
+ if [ x$gnu_ld = xyes ]
+ then
+ tm_file=sparc/sol2.h
+ else
+ tm_file=sparc/sol2-sld.h
+ fi
xm_file=sparc/xm-sol2.h
tmake_file=sparc/t-sol2
xmake_file=sparc/x-sysv4
@@ -5007,7 +5136,7 @@ for machine in $build $host $target; do
;;
esac
- # Distinguish i[3456]86
+ # Distinguish i[34567]86
# Also, do not run mips-tfile on MIPS if using gas.
# Process --with-cpu= for PowerPC/rs6000
target_cpu_default2=
@@ -5018,7 +5147,7 @@ for machine in $build $host $target; do
i586-*-*)
target_cpu_default2=2
;;
- i686-*-*)
+ i686-*-* | i786-*-*)
target_cpu_default2=3
;;
alpha*-*-*)
@@ -5295,13 +5424,22 @@ do
done
done
-# Truncate the target if necessary
-if [ x$host_truncate_target != x ]; then
- target=`echo $target | sed -e 's/\(..............\).*/\1/'`
+# If we have a CVS directory, set up a rule so verion.c will be made
+# from CVS tag information and use a dummy version number here if we
+# don't have version.c.
+
+version_dep=
+if [ -d $srcdir/CVS ]; then
+ version_dep=ChangeLog
fi
-# Get the version number from the toplevel
-version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/version.c`
+if [ ! -f $srcdir/version.c -a -d $srcdir/CVS ]
+then
+ version=unknown
+else
+ # Get the version number from the toplevel
+ version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/version.c`
+fi
# Are we using gcc as the native compiler?
case $host in
@@ -5348,12 +5486,18 @@ done
# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
# Otherwise, we can use "CC=$(CC)".
rm -f symtest.tem
-if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
+if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
then
cc_set_by_configure="\$(CC)"
stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
else
- symbolic_link="cp -p"
+ rm -f symtest.tem
+ if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
+ then
+ symbolic_link="cp -p"
+ else
+ symbolic_link="cp"
+ fi
cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
fi
@@ -5636,6 +5780,7 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
+
# Echo that links are built
if [ x$host = x$target ]
then
@@ -5662,6 +5807,11 @@ then
echo " ${str2}${str3}." 1>&2
fi
+# Truncate the target if necessary
+if [ x$host_truncate_target != x ]; then
+ target=`echo $target | sed -e 's/\(..............\).*/\1/'`
+fi
+
# Configure the subdirectories
# AC_CONFIG_SUBDIRS($subdirs)
@@ -5690,7 +5840,7 @@ EOF
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ case `(ac_space=' '; set) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
@@ -5865,6 +6015,7 @@ s%@maybe_use_collect2@%$maybe_use_collect2%g
s%@cc_set_by_configure@%$cc_set_by_configure%g
s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
s%@symbolic_link@%$symbolic_link%g
+s%@version_dep@%$version_dep%g
/@target_overrides@/r $target_overrides
s%@target_overrides@%%g
/@host_overrides@/r $host_overrides
@@ -6096,6 +6247,7 @@ srcdir='${srcdir}'
subdirs='${subdirs}'
oldstyle_subdirs='${oldstyle_subdirs}'
symbolic_link='${symbolic_link}'
+version_dep='${version_dep}'
program_transform_set='${program_transform_set}'
program_transform_name='${program_transform_name}'
dep_host_xmake_file='${dep_host_xmake_file}'
diff --git a/gnu/usr.bin/gcc/configure.in b/gnu/usr.bin/gcc/configure.in
index dc56c959d63..c12f8b9ce64 100644
--- a/gnu/usr.bin/gcc/configure.in
+++ b/gnu/usr.bin/gcc/configure.in
@@ -1,7 +1,7 @@
# configure.in for GNU CC
# Process this file with autoconf to generate a configuration script.
-# Copyright (C) 1997 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
#This file is part of GNU CC.
@@ -163,6 +163,7 @@ AC_CHECK_FUNCS(rindex)
AC_CHECK_FUNCS(kill)
AC_CHECK_FUNCS(getrlimit)
AC_CHECK_FUNCS(setrlimit)
+AC_CHECK_FUNCS(sysconf)
GCC_NEED_DECLARATION(malloc)
GCC_NEED_DECLARATION(realloc)
@@ -171,6 +172,7 @@ GCC_NEED_DECLARATION(free)
GCC_NEED_DECLARATION(index)
GCC_NEED_DECLARATION(rindex)
GCC_NEED_DECLARATION(getenv)
+GCC_NEED_DECLARATION(sbrk)
AC_DECL_SYS_SIGLIST
@@ -239,7 +241,7 @@ for machine in $build $host $target; do
c*-convex-*)
cpu_type=convex
;;
- i[[3456]]86-*-*)
+ i[[34567]]86-*-*)
cpu_type=i386
;;
hppa*-*-*)
@@ -327,6 +329,7 @@ for machine in $build $host $target; do
xm_file="${xm_file} alpha/xm-linux.h"
target_cpu_default="MASK_GAS"
tmake_file="t-linux alpha/t-linux"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
xmake_file=none
fixincludes=Makefile.in
gas=yes gnu_ld=yes
@@ -663,7 +666,7 @@ for machine in $build $host $target; do
;;
i370-*-mvs*)
;;
- i[[3456]]86-ibm-aix*) # IBM PS/2 running AIX
+ i[[34567]]86-ibm-aix*) # IBM PS/2 running AIX
if [[ x$gas = xyes ]]
then
tm_file=i386/aix386.h
@@ -689,7 +692,7 @@ for machine in $build $host $target; do
extra_parts="crtbegin.o crtend.o"
tmake_file=i386/t-crtpic
;;
- i[[3456]]86-next-*)
+ i[[34567]]86-next-*)
tm_file=i386/next.h
xm_file=i386/xm-next.h
tmake_file=i386/t-next
@@ -699,7 +702,7 @@ for machine in $build $host $target; do
thread_file='mach'
fi
;;
- i[[3456]]86-sequent-bsd*) # 80386 from Sequent
+ i[[34567]]86-sequent-bsd*) # 80386 from Sequent
use_collect2=yes
if [[ x$gas = xyes ]]
then
@@ -708,7 +711,7 @@ for machine in $build $host $target; do
tm_file=i386/sequent.h
fi
;;
- i[[3456]]86-sequent-ptx1*)
+ i[[34567]]86-sequent-ptx1*)
xm_file=i386/xm-sysv3.h
xmake_file=i386/x-sysv3
tm_file=i386/seq-sysv3.h
@@ -718,7 +721,7 @@ for machine in $build $host $target; do
install_headers_dir=install-headers-cpio
broken_install=yes
;;
- i[[3456]]86-sequent-ptx2* | i[[3456]]86-sequent-sysv3*)
+ i[[34567]]86-sequent-ptx2* | i[[34567]]86-sequent-sysv3*)
xm_file=i386/xm-sysv3.h
xmake_file=i386/x-sysv3
tm_file=i386/seq2-sysv3.h
@@ -728,7 +731,7 @@ for machine in $build $host $target; do
install_headers_dir=install-headers-cpio
broken_install=yes
;;
- i[[3456]]86-sequent-ptx4* | i[[3456]]86-sequent-sysv4*)
+ i[[34567]]86-sequent-ptx4* | i[[34567]]86-sequent-sysv4*)
xm_file=i386/xm-sysv4.h
xmake_file=x-svr4
tm_file=i386/ptx4-i.h
@@ -743,23 +746,23 @@ for machine in $build $host $target; do
tm_file=i386/sun.h
use_collect2=yes
;;
- i[[3456]]86-*-aout*)
+ i[[34567]]86-*-aout*)
tm_file=i386/i386-aout.h
tmake_file=i386/t-i386bare
;;
- i[[3456]]86-*-bsdi* | i[[345]]86-*-bsd386*)
+ i[[34567]]86-*-bsdi* | i[[34567]]86-*-bsd386*)
tm_file=i386/bsd386.h
xm_file=i386/xm-bsd386.h
# tmake_file=t-libc-ok
;;
- i[[3456]]86-*-bsd*)
+ i[[34567]]86-*-bsd*)
tm_file=i386/386bsd.h
xm_file=i386/xm-bsd386.h
# tmake_file=t-libc-ok
# Next line turned off because both 386BSD and BSD/386 use GNU ld.
# use_collect2=yes
;;
- i[[3456]]86-*-freebsdelf*)
+ i[[34567]]86-*-freebsdelf*)
tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
# On FreeBSD, the headers are already ok, except for math.h.
fixincludes=fixinc.math
@@ -768,26 +771,26 @@ for machine in $build $host $target; do
gnu_ld=yes
stabs=yes
;;
- i[[3456]]86-*-freebsd*)
+ i[[34567]]86-*-freebsd*)
tm_file=i386/freebsd.h
# On FreeBSD, the headers are already ok, except for math.h.
fixincludes=fixinc.math
tmake_file=i386/t-freebsd
;;
- i[[3456]]86-*-netbsd*)
+ i[[34567]]86-*-netbsd*)
tm_file=i386/netbsd.h
# On NetBSD, the headers are already okay, except for math.h.
fixincludes=fixinc.math
tmake_file=t-netbsd
;;
- i[[3456]]86-*-coff*)
+ i[[34567]]86-*-coff*)
tm_file=i386/i386-coff.h
tmake_file=i386/t-i386bare
;;
- i[[3456]]86-*-isc*) # 80386 running ISC system
+ i[[34567]]86-*-isc*) # 80386 running ISC system
xm_file=i386/xm-isc.h
case $machine in
- i[[345]]86-*-isc[[34]]*)
+ i[[34567]]86-*-isc[[34]]*)
xmake_file=i386/x-isc3
;;
*)
@@ -807,7 +810,7 @@ for machine in $build $host $target; do
install_headers_dir=install-headers-cpio
broken_install=yes
;;
- i[[3456]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
+ i[[34567]]86-*-linux-gnuoldld*) # Intel 80386's running GNU/Linux
xm_file=i386/xm-linux.h # with a.out format using pre BFD linkers
xmake_file=x-linux-aout
tmake_file="t-linux-aout i386/t-crtstuff"
@@ -816,7 +819,7 @@ for machine in $build $host $target; do
broken_install=yes
gnu_ld=yes
;;
- i[[3456]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
+ i[[34567]]86-*-linux-gnuaout*) # Intel 80386's running GNU/Linux
xm_file=i386/xm-linux.h # with a.out format
xmake_file=x-linux-aout
tmake_file="t-linux-aout i386/t-crtstuff"
@@ -825,7 +828,7 @@ for machine in $build $host $target; do
broken_install=yes
gnu_ld=yes
;;
- i[[3456]]86-*-linux-gnulibc1)
+ i[[34567]]86-*-linux-gnulibc1)
xm_file=i386/xm-linux.h # Intel 80386's running GNU/Linux
xmake_file=x-linux # with ELF format using the
tm_file=i386/linux.h # GNU/Linux C library 5
@@ -838,7 +841,7 @@ for machine in $build $host $target; do
thread_file='single'
fi
;;
- i[[3456]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
+ i[[34567]]86-*-linux-gnu*) # Intel 80386's running GNU/Linux
xm_file=i386/xm-linux.h # with ELF format using glibc 2
xmake_file=x-linux # aka GNU/Linux C library 6
tm_file=i386/linux.h
@@ -851,21 +854,28 @@ for machine in $build $host $target; do
thread_file='posix'
fi
;;
- i[[3456]]86-*-gnu*)
+ i[[34567]]86-*-gnu*)
;;
- i[[3456]]86-go32-msdos | i[[3456]]86-*-go32*)
+ i[[34567]]86-go32-msdos | i[[34567]]86-*-go32*)
xm_file=i386/xm-go32.h
tm_file=i386/go32.h
tmake_file=i386/t-go32
;;
- i[[3456]]86-moss-msdos* | i[[3456]]86-*-moss*)
+ i[[34567]]86-pc-msdosdjgpp*)
+ xm_file=i386/xm-go32.h
+ tm_file=i386/go32.h
+ tmake_file=i386/t-go32
+ gnu_ld=yes
+ gas=yes
+ ;;
+ i[[34567]]86-moss-msdos* | i[[34567]]86-*-moss*)
tm_file=i386/moss.h
tmake_file=t-libc-ok
fixincludes=Makefile.in
gnu_ld=yes
gas=yes
;;
- i[[3456]]86-*-lynxos*)
+ i[[34567]]86-*-lynxos*)
if [[ x$gas = xyes ]]
then
tm_file=i386/lynx.h
@@ -876,12 +886,12 @@ for machine in $build $host $target; do
tmake_file=i386/t-i386bare
xmake_file=x-lynx
;;
- i[[3456]]86-*-mach*)
+ i[[34567]]86-*-mach*)
tm_file=i386/mach.h
# tmake_file=t-libc-ok
use_collect2=yes
;;
- i[[3456]]86-*-osfrose*) # 386 using OSF/rose
+ i[[34567]]86-*-osfrose*) # 386 using OSF/rose
if [[ x$elf = xyes ]]
then
tm_file=i386/osfelf.h
@@ -895,27 +905,28 @@ for machine in $build $host $target; do
tmake_file=i386/t-osf
extra_objs=halfpic.o
;;
- i[[345]]86-go32-rtems*)
+ i[[34567]]86-go32-rtems*)
cpu_type=i386
xm_file=i386/xm-go32.h
tm_file=i386/go32-rtems.h
tmake_file="i386/t-go32 t-rtems"
;;
- i[[345]]86-*-rtems*)
+ i[[34567]]86-*-rtems*)
cpu_type=i386
tm_file=i386/rtems.h
tmake_file="i386/t-i386bare t-rtems"
;;
- i[[3456]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
+ i[[34567]]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
xm_file=i386/xm-sco5.h
xmake_file=i386/x-sco5
fixincludes=fixinc.sco
broken_install=yes
+ install_headers_dir=install-headers-cpio
tm_file=i386/sco5.h
tmake_file=i386/t-sco5
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
;;
- i[[3456]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
+ i[[34567]]86-*-sco3.2v4*) # 80386 running SCO 3.2v4 system
xm_file=i386/xm-sco.h
xmake_file=i386/x-sco4
fixincludes=fixinc.sco
@@ -933,7 +944,7 @@ for machine in $build $host $target; do
fi
truncate_target=yes
;;
- i[[3456]]86-*-sco*) # 80386 running SCO system
+ i[[34567]]86-*-sco*) # 80386 running SCO system
xm_file=i386/xm-sco.h
xmake_file=i386/x-sco
broken_install=yes
@@ -950,7 +961,7 @@ for machine in $build $host $target; do
fi
truncate_target=yes
;;
- i[[3456]]86-*-solaris2*)
+ i[[34567]]86-*-solaris2*)
xm_file=i386/xm-sysv4.h
if [[ x$stabs = xyes ]]
then
@@ -959,7 +970,7 @@ for machine in $build $host $target; do
tm_file=i386/sol2.h
fi
tmake_file=i386/t-sol2
- extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
+ extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
xmake_file=x-svr4
fixincludes=fixinc.math
broken_install=yes
@@ -967,7 +978,7 @@ for machine in $build $host $target; do
thread_file='solaris'
fi
;;
- i[[3456]]86-*-sysv4*) # Intel 80386's running system V.4
+ i[[34567]]86-*-sysv4*) # Intel 80386's running system V.4
xm_file=i386/xm-sysv4.h
tm_file=i386/sysv4.h
if [[ x$stabs = xyes ]]
@@ -978,7 +989,7 @@ for machine in $build $host $target; do
xmake_file=x-svr4
extra_parts="crtbegin.o crtend.o"
;;
- i[[3456]]86-*-sysv*) # Intel 80386's running system V
+ i[[34567]]86-*-sysv*) # Intel 80386's running system V
xm_file=i386/xm-sysv3.h
xmake_file=i386/x-sysv3
if [[ x$gas = xyes ]]
@@ -1005,7 +1016,7 @@ for machine in $build $host $target; do
tmake_file=i386/t-vsta
xmake_file=i386/x-vsta
;;
- i[[3456]]86-*-pe | i[[3456]]86-*-cygwin32)
+ i[[34567]]86-*-pe | i[[34567]]86-*-cygwin32)
xm_file="${xm_file} i386/xm-cygwin32.h"
tmake_file=i386/t-cygwin32
tm_file=i386/cygwin32.h
@@ -1017,7 +1028,7 @@ for machine in $build $host $target; do
fi
exeext=.exe
;;
- i[[3456]]86-*-mingw32)
+ i[[34567]]86-*-mingw32*)
tm_file=i386/mingw32.h
xm_file="${xm_file} i386/xm-mingw32.h"
tmake_file=i386/t-cygwin32
@@ -1028,8 +1039,15 @@ for machine in $build $host $target; do
thread_file='win32'
fi
exeext=.exe
+ case $machine in
+ *mingw32msv*)
+ ;;
+ *minwg32crt* | *mingw32*)
+ tm_file="${tm_file} i386/crtdll.h"
+ ;;
+ esac
;;
- i[[3456]]86-*-winnt3*)
+ i[[34567]]86-*-winnt3*)
tm_file=i386/win-nt.h
out_file=i386/i386.c
xm_file=i386/xm-winnt.h
@@ -1046,13 +1064,13 @@ for machine in $build $host $target; do
thread_file='win32'
fi
;;
- i[[3456]]86-dg-dgux)
+ i[[34567]]86-dg-dgux*)
xm_file=i386/xm-dgux.h
out_file=i386/dgux.c
tm_file=i386/dgux.h
tmake_file=i386/t-dgux
xmake_file=i386/x-dgux
- fixincludes=fixinc.dgux
+ fixincludes=Makefile.in # There is nothing to fix
install_headers_dir=install-headers-cpio
;;
i860-alliant-*) # Alliant FX/2800
@@ -1098,7 +1116,7 @@ for machine in $build $host $target; do
tmake_file=i960/t-vxworks960
use_collect2=yes
;;
- i960-wrs-vxworks5*)
+ i960-wrs-vxworks5* | i960-wrs-vxworks)
tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/vx960-coff.h"
tmake_file=i960/t-vxworks960
use_collect2=yes
@@ -1760,7 +1778,6 @@ for machine in $build $host $target; do
if [[ x$prefix = xNONE ]]; then
prefix=$native_prefix
fi
- prefix=$native_prefix
;;
mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
tm_file=mips/news4.h
@@ -2387,7 +2404,12 @@ for machine in $build $host $target; do
tm_file=sparc/rtems.h
;;
sparc-*-solaris2*)
- tm_file=sparc/sol2.h
+ if [[ x$gnu_ld = xyes ]]
+ then
+ tm_file=sparc/sol2.h
+ else
+ tm_file=sparc/sol2-sld.h
+ fi
xm_file=sparc/xm-sol2.h
tmake_file=sparc/t-sol2
xmake_file=sparc/x-sysv4
@@ -2550,7 +2572,7 @@ for machine in $build $host $target; do
;;
esac
- # Distinguish i[3456]86
+ # Distinguish i[34567]86
# Also, do not run mips-tfile on MIPS if using gas.
# Process --with-cpu= for PowerPC/rs6000
target_cpu_default2=
@@ -2561,7 +2583,7 @@ for machine in $build $host $target; do
i586-*-*)
target_cpu_default2=2
;;
- i686-*-*)
+ i686-*-* | i786-*-*)
target_cpu_default2=3
;;
alpha*-*-*)
@@ -2838,13 +2860,22 @@ do
done
done
-# Truncate the target if necessary
-if [[ x$host_truncate_target != x ]]; then
- target=`echo $target | sed -e 's/\(..............\).*/\1/'`
+# If we have a CVS directory, set up a rule so verion.c will be made
+# from CVS tag information and use a dummy version number here if we
+# don't have version.c.
+
+version_dep=
+if [[ -d $srcdir/CVS ]]; then
+ version_dep=ChangeLog
fi
-# Get the version number from the toplevel
-version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
+if [[ ! -f $srcdir/version.c -a -d $srcdir/CVS ]]
+then
+ version=unknown
+else
+ # Get the version number from the toplevel
+ version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/version.c`
+fi
# Are we using gcc as the native compiler?
case $host in
@@ -2891,12 +2922,18 @@ done
# FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
# Otherwise, we can use "CC=$(CC)".
rm -f symtest.tem
-if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
+if $symbolic_link $srcdir/gcc.c symtest.tem 2>/dev/null
then
cc_set_by_configure="\$(CC)"
stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
else
- symbolic_link="cp -p"
+ rm -f symtest.tem
+ if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
+ then
+ symbolic_link="cp -p"
+ else
+ symbolic_link="cp"
+ fi
cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
fi
@@ -3170,6 +3207,7 @@ AC_SUBST(maybe_use_collect2)
AC_SUBST(cc_set_by_configure)
AC_SUBST(stage_prefix_set_by_configure)
AC_SUBST(symbolic_link)
+AC_SUBST(version_dep)
AC_SUBST_FILE(target_overrides)
AC_SUBST_FILE(host_overrides)
@@ -3205,6 +3243,11 @@ then
echo " ${str2}${str3}." 1>&2
fi
+# Truncate the target if necessary
+if [[ x$host_truncate_target != x ]]; then
+ target=`echo $target | sed -e 's/\(..............\).*/\1/'`
+fi
+
# Configure the subdirectories
# AC_CONFIG_SUBDIRS($subdirs)
@@ -3247,6 +3290,7 @@ srcdir='${srcdir}'
subdirs='${subdirs}'
oldstyle_subdirs='${oldstyle_subdirs}'
symbolic_link='${symbolic_link}'
+version_dep='${version_dep}'
program_transform_set='${program_transform_set}'
program_transform_name='${program_transform_name}'
dep_host_xmake_file='${dep_host_xmake_file}'
diff --git a/gnu/usr.bin/gcc/cp/ChangeLog b/gnu/usr.bin/gcc/cp/ChangeLog
index e20b8af122b..13087ee99d2 100644
--- a/gnu/usr.bin/gcc/cp/ChangeLog
+++ b/gnu/usr.bin/gcc/cp/ChangeLog
@@ -1,7 +1,53 @@
+Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
+ has DECL_LANG_SPECIFIC.
+
+Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * decl.c (copy_args_p): Handle copy elision for types with virtual
+ bases.
+ * call.c (build_over_call): Likewise.
+
+Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * exception.cc (__cp_pop_exception): Lose handler arg.
+ * except.c (do_pop_exception): Likewise.
+ (push_eh_cleanup): Let the cleanup mechanism supply the handler.
+ (expand_end_catch_block): Likewise.
+
+Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
+
+ * method.c (make_thunk): Avoid name buffer overflow.
+
+Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
+
+ * config-lang.in (diff_excludes): Use basename only.
+
+Sun Jan 25 13:20:00 1998 Jason Merrill <jason@rhino.cygnus.com>
+
+ * decl.c (cp_finish_decl): When bailing on a comdat variable, also
+ unset DECL_NOT_REALLY_EXTERN.
+
Mon Dec 22 17:46:17 1997 Mark Mitchell <mmitchell@usa.net>
* method.c (build_overload_name): Fix mangling for __null.
+Sat Dec 20 13:00:30 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * pt.c (instantiate_decl): Defer all templates but inline functions.
+
+Fri Dec 19 09:37:26 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * cp-tree.h (struct lang_decl_flags): Add comdat.
+ (DECL_COMDAT): New macro.
+ * decl.c (duplicate_decls): Propagate it.
+ (cp_finish_decl): Handle it.
+ * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
+
+ * except.c (expand_start_catch_block): suspend_momentary for the
+ terminate handler.
+
Sat Dec 13 09:23:54 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* Make-lang.in (g++.c, cxxmain.o): Use $(LN).
@@ -13,20 +59,42 @@ Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
* typeck.c (get_delta_difference): Fix misspelling in diagnostic:
`conversiona'.
-Sun Nov 30 08:42:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
-
- * pt.c (do_poplevel): Allow jumps into the block.
-
Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
* repo.c: Prototype rindex only if needed.
* xref.c: Likewise.
-Thu Nov 27 08:26:56 1997 Jason Merrill <jason@yorick.cygnus.com>
+Thu Nov 27 09:39:31 1997 Jason Merrill <jason@yorick.cygnus.com>
- * except.c (expand_start_catch_block): We only need the rethrow
- region for non-sjlj exceptions.
- (expand_end_catch_block): Likewise. Use outer_context_label_stack.
+ * except.c: Call terminate without caching so many bits.
+
+ * class.c: Remove static pending_hard_virtuals.
+ (add_virtual_function): Take pointers to pending_virtuals
+ and pending_hard_virtuals.
+ (finish_struct_1): Pass them. Declare pending_hard_virtuals.
+
+1997-11-26 Mark Mitchell <mmitchell@usa.net>
+
+ * pt.c (unify): Handle `void' template parameters in
+ specializations.
+
+Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * rtti.c (build_dynamic_cast): Handle template case here.
+ (build_dynamic_cast_1): Not here.
+
+ * typeck2.c (digest_init): Make copies where appropriate.
+
+ * decl2.c (delete_sanity): resolve_offset_ref.
+
+ * except.c (expand_throw): Call mark_used on the destructor.
+
+ * except.c (expand_start_catch_block): Fix catching a reference
+ to pointer.
+
+Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * init.c (build_new): Copy size to the saveable obstack.
Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
@@ -35,6 +103,9 @@ Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
+ * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
+ TRY_CATCH_EXPR for now.
+
* exception.cc (struct cp_eh_info): Add handlers field.
(__cp_push_exception): Initialize it.
(__cp_pop_exception): Decrement it. Don't pop unless it's 0.
@@ -43,17 +114,103 @@ Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
(get_eh_handlers): New fn.
(push_eh_cleanup): Increment handlers.
+Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * except.c (expand_start_catch_block): We only need the rethrow
+ region for non-sjlj exceptions.
+ (expand_end_catch_block): Likewise. Use outer_context_label_stack.
+
+Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * method.c (build_decl_overload_real): Don't mess with global
+ placement delete.
+
+ * init.c (build_new): Check for null throw spec, not nothrow_t.
+
+ * decl.c (duplicate_decls): Don't complain about different exceptions
+ from an internal declaration.
+
+ * call.c (build_op_delete_call): Fix check for member fns again.
+
+ * decl2.c (import_export_decl): Interface hackery affects
+ virtual synthesized methods.
+
+Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * decl.c (start_decl): Don't just complain about a mismatched
+ scope, fix it.
+
+ * decl.c (make_implicit_typename): Handle case where t is not
+ actually from context.
+ * tree.c (get_type_decl): Lose identifier case.
+ * spew.c (yylex): Lose useless call to identifer_typedecl_value.
+ * parse.y (nonnested_type): Just use lookup_name.
+ (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
+
+Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * decl.c (make_implicit_typename): New fn.
+ (lookup_name_real): Use it. Use current_class_type as the context.
+
+Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
+
+ * pt.c (do_poplevel): Don't prohibit jumps into this contour.
+
Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
* friend.c (do_friend): Warn about non-template friends in templates.
+ * call.c (build_op_delete_call): Fix handling of inherited delete.
+
* search.c (dfs_record_inheritance): Ignore template type parms.
+Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * call.c (build_new_op): Fix copy error.
+ (build_op_new_call): New fn.
+ (build_op_delete_call): New fn.
+ * cp-tree.h: Declare them.
+ * init.c (build_new): Use them. Support placement delete.
+ (build_x_delete): Use build_op_delete_call.
+ (build_delete): Likewise.
+ * decl2.c (delete_sanity): Likewise.
+ (coerce_delete_type): Don't complain about placement delete.
+
+Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * call.c (build_new_function_call): Remove unused 'obj' parm.
+ * cp-tree.h, typeck.c: Adjust.
+
+ * init.c (build_new): Make the cleanup last longer.
+ (expand_vec_init): Call do_pending_stack_adjust.
+
+Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * pt.c (do_type_instantiation): Fix typo.
+ (mark_class_instantiated): If we support one_only but not weak
+ symbols, don't mark this as known.
+
+ * init.c (build_new): Handle vec delete in EH cleanup.
+
Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
* call.c (build_method_call): Call complete_type before checking
for destructor.
+Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * init.c (build_new): Handle freeing allocated memory when the
+ constructor throws.
+
+ * call.c (build_new_method_call): Fix flags arg.
+
+ * pt.c (do_type_instantiation): Don't try to instantiate
+ member templates.
+ (mark_decl_instantiated): If we support one_only but not
+ weak symbols, mark this one_only.
+ * decl2.c (import_export_vtable): Don't defer handling of vtables
+ if MULTIPLE_SYMBOL_SPACES.
+
Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
* except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
@@ -62,6 +219,35 @@ Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
* except.c (do_pop_exception): Return a value.
+Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
+
+ * call.c (build_new_method_call): Handle getting a
+ TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
+ if we got template parms.
+ * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
+ not just the args.
+ * decl2.c (build_expr_from_tree): Tweak last change.
+ * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
+ (maybe_fold_nontype_arg): Split out from tsubst_copy.
+ * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
+
+Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
+
+ * pt.c (tsubst_copy): Handle explicit template arguments in
+ function calls.
+ * typeck.c (build_x_function_call): Likewise.
+ * decl2.c (build_expr_from_tree): Lookup function name if it
+ hasn't been done.
+
+ * pt.c (tsubst): Instantiate template functions properly when
+ template parameter does not appear in function arguments and return
+ type.
+ (comp_template_args): Handle member templates required by tsubst.
+
+Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
+
+ * pt.c (coerce_template_parms): Tweak error message.
+
Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
Complete nested exception support.
@@ -118,11 +304,6 @@ Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
- * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
- remaining use of saved_throw_type with a call to get_eh_type.
-
-1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
-
* lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
(file_name_nondirectory): New function, doing the same as the macro.
(set_typedecl_interface_info): Use it instead of the macro.
@@ -134,6 +315,11 @@ Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
* xref.c (open_xref_file): Likewise.
* error.c (dump_char): Make its arg int, not char.
+ * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
+ remaining use of saved_throw_type with a call to get_eh_type.
+
+1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
+
* except.c (push_eh_info): Pass the number of fields - 1 down, not
the exact number of fields.
diff --git a/gnu/usr.bin/gcc/cp/NEWS b/gnu/usr.bin/gcc/cp/NEWS
index ff2d5124f52..7548830396d 100644
--- a/gnu/usr.bin/gcc/cp/NEWS
+++ b/gnu/usr.bin/gcc/cp/NEWS
@@ -1,7 +1,7 @@
*** Changes since G++ version 2.7.2:
-* A public review copy of the December 1996 Draft of the ANSI/ISO C++
- proto-standard is now available. See
+* A public review copy of the December 1996 Draft of the ISO/ANSI C++
+ standard is now available. See
http://www.cygnus.com/misc/wp/
@@ -65,8 +65,17 @@
+ Template friends.
* Exception handling support has been significantly improved and is on by
- default. This can result in significant runtime overhead. You can turn
- it off with -fno-exceptions.
+ default. The compiler supports two mechanisms for walking back up the
+ call stack; one relies on static information about how registers are
+ saved, and causes no runtime overhead for code that does not throw
+ exceptions. The other mechanism uses setjmp and longjmp equivalents, and
+ can result in quite a bit of runtime overhead. You can determine which
+ mechanism is the default for your target by compiling a testcase that
+ uses exceptions and doing an 'nm' on the object file; if it uses __throw,
+ it's using the first mechanism. If it uses __sjthrow, it's using the
+ second.
+
+ You can turn EH support off with -fno-exceptions.
* RTTI support has been rewritten to work properly and is now on by default.
This means code that uses virtual functions will have a modest space
@@ -90,9 +99,9 @@
* New flags:
- + New flags -Wsign-promo (warn about potentially confusing promotions
- in overload resolution), -Wno-pmf-conversion (don't warn about
- converting from a bound member function pointer to function pointer).
+ + New warning -Wno-pmf-conversion (don't warn about
+ converting from a bound member function pointer to function
+ pointer).
+ A flag -Weffc++ has been added for violations of some of the style
guidelines in Scott Meyers' _Effective C++_ books.
@@ -145,7 +154,7 @@
* The name of a class is now implicitly declared in its own scope; A::A
refers to A.
-* Local classes are now supported.
+* Local classes are now supported, though not inside templates.
* __attribute__ can now be attached to types as well as declarations.
diff --git a/gnu/usr.bin/gcc/cp/call.c b/gnu/usr.bin/gcc/cp/call.c
index 8dcbd95776a..d0e800c4687 100644
--- a/gnu/usr.bin/gcc/cp/call.c
+++ b/gnu/usr.bin/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.
@@ -4479,8 +4479,8 @@ resolve_args (args)
}
tree
-build_new_function_call (fn, args, obj)
- tree fn, args, obj;
+build_new_function_call (fn, args)
+ tree fn, args;
{
struct z_candidate *candidates = 0, *cand;
tree explicit_targs = NULL_TREE;
@@ -4493,7 +4493,7 @@ build_new_function_call (fn, args, obj)
template_only = 1;
}
- if (obj == NULL_TREE && really_overloaded_fn (fn))
+ if (really_overloaded_fn (fn))
{
tree t;
tree templates = NULL_TREE;
@@ -4721,7 +4721,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
arglist = scratch_tree_cons (NULL_TREE, arg2, arg3);
if (flags & LOOKUP_GLOBAL)
return build_new_function_call
- (lookup_name_nonclass (fnname), arglist, NULL_TREE);
+ (lookup_name_nonclass (fnname), arglist);
/* FIXME */
rval = build_method_call
@@ -4746,7 +4746,7 @@ build_new_op (code, flags, arg1, arg2, arg3)
if (flags & LOOKUP_GLOBAL)
return build_new_function_call
(lookup_name_nonclass (fnname),
- build_scratch_list (NULL_TREE, arg1), NULL_TREE);
+ build_scratch_list (NULL_TREE, arg1));
arglist = scratch_tree_cons (NULL_TREE, arg1, build_scratch_list (NULL_TREE, arg2));
@@ -4810,9 +4810,6 @@ build_new_op (code, flags, arg1, arg2, arg3)
if (code == POSTINCREMENT_EXPR || code == POSTDECREMENT_EXPR)
arg2 = integer_zero_node;
- fns = lookup_name_nonclass (fnname);
- /* + Koenig lookup */
-
if (arg2 && arg3)
arglist = scratch_tree_cons (NULL_TREE, arg1, scratch_tree_cons
(NULL_TREE, arg2, build_scratch_list (NULL_TREE, arg3)));
@@ -4821,6 +4818,9 @@ build_new_op (code, flags, arg1, arg2, arg3)
else
arglist = build_scratch_list (NULL_TREE, arg1);
+ fns = lookup_name_nonclass (fnname);
+ /* + Koenig lookup */
+
if (fns && TREE_CODE (fns) == TREE_LIST)
fns = TREE_VALUE (fns);
for (; fns; fns = DECL_CHAIN (fns))
@@ -4861,8 +4861,8 @@ build_new_op (code, flags, arg1, arg2, arg3)
templates = scratch_tree_cons (NULL_TREE, fn, templates);
candidates
= add_template_candidate (candidates, fn, NULL_TREE,
- this_arglist, TREE_TYPE
- (fnname), LOOKUP_NORMAL);
+ this_arglist, TREE_TYPE (fnname),
+ flags);
}
else
candidates = add_function_candidate
@@ -5071,6 +5071,145 @@ builtin:
}
}
+/* Build up a call to operator new. This has to be handled differently
+ from other operators in the way lookup is handled; first members are
+ considered, then globals. CODE is either NEW_EXPR or VEC_NEW_EXPR.
+ TYPE is the type to be created. ARGS are any new-placement args.
+ FLAGS are the usual overloading flags. */
+
+tree
+build_op_new_call (code, type, args, flags)
+ enum tree_code code;
+ tree type, args;
+ int flags;
+{
+ tree fnname = ansi_opname[code];
+
+ if (IS_AGGR_TYPE (type) && ! (flags & LOOKUP_GLOBAL)
+ && (TYPE_GETS_NEW (type) & (1 << (code == VEC_NEW_EXPR))))
+ {
+ tree dummy = build1 (NOP_EXPR, build_pointer_type (type),
+ error_mark_node);
+ dummy = build_indirect_ref (dummy, "new");
+ return build_method_call (dummy, fnname, args, NULL_TREE, flags);
+ }
+ else
+ return build_new_function_call (lookup_name_nonclass (fnname), args);
+}
+
+/* Build a call to operator delete. This has to be handled very specially,
+ because the restrictions on what signatures match are different from all
+ other call instances. For a normal delete, only a delete taking (void *)
+ or (void *, size_t) is accepted. For a placement delete, only an exact
+ match with the placement new is accepted.
+
+ CODE is either DELETE_EXPR or VEC_DELETE_EXPR.
+ ADDR is the pointer to be deleted. For placement delete, it is also
+ used to determine what the corresponding new looked like.
+ SIZE is the size of the memory block to be deleted.
+ FLAGS are the usual overloading flags. */
+
+tree
+build_op_delete_call (code, addr, size, flags)
+ enum tree_code code;
+ tree addr, size;
+ int flags;
+{
+ tree fn, fns, fnname, fntype, argtypes, args, type;
+ int placement;
+
+ if (addr == error_mark_node)
+ return error_mark_node;
+
+ type = TREE_TYPE (TREE_TYPE (addr));
+ fnname = ansi_opname[code];
+
+ if (IS_AGGR_TYPE (type) && ! (flags & LOOKUP_GLOBAL))
+ fns = lookup_fnfields (TYPE_BINFO (type), fnname, 0);
+ else
+ fns = NULL_TREE;
+
+ if (fns)
+ {
+ /* Build this up like build_offset_ref does. */
+ fns = build_tree_list (error_mark_node, fns);
+ TREE_TYPE (fns) = build_offset_type (type, unknown_type_node);
+ }
+ else
+ fns = lookup_name_nonclass (fnname);
+
+ /* We can recognize a placement delete because of LOOKUP_SPECULATIVELY;
+ if we are doing placement delete we do nothing if we don't find a
+ matching op delete. */
+ placement = !!(flags & LOOKUP_SPECULATIVELY);
+ if (placement)
+ {
+ /* If placement, we are coming from build_new, and we know that addr
+ is the allocation expression, so extract the info we need from it.
+ Obviously, if the build_new process changes this may have to
+ change as well. */
+ /* The SAVE_EXPR. */
+ tree t = TREE_OPERAND (addr, 0);
+ /* The CALL_EXPR. */
+ t = TREE_OPERAND (t, 0);
+ /* The function. */
+ argtypes = TREE_OPERAND (TREE_OPERAND (t, 0), 0);
+ /* The second parm type. */
+ argtypes = TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (argtypes)));
+ /* The second argument. */
+ args = TREE_CHAIN (TREE_OPERAND (t, 1));
+ }
+ else
+ {
+ /* First try it without the size argument. */
+ argtypes = void_list_node;
+ args = NULL_TREE;
+ }
+
+ argtypes = tree_cons (NULL_TREE, ptr_type_node, argtypes);
+ fntype = build_function_type (void_type_node, argtypes);
+
+ /* Strip const and volatile from addr. */
+ if (type != TYPE_MAIN_VARIANT (type))
+ addr = cp_convert (build_pointer_type (TYPE_MAIN_VARIANT (type)), addr);
+
+ /* instantiate_type will always return a plain function; pretend it's
+ overloaded. */
+ if (TREE_CODE (fns) == FUNCTION_DECL)
+ fns = scratch_tree_cons (NULL_TREE, fns, NULL_TREE);
+
+ fn = instantiate_type (fntype, fns, 0);
+
+ if (fn != error_mark_node)
+ {
+ if (TREE_CODE (TREE_VALUE (fns)) == TREE_LIST)
+ /* Member functions. */
+ enforce_access (TREE_PURPOSE (TREE_VALUE (fns)), fn);
+ return build_function_call (fn, expr_tree_cons (NULL_TREE, addr, args));
+ }
+
+ if (placement)
+ return NULL_TREE;
+
+ /* Normal delete; now try to find a match including the size argument. */
+ argtypes = tree_cons (NULL_TREE, ptr_type_node,
+ tree_cons (NULL_TREE, sizetype, void_list_node));
+ fntype = build_function_type (void_type_node, argtypes);
+
+ fn = instantiate_type (fntype, fns, 0);
+
+ if (fn != error_mark_node)
+ return build_function_call
+ (fn, expr_tree_cons (NULL_TREE, addr,
+ build_expr_list (NULL_TREE, size)));
+
+ cp_error ("no suitable operator delete for `%T'", type);
+ return error_mark_node;
+}
+
+/* If the current scope isn't allowed to access FUNCTION along
+ BASETYPE_PATH, give an error. */
+
static void
enforce_access (basetype_path, function)
tree basetype_path, function;
@@ -5359,7 +5498,10 @@ build_over_call (fn, convs, args, flags)
&& copy_args_p (fn))
{
tree targ;
- arg = TREE_VALUE (TREE_CHAIN (converted_args));
+ arg = TREE_CHAIN (converted_args);
+ if (TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (fn)))
+ arg = TREE_CHAIN (arg);
+ arg = TREE_VALUE (arg);
/* Pull out the real argument, disregarding const-correctness. */
targ = arg;
@@ -5474,6 +5616,8 @@ build_new_method_call (instance, name, args, basetype_path, flags)
{
explicit_targs = TREE_OPERAND (name, 1);
name = TREE_OPERAND (name, 0);
+ if (TREE_CODE (name) == TEMPLATE_DECL)
+ name = DECL_NAME (name);
template_only = 1;
}
@@ -5526,10 +5670,13 @@ build_new_method_call (instance, name, args, basetype_path, flags)
{
instance_ptr = build_this (instance);
- /* XXX this should be handled before we get here. */
- fns = build_field_call (basetype_path, instance_ptr, name, args);
- if (fns)
- return fns;
+ if (! template_only)
+ {
+ /* XXX this should be handled before we get here. */
+ fns = build_field_call (basetype_path, instance_ptr, name, args);
+ if (fns)
+ return fns;
+ }
}
else
{
@@ -5575,8 +5722,7 @@ build_new_method_call (instance, name, args, basetype_path, flags)
candidates =
add_template_candidate (candidates, t, explicit_targs,
this_arglist,
- TREE_TYPE (name),
- LOOKUP_NORMAL);
+ TREE_TYPE (name), flags);
}
else if (! template_only)
candidates = add_function_candidate (candidates, t,
diff --git a/gnu/usr.bin/gcc/cp/class.c b/gnu/usr.bin/gcc/cp/class.c
index 70db2ff547f..01a736ac7ac 100644
--- a/gnu/usr.bin/gcc/cp/class.c
+++ b/gnu/usr.bin/gcc/cp/class.c
@@ -103,7 +103,7 @@ static void grow_method PROTO((tree, tree *));
static void finish_vtbls PROTO((tree, int, tree));
static void modify_vtable_entry PROTO((tree, tree, tree));
static tree get_vtable_entry_n PROTO((tree, unsigned HOST_WIDE_INT));
-static tree add_virtual_function PROTO((tree, int *, tree, tree));
+static void add_virtual_function PROTO((tree *, tree *, int *, tree, tree));
static tree delete_duplicate_fields_1 PROTO((tree, tree));
static void delete_duplicate_fields PROTO((tree));
static void finish_struct_bits PROTO((tree, int));
@@ -416,11 +416,6 @@ build_vbase_path (code, type, expr, path, alias_this)
/* Virtual function things. */
-/* Virtual functions to be dealt with after laying out our base
- classes. We do all overrides after we layout virtual base classes. */
-
-static tree pending_hard_virtuals;
-
/* Build an entry in the virtual function table.
DELTA is the offset for the `this' pointer.
PFN is an ADDR_EXPR containing a pointer to the virtual function.
@@ -953,13 +948,16 @@ get_vtable_entry_n (virtuals, n)
vtable for the type, and we build upon the PENDING_VIRTUALS list
and return it. */
-static tree
-add_virtual_function (pending_virtuals, has_virtual, fndecl, t)
- tree pending_virtuals;
+static void
+add_virtual_function (pv, phv, has_virtual, fndecl, t)
+ tree *pv, *phv;
int *has_virtual;
tree fndecl;
tree t; /* Structure type. */
{
+ tree pending_virtuals = *pv;
+ tree pending_hard_virtuals = *phv;
+
/* FUNCTION_TYPEs and OFFSET_TYPEs no longer freely
convert to void *. Make such a conversion here. */
tree vfn = build1 (ADDR_EXPR, vfunc_ptr_type_node, fndecl);
@@ -1023,7 +1021,8 @@ add_virtual_function (pending_virtuals, has_virtual, fndecl, t)
Deal with this after we have laid out our virtual base classes. */
pending_hard_virtuals = temp_tree_cons (fndecl, vfn, pending_hard_virtuals);
}
- return pending_virtuals;
+ *pv = pending_virtuals;
+ *phv = pending_hard_virtuals;
}
/* Obstack on which to build the vector of class methods. */
@@ -3109,6 +3108,7 @@ finish_struct_1 (t, warn_anon)
int has_virtual;
int max_has_virtual;
tree pending_virtuals = NULL_TREE;
+ tree pending_hard_virtuals = NULL_TREE;
tree abstract_virtuals = NULL_TREE;
tree vfield;
tree vfields;
@@ -3275,8 +3275,8 @@ finish_struct_1 (t, warn_anon)
if (DECL_VINDEX (x)
|| (all_virtual == 1 && ! DECL_CONSTRUCTOR_P (x)))
{
- pending_virtuals = add_virtual_function (pending_virtuals,
- &has_virtual, x, t);
+ add_virtual_function (&pending_virtuals, &pending_hard_virtuals,
+ &has_virtual, x, t);
if (DECL_ABSTRACT_VIRTUAL_P (x))
abstract_virtuals = tree_cons (NULL_TREE, x, abstract_virtuals);
#if 0
@@ -3663,8 +3663,8 @@ finish_struct_1 (t, warn_anon)
fn_fields = dtor;
if (DECL_VINDEX (dtor))
- pending_virtuals = add_virtual_function (pending_virtuals,
- &has_virtual, dtor, t);
+ add_virtual_function (&pending_virtuals, &pending_hard_virtuals,
+ &has_virtual, dtor, t);
nonprivate_method = 1;
}
}
diff --git a/gnu/usr.bin/gcc/cp/config-lang.in b/gnu/usr.bin/gcc/cp/config-lang.in
index 4ba5cdffe32..9b39d51ed87 100644
--- a/gnu/usr.bin/gcc/cp/config-lang.in
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/cp/cp-tree.h b/gnu/usr.bin/gcc/cp/cp-tree.h
index 06a8c647103..67cc22face8 100644
--- a/gnu/usr.bin/gcc/cp/cp-tree.h
+++ b/gnu/usr.bin/gcc/cp/cp-tree.h
@@ -943,7 +943,8 @@ struct lang_decl_flags
unsigned nonconverting : 1;
unsigned declared_inline : 1;
unsigned not_really_extern : 1;
- unsigned dummy : 5;
+ unsigned comdat : 1;
+ unsigned dummy : 4;
tree access;
tree context;
@@ -1420,6 +1421,10 @@ extern int flag_new_for_scope;
#define DECL_REALLY_EXTERN(NODE) \
(DECL_EXTERNAL (NODE) && ! DECL_NOT_REALLY_EXTERN (NODE))
+/* Used to tell cp_finish_decl that it should approximate comdat linkage
+ as best it can for this decl. */
+#define DECL_COMDAT(NODE) (DECL_LANG_SPECIFIC (NODE)->decl_flags.comdat)
+
#define THUNK_DELTA(DECL) ((DECL)->decl.frame_size.i)
/* ...and for unexpanded-parameterized-type nodes. */
@@ -1955,8 +1960,10 @@ extern tree build_overload_call PROTO((tree, tree, int));
extern int null_ptr_cst_p PROTO((tree));
extern tree type_decays_to PROTO((tree));
extern tree build_user_type_conversion PROTO((tree, tree, int));
-extern tree build_new_function_call PROTO((tree, tree, tree));
+extern tree build_new_function_call PROTO((tree, tree));
extern tree build_new_op PROTO((enum tree_code, int, tree, tree, tree));
+extern tree build_op_new_call PROTO((enum tree_code, tree, tree, int));
+extern tree build_op_delete_call PROTO((enum tree_code, tree, tree, int));
extern int can_convert PROTO((tree, tree));
extern int can_convert_arg PROTO((tree, tree, tree));
diff --git a/gnu/usr.bin/gcc/cp/decl.c b/gnu/usr.bin/gcc/cp/decl.c
index 7b3af601c29..f336f064265 100644
--- a/gnu/usr.bin/gcc/cp/decl.c
+++ b/gnu/usr.bin/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)
+ Copyright (C) 1988, 92-97, 1998 Free Software Foundation, Inc.
+ Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -2779,7 +2779,8 @@ duplicate_decls (newdecl, olddecl)
TREE_TYPE (olddecl) = build_exception_variant (newtype,
TYPE_RAISES_EXCEPTIONS (oldtype));
- if ((pedantic || ! DECL_IN_SYSTEM_HEADER (olddecl))
+ if ((pedantic || (! DECL_IN_SYSTEM_HEADER (olddecl)
+ && DECL_SOURCE_LINE (olddecl) != 0))
&& flag_exceptions
&& ! compexcepttypes (TREE_TYPE (newdecl), TREE_TYPE (olddecl)))
{
@@ -2862,6 +2863,7 @@ duplicate_decls (newdecl, olddecl)
{
DECL_INTERFACE_KNOWN (newdecl) |= DECL_INTERFACE_KNOWN (olddecl);
DECL_NOT_REALLY_EXTERN (newdecl) |= DECL_NOT_REALLY_EXTERN (olddecl);
+ DECL_COMDAT (newdecl) |= DECL_COMDAT (olddecl);
}
if (TREE_CODE (newdecl) == FUNCTION_DECL)
@@ -4382,6 +4384,44 @@ make_typename_type (context, name)
return t;
}
+/* Given a TYPE_DECL T looked up in CONTEXT, return a TYPENAME_TYPE
+ where the scope is either CONTEXT or the first base of CONTEXT along the
+ inheritance chain to T that depends on template parameters.
+
+ Called from lookup_name_real to implement the implicit typename
+ extension. */
+
+static tree
+make_implicit_typename (context, t)
+ tree context, t;
+{
+ tree retval;
+
+ if (uses_template_parms (DECL_CONTEXT (t))
+ && DECL_CONTEXT (t) != context)
+ {
+ tree binfo = get_binfo (DECL_CONTEXT (t), context, 0);
+ while (binfo)
+ {
+ tree next = BINFO_INHERITANCE_CHAIN (binfo);
+ if (! uses_template_parms (BINFO_TYPE (next))
+ || BINFO_TYPE (next) == context)
+ break;
+ binfo = next;
+ }
+ if (binfo)
+ retval = make_typename_type (BINFO_TYPE (binfo), DECL_NAME (t));
+ else
+ /* FIXME: find the enclosing class whose base t comes from. */
+ retval = make_typename_type (DECL_CONTEXT (t), DECL_NAME (t));
+ }
+ else
+ retval = make_typename_type (context, DECL_NAME (t));
+
+ TREE_TYPE (retval) = TREE_TYPE (t);
+ return retval;
+}
+
/* Look up NAME in the current binding level and its superiors in the
namespace of variables, functions and typedefs. Return a ..._DECL
node of some kind representing its definition if there is only one
@@ -4474,8 +4514,7 @@ lookup_name_real (name, prefer_type, nonclass)
&& val && TREE_CODE (val) == TYPE_DECL
&& ! DECL_ARTIFICIAL (val))
{
- tree t = make_typename_type (got_scope, DECL_NAME (val));
- TREE_TYPE (t) = TREE_TYPE (val);
+ tree t = make_implicit_typename (got_scope, val);
val = TYPE_MAIN_DECL (t);
}
@@ -4515,9 +4554,7 @@ lookup_name_real (name, prefer_type, nonclass)
&& uses_template_parms (DECL_CONTEXT (classval))
&& ! DECL_ARTIFICIAL (classval))
{
- tree t = make_typename_type (DECL_CONTEXT (classval),
- DECL_NAME (classval));
- TREE_TYPE (t) = TREE_TYPE (classval);
+ tree t = make_implicit_typename (current_class_type, classval);
classval = TYPE_MAIN_DECL (t);
}
}
@@ -5984,7 +6021,12 @@ start_decl (declarator, declspecs, initialized)
else
{
if (DECL_CONTEXT (field) != context)
- cp_pedwarn ("ANSI C++ does not permit `%T::%D' to be defined as `%T::%D'", DECL_CONTEXT (field), DECL_NAME (decl), context, DECL_NAME (decl));
+ {
+ cp_pedwarn ("ANSI C++ does not permit `%T::%D' to be defined as `%T::%D'",
+ DECL_CONTEXT (field), DECL_NAME (decl),
+ context, DECL_NAME (decl));
+ DECL_CONTEXT (decl) = DECL_CONTEXT (field);
+ }
if (duplicate_decls (decl, field))
decl = field;
}
@@ -6685,6 +6727,35 @@ cp_finish_decl (decl, init, asmspec_tree, need_pop, flags)
cp_warning_at ("sorry: semantics of inline function static data `%#D' are wrong (you'll wind up with multiple copies)", decl);
}
+ else if (TREE_CODE (decl) == VAR_DECL
+ && DECL_LANG_SPECIFIC (decl)
+ && DECL_COMDAT (decl))
+ {
+ /* Dynamically initialized vars go into common. */
+ if (DECL_INITIAL (decl) == NULL_TREE
+ || DECL_INITIAL (decl) == error_mark_node)
+ DECL_COMMON (decl) = 1;
+ else if (EMPTY_CONSTRUCTOR_P (DECL_INITIAL (decl)))
+ {
+ DECL_COMMON (decl) = 1;
+ DECL_INITIAL (decl) = error_mark_node;
+ }
+ else
+ {
+ /* Statically initialized vars are weak or comdat, if
+ supported. */
+ if (flag_weak)
+ make_decl_one_only (decl);
+ else
+ {
+ /* we can't do anything useful; leave vars for explicit
+ instantiation. */
+ DECL_EXTERNAL (decl) = 1;
+ DECL_NOT_REALLY_EXTERN (decl) = 0;
+ }
+ }
+ }
+
if (TREE_CODE (decl) == VAR_DECL && DECL_VIRTUAL_P (decl))
make_decl_rtl (decl, NULL_PTR, toplev);
else if (TREE_CODE (decl) == VAR_DECL
@@ -10213,6 +10284,9 @@ copy_args_p (d)
tree d;
{
tree t = FUNCTION_ARG_CHAIN (d);
+ if (DECL_CONSTRUCTOR_P (d)
+ && TYPE_USES_VIRTUAL_BASECLASSES (DECL_CONTEXT (d)))
+ t = TREE_CHAIN (t);
if (t && TREE_CODE (TREE_VALUE (t)) == REFERENCE_TYPE
&& (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_VALUE (t)))
== DECL_CLASS_CONTEXT (d))
diff --git a/gnu/usr.bin/gcc/cp/decl2.c b/gnu/usr.bin/gcc/cp/decl2.c
index b51e6602fa6..dd2bb436698 100644
--- a/gnu/usr.bin/gcc/cp/decl2.c
+++ b/gnu/usr.bin/gcc/cp/decl2.c
@@ -1242,7 +1242,10 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
return t;
}
- t = stabilize_reference (convert_from_reference (exp));
+ t = exp;
+ if (TREE_CODE (t) == OFFSET_REF)
+ t = resolve_offset_ref (t);
+ t = stabilize_reference (convert_from_reference (t));
type = TREE_TYPE (t);
code = TREE_CODE (type);
@@ -1270,15 +1273,14 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
if (code == POINTER_TYPE)
{
#if 0
- /* As of Valley Forge, you can delete a pointer to constant. */
- /* You can't delete a pointer to constant. */
+ /* As of Valley Forge, you can delete a pointer to const. */
if (TREE_READONLY (TREE_TYPE (type)))
{
error ("`const *' cannot be deleted");
return error_mark_node;
}
#endif
- /* You also can't delete functions. */
+ /* You can't delete functions. */
if (TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE)
{
error ("cannot delete a function");
@@ -1310,8 +1312,8 @@ delete_sanity (exp, size, doing_vec, use_global_delete)
{
/* Only do access checking here; we'll be calling op delete
from the destructor. */
- tree tmp = build_opfncall (DELETE_EXPR, LOOKUP_NORMAL, t,
- size_zero_node, NULL_TREE);
+ tree tmp = build_op_delete_call (DELETE_EXPR, t,
+ size_zero_node, LOOKUP_NORMAL);
if (tmp == error_mark_node)
return error_mark_node;
}
@@ -2403,6 +2405,7 @@ coerce_delete_type (type)
|| TREE_VALUE (arg_types) != ptr_type_node)
e2 = 1, error ("`operator delete' takes type `void *' as first parameter");
+#if 0
if (arg_types
&& TREE_CHAIN (arg_types)
&& TREE_CHAIN (arg_types) != void_list_node)
@@ -2434,8 +2437,12 @@ coerce_delete_type (type)
arg_types = tree_cons (NULL_TREE, ptr_type_node, TREE_CHAIN (arg_types));
}
else e3 |= e1;
+#endif
- if (e3)
+ if (e2)
+ arg_types = tree_cons (NULL_TREE, ptr_type_node,
+ arg_types ? TREE_CHAIN (arg_types): NULL_TREE);
+ if (e2 || e1)
type = build_function_type (void_type_node, arg_types);
return type;
@@ -2528,6 +2535,7 @@ import_export_vtable (decl, type, final)
int found = CLASSTYPE_TEMPLATE_INSTANTIATION (type);
+#ifndef MULTIPLE_SYMBOL_SPACES
if (! found && ! final)
{
tree method;
@@ -2541,6 +2549,7 @@ import_export_vtable (decl, type, final)
break;
}
}
+#endif
if (final || ! found)
{
@@ -2759,26 +2768,8 @@ import_export_decl (decl)
{
if (TREE_CODE (decl) == FUNCTION_DECL)
comdat_linkage (decl);
- /* Dynamically initialized vars go into common. */
- else if (DECL_INITIAL (decl) == NULL_TREE
- || DECL_INITIAL (decl) == error_mark_node)
- DECL_COMMON (decl) = 1;
- else if (EMPTY_CONSTRUCTOR_P (DECL_INITIAL (decl)))
- {
- DECL_COMMON (decl) = 1;
- DECL_INITIAL (decl) = error_mark_node;
- }
else
- {
- /* Statically initialized vars are weak or comdat, if
- supported. */
- if (flag_weak)
- make_decl_one_only (decl);
- else
- /* we can't do anything useful; leave vars for explicit
- instantiation. */
- DECL_NOT_REALLY_EXTERN (decl) = 0;
- }
+ DECL_COMDAT (decl) = 1;
}
else
DECL_NOT_REALLY_EXTERN (decl) = 0;
@@ -2786,7 +2777,8 @@ import_export_decl (decl)
else if (DECL_FUNCTION_MEMBER_P (decl))
{
tree ctype = DECL_CLASS_CONTEXT (decl);
- if (CLASSTYPE_INTERFACE_KNOWN (ctype) && ! DECL_ARTIFICIAL (decl))
+ if (CLASSTYPE_INTERFACE_KNOWN (ctype)
+ && (! DECL_ARTIFICIAL (decl) || DECL_VINDEX (decl)))
{
DECL_NOT_REALLY_EXTERN (decl)
= ! (CLASSTYPE_INTERFACE_ONLY (ctype)
@@ -3406,10 +3398,9 @@ build_expr_from_tree (t)
return do_identifier (TREE_OPERAND (t, 0), 0);
case TEMPLATE_ID_EXPR:
- return lookup_template_function (build_expr_from_tree
- (TREE_OPERAND (t, 0)),
- build_expr_from_tree
- (TREE_OPERAND (t, 1)));
+ return (lookup_template_function
+ (build_expr_from_tree (TREE_OPERAND (t, 0)),
+ build_expr_from_tree (TREE_OPERAND (t, 1))));
case INDIRECT_REF:
return build_x_indirect_ref
@@ -3568,7 +3559,8 @@ build_expr_from_tree (t)
else
{
tree name = TREE_OPERAND (t, 0);
- if (! really_overloaded_fn (name))
+ if (TREE_CODE (name) == TEMPLATE_ID_EXPR
+ || ! really_overloaded_fn (name))
name = build_expr_from_tree (name);
return build_x_function_call
(name, build_expr_from_tree (TREE_OPERAND (t, 1)),
diff --git a/gnu/usr.bin/gcc/cp/except.c b/gnu/usr.bin/gcc/cp/except.c
index a1a96f28337..c59cf71bbf9 100644
--- a/gnu/usr.bin/gcc/cp/except.c
+++ b/gnu/usr.bin/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.
@@ -177,9 +177,6 @@ static tree FirstExceptionMatch;
/* Used to cache a call to __unwind_function. */
static tree Unwind;
-/* Holds a ready to emit call to "terminate". */
-static tree TerminateFunctionCall;
-
/* ====================================================================== */
@@ -282,7 +279,7 @@ init_exception_processing ()
NOT_BUILT_IN, NULL_PTR);
Unexpected = default_conversion (unexpected_fndecl);
- Terminate = default_conversion (terminate_fndecl);
+ Terminate = terminate_fndecl;
SetTerminate = default_conversion (set_terminate_fndecl);
SetUnexpected = default_conversion (set_unexpected_fndecl);
CatchMatch = default_conversion (catch_match_fndecl);
@@ -290,8 +287,6 @@ init_exception_processing ()
Unwind = default_conversion (unwind_fndecl);
BuiltinReturnAddress = default_conversion (builtin_return_address_fndecl);
- TerminateFunctionCall = build_function_call (Terminate, NULL_TREE);
-
pop_lang_context ();
d = build_decl (VAR_DECL, get_identifier ("__eh_pc"), ptr_type_node);
@@ -479,8 +474,7 @@ build_eh_type (exp)
if it is, it avoids destroying the object on rethrow. */
static tree
-do_pop_exception (handler)
- tree handler;
+do_pop_exception ()
{
tree fn, cleanup;
fn = get_identifier ("__cp_pop_exception");
@@ -495,9 +489,7 @@ do_pop_exception (handler)
fn = build_lang_decl
(FUNCTION_DECL, fn,
build_function_type (void_type_node, tree_cons
- (NULL_TREE, ptr_type_node, tree_cons
- (NULL_TREE, boolean_type_node,
- void_list_node))));
+ (NULL_TREE, ptr_type_node, void_list_node)));
DECL_EXTERNAL (fn) = 1;
TREE_PUBLIC (fn) = 1;
DECL_ARTIFICIAL (fn) = 1;
@@ -510,8 +502,7 @@ do_pop_exception (handler)
/* Arrange to do a dynamically scoped cleanup upon exit from this region. */
cleanup = lookup_name (get_identifier ("__exception_info"), 0);
cleanup = build_function_call (fn, expr_tree_cons
- (NULL_TREE, cleanup, expr_tree_cons
- (NULL_TREE, handler, NULL_TREE)));
+ (NULL_TREE, cleanup, NULL_TREE));
return cleanup;
}
@@ -520,17 +511,15 @@ do_pop_exception (handler)
static void
push_eh_cleanup ()
{
- /* All cleanups must last longer than normal. */
- int yes = suspend_momentary ();
- expand_decl_cleanup_no_eh (NULL_TREE, do_pop_exception (boolean_false_node));
- resume_momentary (yes);
+ int yes;
expand_expr (build_unary_op (PREINCREMENT_EXPR, get_eh_handlers (), 1),
const0_rtx, VOIDmode, EXPAND_NORMAL);
- /* We don't destroy the exception object on rethrow, so we can't use
- the normal cleanup mechanism for it. */
- expand_eh_region_start ();
+ yes = suspend_momentary ();
+ /* All cleanups must last longer than normal. */
+ expand_decl_cleanup (NULL_TREE, do_pop_exception ());
+ resume_momentary (yes);
}
/* call this to start a catch block. Typename is the typename, and identifier
@@ -613,6 +602,13 @@ expand_start_catch_block (declspecs, declarator)
init_type = build_reference_type (init_type);
exp = get_eh_value ();
+
+ /* Since pointers are passed by value, initialize a reference to
+ pointer catch parm with the address of the value slot. */
+ if (TREE_CODE (init_type) == REFERENCE_TYPE
+ && TREE_CODE (TREE_TYPE (init_type)) == POINTER_TYPE)
+ exp = build_unary_op (ADDR_EXPR, exp, 1);
+
exp = expr_tree_cons (NULL_TREE,
build_eh_type_type (TREE_TYPE (decl)),
expr_tree_cons (NULL_TREE,
@@ -643,12 +639,15 @@ expand_start_catch_block (declspecs, declarator)
must call terminate. See eh23.C. */
if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (decl)))
{
+ int yes = suspend_momentary ();
+ tree term = build_function_call (Terminate, NULL_TREE);
+ resume_momentary (yes);
+
/* Generate the copy constructor call directly so we can wrap it.
See also expand_default_init. */
init = ocp_convert (TREE_TYPE (decl), init,
CONV_IMPLICIT|CONV_FORCE_TEMP, 0);
- init = build (TRY_CATCH_EXPR, TREE_TYPE (init), init,
- TerminateFunctionCall);
+ init = build (TRY_CATCH_EXPR, TREE_TYPE (init), init, term);
}
/* Let `cp_finish_decl' know that this initializer is ok. */
@@ -690,9 +689,6 @@ expand_end_catch_block ()
expand_end_bindings (getdecls (), kept_level_p (), 0);
poplevel (kept_level_p (), 1, 0);
- /* Matches push_eh_cleanup. */
- expand_eh_region_end (do_pop_exception (boolean_true_node));
-
/* Cleanup the EH object. */
expand_end_bindings (getdecls (), kept_level_p (), 0);
poplevel (kept_level_p (), 1, 0);
@@ -988,7 +984,6 @@ expand_builtin_throw ()
/* no it didn't --> therefore we need to call terminate */
emit_label (gotta_call_terminate);
do_function_call (Terminate, NULL_TREE, NULL_TREE);
- assemble_external (TREE_OPERAND (Terminate, 0));
{
rtx ret_val, x;
@@ -1065,7 +1060,6 @@ expand_end_eh_spec (raises)
emit_label (cont);
jumpif (make_tree (integer_type_node, flag), end);
do_function_call (Terminate, NULL_TREE, NULL_TREE);
- assemble_external (TREE_OPERAND (Terminate, 0));
emit_barrier ();
do_pending_stack_adjust ();
RTL_EXPR_SEQUENCE (expr) = get_insns ();
@@ -1171,9 +1165,6 @@ expand_exception_blocks ()
the setjmp/longjmp approach. */
if (exceptions_via_longjmp == 0)
{
- /* Is this necessary? */
- assemble_external (TREE_OPERAND (Terminate, 0));
-
expand_eh_region_start ();
}
@@ -1181,7 +1172,7 @@ expand_exception_blocks ()
catch_clauses = NULL_RTX;
if (exceptions_via_longjmp == 0)
- expand_eh_region_end (TerminateFunctionCall);
+ expand_eh_region_end (build_function_call (Terminate, NULL_TREE));
expand_leftover_cleanups ();
@@ -1310,6 +1301,7 @@ expand_throw (exp)
cleanup = lookup_fnfields (TYPE_BINFO (TREE_TYPE (object)),
dtor_identifier, 0);
cleanup = TREE_VALUE (cleanup);
+ mark_used (cleanup);
mark_addressable (cleanup);
/* Pretend it's a normal function. */
cleanup = build1 (ADDR_EXPR, cleanup_type, cleanup);
diff --git a/gnu/usr.bin/gcc/cp/exception.cc b/gnu/usr.bin/gcc/cp/exception.cc
index caaf5892282..088b1e24e3b 100644
--- a/gnu/usr.bin/gcc/cp/exception.cc
+++ b/gnu/usr.bin/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.
@@ -125,17 +125,20 @@ __cp_push_exception (void *value, void *type, void (*cleanup)(void *, int))
/* Compiler hook to pop an exception that has been finalized. Used by
push_eh_cleanup(). P is the info for the exception caught by the
- current catch block, and HANDLER determines if we've been called from
- an exception handler; if so, we avoid destroying the object on rethrow. */
+ current catch block. */
extern "C" void
-__cp_pop_exception (cp_eh_info *p, bool handler)
+__cp_pop_exception (cp_eh_info *p)
{
cp_eh_info **q = &__eh_info;
--p->handlers;
- if (p->handlers > 0 || (handler && p == *q))
+ /* Don't really pop if there are still active handlers for our exception,
+ or if our exception is being rethrown (i.e. if the active exception is
+ our exception and it is uncaught). */
+ if (p->handlers != 0
+ || (p == *q && !p->caught))
return;
for (; *q; q = &((*q)->next))
diff --git a/gnu/usr.bin/gcc/cp/init.c b/gnu/usr.bin/gcc/cp/init.c
index ca23848abaf..576c937c0f7 100644
--- a/gnu/usr.bin/gcc/cp/init.c
+++ b/gnu/usr.bin/gcc/cp/init.c
@@ -2452,16 +2452,6 @@ build_new (placement, decl, init, use_global_new)
return error_mark_node;
}
- /* If the first placement arg is of type nothrow_t, it's allowed to
- return 0 on allocation failure. */
- nothrow = (placement && TREE_VALUE (placement)
- && TREE_TYPE (TREE_VALUE (placement))
- && IS_AGGR_TYPE (TREE_TYPE (TREE_VALUE (placement)))
- && (TYPE_IDENTIFIER (TREE_TYPE (TREE_VALUE (placement)))
- == get_identifier ("nothrow_t")));
-
- check_new = flag_check_new || nothrow;
-
#if 1
/* Get a little extra space to store a couple of things before the new'ed
array, if this isn't the default placement new. */
@@ -2493,18 +2483,9 @@ build_new (placement, decl, init, use_global_new)
}
/* Allocate the object. */
- if (! use_global_new && TYPE_LANG_SPECIFIC (true_type)
- && (TYPE_GETS_NEW (true_type) & (1 << has_array)))
- rval = build_opfncall (code, LOOKUP_NORMAL,
- build_pointer_type (true_type), size, placement);
- else if (placement)
- {
- rval = build_opfncall (code, LOOKUP_GLOBAL|LOOKUP_COMPLAIN,
- ptr_type_node, size, placement);
- rval = cp_convert (build_pointer_type (true_type), rval);
- }
- else if (! has_array && flag_this_is_variable > 0
- && TYPE_NEEDS_CONSTRUCTING (true_type) && init != void_type_node)
+
+ if (! has_array && ! placement && flag_this_is_variable > 0
+ && TYPE_NEEDS_CONSTRUCTING (true_type) && init != void_type_node)
{
if (init == NULL_TREE || TREE_CODE (init) == TREE_LIST)
rval = NULL_TREE;
@@ -2516,13 +2497,46 @@ build_new (placement, decl, init, use_global_new)
}
else
{
- rval = build_builtin_call (build_pointer_type (true_type),
- has_array ? BIVN : BIN,
- build_expr_list (NULL_TREE, size));
- TREE_CALLS_NEW (rval) = 1;
+ rval = build_op_new_call
+ (code, true_type, expr_tree_cons (NULL_TREE, size, placement),
+ LOOKUP_NORMAL | (use_global_new * LOOKUP_GLOBAL));
+ rval = cp_convert (build_pointer_type (true_type), rval);
+ }
+
+ /* unless an allocation function is declared with an empty excep-
+ tion-specification (_except.spec_), throw(), it indicates failure to
+ allocate storage by throwing a bad_alloc exception (clause _except_,
+ _lib.bad.alloc_); it returns a non-null pointer otherwise If the allo-
+ cation function is declared with an empty exception-specification,
+ throw(), it returns null to indicate failure to allocate storage and a
+ non-null pointer otherwise.
+
+ So check for a null exception spec on the op new we just called. */
+
+ nothrow = 0;
+ if (rval)
+ {
+ /* The CALL_EXPR. */
+ tree t = TREE_OPERAND (rval, 0);
+ /* The function. */
+ t = TREE_OPERAND (TREE_OPERAND (t, 0), 0);
+ t = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (t));
+
+ if (t && TREE_VALUE (t) == NULL_TREE)
+ nothrow = 1;
}
+ check_new = flag_check_new || nothrow;
- if (check_new && rval)
+ if (flag_exceptions && rval)
+ {
+ /* This must last longer so we can use it in the cleanup.
+ The subexpressions don't need to last, because we won't look at
+ them when expanding the cleanup. */
+ int yes = suspend_momentary ();
+ alloc_expr = rval = save_expr (rval);
+ resume_momentary (yes);
+ }
+ else if (check_new && rval)
alloc_expr = rval = save_expr (rval);
else
alloc_expr = NULL_TREE;
@@ -2705,13 +2719,47 @@ build_new (placement, decl, init, use_global_new)
rval = xval;
}
#endif
+
+ /* If any part of the object initialization terminates by throwing
+ an exception and the new-expression does not contain a
+ new-placement, then the deallocation function is called to free
+ the memory in which the object was being constructed. */
+ if (flag_exceptions && alloc_expr)
+ {
+ enum tree_code dcode = has_array? VEC_DELETE_EXPR : DELETE_EXPR;
+ tree cleanup, args = NULL_TREE;
+ int flags = LOOKUP_NORMAL | (use_global_new * LOOKUP_GLOBAL);
+
+ /* All cleanups must last longer than normal. */
+ int yes = suspend_momentary ();
+
+ if (placement)
+ flags |= LOOKUP_SPECULATIVELY;
+
+ /* Copy size to the saveable obstack. */
+ size = copy_node (size);
+
+ cleanup = build_op_delete_call (dcode, alloc_expr, size, flags);
+
+ resume_momentary (yes);
+
+ if (cleanup)
+ {
+ /* FIXME: this is a workaround for a crash due to overlapping
+ exception regions. Cleanups shouldn't really happen here. */
+ rval = build1 (CLEANUP_POINT_EXPR, TREE_TYPE (rval), rval);
+
+ rval = build (TRY_CATCH_EXPR, TREE_TYPE (rval), rval, cleanup);
+ rval = build (COMPOUND_EXPR, TREE_TYPE (rval), alloc_expr, rval);
+ }
+ }
}
else if (TYPE_READONLY (true_type))
cp_error ("uninitialized const in `new' of `%#T'", true_type);
done:
- if (alloc_expr && rval != alloc_expr)
+ if (check_new && alloc_expr && rval != alloc_expr)
{
/* Did we modify the storage? */
tree ifexp = build_binary_op (NE_EXPR, alloc_expr,
@@ -3112,6 +3160,7 @@ expand_vec_init (decl, base, maxindex, init, from_array)
TREE_TYPE (cleanup) = void_type_node;
RTL_EXPR_RTL (cleanup) = const0_rtx;
TREE_SIDE_EFFECTS (cleanup) = 1;
+ do_pending_stack_adjust ();
start_sequence_for_rtl_expr (cleanup);
e1 = build_array_eh_cleanup
@@ -3119,6 +3168,7 @@ expand_vec_init (decl, base, maxindex, init, from_array)
build_binary_op (MINUS_EXPR, maxindex, iterator, 1),
type);
expand_expr (e1, const0_rtx, VOIDmode, EXPAND_NORMAL);
+ do_pending_stack_adjust ();
RTL_EXPR_SEQUENCE (cleanup) = get_insns ();
end_sequence ();
@@ -3160,16 +3210,10 @@ build_x_delete (type, addr, which_delete, virtual_size)
{
int use_global_delete = which_delete & 1;
int use_vec_delete = !!(which_delete & 2);
- tree rval;
enum tree_code code = use_vec_delete ? VEC_DELETE_EXPR : DELETE_EXPR;
+ int flags = LOOKUP_NORMAL | (use_global_delete * LOOKUP_GLOBAL);
- if (! use_global_delete && TYPE_LANG_SPECIFIC (TREE_TYPE (type))
- && (TYPE_GETS_DELETE (TREE_TYPE (type)) & (1 << use_vec_delete)))
- rval = build_opfncall (code, LOOKUP_NORMAL, addr, virtual_size, NULL_TREE);
- else
- rval = build_builtin_call (void_type_node, use_vec_delete ? BIVD : BID,
- build_expr_list (NULL_TREE, addr));
- return rval;
+ return build_op_delete_call (code, addr, virtual_size, flags);
}
/* Generate a call to a destructor. TYPE is the type to cast ADDR to.
@@ -3266,18 +3310,9 @@ build_delete (type, addr, auto_delete, flags, use_global_delete)
if (auto_delete == integer_zero_node)
return void_zero_node;
- /* Pass the size of the object down to the operator delete() in
- addition to the ADDR. */
- if (TYPE_GETS_REG_DELETE (type) && !use_global_delete)
- {
- tree virtual_size = c_sizeof_nowarn (type);
- return build_opfncall (DELETE_EXPR, LOOKUP_NORMAL, addr,
- virtual_size, NULL_TREE);
- }
-
- /* Call the builtin operator delete. */
- return build_builtin_call (void_type_node, BID,
- build_expr_list (NULL_TREE, addr));
+ return build_op_delete_call
+ (DELETE_EXPR, addr, c_sizeof_nowarn (type),
+ LOOKUP_NORMAL | (use_global_delete * LOOKUP_GLOBAL));
}
/* Below, we will reverse the order in which these calls are made.
diff --git a/gnu/usr.bin/gcc/cp/method.c b/gnu/usr.bin/gcc/cp/method.c
index dc57bc77a46..7a8cf989500 100644
--- a/gnu/usr.bin/gcc/cp/method.c
+++ b/gnu/usr.bin/gcc/cp/method.c
@@ -1,9 +1,9 @@
/* Handle the hair of processing (but not expanding) inline functions.
Also manage function and variable name overloading.
- Copyright (C) 1987, 89, 92-96, 1997 Free Software Foundation, Inc.
+ 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
@@ -1119,19 +1119,17 @@ build_decl_overload_real (dname, parms, ret_type, tparms, targs,
char *name = IDENTIFIER_POINTER (dname);
/* member operators new and delete look like methods at this point. */
- if (! for_method && parms != NULL_TREE && TREE_CODE (parms) == TREE_LIST)
+ if (! for_method && parms != NULL_TREE && TREE_CODE (parms) == TREE_LIST
+ && TREE_CHAIN (parms) == void_list_node)
{
if (dname == ansi_opname[(int) DELETE_EXPR])
return get_identifier ("__builtin_delete");
else if (dname == ansi_opname[(int) VEC_DELETE_EXPR])
return get_identifier ("__builtin_vec_delete");
- else if (TREE_CHAIN (parms) == void_list_node)
- {
- if (dname == ansi_opname[(int) NEW_EXPR])
- return get_identifier ("__builtin_new");
- else if (dname == ansi_opname[(int) VEC_NEW_EXPR])
- return get_identifier ("__builtin_vec_new");
- }
+ if (dname == ansi_opname[(int) NEW_EXPR])
+ return get_identifier ("__builtin_new");
+ else if (dname == ansi_opname[(int) VEC_NEW_EXPR])
+ return get_identifier ("__builtin_vec_new");
}
OB_INIT ();
@@ -1807,7 +1805,7 @@ make_thunk (function, delta)
tree function;
int delta;
{
- char buffer[250];
+ char *buffer;
tree thunk_id;
tree thunk;
char *func_name;
@@ -1818,6 +1816,7 @@ make_thunk (function, delta)
if (TREE_CODE (func_decl) != FUNCTION_DECL)
abort ();
func_name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (func_decl));
+ buffer = (char *)alloca (strlen (func_name) + 32);
if (delta<=0)
sprintf (buffer, "__thunk_%d_%s", -delta, func_name);
else
diff --git a/gnu/usr.bin/gcc/cp/parse.y b/gnu/usr.bin/gcc/cp/parse.y
index 0941e0f2b99..9187d8ab2b2 100644
--- a/gnu/usr.bin/gcc/cp/parse.y
+++ b/gnu/usr.bin/gcc/cp/parse.y
@@ -3017,18 +3017,15 @@ nonnested_type:
{
if (TREE_CODE ($1) == IDENTIFIER_NODE)
{
+ $$ = lookup_name ($1, 1);
if (current_class_type
&& TYPE_BEING_DEFINED (current_class_type)
&& ! IDENTIFIER_CLASS_VALUE ($1))
{
- /* Be sure to get an inherited typedef. */
- $$ = lookup_name ($1, 1);
/* Remember that this name has been used in the class
definition, as per [class.scope0] */
pushdecl_class_level ($$);
}
- else
- $$ = identifier_typedecl_value ($1);
}
else
$$ = $1;
@@ -3036,7 +3033,7 @@ nonnested_type:
| global_scope type_name
{
if (TREE_CODE ($2) == IDENTIFIER_NODE)
- $$ = identifier_typedecl_value ($2);
+ $$ = IDENTIFIER_GLOBAL_VALUE ($2);
else
$$ = $2;
got_scope = NULL_TREE;
@@ -3285,7 +3282,7 @@ complex_type_name:
global_scope type_name
{
if (TREE_CODE ($2) == IDENTIFIER_NODE)
- $$ = identifier_typedecl_value ($2);
+ $$ = IDENTIFIER_GLOBAL_VALUE ($2);
else
$$ = $2;
got_scope = NULL_TREE;
diff --git a/gnu/usr.bin/gcc/cp/pt.c b/gnu/usr.bin/gcc/cp/pt.c
index 49339b1b5a8..9f42d008ec6 100644
--- a/gnu/usr.bin/gcc/cp/pt.c
+++ b/gnu/usr.bin/gcc/cp/pt.c
@@ -1085,7 +1085,7 @@ coerce_template_parms (parms, arglist, in_decl)
}
else if (!TREE_CONSTANT (val))
{
- cp_error ("non-const `%E' cannot be used as template argument",
+ cp_error ("non-constant `%E' cannot be used as template argument",
arg);
val = error_mark_node;
}
@@ -1157,7 +1157,13 @@ comp_template_args (oldargs, newargs)
continue;
if (TREE_CODE (nt) != TREE_CODE (ot))
return 0;
- if (TREE_CODE_CLASS (TREE_CODE (ot)) == 't')
+ if (TREE_CODE (nt) == TREE_VEC)
+ {
+ /* For member templates */
+ if (comp_template_args (nt, ot))
+ continue;
+ }
+ else if (TREE_CODE_CLASS (TREE_CODE (ot)) == 't')
{
if (comptypes (ot, nt, 1))
continue;
@@ -2025,6 +2031,39 @@ lookup_nested_type_by_name (ctype, name)
return NULL_TREE;
}
+/* If arg is a non-type template parameter that does not depend on template
+ arguments, fold it like we weren't in the body of a template. */
+
+static tree
+maybe_fold_nontype_arg (arg)
+ tree arg;
+{
+ if (TREE_CODE_CLASS (TREE_CODE (arg)) != 't'
+ && !uses_template_parms (arg))
+ {
+ /* Sometimes, one of the args was an expression involving a
+ template constant parameter, like N - 1. Now that we've
+ tsubst'd, we might have something like 2 - 1. This will
+ confuse lookup_template_class, so we do constant folding
+ here. We have to unset processing_template_decl, to
+ fool build_expr_from_tree() into building an actual
+ tree. */
+
+ int saved_processing_template_decl = processing_template_decl;
+ processing_template_decl = 0;
+ arg = fold (build_expr_from_tree (arg));
+ processing_template_decl = saved_processing_template_decl;
+ }
+ return arg;
+}
+
+/* Take the tree structure T and replace template parameters used therein
+ with the argument vector ARGS. NARGS is the number of args; should
+ be removed. IN_DECL is an associated decl for diagnostics.
+
+ tsubst is used for dealing with types, decls and the like; for
+ expressions, use tsubst_expr or tsubst_copy. */
+
tree
tsubst (t, args, nargs, in_decl)
tree t, args;
@@ -2246,14 +2285,6 @@ tsubst (t, args, nargs, in_decl)
type = tsubst (type, args, nargs, in_decl);
}
- if (type == TREE_TYPE (t)
- && (! member || ctx == DECL_CLASS_CONTEXT (t)))
- {
- t = copy_node (t);
- copy_lang_decl (t);
- return t;
- }
-
/* Do we already have this instantiation? */
if (DECL_TEMPLATE_INFO (t) != NULL_TREE)
{
@@ -2262,7 +2293,8 @@ tsubst (t, args, nargs, in_decl)
for (; decls; decls = TREE_CHAIN (decls))
if (TREE_TYPE (TREE_VALUE (decls)) == type
- && DECL_CLASS_CONTEXT (TREE_VALUE (decls)) == ctx)
+ && DECL_CLASS_CONTEXT (TREE_VALUE (decls)) == ctx
+ && comp_template_args (TREE_PURPOSE (decls), args))
return TREE_VALUE (decls);
}
@@ -2616,24 +2648,8 @@ tsubst (t, args, nargs, in_decl)
for (i = 0; i < len; i++)
{
- elts[i] = tsubst_expr (TREE_VEC_ELT (t, i), args, nargs, in_decl);
-
- if (TREE_CODE_CLASS (TREE_CODE (elts[i])) != 't'
- && !uses_template_parms (elts[i]))
- {
- /* Sometimes, one of the args was an expression involving a
- template constant parameter, like N - 1. Now that we've
- tsubst'd, we might have something like 2 - 1. This will
- confuse lookup_template_class, so we do constant folding
- here. We have to unset processing_template_decl, to
- fool build_expr_from_tree() into building an actual
- tree. */
-
- int saved_processing_template_decl = processing_template_decl;
- processing_template_decl = 0;
- elts[i] = fold (build_expr_from_tree (elts[i]));
- processing_template_decl = saved_processing_template_decl;
- }
+ elts[i] = maybe_fold_nontype_arg
+ (tsubst_expr (TREE_VEC_ELT (t, i), args, nargs, in_decl));
if (elts[i] != TREE_VEC_ELT (t, i))
need_new = 1;
@@ -2847,6 +2863,10 @@ do_poplevel ()
return t;
}
+/* Like tsubst, but deals with expressions. This function just replaces
+ template parms; to finish processing the resultant expression, use
+ tsubst_expr. */
+
tree
tsubst_copy (t, args, nargs, in_decl)
tree t, args;
@@ -2966,7 +2986,7 @@ tsubst_copy (t, args, nargs, in_decl)
{
tree fn = TREE_OPERAND (t, 0);
if (really_overloaded_fn (fn))
- fn = tsubst_copy (TREE_VALUE (fn), args, nargs, in_decl);
+ fn = tsubst_copy (get_first_fn (fn), args, nargs, in_decl);
else
fn = tsubst_copy (fn, args, nargs, in_decl);
return build_nt
@@ -3028,10 +3048,14 @@ tsubst_copy (t, args, nargs, in_decl)
case TEMPLATE_ID_EXPR:
{
- tree r = lookup_template_function
- (tsubst_copy (TREE_OPERAND (t, 0), args, nargs, in_decl),
- tsubst_copy (TREE_OPERAND (t, 1), args, nargs, in_decl));
- return r;
+ /* Substituted template arguments */
+ tree targs = tsubst_copy (TREE_OPERAND (t, 1), args, nargs, in_decl);
+ tree chain;
+ for (chain = targs; chain; chain = TREE_CHAIN (chain))
+ TREE_VALUE (chain) = maybe_fold_nontype_arg (TREE_VALUE (chain));
+
+ return lookup_template_function
+ (tsubst_copy (TREE_OPERAND (t, 0), args, nargs, in_decl), targs);
}
case TREE_LIST:
@@ -3089,6 +3113,8 @@ tsubst_copy (t, args, nargs, in_decl)
}
}
+/* Like tsubst_copy, but also does semantic processing and RTL expansion. */
+
tree
tsubst_expr (t, args, nargs, in_decl)
tree t, args;
@@ -3825,6 +3851,7 @@ unify (tparms, targs, ntparms, parm, arg, nsubsts, strict)
case COMPLEX_TYPE:
case INTEGER_TYPE:
case BOOLEAN_TYPE:
+ case VOID_TYPE:
if (TREE_CODE (arg) != TREE_CODE (parm))
return 1;
@@ -3962,6 +3989,11 @@ mark_decl_instantiated (result, extern_p)
{
DECL_INTERFACE_KNOWN (result) = 1;
DECL_NOT_REALLY_EXTERN (result) = 1;
+
+ /* For WIN32 we also want to put explicit instantiations in
+ linkonce sections. */
+ if (supports_one_only () && ! SUPPORTS_WEAK)
+ comdat_linkage (result);
}
else if (TREE_CODE (result) == FUNCTION_DECL)
mark_inline_for_output (result);
@@ -4295,8 +4327,16 @@ mark_class_instantiated (t, extern_p)
int extern_p;
{
SET_CLASSTYPE_EXPLICIT_INSTANTIATION (t);
- SET_CLASSTYPE_INTERFACE_KNOWN (t);
- CLASSTYPE_INTERFACE_ONLY (t) = extern_p;
+
+ if (supports_one_only () && ! SUPPORTS_WEAK)
+ /* For WIN32 we also want to put explicit instantiations in
+ linkonce sections. */;
+ else
+ {
+ SET_CLASSTYPE_INTERFACE_KNOWN (t);
+ CLASSTYPE_INTERFACE_ONLY (t) = extern_p;
+ }
+
CLASSTYPE_VTABLE_NEEDS_WRITING (t) = ! extern_p;
TYPE_DECL_SUPPRESS_DEBUG (TYPE_NAME (t)) = extern_p;
if (! extern_p)
@@ -4371,7 +4411,8 @@ do_type_instantiation (t, storage)
if (! static_p)
for (tmp = TYPE_METHODS (t); tmp; tmp = TREE_CHAIN (tmp))
- if (DECL_TEMPLATE_INSTANTIATION (tmp))
+ if (TREE_CODE (tmp) == FUNCTION_DECL
+ && DECL_TEMPLATE_INSTANTIATION (tmp))
{
mark_decl_instantiated (tmp, extern_p);
repo_template_instantiated (tmp, extern_p);
@@ -4489,15 +4530,16 @@ instantiate_decl (d)
import_export_decl (d);
}
+ /* Reject all external templates except inline functions. */
+ if (DECL_INTERFACE_KNOWN (d)
+ && ! DECL_NOT_REALLY_EXTERN (d)
+ && ! (TREE_CODE (d) == FUNCTION_DECL && DECL_INLINE (d)))
+ goto out;
+
+ /* Defer all templates except inline functions used in another function. */
if (! pattern_defined
- || (TREE_CODE (d) == FUNCTION_DECL && ! DECL_INLINE (d)
- && (! DECL_INTERFACE_KNOWN (d)
- || ! DECL_NOT_REALLY_EXTERN (d)))
- /* Kludge: if we compile a constructor in the middle of processing a
- toplevel declaration, we blow away the declspecs in
- temp_decl_obstack when we call permanent_allocation in
- finish_function. So don't compile it yet. */
- || (TREE_CODE (d) == FUNCTION_DECL && ! nested && ! at_eof))
+ || (! (TREE_CODE (d) == FUNCTION_DECL && DECL_INLINE (d) && nested)
+ && ! at_eof))
{
add_pending_template (d);
goto out;
diff --git a/gnu/usr.bin/gcc/cp/rtti.c b/gnu/usr.bin/gcc/cp/rtti.c
index e7b83d37726..49406962722 100644
--- a/gnu/usr.bin/gcc/cp/rtti.c
+++ b/gnu/usr.bin/gcc/cp/rtti.c
@@ -428,15 +428,6 @@ build_dynamic_cast_1 (type, expr)
enum tree_code ec;
tree dcast_fn;
- if (type == error_mark_node || expr == error_mark_node)
- return error_mark_node;
-
- if (processing_template_decl)
- {
- tree t = build_min (DYNAMIC_CAST_EXPR, type, expr);
- return t;
- }
-
assert (exprtype != NULL_TREE);
ec = TREE_CODE (exprtype);
@@ -647,6 +638,12 @@ tree
build_dynamic_cast (type, expr)
tree type, expr;
{
+ if (type == error_mark_node || expr == error_mark_node)
+ return error_mark_node;
+
+ if (processing_template_decl)
+ return build_min (DYNAMIC_CAST_EXPR, type, expr);
+
return convert_from_reference (build_dynamic_cast_1 (type, expr));
}
diff --git a/gnu/usr.bin/gcc/cp/spew.c b/gnu/usr.bin/gcc/cp/spew.c
index ce884def14a..a6fe404bbe0 100644
--- a/gnu/usr.bin/gcc/cp/spew.c
+++ b/gnu/usr.bin/gcc/cp/spew.c
@@ -312,9 +312,7 @@ yylex ()
{
case TYPENAME:
case SELFNAME:
- lastiddecl = identifier_typedecl_value (tmp_token.yylval.ttype);
- if (lastiddecl != trrr)
- lastiddecl = trrr;
+ lastiddecl = trrr;
if (got_scope)
tmp_token.yylval.ttype = trrr;
break;
diff --git a/gnu/usr.bin/gcc/cp/tree.c b/gnu/usr.bin/gcc/cp/tree.c
index 9d2589fec6d..98b1a6d3b77 100644
--- a/gnu/usr.bin/gcc/cp/tree.c
+++ b/gnu/usr.bin/gcc/cp/tree.c
@@ -1306,7 +1306,8 @@ tree
get_first_fn (from)
tree from;
{
- if (TREE_CODE (from) == FUNCTION_DECL
+ if (TREE_CODE (from) == FUNCTION_DECL
+ || TREE_CODE (from) == TEMPLATE_ID_EXPR
|| DECL_FUNCTION_TEMPLATE_P (from))
return from;
@@ -1865,8 +1866,6 @@ tree
get_type_decl (t)
tree t;
{
- if (TREE_CODE (t) == IDENTIFIER_NODE)
- return identifier_typedecl_value (t);
if (TREE_CODE (t) == TYPE_DECL)
return t;
if (TREE_CODE_CLASS (TREE_CODE (t)) == 't')
diff --git a/gnu/usr.bin/gcc/cp/typeck.c b/gnu/usr.bin/gcc/cp/typeck.c
index 304e92d3f7f..77d785fd76f 100644
--- a/gnu/usr.bin/gcc/cp/typeck.c
+++ b/gnu/usr.bin/gcc/cp/typeck.c
@@ -2281,6 +2281,7 @@ build_x_function_call (function, params, decl)
tree function, params, decl;
{
tree type;
+ tree template_id = NULL_TREE;
int is_method;
if (function == error_mark_node)
@@ -2289,6 +2290,13 @@ build_x_function_call (function, params, decl)
if (processing_template_decl)
return build_min_nt (CALL_EXPR, function, params, NULL_TREE);
+ /* Save explicit template arguments if found */
+ if (TREE_CODE (function) == TEMPLATE_ID_EXPR)
+ {
+ template_id = function;
+ function = TREE_OPERAND (function, 0);
+ }
+
type = TREE_TYPE (function);
if (TREE_CODE (type) == OFFSET_TYPE
@@ -2383,6 +2391,9 @@ build_x_function_call (function, params, decl)
decl = build_indirect_ref (decl, NULL_PTR);
}
+ /* Put back explicit template arguments, if any. */
+ if (template_id)
+ function = template_id;
return build_method_call (decl, function, params,
NULL_TREE, LOOKUP_NORMAL);
}
@@ -2411,7 +2422,12 @@ build_x_function_call (function, params, decl)
tree val = TREE_VALUE (function);
if (flag_ansi_overloading)
- return build_new_function_call (function, params, NULL_TREE);
+ {
+ /* Put back explicit template arguments, if any. */
+ if (template_id)
+ function = template_id;
+ return build_new_function_call (function, params);
+ }
if (TREE_CODE (val) == TEMPLATE_DECL)
return build_overload_call_real
@@ -4791,12 +4807,15 @@ mark_addressable (exp)
return 1;
case FUNCTION_DECL:
- /* We have to test both conditions here. The first may
- be non-zero in the case of processing a default function.
- The second may be non-zero in the case of a template function. */
- x = DECL_MAIN_VARIANT (x);
- if (DECL_TEMPLATE_INFO (x) && !DECL_TEMPLATE_SPECIALIZATION (x))
- mark_used (x);
+ if (DECL_LANG_SPECIFIC (x) != 0)
+ {
+ x = DECL_MAIN_VARIANT (x);
+ /* We have to test both conditions here. The first may be
+ non-zero in the case of processing a default function. The
+ second may be non-zero in the case of a template function. */
+ if (DECL_TEMPLATE_INFO (x) && !DECL_TEMPLATE_SPECIALIZATION (x))
+ mark_used (x);
+ }
TREE_ADDRESSABLE (x) = 1;
TREE_USED (x) = 1;
TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (x)) = 1;
diff --git a/gnu/usr.bin/gcc/cp/typeck2.c b/gnu/usr.bin/gcc/cp/typeck2.c
index df58f19b6e4..fae966874a1 100644
--- a/gnu/usr.bin/gcc/cp/typeck2.c
+++ b/gnu/usr.bin/gcc/cp/typeck2.c
@@ -743,6 +743,9 @@ digest_init (type, init, tail)
init = DECL_INITIAL (init);
else if (TREE_READONLY_DECL_P (init))
init = decl_constant_value (init);
+ else if (IS_AGGR_TYPE (type) && TYPE_NEEDS_CONSTRUCTING (type))
+ init = ocp_convert (type, init, CONV_IMPLICIT|CONV_FORCE_TEMP,
+ LOOKUP_NORMAL);
return init;
}
diff --git a/gnu/usr.bin/gcc/cpp.texi b/gnu/usr.bin/gcc/cpp.texi
index 9424b48f985..fb730e2ef23 100644
--- a/gnu/usr.bin/gcc/cpp.texi
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/cpplib.c b/gnu/usr.bin/gcc/cpplib.c
index 9cfd3ac6e46..48756018a7a 100644
--- a/gnu/usr.bin/gcc/cpplib.c
+++ b/gnu/usr.bin/gcc/cpplib.c
@@ -1,5 +1,5 @@
/* CPP Library.
- Copyright (C) 1986, 87, 89, 92-6, 1997 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
@@ -414,7 +414,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. */
@@ -7545,6 +7546,7 @@ cpp_error_from_errno (pfile, name)
cpp_reader *pfile;
char *name;
{
+ int e = errno;
int i;
cpp_buffer *ip = cpp_file_buffer (pfile);
@@ -7553,7 +7555,7 @@ cpp_error_from_errno (pfile, name)
if (ip != NULL)
cpp_file_line_for_message (pfile, 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/gnu/usr.bin/gcc/crtstuff.c b/gnu/usr.bin/gcc/crtstuff.c
index 52a3c048e60..0a5aedddd3d 100644
--- a/gnu/usr.bin/gcc/crtstuff.c
+++ b/gnu/usr.bin/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, 1994, 1995, 1996, 1997 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.
@@ -250,6 +250,18 @@ __do_global_dtors ()
__deregister_frame_info (__EH_FRAME_BEGIN__);
#endif
}
+
+#ifdef EH_FRAME_SECTION_ASM_OP
+/* Define a function here to call __register_frame. crtend.o is linked in
+ after libgcc.a, and hence can't call libgcc.a functions directly. That
+ can lead to unresolved function references. */
+void
+__frame_dummy ()
+{
+ static struct object object;
+ __register_frame_info (__EH_FRAME_BEGIN__, &object);
+}
+#endif
#endif
#endif /* defined(INIT_SECTION_ASM_OP) */
@@ -370,11 +382,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
- asm (TEXT_SECTION_ASM_OP);
-} /* epilogue and body go in .init section */
+
+asm (TEXT_SECTION_ASM_OP);
#endif /* OBJECT_FORMAT_ELF */
@@ -384,15 +398,13 @@ __do_global_ctors_aux () /* prologue goes in .text section */
/* This case is used by the Irix 6 port, which supports named sections but
not an SVR4-style .init section. __do_global_ctors can be non-static
in this case because we protect it with -hidden_symbol. */
-extern char __EH_FRAME_BEGIN__[];
static func_ptr __CTOR_END__[];
void
__do_global_ctors ()
{
func_ptr *p;
#ifdef EH_FRAME_SECTION_ASM_OP
- static struct object object;
- __register_frame_info (__EH_FRAME_BEGIN__, &object);
+ __frame_dummy ();
#endif
for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
(*p) ();
diff --git a/gnu/usr.bin/gcc/cse.c b/gnu/usr.bin/gcc/cse.c
index c99e4de7337..aaf3e4c531a 100644
--- a/gnu/usr.bin/gcc/cse.c
+++ b/gnu/usr.bin/gcc/cse.c
@@ -2311,6 +2311,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/gnu/usr.bin/gcc/dwarf2out.c b/gnu/usr.bin/gcc/dwarf2out.c
index b1f748cdd97..23059631673 100644
--- a/gnu/usr.bin/gcc/dwarf2out.c
+++ b/gnu/usr.bin/gcc/dwarf2out.c
@@ -1,5 +1,5 @@
/* Output Dwarf2 format symbol table information from the GNU C compiler.
- Copyright (C) 1992, 1993, 1995, 1996, 1997 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).
@@ -552,6 +552,7 @@ expand_builtin_dwarf_reg_size (reg_tree, target)
tree reg_tree;
rtx target;
{
+ enum machine_mode mode;
int size;
struct reg_size_range ranges[5];
tree t, t2;
@@ -567,13 +568,29 @@ expand_builtin_dwarf_reg_size (reg_tree, target)
if (DWARF_FRAME_REGNUM (i) == DWARF_FRAME_RETURN_COLUMN)
continue;
- size = GET_MODE_SIZE (reg_raw_mode[i]);
+ 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 (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;
- assert (n_ranges < 5);
+ assert (n_ranges <= 5);
}
ranges[n_ranges-1].end = i;
}
diff --git a/gnu/usr.bin/gcc/emit-rtl.c b/gnu/usr.bin/gcc/emit-rtl.c
index d4b6a79a9a2..d9a78d7e5a3 100644
--- a/gnu/usr.bin/gcc/emit-rtl.c
+++ b/gnu/usr.bin/gcc/emit-rtl.c
@@ -1,5 +1,5 @@
/* Emit RTL for the GNU C-Compiler expander.
- Copyright (C) 1987, 88, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -48,6 +48,7 @@ Boston, MA 02111-1307, USA. */
#include "function.h"
#include "expr.h"
#include "regs.h"
+#include "hard-reg-set.h"
#include "insn-config.h"
#include "recog.h"
#include "real.h"
@@ -685,6 +686,14 @@ gen_lowpart_common (mode, x)
/* integrate.c can't handle parts of a return value register. */
&& (! REG_FUNCTION_VALUE_P (x)
|| ! rtx_equal_function_value_matters)
+#ifdef CLASS_CANNOT_CHANGE_SIZE
+ && ! (GET_MODE_SIZE (mode) != GET_MODE_SIZE (GET_MODE (x))
+ && GET_MODE_CLASS (GET_MODE (x)) != MODE_COMPLEX_INT
+ && GET_MODE_CLASS (GET_MODE (x)) != MODE_COMPLEX_FLOAT
+ && (TEST_HARD_REG_BIT
+ (reg_class_contents[(int) CLASS_CANNOT_CHANGE_SIZE],
+ REGNO (x))))
+#endif
/* We want to keep the stack, frame, and arg pointers
special. */
&& x != frame_pointer_rtx
diff --git a/gnu/usr.bin/gcc/enquire.c b/gnu/usr.bin/gcc/enquire.c
index 178d029d192..b46c7d33066 100644
--- a/gnu/usr.bin/gcc/enquire.c
+++ b/gnu/usr.bin/gcc/enquire.c
@@ -1408,21 +1408,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/gnu/usr.bin/gcc/except.c b/gnu/usr.bin/gcc/except.c
index d0922668a4d..6aea0ec09f7 100644
--- a/gnu/usr.bin/gcc/except.c
+++ b/gnu/usr.bin/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.
@@ -729,38 +729,53 @@ add_partial_entry (handler)
This routine is here to facilitate the porting of this code to
systems with threads. One can either replace the routine we emit a
call for here in libgcc2.c, or one can modify this routine to work
- with their thread system. */
+ with their thread system.
+
+ Ideally, we really only want one per real function, not one
+ per inlined function. */
rtx
get_dynamic_handler_chain ()
{
-#if 0
- /* Do this once we figure out how to get this to the front of the
- function, and we really only want one per real function, not one
- per inlined function. */
- if (current_function_dhc == 0)
+ static tree fn;
+ tree expr;
+ rtx insns;
+
+ if (current_function_dhc)
+ return current_function_dhc;
+
+ if (fn == NULL_TREE)
{
- rtx dhc, insns;
- start_sequence ();
-
- dhc = emit_library_call_value (get_dynamic_handler_chain_libfunc,
- NULL_RTX, 1,
- Pmode, 0);
- current_function_dhc = copy_to_reg (dhc);
- insns = get_insns ();
- end_sequence ();
- emit_insns_before (insns, get_first_nonparm_insn ());
+ tree fntype;
+ fn = get_identifier ("__get_dynamic_handler_chain");
+ push_obstacks_nochange ();
+ end_temporary_allocation ();
+ fntype = build_pointer_type (build_pointer_type
+ (build_pointer_type (void_type_node)));
+ fntype = build_function_type (fntype, NULL_TREE);
+ fn = build_decl (FUNCTION_DECL, fn, fntype);
+ DECL_EXTERNAL (fn) = 1;
+ TREE_PUBLIC (fn) = 1;
+ DECL_ARTIFICIAL (fn) = 1;
+ TREE_READONLY (fn) = 1;
+ make_decl_rtl (fn, NULL_PTR, 1);
+ assemble_external (fn);
+ pop_obstacks ();
}
-#else
- rtx dhc;
- dhc = emit_library_call_value (get_dynamic_handler_chain_libfunc,
- NULL_RTX, 1,
- Pmode, 0);
- current_function_dhc = copy_to_reg (dhc);
-#endif
- /* We don't want a copy of the dhc, but rather, the single dhc. */
- return gen_rtx (MEM, Pmode, current_function_dhc);
+ expr = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (fn)), fn);
+ expr = build (CALL_EXPR, TREE_TYPE (TREE_TYPE (fn)),
+ expr, NULL_TREE, NULL_TREE);
+ TREE_SIDE_EFFECTS (expr) = 1;
+ expr = build1 (INDIRECT_REF, TREE_TYPE (TREE_TYPE (expr)), expr);
+
+ start_sequence ();
+ current_function_dhc = expand_expr (expr, NULL_RTX, VOIDmode, 0);
+ insns = get_insns ();
+ end_sequence ();
+ emit_insns_before (insns, get_first_nonparm_insn ());
+
+ return current_function_dhc;
}
/* Get a reference to the dynamic cleanup chain. It points to the
@@ -993,6 +1008,7 @@ expand_eh_region_start_tree (decl, cleanup)
}
expand_eh_region_start_for_decl (decl);
+ ehstack.top->entry->finalization = cleanup;
return 0;
}
@@ -1118,6 +1134,57 @@ expand_eh_region_end (handler)
}
}
+/* End the EH region for a goto fixup. We only need them in the region-based
+ EH scheme. */
+
+void
+expand_fixup_region_start ()
+{
+ if (! doing_eh (0) || exceptions_via_longjmp)
+ return;
+
+ expand_eh_region_start ();
+}
+
+/* End the EH region for a goto fixup. CLEANUP is the cleanup we just
+ expanded; to avoid running it twice if it throws, we look through the
+ ehqueue for a matching region and rethrow from its outer_context. */
+
+void
+expand_fixup_region_end (cleanup)
+ tree cleanup;
+{
+ tree t;
+ struct eh_node *node;
+ int yes;
+
+ if (! doing_eh (0) || exceptions_via_longjmp)
+ return;
+
+ for (node = ehstack.top; node && node->entry->finalization != cleanup; )
+ node = node->chain;
+ if (node == 0)
+ for (node = ehqueue.head; node && node->entry->finalization != cleanup; )
+ node = node->chain;
+ if (node == 0)
+ abort ();
+
+ yes = suspend_momentary ();
+
+ t = build (RTL_EXPR, void_type_node, NULL_RTX, const0_rtx);
+ TREE_SIDE_EFFECTS (t) = 1;
+ do_pending_stack_adjust ();
+ start_sequence_for_rtl_expr (t);
+ expand_internal_throw (node->entry->outer_context);
+ do_pending_stack_adjust ();
+ RTL_EXPR_SEQUENCE (t) = get_insns ();
+ end_sequence ();
+
+ resume_momentary (yes);
+
+ expand_eh_region_end (t);
+}
+
/* If we are using the setjmp/longjmp EH codegen method, we emit a
call to __sjthrow.
diff --git a/gnu/usr.bin/gcc/explow.c b/gnu/usr.bin/gcc/explow.c
index fd75ecf331c..a2519f86b79 100644
--- a/gnu/usr.bin/gcc/explow.c
+++ b/gnu/usr.bin/gcc/explow.c
@@ -1,5 +1,5 @@
/* Subroutines for manipulating rtx's in semantically interesting ways.
- Copyright (C) 1987, 91, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 91, 94-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -1234,7 +1234,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/gnu/usr.bin/gcc/expr.c b/gnu/usr.bin/gcc/expr.c
index 2af7fdb6d1d..d408c3e2fab 100644
--- a/gnu/usr.bin/gcc/expr.c
+++ b/gnu/usr.bin/gcc/expr.c
@@ -177,7 +177,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));
@@ -1642,7 +1642,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))
@@ -2137,7 +2137,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,
@@ -2640,6 +2640,7 @@ 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. */
@@ -2970,7 +2971,7 @@ expand_assignment (to, from, want_value, suggest_reg)
if (TREE_CODE (to) == COMPONENT_REF
&& TREE_READONLY (TREE_OPERAND (to, 1)))
{
- if (offset = 0)
+ if (offset == 0)
to_rtx = copy_rtx (to_rtx);
RTX_UNCHANGING_P (to_rtx) = 1;
@@ -4429,12 +4430,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,
size_binop (FLOOR_DIV_EXPR, index,
size_int (BITS_PER_UNIT)));
-
- if (contains_placeholder_p (offset))
- offset = build (WITH_RECORD_EXPR, sizetype, offset, exp);
}
}
else if (TREE_CODE (exp) != NON_LVALUE_EXPR
@@ -4484,6 +4485,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:
@@ -4492,10 +4494,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:
@@ -4639,12 +4643,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;
@@ -4655,8 +4662,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
@@ -4693,19 +4700,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':
@@ -4718,7 +4725,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)
@@ -4753,7 +4761,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);
@@ -4762,7 +4770,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. */
@@ -4779,7 +4787,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;
}
@@ -5236,7 +5244,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)
@@ -5261,6 +5269,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
@@ -5293,7 +5303,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;
@@ -5304,26 +5314,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)
{
@@ -5433,7 +5455,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
@@ -5460,7 +5482,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))
@@ -5656,8 +5678,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))))
{
@@ -5666,8 +5686,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);
@@ -5707,7 +5730,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. */
@@ -6192,7 +6216,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);
@@ -6337,7 +6361,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
@@ -6420,7 +6444,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
@@ -6438,7 +6462,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);
@@ -6490,12 +6514,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
@@ -6610,7 +6634,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,
@@ -6658,7 +6682,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
@@ -6786,7 +6810,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)))
@@ -6830,7 +6854,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);
@@ -6840,7 +6864,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)
@@ -6867,7 +6891,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);
@@ -6908,7 +6932,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);
@@ -6926,7 +6950,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);
@@ -7061,6 +7085,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);
@@ -7175,7 +7200,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);
@@ -7389,7 +7415,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);
@@ -7931,7 +7957,7 @@ get_pointer_alignment (exp, max_align)
{
unsigned align, inner;
- if (TREE_CODE (TREE_TYPE (exp)) != POINTER_TYPE)
+ if (! POINTER_TYPE_P (TREE_TYPE (exp)))
return 0;
align = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp)));
@@ -7945,8 +7971,9 @@ get_pointer_alignment (exp, max_align)
case CONVERT_EXPR:
case NON_LVALUE_EXPR:
exp = TREE_OPERAND (exp, 0);
- if (TREE_CODE (TREE_TYPE (exp)) != POINTER_TYPE)
+ if (! POINTER_TYPE_P (TREE_TYPE (exp)))
return align;
+
inner = TYPE_ALIGN (TREE_TYPE (TREE_TYPE (exp)));
align = MIN (inner, max_align);
break;
@@ -8502,9 +8529,9 @@ 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
+ || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist))))
|| TREE_CHAIN (TREE_CHAIN (arglist)) == 0
|| TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))))) != INTEGER_TYPE)
return const0_rtx;
@@ -8526,7 +8553,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
case BUILT_IN_RETURN:
if (arglist
/* 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))))
expand_builtin_return (expand_expr (TREE_VALUE (arglist),
NULL_RTX, VOIDmode, 0));
return const0_rtx;
@@ -8832,7 +8859,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
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))))
break;
else
{
@@ -8921,9 +8948,9 @@ expand_builtin (exp, target, subtarget, mode, ignore)
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)
+ || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist)))))
break;
else
{
@@ -8945,10 +8972,9 @@ expand_builtin (exp, target, subtarget, mode, ignore)
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)
+ || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist))))
|| TREE_CHAIN (TREE_CHAIN (arglist)) == 0
|| (TREE_CODE (TREE_TYPE (TREE_VALUE
(TREE_CHAIN (TREE_CHAIN (arglist)))))
@@ -9020,7 +9046,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
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))))
!= INTEGER_TYPE)
@@ -9093,9 +9119,9 @@ expand_builtin (exp, target, subtarget, mode, ignore)
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)
+ || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist)))))
break;
else if (!HAVE_cmpstrsi)
break;
@@ -9150,9 +9176,9 @@ expand_builtin (exp, target, subtarget, mode, ignore)
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
+ || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (TREE_CHAIN (arglist))))
|| TREE_CHAIN (TREE_CHAIN (arglist)) == 0
|| TREE_CODE (TREE_TYPE (TREE_VALUE (TREE_CHAIN (TREE_CHAIN (arglist))))) != INTEGER_TYPE)
break;
@@ -9218,7 +9244,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
case BUILT_IN_SETJMP:
if (arglist == 0
- || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE)
+ || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist))))
break;
{
@@ -9232,7 +9258,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
function but works with __builtin_setjmp above. */
case BUILT_IN_LONGJMP:
if (arglist == 0 || TREE_CHAIN (arglist) == 0
- || TREE_CODE (TREE_TYPE (TREE_VALUE (arglist))) != POINTER_TYPE)
+ || ! POINTER_TYPE_P (TREE_TYPE (TREE_VALUE (arglist))))
break;
{
@@ -9276,6 +9302,7 @@ expand_builtin (exp, target, subtarget, mode, ignore)
const0_rtx, VOIDmode, 0);
assemble_external (dummy_decl);
+ TREE_USED (dummy_decl) = 1;
/* Pick up FP, label, and SP from the block and jump. This code is
from expand_goto in stmt.c; see there for detailed comments. */
@@ -10874,7 +10901,7 @@ compare (exp, signed_code, unsigned_code)
/* If function pointers need to be "canonicalized" before they can
be reliably compared, then canonicalize them. */
if (HAVE_canonicalize_funcptr_for_compare
- && TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == POINTER_TYPE
+ && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 0)))
&& (TREE_CODE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0))))
== FUNCTION_TYPE))
{
@@ -10885,7 +10912,7 @@ compare (exp, signed_code, unsigned_code)
}
if (HAVE_canonicalize_funcptr_for_compare
- && TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 1))) == POINTER_TYPE
+ && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 1)))
&& (TREE_CODE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 1))))
== FUNCTION_TYPE))
{
@@ -11034,10 +11061,10 @@ do_store_flag (exp, target, mode, only_cheap)
when function pointers must be canonicalized before comparisons. */
#ifdef HAVE_canonicalize_funcptr_for_compare
if (HAVE_canonicalize_funcptr_for_compare
- && ((TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == POINTER_TYPE
+ && ((POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 0)))
&& (TREE_CODE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0))))
== FUNCTION_TYPE))
- || (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 1))) == POINTER_TYPE
+ || (POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (exp, 1)))
&& (TREE_CODE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 1))))
== FUNCTION_TYPE))))
return 0;
@@ -11136,7 +11163,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);
@@ -11186,7 +11213,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/gnu/usr.bin/gcc/expr.h b/gnu/usr.bin/gcc/expr.h
index 8fafea2fef3..b7c99111543 100644
--- a/gnu/usr.bin/gcc/expr.h
+++ b/gnu/usr.bin/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
@@ -416,7 +416,6 @@ extern rtx sjpopnthrow_libfunc;
extern rtx terminate_libfunc;
extern rtx setjmp_libfunc;
extern rtx longjmp_libfunc;
-extern rtx get_dynamic_handler_chain_libfunc;
extern rtx eqhf2_libfunc;
extern rtx nehf2_libfunc;
diff --git a/gnu/usr.bin/gcc/extend.texi b/gnu/usr.bin/gcc/extend.texi
index 297bc32a0a0..b9542a772e6 100644
--- a/gnu/usr.bin/gcc/extend.texi
+++ b/gnu/usr.bin/gcc/extend.texi
@@ -2019,8 +2019,8 @@ This attribute specifies a minimum alignment (in bytes) for variables
of the specified type. For example, the declarations:
@smallexample
-struct S @{ short f[3]; @} __attribute__ ((aligned (8));
-typedef int more_aligned_int __attribute__ ((aligned (8));
+struct S @{ short f[3]; @} __attribute__ ((aligned (8)));
+typedef int more_aligned_int __attribute__ ((aligned (8)));
@end smallexample
@noindent
@@ -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/gnu/usr.bin/gcc/fixincludes b/gnu/usr.bin/gcc/fixincludes
index 306945051c1..42aca5e914c 100644
--- a/gnu/usr.bin/gcc/fixincludes
+++ b/gnu/usr.bin/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
@@ -1855,6 +1860,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
@@ -1904,6 +1910,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
@@ -2880,7 +2887,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/gnu/usr.bin/gcc/fold-const.c b/gnu/usr.bin/gcc/fold-const.c
index 75290dea448..3feee8ad3d2 100644
--- a/gnu/usr.bin/gcc/fold-const.c
+++ b/gnu/usr.bin/gcc/fold-const.c
@@ -1,5 +1,5 @@
/* Fold a constant sub-tree into a single node for C-compiler
- Copyright (C) 1987, 88, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -175,7 +175,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));
@@ -1493,7 +1493,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)
{
@@ -1513,12 +1513,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);
}
@@ -5028,7 +5028,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)))
{
@@ -5063,7 +5063,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)))
{
@@ -5257,7 +5257,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))
@@ -5292,7 +5292,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/gnu/usr.bin/gcc/function.c b/gnu/usr.bin/gcc/function.c
index 05332fe1dae..17b70e554d4 100644
--- a/gnu/usr.bin/gcc/function.c
+++ b/gnu/usr.bin/gcc/function.c
@@ -355,7 +355,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. */
@@ -368,10 +368,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. */
@@ -381,6 +381,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;
/* The FUNCTION_DECL node for the current function. */
static tree this_function_decl;
@@ -424,7 +428,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));
@@ -464,9 +468,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 ();
}
@@ -529,6 +535,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;
@@ -536,13 +544,13 @@ push_function_context_to (context)
save_tree_status (p, context);
save_storage_status (p);
save_emit_status (p);
- init_emit ();
save_expr_status (p);
save_stmt_status (p);
save_varasm_status (p, context);
-
if (save_machine_status)
(*save_machine_status) (p);
+
+ init_emit ();
}
void
@@ -559,6 +567,7 @@ pop_function_context_from (context)
tree context;
{
struct function *p = outer_function_chain;
+ struct var_refs_queue *queue;
outer_function_chain = p->next;
@@ -609,6 +618,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;
@@ -625,11 +636,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);
@@ -672,7 +680,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;
@@ -741,7 +749,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;
{
@@ -809,13 +817,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;
@@ -848,7 +858,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)
{
@@ -879,11 +889,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
@@ -896,6 +909,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;
@@ -918,6 +932,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;
@@ -950,7 +969,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
@@ -986,12 +1005,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)
{
@@ -1031,9 +1057,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. */
@@ -1049,6 +1072,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
@@ -1068,7 +1092,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)
@@ -1271,6 +1295,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. */
@@ -1296,6 +1331,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;
}
@@ -1352,6 +1388,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
@@ -1377,7 +1414,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)
{
@@ -1388,14 +1427,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. */
@@ -1425,17 +1468,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;
@@ -1471,7 +1516,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;
@@ -1490,7 +1536,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));
}
@@ -1879,8 +1925,8 @@ 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 width = INTVAL (XEXP (x, 1));
- int pos = INTVAL (XEXP (x, 2));
+ HOST_WIDE_INT width = INTVAL (XEXP (x, 1));
+ HOST_WIDE_INT pos = INTVAL (XEXP (x, 2));
#ifdef HAVE_extzv
if (GET_CODE (x) == ZERO_EXTRACT)
@@ -1894,7 +1940,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;
@@ -2078,13 +2124,13 @@ 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 width = INTVAL (XEXP (outerdest, 1));
- int pos = INTVAL (XEXP (outerdest, 2));
+ HOST_WIDE_INT width = INTVAL (XEXP (outerdest, 1));
+ 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;
@@ -2489,7 +2535,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. */
@@ -2656,7 +2702,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;
}
@@ -2688,7 +2736,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
@@ -2739,9 +2788,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)
{
@@ -2865,7 +2921,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
@@ -2995,7 +3052,7 @@ instantiate_virtual_regs_1 (loc, object, extra_insns)
rtx x;
RTX_CODE code;
rtx new = 0;
- int offset;
+ HOST_WIDE_INT offset;
rtx temp;
rtx seq;
int i, j;
@@ -3663,10 +3720,18 @@ assign_parms (fndecl, second_time)
tree nominal_type = TREE_TYPE (parm);
/* Set LAST_NAMED if this is last named arg before some
- anonymous args. We treat it as if it were anonymous too. */
+ anonymous args. */
int last_named = ((TREE_CHAIN (parm) == 0
|| DECL_NAME (TREE_CHAIN (parm)) == 0)
&& (stdarg || current_function_varargs));
+ /* 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 (TREE_TYPE (parm) == error_mark_node
/* This can happen after weird syntax errors
@@ -3715,7 +3780,7 @@ assign_parms (fndecl, second_time)
|| TREE_ADDRESSABLE (passed_type)
#ifdef FUNCTION_ARG_PASS_BY_REFERENCE
|| FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, passed_mode,
- passed_type, ! last_named)
+ passed_type, named_arg)
#endif
)
{
@@ -3735,10 +3800,10 @@ assign_parms (fndecl, second_time)
0 means it arrives on the stack. */
#ifdef FUNCTION_INCOMING_ARG
entry_parm = FUNCTION_INCOMING_ARG (args_so_far, promoted_mode,
- passed_type, ! last_named);
+ passed_type, named_arg);
#else
entry_parm = FUNCTION_ARG (args_so_far, promoted_mode,
- passed_type, ! last_named);
+ passed_type, named_arg);
#endif
if (entry_parm == 0)
@@ -3784,12 +3849,12 @@ assign_parms (fndecl, second_time)
#ifdef FUNCTION_INCOMING_ARG
FUNCTION_INCOMING_ARG (args_so_far, promoted_mode,
passed_type,
- (! last_named
+ (named_arg
|| varargs_setup)) != 0,
#else
FUNCTION_ARG (args_so_far, promoted_mode,
passed_type,
- ! last_named || varargs_setup) != 0,
+ named_arg || varargs_setup) != 0,
#endif
#endif
fndecl, &stack_args_size, &stack_offset, &arg_size);
@@ -3829,7 +3894,7 @@ assign_parms (fndecl, second_time)
if (entry_parm)
{
int nregs = FUNCTION_ARG_PARTIAL_NREGS (args_so_far, promoted_mode,
- passed_type, ! last_named);
+ passed_type, named_arg);
if (nregs > 0)
{
@@ -3894,7 +3959,7 @@ assign_parms (fndecl, second_time)
/* Update info on where next arg arrives in registers. */
FUNCTION_ARG_ADVANCE (args_so_far, promoted_mode,
- passed_type, ! last_named);
+ passed_type, named_arg);
/* If this is our second time through, we are done with this parm. */
if (second_time)
@@ -4148,7 +4213,7 @@ assign_parms (fndecl, second_time)
&& FUNCTION_ARG_CALLEE_COPIES (args_so_far,
TYPE_MODE (DECL_ARG_TYPE (parm)),
DECL_ARG_TYPE (parm),
- ! last_named)
+ named_arg)
&& ! TREE_ADDRESSABLE (DECL_ARG_TYPE (parm)))
{
rtx copy;
@@ -4284,7 +4349,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));
@@ -4333,9 +4398,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,
@@ -4818,7 +4881,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/gnu/usr.bin/gcc/function.h b/gnu/usr.bin/gcc/function.h
index d1a5b3115b0..5849e3e25f0 100644
--- a/gnu/usr.bin/gcc/function.h
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/gansidecl.h b/gnu/usr.bin/gcc/gansidecl.h
index c6348e8db02..d4a8e38865a 100644
--- a/gnu/usr.bin/gcc/gansidecl.h
+++ b/gnu/usr.bin/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,11 @@ 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 HAVE_BCOPY
#define bcopy(src,dst,len) memcpy ((dst),(src),(len))
#endif
@@ -97,4 +102,6 @@ Boston, MA 02111-1307, USA. */
#define index strchr
#endif
+#endif /* IN_LIBGCC2 */
+
#endif /* ANSIDECL_H */
diff --git a/gnu/usr.bin/gcc/gbl-ctors.h b/gnu/usr.bin/gcc/gbl-ctors.h
index 6393a9045ab..50e0e567636 100644
--- a/gnu/usr.bin/gcc/gbl-ctors.h
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/gcc.1 b/gnu/usr.bin/gcc/gcc.1
index 093e61ae81d..d2b5b21576c 100644
--- a/gnu/usr.bin/gcc/gcc.1
+++ b/gnu/usr.bin/gcc/gcc.1
@@ -20,7 +20,7 @@
.if n .sp
.if t .sp 0.4
..
-.Id $OpenBSD: gcc.1,v 1.4 1998/03/07 19:33:12 millert Exp $
+.Id $OpenBSD: gcc.1,v 1.5 1998/03/08 18:27:38 millert Exp $
.TH GCC 1 "\*(Dt" "GNU Tools" "GNU Tools"
.SH NAME
gcc, g++ \- GNU project C and C++ Compiler (v2.7)
@@ -182,7 +182,7 @@ in the following sections.
\-Waggregate\-return
\-Wcast\-align
\-Wcast\-qual
-\-Wchar\-subscripts
+\-Wchar\-subscript
\-Wcomment
\-Wconversion
\-Wenum\-clash
@@ -1870,11 +1870,9 @@ fully available (C++ only).
.B \-Wall
All of the above `\|\c
.B \-W\c
-\&\|' options, with the exception of
-.B \-Wchar\-subscripts,
-combined. These are all the options which pertain to usage that
-we recommend avoiding and that we believe is easy to avoid, even
-in conjunction with macros.
+\&\|' options combined. These are all the
+options which pertain to usage that we recommend avoiding and that we
+believe is easy to avoid, even in conjunction with macros.
.PP
The remaining `\|\c
.B \-W.\|.\|.\c
diff --git a/gnu/usr.bin/gcc/gcc.c b/gnu/usr.bin/gcc/gcc.c
index e57f5dccfb2..c548d7fdb62 100644
--- a/gnu/usr.bin/gcc/gcc.c
+++ b/gnu/usr.bin/gcc/gcc.c
@@ -1,5 +1,5 @@
/* Compiler driver program that can handle many languages.
- Copyright (C) 1987, 89, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 89, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -266,6 +266,7 @@ static void print_multilib_info PROTO((void));
static void pfatal_with_name PROTO((char *));
static void perror_with_name PROTO((char *));
static void pfatal_pexecute PROTO((char *, char *));
+static void snapshot_warning PROTO((void));
#ifdef HAVE_VPRINTF
static void fatal PVPROTO((char *, ...));
static void error PVPROTO((char *, ...));
@@ -2532,7 +2533,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"))
@@ -2749,6 +2750,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':
@@ -2904,23 +2935,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)
@@ -4353,6 +4384,10 @@ main (argc, argv)
signal (SIGPIPE, fatal_error);
#endif
+ /* If this is a test release of GCC, issue a warning. */
+ if (version_string[0] == 't' && version_string[1] == 'e')
+ snapshot_warning ();
+
argbuf_length = 10;
argbuf = (char **) xmalloc (argbuf_length * sizeof (char *));
@@ -4486,7 +4521,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
@@ -4782,7 +4825,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)
@@ -4792,19 +4835,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. */
@@ -4812,23 +4855,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.
@@ -4840,6 +4884,7 @@ lookup_compiler (name, length, language)
(char *) new->spec, sizeof new->spec);
return new;
}
+
/* A non-alias entry: return it. */
return cp;
}
@@ -4954,6 +4999,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. */
@@ -4962,7 +5009,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.
@@ -5494,3 +5541,61 @@ print_multilib_info ()
++p;
}
}
+
+/* If a snapshot, warn the user that this version of gcc is for testing and
+ developing only. If we can find a home directory, we can restrict the
+ warning to once per day. Otherwise always issue it. */
+
+#define TIMESTAMP_FILE ".gcc-test-time"
+#define ONE_DAY (24*60*60)
+
+static void
+snapshot_warning ()
+{
+ char *home;
+ int print_p = 1;
+
+ /* Every function here but `time' is called elsewhere in this file,
+ but we only can be sure we have it for Unix and the Windows systems,
+ so conditionalize this on those.
+
+ ??? This should use autoconf at some point. */
+
+#if defined(unix) || defined(__CYGWIN32__) || defined(_MINGW32__)
+
+ home = getenv ("HOME");
+ if (home != 0)
+ {
+ char *file_name
+ = (char *) alloca (strlen (home) + 1 + sizeof (TIMESTAMP_FILE));
+ struct stat statbuf;
+ time_t now = time (NULL);
+ int s;
+
+ sprintf (file_name, "%s/%s", home, TIMESTAMP_FILE);
+ s = stat (file_name, &statbuf);
+ if (s == 0
+ && (statbuf.st_mtime + ONE_DAY > now))
+ print_p = 0;
+ else
+ {
+ FILE *f = fopen (file_name, "w");
+
+ if (f != 0)
+ {
+ fputc ('\n', f);
+ fclose (f);
+ }
+ }
+ }
+#endif
+
+ if (print_p)
+ {
+ fprintf (stderr, "*** This is a development snapshot of GCC.\n");
+ fprintf (stderr,
+ "*** It is not a reliable release, and the GCC developers\n");
+ fprintf (stderr,
+ "*** warn you not to use it for anything except to test it.\n");
+ }
+}
diff --git a/gnu/usr.bin/gcc/gcc.hlp b/gnu/usr.bin/gcc/gcc.hlp
index 7ba1264a234..26e22faba29 100644
--- a/gnu/usr.bin/gcc/gcc.hlp
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/gcc.texi b/gnu/usr.bin/gcc/gcc.texi
index c8e3db21097..d70c803af3a 100644
--- a/gnu/usr.bin/gcc/gcc.texi
+++ b/gnu/usr.bin/gcc/gcc.texi
@@ -144,16 +144,16 @@ original English.
@sp 2
@center Richard M. Stallman
@sp 3
-@center Last updated 7 January 1998
+@center Last updated 28 February 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 version 2.8.0
+@center for version 2.8.1
@page
@vskip 0pt plus 1filll
Copyright @copyright{} 1988, 89, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
@sp 2
-For GCC Version 2.8.0@*
+For GCC Version 2.8.1@*
@sp 1
Published by the Free Software Foundation @*
59 Temple Place - Suite 330@*
@@ -194,19 +194,19 @@ original English.
@ifset USING
This manual documents how to run, install and port the GNU
compiler, as well as its new features and incompatibilities, and how to
-report bugs. It corresponds to GNU CC version 2.8.0.
+report bugs. It corresponds to GNU CC version 2.8.1.
@end ifset
@end ifset
@ifclear INTERNALS
This manual documents how to run and install the GNU compiler,
as well as its new features and incompatibilities, and how to report
-bugs. It corresponds to GNU CC version 2.8.0.
+bugs. It corresponds to GNU CC version 2.8.1.
@end ifclear
@ifclear USING
This manual documents how to port the GNU compiler,
as well as its new features and incompatibilities, and how to report
-bugs. It corresponds to GNU CC version 2.7.1.
+bugs. It corresponds to GNU CC version 2.8.1.
@end ifclear
@end ifinfo
@@ -1122,7 +1122,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}
diff --git a/gnu/usr.bin/gcc/genattrtab.c b/gnu/usr.bin/gcc/genattrtab.c
index c16a6acb9b3..c29f3703aba 100644
--- a/gnu/usr.bin/gcc/genattrtab.c
+++ b/gnu/usr.bin/gcc/genattrtab.c
@@ -1,5 +1,5 @@
/* Generate code from machine description to compute values of attributes.
- 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 Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
This file is part of GNU CC.
@@ -348,6 +348,11 @@ static rtx true_rtx, false_rtx;
static char *alternative_name;
+/* Indicate that REG_DEAD notes are valid if dead_or_set_p is ever
+ called. */
+
+int reload_completed = 0;
+
/* Simplify an expression. Only call the routine if there is something to
simplify. */
#define SIMPLIFY_TEST_EXP(EXP,INSN_CODE,INSN_INDEX) \
@@ -367,7 +372,7 @@ static char *alternative_name;
They won't actually be used. */
rtx frame_pointer_rtx, hard_frame_pointer_rtx, stack_pointer_rtx;
-rtx arg_pointer_rtx;
+rtx arg_pointer_rtx, pic_offset_table_rtx;
static rtx attr_rtx PVPROTO((enum rtx_code, ...));
#ifdef HAVE_VPRINTF
diff --git a/gnu/usr.bin/gcc/install.texi b/gnu/usr.bin/gcc/install.texi
index f9e2b8d8d16..9013d8894e1 100644
--- a/gnu/usr.bin/gcc/install.texi
+++ b/gnu/usr.bin/gcc/install.texi
@@ -64,8 +64,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:
@@ -494,11 +494,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
@@ -529,7 +529,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
@@ -843,9 +849,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
@@ -960,17 +967,11 @@ Use this configuration for SCO release 3.2 version 4.
Use this for the SCO OpenServer Release family including 5.0.0, 5.0.2,
5.0.4, Internet FastStart 1.0, and Internet FastStart 1.1.
-GNU CC can generate ELF binaries (if you specify @samp{-melf}) or COFF
-binaries (the default). If you are going to build your compiler in ELF
-mode (once you have bootstrapped the first stage compiler) you
-@strong{must} specify @samp{-melf} as part of @code{CC},
-@emph{not} @code{CFLAGS}, for example as
-@samp{CC="stage1/xgcc -melf -Bstage1/" }. If you do not do this, the
-bootstrap will generate incorrect versions of @file{libgcc.a}.
-
-You must have TLS597 (from ftp.sco.com/TLS) installed for ELF
-binaries to work correctly. Note that Open Server 5.0.2 @emph{does}
-need TLS597 installed.
+GNU CC can generate either ELF or COFF binaries. ELF is the default.
+To get COFF output, you must specify @samp{-mcoff} on the command line.
+
+For 5.0.0 and 5.0.2, you must install TLS597 from ftp.sco.com/TLS.
+5.0.4 and later do not require this patch.
@emph{NOTE:} You must follow the instructions about invoking
@samp{make bootstrap} because the native OpenServer compiler builds
@@ -1086,7 +1087,7 @@ This configuration is intended for embedded systems.
@item m68000-hp-bsd
HP 9000 series 200 running BSD. Note that the C compiler that comes
-with this system cannot compile GNU CC; contact @code{law@@cs.utah.edu}
+with this system cannot compile GNU CC; contact @code{law@@cygnus.com}
to get binaries of GNU CC for bootstrapping.
@item m68k-altos
@@ -1396,12 +1397,14 @@ stage3 object files, and errors when compiling @file{libgcc.a} or
xlc-1.3.0.0 (distributed with AIX 3.2.5), and xlc-1.3.0.19. Both
xlc-1.2.1.28 and xlc-1.3.0.24 (PTF 432238) are known to produce working
versions of GNU CC, but most other recent releases correctly bootstrap
-GNU CC. Also, releases of AIX prior to AIX 3.2.4 include a version of
+GNU CC.
+
+Release 4.3.0 of AIX and ones prior to AIX 3.2.4 include a version of
the IBM assembler which does not accept debugging directives: assembler
updates are available as PTFs. Also, if you are using AIX 3.2.5 or
greater and the GNU assembler, you must have a version modified after
October 16th, 1995 in order for the GNU C compiler to build. See the
-file @file{README.RS6000} for more details on of these problems.
+file @file{README.RS6000} for more details on any of these problems.
GNU CC does not yet support the 64-bit PowerPC instructions.
@@ -1953,9 +1956,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/gnu/usr.bin/gcc/integrate.c b/gnu/usr.bin/gcc/integrate.c
index 0400085f61f..026de8979a2 100644
--- a/gnu/usr.bin/gcc/integrate.c
+++ b/gnu/usr.bin/gcc/integrate.c
@@ -1,5 +1,5 @@
/* Procedure integration for GNU CC.
- Copyright (C) 1988, 91, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1988, 91, 93-97, 1998 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -77,6 +77,24 @@ 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, 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;
+ int i;
+{
+ rtx x = map->label_map[i];
+
+ if (x == NULL_RTX)
+ x = map->label_map[i] = gen_label_rtx();
+
+ 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
@@ -93,9 +111,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";
@@ -275,6 +291,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
@@ -297,7 +314,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;
}
@@ -319,6 +337,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. */
@@ -1387,7 +1422,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));
@@ -1754,9 +1789,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] = gen_label_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 ();
@@ -1949,7 +1985,8 @@ expand_inline_function (fndecl, parms, target, ignore, type,
break;
case CODE_LABEL:
- copy = emit_label (map->label_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;
@@ -1968,11 +2005,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 = map->label_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. */
@@ -2387,14 +2427,15 @@ copy_rtx_and_substitute (orig, map)
return gen_rtx (code, VOIDmode, copy);
case CODE_LABEL:
- LABEL_PRESERVE_P (map->label_map[CODE_LABEL_NUMBER (orig)])
+ LABEL_PRESERVE_P (get_label_from_map (map, CODE_LABEL_NUMBER (orig)))
= LABEL_PRESERVE_P (orig);
- return map->label_map[CODE_LABEL_NUMBER (orig)];
+ return get_label_from_map (map, CODE_LABEL_NUMBER (orig));
case LABEL_REF:
copy = gen_rtx (LABEL_REF, mode,
LABEL_REF_NONLOCAL_P (orig) ? XEXP (orig, 0)
- : map->label_map[CODE_LABEL_NUMBER (XEXP (orig, 0))]);
+ : get_label_from_map (map,
+ CODE_LABEL_NUMBER (XEXP (orig, 0))));
LABEL_OUTSIDE_LOOP_P (copy) = LABEL_OUTSIDE_LOOP_P (orig);
/* The fact that this label was previously nonlocal does not mean
diff --git a/gnu/usr.bin/gcc/integrate.h b/gnu/usr.bin/gcc/integrate.h
index b2acf5e5c1d..23e2e561d94 100644
--- a/gnu/usr.bin/gcc/integrate.h
+++ b/gnu/usr.bin/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.
@@ -122,6 +122,12 @@ extern void try_constants PROTO((rtx, struct inline_remap *));
extern void mark_stores PROTO((rtx, rtx));
+/* Return the label indicated. */
+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))
+
/* Unfortunately, we need a global copy of const_equiv map for communication
with a function called from note_stores. Be *very* careful that this
is used properly in the presence of recursion. */
diff --git a/gnu/usr.bin/gcc/invoke.texi b/gnu/usr.bin/gcc/invoke.texi
index 76f4c91c8e2..bf1040e4df2 100644
--- a/gnu/usr.bin/gcc/invoke.texi
+++ b/gnu/usr.bin/gcc/invoke.texi
@@ -545,8 +545,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
@@ -994,7 +994,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.
@@ -1112,7 +1112,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
@@ -5029,7 +5029,6 @@ CIX, and MAX instruction sets. The default is to use the instruction sets
supported by the CPU type specified via @samp{-mcpu=} option or that
of the CPU on which GNU CC was built if none was specified.
-@item -mcpu=@var{cpu type}
@item -mcpu=@var{cpu_type}
Set the instruction set, register set, and instruction scheduling
parameters for machine type @var{cpu_type}. You can specify either the
diff --git a/gnu/usr.bin/gcc/libgcc2.c b/gnu/usr.bin/gcc/libgcc2.c
index 001ee1c6c04..dcf4cb98f93 100644
--- a/gnu/usr.bin/gcc/libgcc2.c
+++ b/gnu/usr.bin/gcc/libgcc2.c
@@ -1,6 +1,6 @@
/* More subroutines needed by GCC output code on some machines. */
/* Compile this one with gcc. */
-/* 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.
@@ -933,17 +933,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
@@ -956,17 +952,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
@@ -979,17 +971,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
@@ -1034,10 +1022,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,
@@ -1049,18 +1033,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
@@ -2873,7 +2858,10 @@ __enable_execute_stack ()
/* Motorola forgot to put memctl.o in the libp version of libc881.a,
so define it here, because we need it in __clear_insn_cache below */
+/* On older versions of this OS, no memctl or MCT_TEXT are defined;
+ hence we enable this stuff only if MCT_TEXT is #define'd. */
+#ifdef MCT_TEXT
asm("\n\
global memctl\n\
memctl:\n\
@@ -2884,6 +2872,7 @@ memctl:\n\
noerror:\n\
movq &0,%d0\n\
rts");
+#endif
/* Clear instruction cache so we can call trampolines on stack.
This is called from FINALIZE_TRAMPOLINE in mot3300.h. */
@@ -2891,6 +2880,7 @@ noerror:\n\
void
__clear_insn_cache ()
{
+#ifdef MCT_TEXT
int save_errno;
/* Preserve errno, because users would be surprised to have
@@ -2901,6 +2891,7 @@ __clear_insn_cache ()
No need to use an address derived from _start or %sp, as 0 works also. */
memctl(0, 4096, MCT_TEXT);
errno = save_errno;
+#endif
}
#endif /* __sysV68__ */
diff --git a/gnu/usr.bin/gcc/loop.c b/gnu/usr.bin/gcc/loop.c
index b4bfa96f9d8..3b401538674 100644
--- a/gnu/usr.bin/gcc/loop.c
+++ b/gnu/usr.bin/gcc/loop.c
@@ -1,5 +1,5 @@
/* Perform various loop optimizations, including strength reduction.
- Copyright (C) 1987, 88, 89, 91-6, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 91-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -3998,8 +3998,14 @@ strength_reduce (scan_start, end, loop_top, insn_count,
auto_inc_opt = 1;
}
/* Check for case where increment is before the the address
- giv. */
- else if (INSN_LUID (v->insn) > INSN_LUID (bl->biv->insn))
+ giv. Do this test in "loop order". */
+ else if ((INSN_LUID (v->insn) > INSN_LUID (bl->biv->insn)
+ && (INSN_LUID (v->insn) < INSN_LUID (scan_start)
+ || (INSN_LUID (bl->biv->insn)
+ > INSN_LUID (scan_start))))
+ || (INSN_LUID (v->insn) < INSN_LUID (scan_start)
+ && (INSN_LUID (scan_start)
+ < INSN_LUID (bl->biv->insn))))
auto_inc_opt = -1;
else
auto_inc_opt = 1;
diff --git a/gnu/usr.bin/gcc/md.texi b/gnu/usr.bin/gcc/md.texi
index e74a8e259d3..908c6887a85 100644
--- a/gnu/usr.bin/gcc/md.texi
+++ b/gnu/usr.bin/gcc/md.texi
@@ -1669,7 +1669,7 @@ now in existence use constraints.
Here is a table of the instruction names that are meaningful in the RTL
generation pass of the compiler. Giving one of these names to an
instruction pattern tells the RTL generation pass that it can use the
-pattern in to accomplish a certain task.
+pattern to accomplish a certain task.
@table @asis
@cindex @code{mov@var{m}} instruction pattern
@@ -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
@@ -1963,7 +1970,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/gnu/usr.bin/gcc/mips-tfile.c b/gnu/usr.bin/gcc/mips-tfile.c
index 39f3bc61f1f..9f12c388727 100644
--- a/gnu/usr.bin/gcc/mips-tfile.c
+++ b/gnu/usr.bin/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.
@@ -1755,10 +1755,14 @@ STATIC void free_thead __proto((thead_t *));
STATIC char *local_index __proto((const char *, int));
STATIC char *local_rindex __proto((const char *, int));
-#ifndef __alpha
+#ifdef NEED_DECLARTION_SBRK
extern char *sbrk __proto((int));
+#endif
+
+#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/gnu/usr.bin/gcc/objc/Make-lang.in b/gnu/usr.bin/gcc/objc/Make-lang.in
index 97119a78cf8..00169d0f0a9 100644
--- a/gnu/usr.bin/gcc/objc/Make-lang.in
+++ b/gnu/usr.bin/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.
@@ -127,7 +127,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)
@@ -204,10 +204,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:
@@ -274,19 +274,19 @@ objc.maintainer-clean:
#
# Stage hooks:
-objc.stage1:
+objc.stage1: stage1-start
-mv objc/*$(objext) stage1/objc
-mv cc1obj$(exeext) stage1
-mv libobjc.a stage1
-objc.stage2:
+objc.stage2: stage2-start
-mv objc/*$(objext) stage2/objc
-mv cc1obj$(exeext) stage2
-mv libobjc.a stage2
-objc.stage3:
+objc.stage3: stage3-start
-mv objc/*$(objext) stage3/objc
-mv cc1obj$(exeext) stage3
-mv libobjc.a stage3
-objc.stage4:
+objc.stage4: stage4-start
-mv objc/*$(objext) stage4/objc
-mv cc1obj$(exeext) stage4
-mv libobjc.a stage4
@@ -296,9 +296,11 @@ objc.stage4:
# 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/gnu/usr.bin/gcc/objc/config-lang.in b/gnu/usr.bin/gcc/objc/config-lang.in
index 736ba73b4ec..6c9b2032083 100644
--- a/gnu/usr.bin/gcc/objc/config-lang.in
+++ b/gnu/usr.bin/gcc/objc/config-lang.in
@@ -1,5 +1,5 @@
# Top level configure fragment for the GNU Objective-C Runtime Library.
-# Copyright (C) 1997 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998 Free Software Foundation, Inc.
#This file is part of GNU CC.
@@ -32,6 +32,6 @@ compilers="cc1obj\$(exeext)"
stagestuff=""
-diff_excludes=""
+diff_excludes="-x objc-parse.c -x objc-parse.y "
echo "Using \`$srcdir/objc/thr-${thread_file}.c' as Objective-C Runtime thread file."
diff --git a/gnu/usr.bin/gcc/obstack.h b/gnu/usr.bin/gcc/obstack.h
index 3edd3f4285e..c056f11f806 100644
--- a/gnu/usr.bin/gcc/obstack.h
+++ b/gnu/usr.bin/gcc/obstack.h
@@ -1,5 +1,5 @@
/* 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.
@@ -118,45 +118,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 +169,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 +193,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 +210,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 +258,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 +287,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 +344,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 +375,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 +390,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 +401,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 +413,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 +421,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 +429,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 +441,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 +461,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 +477,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 +487,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 +502,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 +522,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 +569,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/gnu/usr.bin/gcc/optabs.c b/gnu/usr.bin/gcc/optabs.c
index 55c092f9532..0c9a023cfc4 100644
--- a/gnu/usr.bin/gcc/optabs.c
+++ b/gnu/usr.bin/gcc/optabs.c
@@ -1,5 +1,5 @@
/* Expand the basic unary and binary arithmetic operations, for GNU compiler.
- Copyright (C) 1987, 88, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -125,7 +125,6 @@ rtx sjpopnthrow_libfunc;
rtx terminate_libfunc;
rtx setjmp_libfunc;
rtx longjmp_libfunc;
-rtx get_dynamic_handler_chain_libfunc;
rtx eqhf2_libfunc;
rtx nehf2_libfunc;
@@ -3182,15 +3181,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);
}
@@ -4306,7 +4304,6 @@ init_optabs ()
setjmp_libfunc = gen_rtx (SYMBOL_REF, Pmode, "setjmp");
longjmp_libfunc = gen_rtx (SYMBOL_REF, Pmode, "longjmp");
#endif
- get_dynamic_handler_chain_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__get_dynamic_handler_chain");
eqhf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__eqhf2");
nehf2_libfunc = gen_rtx (SYMBOL_REF, Pmode, "__nehf2");
diff --git a/gnu/usr.bin/gcc/prefix.c b/gnu/usr.bin/gcc/prefix.c
index bf501c74391..aa6cf51ed18 100644
--- a/gnu/usr.bin/gcc/prefix.c
+++ b/gnu/usr.bin/gcc/prefix.c
@@ -1,5 +1,5 @@
/* Utility to update paths from internal to external forms.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -102,9 +102,6 @@ get_key_value (key)
if (prefix == 0)
prefix = getenv (concat (key, "_ROOT", NULL_PTR));
- if (prefix == 0)
- prefix = PREFIX;
-
return prefix;
}
@@ -235,7 +232,7 @@ translate_name (name)
char *name;
{
char code = name[0];
- char *key, *prefix;
+ char *key, *prefix = 0;
int keylen;
if (code != '@' && code != '$')
@@ -257,17 +254,12 @@ translate_name (name)
name = &name[keylen + 1];
if (code == '@')
- {
- prefix = get_key_value (key);
- if (prefix == 0)
- prefix = PREFIX;
- }
+ prefix = get_key_value (key);
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/gnu/usr.bin/gcc/profile.c b/gnu/usr.bin/gcc/profile.c
index e82cd79ee5b..e4b52c69380 100644
--- a/gnu/usr.bin/gcc/profile.c
+++ b/gnu/usr.bin/gcc/profile.c
@@ -1,5 +1,5 @@
/* Calculate branch probabilities, and basic block execution counts.
- Copyright (C) 1990, 91, 92, 93, 94, 96, 1997 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.
@@ -1633,7 +1633,8 @@ output_func_start_profiler ()
expand_function_end (input_filename, lineno, 0);
poplevel (1, 0, 1);
rest_of_compilation (fndecl);
- 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/gnu/usr.bin/gcc/protoize.c b/gnu/usr.bin/gcc/protoize.c
index 18f4ce528a1..34f8fe559af 100644
--- a/gnu/usr.bin/gcc/protoize.c
+++ b/gnu/usr.bin/gcc/protoize.c
@@ -1,5 +1,5 @@
/* Protoize program - Original version by Ron Guilmette (rfg@segfault.us.com).
- Copyright (C) 1989, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -117,7 +117,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)
@@ -199,9 +203,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 ();
@@ -831,12 +832,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;
@@ -1527,8 +1529,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;
}
}
@@ -2218,9 +2222,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;
}
@@ -2246,9 +2251,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;
}
@@ -2261,9 +2267,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;
}
@@ -2288,9 +2295,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;
}
@@ -2309,9 +2317,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;
}
@@ -2325,9 +2334,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;
@@ -2337,9 +2347,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;
@@ -2351,9 +2362,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
@@ -2417,9 +2431,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;
@@ -2493,17 +2508,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;
}
@@ -4200,8 +4217,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;
@@ -4234,9 +4253,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;
}
@@ -4246,10 +4266,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;
}
@@ -4280,9 +4301,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;
}
@@ -4377,7 +4399,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",
@@ -4391,7 +4414,7 @@ edit_file (hp)
pname,
shortpath (NULL, convert_filename),
shortpath (NULL, new_filename),
- my_strerror(errno));
+ my_strerror (errno_val));
return;
}
}
@@ -4399,8 +4422,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;
}
@@ -4411,9 +4436,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;
}
@@ -4438,8 +4464,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/gnu/usr.bin/gcc/reg-stack.c b/gnu/usr.bin/gcc/reg-stack.c
index aea3cdb93fd..bab0e309444 100644
--- a/gnu/usr.bin/gcc/reg-stack.c
+++ b/gnu/usr.bin/gcc/reg-stack.c
@@ -1,5 +1,5 @@
/* Register to Stack convert for GNU compiler.
- 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.
@@ -2000,11 +2000,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, src_note;
diff --git a/gnu/usr.bin/gcc/reload.c b/gnu/usr.bin/gcc/reload.c
index 1ae9dfd7f86..b0e90325949 100644
--- a/gnu/usr.bin/gcc/reload.c
+++ b/gnu/usr.bin/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-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.
@@ -3139,16 +3139,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
@@ -3160,9 +3150,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;
@@ -3182,6 +3173,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
@@ -3502,9 +3505,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]
@@ -3846,11 +3850,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
@@ -6189,12 +6190,14 @@ debug_reload ()
prefix = "\n\t";
if (reload_secondary_in_icode[r] != CODE_FOR_nothing)
{
- fprintf (stderr, "%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 (stderr, "%ssecondary_out_icode = %s", prefix, insn_name[r]);
+ fprintf (stderr, "%ssecondary_out_icode = %s", prefix,
+ insn_name[reload_secondary_out_icode[r]]);
fprintf (stderr, "\n");
}
diff --git a/gnu/usr.bin/gcc/reorg.c b/gnu/usr.bin/gcc/reorg.c
index 1e828325e8f..ba40f2440df 100644
--- a/gnu/usr.bin/gcc/reorg.c
+++ b/gnu/usr.bin/gcc/reorg.c
@@ -1,5 +1,5 @@
/* Perform instruction reorganizations for delay slot filling.
- 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.
Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu).
Hacked by Michael Tiemann (tiemann@cygnus.com).
@@ -266,7 +266,7 @@ static rtx next_insn_no_annul PROTO((rtx));
static void mark_target_live_regs PROTO((rtx, struct resources *));
static void fill_simple_delay_slots PROTO((rtx, int));
static rtx fill_slots_from_thread PROTO((rtx, rtx, rtx, rtx, int, int,
- int, int, int, int *));
+ int, int, int, int *, rtx));
static void fill_eager_delay_slots PROTO((rtx));
static void relax_delay_slots PROTO((rtx));
static void make_return_insns PROTO((rtx));
@@ -274,7 +274,7 @@ static int redirect_with_delay_slots_safe_p PROTO ((rtx, rtx, rtx));
static int redirect_with_delay_list_safe_p PROTO ((rtx, rtx, rtx));
/* Given X, some rtl, and RES, a pointer to a `struct resource', mark
- which resources are references by the insn. If INCLUDE_CALLED_ROUTINE
+ which resources are references by the insn. If INCLUDE_DELAYED_EFFECTS
is TRUE, resources used by the called routine will be included for
CALL_INSNs. */
@@ -487,9 +487,10 @@ mark_referenced_resources (x, res, include_delayed_effects)
}
}
-/* Given X, a part of an insn, and a pointer to a `struct resource', RES,
- indicate which resources are modified by the insn. If INCLUDE_CALLED_ROUTINE
- is nonzero, also mark resources potentially set by the called routine.
+/* Given X, a part of an insn, and a pointer to a `struct resource',
+ RES, indicate which resources are modified by the insn. If
+ INCLUDE_DELAYED_EFFECTS is nonzero, also mark resources potentially
+ set by the called routine.
If IN_DEST is nonzero, it means we are inside a SET. Otherwise,
objects are being referenced instead of set.
@@ -740,7 +741,7 @@ resource_conflicts_p (res1, res2)
}
/* Return TRUE if any resource marked in RES, a `struct resources', is
- referenced by INSN. If INCLUDE_CALLED_ROUTINE is set, return if the called
+ referenced by INSN. If INCLUDE_DELAYED_EFFECTS is set, return if the called
routine is using those resources.
We compute this by computing all the resources referenced by INSN and
@@ -762,7 +763,7 @@ insn_references_resource_p (insn, res, include_delayed_effects)
}
/* Return TRUE if INSN modifies resources that are marked in RES.
- INCLUDE_CALLED_ROUTINE is set if the actions of that routine should be
+ INCLUDE_DELAYED_EFFECTS is set if the actions of that routine should be
included. CC0 is only modified if it is explicitly set; see comments
in front of mark_set_resources for details. */
@@ -3322,7 +3323,8 @@ fill_simple_delay_slots (first, non_jumps_p)
NULL, 1, 1,
own_thread_p (JUMP_LABEL (insn),
JUMP_LABEL (insn), 0),
- 0, slots_to_fill, &slots_filled);
+ 0, slots_to_fill, &slots_filled,
+ delay_list);
if (delay_list)
unfilled_slots_base[i]
@@ -3452,7 +3454,7 @@ fill_simple_delay_slots (first, non_jumps_p)
static rtx
fill_slots_from_thread (insn, condition, thread, opposite_thread, likely,
thread_if_true, own_thread, own_opposite_thread,
- slots_to_fill, pslots_filled)
+ slots_to_fill, pslots_filled, delay_list)
rtx insn;
rtx condition;
rtx thread, opposite_thread;
@@ -3460,9 +3462,9 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely,
int thread_if_true;
int own_thread, own_opposite_thread;
int slots_to_fill, *pslots_filled;
+ rtx delay_list;
{
rtx new_thread;
- rtx delay_list = 0;
struct resources opposite_needed, set, needed;
rtx trial;
int lose = 0;
@@ -3479,7 +3481,7 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely,
/* If our thread is the end of subroutine, we can't get any delay
insns from that. */
if (thread == 0)
- return 0;
+ return delay_list;
/* If this is an unconditional branch, nothing is needed at the
opposite thread. Otherwise, compute what is needed there. */
@@ -3636,6 +3638,8 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely,
delay_list = add_to_delay_list (temp, delay_list);
+ mark_set_resources (trial, &opposite_needed, 0, 1);
+
if (slots_to_fill == ++(*pslots_filled))
{
/* Even though we have filled all the slots, we
@@ -3705,7 +3709,9 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely,
{
/* If this is the `true' thread, we will want to follow the jump,
so we can only do this if we have taken everything up to here. */
- if (thread_if_true && trial == new_thread)
+ if (thread_if_true && trial == new_thread
+ && ! insn_references_resource_p (XVECEXP (PATTERN (trial), 0, 0),
+ &opposite_needed, 0))
delay_list
= steal_delay_list_from_target (insn, condition, PATTERN (trial),
delay_list, &set, &needed,
@@ -3905,7 +3911,8 @@ fill_eager_delay_slots (first)
= fill_slots_from_thread (insn, condition, insn_at_target,
fallthrough_insn, prediction == 2, 1,
own_target, own_fallthrough,
- slots_to_fill, &slots_filled);
+ slots_to_fill, &slots_filled,
+ delay_list);
if (delay_list == 0 && own_fallthrough)
{
@@ -3920,7 +3927,8 @@ fill_eager_delay_slots (first)
= fill_slots_from_thread (insn, condition, fallthrough_insn,
insn_at_target, 0, 0,
own_fallthrough, own_target,
- slots_to_fill, &slots_filled);
+ slots_to_fill, &slots_filled,
+ delay_list);
}
}
else
@@ -3930,14 +3938,16 @@ fill_eager_delay_slots (first)
= fill_slots_from_thread (insn, condition, fallthrough_insn,
insn_at_target, 0, 0,
own_fallthrough, own_target,
- slots_to_fill, &slots_filled);
+ slots_to_fill, &slots_filled,
+ delay_list);
if (delay_list == 0)
delay_list
= fill_slots_from_thread (insn, condition, insn_at_target,
next_active_insn (insn), 0, 1,
own_target, own_fallthrough,
- slots_to_fill, &slots_filled);
+ slots_to_fill, &slots_filled,
+ delay_list);
}
if (delay_list)
diff --git a/gnu/usr.bin/gcc/rtl.h b/gnu/usr.bin/gcc/rtl.h
index f0484045004..f5078a52f13 100644
--- a/gnu/usr.bin/gcc/rtl.h
+++ b/gnu/usr.bin/gcc/rtl.h
@@ -1,5 +1,5 @@
/* Register Transfer Language (RTL) definitions for GNU C-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.
@@ -733,10 +733,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/gnu/usr.bin/gcc/rtl.texi b/gnu/usr.bin/gcc/rtl.texi
index b815e12d365..f60ec74b5a0 100644
--- a/gnu/usr.bin/gcc/rtl.texi
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/rtlanal.c b/gnu/usr.bin/gcc/rtlanal.c
index d311652d2ef..4df251bb3b7 100644
--- a/gnu/usr.bin/gcc/rtlanal.c
+++ b/gnu/usr.bin/gcc/rtlanal.c
@@ -1,5 +1,5 @@
/* Analyze RTL for C-Compiler
- Copyright (C) 1987, 88, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -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
@@ -1157,19 +1157,30 @@ dead_or_set_regno_p (insn, test_regno)
int regno, endregno;
rtx link;
- /* See if there is a death note for something that includes TEST_REGNO. */
- for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
+ /* REG_READ notes are not normally maintained after reload, so we
+ ignore them if the are invalid. */
+ if (! reload_completed
+#ifdef PRESERVE_DEATH_INFO_REGNO_P
+ || PRESERVE_DEATH_INFO_REGNO_P (test_regno)
+#endif
+ )
{
- if (REG_NOTE_KIND (link) != REG_DEAD || GET_CODE (XEXP (link, 0)) != REG)
- continue;
+ /* See if there is a death note for something that includes
+ TEST_REGNO. */
+ for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
+ {
+ if (REG_NOTE_KIND (link) != REG_DEAD
+ || GET_CODE (XEXP (link, 0)) != REG)
+ continue;
- regno = REGNO (XEXP (link, 0));
- endregno = (regno >= FIRST_PSEUDO_REGISTER ? regno + 1
- : regno + HARD_REGNO_NREGS (regno,
- GET_MODE (XEXP (link, 0))));
+ regno = REGNO (XEXP (link, 0));
+ endregno = (regno >= FIRST_PSEUDO_REGISTER ? regno + 1
+ : regno + HARD_REGNO_NREGS (regno,
+ GET_MODE (XEXP (link, 0))));
- if (test_regno >= regno && test_regno < endregno)
- return 1;
+ if (test_regno >= regno && test_regno < endregno)
+ return 1;
+ }
}
if (GET_CODE (insn) == CALL_INSN
diff --git a/gnu/usr.bin/gcc/sched.c b/gnu/usr.bin/gcc/sched.c
index fee802e4f43..abc98ddd68a 100644
--- a/gnu/usr.bin/gcc/sched.c
+++ b/gnu/usr.bin/gcc/sched.c
@@ -1,5 +1,5 @@
/* Instruction scheduling pass.
- Copyright (C) 1992, 93-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 93-97, 1998 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
Enhanced by, and currently maintained by, Jim Wilson (wilson@cygnus.com)
@@ -2892,12 +2892,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. */
@@ -2956,17 +2951,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/gnu/usr.bin/gcc/sdbout.c b/gnu/usr.bin/gcc/sdbout.c
index 7fab3bec57e..3a5d7a4ac1b 100644
--- a/gnu/usr.bin/gcc/sdbout.c
+++ b/gnu/usr.bin/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;
}
@@ -1062,8 +1065,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/gnu/usr.bin/gcc/stab.def b/gnu/usr.bin/gcc/stab.def
index dd4fbf0e8be..48ea231e603 100644
--- a/gnu/usr.bin/gcc/stab.def
+++ b/gnu/usr.bin/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/gnu/usr.bin/gcc/stmt.c b/gnu/usr.bin/gcc/stmt.c
index 9451012d13b..02e4bf23b69 100644
--- a/gnu/usr.bin/gcc/stmt.c
+++ b/gnu/usr.bin/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-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.
@@ -1421,6 +1421,10 @@ 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, for now. */
+ if (noutputs == 0)
+ vol = 1;
+
if (output_bytecode)
{
error ("`asm' is invalid when generating bytecode");
@@ -1566,9 +1570,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
TREE_STRING_POINTER (string), "", 0, argvec, constraints,
filename, line);
- /* The only use of BODY is if no outputs are specified, so set
- it volatile, at least for now. */
- MEM_VOLATILE_P (body) = 1;
+ MEM_VOLATILE_P (body) = vol;
/* Eval the inputs and put them into ARGVEC.
Put their constraints into ASM_INPUTs and store in CONSTRAINTS. */
@@ -3134,10 +3136,8 @@ expand_start_bindings (exit_flag)
nesting_stack = thisblock;
if (!output_bytecode)
- {
- /* Make a new level for allocating stack slots. */
- push_temp_slots ();
- }
+ /* Make a new level for allocating stack slots. */
+ push_temp_slots_for_block ();
}
/* Specify the scope of temporaries created by TARGET_EXPRs. Similar
@@ -3599,7 +3599,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);
@@ -3609,7 +3611,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));
@@ -3813,8 +3815,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 ();
@@ -3896,8 +3899,7 @@ bc_expand_decl_init (decl)
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 (TREE_TYPE (decl), decl, 0, 0);
}
else if (DECL_INITIAL (decl))
@@ -4240,7 +4242,16 @@ expand_cleanups (list, dont_do, in_fixup, reachable)
the target. Though the cleanups are expanded multiple
times, the control paths are non-overlapping so the
cleanups will not be executed twice. */
+
+ /* 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));
free_temp_slots ();
}
}
diff --git a/gnu/usr.bin/gcc/texinfo.tex b/gnu/usr.bin/gcc/texinfo.tex
index 546919b5ea7..a820c56d07e 100644
--- a/gnu/usr.bin/gcc/texinfo.tex
+++ b/gnu/usr.bin/gcc/texinfo.tex
@@ -1,32 +1,40 @@
-%% TeX macros to handle Texinfo files.
-%% $Id: texinfo.tex,v 1.2 1998/03/03 21:20:19 niklas 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.3 1998/03/08 18:28:45 millert 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.2 $
+\deftexinfoversion$Revision: 1.3 $
\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/gnu/usr.bin/gcc/tm.texi b/gnu/usr.bin/gcc/tm.texi
index ff3500f8855..45d4819c2eb 100644
--- a/gnu/usr.bin/gcc/tm.texi
+++ b/gnu/usr.bin/gcc/tm.texi
@@ -1,4 +1,4 @@
-@c Copyright (C) 1988,89,92,93,94,96,1997 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.
@@ -2038,7 +2038,7 @@ between these kinds.
@findex EXTRA_CONSTRAINT
@item EXTRA_CONSTRAINT (@var{value}, @var{c})
A C expression that defines the optional machine-dependent constraint
-letters (@item @samp{Q}, @samp{R}, @samp{S}, @samp{T}, @samp{U}) that can
+letters (@samp{Q}, @samp{R}, @samp{S}, @samp{T}, @samp{U}) that can
be used to segregate specific types of operands, usually memory
references, for the target machine. Normally this macro will not be
defined. If it is required for a particular target machine, it should
@@ -2312,7 +2312,7 @@ allocation has been done (for example, because the saved registers are
between these two locations). On those machines, define
@code{FRAME_POINTER_REGNUM} the number of a special, fixed register to
be used internally until the offset is known, and define
-@code{HARD_FRAME_POINTER_REGNUM} to be actual the hard register number
+@code{HARD_FRAME_POINTER_REGNUM} to be the actual hard register number
used for the frame pointer.
You should define this macro only in the very rare circumstances when it
@@ -5948,7 +5948,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 assemble 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.
@@ -6227,13 +6227,20 @@ 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}.
+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},
@samp{-gcoff}, @samp{-gdwarf-1}, @samp{-gdwarf-2}, or @samp{-gxcoff}.
@@ -6563,6 +6570,13 @@ define @code{INCOMING_RETURN_ADDR_RTX} and either set
prologue, or call @code{dwarf2out_def_cfa} and @code{dwarf2out_reg_save}
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} 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{}
Define these macros to override the assembler syntax for the special
@@ -6802,7 +6816,7 @@ incorrect definitions that omit an rtl code that may be matched by the
predicate can cause the compiler to malfunction). Instead, it allows
the table built by @file{genrecog} to be more compact and efficient,
thus speeding up the compiler. The most important predicates to include
-in the list specified by this macro are thoses used in the most insn
+in the list specified by this macro are those used in the most insn
patterns.
@findex CASE_VECTOR_MODE
diff --git a/gnu/usr.bin/gcc/toplev.c b/gnu/usr.bin/gcc/toplev.c
index f578997508c..dfeef30327d 100644
--- a/gnu/usr.bin/gcc/toplev.c
+++ b/gnu/usr.bin/gcc/toplev.c
@@ -1,5 +1,5 @@
/* Top level of GNU C compiler
- Copyright (C) 1987, 88, 89, 92-6, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -36,6 +36,10 @@ Boston, MA 02111-1307, USA. */
#include <ctype.h>
#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
#undef FLOAT
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
@@ -68,6 +72,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 "bytecode.h"
@@ -191,7 +198,7 @@ void print_switch_values ();
/* Length of line when printing switch values. */
#define MAX_LINE 75
-#ifdef __alpha
+#ifdef NEED_DECLARATION_SBRK
extern char *sbrk ();
#endif
@@ -968,8 +975,17 @@ get_run_time ()
return (clock() * 1000);
#else /* not _WIN32 */
#ifdef USG
+# 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
getrusage (0, &rusage);
@@ -2436,7 +2452,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
@@ -3010,7 +3033,8 @@ rest_of_compilation (decl)
if (DECL_SAVED_INSNS (decl))
fprintf (rtl_dump_file, ";; (integrable)\n\n");
print_rtl (rtl_dump_file, insns);
- fflush (rtl_dump_file);
+ if (! quiet_flag)
+ fflush (rtl_dump_file);
});
/* If function is inline, and we don't yet know whether to
@@ -3185,7 +3209,8 @@ rest_of_compilation (decl)
fprintf (jump_opt_dump_file, "\n;; Function %s\n\n",
(*decl_printable_name) (decl, 2));
print_rtl (jump_opt_dump_file, insns);
- fflush (jump_opt_dump_file);
+ if (! quiet_flag)
+ fflush (jump_opt_dump_file);
});
/* Perform common subexpression elimination.
@@ -3222,7 +3247,8 @@ rest_of_compilation (decl)
TIMEVAR (dump_time,
{
print_rtl (cse_dump_file, insns);
- fflush (cse_dump_file);
+ if (! quiet_flag)
+ fflush (cse_dump_file);
});
purge_addressof (insns);
@@ -3234,7 +3260,8 @@ rest_of_compilation (decl)
fprintf (addressof_dump_file, "\n;; Function %s\n\n",
(*decl_printable_name) (decl, 2));
print_rtl (addressof_dump_file, insns);
- fflush (addressof_dump_file);
+ if (! quiet_flag)
+ fflush (addressof_dump_file);
});
if (loop_dump)
@@ -3262,7 +3289,8 @@ rest_of_compilation (decl)
TIMEVAR (dump_time,
{
print_rtl (loop_dump_file, insns);
- fflush (loop_dump_file);
+ if (! quiet_flag)
+ fflush (loop_dump_file);
});
if (cse2_dump)
@@ -3302,7 +3330,8 @@ rest_of_compilation (decl)
TIMEVAR (dump_time,
{
print_rtl (cse2_dump_file, insns);
- fflush (cse2_dump_file);
+ if (! quiet_flag)
+ fflush (cse2_dump_file);
});
if (branch_prob_dump)
@@ -3322,7 +3351,8 @@ rest_of_compilation (decl)
TIMEVAR (dump_time,
{
print_rtl (branch_prob_dump_file, insns);
- fflush (branch_prob_dump_file);
+ if (! quiet_flag)
+ fflush (branch_prob_dump_file);
});
/* We are no longer anticipating cse in this function, at least. */
@@ -3376,7 +3406,8 @@ rest_of_compilation (decl)
TIMEVAR (dump_time,
{
print_rtl_with_bb (flow_dump_file, insns);
- fflush (flow_dump_file);
+ if (! quiet_flag)
+ fflush (flow_dump_file);
});
/* If -opt, try combining insns through substitution. */
@@ -3393,7 +3424,8 @@ rest_of_compilation (decl)
(*decl_printable_name) (decl, 2));
dump_combine_stats (combine_dump_file);
print_rtl_with_bb (combine_dump_file, insns);
- fflush (combine_dump_file);
+ if (! quiet_flag)
+ fflush (combine_dump_file);
});
/* Print function header into sched dump now
@@ -3420,7 +3452,8 @@ rest_of_compilation (decl)
TIMEVAR (dump_time,
{
print_rtl_with_bb (sched_dump_file, insns);
- fflush (sched_dump_file);
+ if (! quiet_flag)
+ fflush (sched_dump_file);
});
/* Unless we did stupid register allocation,
@@ -3443,7 +3476,8 @@ rest_of_compilation (decl)
dump_flow_info (local_reg_dump_file);
dump_local_alloc (local_reg_dump_file);
print_rtl_with_bb (local_reg_dump_file, insns);
- fflush (local_reg_dump_file);
+ if (! quiet_flag)
+ fflush (local_reg_dump_file);
});
if (global_reg_dump)
@@ -3472,7 +3506,8 @@ rest_of_compilation (decl)
{
dump_global_regs (global_reg_dump_file);
print_rtl_with_bb (global_reg_dump_file, insns);
- fflush (global_reg_dump_file);
+ if (! quiet_flag)
+ fflush (global_reg_dump_file);
});
if (failure)
@@ -3511,7 +3546,8 @@ rest_of_compilation (decl)
TIMEVAR (dump_time,
{
print_rtl_with_bb (sched2_dump_file, insns);
- fflush (sched2_dump_file);
+ if (! quiet_flag)
+ fflush (sched2_dump_file);
});
}
@@ -3539,7 +3575,8 @@ rest_of_compilation (decl)
fprintf (jump2_opt_dump_file, "\n;; Function %s\n\n",
(*decl_printable_name) (decl, 2));
print_rtl_with_bb (jump2_opt_dump_file, insns);
- fflush (jump2_opt_dump_file);
+ if (! quiet_flag)
+ fflush (jump2_opt_dump_file);
});
/* If a machine dependent reorganization is needed, call it. */
@@ -3561,7 +3598,8 @@ rest_of_compilation (decl)
fprintf (dbr_sched_dump_file, "\n;; Function %s\n\n",
(*decl_printable_name) (decl, 2));
print_rtl_with_bb (dbr_sched_dump_file, insns);
- fflush (dbr_sched_dump_file);
+ if (! quiet_flag)
+ fflush (dbr_sched_dump_file);
});
}
}
@@ -3582,7 +3620,8 @@ rest_of_compilation (decl)
fprintf (stack_reg_dump_file, "\n;; Function %s\n\n",
(*decl_printable_name) (decl, 2));
print_rtl_with_bb (stack_reg_dump_file, insns);
- fflush (stack_reg_dump_file);
+ if (! quiet_flag)
+ fflush (stack_reg_dump_file);
});
}
#endif
@@ -3611,7 +3650,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 ();
@@ -4177,7 +4217,7 @@ main (argc, argv, envp)
type = PREFERRED_DEBUGGING_TYPE;
if (len > 1 && strncmp (str, "ggdb", len) == 0)
{
-#ifdef DWARF2_DEBUGGING_INFO
+#if defined (DWARF2_DEBUGGING_INFO) && !defined (LINKER_DOES_NOT_WORK_WITH_DWARF2)
type = DWARF2_DEBUG;
#else
#ifdef DBX_DEBUGGING_INFO
diff --git a/gnu/usr.bin/gcc/tree.c b/gnu/usr.bin/gcc/tree.c
index a4c8bbabf02..20c21f87384 100644
--- a/gnu/usr.bin/gcc/tree.c
+++ b/gnu/usr.bin/gcc/tree.c
@@ -1,5 +1,5 @@
/* Language-independent node constructors for parse phase of GNU compiler.
- Copyright (C) 1987, 88, 92-96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1987, 88, 92-97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -1691,7 +1691,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);
@@ -1732,7 +1732,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);
@@ -2216,29 +2216,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 (which_div_expr (type), 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
@@ -3323,7 +3326,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))
@@ -4180,22 +4183,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. */
@@ -4203,8 +4201,6 @@ build_reference_type (to_type)
layout_type (t);
- current_obstack = ambient_obstack;
- saveable_obstack = ambient_saveable_obstack;
return t;
}
diff --git a/gnu/usr.bin/gcc/tree.h b/gnu/usr.bin/gcc/tree.h
index 87d563213b8..031c096ba7a 100644
--- a/gnu/usr.bin/gcc/tree.h
+++ b/gnu/usr.bin/gcc/tree.h
@@ -1,5 +1,5 @@
/* Front-end tree definitions for GNU compiler.
- Copyright (C) 1989, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -196,7 +196,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
@@ -245,7 +245,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
@@ -1171,8 +1171,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;
@@ -1393,7 +1392,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 PROTO((unsigned HOST_WIDE_INT));
extern tree round_up PROTO((tree, int));
diff --git a/gnu/usr.bin/gcc/unroll.c b/gnu/usr.bin/gcc/unroll.c
index 1e0de2b6498..cffd0e7aaf3 100644
--- a/gnu/usr.bin/gcc/unroll.c
+++ b/gnu/usr.bin/gcc/unroll.c
@@ -1,5 +1,5 @@
/* Try to unroll loops, and split induction variables.
- Copyright (C) 1992, 1993, 1994, 1995, 1997 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.
@@ -691,8 +691,9 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
else if (GET_CODE (insn) == JUMP_INSN)
{
if (JUMP_LABEL (insn))
- map->label_map[CODE_LABEL_NUMBER (JUMP_LABEL (insn))]
- = JUMP_LABEL (insn);
+ set_label_in_map (map,
+ CODE_LABEL_NUMBER (JUMP_LABEL (insn)),
+ JUMP_LABEL (insn));
else if (GET_CODE (PATTERN (insn)) == ADDR_VEC
|| GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC)
{
@@ -704,7 +705,9 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
for (i = 0; i < len; i++)
{
label = XEXP (XVECEXP (pat, diff_vec_p, i), 0);
- map->label_map[CODE_LABEL_NUMBER (label)] = label;
+ set_label_in_map (map,
+ CODE_LABEL_NUMBER (label),
+ label);
}
}
}
@@ -1043,7 +1046,7 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
for (j = 0; j < max_labelno; j++)
if (local_label[j])
- map->label_map[j] = gen_label_rtx ();
+ set_label_in_map (map, j, gen_label_rtx ());
for (j = FIRST_PSEUDO_REGISTER; j < max_reg_before_loop; j++)
if (local_regno[j])
@@ -1188,7 +1191,7 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
for (j = 0; j < max_labelno; j++)
if (local_label[j])
- map->label_map[j] = gen_label_rtx ();
+ set_label_in_map (map, j, gen_label_rtx ());
for (j = FIRST_PSEUDO_REGISTER; j < max_reg_before_loop; j++)
if (local_regno[j])
@@ -1201,8 +1204,9 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
insn = PREV_INSN (copy_start);
pattern = PATTERN (insn);
- tem = map->label_map[CODE_LABEL_NUMBER
- (XEXP (SET_SRC (pattern), 0))];
+ tem = get_label_from_map (map,
+ CODE_LABEL_NUMBER
+ (XEXP (SET_SRC (pattern), 0)));
SET_SRC (pattern) = gen_rtx (LABEL_REF, VOIDmode, tem);
/* Set the jump label so that it can be used by later loop unrolling
@@ -1427,6 +1431,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
@@ -1594,7 +1599,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;
rtx cc0_insn = 0;
rtx final_label = 0;
@@ -1609,10 +1614,11 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
if (! last_iteration)
{
final_label = gen_label_rtx ();
- map->label_map[CODE_LABEL_NUMBER (start_label)] = final_label;
+ set_label_in_map (map, CODE_LABEL_NUMBER (start_label),
+ final_label);
}
else
- map->label_map[CODE_LABEL_NUMBER (start_label)] = start_label;
+ set_label_in_map (map, CODE_LABEL_NUMBER (start_label), start_label);
start_sequence ();
@@ -1638,15 +1644,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
@@ -1655,7 +1661,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'. */
@@ -1729,11 +1735,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;
@@ -1741,9 +1747,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)
{
@@ -1896,8 +1902,9 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
if (invert_exp (pattern, copy))
{
if (! redirect_exp (&pattern,
- map->label_map[CODE_LABEL_NUMBER
- (JUMP_LABEL (insn))],
+ get_label_from_map (map,
+ CODE_LABEL_NUMBER
+ (JUMP_LABEL (insn))),
exit_label, copy))
abort ();
}
@@ -1914,8 +1921,9 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
emit_label_after (lab, jmp);
LABEL_NUSES (lab) = 0;
if (! redirect_exp (&pattern,
- map->label_map[CODE_LABEL_NUMBER
- (JUMP_LABEL (insn))],
+ get_label_from_map (map,
+ CODE_LABEL_NUMBER
+ (JUMP_LABEL (insn))),
lab, copy))
abort ();
}
@@ -1936,9 +1944,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)
@@ -1958,7 +1966,8 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
for a switch statement. This label must have been mapped,
so just use the label_map to get the new jump label. */
JUMP_LABEL (copy)
- = map->label_map[CODE_LABEL_NUMBER (JUMP_LABEL (insn))];
+ = get_label_from_map (map,
+ CODE_LABEL_NUMBER (JUMP_LABEL (insn)));
}
/* If this is a non-local jump, then must increase the label
@@ -2036,7 +2045,8 @@ copy_loop_body (copy_start, copy_end, map, exit_label, last_iteration,
if (insn != start_label)
{
- copy = emit_label (map->label_map[CODE_LABEL_NUMBER (insn)]);
+ copy = emit_label (get_label_from_map (map,
+ CODE_LABEL_NUMBER (insn)));
map->const_age++;
}
break;
diff --git a/gnu/usr.bin/gcc/varasm.c b/gnu/usr.bin/gcc/varasm.c
index 7f2970fa770..eae0ea4edb7 100644
--- a/gnu/usr.bin/gcc/varasm.c
+++ b/gnu/usr.bin/gcc/varasm.c
@@ -1,5 +1,5 @@
/* Output variables, constants and external declarations, for GNU compiler.
- 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.
@@ -2646,6 +2646,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;
@@ -2653,7 +2658,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
@@ -2664,10 +2671,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;
@@ -2690,6 +2703,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;
@@ -2818,21 +2855,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);
}
@@ -2847,6 +2893,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/gnu/usr.bin/gcc/version.c b/gnu/usr.bin/gcc/version.c
index 0ae625c3479..7263e2d1518 100644
--- a/gnu/usr.bin/gcc/version.c
+++ b/gnu/usr.bin/gcc/version.c
@@ -1 +1 @@
-char *version_string = "2.8.0";
+char *version_string = "2.8.1";