summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2002-09-01 20:38:57 +0000
committerkan <kan@FreeBSD.org>2002-09-01 20:38:57 +0000
commit2e25f3a6c57335cba50111faceb0ce2ab59e9bcb (patch)
treec6857d31c36dbd89a881b0229bf38b062797d413 /contrib
parent0895e1acb698e05d503c26bec5471de2e88b7d93 (diff)
downloadFreeBSD-src-2e25f3a6c57335cba50111faceb0ce2ab59e9bcb.zip
FreeBSD-src-2e25f3a6c57335cba50111faceb0ce2ab59e9bcb.tar.gz
Gcc 3.2.1-prerelease from the FSF anoncvs repo gcc-3_2-branch on 1-Sep-2002 00:00:01 EDT.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/gcc/ChangeLog1224
-rw-r--r--contrib/gcc/Makefile.in5
-rw-r--r--contrib/gcc/alias.c8
-rw-r--r--contrib/gcc/attribs.c1
-rw-r--r--contrib/gcc/bb-reorder.c14
-rw-r--r--contrib/gcc/bitmap.c5
-rw-r--r--contrib/gcc/c-common.c43
-rw-r--r--contrib/gcc/c-decl.c26
-rw-r--r--contrib/gcc/c-lang.c10
-rw-r--r--contrib/gcc/c-lex.c19
-rw-r--r--contrib/gcc/c-pragma.c17
-rw-r--r--contrib/gcc/cfgcleanup.c1
-rw-r--r--contrib/gcc/cfgrtl.c35
-rw-r--r--contrib/gcc/collect2.c9
-rw-r--r--contrib/gcc/combine.c32
-rw-r--r--contrib/gcc/config.gcc67
-rw-r--r--contrib/gcc/config.in6
-rw-r--r--contrib/gcc/config/alpha/alpha.c6
-rw-r--r--contrib/gcc/config/alpha/alpha.h36
-rw-r--r--contrib/gcc/config/alpha/elf.h2
-rw-r--r--contrib/gcc/config/alpha/netbsd.h2
-rw-r--r--contrib/gcc/config/alpha/unicosmk.h24
-rw-r--r--contrib/gcc/config/arm/arm.c16
-rw-r--r--contrib/gcc/config/arm/arm.md13
-rw-r--r--contrib/gcc/config/i386/i386-protos.h5
-rw-r--r--contrib/gcc/config/i386/i386.c241
-rw-r--r--contrib/gcc/config/i386/i386.h16
-rw-r--r--contrib/gcc/config/i386/i386.md165
-rw-r--r--contrib/gcc/config/i386/linux64.h61
-rw-r--r--contrib/gcc/config/i386/mmintrin.h2
-rw-r--r--contrib/gcc/config/i386/netbsd64.h18
-rw-r--r--contrib/gcc/config/i386/openbsd.h19
-rw-r--r--contrib/gcc/config/i386/unix.h56
-rw-r--r--contrib/gcc/config/ia64/linux.h2
-rw-r--r--contrib/gcc/config/ia64/sysv4.h153
-rw-r--r--contrib/gcc/config/rs6000/aix43.h15
-rw-r--r--contrib/gcc/config/rs6000/aix51.h15
-rw-r--r--contrib/gcc/config/rs6000/altivec.h1058
-rw-r--r--contrib/gcc/config/rs6000/linux64.h19
-rw-r--r--contrib/gcc/config/rs6000/netbsd.h5
-rw-r--r--contrib/gcc/config/rs6000/rs6000.c73
-rw-r--r--contrib/gcc/config/rs6000/rs6000.h22
-rw-r--r--contrib/gcc/config/rs6000/rs6000.md161
-rw-r--r--contrib/gcc/config/rs6000/sysv4.h1
-rw-r--r--contrib/gcc/config/rs6000/xcoff.h9
-rw-r--r--contrib/gcc/config/sparc/netbsd-elf.h21
-rw-r--r--contrib/gcc/config/sparc/openbsd1-64.h24
-rw-r--r--contrib/gcc/config/sparc/openbsd64.h75
-rw-r--r--contrib/gcc/config/sparc/sol2.h10
-rw-r--r--contrib/gcc/config/sparc/sparc-protos.h2
-rw-r--r--contrib/gcc/config/sparc/sparc.c79
-rw-r--r--contrib/gcc/config/sparc/sparc.h41
-rw-r--r--contrib/gcc/config/sparc/t-crtfm4
-rw-r--r--contrib/gcc/config/sparc/t-linux643
-rw-r--r--contrib/gcc/config/sparc/t-sol2-643
-rwxr-xr-xcontrib/gcc/configure679
-rw-r--r--contrib/gcc/configure.in38
-rw-r--r--contrib/gcc/convert.c11
-rw-r--r--contrib/gcc/cp-demangle.c39
-rw-r--r--contrib/gcc/cp/ChangeLog279
-rw-r--r--contrib/gcc/cp/Make-lang.in2
-rw-r--r--contrib/gcc/cp/call.c9
-rw-r--r--contrib/gcc/cp/class.c333
-rw-r--r--contrib/gcc/cp/cp-lang.c34
-rw-r--r--contrib/gcc/cp/cp-tree.h28
-rw-r--r--contrib/gcc/cp/cvt.c11
-rw-r--r--contrib/gcc/cp/decl.c28
-rw-r--r--contrib/gcc/cp/decl2.c98
-rw-r--r--contrib/gcc/cp/error.c2
-rw-r--r--contrib/gcc/cp/init.c88
-rw-r--r--contrib/gcc/cp/lang-specs.h3
-rw-r--r--contrib/gcc/cp/lex.c9
-rw-r--r--contrib/gcc/cp/mangle.c18
-rw-r--r--contrib/gcc/cp/operators.def6
-rw-r--r--contrib/gcc/cp/pt.c100
-rw-r--r--contrib/gcc/cp/rtti.c614
-rw-r--r--contrib/gcc/cp/search.c3
-rw-r--r--contrib/gcc/cp/tree.c31
-rw-r--r--contrib/gcc/cp/typeck.c12
-rw-r--r--contrib/gcc/cp/typeck2.c43
-rw-r--r--contrib/gcc/cppfiles.c9
-rw-r--r--contrib/gcc/cppinit.c115
-rw-r--r--contrib/gcc/cpplib.c5
-rw-r--r--contrib/gcc/cpplib.h6
-rw-r--r--contrib/gcc/cppmacro.c27
-rw-r--r--contrib/gcc/cse.c45
-rw-r--r--contrib/gcc/cselib.c39
-rw-r--r--contrib/gcc/defaults.h6
-rw-r--r--contrib/gcc/doc/contrib.texi3
-rw-r--r--contrib/gcc/doc/cpp.texi9
-rw-r--r--contrib/gcc/doc/cppenv.texi3
-rw-r--r--contrib/gcc/doc/include/gcc-common.texi2
-rw-r--r--contrib/gcc/doc/invoke.texi87
-rw-r--r--contrib/gcc/doc/md.texi6
-rw-r--r--contrib/gcc/doc/tm.texi14
-rw-r--r--contrib/gcc/dwarf2out.c43
-rw-r--r--contrib/gcc/dwarfout.c6
-rw-r--r--contrib/gcc/emit-rtl.c16
-rw-r--r--contrib/gcc/explow.c28
-rw-r--r--contrib/gcc/expmed.c13
-rw-r--r--contrib/gcc/expr.c3
-rw-r--r--contrib/gcc/expr.h4
-rw-r--r--contrib/gcc/f/ChangeLog39
-rw-r--r--contrib/gcc/f/bugs.texi2
-rw-r--r--contrib/gcc/f/news.texi15
-rw-r--r--contrib/gcc/f/root.texi2
-rw-r--r--contrib/gcc/f/target.h12
-rw-r--r--contrib/gcc/f/version.c2
-rw-r--r--contrib/gcc/final.c3
-rw-r--r--contrib/gcc/flow.c37
-rw-r--r--contrib/gcc/fold-const.c314
-rw-r--r--contrib/gcc/function.c24
-rw-r--r--contrib/gcc/gcc.c2
-rw-r--r--contrib/gcc/haifa-sched.c7
-rw-r--r--contrib/gcc/hooks.c6
-rw-r--r--contrib/gcc/hooks.h6
-rw-r--r--contrib/gcc/ifcvt.c68
-rw-r--r--contrib/gcc/langhooks-def.h7
-rw-r--r--contrib/gcc/langhooks.c13
-rw-r--r--contrib/gcc/langhooks.h11
-rw-r--r--contrib/gcc/libgcc2.c4
-rw-r--r--contrib/gcc/local-alloc.c8
-rw-r--r--contrib/gcc/loop.c12
-rw-r--r--contrib/gcc/objc/Make-lang.in2
-rw-r--r--contrib/gcc/objc/objc-lang.c21
-rw-r--r--contrib/gcc/optabs.c22
-rw-r--r--contrib/gcc/print-rtl.c5
-rw-r--r--contrib/gcc/recog.c40
-rw-r--r--contrib/gcc/reg-stack.c2
-rw-r--r--contrib/gcc/regclass.c1
-rw-r--r--contrib/gcc/regmove.c1
-rw-r--r--contrib/gcc/reload.c32
-rw-r--r--contrib/gcc/reload1.c1
-rw-r--r--contrib/gcc/rtl.h2
-rw-r--r--contrib/gcc/sched-deps.c56
-rw-r--r--contrib/gcc/sched-int.h6
-rw-r--r--contrib/gcc/stor-layout.c39
-rw-r--r--contrib/gcc/system.h5
-rw-r--r--contrib/gcc/toplev.c21
-rw-r--r--contrib/gcc/tradcpp.c3
-rw-r--r--contrib/gcc/tree-inline.c37
-rw-r--r--contrib/gcc/unroll.c6
-rw-r--r--contrib/gcc/varasm.c43
-rw-r--r--contrib/gcc/version.c2
144 files changed, 5749 insertions, 2198 deletions
diff --git a/contrib/gcc/ChangeLog b/contrib/gcc/ChangeLog
index 93d1400..f664314 100644
--- a/contrib/gcc/ChangeLog
+++ b/contrib/gcc/ChangeLog
@@ -1,6 +1,1184 @@
+2002-08-29 Rodney Brown <rbrown64@csc.com.au>
+
+ * doc/install.texi (Specific, alpha*-dec-osf*): Add "virtual
+ memory exhausted" workarounds.
+
+2002-08-29 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * install.texi (hppa64-hp-hpux11*): Document installation procedure.
+
+2002-08-28 Jason Merrill <jason@redhat.com>
+
+ * c-common.c (c_expand_expr) [STMT_EXPR]: If the last expression is
+ a VAR_DECL with RTL that matches the target, just return that RTL.
+
+2002-08-28 Daniel Berlin <dberlin@dberlin.org>
+
+ * tree-inline.c (expand_call_inline): Make the statement
+ expression we generate have a COMPOUND_STMT.
+
+2002-08-27 Mark Mitchell <mark@codesourcery.com>
+
+ * doc/invoke.texi: Document -Wabi.
+
+2002-08-23 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/rs6000.c (rs6000_select_section): Treat
+ DEFAULT_ABI == ABI_AIX like PIC. Test PIC & reloc for readonly
+ default.
+ (rs6000_unique_section): Likewise.
+
+2002-08-22 Jason Merrill <jason@redhat.com>
+
+ * langhooks-def.h (LANG_HOOKS_EXPR_SIZE): New macro.
+ * langhooks.c (lhd_expr_size): Define default.
+ * langhooks.h (struct lang_hooks): Add expr_size.
+ * explow.c (expr_size): Call it.
+ (int_expr_size): New fn.
+ * expr.h: Declare it.
+ * expr.c (expand_expr) [CONSTRUCTOR]: Use it to calculate how
+ much to store.
+
+2002-08-23 Alan Modra <amodra@bigpond.net.au>
+
+ * config/rs6000/rs6000.c (output_mi_thunk): Don't determine insns
+ for loading delta with num_insns_constant_wide. Calculate
+ delta_low, delta_high without using a conditional.
+
+2002-08-20 Andreas Jaeger <aj@suse.de>
+
+ Merge from trunk:
+ Wed Jul 17 00:20:48 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * i386.md (prefetch): Fix for 64bit mode.
+ (prefetch_sse_rex, prefetch_3dnow_rex): New patterns.
+
+ 2002-08-11 Andreas Jaeger <aj@suse.de>
+ PR target/7531:
+ * doc/invoke.texi (i386 and x86-64 Options): Document -mcmodel.
+
+2002-06-24 Jeff Law <law@redhat.com>
+
+ * flow.c (propagate_one_insn): When removing an insn
+ with a REG_LIBCALL note but not the entire libcall sequence,
+ delete the associated REG_RETVAL note.
+
+2002-06-04 Jeff Law <law@redhat.com.
+ David Edelsohn <edelsohn@gnu.org>
+ Michael Matz <matz@kde.org>
+
+ * sched-int.h (struct deps): New field libcall_block_tail_insn.
+ * sched_deps.c (init_deps): Initialize libcall_block_tail_insn.
+ * sched_deps.c (sched_analyze_insn): If libcall_block_tail_insn
+ is set, then mark the current insn as being part of a libcall
+ scheduling group.
+ (sched_analyze): Set and clear libcall_block_tail_insn appropriately.
+
+ * haifa-sched.c (schedule_block): Do not count USE or CLOBBER
+ insns against the issue rate.
+
+2002-05-30 Jeff Law <law@redhat.com>
+
+ * flow.c (propagate_one_insn): Revise yesterday's patch. Delete
+ a dead insn with a REG_RETVAL note when the entire libcall is not
+ dead and remove the associated REG_LIBCALL note at the same time.
+
+2002-05-29 Jeff Law <law@redhat.com>
+
+ * flow.c (propagate_one_insn): Do not remove a dead insn if it
+ contains a REG_RETVAL note.
+
+ * haifa-sched (sched_analyze): Remove another useless clearing
+ of SCHED_GROUP_P I missed yesterday.
+
+2002-05-28 David Edelsohn <edelsohn@gnu.org>
+ Jeff Law <law@redhat.com>
+
+ * optabs.c (expand_binop): Fix nwords sign warnings.
+ generate pseudo for add_optab.
+
+ * sched-deps.c (sched_analyze): Do not clear SCHED_GROUP_P.
+ * haifa-sched.c (move_insn): Clear SCHED_GROUP_P after it is used.
+
+2002-08-18 Neil Booth <neil@daikokuya.co.uk>
+
+ PR preprocessor/7602
+ * cppinit.c (path_include): Treat the system environment
+ variables as being cxx_aware.
+
+2002-08-16 David Edelsohn <edelsohn@gnu.org>
+
+ * collect2.c (is_ctor_dtor): Add other possible JOINER values.
+
+ * config/rs6000/rs6000.c (output_mi_thunk): Return to function
+ section on TARGET_ELF.
+
+ * doc/install.texi (*-ibm-aix*): Explain AIX shared object versioning.
+ (Binaries): Update Bull Freeware URL.
+
+2002-08-15 Neil Booth <neil@daikokuya.co.uk>
+
+ PR preprocessor/7358
+ PR preprocessor/7357
+ PR preprocessor/7526
+ * cppfiles.c (stack_include_file): Ignore main file if
+ appropriate. Correct test of whether a dependency should
+ be output.
+ * cppinit.c (init_dependency_output): Ignore main file
+ for SUNPRO_DEPENDENCIES.
+ (struct lang_flags): Rename trigraphs std.
+ (set_lang): Update.
+ * cpplib.c (run_directive): Kludge so _Pragma dependency works.
+ * cpplib.h (struct cpp_options): New members.
+ * cppmacro.c (collect_args): Flag whether to swallow a possible
+ future comma pasted with varargs.
+ (replace_args): Use this flag.
+ * doc/cpp.texi: Update varargs extension documentation.
+ * doc/cppenv.texi: Update.
+
+2002-08-14 Release Manager
+
+ * GCC 3.2 Released.
+
+2002-08-08 Jakub Jelinek <jakub@redhat.com>
+
+ * config/rs6000/rs6000.h, config/rs6000/aix.h,
+ config/rs6000/darwin.h, config/rs6000/linux64.h: Revert last
+ two patches.
+ * config/rs6000/sysv4.h: Likewise, remove #undef ADJUST_FIELD_ALIGN.
+
+2002-08-08 Jakub Jelinek <jakub@redhat.com>
+
+ * config/rs6000/rs6000-protos.h (rs6000_field_alignment): Remove.
+ * config/rs6000/rs6000.c (rs6000_field_alignment): Move...
+ * config/rs6000/rs6000.h (ADJUST_FIELD_ALIGN): ...inline into the
+ macro.
+
+2002-08-08 Jakub Jelinek <jakub@redhat.com>
+
+ * stor-layout.c (place_union_field): For bitfields if
+ PCC_BITFIELD_TYPE_MATTERS and TYPE_USER_ALIGN, set record's
+ TYPE_USER_ALIGN.
+
+2002-08-07 Jakub Jelinek <jakub@redhat.com>
+ Richard Henderson <rth@redhat.com>
+
+ * stor-layout.c (place_union_field): Apply ADJUST_FIELD_ALIGN
+ to type_align when PCC_BITFIELD_TYPE_MATTERS. Only apply
+ ADJUST_FIELD_ALIGN if not DECL_USER_ALIGN resp. TYPE_USER_ALIGN.
+ (place_field): Likewise.
+ * config/i386/i386.c (x86_field_alignment): Don't check
+ TARGET_ALIGN_DOUBLE for the second time.
+ Apply min for all MODE_INT and MODE_CLASS_INT modes.
+ * config/rs6000/rs6000.c (rs6000_field_alignment): New.
+ * config/rs6000/rs6000-protos.h (rs6000_field_alignment): New
+ prototype.
+ * config/rs6000/rs6000.h (ADJUST_FIELD_ALIGN): Define.
+ * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Remove.
+ * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Remove.
+ * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Remove.
+ * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Remove.
+ * doc/tm.texi (ADJUST_FIELD_ALIGN): Update description.
+
+2002-08-06 Jakub Jelinek <jakub@redhat.com>
+
+ * config/i386/mmintrin.h (__m64): Make the type 64-bit aligned.
+
+2002-08-06 Jakub Jelinek <jakub@redhat.com>
+
+ * config.gcc (*-*-linux*): Default to --enable-threads=posix if no
+ --{enable,disable}-threads is given to configure.
+ (alpha*-*-linux*, hppa*-*-linux*, i[34567]86-*-linux*,
+ x86_64-*-linux*, ia64*-*-linux*, m68k-*-linux*, mips*-*-linux*,
+ powerpc-*-linux-gnualtivec*, powerpc-*-linux*, s390-*-linux*,
+ s390x-*-linux*, sh-*-linux*, sparc-*-linux*, sparc64-*-linux*):
+ Remove thread_file setting here.
+
+2002-08-04 Mark Mitchell <mark@codesourcery.com>
+
+ * doc/install.texi (Installing GCC): Refer to buildstat.html,
+ rather than listing version-specific build status files.
+
+2002-08-04 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * doc/include/gcc-common.texi (version-GCC): Increase to 3.2.
+
+2002-08-01 Benjamin Kosnik <bkoz@redhat.com>
+
+ * gcc.c: Set __GXX_ABI_VERSION to 102.
+
+2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * gcc.c (cpp_unique_options): Define __GXX_ABI_VERSION, bump it to 101.
+
+2002-07-24 Frank van der Linden <fvdl@wasabisystems.com>
+
+ PR optimization/7291
+ * config/i386/i386.c (ix86_expand_clrstr): Fix bzero alignment
+ problem on x86_64.
+
+2002-05-16 Jason Merrill <jason@redhat.com>
+
+ * config/mips/mips.c (mips_output_external): Don't do sdata
+ optimization for a variable with DECL_COMDAT set.
+
+2002-01-03 Jakub Jelinek <jakub@redhat.com>
+
+ * c-decl.c (build_compound_literal): Set decl TREE_READONLY from TYPE.
+
+ * c-decl.c (build_compound_literal): Defer compound literal decls
+ until until file end to emit them only if they are actually used.
+
+2002-07-25 Release Manager
+
+ * GCC 3.1.1 Released.
+
+2002-07-21 Nick Clifton <nickc@redhat.com>
+
+ * Import following patch from mainline:
+
+ 2002-03-18 Bernd Schmidt <bernds@redhat.com>
+
+ * config/arm/arm.c (arm_gen_movstrqi): Use gen_lowpart
+ instead of gen_rtx_SUBREG.
+ (arm_reload_out_hi): Use gen_lowpart instead of
+ gen_rtx_SUBREG to access QImode components.
+ * config/arm/arm.md: Disable zero_extend split for QImode
+ subregs in BIG_ENDIAN mode.
+ (storehi_bigend): Match use of least significant byte.
+ (storeinthi): Remove extraneous SUBREG.
+ Add missing construction of operands[2].
+ (movhi): Use gen_lowpart in place of gen_rtx_SUBREG.
+ (movqi): Use gen_lowpart in place of gen_rtx_SUBREG.
+ Replace gen_rtx (SUBREG) with gen_rtx_SUBREG.
+
+2002-07-18 Richard Henderson <rth@redhat.com>
+
+ PR optimization/7147
+ * ifcvt.c (noce_get_condition): Make certain that the condition
+ is valid at JUMP.
+
+2002-07-16 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/cris/linux.h (CRIS_LINK_SUBTARGET_SPEC): Don't
+ --gc-sections if -r.
+
+2002-07-15 Eric Botcazou <ebotcazou@multimania.com>
+
+ PR optimization/7153
+ * regmove.c (optimize_reg_copy_3): Don't optimize if the register
+ dies in more than one insn.
+
+2002-07-15 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/sparc/netbsd-elf.h (TRANSFER_FROM_TRAMPOLINE): Remove.
+
+2002-07-15 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * bb-reorder.c (make_reorder_chain_1): Search harder for the vax
+ casesi fallthru edge.
+ * cfgrtl.c (force_nonfallthru_and_redirect): Place redirection
+ block after ADDR_VEC.
+ * vax.md (casesi): Use emit_jump_insn. Remove unused constraints.
+
+2002-07-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/7245
+ * config/i386/i386.c (const_int_1_31_operand): New.
+ * config/i386/i386.h (PREDICATE_CODES): Add it.
+ * config/i386/i386.md (ashlsi3_cmp, ashlsi3_cmp_zext, ashlhi3_cmp,
+ ashlqi3_cmp, ashrsi3_cmp, ashrsi3_cmp_zext, ashrhi3_cmp, ashrqi3_cmp,
+ lshrsi3_cmp, lshrsi3_cmp_zext, lshrhi3_cmp, lshrqi3_cmp): Use it.
+
+2002-06-11 Andreas Schwab <schwab@suse.de>
+
+ * config/m68k/m68k.h (PREDICATE_CODES): Define.
+
+2002-07-15 Alan Modra <amodra@bigpond.net.au>
+
+ PR target/7282
+ * config/rs6000/rs6000.md (floatsidf2): Enable for POWERPC64.
+ (floatunssidf2): Likewise.
+ (floatsidf_ppc64): New insn_and_split.
+ (floatunssidf_ppc64): Likewise.
+
+2002-07-12 Stephane Carrez <stcarrez@nerim.fr>
+
+ * config/m68hc11/m68hc11.md ("zero_extendsidi2"): Use D_REG only for
+ the scratch register.
+ ("*movhi2_push"): Accept Z_REG because a split pattern can make use
+ of it, forbid reload to use it.
+
+2002-07-12 Marek Michalkiewicz <marekm@amelek.gda.pl>
+
+ * config/avr/avr.c (test_hard_reg_class): Fix TEST_HARD_REG_BIT
+ usage on 64-bit hosts, return value was truncated to 32 bits.
+
+2002-07-11 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * pa.md (adddi3): Change predicate of operand 2 to adddi3_operand.
+ Remove comment. Change predicate of 32-bit adddi3 insn pattern to
+ arith11_operand.
+ * pa-protos.h (adddi3_operand): Add prototype.
+ * pa.c (cint_ok_for_move): Fix comment.
+ (adddi3_operand): New function.
+ (emit_move_sequence): Don't directly split DImode constants on
+ 32-bit targets.
+
+2002-07-05 Stephane Carrez <stcarrez@nerim.fr>
+
+ * config/m68hc11/m68hc11.md ("*movqi_68hc12"): Avoid allocating
+ QI mode registers in soft registers.
+ ("zero_extendqihi2"): Do not take into account soft registers
+ for register allocation (use '*' constraint).
+
+2002-07-05 Stephane Carrez <stcarrez@nerim.fr>
+
+ * config/m68hc11/m68hc11.md ("*ashlsi3"): Avoid saving y if we know
+ it is dead.
+ ("*ashrsi3"): Likewise.
+ ("*lshrsi3"): Likewise.
+
+2002-07-05 Stephane Carrez <stcarrez@nerim.fr>
+
+ * config/m68hc11/m68hc11.md (peephole2): New peephole2 to optimize
+ address computation and memory moves.
+
+2002-07-03 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/6706
+ * dwarfout.c (output_reg_number): Fix warning message.
+ (output_bound_representation): Check SAVE_EXPR_RTL is not NULL
+ before using it.
+
+2002-07-03 Richard Henderson <rth@redhat.com>
+
+ * config/i386/i386.md (prologue_get_pc): Issue pop here ...
+ * config/i386/i386.c (load_pic_register): ... not here.
+
+2002-07-03 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/rs6000.md (fix_truncdfsi2_internal): Ignore DImode
+ in FPR as preference.
+ (fctiwz): Same.
+ (floatdidf2, fix_truncdfdi2): Same.
+ (floatdisf2, floatditf2, fix_trunctfdi2): Same.
+ (floatditf2): Same.
+ (floatsitf2, fix_trunctfsi2): SImode in GPR.
+ (ctrdi): Remove FPR alternative and splitter.
+
+2002-07-02 Hans-Peter Nilsson <hp@axis.com>
+
+ PR target/7177
+ * config/cris/cris.h (LEGITIMIZE_RELOAD_ADDRESS): Correct number
+ of indirections for register inside sign-extended mem part.
+
+2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * emit-rtl.c (init_emit_once): Add missing cast to HOST_WIDE_INT.
+
+2002-06-30 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/rs6000.md (ctrdi): Allocate pseudo for FPR
+ constraint in define_expand, not splitter.
+
+2002-06-28 Phil Edwards <pme@gcc.gnu.org>
+
+ * configure.in (gcc_gxx_include_dir): Change to match versioned
+ C++ headers if --enable-version-specific-runtime-libs is used.
+ * configure: Regenerate.
+
+2002-06-28 Stephane Carrez <stcarrez@nerim.fr>
+
+ * config/m68hc11/m68hc11.md ("*addsi3"): Use 'o' constraint to
+ avoid the auto increment addressing modes.
+ ("*subsi3"): Likewise.
+ (split for add/sub on address): For 68HC12 push the value on
+ the stack and do the operation with a pop.
+
+2002-06-28 Stephane Carrez <stcarrez@nerim.fr>
+
+ * config/m68hc11/m68hc11.h (OPTIMIZATION_OPTIONS): Define.
+ * config/m68hc11/m68hc11-protos.h (m68hc11_optimization_options):
+ Declare.
+ * config/m68hc11/m68hc11.c (m68hc11_optimization_options): New,
+ do not reorder basic blocks at the end when optimizing for size.
+
+2002-06-28 Stephane Carrez <stcarrez@nerim.fr>
+
+ * config/m68hc11/m68hc11.c (autoinc_mode): New function.
+ (m68hc11_make_autoinc_notes): New function.
+ (m68hc11_split_move): Be very cautious when spliting a move with
+ auto increment/decrement modes because this may result in incompatible
+ directions; add REG_INC notes to the resulting insn for CSE reg.
+
+2002-06-28 Stephane Carrez <Stephane.Carrez@nerim.fr>
+
+ * config/m68hc11/m68hc11.c (register_indirect_p): For 68HC12 a constant
+ can be a valid address.
+
+2002-06-28 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa/xtensa-protos.h (xtensa_return_addr): Declare.
+ config/xtensa/xtensa.c (xtensa_return_addr): New function.
+ config/xtensa/xtensa.h (RETURN_ADDR_RTX): Use xtensa_return_addr.
+ config/xtensa/xtensa.md (fix_return_addr): New pattern.
+
+2002-06-28 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa/xtensa.h (FUNCTION_PROFILER): Respect flag_pic
+ when generating the call to _mcount.
+ (NO_PROFILE_COUNTERS): Define.
+
+2001-06-08 Bernd Schmidt <bernds@redhat.com>
+
+ * emit-rtl.c (gen_lowpart_common): Don't create paradoxical FLOAT_MODE
+ subregs.
+ * recog.c (general_operand, register_operand): Disallow them.
+
+2002-06-27 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa/xtensa.h (ASM_OUTPUT_POOL_PROLOGUE): Pass
+ flag_function_sections as new 3rd arg to resolve_unique_section.
+
+2002-06-27 Neil Booth <neil@daikokuya.co.uk>
+
+ PR preprocessor/7070
+ * c-lex.c (cb_def_pragma): Don't try to spell CPP_EOF.
+
+2002-06-27 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
+
+ * doc/install.texi (Binaries): Add Sinix/Reliant Unix. Move
+ Hitachi entry. Make punctuation more consistent.
+
+2002-06-27 Matt Kraai <kraai@alumni.cmu.edu>
+
+ * doc/install.texi: Change ` bit' to `-bit'.
+ * doc/md.texi: Change `-bits' to `-bit'.
+ * doc/tm.texi: Change `-bits' to ` bits'.
+
+2002-06-24 David S. Miller <davem@redhat.com>
+
+ * config/sparc/sparc.h (INIT_TARGET_OPTABS): If ARCH64, set the
+ 32-bit ABI libfuncs to NULL.
+
+ * expmed.c (expand_divmod): Do not set optab1/optab2 to the shift
+ optabs if op1 is const0_rtx.
+
+2002-06-23 Jan Hubicka <jh@suse.cz>
+
+ * reg-stack.c (convert_regs_exit): Push the registers to stack in
+ proper order.
+
+2002-06-22 Ulrich Weigand <uweigand@de.ibm.com>
+
+ PR middle-end/6963
+ * function.c (assign_stack_temp_for_type): Do not return
+ the same MEM rtx for multiple uses of a stack slot.
+
+2002-06-22 David S. Miller <davem@redhat.com>
+
+ PR target/6841 target/6770 target/6719
+ * config/sparc/sparc.h (PREFERRED_RELOAD_CLASS): Return
+ NO_REGS for constant X when CLASS is GENERAL_OR_FP_REGS or
+ GENERAL_OR_EXTRA_FP_REGS.
+
+2002-06-21 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * config/sparc/t-crtfm (crtfastmath.o): Prefix with $(T) for
+ multilibs.
+ * config/sparc/t-sol2-64 (EXTRA_MULTILIB_PARTS): Add crtfastmath.o.
+ * config/sparc/t-linux64 (EXTRA_MULTILIB_PARTS): Likewise.
+ Fixes PR other/6836.
+
+2002-06-21 Bo Thorsen <bo@suse.de>
+
+ * config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Add i386
+ support so multilib works again. And don't define this at all
+ when -Dinhibit_libc is used.
+
+Thu Jun 20 16:41:40 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * combine.c (gen_lowpart_for_combine): Avoid calling of
+ simplify_gen_subreg on VOIDmode.
+
+ * combine.c (subst): Be prepared for simplify_subreg to return VOIDmode.
+
+2002-06-20 Richard Henderson <rth@redhat.com>
+
+ * c-common.c (c_common_get_alias_set): Correctly handle characters.
+ Rearrange order of expressions; don't handle vectors here.
+ * alias.c (get_alias_set): Let vectors match their components.
+
+2002-06-17 Hans-Peter Nilsson <hp@axis.com>
+
+ PR target/7042
+ * config/cris/cris.c (cris_simple_epilogue): Kludge around reorg.c
+ bug by saing that the epilogue isn't simple if there's a
+ non-empty current_function_epilogue_delay_list.
+ * config/cris/cris.md ("return"): Add sanity check asserting that
+ current_function_epilogue_delay_list is empty.
+
+2002-06-17 Richard Henderson <rth@redhat.com>
+
+ * config/i386/i386.h (BIGGEST_FIELD_ALIGNMENT): Define instead
+ of ADJUST_FIELD_ALIGN if IN_TARGET_LIBS.
+
+2002-06-17 Richard Henderson <rth@redhat.com>
+
+ PR target/6922
+ * expmed.c (make_tree): Handle SIGN_EXTEND/ZERO_EXTEND.
+
+Mon Jun 17 00:31:46 CEST 2002 Jan Hubicka <jH@suse.cz>
+
+ * i386-protos.h (x86_field_alignment): Declare.
+ * i386.c (x86_field_alignment): Define.
+ * i386.h (ADJUST_FIELD_ALIGNMENT): New.
+ (BIGGEST_FIELD_ALIGNMENT): Kill.
+
+2002-06-16 Richard Henderson <rth@redhat.com>
+
+ PR opt/6722
+ * regclass.c (globalize_reg): Update regs_invalidated_by_call.
+
+2002-06-16 Richard Henderson <rth@redhat.com>
+
+ PR c/7030
+ * dwarf2out.c (modified_type_die): Don't assign the qualified die
+ to the unqualified type.
+
+2002-06-14 Jeff Sturm <jsturm@one-point.com>
+
+ * config/sparc/sparc.h (DYNAMIC_CHAIN_ADDRESS): Add
+ SPARC_STACK_BIAS.
+
+2002-06-14 Eric Botcazou <ebotcazou@multimania.com>
+
+ * loop.c (check_final_value): Use v->always_executed
+ instead of v->always_computable.
+ * unroll.c (final_giv_value): Don't calculate the final
+ value as a function of the biv if the giv is not computed
+ for every loop iteration.
+
+2002-06-14 Eric Botcazou <ebotcazou@multimania.com>
+
+ PR c/6677
+ * convert.c (convert_to_integer) [LSHIFT_EXPR]: Don't pass
+ the truncation down when the target type is signed.
+ [trunc1]: Use unsigned arithmetic for LSHIFT_EXPR.
+ * fold-const.c (extract_muldiv) [NOP_EXPR]: Don't pass through
+ the conversion if the target type is a smaller type.
+
+Thu Jun 13 18:27:05 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * i386.c (ix86_expand_movstr): Fix pasto.
+
+Thu Jun 13 18:02:11 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * reload.c (find_valid_class): Fix thinko in my previous patch.
+
+2002-06-13 Hans-Peter Nilsson <hp@axis.com>
+
+ PR target/6997
+ * config/cris/cris.md ("sleu"): Set attribute "cc" to "none".
+
+2002-06-12 Daniel Jacobowitz <drow@mvista.com>
+
+ * config/mips/elf.h (DWARF2_DEBUG_INFO): Define.
+ * config/mips/mips.c (mips_output_filename): Don't print a
+ ".file" directive if we are using DWARF-2.
+ (mips_output_function_prologue): Do not emit source file
+ name for TARGET_GAS.
+
+2002-06-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/s390/s390.md (movsi): Only use floating point
+ register alternatives when operands are already fprs.
+ (movdi_31, movdi_64): Likewise.
+
+2002-06-11 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/s390/s390.md (reload_base, ltorg): Remove.
+ * s390.c (s390_stop_dump_lit_p, s390_dump_literal_pool,
+ s390_asm_output_pool_prologue, s390_pool_start_insn): Remove.
+ * s390-protos.h (s390_stop_dump_lit_p, s390_dump_literal_pool,
+ s390_asm_output_pool_prologue): Likewise.
+ * s390.h (s390_pool_start_insn): Likewise.
+
+ * s390.c (s390_output_symbolic_const): Remove support for
+ old-style pool chunks.
+ (s390_function_epilogue): Likewise.
+ (s390_output_constant_pool): Likewise. Also, fix incorrect
+ alignment for 64-bit literal pools.
+ (print_operand_address): Remove 'y' and 'Y' format flags.
+ * s390.h (ASM_OUTPUT_POOL_PROLOGUE): Remove support for
+ old-style pool chunks.
+ (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Likewise.
+ (ASM_OUTPUT_POOL_EPILOGUE): Remove.
+ (S390_CHUNK_MAX, S390_CHUNK_OV, S390_POOL_MAX): Remove.
+
+ * s390.c (consttable_operand): New function.
+ * s390-protos.h (consttable_operand): Declare it.
+ * s390.h (PREDICATE_CODES): Add consttable_operand.
+ * s390.md (consttable_qi, consttable_hi, consttable_si, consttable_di,
+ consttable_sf, consttable_df, pool_start_31, pool_end_31,
+ pool_start_64, pool_end_64, reload_base, reload_base2): New insns.
+ * s390.c (struct constant, struct constant_pool): New data types.
+ (constant_modes, gen_consttable): New variables.
+ (s390_start_pool, s390_end_pool, s390_add_pool,
+ s390_dump_pool, s390_free_pool): New functions.
+ (s390_chunkify_pool): Completely reimplement literal pool
+ overflow handling.
+
+ * s390.c (s390_pool_overflow): New variable.
+ * s390.h (s390_pool_overflow): Declare it.
+ * s390.md (cjump, icjump): Use it to adapt length for out-of-range
+ jumps in literal pool overflow situations.
+
+ * s390.c (s390_decompose_address): Accept new-style pool chunk offsets.
+ (s390_frame_info): Account for possible use of RETURN_REGNUM
+ by new literal pool overflow code.
+ (s390_emit_prologue): Likewise.
+
+2002-06-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR optimization/6759
+ * cse.c (cse_insn): Fold src_eqv just once, store it folded back into
+ the REQ_EQUAL note.
+
+2002-06-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/6660
+ * c-decl.c (grokfield): Allow user defined types if they declare
+ structs or unions for unnamed fields.
+
+2002-06-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/6809
+ * print-rtl.c (print_mem_expr): Don't crash on unnamed fields.
+
+2002-06-10 Jakub Jelinek <jakub@redhat.com>
+
+ * varasm.c (const_hash): Handle FDESC_EXPR like ADDR_EXPR.
+ (compare_constant): Likewise.
+ (output_addressed_constants): Likewise.
+
+2002-06-10 Jakub Jelinek <jakub@redhat.com>
+
+ * cfgcleanup.c (try_optimize_cfg): Make sure merge_blocks doesn't
+ merge bb with itself.
+
+2002-06-07 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config.gcc (mips*-*-netbsd*): Add mips/t-netbsd to ${tmake_file}.
+ * config/mips/t-netbsd: New file.
+
+2002-06-07 H.J. Lu (hjl@gnu.org)
+
+ * configure.in: Add --enable-__cxa_atexit.
+ * configure: Regenerated.
+ * config.in: Likewise.
+
+ * defaults.h (DEFAULT_USE_CXA_ATEXIT): New. Defined to be 0 if
+ not defined.
+
+2002-06-07 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/mips/netbsd.h (CACHE_FLUSH_FUNC): Define.
+
+Thu Jun 6 07:17:43 2002 Nicola Pero <n.pero@mi.flashnet.it>
+
+ PR objc/6834
+ * objc/objc-lang.c (LANG_HOOKS_GET_ALIAS_SET): Define to be
+ c_common_get_alias_set.
+ (LANG_HOOKS_SAFE_FROM_P): Define to be c_safe_from_p.
+
+2002-06-05 Jeff Law <law@redhat.com>
+
+ * pa.h (EXTRA_CONSTRAINT, T case): Further refine so that it
+ rejects (mem (lo_sum (reg) (unspec))), but will allow
+ (mem (lo_sum (reg) (symbol_ref)) for PA2.0.
+
+2002-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * config/rs6000/linux64.h (ASM_OUTPUT_SOURCE_LINE): Define.
+
+Tue Jun 4 18:16:50 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * dwarf2out.c (expand_builtin_init_dwarf_reg_sizes): Do not initialize
+ fields past the register table.
+
+ * i386.c (classify_argument): Properly handle base classes.
+
+Tue Jun 4 13:09:18 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * loop.c (emit_prefetch_instructions): Properly place the address
+ computation.
+
+ * dwarf2out.c (output_call_frame_info): Do not skip unwind info
+ when flag_asynchronous_unwind_tables is set.
+
+ * i386-protos.h (x86_output_mi_thunk): Declare.
+ * unix.h (ASM_OUTPUT_MI_THUNK): Move offline to ...
+ * i386.c (x86_output_mi_thunk): ... here; handle 64bits.
+
+ * config/i386/i386.c (ix86_expand_int_movcc): Truncate to proper
+ mode.
+
+ * i386.md (movabsdi): Kill broken alternative.
+
+ * i386.c (dbx64_register_map): Fix typo
+
+2002-06-03 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/rs6000/netbsd.h (DRAFT_V4_STRUCT_RET): Remove.
+
+2002-05-31 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * pa-linux.h (WCHAR_UNSIGNED): Define to 0.
+ * pa.h (WCHAR_UNSIGNED): Define to 1.
+
+2002-05-31 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * pa.c (output_millicode_call): Correct "be,l" insn for TARGET_PA_20.
+ (output_call): Likewise.
+
+2002-05-30 Richard Henderson <rth@redhat.com>
+ Eric Botcazou <ebotcazou@multimania.com>
+
+ PR optimization/6822
+ * config/i386/i386.c (ix86_expand_int_movcc): Don't cast INTVAL
+ to unsigned int for op1 comparisons. Use gen_int_mode.
+
+2002-05-30 Marc Espie <espie@openbsd.org>
+
+ * config.gcc (sparc64-*-openbsd*): New.
+ * config/sparc/openbsd1-64.h: New.
+ * config/sparc/openbsd64.h: New.
+
+2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/m68k/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Set to
+ 96 if not __mc68010__.
+
+2002-05-30 Andreas Schwab <schwab@suse.de>
+
+ * config/ia64/sysv4.h (DO_SELECT_SECTION): Also handle
+ FUNCTION_DECLs.
+
+2002-05-30 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/i386/netbsd64.h (CPP_LP64_SPEC): Define.
+ (CPP_SUBTARGET_SPEC): Define.
+ (SUBTARGET_EXTRA_SPECS): Redefine, adding cpp_lp64 and
+ cpp_subtarget specs.
+ (CPP_SPEC): Redefine to include %(cpp_subtarget).
+
+2002-05-29 Hans-Peter Nilsson <hp@axis.com>
+
+ * doc/md.texi (Patterns): Note pattern condition pitfall
+ for unnamed insn.
+
+2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/sparc/netbsd-elf.c (CPP_SUBTARGET_SPEC64): Remove
+ -D__arch64__. Add -D_LP64.
+ (CPP_ARCH32_SPEC): Redefine to match the non-bi-arch version
+ from sparc.h.
+ (CPP_ARCH64_SPEC): Likewise.
+ (NO_BUILTIN_PTRDIFF_TYPE): Undef.
+ (NO_BUILTIN_SIZE_TYPE): Undef.
+
+2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config.gcc (alpha-*-netbsd*): Don't use crtstuff.
+
+2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config/alpha/netbsd.h (CPP_PREDEFINES): Add -D_LP64.
+
+2002-05-29 Richard Henderson <rth@redhat.com>
+
+ * config/i386/i386.c (ix86_compute_frame_layout): Do add bottom
+ alignment for alloca.
+
+2002-05-29 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ PR preprocessor/6844
+ * cppmacro.c (cpp_macro_definition): Reserve space for terminating
+ NUL.
+
+2002-05-29 Joel Sherrill <joel@OARcorp.com>
+
+ * config/rs6000/rs6000.h (ASM_CPU_SPEC): Use -m403 and -m405.
+
+2002-05-29 Hans-Peter Nilsson <hp@axis.com>
+
+ PR target/6838
+ * config/cris/cris.md: Fix typos and thinkos in comments.
+ (splitter for mov_sideqi_mem, mov_sidehi_mem, mov_sidesi_mem):
+ Remove spurious mode specifier on operand 2.
+
+2002-05-29 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/s390/s390.c (legitimate_pic_operand_p): Do not
+ accept symbolic LARL operands.
+ (s390_emit_epilogue): Do not set FRAME_RELATED_P on
+ epilogue insns.
+
+2002-05-28 Marc Espie <espie@openbsd.org>
+ * config/i386/openbsd.h (HAVE_GAS_MAX_SKIP_P2ALIGN): Remove,
+ inherited from gas.h.
+ (ASM_QUAD): Undef. OpenBSD does not support it.
+
+2002-05-28 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * doc/install.texi (binaries): Change mingw binaries
+ link to www.mingw.org.
+
+2002-05-28 Richard Henderson <rth@redhat.com>
+
+ * config/i386/i386.c (ix86_compute_frame_layout): Do not add
+ bottom alignment for leaf functions.
+
+Mon May 27 10:37:28 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * reload.c (find_valid_class): Accept new argument DEST,
+ choose class accordingly.
+ (push_reload): Update callers.
+
+2002-05-26 Richard Henderson <rth@redhat.com>
+
+ 2002-05-25 Richard Henderson <rth@redhat.com>
+ * c-pragma.c (apply_pragma_weak): Convert value identifier to
+ string for decl_attributes.
+ (handle_pragma_weak): Call assemble_alias if we're modifying
+ an existing decl.
+
+ 2002-05-15 Richard Henderson <rth@redhat.com>
+ * varasm.c (merge_weak): Remove special case for extern and common.
+
+ 2002-05-15 Richard Henderson <rth@redhat.com>
+ * varasm.c (merge_weak): Error for any weakening after definition.
+ Adjust weakening after use warning to catch more cases.
+ (assemble_alias): Set TREE_USED and TREE_ASM_WRITTEN consistently.
+ * config/alpha/alpha.c (alpha_encode_section_info): Do not abort.
+
+ 2002-03-02 Richard Henderson <rth@redhat.com>
+ * attribs.c (handle_alias_attribute): Don't call assemble_alias.
+ * toplev.c (rest_of_decl_compilation): Invoke assemble_alias when
+ needed.
+
+2002-05-26 Jakub Jelinek <jakub@redhat.com>
+
+ * cse.c (fold_rtx): Don't optimize if SUBREG changes mode class.
+
+2002-05-25 Richard Henderson <rth@redhat.com>
+
+ PR target/6788
+ * config/sparc/sparc.c (sparc_output_mi_thunk): New implementation
+ using rtl instead of fprintf.
+ * config/sparc/sparc.h (ASM_OUTPUT_MI_THUNK): Use it.
+ * config/sparc/sparc-protos.h: Update.
+
+2002-05-25 Marek Michalkiewicz <marekm@amelek.gda.pl>
+
+ * config/avr/avr.c (avr_handle_progmem_attribute): Handle TYPE_DECL.
+
+ * config/avr/avr.c (machine_dependent_reorg): Sign extend the
+ CONST_INT operand to the correct mode after adding 1 to it.
+
+2002-05-24 Roman Lechtchinsky <rl@cs.tu-berlin.de>
+
+ * config/alpha/unicosmk.h (REAL_VALUE_TO_TARGET_SINGLE,
+ REAL_VALUE_TO_TARGET_DOUBLE): Define for native builds.
+
+2002-05-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR other/6782
+ * final.c (get_mem_expr_from_op): Return 0 if op is NULL.
+
+2002-05-24 David Edelsohn <edelsohn@gnu.org>
+
+ * config/rs6000/aix43.h (LINK_SPEC): Add PE initializer.
+ (STARTFILE_SPEC): Delete PE crt0.o.
+ * config/rs6000/aix51.h: Same.
+ * config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Append [DS] to
+ function descriptor symbol. Use RS6000_OUTPUT_BASENAME.
+ (ASM_OUTPUT_DEF_FROM_DECLS): Use RS6000_OUTPUT_BASENAME.
+ * config/rs6000/xcoff.h (ASM_OUTPUT_DEF): Define.
+
+2002-05-24 Richard Henderson <rth@redhat.com>
+
+ * varasm.c (asm_output_bss): Always output one byte.
+ * config/alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
+
+2002-05-24 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ PR preprocessor/6780
+ * cppmacro.c (enter_macro_context): Clear state.angled_headers.
+
+2002-05-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * bitmap.c (bitmap_find_bit): Return early if we have the correct
+ element cached.
+
+2002-05-24 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * cppinit.c (mark_named_operators): Split out from init_builtins.
+ (struct builtin): Remove operator.
+ (CPLUS, OPERATOR, O): Kill
+ (struct named_op): New.
+ (cpp_finish_options): Call it from here instead.
+ (init_builtins): Don't do named operators.
+
+2002-05-20 David S. Miller <davem@redhat.com>
+
+ * cselib.c (max_value_regs): New.
+ (cselib_lookup, cselib_invalidate_regno): Initialize it when
+ adding new entries to the REG_VALUES table and we are dealing with
+ a hard register.
+ (clear_table): Initialize it.
+ (cselib_invalidate_regno): Use it to determine which hard
+ registers to scan when mode is not VOIDmode.
+
+2002-05-24 Alan Modra <amodra@bigpond.net.au>
+
+ * config/rs6000/rs6000.c (output_toc): Mask longs to 32 bits.
+
+2002-05-23 Hans Boehm <Hans_Boehm@hp.com>
+ * config/ia64/linux.h (IA64_GATE_AREA_END): Adjust for 64K
+ pages.
+
+2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ PR preprocessor/6517
+ * Makefile.in: Update.
+ * c-common.c (c_common_post_options): Add preprocessor
+ errors to the error count.
+ * c-lang.c (c_post_options): Kill.
+ (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
+ * hooks.h: Add header guards.
+ * langhooks-def.h: Include hooks.h.
+ (LANG_HOOKS_POST_OPTIONS): Update.
+ * langhooks.h (struct lang_hooks): Update post_options.
+ * toplev.c (parse_options_and_default_flags): Update.
+objc:
+ * objc-lang.c (objc_post_options): Kill.
+ (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
+
+2002-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/6753
+ * config/i386/i386.md (sse_movdfcc, sse_movdfcc_eq): Use Y instead
+ of x in constraints for clarity.
+ (sse_mov?fcc split): abort if op2 == op3.
+ (sse_movsfcc_const0_1, sse_movsfcc_const0_2, sse_movsfcc_const0_3,
+ sse_movsfcc_const0_4): Add earlyclobber.
+ (sse_movdfcc_const0_1, sse_movdfcc_const0_2, sse_movdfcc_const0_3,
+ sse_movdfcc_const0_4): Likewise. Use DFmode, not SFmode.
+ Use Y instead of x in constraints.
+
+2002-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/6643
+ * emit-rtl.c (widen_memory_access): Only call compare_tree_int
+ if DECL_SIZE_UNIT is INTEGER_CST.
+
+2002-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ * combine.c (force_to_mode): Use gen_int_mode.
+ Don't clear CONST_INT bits outside of mode.
+
+2002-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.in: Fix as version test for binutils 2.12.1 releases
+ (without dates).
+ * configure: Rebuilt.
+
+Wed May 22 14:16:07 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * i386.c (expand_movstr, expand_clrstr): Fix inline-all-stringops
+ sequence.
+ (ix86_expand_clrstr): Fix typo.
+
+2002-05-22 Duraid Madina <duraid@fl.net.au>
+
+ * tradcpp.c (fixup_newlines): Use old-style function header.
+
+2002-05-21 Richard Henderson <rth@redhat.com>
+
+ * system.h (BLOCK_PROFILER, BLOCK_PROFILER_CODE,
+ FUNCTION_BLOCK_PROFILER, FUNCTION_BLOCK_PROFILER_EXIT,
+ MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): Poison.
+
+ * toplev.c (display_help): Kill -a -ax help.
+
+ * config/1750a/1750a.h, config/alpha/alpha.h,
+ config/clipper/clipper.h, config/dsp16xx/dsp16xx.h,
+ config/h8300/h8300.h, config/i960/i960.h, config/m68k/tower-as.h,
+ config/m88k/m88k.h, config/vax/vax.h, config/we32k/we32k.h:
+ (FUNCTION_BLOCK_PROFILER, BLOCK_PROFILER): Kill.
+
+ * libgcc2.c [L_bb] (BLOCK_PROFILER_CODE): Kill.
+ * config/m68k/sun3.h (BLOCK_PROFILER_CODE): Kill.
+
+ * config/i386/i386-protos.h (ix86_output_block_profiler): Kill.
+ (ix86_output_function_block_profiler): Kill.
+ * config/m68hc11/m68hc11.c (m68hc11_block_profiler): Kill.
+ (m68hc11_function_block_profiler): Kill.
+ * config/m68hc11/m68hc11-protos.h: Update.
+ * config/m88k/m88k.c (output_block_profiler): Kill.
+ (output_function_block_profiler): Kill.
+ * config/m88k/m88k-protos.h: Update.
+
+2002-05-21 NIIBE Yutaka <gniibe@m17n.org>
+
+ * reload1.c (do_output_reload): Run delete_output_reload
+ only if optimizing.
+
+2002-05-20 Richard Henderson <rth@redhat.com>
+
+ * cse.c (canon_hash): Reorder do_not_record test. Always
+ allow pic_offset_table_rtx.
+
+2002-05-19 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * doc/contrib.texi: Update my entry.
+
+2002-05-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * mips/iris6.h (CPLUSPLUS_CPP_SPEC): Define.
+
+2002-05-19 Marek Michalkiewicz <marekm@amelek.gda.pl>
+
+ 2002-02-28 Marek Michalkiewicz <marekm@amelek.gda.pl>
+ * config/avr/avr.c (avr_hard_regno_mode_ok): Do not allow r29
+ which may overwrite the high byte of the frame pointer.
+
+2002-03-19 Lars Brinkhoff <lars@nocrew.org>
+
+ * emit-rtl.c (gen_int_mode): New function.
+ * rtl.h: Prototype for it.
+
+Sat May 18 23:09:19 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * i386.md (pushqi2, ashrqi_*): Fix constraint.
+
+2002-05-18 Aldy Hernandez <aldyh@redhat.com>
+
+ * config/rs6000/altivec.h: Cleanups.
+
+2002-05-17 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * doc/install.texi (Specific, mips-sgi-irix6): Document need to
+ bootstrap with -mips3.
+
+2002-05-17 David S. Miller <davem@redhat.com>
+
+ PR c/6689, PR optimization/6615
+ * local-alloc.c (struct equivalence): Rename 'src' to 'src_p'
+ and make it a pointer to rtx. Update comments.
+ (update_equiv_regs): When scanning for equivalences, record
+ address of SET_SRC (set) in reg_equiv[].src_p. Dereference
+ it while making the equiv replacements.
+
+2002-05-17 Kurt Wall <kwall@kurtwerks.com>
+
+ * doc/install.texi (Testing): Mention two common DejaGnu warnings
+ that can be ignored.
+
+2002-05-16 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
+
+ * doc/install.texi (Final install): Recommend to install into a
+ "clean" target directory.
+
+2002-05-17 Andreas Schwab <schwab@suse.de>
+
+ * config/ia64/sysv4.h (DO_SELECT_SECTION): Factored out of
+ SELECT_SECTION.
+ (UNIQUE_SECTION): Define to get small data correctly.
+
+ * varasm.c (resolve_unique_section): Add third parameter
+ flag_function_or_data_sections and use it instead of
+ flag_function_sections.
+ (assemble_start_function): Pass flag_function_sections.
+ (asm_emit_uninitialised): Pass flag_data_sections.
+ (assemble_variable): Likewise.
+
+2002-05-15 Eric Botcazou <ebotcazou@multimania.com>
+
+ * fold-const.c (fold) [LT_EXPR]: Move the transformation of a
+ comparison against the highest or lowest integer value before
+ the 'X >= CST to X > (CST - 1)' and 'X < CST to X <= (CST - 1)'
+ transformation and that of an unsigned comparison against 0
+ right after.
+
+2002-05-16 Richard Henderson <rth@redhat.com>
+
+ PR c/3467
+ * c-decl.c (grokdeclarator): Don't pedwarn variable sized arrays
+ for c99.
+
+2002-05-16 Mark Mitchell <mark@codesourcery.com>
+
+ * cfgrtl.c (purge_dead_edges): Correct handling of EDGE_EH.
+
+2002-05-09 David S. Miller <davem@redhat.com>
+
+ * config/sparc/sol2.h (ASM_CPU_SPEC): Handle -mcpu=v9.
+
+2002-05-07 David S. Miller <davem@redhat.com>
+
+ PR target/6103
+ * config/sparc/sparc.h (TARGET_BUGGY_QP_LIB): Define to zero.
+ * config/sparc/sol2.h (TARGET_BUGGY_QP_LIB): Override to one.
+ * config/sparc/sparc.c (emit_soft_tfmode_libcall): If the Qp
+ library implementation clobbers the output before the inputs
+ are fully consumed, use stack temporary for the output.
+
+Wed May 15 10:38:27 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * invoke.texi (-malign-double): Re-add lost warning.
+
+2002-05-14 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
+
+ * doc/install.texi: Remove special markup originally required for
+ HTML generation with texi2html.
+
+2002-05-14 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
+
+ * doc/install.texi (Specific, *-*-solaris2*): Update passus on
+ setting CONFIG_SHELL to /bin/ksh and remove alternate trick to
+ (possibly) work around broken /bin/sh.
+
+2002-05-08 Jason Merrill <jason@redhat.com>
+
+ PR c++/6381
+ * dwarf2out.c (rtl_for_decl_location): Only expand INTEGER_CST and
+ REAL_CST.
+
+2002-05-14 Release Manager
+
+ * GCC 3.1 Released.
+
+2002-05-10 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * config/mips/t-iris6 (SHLIB_SLIBDIR_SUFFIXES): Use mabi=64 and
+ . as N64/N32 libgcc_s.so subdirs.
+
+2002-05-09 Mark Mitchell <mark@codesourcery.com>
+
+ * config/rs6000/rs6000.h: Revert previous patch.
+
+2002-05-09 Joel Sherrill <joel@OARcorp.com>
+
+ * config/rs6000/rs6000.h CPP_CPU_SPEC): Correct
+ 403 and 405 arguments for binutils 2.12.
+
Thu May 9 12:21:48 2002 Jeffrey A Law (law@redhat.com)
- * pa.c (hppa_profile_hook): Use force_reg to get the address
+ * pa.c (hppa_profile_hook): Use force_reg to get the address
of the profile hook into an appropriate pseudo register.
2002-05-09 Jakub Jelinek <jakub@redhat.com>
@@ -840,7 +2018,7 @@ Sat Apr 20 02:17:38 CEST 2002 Jan Hubicka <jh@suse.cz>
* config/ia64/ia64.c (ia64_function_arg_pass_by_reference): New.
(ia64_va_arg): Expect variable sized types by reference.
* config/ia64/ia64-protos.h: Update.
- * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Use
+ * config/ia64/ia64.h (FUNCTION_ARG_PASS_BY_REFERENCE): Use
ia64_function_arg_pass_by_reference.
2002-04-18 Hans-Peter Nilsson <hp@bitrange.com>
@@ -980,7 +2158,7 @@ Thu Apr 18 15:49:12 CEST 2002 Jan Hubicka <jh@suse.cz>
* stmt.c (expand_start_stmt_expr): Add has_scope parameter.
* tree-inline.c (expand_call_inline): Set STMT_EXPR_NO_SCOPE
on the STMT_EXPR created for the inline function.
-
+
2002-04-16 Richard Henderson <rth@redhat.com>
* config/sparc/sol2-bi.h (AS_SPARC64_FLAG): New.
@@ -1016,7 +2194,7 @@ Thu Apr 18 15:49:12 CEST 2002 Jan Hubicka <jh@suse.cz>
PR target/6305
* config/s390/s390.md (mulsidi3): Set both subregs of the
- multiword register.
+ multiword register.
2002-04-16 Aldy Hernandez <aldyh@redhat.com>
@@ -1070,7 +2248,7 @@ Thu Apr 18 15:49:12 CEST 2002 Jan Hubicka <jh@suse.cz>
* doc/frontends.texi: Remove information about Chill.
* doc/sourcebuild.texi: Likewise.
* doc/standards.texi: Likewise.
-
+
2002-04-15 Douglas B Rupp <rupp@gnat.com>
* config/alpha/vms.h (INCLUDE_DEFAULTS): Add /gnu/lib/gcc-lib/include.
@@ -1085,7 +2263,7 @@ Thu Apr 18 15:49:12 CEST 2002 Jan Hubicka <jh@suse.cz>
(sparc64_initialize_trampoline): Likewise.
(sparc_profile_hook): Likewise.
* config/sparc/sparc.md: Likewise.
-
+
* config/sparc/sparc.c (sparc_extra_constraint_check):
Fix type of argument 'c'.
* config/sparc/sparc-protos.h (sparc_extra_constraint_check):
@@ -1212,7 +2390,7 @@ Fri Apr 12 15:42:59 2002 Jeffrey A Law (law@redhat.com)
* config/ia64/ia64.h (ASM_SPEC): Moved from here ...
* config/ia64/sysv4.h (ASM_SPEC): ... to here, so that it
overrides the definition in config/svr4.h.
-
+
2002-04-12 Eric Norum <eric.norum@usask.ca>
* config/rtems.h, config/a29k/rtems.h, config/arm/rtems-elf.h,
@@ -1322,7 +2500,7 @@ Fri Apr 12 08:06:54 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2002-04-11 Richard Henderson <rth@redhat.com>
* config/sparc/sparc.md (movdi_insn_sp32): Add o/J alternative.
- (movdi_insn_sp32_v9): Likewise. Only allow stx with aligned memory.
+ (movdi_insn_sp32_v9): Likewise. Only allow stx with aligned memory.
(dimode mem/zero splitter): New.
2002-04-11 Hans-Peter Nilsson <hp@axis.com>
@@ -1897,7 +3075,7 @@ Sun Mar 31 14:43:24 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* gcc.c (LIBGCC_SPEC): Folded %L and duplicate %G here...
(LINK_COMMAND_SPEC): ... from here.
- (init_gcc_specs): Duplicate it here too, omitting
+ (init_gcc_specs): Duplicate it here too, omitting
shared_name in the second copy.
(init_spec): Test for duplicate
* config/i386/djgpp.h (LINK_COMMAND_SPEC): Remove `%L %G'.
@@ -1938,7 +3116,7 @@ Sun Mar 31 14:43:24 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* config/sparc/freebsd.h, config/sparc/linux64.h, config/sparc/lite.h,
config/sparc/liteelf.h, config/sparc/netbsd-elf.h,
config/sparc/sol2-sld-64.h, config/sparc/sol2.h,
- config/sparc/sp64-aout.h, config/sparc/sp64-elf.h,
+ config/sparc/sp64-aout.h, config/sparc/sp64-elf.h,
config/sparc/sp86x-aout.h, config/sparc/sp86x-elf.h,
config/sparc/splet.h, config/sparc/vxsparc64.h (TARGET_DEFAULT):
Remove MASK_EPILOGUE.
@@ -2287,7 +3465,7 @@ Wed Mar 27 22:46:04 CET 2002 Jan Hubicka <jh@suse.cz>
2002-03-24 Richard Henderson <rth@redhat.com>
- * recog.c (peephole2_optimize): Split blocks when EH insns are
+ * recog.c (peephole2_optimize): Split blocks when EH insns are
generated in the middle of a block. Do global life update if
zapped EH edges.
@@ -2298,7 +3476,7 @@ Wed Mar 27 22:46:04 CET 2002 Jan Hubicka <jh@suse.cz>
2002-03-24 Neil Booth <neil@daikokuya.demon.co.uk>
preprocessor/3951
- * gcc.c (cpp_options): Pass -MD through as -MD not -M -MF.
+ * gcc.c (cpp_options): Pass -MD through as -MD not -M -MF.
* cppinit.c (cpp_handle_option): Set no_ouput if -MD or -MMD.
(init_dependency_output): Don't make no_output decision here.
@@ -2366,10 +3544,10 @@ Wed Mar 27 22:46:04 CET 2002 Jan Hubicka <jh@suse.cz>
* c-decl.c (finish_decl): Call it.
* cp/decl.c (cp_finish_decl): Likewise.
* doc/extend.texi: Document the new pragmas.
-
+
* config/alpha/osf.h (CPP_SUBTARGET_SPEC): Add __EXTERN_PREFIX.
(HANDLE_PRAGMA_EXTERN_PREFIX): New.
-
+
* config/i386/sol2.h (CPP_PREDEFINES): Add __PRAGMA_REDEFINE_EXTNAME.
(HANDLE_PRAGMA_REDEFINE_EXTNAME): New.
* config/sparc/sol2.h: Likewise.
@@ -2387,7 +3565,7 @@ Wed Mar 27 22:46:04 CET 2002 Jan Hubicka <jh@suse.cz>
(PREFERRED_RELOAD_CLASS): Move code to xtensa_preferred_reload_class.
* config/xtensa/xtensa.md (movsi_internal, movhi_internal,
movqi_internal): Use xtensa_valid_move instead of non_acc_reg_operand.
-
+
2002-03-22 Jakub Jelinek <jakub@redhat.com>
PR optimization/5854
@@ -2677,7 +3855,7 @@ Tue Mar 19 14:12:32 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2002-03-18 Mark Mitchell <mark@codesourcery.com>
- * calls.c (precompute_arguments): Do not assume that temporaries
+ * calls.c (precompute_arguments): Do not assume that temporaries
can be destroyed after expanding the argument.
(expand_call): Likewise.
@@ -2686,7 +3864,7 @@ Tue Mar 19 14:12:32 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* gcc.c (struct compiler default_compilers): Add
-no-integrated-cpp flag to invoke an external cpp.
(struct option_map option_map[]): Likewise.
- * objc/lang-specs.h (struct compiler default_compilers): Add
+ * objc/lang-specs.h (struct compiler default_compilers): Add
-no-integrated-cpp flag to invoke an external cpp.
* doc/invoke.texi: Document -no-integrated-cpp flag.
@@ -2709,7 +3887,7 @@ Tue Mar 19 14:12:32 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
(COLLECT_EXPORT_LIST): Delete.
* config/rs6000/aix.h (HANDLE_SYSV_PRAGMA): Define.
* config/rs6000/darwin.h (HANDLE_SYSV_PRAGMA): Define.
-
+
2002-03-18 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.h (GO_IF_MODE_DEPENDENT_ADDRESS): Treat
@@ -2763,7 +3941,7 @@ Mon Mar 18 18:12:48 CET 2002 Jan Hubicka <jh@suse.cz>
* config/arm/coff.h (JUMP_TABLES_IN_TEXT_SECTION): Likewise.
* arm.c (get_jump_table_size): If the table is not in the text
section, return zero.
-
+
2002-03-17 Richard Henderson <rth@redhat.com>
* config/alpha/alpha.c (alpha_emit_set_const_1): Build add insns
@@ -3357,7 +4535,7 @@ Fri Mar 8 06:48:45 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2002-03-06 Ulrich Weigand <uweigand@de.ibm.com>
- * simplify-rtx.c (simplify_plus_minus): Do not abort,
+ * simplify-rtx.c (simplify_plus_minus): Do not abort,
but simply fail if the expression is too complex to simplify.
(simplify_gen_binary): Handle simplify_plus_minus failures.
@@ -5209,7 +6387,7 @@ Sat Feb 9 18:28:02 CET 2002 Jan Hubicka <jh@suse.cz>
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Use trampoline to
copy FP regs to general-purpose regs only in outgoing calls.
* config/sh/sh.md (movdf_media, movsf_media): Revert incorrect
- change from 2000-10-30. Adjust for 64-bit (or 32-bit)
+ change from 2000-10-30. Adjust for 64-bit (or 32-bit)
HOST_WIDE_INT.
* config/sh/sh.h (struct sh_args): Document all fields.
(FUNCTION_OK_FOR_SIBCALL): Functions that receive arguments
@@ -5302,7 +6480,7 @@ Sat Feb 9 18:28:02 CET 2002 Jan Hubicka <jh@suse.cz>
* config/sh/sh.md (call, call_value, sibcall): Simplify
copying of non-branch-target register.
2000-12-22 Alexandre Oliva <aoliva@redhat.com>
- * glimits.h (__LONG_MAX__): Revert 2000-12-13's patch.
+ * glimits.h (__LONG_MAX__): Revert 2000-12-13's patch.
* config/sh/sh.h (CPP_SPEC): Define it here for 64-bit SHmedia.
2000-12-22 Alexandre Oliva <aoliva@redhat.com>
* config/sh/sh.h (GET_SH_ARG_CLASS): Handle complex
@@ -5532,7 +6710,7 @@ Sat Feb 9 18:28:02 CET 2002 Jan Hubicka <jh@suse.cz>
(UNSPEC_COMPACT_ARGS): New.
(type): Added pt and ptabs.
(length): Default to 4 on SHmedia. Default pt length to 12
- and 20 on SHmedia32 and SHmedia64, respectively.
+ and 20 on SHmedia32 and SHmedia64, respectively.
(pt): New function unit.
(movdi, movsi): Add types pt and ptabs. Don't increment LABEL_NUSES.
Add whitespace between operands of SHmedia instructions.
diff --git a/contrib/gcc/Makefile.in b/contrib/gcc/Makefile.in
index c359341..7a0161f 100644
--- a/contrib/gcc/Makefile.in
+++ b/contrib/gcc/Makefile.in
@@ -541,6 +541,7 @@ CONFIG_H = $(GCONFIG_H) insn-constants.h insn-flags.h
TCONFIG_H = tconfig.h $(xm_file_list)
TARGET_H = target.h
HOOKS_H = hooks.h
+LANGHOOKS_DEF_H = langhooks.h $(HOOKS_H)
TARGET_DEF_H = target-def.h $(HOOKS_H)
TM_P_H = tm_p.h $(tm_p_file_list) tm-preds.h
@@ -1212,7 +1213,7 @@ s-under: $(GCC_PASSES)
c-common.o : c-common.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(OBSTACK_H) \
$(C_COMMON_H) flags.h toplev.h output.h c-pragma.h $(RTL_H) $(GGC_H) \
$(EXPR_H) $(TM_P_H) builtin-types.def builtin-attrs.def $(TARGET_H) \
- diagnostic.h tree-inline.h
+ diagnostic.h tree-inline.h $(LANGHOOKS_DEF_H)
# A file used by all variants of C and some other languages.
@@ -1327,7 +1328,7 @@ convert.o: convert.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h convert.h toplev.
langhooks.o : langhooks.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) toplev.h \
tree-inline.h $(RTL_H) insn-config.h integrate.h langhooks.h \
- langhooks-def.h flags.h
+ $(LANGHOOKS_DEF_H) flags.h
tree.o : tree.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) flags.h function.h toplev.h \
$(GGC_H) $(HASHTAB_H) $(TARGET_H) output.h $(TM_P_H) langhooks.h
tree-dump.o: tree-dump.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(C_TREE_H) \
diff --git a/contrib/gcc/alias.c b/contrib/gcc/alias.c
index c5a6265..6d4104e 100644
--- a/contrib/gcc/alias.c
+++ b/contrib/gcc/alias.c
@@ -564,6 +564,14 @@ get_alias_set (t)
and references to functions, but that's different.) */
else if (TREE_CODE (t) == FUNCTION_TYPE)
set = 0;
+
+ /* Unless the language specifies otherwise, let vector types alias
+ their components. This avoids some nasty type punning issues in
+ normal usage. And indeed lets vectors be treated more like an
+ array slice. */
+ else if (TREE_CODE (t) == VECTOR_TYPE)
+ set = get_alias_set (TREE_TYPE (t));
+
else
/* Otherwise make a new alias set for this type. */
set = new_alias_set ();
diff --git a/contrib/gcc/attribs.c b/contrib/gcc/attribs.c
index b915c88..47b7cf2 100644
--- a/contrib/gcc/attribs.c
+++ b/contrib/gcc/attribs.c
@@ -1050,7 +1050,6 @@ handle_alias_attribute (node, name, args, flags, no_add_attrs)
DECL_INITIAL (decl) = error_mark_node;
else
DECL_EXTERNAL (decl) = 0;
- assemble_alias (decl, id);
}
else
{
diff --git a/contrib/gcc/bb-reorder.c b/contrib/gcc/bb-reorder.c
index 2578604..b0cc462 100644
--- a/contrib/gcc/bb-reorder.c
+++ b/contrib/gcc/bb-reorder.c
@@ -211,17 +211,21 @@ make_reorder_chain_1 (bb, prev)
/* In the absence of a prediction, disturb things as little as possible
by selecting the old "next" block from the list of successors. If
there had been a fallthru edge, that will be the one. */
+ /* Note that the fallthru block may not be next any time we eliminate
+ forwarder blocks. */
if (! next)
{
for (e = bb->succ; e ; e = e->succ_next)
- if (e->dest->index == bb->index + 1)
+ if (e->flags & EDGE_FALLTHRU)
{
- if ((e->flags & EDGE_FALLTHRU)
- || (e->dest->succ
- && ! (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH))))
- next = e->dest;
+ next = e->dest;
break;
}
+ else if (e->dest->index == bb->index + 1)
+ {
+ if (! (e->flags & (EDGE_ABNORMAL_CALL | EDGE_EH)))
+ next = e->dest;
+ }
}
/* Make sure we didn't select a silly next block. */
diff --git a/contrib/gcc/bitmap.c b/contrib/gcc/bitmap.c
index b735d14..786689b 100644
--- a/contrib/gcc/bitmap.c
+++ b/contrib/gcc/bitmap.c
@@ -300,8 +300,9 @@ bitmap_find_bit (head, bit)
bitmap_element *element;
unsigned HOST_WIDE_INT indx = bit / BITMAP_ELEMENT_ALL_BITS;
- if (head->current == 0)
- return 0;
+ if (head->current == 0
+ || head->indx == indx)
+ return head->current;
if (head->indx > indx)
for (element = head->current;
diff --git a/contrib/gcc/c-common.c b/contrib/gcc/c-common.c
index 8275df6..066cb7c 100644
--- a/contrib/gcc/c-common.c
+++ b/contrib/gcc/c-common.c
@@ -2326,10 +2326,6 @@ c_common_get_alias_set (t)
{
tree u;
- /* We know nothing about vector types */
- if (TREE_CODE (t) == VECTOR_TYPE)
- return 0;
-
/* Permit type-punning when accessing a union, provided the access
is directly through the union. For example, this code does not
permit taking the address of a union member and then storing
@@ -2343,17 +2339,17 @@ c_common_get_alias_set (t)
&& TREE_CODE (TREE_TYPE (TREE_OPERAND (u, 0))) == UNION_TYPE)
return 0;
- /* If this is a char *, the ANSI C standard says it can alias
- anything. Note that all references need do this. */
- if (TREE_CODE_CLASS (TREE_CODE (t)) == 'r'
- && TREE_CODE (TREE_TYPE (t)) == INTEGER_TYPE
- && TYPE_PRECISION (TREE_TYPE (t)) == TYPE_PRECISION (char_type_node))
- return 0;
-
/* That's all the expressions we handle specially. */
if (! TYPE_P (t))
return -1;
+ /* The C standard guarantess that any object may be accessed via an
+ lvalue that has character type. */
+ if (t == char_type_node
+ || t == signed_char_type_node
+ || t == unsigned_char_type_node)
+ return 0;
+
/* The C standard specifically allows aliasing between signed and
unsigned variants of the same type. We treat the signed
variant as canonical. */
@@ -3568,6 +3564,7 @@ c_expand_expr (exp, target, tmode, modifier)
tree rtl_expr;
rtx result;
bool preserve_result = false;
+ bool return_target = false;
/* Since expand_expr_stmt calls free_temp_slots after every
expression statement, we must call push_temp_slots here.
@@ -3595,8 +3592,20 @@ c_expand_expr (exp, target, tmode, modifier)
if (TREE_CODE (last) == SCOPE_STMT
&& TREE_CODE (expr) == EXPR_STMT)
{
- TREE_ADDRESSABLE (expr) = 1;
- preserve_result = true;
+ if (target && TREE_CODE (EXPR_STMT_EXPR (expr)) == VAR_DECL
+ && DECL_RTL_IF_SET (EXPR_STMT_EXPR (expr)) == target)
+ /* If the last expression is a variable whose RTL is the
+ same as our target, just return the target; if it
+ isn't valid expanding the decl would produce different
+ RTL, and store_expr would try to do a copy. */
+ return_target = true;
+ else
+ {
+ /* Otherwise, note that we want the value from the last
+ expression. */
+ TREE_ADDRESSABLE (expr) = 1;
+ preserve_result = true;
+ }
}
}
@@ -3604,7 +3613,9 @@ c_expand_expr (exp, target, tmode, modifier)
expand_end_stmt_expr (rtl_expr);
result = expand_expr (rtl_expr, target, tmode, modifier);
- if (preserve_result && GET_CODE (result) == MEM)
+ if (return_target)
+ result = target;
+ else if (preserve_result && GET_CODE (result) == MEM)
{
if (GET_MODE (result) != BLKmode)
result = copy_to_reg (result);
@@ -4161,6 +4172,10 @@ c_common_post_options ()
warning ("-Wformat-security ignored without -Wformat");
if (warn_missing_format_attribute && !warn_format)
warning ("-Wmissing-format-attribute ignored without -Wformat");
+
+ /* If an error has occurred in cpplib, note it so we fail
+ immediately. */
+ errorcount += cpp_errors (parse_in);
}
/* Front end initialization common to C, ObjC and C++. */
diff --git a/contrib/gcc/c-decl.c b/contrib/gcc/c-decl.c
index 2628257..a6e010b 100644
--- a/contrib/gcc/c-decl.c
+++ b/contrib/gcc/c-decl.c
@@ -3911,6 +3911,7 @@ build_compound_literal (type, init)
DECL_CONTEXT (decl) = current_function_decl;
TREE_USED (decl) = 1;
TREE_TYPE (decl) = type;
+ TREE_READONLY (decl) = TREE_READONLY (type);
store_init_value (decl, init);
if (TREE_CODE (type) == ARRAY_TYPE && !COMPLETE_TYPE_P (type))
@@ -3933,12 +3934,18 @@ build_compound_literal (type, init)
if (TREE_STATIC (decl))
{
/* This decl needs a name for the assembler output. We also need
- a unique suffix to be added to the name, for which DECL_CONTEXT
- must be set. */
- DECL_NAME (decl) = get_identifier ("__compound_literal");
- DECL_CONTEXT (decl) = complit;
+ a unique suffix to be added to the name. */
+ char *name;
+ extern int var_labelno;
+
+ ASM_FORMAT_PRIVATE_NAME (name, "__compound_literal", var_labelno);
+ var_labelno++;
+ DECL_NAME (decl) = get_identifier (name);
+ DECL_DEFER_OUTPUT (decl) = 1;
+ DECL_COMDAT (decl) = 1;
+ DECL_ARTIFICIAL (decl) = 1;
+ pushdecl (decl);
rest_of_decl_compilation (decl, NULL, 1, 0);
- DECL_CONTEXT (decl) = NULL_TREE;
}
return complit;
@@ -4617,7 +4624,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
even if it is (eg) a const variable with known value. */
size_varies = 1;
- if (pedantic)
+ if (!flag_isoc99 && pedantic)
{
if (TREE_CONSTANT (size))
pedwarn ("ISO C89 forbids array `%s' whose size can't be evaluated",
@@ -5591,8 +5598,11 @@ grokfield (filename, line, declarator, declspecs, width)
{
/* This is an unnamed decl. We only support unnamed
structs/unions, so check for other things and refuse them. */
- if (TREE_CODE (TREE_VALUE (declspecs)) != RECORD_TYPE
- && TREE_CODE (TREE_VALUE (declspecs)) != UNION_TYPE)
+ tree type = TREE_VALUE (declspecs);
+
+ if (TREE_CODE (type) == TYPE_DECL)
+ type = TREE_TYPE (type);
+ if (TREE_CODE (type) != RECORD_TYPE && TREE_CODE (type) != UNION_TYPE)
{
error ("unnamed fields of type other than struct or union are not allowed");
return NULL_TREE;
diff --git a/contrib/gcc/c-lang.c b/contrib/gcc/c-lang.c
index aa6c2ff..2b7d473 100644
--- a/contrib/gcc/c-lang.c
+++ b/contrib/gcc/c-lang.c
@@ -29,7 +29,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
static const char *c_init PARAMS ((const char *));
static void c_init_options PARAMS ((void));
-static void c_post_options PARAMS ((void));
/* ### When changing hooks, consider if ObjC needs changing too!! ### */
@@ -44,7 +43,7 @@ static void c_post_options PARAMS ((void));
#undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION c_decode_option
#undef LANG_HOOKS_POST_OPTIONS
-#define LANG_HOOKS_POST_OPTIONS c_post_options
+#define LANG_HOOKS_POST_OPTIONS c_common_post_options
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
#undef LANG_HOOKS_SAFE_FROM_P
@@ -74,13 +73,6 @@ static void c_post_options PARAMS ((void));
/* Each front end provides its own. */
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
-/* Post-switch processing. */
-static void
-c_post_options ()
-{
- c_common_post_options ();
-}
-
static void
c_init_options ()
{
diff --git a/contrib/gcc/c-lex.c b/contrib/gcc/c-lex.c
index 9eb308c..48b087e 100644
--- a/contrib/gcc/c-lex.c
+++ b/contrib/gcc/c-lex.c
@@ -334,20 +334,21 @@ cb_def_pragma (pfile, line)
-Wunknown-pragmas has been given. */
if (warn_unknown_pragmas > in_system_header)
{
- const unsigned char *space, *name = 0;
+ const unsigned char *space, *name;
const cpp_token *s;
+ space = name = (const unsigned char *) "";
s = cpp_get_token (pfile);
- space = cpp_token_as_text (pfile, s);
- s = cpp_get_token (pfile);
- if (s->type == CPP_NAME)
- name = cpp_token_as_text (pfile, s);
+ if (s->type != CPP_EOF)
+ {
+ space = cpp_token_as_text (pfile, s);
+ s = cpp_get_token (pfile);
+ if (s->type == CPP_NAME)
+ name = cpp_token_as_text (pfile, s);
+ }
lineno = SOURCE_LINE (map, line);
- if (name)
- warning ("ignoring #pragma %s %s", space, name);
- else
- warning ("ignoring #pragma %s", space);
+ warning ("ignoring #pragma %s %s", space, name);
}
}
diff --git a/contrib/gcc/c-pragma.c b/contrib/gcc/c-pragma.c
index d5df355..a0a99fd 100644
--- a/contrib/gcc/c-pragma.c
+++ b/contrib/gcc/c-pragma.c
@@ -284,9 +284,14 @@ apply_pragma_weak (decl, value)
tree decl, value;
{
if (value)
- decl_attributes (&decl, build_tree_list (get_identifier ("alias"),
- build_tree_list (NULL, value)),
- 0);
+ {
+ value = build_string (IDENTIFIER_LENGTH (value),
+ IDENTIFIER_POINTER (value));
+ decl_attributes (&decl, build_tree_list (get_identifier ("alias"),
+ build_tree_list (NULL, value)),
+ 0);
+ }
+
if (SUPPORTS_WEAK && DECL_EXTERNAL (decl) && TREE_USED (decl)
&& TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
warning_with_decl (decl, "applying #pragma weak `%s' after first use results in unspecified behavior");
@@ -343,7 +348,11 @@ handle_pragma_weak (dummy)
decl = identifier_global_value (name);
if (decl && TREE_CODE_CLASS (TREE_CODE (decl)) == 'd')
- apply_pragma_weak (decl, value);
+ {
+ apply_pragma_weak (decl, value);
+ if (value)
+ assemble_alias (decl, value);
+ }
else
pending_weaks = tree_cons (name, value, pending_weaks);
}
diff --git a/contrib/gcc/cfgcleanup.c b/contrib/gcc/cfgcleanup.c
index ed48b6e..32ae77a 100644
--- a/contrib/gcc/cfgcleanup.c
+++ b/contrib/gcc/cfgcleanup.c
@@ -1634,6 +1634,7 @@ try_optimize_cfg (mode)
&& !(s->flags & EDGE_COMPLEX)
&& (c = s->dest) != EXIT_BLOCK_PTR
&& c->pred->pred_next == NULL
+ && b != c
/* If the jump insn has side effects,
we can't kill the edge. */
&& (GET_CODE (b->end) != JUMP_INSN
diff --git a/contrib/gcc/cfgrtl.c b/contrib/gcc/cfgrtl.c
index 5e8bde2..bbcdfbb 100644
--- a/contrib/gcc/cfgrtl.c
+++ b/contrib/gcc/cfgrtl.c
@@ -953,9 +953,21 @@ force_nonfallthru_and_redirect (e, target)
if (e->src->succ->succ_next)
{
/* Create the new structures. */
+
+ /* Position the new block correctly relative to loop notes. */
note = last_loop_beg_note (e->src->end);
- jump_block
- = create_basic_block (e->src->index + 1, NEXT_INSN (note), NULL);
+ note = NEXT_INSN (note);
+
+ /* ... and ADDR_VECs. */
+ if (note != NULL
+ && GET_CODE (note) == CODE_LABEL
+ && NEXT_INSN (note)
+ && GET_CODE (NEXT_INSN (note)) == JUMP_INSN
+ && (GET_CODE (PATTERN (NEXT_INSN (note))) == ADDR_DIFF_VEC
+ || GET_CODE (PATTERN (NEXT_INSN (note))) == ADDR_VEC))
+ note = NEXT_INSN (NEXT_INSN (note));
+
+ jump_block = create_basic_block (e->src->index + 1, note, NULL);
jump_block->count = e->count;
jump_block->frequency = EDGE_FREQUENCY (e);
jump_block->loop_depth = target->loop_depth;
@@ -1954,17 +1966,26 @@ purge_dead_edges (bb)
e->flags &= ~EDGE_ABNORMAL;
- /* Check purposes we can have edge. */
- if ((e->flags & EDGE_FALLTHRU)
- && any_condjump_p (insn))
+ /* See if this edge is one we should keep. */
+ if ((e->flags & EDGE_FALLTHRU) && any_condjump_p (insn))
+ /* A conditional jump can fall through into the next
+ block, so we should keep the edge. */
continue;
else if (e->dest != EXIT_BLOCK_PTR
&& e->dest->head == JUMP_LABEL (insn))
+ /* If the destination block is the target of the jump,
+ keep the edge. */
+ continue;
+ else if (e->dest == EXIT_BLOCK_PTR && returnjump_p (insn))
+ /* If the destination block is the exit block, and this
+ instruction is a return, then keep the edge. */
continue;
- else if (e->dest == EXIT_BLOCK_PTR
- && returnjump_p (insn))
+ else if ((e->flags & EDGE_EH) && can_throw_internal (insn))
+ /* Keep the edges that correspond to exceptions thrown by
+ this instruction. */
continue;
+ /* We do not need this edge. */
purged = true;
remove_edge (e);
}
diff --git a/contrib/gcc/collect2.c b/contrib/gcc/collect2.c
index 6fb2efd..933a277 100644
--- a/contrib/gcc/collect2.c
+++ b/contrib/gcc/collect2.c
@@ -577,6 +577,15 @@ is_ctor_dtor (s)
const char *orig_s = s;
static const struct names special[] = {
+#ifndef NO_DOLLAR_IN_LABEL
+ { "GLOBAL__I$", sizeof ("GLOBAL__I$")-1, 1, 0 },
+ { "GLOBAL__D$", sizeof ("GLOBAL__D$")-1, 2, 0 },
+#else
+#ifndef NO_DOT_IN_LABEL
+ { "GLOBAL__I.", sizeof ("GLOBAL__I.")-1, 1, 0 },
+ { "GLOBAL__D.", sizeof ("GLOBAL__D.")-1, 2, 0 },
+#endif /* NO_DOT_IN_LABEL */
+#endif /* NO_DOLLAR_IN_LABEL */
{ "GLOBAL__I_", sizeof ("GLOBAL__I_")-1, 1, 0 },
{ "GLOBAL__D_", sizeof ("GLOBAL__D_")-1, 2, 0 },
{ "GLOBAL__F_", sizeof ("GLOBAL__F_")-1, 5, 0 },
diff --git a/contrib/gcc/combine.c b/contrib/gcc/combine.c
index bb22b0c..acaf3b1 100644
--- a/contrib/gcc/combine.c
+++ b/contrib/gcc/combine.c
@@ -3539,11 +3539,12 @@ subst (x, from, to, in_dest, unique_copy)
if (GET_CODE (new) == CONST_INT && GET_CODE (x) == SUBREG)
{
- x = simplify_subreg (GET_MODE (x), new,
+ enum machine_mode mode = GET_MODE (x);
+ x = simplify_subreg (mode, new,
GET_MODE (SUBREG_REG (x)),
SUBREG_BYTE (x));
if (! x)
- abort ();
+ x = gen_rtx_CLOBBER (mode, const0_rtx);
}
else if (GET_CODE (new) == CONST_INT
&& GET_CODE (x) == ZERO_EXTEND)
@@ -6697,18 +6698,7 @@ force_to_mode (x, mode, mask, reg, just_select)
/* If X is a CONST_INT, return a new one. Do this here since the
test below will fail. */
if (GET_CODE (x) == CONST_INT)
- {
- HOST_WIDE_INT cval = INTVAL (x) & mask;
- int width = GET_MODE_BITSIZE (mode);
-
- /* If MODE is narrower that HOST_WIDE_INT and CVAL is a negative
- number, sign extend it. */
- if (width > 0 && width < HOST_BITS_PER_WIDE_INT
- && (cval & ((HOST_WIDE_INT) 1 << (width - 1))) != 0)
- cval |= (HOST_WIDE_INT) -1 << width;
-
- return GEN_INT (cval);
- }
+ return gen_int_mode (INTVAL (x) & mask, mode);
/* If X is narrower than MODE and we want all the bits in X's mode, just
get X in the proper mode. */
@@ -6914,14 +6904,6 @@ force_to_mode (x, mode, mask, reg, just_select)
force_to_mode (XEXP (x, 1), mode, mask,
reg, next_select));
- /* If OP1 is a CONST_INT and X is an IOR or XOR, clear bits outside
- MASK since OP1 might have been sign-extended but we never want
- to turn on extra bits, since combine might have previously relied
- on them being off. */
- if (GET_CODE (op1) == CONST_INT && (code == IOR || code == XOR)
- && (INTVAL (op1) & mask) != 0)
- op1 = GEN_INT (INTVAL (op1) & mask);
-
if (op_mode != GET_MODE (x) || op0 != XEXP (x, 0) || op1 != XEXP (x, 1))
x = gen_binary (code, op_mode, op0, op1);
break;
@@ -9865,6 +9847,12 @@ gen_lowpart_for_combine (mode, x)
int offset = 0;
rtx res;
+ /* We can't handle VOIDmodes. We can get here when generating vector
+ modes since these, unlike integral and floating point modes are not
+ handled earlier. */
+ if (GET_MODE (x) == VOIDmode)
+ return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx);
+
offset = subreg_lowpart_offset (mode, GET_MODE (x));
res = simplify_gen_subreg (mode, x, GET_MODE (x), offset);
if (res)
diff --git a/contrib/gcc/config.gcc b/contrib/gcc/config.gcc
index 6736c3a..80664e1 100644
--- a/contrib/gcc/config.gcc
+++ b/contrib/gcc/config.gcc
@@ -365,6 +365,16 @@ esac
case $machine in
*-*-linux*)
xm_defines=POSIX
+ case $machine in
+ *-*-linux*ecoff* | *-*-linux*libc1* | *-*-linux*oldld* | *-*-linux*aout*)
+ ;;
+ *)
+ case x${enable_threads} in
+ x | xyes | xposix) thread_file='posix'
+ ;;
+ esac
+ ;;
+ esac
;;
*-*-gnu*)
# On the Hurd, the setup is just about the same on
@@ -558,9 +568,6 @@ alpha*-*-linux*)
tmake_file="t-slibgcc-elf-ver t-linux alpha/t-crtfm alpha/t-alpha alpha/t-ieee"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
gas=yes gnu_ld=yes
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
alpha*-*-freebsd*)
tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
@@ -572,7 +579,6 @@ alpha*-*-netbsd*)
tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
target_cpu_default="MASK_GAS"
tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee"
- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
;;
alpha*-*-openbsd*)
@@ -872,9 +878,6 @@ hppa*-*-linux* | parisc*-*-linux*)
tmake_file="t-slibgcc-elf-ver t-linux pa/t-linux"
extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
gas=yes gnu_ld=yes
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
hppa*-*-openbsd*)
target_cpu_default="MASK_PA_11"
@@ -1118,9 +1121,6 @@ i370-*-linux*)
gnu_ld=yes
gas=yes
elf=yes
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
i[34567]86-*-chorusos*)
xm_defines=POSIX
@@ -1317,9 +1317,6 @@ i[34567]86-*-linux*) # Intel 80386's running GNU/Linux
extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
gnu_ld=yes
float_format=i386
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
x86_64-*-linux*)
tm_file="${tm_file} i386/att.h dbxelf.h elfos.h svr4.h linux.h \
@@ -1328,9 +1325,6 @@ x86_64-*-linux*)
extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
gnu_ld=yes
float_format=i386
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
i[34567]86-*-gnu*)
float_format=i386
@@ -1706,9 +1700,6 @@ ia64*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h ia64/sysv4.h ia64/linux.h"
tmake_file="t-slibgcc-elf-ver t-linux ia64/t-ia64 ia64/t-glibc"
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
float_format=i386
;;
ia64*-*-hpux*)
@@ -2099,9 +2090,6 @@ m68k-*-linux*) # Motorola m68k's running GNU/Linux
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
float_format=m68k
gnu_ld=yes
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
m68k-*-psos*)
tmake_file=m68k/t-m68kbare
@@ -2379,6 +2367,7 @@ mips*-*-netbsd*) # NetBSD/mips, either endian.
tm_file="mips/little.h $tm_file"
;;
esac
+ tmake_file="${tmake_file} mips/t-netbsd"
;;
mips*-*-linux*) # Linux MIPS, either endian.
tm_file="dbxelf.h elfos.h svr4.h linux.h mips/linux.h"
@@ -2397,9 +2386,6 @@ mips*-*-linux*) # Linux MIPS, either endian.
extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
gnu_ld=yes
gas=yes
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
mips*el-*-openbsd*) # mips little endian
target_cpu_default="MASK_GAS|MASK_ABICALLS"
@@ -2867,17 +2853,11 @@ powerpc-*-linux-gnualtivec*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h"
out_file=rs6000/rs6000.c
tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
powerpc-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/linux.h"
out_file=rs6000/rs6000.c
tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
powerpc-*-gnu-gnualtivec*)
tm_file="${cpu_type}/${cpu_type}.h elfos.h svr4.h freebsd-spec.h gnu.h rs6000/sysv4.h rs6000/linux.h rs6000/linuxaltivec.h rs6000/gnu.h"
@@ -2993,9 +2973,6 @@ s390-*-linux*)
tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
s390x-*-linux*)
tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
@@ -3004,9 +2981,6 @@ s390x-*-linux*)
out_file=s390/s390.c
tmake_file="t-slibgcc-elf-ver t-linux s390/t-linux s390/t-linux64"
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
sh-*-elf*)
tmake_file="sh/t-sh sh/t-elf"
@@ -3045,9 +3019,6 @@ sh-*-linux*)
tm_file="${tm_file} sh/elf.h sh/linux.h"
tmake_file="sh/t-sh sh/t-elf sh/t-linux"
gas=yes gnu_ld=yes
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
float_format=sh
;;
sh-*-*)
@@ -3087,6 +3058,13 @@ sparc-*-openbsd*)
# we need collect2 until our bug is fixed...
use_collect2=yes
;;
+sparc64-*-openbsd*)
+ tm_file="sparc/openbsd1-64.h sparc/sparc.h elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/sp64-elf.h openbsd.h sparc/openbsd64.h"
+ xm_file=sparc/xm-sp64.h
+ gas=yes gnu_ld=yes
+ with_cpu=ultrasparc
+ float_format=i128
+ ;;
sparc-*-bsd*)
tm_file="${tm_file} sparc/bsd.h"
;;
@@ -3124,9 +3102,6 @@ sparc-*-linux*) # Sparc's running GNU/Linux, libc6
tmake_file="t-slibgcc-elf-ver t-linux sparc/t-crtfm"
extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
gnu_ld=yes
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
float_format=sparc
;;
sparc-*-lynxos*)
@@ -3325,9 +3300,6 @@ sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/linux64.h"
extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
gnu_ld=yes
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
float_format=sparc
;;
sparc64-*-netbsd*)
@@ -3457,9 +3429,6 @@ xtensa-*-linux*)
tmake_file="t-linux xtensa/t-xtensa"
extra_parts="crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o"
gas=yes gnu_ld=yes
- if test x$enable_threads = xyes; then
- thread_file='posix'
- fi
;;
*)
echo "Configuration $machine not supported" 1>&2
diff --git a/contrib/gcc/config.in b/contrib/gcc/config.in
index 06f9742..ec5be95 100644
--- a/contrib/gcc/config.in
+++ b/contrib/gcc/config.in
@@ -296,6 +296,12 @@
every opportunity. This is extremely expensive. */
#undef ENABLE_GC_ALWAYS_COLLECT
+/* Define if you want to use __cxa_atexit, rather than atexit, to
+ register C++ destructors for local statics and global objects.
+ This is essential for fully standards-compliant handling of
+ destructors, but requires __cxa_atexit in libc. */
+#undef DEFAULT_USE_CXA_ATEXIT
+
/* Define if you want the C and C++ compilers to support multibyte
character sets for source code. */
#undef MULTIBYTE_CHARS
diff --git a/contrib/gcc/config/alpha/alpha.c b/contrib/gcc/config/alpha/alpha.c
index c91e68c..3bc8e4d 100644
--- a/contrib/gcc/config/alpha/alpha.c
+++ b/contrib/gcc/config/alpha/alpha.c
@@ -1664,7 +1664,11 @@ alpha_encode_section_info (decl)
XSTR (XEXP (DECL_RTL (decl), 0), 0) = string;
}
else if (symbol_str[0] == '@')
- abort ();
+ {
+ /* We're hosed. This can happen when the user adds a weak
+ attribute after rtl generation. They should have gotten
+ a warning about unspecified behaviour from varasm.c. */
+ }
}
/* legitimate_address_p recognizes an RTL expression that is a valid
diff --git a/contrib/gcc/config/alpha/alpha.h b/contrib/gcc/config/alpha/alpha.h
index b2363bc..4410a86 100644
--- a/contrib/gcc/config/alpha/alpha.h
+++ b/contrib/gcc/config/alpha/alpha.h
@@ -1224,42 +1224,6 @@ extern struct alpha_compare alpha_compare;
#define FUNCTION_PROFILER(FILE, LABELNO)
-/* Output assembler code to FILE to initialize this source file's
- basic block profiling info, if that has not already been done.
- This assumes that __bb_init_func doesn't garble a1-a5. */
-
-#define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \
- do { \
- ASM_OUTPUT_REG_PUSH (FILE, 16); \
- fputs ("\tlda $16,$PBX32\n", (FILE)); \
- fputs ("\tldq $26,0($16)\n", (FILE)); \
- fputs ("\tbne $26,1f\n", (FILE)); \
- fputs ("\tlda $27,__bb_init_func\n", (FILE)); \
- fputs ("\tjsr $26,($27),__bb_init_func\n", (FILE)); \
- fputs ("\tldgp $29,0($26)\n", (FILE)); \
- fputs ("1:\n", (FILE)); \
- ASM_OUTPUT_REG_POP (FILE, 16); \
- } while (0);
-
-/* Output assembler code to FILE to increment the entry-count for
- the BLOCKNO'th basic block in this source file. */
-
-#define BLOCK_PROFILER(FILE, BLOCKNO) \
- do { \
- int blockn = (BLOCKNO); \
- fputs ("\tsubq $30,16,$30\n", (FILE)); \
- fputs ("\tstq $26,0($30)\n", (FILE)); \
- fputs ("\tstq $27,8($30)\n", (FILE)); \
- fputs ("\tlda $26,$PBX34\n", (FILE)); \
- fprintf ((FILE), "\tldq $27,%d($26)\n", 8*blockn); \
- fputs ("\taddq $27,1,$27\n", (FILE)); \
- fprintf ((FILE), "\tstq $27,%d($26)\n", 8*blockn); \
- fputs ("\tldq $26,0($30)\n", (FILE)); \
- fputs ("\tldq $27,8($30)\n", (FILE)); \
- fputs ("\taddq $30,16,$30\n", (FILE)); \
- } while (0)
-
-
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
the stack pointer does not matter. The value is tested only in
functions that have frame pointers.
diff --git a/contrib/gcc/config/alpha/elf.h b/contrib/gcc/config/alpha/elf.h
index 05853c2..9f8d808 100644
--- a/contrib/gcc/config/alpha/elf.h
+++ b/contrib/gcc/config/alpha/elf.h
@@ -165,7 +165,7 @@ do { \
} \
ASM_OUTPUT_ALIGN ((FILE), exact_log2((ALIGN) / BITS_PER_UNIT)); \
ASM_OUTPUT_LABEL(FILE, NAME); \
- ASM_OUTPUT_SKIP((FILE), (SIZE)); \
+ ASM_OUTPUT_SKIP((FILE), (SIZE) ? (SIZE) : 1); \
} while (0)
/* This says how to output assembler code to declare an
diff --git a/contrib/gcc/config/alpha/netbsd.h b/contrib/gcc/config/alpha/netbsd.h
index e5551da..9a54c3a 100644
--- a/contrib/gcc/config/alpha/netbsd.h
+++ b/contrib/gcc/config/alpha/netbsd.h
@@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */
#undef CPP_PREDEFINES
#define CPP_PREDEFINES \
- "-D__NetBSD__ -D__ELF__ -Asystem=unix -Asystem=NetBSD"
+ "-D__NetBSD__ -D__ELF__ -D_LP64 -Asystem=unix -Asystem=NetBSD"
/* Show that we need a GP when profiling. */
diff --git a/contrib/gcc/config/alpha/unicosmk.h b/contrib/gcc/config/alpha/unicosmk.h
index 65ab319..6dbe1a3 100644
--- a/contrib/gcc/config/alpha/unicosmk.h
+++ b/contrib/gcc/config/alpha/unicosmk.h
@@ -574,6 +574,30 @@ ssib_section () \
#ifndef REAL_ARITHMETIC
#define REAL_VALUE_ATOF(x,s) atof(x)
#define REAL_VALUE_HTOF(x,s) atof(x)
+
+#define REAL_VALUE_TO_TARGET_SINGLE(IN, OUT) \
+do { \
+ union { \
+ float f; \
+ HOST_WIDE_INT l; \
+ } u; \
+ \
+ u.f = (IN); \
+ (OUT) = (u.l >> 32) & 0xFFFFFFFF; \
+} while (0)
+
+#define REAL_VALUE_TO_TARGET_DOUBLE(IN, OUT) \
+do { \
+ union { \
+ REAL_VALUE_TYPE f; \
+ HOST_WIDE_INT l; \
+ } u; \
+ \
+ u.f = (IN); \
+ (OUT)[0] = (u.l >> 32) & 0xFFFFFFFF; \
+ (OUT)[1] = (u.l & 0xFFFFFFFF); \
+} while (0)
+
#endif
#undef NM_FLAGS
diff --git a/contrib/gcc/config/arm/arm.c b/contrib/gcc/config/arm/arm.c
index 4ef7279..f07a281 100644
--- a/contrib/gcc/config/arm/arm.c
+++ b/contrib/gcc/config/arm/arm.c
@@ -4544,8 +4544,8 @@ arm_gen_movstrqi (operands)
RTX_UNCHANGING_P (mem) = dst_unchanging_p;
MEM_IN_STRUCT_P (mem) = dst_in_struct_p;
MEM_SCALAR_P (mem) = dst_scalar_p;
- emit_move_insn (mem, gen_rtx_SUBREG (QImode, part_bytes_reg, 0));
-
+ emit_move_insn (mem, gen_lowpart (QImode, part_bytes_reg));
+
if (--last_bytes)
{
tmp = gen_reg_rtx (SImode);
@@ -4563,7 +4563,7 @@ arm_gen_movstrqi (operands)
RTX_UNCHANGING_P (mem) = dst_unchanging_p;
MEM_IN_STRUCT_P (mem) = dst_in_struct_p;
MEM_SCALAR_P (mem) = dst_scalar_p;
- emit_move_insn (mem, gen_rtx_SUBREG (HImode, part_bytes_reg, 0));
+ emit_move_insn (mem, gen_lowpart (HImode, part_bytes_reg));
last_bytes -= 2;
if (last_bytes)
{
@@ -4581,7 +4581,7 @@ arm_gen_movstrqi (operands)
RTX_UNCHANGING_P (mem) = dst_unchanging_p;
MEM_IN_STRUCT_P (mem) = dst_in_struct_p;
MEM_SCALAR_P (mem) = dst_scalar_p;
- emit_move_insn (mem, gen_rtx_SUBREG (QImode, part_bytes_reg, 0));
+ emit_move_insn (mem, gen_lowpart (QImode, part_bytes_reg));
}
}
@@ -5119,23 +5119,23 @@ arm_reload_out_hi (operands)
{
emit_insn (gen_movqi (gen_rtx_MEM (QImode,
plus_constant (base, offset + 1)),
- gen_rtx_SUBREG (QImode, outval, 0)));
+ gen_lowpart (QImode, outval)));
emit_insn (gen_lshrsi3 (scratch,
gen_rtx_SUBREG (SImode, outval, 0),
GEN_INT (8)));
emit_insn (gen_movqi (gen_rtx_MEM (QImode, plus_constant (base, offset)),
- gen_rtx_SUBREG (QImode, scratch, 0)));
+ gen_lowpart (QImode, scratch)));
}
else
{
emit_insn (gen_movqi (gen_rtx_MEM (QImode, plus_constant (base, offset)),
- gen_rtx_SUBREG (QImode, outval, 0)));
+ gen_lowpart (QImode, outval)));
emit_insn (gen_lshrsi3 (scratch,
gen_rtx_SUBREG (SImode, outval, 0),
GEN_INT (8)));
emit_insn (gen_movqi (gen_rtx_MEM (QImode,
plus_constant (base, offset + 1)),
- gen_rtx_SUBREG (QImode, scratch, 0)));
+ gen_lowpart (QImode, scratch)));
}
}
diff --git a/contrib/gcc/config/arm/arm.md b/contrib/gcc/config/arm/arm.md
index 91bbf61..b901504 100644
--- a/contrib/gcc/config/arm/arm.md
+++ b/contrib/gcc/config/arm/arm.md
@@ -3390,7 +3390,7 @@
[(set (match_operand:SI 0 "s_register_operand" "")
(zero_extend:SI (subreg:QI (match_operand:SI 1 "" "") 0)))
(clobber (match_operand:SI 2 "s_register_operand" ""))]
- "TARGET_ARM && (GET_CODE (operands[1]) != MEM)"
+ "TARGET_ARM && (GET_CODE (operands[1]) != MEM) && ! BYTES_BIG_ENDIAN"
[(set (match_dup 2) (match_dup 1))
(set (match_dup 0) (and:SI (match_dup 2) (const_int 255)))]
""
@@ -4288,7 +4288,7 @@
[(set (match_dup 4) (match_dup 3))
(set (match_dup 2)
(ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
- (set (match_operand 1 "" "") (subreg:QI (match_dup 2) 0))]
+ (set (match_operand 1 "" "") (subreg:QI (match_dup 2) 3))]
"TARGET_ARM"
"
{
@@ -4312,7 +4312,7 @@
(define_expand "storeinthi"
[(set (match_operand 0 "" "")
(subreg:QI (match_operand 1 "" "") 0))
- (set (match_dup 3) (subreg:QI (match_dup 2) 0))]
+ (set (match_dup 3) (match_dup 2))]
"TARGET_ARM"
"
{
@@ -4351,6 +4351,7 @@
operands[3] = adjust_address (op0, QImode, 1);
operands[0] = adjust_address (operands[0], QImode, 0);
+ operands[2] = gen_lowpart (QImode, operands[2]);
}"
)
@@ -4413,7 +4414,7 @@
}
emit_insn (gen_movsi (reg, GEN_INT (val)));
- operands[1] = gen_rtx_SUBREG (HImode, reg, 0);
+ operands[1] = gen_lowpart (HImode, reg);
}
else if (!arm_arch4)
{
@@ -4810,7 +4811,7 @@
rtx reg = gen_reg_rtx (SImode);
emit_insn (gen_movsi (reg, operands[1]));
- operands[1] = gen_rtx_SUBREG (QImode, reg, 0);
+ operands[1] = gen_lowpart (QImode, reg);
}
if (GET_CODE (operands[0]) == MEM)
operands[1] = force_reg (QImode, operands[1]);
@@ -4853,7 +4854,7 @@
if (GET_CODE (operands[0]) != REG)
abort ();
- operands[0] = gen_rtx (SUBREG, SImode, operands[0], 0);
+ operands[0] = gen_rtx_SUBREG (SImode, operands[0], 0);
emit_insn (gen_movsi (operands[0], operands[1]));
DONE;
}
diff --git a/contrib/gcc/config/i386/i386-protos.h b/contrib/gcc/config/i386/i386-protos.h
index 8321d47..03de4b1 100644
--- a/contrib/gcc/config/i386/i386-protos.h
+++ b/contrib/gcc/config/i386/i386-protos.h
@@ -33,9 +33,6 @@ extern HOST_WIDE_INT ix86_initial_elimination_offset PARAMS((int, int));
extern void ix86_expand_prologue PARAMS ((void));
extern void ix86_expand_epilogue PARAMS ((int));
-extern void ix86_output_function_block_profiler PARAMS ((FILE *, int));
-extern void ix86_output_block_profiler PARAMS ((FILE *, int));
-
extern void ix86_output_addr_vec_elt PARAMS ((FILE *, int));
extern void ix86_output_addr_diff_elt PARAMS ((FILE *, int, int));
@@ -197,4 +194,6 @@ extern tree ix86_handle_shared_attribute PARAMS ((tree *, tree, tree, int, bool
extern unsigned int i386_pe_section_type_flags PARAMS ((tree, const char *,
int));
extern void i386_pe_asm_named_section PARAMS ((const char *, unsigned int));
+extern void x86_output_mi_thunk PARAMS ((FILE *, int, tree));
+extern int x86_field_alignment PARAMS ((tree, int));
#endif
diff --git a/contrib/gcc/config/i386/i386.c b/contrib/gcc/config/i386/i386.c
index bc3f456..f07ebad 100644
--- a/contrib/gcc/config/i386/i386.c
+++ b/contrib/gcc/config/i386/i386.c
@@ -457,7 +457,7 @@ static int const x86_64_int_return_registers[4] = {0 /*RAX*/, 1 /*RDI*/, 5, 4};
int const dbx64_register_map[FIRST_PSEUDO_REGISTER] =
{
0, 1, 2, 3, 4, 5, 6, 7, /* general regs */
- 33, 34, 35, 36, 37, 38, 39, 40 /* fp regs */
+ 33, 34, 35, 36, 37, 38, 39, 40, /* fp regs */
-1, -1, -1, -1, -1, /* arg, flags, fpsr, dir, frame */
17, 18, 19, 20, 21, 22, 23, 24, /* SSE */
41, 42, 43, 44, 45, 46, 47, 48, /* MMX */
@@ -1675,6 +1675,34 @@ classify_argument (mode, type, classes, bit_offset)
/* Classify each field of record and merge classes. */
if (TREE_CODE (type) == RECORD_TYPE)
{
+ /* For classes first merge in the field of the subclasses. */
+ if (TYPE_BINFO (type) != NULL && TYPE_BINFO_BASETYPES (type) != NULL)
+ {
+ tree bases = TYPE_BINFO_BASETYPES (type);
+ int n_bases = TREE_VEC_LENGTH (bases);
+ int i;
+
+ for (i = 0; i < n_bases; ++i)
+ {
+ tree binfo = TREE_VEC_ELT (bases, i);
+ int num;
+ int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8;
+ tree type = BINFO_TYPE (binfo);
+
+ num = classify_argument (TYPE_MODE (type),
+ type, subclasses,
+ (offset + bit_offset) % 256);
+ if (!num)
+ return 0;
+ for (i = 0; i < num; i++)
+ {
+ int pos = (offset + bit_offset) / 8 / 8;
+ classes[i + pos] =
+ merge_classes (subclasses[i], classes[i + pos]);
+ }
+ }
+ }
+ /* And now merge the fields of structure. */
for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
{
if (TREE_CODE (field) == FIELD_DECL)
@@ -1735,6 +1763,33 @@ classify_argument (mode, type, classes, bit_offset)
else if (TREE_CODE (type) == UNION_TYPE
|| TREE_CODE (type) == QUAL_UNION_TYPE)
{
+ /* For classes first merge in the field of the subclasses. */
+ if (TYPE_BINFO (type) != NULL && TYPE_BINFO_BASETYPES (type) != NULL)
+ {
+ tree bases = TYPE_BINFO_BASETYPES (type);
+ int n_bases = TREE_VEC_LENGTH (bases);
+ int i;
+
+ for (i = 0; i < n_bases; ++i)
+ {
+ tree binfo = TREE_VEC_ELT (bases, i);
+ int num;
+ int offset = tree_low_cst (BINFO_OFFSET (binfo), 0) * 8;
+ tree type = BINFO_TYPE (binfo);
+
+ num = classify_argument (TYPE_MODE (type),
+ type, subclasses,
+ (offset + bit_offset) % 256);
+ if (!num)
+ return 0;
+ for (i = 0; i < num; i++)
+ {
+ int pos = (offset + bit_offset) / 8 / 8;
+ classes[i + pos] =
+ merge_classes (subclasses[i], classes[i + pos]);
+ }
+ }
+ }
for (field = TYPE_FIELDS (type); field; field = TREE_CHAIN (field))
{
if (TREE_CODE (field) == FIELD_DECL)
@@ -2841,6 +2896,18 @@ const_int_1_operand (op, mode)
return (GET_CODE (op) == CONST_INT && INTVAL (op) == 1);
}
+/* Return nonzero if OP is CONST_INT >= 1 and <= 31 (a valid operand
+ for shift & compare patterns, as shifting by 0 does not change flags),
+ else return zero. */
+
+int
+const_int_1_31_operand (op, mode)
+ rtx op;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
+{
+ return (GET_CODE (op) == CONST_INT && INTVAL (op) >= 1 && INTVAL (op) <= 31);
+}
+
/* Returns 1 if OP is either a symbol reference or a sum of a symbol
reference and a constant. */
@@ -3863,9 +3930,6 @@ load_pic_register ()
emit_insn (gen_prologue_get_pc (pic_offset_table_rtx, pclab));
- if (! TARGET_DEEP_BRANCH_PREDICTION)
- emit_insn (gen_popsi1 (pic_offset_table_rtx));
-
emit_insn (gen_prologue_set_got (pic_offset_table_rtx, gotsym, pclab));
}
@@ -4015,8 +4079,9 @@ ix86_compute_frame_layout (frame)
offset += size;
- /* Add outgoing arguments area. */
- if (ACCUMULATE_OUTGOING_ARGS)
+ /* Add outgoing arguments area. Can be skipped if we eliminated
+ all the function calls as dead code. */
+ if (ACCUMULATE_OUTGOING_ARGS && !current_function_is_leaf)
{
offset += current_function_outgoing_args_size;
frame->outgoing_arguments_size = current_function_outgoing_args_size;
@@ -4024,9 +4089,13 @@ ix86_compute_frame_layout (frame)
else
frame->outgoing_arguments_size = 0;
- /* Align stack boundary. */
- frame->padding2 = ((offset + preferred_alignment - 1)
- & -preferred_alignment) - offset;
+ /* Align stack boundary. Only needed if we're calling another function
+ or using alloca. */
+ if (!current_function_is_leaf || current_function_calls_alloca)
+ frame->padding2 = ((offset + preferred_alignment - 1)
+ & -preferred_alignment) - offset;
+ else
+ frame->padding2 = 0;
offset += frame->padding2;
@@ -7958,7 +8027,12 @@ ix86_expand_int_movcc (operands)
if ((code == LEU || code == GTU)
&& GET_CODE (ix86_compare_op1) == CONST_INT
&& mode != HImode
- && (unsigned int) INTVAL (ix86_compare_op1) != 0xffffffff
+ && INTVAL (ix86_compare_op1) != -1
+ /* For x86-64, the immediate field in the instruction is 32-bit
+ signed, so we can't increment a DImode value above 0x7fffffff. */
+ && (!TARGET_64BIT
+ || GET_MODE (ix86_compare_op0) != DImode
+ || INTVAL (ix86_compare_op1) != 0x7fffffff)
&& GET_CODE (operands[2]) == CONST_INT
&& GET_CODE (operands[3]) == CONST_INT)
{
@@ -7966,7 +8040,8 @@ ix86_expand_int_movcc (operands)
code = LTU;
else
code = GEU;
- ix86_compare_op1 = GEN_INT (INTVAL (ix86_compare_op1) + 1);
+ ix86_compare_op1 = gen_int_mode (INTVAL (ix86_compare_op1) + 1,
+ GET_MODE (ix86_compare_op0));
}
start_sequence ();
@@ -9130,6 +9205,9 @@ ix86_expand_movstr (dst, src, count_exp, align_exp)
{
rtx countreg2;
rtx label = NULL;
+ int desired_alignment = (TARGET_PENTIUMPRO
+ && (count == 0 || count >= (unsigned int) 260)
+ ? 8 : UNITS_PER_WORD);
/* In case we don't know anything about the alignment, default to
library version, since it is usually equally fast and result in
@@ -9159,13 +9237,10 @@ ix86_expand_movstr (dst, src, count_exp, align_exp)
This is quite costy. Maybe we can revisit this decision later or
add some customizability to this code. */
- if (count == 0
- && align < (TARGET_PENTIUMPRO && (count == 0
- || count >= (unsigned int) 260)
- ? 8 : UNITS_PER_WORD))
+ if (count == 0 && align < desired_alignment)
{
label = gen_label_rtx ();
- emit_cmp_and_jump_insns (countreg, GEN_INT (UNITS_PER_WORD - 1),
+ emit_cmp_and_jump_insns (countreg, GEN_INT (desired_alignment - 1),
LEU, 0, counter_mode, 1, label);
}
if (align <= 1)
@@ -9184,10 +9259,7 @@ ix86_expand_movstr (dst, src, count_exp, align_exp)
emit_label (label);
LABEL_NUSES (label) = 1;
}
- if (align <= 4
- && ((TARGET_PENTIUMPRO && (count == 0
- || count >= (unsigned int) 260))
- || TARGET_64BIT))
+ if (align <= 4 && desired_alignment > 4)
{
rtx label = ix86_expand_aligntest (destreg, 4);
emit_insn (gen_strmovsi (destreg, srcreg));
@@ -9196,6 +9268,12 @@ ix86_expand_movstr (dst, src, count_exp, align_exp)
LABEL_NUSES (label) = 1;
}
+ if (label && desired_alignment > 4 && !TARGET_64BIT)
+ {
+ emit_label (label);
+ LABEL_NUSES (label) = 1;
+ label = NULL_RTX;
+ }
if (!TARGET_SINGLE_STRINGOP)
emit_insn (gen_cld ());
if (TARGET_64BIT)
@@ -9341,6 +9419,10 @@ ix86_expand_clrstr (src, count_exp, align_exp)
{
rtx countreg2;
rtx label = NULL;
+ /* Compute desired alignment of the string operation. */
+ int desired_alignment = (TARGET_PENTIUMPRO
+ && (count == 0 || count >= (unsigned int) 260)
+ ? 8 : UNITS_PER_WORD);
/* In case we don't know anything about the alignment, default to
library version, since it is usually equally fast and result in
@@ -9355,13 +9437,10 @@ ix86_expand_clrstr (src, count_exp, align_exp)
countreg = copy_to_mode_reg (counter_mode, count_exp);
zeroreg = copy_to_mode_reg (Pmode, const0_rtx);
- if (count == 0
- && align < (TARGET_PENTIUMPRO && (count == 0
- || count >= (unsigned int) 260)
- ? 8 : UNITS_PER_WORD))
+ if (count == 0 && align < desired_alignment)
{
label = gen_label_rtx ();
- emit_cmp_and_jump_insns (countreg, GEN_INT (UNITS_PER_WORD - 1),
+ emit_cmp_and_jump_insns (countreg, GEN_INT (desired_alignment - 1),
LEU, 0, counter_mode, 1, label);
}
if (align <= 1)
@@ -9382,8 +9461,7 @@ ix86_expand_clrstr (src, count_exp, align_exp)
emit_label (label);
LABEL_NUSES (label) = 1;
}
- if (align <= 4 && TARGET_PENTIUMPRO && (count == 0
- || count >= (unsigned int) 260))
+ if (align <= 4 && desired_alignment > 4)
{
rtx label = ix86_expand_aligntest (destreg, 4);
emit_insn (gen_strsetsi (destreg, (TARGET_64BIT
@@ -9394,6 +9472,13 @@ ix86_expand_clrstr (src, count_exp, align_exp)
LABEL_NUSES (label) = 1;
}
+ if (label && desired_alignment > 4 && !TARGET_64BIT)
+ {
+ emit_label (label);
+ LABEL_NUSES (label) = 1;
+ label = NULL_RTX;
+ }
+
if (!TARGET_SINGLE_STRINGOP)
emit_insn (gen_cld ());
if (TARGET_64BIT)
@@ -9409,18 +9494,18 @@ ix86_expand_clrstr (src, count_exp, align_exp)
emit_insn (gen_rep_stossi (destreg, countreg2, zeroreg,
destreg, countreg2));
}
-
if (label)
{
emit_label (label);
LABEL_NUSES (label) = 1;
}
+
if (TARGET_64BIT && align > 4 && count != 0 && (count & 4))
emit_insn (gen_strsetsi (destreg,
gen_rtx_SUBREG (SImode, zeroreg, 0)));
if (TARGET_64BIT && (align <= 4 || count == 0))
{
- rtx label = ix86_expand_aligntest (destreg, 2);
+ rtx label = ix86_expand_aligntest (countreg, 4);
emit_insn (gen_strsetsi (destreg,
gen_rtx_SUBREG (SImode, zeroreg, 0)));
emit_label (label);
@@ -9431,7 +9516,7 @@ ix86_expand_clrstr (src, count_exp, align_exp)
gen_rtx_SUBREG (HImode, zeroreg, 0)));
if (align <= 2 || count == 0)
{
- rtx label = ix86_expand_aligntest (destreg, 2);
+ rtx label = ix86_expand_aligntest (countreg, 2);
emit_insn (gen_strsethi (destreg,
gen_rtx_SUBREG (HImode, zeroreg, 0)));
emit_label (label);
@@ -9442,7 +9527,7 @@ ix86_expand_clrstr (src, count_exp, align_exp)
gen_rtx_SUBREG (QImode, zeroreg, 0)));
if (align <= 1 || count == 0)
{
- rtx label = ix86_expand_aligntest (destreg, 1);
+ rtx label = ix86_expand_aligntest (countreg, 1);
emit_insn (gen_strsetqi (destreg,
gen_rtx_SUBREG (QImode, zeroreg, 0)));
emit_label (label);
@@ -12473,3 +12558,97 @@ x86_order_regs_for_local_alloc ()
while (pos < FIRST_PSEUDO_REGISTER)
reg_alloc_order [pos++] = 0;
}
+
+void
+x86_output_mi_thunk (file, delta, function)
+ FILE *file;
+ int delta;
+ tree function;
+{
+ tree parm;
+ rtx xops[3];
+
+ if (ix86_regparm > 0)
+ parm = TYPE_ARG_TYPES (TREE_TYPE (function));
+ else
+ parm = NULL_TREE;
+ for (; parm; parm = TREE_CHAIN (parm))
+ if (TREE_VALUE (parm) == void_type_node)
+ break;
+
+ xops[0] = GEN_INT (delta);
+ if (TARGET_64BIT)
+ {
+ int n = aggregate_value_p (TREE_TYPE (TREE_TYPE (function))) != 0;
+ xops[1] = gen_rtx_REG (DImode, x86_64_int_parameter_registers[n]);
+ output_asm_insn ("add{q} {%0, %1|%1, %0}", xops);
+ if (flag_pic)
+ {
+ fprintf (file, "\tjmp *");
+ assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0));
+ fprintf (file, "@GOTPCREL(%%rip)\n");
+ }
+ else
+ {
+ fprintf (file, "\tjmp ");
+ assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0));
+ fprintf (file, "\n");
+ }
+ }
+ else
+ {
+ if (parm)
+ xops[1] = gen_rtx_REG (SImode, 0);
+ else if (aggregate_value_p (TREE_TYPE (TREE_TYPE (function))))
+ xops[1] = gen_rtx_MEM (SImode, plus_constant (stack_pointer_rtx, 8));
+ else
+ xops[1] = gen_rtx_MEM (SImode, plus_constant (stack_pointer_rtx, 4));
+ output_asm_insn ("add{l} {%0, %1|%1, %0}", xops);
+
+ if (flag_pic)
+ {
+ xops[0] = pic_offset_table_rtx;
+ xops[1] = gen_label_rtx ();
+ xops[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
+
+ if (ix86_regparm > 2)
+ abort ();
+ output_asm_insn ("push{l}\t%0", xops);
+ output_asm_insn ("call\t%P1", xops);
+ ASM_OUTPUT_INTERNAL_LABEL (file, "L", CODE_LABEL_NUMBER (xops[1]));
+ output_asm_insn ("pop{l}\t%0", xops);
+ output_asm_insn
+ ("add{l}\t{%2+[.-%P1], %0|%0, OFFSET FLAT: %2+[.-%P1]}", xops);
+ xops[0] = gen_rtx_MEM (SImode, XEXP (DECL_RTL (function), 0));
+ output_asm_insn
+ ("mov{l}\t{%0@GOT(%%ebx), %%ecx|%%ecx, %0@GOT[%%ebx]}", xops);
+ asm_fprintf (file, "\tpop{l\t%%ebx|\t%%ebx}\n");
+ asm_fprintf (file, "\tjmp\t{*%%ecx|%%ecx}\n");
+ }
+ else
+ {
+ fprintf (file, "\tjmp ");
+ assemble_name (file, XSTR (XEXP (DECL_RTL (function), 0), 0));
+ fprintf (file, "\n");
+ }
+ }
+}
+
+int
+x86_field_alignment (field, computed)
+ tree field;
+ int computed;
+{
+ enum machine_mode mode;
+ tree type = TREE_TYPE (field);
+
+ if (TARGET_64BIT || TARGET_ALIGN_DOUBLE)
+ return computed;
+ mode = TYPE_MODE (TREE_CODE (type) == ARRAY_TYPE
+ ? get_inner_array_type (type) : type);
+ if (mode == DFmode || mode == DCmode
+ || GET_MODE_CLASS (mode) == MODE_INT
+ || GET_MODE_CLASS (mode) == MODE_COMPLEX_INT)
+ return MIN (32, computed);
+ return computed;
+}
diff --git a/contrib/gcc/config/i386/i386.h b/contrib/gcc/config/i386/i386.h
index 2b9ad4b..07502a2 100644
--- a/contrib/gcc/config/i386/i386.h
+++ b/contrib/gcc/config/i386/i386.h
@@ -609,7 +609,7 @@ extern int ix86_arch;
%{mcpu=athlon-4|mcpu=athlon-xp|mcpu=athlon-mp:\
-D__tune_athlon_sse__ }\
%{mcpu=pentium4:-D__tune_pentium4__ }\
-%{march=athlon-tbird|march=athlon-xp|march=athlon-mp|march=pentium3|march=pentium4:\
+%{march=athlon-xp|march=athlon-mp|march=pentium3|march=pentium4:\
-D__SSE__ }\
%{march=pentium-mmx|march=k6|march=k6-2|march=k6-3\
|march=athlon|march=athlon-tbird|march=athlon-4|march=athlon-xp\
@@ -781,12 +781,15 @@ extern int ix86_arch;
/* The published ABIs say that doubles should be aligned on word
boundaries, so lower the aligment for structure fields unless
-malign-double is set. */
-/* BIGGEST_FIELD_ALIGNMENT is also used in libobjc, where it must be
- constant. Use the smaller value in that context. */
-#ifndef IN_TARGET_LIBS
-#define BIGGEST_FIELD_ALIGNMENT (TARGET_64BIT ? 128 : (TARGET_ALIGN_DOUBLE ? 64 : 32))
-#else
+
+/* ??? Blah -- this macro is used directly by libobjc. Since it
+ supports no vector modes, cut out the complexity and fall back
+ on BIGGEST_FIELD_ALIGNMENT. */
+#ifdef IN_TARGET_LIBS
#define BIGGEST_FIELD_ALIGNMENT 32
+#else
+#define ADJUST_FIELD_ALIGN(FIELD, COMPUTED) \
+ x86_field_alignment (FIELD, COMPUTED)
#endif
/* If defined, a C expression to compute the alignment given to a
@@ -3026,6 +3029,7 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER];
SYMBOL_REF, LABEL_REF}}, \
{"shiftdi_operand", {SUBREG, REG, MEM}}, \
{"const_int_1_operand", {CONST_INT}}, \
+ {"const_int_1_31_operand", {CONST_INT}}, \
{"symbolic_operand", {SYMBOL_REF, LABEL_REF, CONST}}, \
{"aligned_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF, \
LABEL_REF, SUBREG, REG, MEM}}, \
diff --git a/contrib/gcc/config/i386/i386.md b/contrib/gcc/config/i386/i386.md
index fefaca0..4275675 100644
--- a/contrib/gcc/config/i386/i386.md
+++ b/contrib/gcc/config/i386/i386.md
@@ -2014,7 +2014,7 @@
;; For 64BIT abi we always round up to 8 bytes.
(define_insn "*pushqi2_rex64"
[(set (match_operand:QI 0 "push_operand" "=X")
- (match_operand:QI 1 "nonmemory_no_elim_operand" "ri"))]
+ (match_operand:QI 1 "nonmemory_no_elim_operand" "qi"))]
"TARGET_64BIT"
"push{q}\t%q1"
[(set_attr "type" "push")
@@ -2555,17 +2555,16 @@
;; We fake an second form of instruction to force reload to load address
;; into register when rax is not available
(define_insn "*movabsdi_1_rex64"
- [(set (mem:DI (match_operand:DI 0 "x86_64_movabs_operand" "i,r,r"))
- (match_operand:DI 1 "nonmemory_operand" "a,er,i"))]
+ [(set (mem:DI (match_operand:DI 0 "x86_64_movabs_operand" "i,r"))
+ (match_operand:DI 1 "nonmemory_operand" "a,er"))]
"TARGET_64BIT"
"@
movabs{q}\t{%1, %P0|%P0, %1}
- mov{q}\t{%1, %a0|%a0, %1}
- movabs{q}\t{%1, %a0|%a0, %1}"
+ mov{q}\t{%1, %a0|%a0, %1}"
[(set_attr "type" "imov")
- (set_attr "modrm" "0,*,*")
- (set_attr "length_address" "8,0,0")
- (set_attr "length_immediate" "0,*,*")
+ (set_attr "modrm" "0,*")
+ (set_attr "length_address" "8,0")
+ (set_attr "length_immediate" "0,*")
(set_attr "memory" "store")
(set_attr "mode" "DI")])
@@ -10951,7 +10950,7 @@
[(set (reg 17)
(compare
(ashift:SI (match_operand:SI 1 "nonimmediate_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
(set (match_operand:SI 0 "nonimmediate_operand" "=rm")
(ashift:SI (match_dup 1) (match_dup 2)))]
@@ -10990,7 +10989,7 @@
[(set (reg 17)
(compare
(ashift:SI (match_operand:SI 1 "register_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
(set (match_operand:DI 0 "register_operand" "=r")
(zero_extend:DI (ashift:SI (match_dup 1) (match_dup 2))))]
@@ -11115,7 +11114,7 @@
[(set (reg 17)
(compare
(ashift:HI (match_operand:HI 1 "nonimmediate_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
(set (match_operand:HI 0 "nonimmediate_operand" "=rm")
(ashift:HI (match_dup 1) (match_dup 2)))]
@@ -11279,7 +11278,7 @@
[(set (reg 17)
(compare
(ashift:QI (match_operand:QI 1 "nonimmediate_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
(set (match_operand:QI 0 "nonimmediate_operand" "=qm")
(ashift:QI (match_dup 1) (match_dup 2)))]
@@ -11629,7 +11628,7 @@
[(set (reg 17)
(compare
(ashiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
(set (match_operand:SI 0 "nonimmediate_operand" "=rm")
(ashiftrt:SI (match_dup 1) (match_dup 2)))]
@@ -11643,7 +11642,7 @@
[(set (reg 17)
(compare
(ashiftrt:SI (match_operand:SI 1 "register_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
(set (match_operand:DI 0 "register_operand" "=r")
(zero_extend:DI (ashiftrt:SI (match_dup 1) (match_dup 2))))]
@@ -11715,7 +11714,7 @@
[(set (reg 17)
(compare
(ashiftrt:HI (match_operand:HI 1 "nonimmediate_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
(set (match_operand:HI 0 "nonimmediate_operand" "=rm")
(ashiftrt:HI (match_dup 1) (match_dup 2)))]
@@ -11768,7 +11767,7 @@
(ashiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0")
(match_operand:QI 2 "const_int_1_operand" "I"))
(const_int 0)))
- (set (match_operand:QI 0 "nonimmediate_operand" "=rm")
+ (set (match_operand:QI 0 "nonimmediate_operand" "=qm")
(ashiftrt:QI (match_dup 1) (match_dup 2)))]
"ix86_match_ccmode (insn, CCGOCmode)
&& (TARGET_PENTIUM || TARGET_PENTIUMPRO)
@@ -11787,9 +11786,9 @@
[(set (reg 17)
(compare
(ashiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
- (set (match_operand:QI 0 "nonimmediate_operand" "=rm")
+ (set (match_operand:QI 0 "nonimmediate_operand" "=qm")
(ashiftrt:QI (match_dup 1) (match_dup 2)))]
"ix86_match_ccmode (insn, CCGOCmode)
&& ix86_binary_operator_ok (ASHIFTRT, QImode, operands)"
@@ -12020,7 +12019,7 @@
[(set (reg 17)
(compare
(lshiftrt:SI (match_operand:SI 1 "nonimmediate_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
(set (match_operand:SI 0 "nonimmediate_operand" "=rm")
(lshiftrt:SI (match_dup 1) (match_dup 2)))]
@@ -12034,7 +12033,7 @@
[(set (reg 17)
(compare
(lshiftrt:SI (match_operand:SI 1 "register_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
(set (match_operand:DI 0 "register_operand" "=r")
(lshiftrt:DI (zero_extend:DI (match_dup 1)) (match_dup 2)))]
@@ -12106,7 +12105,7 @@
[(set (reg 17)
(compare
(lshiftrt:HI (match_operand:HI 1 "nonimmediate_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
(set (match_operand:HI 0 "nonimmediate_operand" "=rm")
(lshiftrt:HI (match_dup 1) (match_dup 2)))]
@@ -12178,7 +12177,7 @@
[(set (reg 17)
(compare
(lshiftrt:QI (match_operand:QI 1 "nonimmediate_operand" "0")
- (match_operand:QI 2 "immediate_operand" "I"))
+ (match_operand:QI 2 "const_int_1_31_operand" "I"))
(const_int 0)))
(set (match_operand:QI 0 "nonimmediate_operand" "=qm")
(lshiftrt:QI (match_dup 1) (match_dup 2)))]
@@ -13816,6 +13815,7 @@
{
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L",
CODE_LABEL_NUMBER (operands[1]));
+ return "pop{l}\t%0";
}
RET;
}
@@ -16576,12 +16576,12 @@
"#")
(define_insn "sse_movdfcc"
- [(set (match_operand:DF 0 "register_operand" "=&x#rf,x#rf,?f#xr,?f#xr,?f#xr,?f#xr,?r#xf,?r#xf,?r#xf,?r#xf")
+ [(set (match_operand:DF 0 "register_operand" "=&Y#rf,Y#rf,?f#Yr,?f#Yr,?f#Yr,?f#Yr,?r#Yf,?r#Yf,?r#Yf,?r#Yf")
(if_then_else:DF (match_operator 1 "sse_comparison_operator"
- [(match_operand:DF 4 "nonimmediate_operand" "0#fx,x#fx,f#x,f#x,xm#f,xm#f,f#x,f#x,xm#f,xm#f")
- (match_operand:DF 5 "nonimmediate_operand" "xm#f,xm#f,f#x,f#x,x#f,x#f,f#x,f#x,x#f,x#f")])
- (match_operand:DF 2 "nonimmediate_operand" "x#fr,0#fr,f#fx,0#fx,f#fx,0#fx,rm#rx,0#rx,rm#rx,0#rx")
- (match_operand:DF 3 "nonimmediate_operand" "x#fr,x#fr,0#fx,f#fx,0#fx,f#fx,0#fx,rm#rx,0#rx,rm#rx")))
+ [(match_operand:DF 4 "nonimmediate_operand" "0#fY,Y#fY,f#Y,f#Y,Ym#f,Ym#f,f#Y,f#Y,Ym#f,Ym#f")
+ (match_operand:DF 5 "nonimmediate_operand" "Ym#f,Ym#f,f#Y,f#Y,Y#f,Y#f,f#Y,f#Y,Y#f,Y#f")])
+ (match_operand:DF 2 "nonimmediate_operand" "Y#fr,0#fr,f#fY,0#fY,f#fY,0#fY,rm#rY,0#rY,rm#rY,0#rY")
+ (match_operand:DF 3 "nonimmediate_operand" "Y#fr,Y#fr,0#fY,f#fY,0#fY,f#fY,0#fY,rm#rY,0#rY,rm#rY")))
(clobber (match_scratch:DF 6 "=2,&4,X,X,X,X,X,X,X,X"))
(clobber (reg:CC 17))]
"TARGET_SSE2
@@ -16591,11 +16591,11 @@
"#")
(define_insn "sse_movdfcc_eq"
- [(set (match_operand:DF 0 "register_operand" "=&x#rf,x#rf,?f#xr,?f#xr,?r#xf,?r#xf")
- (if_then_else:DF (eq (match_operand:DF 3 "nonimmediate_operand" "%0#fx,x#fx,f#x,xm#f,f#x,xm#f")
- (match_operand:DF 4 "nonimmediate_operand" "xm#f,xm#f,f#x,x#f,f#x,x#f"))
- (match_operand:DF 1 "nonimmediate_operand" "x#fr,0#fr,0#fx,0#fx,0#rx,0#rx")
- (match_operand:DF 2 "nonimmediate_operand" "x#fr,x#fr,f#fx,f#fx,rm#rx,rm#rx")))
+ [(set (match_operand:DF 0 "register_operand" "=&Y#rf,Y#rf,?f#Yr,?f#Yr,?r#Yf,?r#Yf")
+ (if_then_else:DF (eq (match_operand:DF 3 "nonimmediate_operand" "%0#fY,Y#fY,f#Y,Ym#f,f#Y,Ym#f")
+ (match_operand:DF 4 "nonimmediate_operand" "Ym#f,Ym#f,f#Y,Y#f,f#Y,Y#f"))
+ (match_operand:DF 1 "nonimmediate_operand" "Y#fr,0#fr,0#fY,0#fY,0#rY,0#rY")
+ (match_operand:DF 2 "nonimmediate_operand" "Y#fr,Y#fr,f#fY,f#fY,rm#rY,rm#rY")))
(clobber (match_scratch:DF 5 "=1,&3,X,X,X,X"))
(clobber (reg:CC 17))]
"TARGET_SSE
@@ -16647,6 +16647,10 @@
(set (subreg:TI (match_dup 0) 0) (ior:TI (subreg:TI (match_dup 6) 0)
(subreg:TI (match_dup 7) 0)))]
{
+ /* If op2 == op3, op3 will be clobbered before it is used.
+ This should be optimized out though. */
+ if (operands_match_p (operands[2], operands[3]))
+ abort ();
PUT_MODE (operands[1], GET_MODE (operands[0]));
if (operands_match_p (operands[0], operands[4]))
operands[6] = operands[4], operands[7] = operands[2];
@@ -16658,7 +16662,7 @@
;; Do not brother with the integer/floating point case, since these are
;; bot considerably slower, unlike in the generic case.
(define_insn "*sse_movsfcc_const0_1"
- [(set (match_operand:SF 0 "register_operand" "=x")
+ [(set (match_operand:SF 0 "register_operand" "=&x")
(if_then_else:SF (match_operator 1 "sse_comparison_operator"
[(match_operand:SF 4 "register_operand" "0")
(match_operand:SF 5 "nonimmediate_operand" "xm")])
@@ -16668,7 +16672,7 @@
"#")
(define_insn "*sse_movsfcc_const0_2"
- [(set (match_operand:SF 0 "register_operand" "=x")
+ [(set (match_operand:SF 0 "register_operand" "=&x")
(if_then_else:SF (match_operator 1 "sse_comparison_operator"
[(match_operand:SF 4 "register_operand" "0")
(match_operand:SF 5 "nonimmediate_operand" "xm")])
@@ -16678,7 +16682,7 @@
"#")
(define_insn "*sse_movsfcc_const0_3"
- [(set (match_operand:SF 0 "register_operand" "=x")
+ [(set (match_operand:SF 0 "register_operand" "=&x")
(if_then_else:SF (match_operator 1 "fcmov_comparison_operator"
[(match_operand:SF 4 "nonimmediate_operand" "xm")
(match_operand:SF 5 "register_operand" "0")])
@@ -16688,7 +16692,7 @@
"#")
(define_insn "*sse_movsfcc_const0_4"
- [(set (match_operand:SF 0 "register_operand" "=x")
+ [(set (match_operand:SF 0 "register_operand" "=&x")
(if_then_else:SF (match_operator 1 "fcmov_comparison_operator"
[(match_operand:SF 4 "nonimmediate_operand" "xm")
(match_operand:SF 5 "register_operand" "0")])
@@ -16698,42 +16702,42 @@
"#")
(define_insn "*sse_movdfcc_const0_1"
- [(set (match_operand:SF 0 "register_operand" "=x")
- (if_then_else:SF (match_operator 1 "sse_comparison_operator"
- [(match_operand:SF 4 "register_operand" "0")
- (match_operand:SF 5 "nonimmediate_operand" "xm")])
- (match_operand:SF 2 "register_operand" "x")
- (match_operand:SF 3 "const0_operand" "X")))]
+ [(set (match_operand:DF 0 "register_operand" "=&Y")
+ (if_then_else:DF (match_operator 1 "sse_comparison_operator"
+ [(match_operand:DF 4 "register_operand" "0")
+ (match_operand:DF 5 "nonimmediate_operand" "Ym")])
+ (match_operand:DF 2 "register_operand" "Y")
+ (match_operand:DF 3 "const0_operand" "X")))]
"TARGET_SSE2"
"#")
(define_insn "*sse_movdfcc_const0_2"
- [(set (match_operand:SF 0 "register_operand" "=x")
- (if_then_else:SF (match_operator 1 "sse_comparison_operator"
- [(match_operand:SF 4 "register_operand" "0")
- (match_operand:SF 5 "nonimmediate_operand" "xm")])
- (match_operand:SF 2 "const0_operand" "X")
- (match_operand:SF 3 "register_operand" "x")))]
+ [(set (match_operand:DF 0 "register_operand" "=&Y")
+ (if_then_else:DF (match_operator 1 "sse_comparison_operator"
+ [(match_operand:DF 4 "register_operand" "0")
+ (match_operand:DF 5 "nonimmediate_operand" "Ym")])
+ (match_operand:DF 2 "const0_operand" "X")
+ (match_operand:DF 3 "register_operand" "Y")))]
"TARGET_SSE2"
"#")
(define_insn "*sse_movdfcc_const0_3"
- [(set (match_operand:SF 0 "register_operand" "=x")
- (if_then_else:SF (match_operator 1 "fcmov_comparison_operator"
- [(match_operand:SF 4 "nonimmediate_operand" "xm")
- (match_operand:SF 5 "register_operand" "0")])
- (match_operand:SF 2 "register_operand" "x")
- (match_operand:SF 3 "const0_operand" "X")))]
+ [(set (match_operand:DF 0 "register_operand" "=&Y")
+ (if_then_else:DF (match_operator 1 "fcmov_comparison_operator"
+ [(match_operand:DF 4 "nonimmediate_operand" "Ym")
+ (match_operand:DF 5 "register_operand" "0")])
+ (match_operand:DF 2 "register_operand" "Y")
+ (match_operand:DF 3 "const0_operand" "X")))]
"TARGET_SSE2"
"#")
(define_insn "*sse_movdfcc_const0_4"
- [(set (match_operand:SF 0 "register_operand" "=x")
- (if_then_else:SF (match_operator 1 "fcmov_comparison_operator"
- [(match_operand:SF 4 "nonimmediate_operand" "xm")
- (match_operand:SF 5 "register_operand" "0")])
- (match_operand:SF 2 "const0_operand" "X")
- (match_operand:SF 3 "register_operand" "x")))]
+ [(set (match_operand:DF 0 "register_operand" "=&Y")
+ (if_then_else:DF (match_operator 1 "fcmov_comparison_operator"
+ [(match_operand:DF 4 "nonimmediate_operand" "Ym")
+ (match_operand:DF 5 "register_operand" "0")])
+ (match_operand:DF 2 "const0_operand" "X")
+ (match_operand:DF 3 "register_operand" "Y")))]
"TARGET_SSE2"
"#")
@@ -19779,7 +19783,7 @@
[(set_attr "type" "mmx")])
(define_expand "prefetch"
- [(prefetch (match_operand:SI 0 "address_operand" "")
+ [(prefetch (match_operand 0 "address_operand" "")
(match_operand:SI 1 "const_int_operand" "")
(match_operand:SI 2 "const_int_operand" ""))]
"TARGET_PREFETCH_SSE || TARGET_3DNOW"
@@ -19791,6 +19795,8 @@
abort ();
if (locality < 0 || locality > 3)
abort ();
+ if (GET_MODE (operands[0]) != Pmode && GET_MODE (operands[0]) != VOIDmode)
+ abort ();
/* Use 3dNOW prefetch in case we are asking for write prefetch not
suported by SSE counterpart or the SSE prefetch is not available
@@ -19806,7 +19812,26 @@
[(prefetch (match_operand:SI 0 "address_operand" "p")
(const_int 0)
(match_operand:SI 1 "const_int_operand" ""))]
- "TARGET_PREFETCH_SSE"
+ "TARGET_PREFETCH_SSE && !TARGET_64BIT"
+{
+ static const char * const patterns[4] = {
+ "prefetchnta\t%a0", "prefetcht2\t%a0", "prefetcht1\t%a0", "prefetcht0\t%a0"
+ };
+
+ int locality = INTVAL (operands[1]);
+ if (locality < 0 || locality > 3)
+ abort ();
+
+ return patterns[locality];
+}
+ [(set_attr "type" "sse")
+ (set_attr "memory" "none")])
+
+(define_insn "*prefetch_sse_rex"
+ [(prefetch (match_operand:DI 0 "address_operand" "p")
+ (const_int 0)
+ (match_operand:SI 1 "const_int_operand" ""))]
+ "TARGET_PREFETCH_SSE && TARGET_64BIT"
{
static const char * const patterns[4] = {
"prefetchnta\t%a0", "prefetcht2\t%a0", "prefetcht1\t%a0", "prefetcht0\t%a0"
@@ -19824,7 +19849,21 @@
[(prefetch (match_operand:SI 0 "address_operand" "p")
(match_operand:SI 1 "const_int_operand" "n")
(const_int 3))]
- "TARGET_3DNOW"
+ "TARGET_3DNOW && !TARGET_64BIT"
+{
+ if (INTVAL (operands[1]) == 0)
+ return "prefetch\t%a0";
+ else
+ return "prefetchw\t%a0";
+}
+ [(set_attr "type" "mmx")
+ (set_attr "memory" "none")])
+
+(define_insn "*prefetch_3dnow_rex"
+ [(prefetch (match_operand:DI 0 "address_operand" "p")
+ (match_operand:SI 1 "const_int_operand" "n")
+ (const_int 3))]
+ "TARGET_3DNOW && TARGET_64BIT"
{
if (INTVAL (operands[1]) == 0)
return "prefetch\t%a0";
diff --git a/contrib/gcc/config/i386/linux64.h b/contrib/gcc/config/i386/linux64.h
index 4926999..6158431 100644
--- a/contrib/gcc/config/i386/linux64.h
+++ b/contrib/gcc/config/i386/linux64.h
@@ -69,13 +69,16 @@ Boston, MA 02111-1307, USA. */
#define MULTILIB_DEFAULTS { "m64" }
/* Do code reading to identify a signal frame, and set the frame
- state data appropriately. See unwind-dw2.c for the structs. */
+ state data appropriately. See unwind-dw2.c for the structs.
+ Don't use this at all if inhibit_libc is used. */
+#ifndef inhibit_libc
#ifdef IN_LIBGCC2
#include <signal.h>
#include <sys/ucontext.h>
#endif
+#ifdef __x86_64__
#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \
do { \
unsigned char *pc_ = (CONTEXT)->ra; \
@@ -132,3 +135,59 @@ Boston, MA 02111-1307, USA. */
(FS)->retaddr_column = 16; \
goto SUCCESS; \
} while (0)
+#else /* ifdef __x86_64__ */
+#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \
+ do { \
+ unsigned char *pc_ = (CONTEXT)->ra; \
+ struct sigcontext *sc_; \
+ long new_cfa_; \
+ \
+ /* popl %eax ; movl $__NR_sigreturn,%eax ; int $0x80 */ \
+ if (*(unsigned short *)(pc_+0) == 0xb858 \
+ && *(unsigned int *)(pc_+2) == 119 \
+ && *(unsigned short *)(pc_+6) == 0x80cd) \
+ sc_ = (CONTEXT)->cfa + 4; \
+ /* movl $__NR_rt_sigreturn,%eax ; int $0x80 */ \
+ else if (*(unsigned char *)(pc_+0) == 0xb8 \
+ && *(unsigned int *)(pc_+1) == 173 \
+ && *(unsigned short *)(pc_+5) == 0x80cd) \
+ { \
+ struct rt_sigframe { \
+ int sig; \
+ struct siginfo *pinfo; \
+ void *puc; \
+ struct siginfo info; \
+ struct ucontext uc; \
+ } *rt_ = (CONTEXT)->cfa; \
+ sc_ = (struct sigcontext *) &rt_->uc.uc_mcontext; \
+ } \
+ else \
+ break; \
+ \
+ new_cfa_ = sc_->esp; \
+ (FS)->cfa_how = CFA_REG_OFFSET; \
+ (FS)->cfa_reg = 4; \
+ (FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa; \
+ \
+ /* The SVR4 register numbering macros aren't usable in libgcc. */ \
+ (FS)->regs.reg[0].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[0].loc.offset = (long)&sc_->eax - new_cfa_; \
+ (FS)->regs.reg[3].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[3].loc.offset = (long)&sc_->ebx - new_cfa_; \
+ (FS)->regs.reg[1].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[1].loc.offset = (long)&sc_->ecx - new_cfa_; \
+ (FS)->regs.reg[2].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[2].loc.offset = (long)&sc_->edx - new_cfa_; \
+ (FS)->regs.reg[6].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[6].loc.offset = (long)&sc_->esi - new_cfa_; \
+ (FS)->regs.reg[7].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[7].loc.offset = (long)&sc_->edi - new_cfa_; \
+ (FS)->regs.reg[5].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[5].loc.offset = (long)&sc_->ebp - new_cfa_; \
+ (FS)->regs.reg[8].how = REG_SAVED_OFFSET; \
+ (FS)->regs.reg[8].loc.offset = (long)&sc_->eip - new_cfa_; \
+ (FS)->retaddr_column = 8; \
+ goto SUCCESS; \
+ } while (0)
+#endif /* ifdef __x86_64__ */
+#endif /* ifdef inhibit_libc */
diff --git a/contrib/gcc/config/i386/mmintrin.h b/contrib/gcc/config/i386/mmintrin.h
index 41dc4be..88e384f 100644
--- a/contrib/gcc/config/i386/mmintrin.h
+++ b/contrib/gcc/config/i386/mmintrin.h
@@ -31,7 +31,7 @@
#define _MMINTRIN_H_INCLUDED
/* The data type intended for user use. */
-typedef unsigned long long __m64;
+typedef unsigned long long __m64 __attribute__ ((__aligned__ (8)));
/* Internal data types for implementing the intrinsics. */
typedef int __v2si __attribute__ ((__mode__ (__V2SI__)));
diff --git a/contrib/gcc/config/i386/netbsd64.h b/contrib/gcc/config/i386/netbsd64.h
index 74862af..051f33b 100644
--- a/contrib/gcc/config/i386/netbsd64.h
+++ b/contrib/gcc/config/i386/netbsd64.h
@@ -48,6 +48,24 @@ Boston, MA 02111-1307, USA. */
"-D__NetBSD__ -D__ELF__ -Asystem=unix -Asystem=NetBSD"
+/* Provide some extra CPP specs needed by NetBSD/x86_64. */
+#define CPP_LP64_SPEC "%{!m32:-D_LP64}"
+
+#define CPP_SUBTARGET_SPEC "%(cpp_lp64)"
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS \
+ { "cpp_lp64", CPP_LP64_SPEC }, \
+ { "cpp_subtarget", CPP_SUBTARGET_SPEC },
+
+
+/* Provide a CPP_SPEC appropriate for NetBSD. Currently we deal with
+ our subtarget specs and the GCC option `-posix'. */
+
+#undef CPP_SPEC
+#define CPP_SPEC "%(cpp_cpu) %(cpp_subtarget) %{posix:-D_POSIX_SOURCE}"
+
+
/* Output assembler code to FILE to call the profiler. */
#undef FUNCTION_PROFILER
diff --git a/contrib/gcc/config/i386/openbsd.h b/contrib/gcc/config/i386/openbsd.h
index a07ee15..5015b9d 100644
--- a/contrib/gcc/config/i386/openbsd.h
+++ b/contrib/gcc/config/i386/openbsd.h
@@ -95,26 +95,11 @@ Boston, MA 02111-1307, USA. */
#undef ASM_PREFERRED_EH_DATA_FORMAT
-/* Assembler format: alignment output. */
-
-/* A C statement to output to the stdio stream FILE an assembler
- command to advance the location counter to a multiple of 1<<LOG
- bytes if it is within MAX_SKIP bytes.
-
- This will be used to align code labels according to Intel
- recommendations, in prevision of binutils upgrade. */
-#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
-#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
- do { \
- if ((LOG) != 0) { \
- if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
- else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \
- } \
- } while (0)
-#endif
/* Note that we pick up ASM_OUTPUT_MI_THUNK from unix.h. */
#undef ASM_COMMENT_START
#define ASM_COMMENT_START ";#"
+/* OpenBSD gas currently does not support quad, so do not use it. */
+#undef ASM_QUAD
diff --git a/contrib/gcc/config/i386/unix.h b/contrib/gcc/config/i386/unix.h
index 15a0701..f7e38b4 100644
--- a/contrib/gcc/config/i386/unix.h
+++ b/contrib/gcc/config/i386/unix.h
@@ -79,57 +79,5 @@ Boston, MA 02111-1307, USA. */
/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
Used for C++ multiple inheritance. */
-#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
-do { \
- tree parm; \
- rtx xops[3]; \
- \
- if (ix86_regparm > 0) \
- parm = TYPE_ARG_TYPES (TREE_TYPE (function)); \
- else \
- parm = NULL_TREE; \
- for (; parm; parm = TREE_CHAIN (parm)) \
- if (TREE_VALUE (parm) == void_type_node) \
- break; \
- \
- xops[0] = GEN_INT (DELTA); \
- if (parm) \
- xops[1] = gen_rtx_REG (SImode, 0); \
- else if (aggregate_value_p (TREE_TYPE (TREE_TYPE (FUNCTION)))) \
- xops[1] = gen_rtx_MEM (SImode, plus_constant (stack_pointer_rtx, 8)); \
- else \
- xops[1] = gen_rtx_MEM (SImode, plus_constant (stack_pointer_rtx, 4)); \
- output_asm_insn ("add{l} {%0, %1|%1, %0}", xops); \
- \
- if (flag_pic && !TARGET_64BIT) \
- { \
- xops[0] = pic_offset_table_rtx; \
- xops[1] = gen_label_rtx (); \
- xops[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_"); \
- \
- if (ix86_regparm > 2) \
- abort (); \
- output_asm_insn ("push{l}\t%0", xops); \
- output_asm_insn ("call\t%P1", xops); \
- ASM_OUTPUT_INTERNAL_LABEL (FILE, "L", CODE_LABEL_NUMBER (xops[1])); \
- output_asm_insn ("pop{l}\t%0", xops); \
- output_asm_insn ("add{l}\t{%2+[.-%P1], %0|%0, OFFSET FLAT: %2+[.-%P1]}", xops); \
- xops[0] = gen_rtx_MEM (SImode, XEXP (DECL_RTL (FUNCTION), 0)); \
- output_asm_insn ("mov{l}\t{%0@GOT(%%ebx), %%ecx|%%ecx, %0@GOT[%%ebx]}",\
- xops); \
- asm_fprintf (FILE, "\tpop{l\t%%ebx|\t%%ebx}\n"); \
- asm_fprintf (FILE, "\tjmp\t{*%%ecx|%%ecx}\n"); \
- } \
- else if (flag_pic && TARGET_64BIT) \
- { \
- fprintf (FILE, "\tjmp *"); \
- assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
- fprintf (FILE, "@GOTPCREL(%%rip)\n"); \
- } \
- else \
- { \
- fprintf (FILE, "\tjmp "); \
- assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
- fprintf (FILE, "\n"); \
- } \
-} while (0)
+#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
+ x86_output_mi_thunk (FILE, DELTA, FUNCTION);
diff --git a/contrib/gcc/config/ia64/linux.h b/contrib/gcc/config/ia64/linux.h
index 3091852..07882cd 100644
--- a/contrib/gcc/config/ia64/linux.h
+++ b/contrib/gcc/config/ia64/linux.h
@@ -58,7 +58,7 @@
#include <sys/ucontext.h>
#define IA64_GATE_AREA_START 0xa000000000000100LL
-#define IA64_GATE_AREA_END 0xa000000000010000LL
+#define IA64_GATE_AREA_END 0xa000000000020000LL
#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \
if ((CONTEXT)->rp >= IA64_GATE_AREA_START \
diff --git a/contrib/gcc/config/ia64/sysv4.h b/contrib/gcc/config/ia64/sysv4.h
index c53a1dc..840ebdd 100644
--- a/contrib/gcc/config/ia64/sysv4.h
+++ b/contrib/gcc/config/ia64/sysv4.h
@@ -140,45 +140,136 @@ do { \
emit_safe_across_calls (STREAM); \
} while (0)
+/* A C statement or statements to switch to the appropriate
+ section for output of DECL. DECL is either a `VAR_DECL' node
+ or a constant of some sort. RELOC indicates whether forming
+ the initial value of DECL requires link-time relocations.
+
+ Set SECNUM to:
+ 0 .text
+ 1 .rodata
+ 2 .data
+ 3 .sdata
+ 4 .bss
+ 5 .sbss
+*/
+#define DO_SELECT_SECTION(SECNUM, DECL, RELOC) \
+ do \
+ { \
+ if (TREE_CODE (DECL) == FUNCTION_DECL) \
+ SECNUM = 0; \
+ else if (TREE_CODE (DECL) == STRING_CST) \
+ { \
+ if (! flag_writable_strings) \
+ SECNUM = 0x101; \
+ else \
+ SECNUM = 2; \
+ } \
+ else if (TREE_CODE (DECL) == VAR_DECL) \
+ { \
+ if (XSTR (XEXP (DECL_RTL (DECL), 0), 0)[0] \
+ == SDATA_NAME_FLAG_CHAR) \
+ SECNUM = 3; \
+ /* ??? We need the extra RELOC check, because the default \
+ is to only check RELOC if flag_pic is set, and we don't \
+ set flag_pic (yet?). */ \
+ else if (!DECL_READONLY_SECTION (DECL, RELOC) || (RELOC)) \
+ SECNUM = 2; \
+ else if (flag_merge_constants < 2) \
+ /* C and C++ don't allow different variables to share \
+ the same location. -fmerge-all-constants allows \
+ even that (at the expense of not conforming). */ \
+ SECNUM = 1; \
+ else if (TREE_CODE (DECL_INITIAL (DECL)) == STRING_CST) \
+ SECNUM = 0x201; \
+ else \
+ SECNUM = 0x301; \
+ } \
+ /* This could be a CONSTRUCTOR containing ADDR_EXPR of a VAR_DECL, \
+ in which case we can't put it in a shared library rodata. */ \
+ else if (flag_pic && (RELOC)) \
+ SECNUM = 3; \
+ else \
+ SECNUM = 2; \
+ } \
+ while (0)
+
/* We override svr4.h so that we can support the sdata section. */
#undef SELECT_SECTION
#define SELECT_SECTION(DECL,RELOC,ALIGN) \
-{ \
- if (TREE_CODE (DECL) == STRING_CST) \
+ do \
{ \
- if (! flag_writable_strings) \
- mergeable_string_section ((DECL), (ALIGN), 0); \
- else \
- data_section (); \
+ typedef void (*sec_fn) PARAMS ((void)); \
+ static sec_fn const sec_functions[6] = \
+ { \
+ text_section, \
+ const_section, \
+ data_section, \
+ sdata_section, \
+ bss_section, \
+ sbss_section \
+ }; \
+ \
+ int sec; \
+ \
+ DO_SELECT_SECTION (sec, DECL, RELOC); \
+ \
+ switch (sec) \
+ { \
+ case 0x101: \
+ mergeable_string_section (DECL, ALIGN, 0); \
+ break; \
+ case 0x201: \
+ mergeable_string_section (DECL_INITIAL (DECL), \
+ ALIGN, 0); \
+ break; \
+ case 0x301: \
+ mergeable_constant_section (DECL_MODE (DECL), \
+ ALIGN, 0); \
+ break; \
+ default: \
+ (*sec_functions[sec]) (); \
+ break; \
+ } \
} \
- else if (TREE_CODE (DECL) == VAR_DECL) \
+ while (0)
+
+#undef UNIQUE_SECTION
+#define UNIQUE_SECTION(DECL, RELOC) \
+ do \
{ \
- if (XSTR (XEXP (DECL_RTL (DECL), 0), 0)[0] \
- == SDATA_NAME_FLAG_CHAR) \
- sdata_section (); \
- /* ??? We need the extra RELOC check, because the default is to \
- only check RELOC if flag_pic is set, and we don't set flag_pic \
- (yet?). */ \
- else if (!DECL_READONLY_SECTION (DECL, RELOC) || (RELOC)) \
- data_section (); \
- else if (flag_merge_constants < 2) \
- /* C and C++ don't allow different variables to share \
- the same location. -fmerge-all-constants allows \
- even that (at the expense of not conforming). */ \
- const_section (); \
- else if (TREE_CODE (DECL_INITIAL (DECL)) == STRING_CST) \
- mergeable_string_section (DECL_INITIAL (DECL), (ALIGN), 0); \
- else \
- mergeable_constant_section (DECL_MODE (DECL), (ALIGN), 0); \
+ static const char * const prefixes[6][2] = \
+ { \
+ { ".text.", ".gnu.linkonce.t." }, \
+ { ".rodata.", ".gnu.linkonce.r." }, \
+ { ".data.", ".gnu.linkonce.d." }, \
+ { ".sdata.", ".gnu.linkonce.s." }, \
+ { ".bss.", ".gnu.linkonce.b." }, \
+ { ".sbss.", ".gnu.linkonce.sb." } \
+ }; \
+ \
+ int nlen, plen, sec; \
+ const char *name, *prefix; \
+ char *string; \
+ \
+ DO_SELECT_SECTION (sec, DECL, RELOC); \
+ \
+ name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL)); \
+ STRIP_NAME_ENCODING (name, name); \
+ nlen = strlen (name); \
+ \
+ prefix = prefixes[sec & 0xff][DECL_ONE_ONLY(DECL)]; \
+ plen = strlen (prefix); \
+ \
+ string = alloca (nlen + plen + 1); \
+ \
+ memcpy (string, prefix, plen); \
+ memcpy (string + plen, name, nlen + 1); \
+ \
+ DECL_SECTION_NAME (DECL) = build_string (nlen + plen, string); \
} \
- /* This could be a CONSTRUCTOR containing ADDR_EXPR of a VAR_DECL, \
- in which case we can't put it in a shared library rodata. */ \
- else if (flag_pic && (RELOC)) \
- data_section (); \
- else \
- const_section (); \
-}
+ while (0)
/* Similarly for constant pool data. */
diff --git a/contrib/gcc/config/rs6000/aix43.h b/contrib/gcc/config/rs6000/aix43.h
index 7aa8707..8fe9859 100644
--- a/contrib/gcc/config/rs6000/aix43.h
+++ b/contrib/gcc/config/rs6000/aix43.h
@@ -186,18 +186,15 @@ do { \
#undef LINK_SPEC
#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\
%{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}\
- %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}"
+ %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}\
+ %{mpe:-binitfini:poe_remote_main}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared:\
- %{mpe:%{pg:/usr/lpp/ppe.poe/lib/gcrt0.o}\
- %{!pg:%{p:/usr/lpp/ppe.poe/lib/mcrt0.o}\
- %{!p:/usr/lpp/ppe.poe/lib/crt0.o}}}\
- %{!mpe:\
- %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\
- %{!maix64:\
- %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
- %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}}"
+ %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\
+ %{!maix64:\
+ %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
+ %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}"
/* AIX 4.3 typedefs ptrdiff_t as "long" while earlier releases used "int". */
diff --git a/contrib/gcc/config/rs6000/aix51.h b/contrib/gcc/config/rs6000/aix51.h
index 121c7ba..4051dd0 100644
--- a/contrib/gcc/config/rs6000/aix51.h
+++ b/contrib/gcc/config/rs6000/aix51.h
@@ -189,18 +189,15 @@ do { \
#undef LINK_SPEC
#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro} -bnodelcsect\
%{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}\
- %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}"
+ %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}\
+ %{mpe:-binitfini:poe_remote_main}"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{!shared:\
- %{mpe:%{pg:/usr/lpp/ppe.poe/lib/gcrt0.o}\
- %{!pg:%{p:/usr/lpp/ppe.poe/lib/mcrt0.o}\
- %{!p:/usr/lpp/ppe.poe/lib/crt0.o}}}\
- %{!mpe:\
- %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\
- %{!maix64:\
- %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
- %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}}"
+ %{maix64:%{pg:gcrt0_64%O%s}%{!pg:%{p:mcrt0_64%O%s}%{!p:crt0_64%O%s}}}\
+ %{!maix64:\
+ %{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
+ %{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}"
/* AIX V5 typedefs ptrdiff_t as "long" while earlier releases used "int". */
diff --git a/contrib/gcc/config/rs6000/altivec.h b/contrib/gcc/config/rs6000/altivec.h
index 85869dc..f1387c0 100644
--- a/contrib/gcc/config/rs6000/altivec.h
+++ b/contrib/gcc/config/rs6000/altivec.h
@@ -45,8 +45,8 @@ Boston, MA 02111-1307, USA. */
#define vector __vector
#define bool signed
-#define pixel short
-#define __pixel short
+#define pixel unsigned short
+#define __pixel unsigned short
/* Dummy prototype. */
extern int __altivec_link_error_invalid_argument ();
@@ -122,13 +122,80 @@ extern int __altivec_link_error_invalid_argument ();
inlined. */
inline vector float vec_ctf (vector unsigned int, const char) __attribute__ ((always_inline));
inline vector float vec_ctf (vector signed int, const char) __attribute__ ((always_inline));
+inline vector float vec_vcfsx (vector signed int a1, const char a2) __attribute__ ((always_inline));
+inline vector float vec_vcfux (vector unsigned int a1, const char a2) __attribute__ ((always_inline));
inline vector signed int vec_cts (vector float, const char) __attribute__ ((always_inline));
inline vector unsigned int vec_ctu (vector float, const char) __attribute__ ((always_inline));
inline void vec_dss (const char) __attribute__ ((always_inline));
-inline void vec_dst (void *, int, const char) __attribute__ ((always_inline));
-inline void vec_dstst (void *, int, const char) __attribute__ ((always_inline));
-inline void vec_dststt (void *, int, const char) __attribute__ ((always_inline));
-inline void vec_dstt (void *, int, const char) __attribute__ ((always_inline));
+
+inline void vec_dst (vector unsigned char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (vector signed char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (vector unsigned short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (vector signed short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (vector unsigned int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (vector signed int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (vector float *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (unsigned char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (signed char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (unsigned short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (signed short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (unsigned int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (signed int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (unsigned long *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (signed long *, int, const char) __attribute__ ((always_inline));
+inline void vec_dst (float *, int, const char) __attribute__ ((always_inline));
+
+inline void vec_dstst (vector unsigned char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (vector signed char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (vector unsigned short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (vector signed short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (vector unsigned int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (vector signed int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (vector float *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (unsigned char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (signed char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (unsigned short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (signed short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (unsigned int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (signed int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (unsigned long *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (signed long *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstst (float *, int, const char) __attribute__ ((always_inline));
+
+inline void vec_dststt (vector unsigned char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (vector signed char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (vector unsigned short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (vector signed short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (vector unsigned int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (vector signed int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (vector float *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (unsigned char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (signed char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (unsigned short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (signed short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (unsigned int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (signed int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (unsigned long *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (signed long *, int, const char) __attribute__ ((always_inline));
+inline void vec_dststt (float *, int, const char) __attribute__ ((always_inline));
+
+inline void vec_dstt (vector unsigned char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (vector signed char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (vector unsigned short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (vector signed short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (vector unsigned int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (vector signed int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (vector float *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (unsigned char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (signed char *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (unsigned short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (signed short *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (unsigned int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (signed int *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (unsigned long *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (signed long *, int, const char) __attribute__ ((always_inline));
+inline void vec_dstt (float *, int, const char) __attribute__ ((always_inline));
+
inline vector float vec_sld (vector float, vector float, const char) __attribute__ ((always_inline));
inline vector signed int vec_sld (vector signed int, vector signed int, const char) __attribute__ ((always_inline));
inline vector unsigned int vec_sld (vector unsigned int, vector unsigned int, const char) __attribute__ ((always_inline));
@@ -149,6 +216,13 @@ inline vector signed int vec_splat_s32 (const char) __attribute__ ((always_inlin
inline vector unsigned char vec_splat_u8 (const char) __attribute__ ((always_inline));
inline vector unsigned short vec_splat_u16 (const char) __attribute__ ((always_inline));
inline vector unsigned int vec_splat_u32 (const char) __attribute__ ((always_inline));
+inline vector float vec_vspltw (vector float a1, const char a2) __attribute__ ((always_inline));
+inline vector signed int vec_vspltw (vector signed int a1, const char a2) __attribute__ ((always_inline));
+inline vector unsigned int vec_vspltw (vector unsigned int a1, const char a2) __attribute__ ((always_inline));
+inline vector signed short vec_vsplth (vector signed short a1, const char a2) __attribute__ ((always_inline));
+inline vector unsigned short vec_vsplth (vector unsigned short a1, const char a2) __attribute__ ((always_inline));
+inline vector signed char vec_vspltb (vector signed char a1, const char a2) __attribute__ ((always_inline));
+inline vector unsigned char vec_vspltb (vector unsigned char a1, const char a2) __attribute__ ((always_inline));
/* vec_abs */
@@ -1132,7 +1206,97 @@ vec_dssall ()
/* vec_dst */
inline void
-vec_dst (void *a1, int a2, const char a3)
+vec_dst (vector unsigned char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (vector signed char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (vector unsigned short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (vector signed short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (vector unsigned int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (vector signed int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (vector float *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (unsigned char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (signed char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (unsigned short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (signed short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (unsigned int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (signed int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (unsigned long *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (signed long *a1, int a2, const char a3)
+{
+ __builtin_altivec_dst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dst (float *a1, int a2, const char a3)
{
__builtin_altivec_dst ((void *) a1, a2, a3);
}
@@ -1140,7 +1304,97 @@ vec_dst (void *a1, int a2, const char a3)
/* vec_dstst */
inline void
-vec_dstst (void *a1, int a2, const char a3)
+vec_dstst (vector unsigned char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (vector signed char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (vector unsigned short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (vector signed short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (vector unsigned int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (vector signed int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (vector float *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (unsigned char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (signed char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (unsigned short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (signed short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (unsigned int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (signed int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (unsigned long *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (signed long *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstst ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstst (float *a1, int a2, const char a3)
{
__builtin_altivec_dstst ((void *) a1, a2, a3);
}
@@ -1148,7 +1402,97 @@ vec_dstst (void *a1, int a2, const char a3)
/* vec_dststt */
inline void
-vec_dststt (void *a1, int a2, const char a3)
+vec_dststt (vector unsigned char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (vector signed char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (vector unsigned short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (vector signed short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (vector unsigned int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (vector signed int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (vector float *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (unsigned char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (signed char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (unsigned short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (signed short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (unsigned int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (signed int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (unsigned long *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (signed long *a1, int a2, const char a3)
+{
+ __builtin_altivec_dststt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dststt (float *a1, int a2, const char a3)
{
__builtin_altivec_dststt ((void *) a1, a2, a3);
}
@@ -1156,7 +1500,97 @@ vec_dststt (void *a1, int a2, const char a3)
/* vec_dstt */
inline void
-vec_dstt (void *a1, int a2, const char a3)
+vec_dstt (vector unsigned char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (vector signed char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (vector unsigned short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (vector signed short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (vector unsigned int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (vector signed int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (vector float *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (unsigned char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (signed char *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (unsigned short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (signed short *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (unsigned int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (signed int *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (unsigned long *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (signed long *a1, int a2, const char a3)
+{
+ __builtin_altivec_dstt ((void *) a1, a2, a3);
+}
+
+inline void
+vec_dstt (float *a1, int a2, const char a3)
{
__builtin_altivec_dstt ((void *) a1, a2, a3);
}
@@ -1203,6 +1637,12 @@ vec_ld (int a1, signed int *a2)
return (vector signed int) __builtin_altivec_lvx (a1, (void *) a2);
}
+inline vector signed int
+vec_ld (int a1, signed long *a2)
+{
+ return (vector signed int) __builtin_altivec_lvx (a1, (void *) a2);
+}
+
inline vector unsigned int
vec_ld (int a1, vector unsigned int *a2)
{
@@ -1215,6 +1655,12 @@ vec_ld (int a1, unsigned int *a2)
return (vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2);
}
+inline vector unsigned int
+vec_ld (int a1, unsigned long *a2)
+{
+ return (vector unsigned int) __builtin_altivec_lvx (a1, (void *) a2);
+}
+
inline vector signed short
vec_ld (int a1, vector signed short *a2)
{
@@ -1307,6 +1753,18 @@ vec_lde (int a1, unsigned int *a2)
return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
}
+inline vector signed int
+vec_lde (int a1, signed long *a2)
+{
+ return (vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
+}
+
+inline vector unsigned int
+vec_lde (int a1, unsigned long *a2)
+{
+ return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
+}
+
/* vec_lvewx */
inline vector float
@@ -1327,6 +1785,18 @@ vec_lvewx (int a1, unsigned int *a2)
return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
}
+inline vector signed int
+vec_lvewx (int a1, signed long *a2)
+{
+ return (vector signed int) __builtin_altivec_lvewx (a1, (void *) a2);
+}
+
+inline vector unsigned int
+vec_lvewx (int a1, unsigned long *a2)
+{
+ return (vector unsigned int) __builtin_altivec_lvewx (a1, (void *) a2);
+}
+
/* vec_lvehx */
inline vector signed short
@@ -1381,6 +1851,12 @@ vec_ldl (int a1, signed int *a2)
return (vector signed int) __builtin_altivec_lvxl (a1, (void *) a2);
}
+inline vector signed int
+vec_ldl (int a1, signed long *a2)
+{
+ return (vector signed int) __builtin_altivec_lvxl (a1, (void *) a2);
+}
+
inline vector unsigned int
vec_ldl (int a1, vector unsigned int *a2)
{
@@ -1393,6 +1869,12 @@ vec_ldl (int a1, unsigned int *a2)
return (vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2);
}
+inline vector unsigned int
+vec_ldl (int a1, unsigned long *a2)
+{
+ return (vector unsigned int) __builtin_altivec_lvxl (a1, (void *) a2);
+}
+
inline vector signed short
vec_ldl (int a1, vector signed short *a2)
{
@@ -1488,6 +1970,18 @@ vec_lvsl (int a1, signed int *a2)
}
inline vector unsigned char
+vec_lvsl (int a1, unsigned long *a2)
+{
+ return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
+}
+
+inline vector unsigned char
+vec_lvsl (int a1, signed long *a2)
+{
+ return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
+}
+
+inline vector unsigned char
vec_lvsl (int a1, float *a2)
{
return (vector unsigned char) __builtin_altivec_lvsl (a1, (void *) a2);
@@ -1532,6 +2026,18 @@ vec_lvsr (int a1, signed int *a2)
}
inline vector unsigned char
+vec_lvsr (int a1, unsigned long *a2)
+{
+ return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
+}
+
+inline vector unsigned char
+vec_lvsr (int a1, signed long *a2)
+{
+ return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
+}
+
+inline vector unsigned char
vec_lvsr (int a1, float *a2)
{
return (vector unsigned char) __builtin_altivec_lvsr (a1, (void *) a2);
@@ -2557,10 +3063,10 @@ vec_vpkuhum (vector unsigned short a1, vector unsigned short a2)
/* vec_packpx */
-inline vector signed short
+inline vector unsigned short
vec_packpx (vector unsigned int a1, vector unsigned int a2)
{
- return (vector signed short) __builtin_altivec_vpkpx ((vector signed int) a1, (vector signed int) a2);
+ return (vector unsigned short) __builtin_altivec_vpkpx ((vector signed int) a1, (vector signed int) a2);
}
/* vec_packs */
@@ -4321,6 +4827,12 @@ vec_unpackh (vector signed short a1)
return (vector signed int) __builtin_altivec_vupkhsh ((vector signed short) a1);
}
+inline vector unsigned int
+vec_unpackh (vector unsigned short a1)
+{
+ return (vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) a1);
+}
+
/* vec_vupkhsh */
inline vector signed int
@@ -4332,7 +4844,7 @@ vec_vupkhsh (vector signed short a1)
/* vec_vupkhpx */
inline vector unsigned int
-vec_vupkhpx (vector signed short a1)
+vec_vupkhpx (vector unsigned short a1)
{
return (vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) a1);
}
@@ -4354,7 +4866,7 @@ vec_unpackl (vector signed char a1)
}
inline vector unsigned int
-vec_vupklpx (vector signed short a1)
+vec_unpackl (vector unsigned short a1)
{
return (vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) a1);
}
@@ -4365,6 +4877,14 @@ vec_unpackl (vector signed short a1)
return (vector signed int) __builtin_altivec_vupklsh ((vector signed short) a1);
}
+/* vec_vupklpx */
+
+inline vector unsigned int
+vec_vupklpx (vector unsigned short a1)
+{
+ return (vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) a1);
+}
+
/* vec_upklsh */
inline vector signed int
@@ -4630,7 +5150,7 @@ vec_all_ge (vector signed int a1, vector signed int a2)
inline int
vec_all_ge (vector float a1, vector float a2)
{
- return __builtin_altivec_vcmpgefp_p (__CR6_EQ, a1, a2);
+ return __builtin_altivec_vcmpgefp_p (__CR6_LT, a1, a2);
}
/* vec_all_gt */
@@ -5326,7 +5846,7 @@ vec_any_le (vector signed int a1, vector signed int a2)
inline int
vec_any_le (vector float a1, vector float a2)
{
- return __builtin_altivec_vcmpgefp_p (__CR6_LT_REV, a2, a1);
+ return __builtin_altivec_vcmpgefp_p (__CR6_EQ_REV, a2, a1);
}
/* vec_any_lt */
@@ -5595,7 +6115,7 @@ struct __vec_step_help<vector float>
static const int _S_elem = 4;
};
-#define vec_step(t) __vec_step_help<t>::_S_elem
+#define vec_step(t) __vec_step_help<typeof(t)>::_S_elem
#else /* not C++ */
@@ -5623,13 +6143,13 @@ struct __vec_step_help<vector float>
__altivec_link_error_invalid_argument ())))
#define vec_step(t) \
- __ch (__builtin_types_compatible_p (t, vector signed int), 4, \
- __ch (__builtin_types_compatible_p (t, vector unsigned int), 4, \
- __ch (__builtin_types_compatible_p (t, vector signed short), 8, \
- __ch (__builtin_types_compatible_p (t, vector unsigned short), 8, \
- __ch (__builtin_types_compatible_p (t, vector signed char), 16, \
- __ch (__builtin_types_compatible_p (t, vector unsigned char), 16, \
- __ch (__builtin_types_compatible_p (t, vector float), 4, \
+ __ch (__builtin_types_compatible_p (typeof (t), vector signed int), 4, \
+ __ch (__builtin_types_compatible_p (typeof (t), vector unsigned int), 4, \
+ __ch (__builtin_types_compatible_p (typeof (t), vector signed short), 8, \
+ __ch (__builtin_types_compatible_p (typeof (t), vector unsigned short), 8, \
+ __ch (__builtin_types_compatible_p (typeof (t), vector signed char), 16, \
+ __ch (__builtin_types_compatible_p (typeof (t), vector unsigned char), 16, \
+ __ch (__builtin_types_compatible_p (typeof (t), vector float), 4, \
__altivec_link_error_invalid_argument ())))))))
#define vec_vaddubm(a1, a2) \
@@ -5813,8 +6333,10 @@ __ch (__bin_args_eq (vector float, (a1), vector unsigned int, (a2)), \
((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
__ch (__bin_args_eq (vector unsigned int, (a1), vector float, (a2)), \
((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
-__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \
- ((vector unsigned int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
+__ch (__bin_args_eq (vector signed int, (a1), vector float, (a2)), \
+ ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
+__ch (__bin_args_eq (vector float, (a1), vector signed int, (a2)), \
+ ((vector float) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \
((vector unsigned int) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \
@@ -5826,9 +6348,9 @@ __ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \
__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \
((vector unsigned short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
__ch (__bin_args_eq (vector signed short, (a1), vector unsigned short, (a2)), \
- ((vector signed short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
+ ((vector unsigned short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
__ch (__bin_args_eq (vector unsigned short, (a1), vector signed short, (a2)), \
- ((vector signed short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
+ ((vector unsigned short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \
((vector signed short) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
__ch (__bin_args_eq (vector signed short, (a1), vector signed short, (a2)), \
@@ -5851,7 +6373,7 @@ __ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \
((vector signed char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
__ch (__bin_args_eq (vector unsigned char, (a1), vector signed char, (a2)), \
((vector signed char) __builtin_altivec_vandc ((vector signed int) (a1), (vector signed int) (a2))), \
- __altivec_link_error_invalid_argument ()))))))))))))))))))))))
+ __altivec_link_error_invalid_argument ())))))))))))))))))))))))
#define vec_avg(a1, a2) \
__ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \
@@ -6023,17 +6545,25 @@ __ch (__bin_args_eq (vector unsigned int, (a1), int, (a2)), \
((vector float) __builtin_altivec_vcfux ((vector signed int) (a1), (const char) (a2))), \
__ch (__bin_args_eq (vector signed int, (a1), int, (a2)), \
((vector float) __builtin_altivec_vcfsx ((vector signed int) (a1), (const char) (a2))), \
- __altivec_link_error_invalid_argument ()))
+__ch (__bin_args_eq (vector unsigned int, (a1), unsigned int, (a2)), \
+ ((vector float) __builtin_altivec_vcfux ((vector signed int) (a1), (const char) (a2))), \
+__ch (__bin_args_eq (vector signed int, (a1), unsigned int, (a2)), \
+ ((vector float) __builtin_altivec_vcfsx ((vector signed int) (a1), (const char) (a2))), \
+ __altivec_link_error_invalid_argument ()))))
#define vec_vcfsx(a1, a2) \
__ch (__bin_args_eq (vector signed int, (a1), int, (a2)), \
((vector float) __builtin_altivec_vcfsx ((vector signed int) (a1), (const char) (a2))), \
- __altivec_link_error_invalid_argument ())
+__ch (__bin_args_eq (vector signed int, (a1), unsigned int, (a2)), \
+ ((vector float) __builtin_altivec_vcfsx ((vector signed int) (a1), (const char) (a2))), \
+ __altivec_link_error_invalid_argument ()))
#define vec_vcfux(a1, a2) \
__ch (__bin_args_eq (vector unsigned int, (a1), int, (a2)), \
((vector float) __builtin_altivec_vcfux ((vector signed int) (a1), (const char) (a2))), \
- __altivec_link_error_invalid_argument ())
+__ch (__bin_args_eq (vector unsigned int, (a1), unsigned int, (a2)), \
+ ((vector float) __builtin_altivec_vcfux ((vector signed int) (a1), (const char) (a2))), \
+ __altivec_link_error_invalid_argument ()))
#define vec_cts(a1, a2) __builtin_altivec_vctsxs ((a1), (a2))
@@ -6043,209 +6573,311 @@ __ch (__bin_args_eq (vector unsigned int, (a1), int, (a2)), \
#define vec_dssall() __builtin_altivec_dssall ()
-#define vec_dst(a1, a2, a3) __builtin_altivec_dst ((a1), (a2), (a3))
-
-#define vec_dstst(a1, a2, a3) __builtin_altivec_dstst ((a1), (a2), (a3))
-
-#define vec_dststt(a1, a2, a3) __builtin_altivec_dststt ((a1), (a2), (a3))
-
-#define vec_dstt(a1, a2, a3) __builtin_altivec_dstt ((a1), (a2), (a3))
+#define vec_dst(a1, a2, a3) \
+__ch (__un_args_eq (vector unsigned char, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed char, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector unsigned short, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed short, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector unsigned int, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed int, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector float, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned char, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed char, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned short, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed short, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned int, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed int, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned long, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed long, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (float, *(a1)), \
+ __builtin_altivec_dst ((void *) (a1), (a2), (a3)), \
+ __altivec_link_error_invalid_argument ()))))))))))))))))
+
+#define vec_dstst(a1, a2, a3) \
+__ch (__un_args_eq (vector unsigned char, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed char, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector unsigned short, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed short, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector unsigned int, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed int, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector float, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned char, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed char, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned short, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed short, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned int, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed int, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned long, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed long, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (float, *(a1)), \
+ __builtin_altivec_dstst ((void *) (a1), (a2), (a3)), \
+ __altivec_link_error_invalid_argument ()))))))))))))))))
+
+#define vec_dststt(a1, a2, a3) \
+__ch (__un_args_eq (vector unsigned char, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed char, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector unsigned short, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed short, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector unsigned int, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed int, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector float, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned char, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed char, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned short, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed short, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned int, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed int, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned long, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed long, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (float, *(a1)), \
+ __builtin_altivec_dststt ((void *) (a1), (a2), (a3)), \
+ __altivec_link_error_invalid_argument ()))))))))))))))))
+
+#define vec_dstt(a1, a2, a3) \
+__ch (__un_args_eq (vector unsigned char, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed char, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector unsigned short, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed short, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector unsigned int, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector signed int, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (vector float, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned char, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed char, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned short, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed short, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned int, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed int, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (unsigned long, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (signed long, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+__ch (__un_args_eq (float, *(a1)), \
+ __builtin_altivec_dstt ((void *) (a1), (a2), (a3)), \
+ __altivec_link_error_invalid_argument ()))))))))))))))))
#define vec_expte(a1) __builtin_altivec_vexptefp ((a1))
#define vec_floor(a1) __builtin_altivec_vrfim (a1)
#define vec_ld(a, b) \
-__ch (__un_args_eq (vector unsigned char *, (b)), \
- ((vector unsigned char) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector unsigned char [], (b)), \
+__ch (__un_args_eq (vector unsigned char, *(b)), \
((vector unsigned char) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (unsigned char *, (b)), \
+__ch (__un_args_eq (unsigned char, *(b)), \
((vector unsigned char) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (unsigned char [], (b)), \
- ((vector unsigned char) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector signed char *, (b)), \
- ((vector signed char) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector signed char [], (b)), \
- ((vector signed char) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (signed char *, (b)), \
+__ch (__un_args_eq (vector signed char, *(b)), \
((vector signed char) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (signed char [], (b)), \
+__ch (__un_args_eq (signed char, *(b)), \
((vector signed char) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector unsigned short *, (b)), \
+__ch (__un_args_eq (vector unsigned short, *(b)), \
((vector unsigned short) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector unsigned short [], (b)), \
+__ch (__un_args_eq (unsigned short, *(b)), \
((vector unsigned short) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (unsigned short *, (b)), \
- ((vector unsigned short) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (unsigned short [], (b)), \
- ((vector unsigned short) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector signed short *, (b)), \
- ((vector signed short) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector signed short [], (b)), \
- ((vector signed short) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (signed short *, (b)), \
+__ch (__un_args_eq (vector signed short, *(b)), \
((vector signed short) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (signed short [], (b)), \
+__ch (__un_args_eq (signed short, *(b)), \
((vector signed short) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector unsigned int *, (b)), \
+__ch (__un_args_eq (vector unsigned int, *(b)), \
((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector unsigned int [], (b)), \
+__ch (__un_args_eq (unsigned int, *(b)), \
((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (unsigned int *, (b)), \
+__ch (__un_args_eq (unsigned long, *(b)), \
((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (unsigned int [], (b)), \
- ((vector unsigned int) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector signed int *, (b)), \
- ((vector signed int) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector signed int [], (b)), \
+__ch (__un_args_eq (vector signed int, *(b)), \
((vector signed int) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (signed int *, (b)), \
+__ch (__un_args_eq (signed int, *(b)), \
((vector signed int) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (signed int [], (b)), \
+__ch (__un_args_eq (signed long, *(b)), \
((vector signed int) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector float *, (b)), \
- ((vector float) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (vector float [], (b)), \
- ((vector float) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (float *, (b)), \
+__ch (__un_args_eq (vector float, *(b)), \
((vector float) __builtin_altivec_lvx ((a), (b))), \
-__ch (__un_args_eq (float [], (b)), \
+__ch (__un_args_eq (float, *(b)), \
((vector float) __builtin_altivec_lvx ((a), (b))), \
-__altivec_link_error_invalid_argument ()))))))))))))))))))))))))))))
+__altivec_link_error_invalid_argument ()))))))))))))))))
#define vec_lde(a, b) \
-__ch (__un_args_eq (unsigned char *, (b)), \
+__ch (__un_args_eq (unsigned char, *(b)), \
((vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \
-__ch (__un_args_eq (unsigned char [], (b)), \
- ((vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \
-__ch (__un_args_eq (signed char *, (b)), \
- ((vector signed char) __builtin_altivec_lvebx ((a), (b))), \
-__ch (__un_args_eq (signed char [], (b)), \
+__ch (__un_args_eq (signed char, *(b)), \
((vector signed char) __builtin_altivec_lvebx ((a), (b))), \
-__ch (__un_args_eq (unsigned short *, (b)), \
+__ch (__un_args_eq (unsigned short, *(b)), \
((vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \
-__ch (__un_args_eq (unsigned short [], (b)), \
- ((vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \
-__ch (__un_args_eq (signed short *, (b)), \
- ((vector signed short) __builtin_altivec_lvehx ((a), (b))), \
-__ch (__un_args_eq (signed short [], (b)), \
+__ch (__un_args_eq (signed short, *(b)), \
((vector signed short) __builtin_altivec_lvehx ((a), (b))), \
-__ch (__un_args_eq (unsigned int *, (b)), \
+__ch (__un_args_eq (unsigned long, *(b)), \
((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
-__ch (__un_args_eq (unsigned int [], (b)), \
- ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
-__ch (__un_args_eq (signed int *, (b)), \
+__ch (__un_args_eq (signed long, *(b)), \
((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
-__ch (__un_args_eq (signed int [], (b)), \
+__ch (__un_args_eq (unsigned int, *(b)), \
+ ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
+__ch (__un_args_eq (signed int, *(b)), \
((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
-__ch (__un_args_eq (float *, (b)), \
+__ch (__un_args_eq (float, *(b)), \
((vector float) __builtin_altivec_lvewx ((a), (b))), \
-__ch (__un_args_eq (float [], (b)), \
- ((vector float) __builtin_altivec_lvewx ((a), (b))), \
-__altivec_link_error_invalid_argument ()))))))))))))))
+__altivec_link_error_invalid_argument ())))))))))
#define vec_lvewx(a, b) \
-__ch (__un_args_eq (unsigned int *, (b)), \
- ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
-__ch (__un_args_eq (unsigned int [], (b)), \
+__ch (__un_args_eq (unsigned int, *(b)), \
((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
-__ch (__un_args_eq (signed int *, (b)), \
+__ch (__un_args_eq (signed int, *(b)), \
((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
-__ch (__un_args_eq (signed int [], (b)), \
+__ch (__un_args_eq (unsigned long, *(b)), \
+ ((vector unsigned int) __builtin_altivec_lvewx ((a), (b))), \
+__ch (__un_args_eq (signed long, *(b)), \
((vector signed int) __builtin_altivec_lvewx ((a), (b))), \
-__ch (__un_args_eq (float *, (b)), \
- ((vector float) __builtin_altivec_lvewx ((a), (b))), \
-__ch (__un_args_eq (float [], (b)), \
+__ch (__un_args_eq (float, *(b)), \
((vector float) __builtin_altivec_lvewx ((a), (b))), \
-__altivec_link_error_invalid_argument ()))))))
+__altivec_link_error_invalid_argument ())))))
#define vec_lvehx(a, b) \
-__ch (__un_args_eq (unsigned short *, (b)), \
- ((vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \
-__ch (__un_args_eq (unsigned short [], (b)), \
+__ch (__un_args_eq (unsigned short, *(b)), \
((vector unsigned short) __builtin_altivec_lvehx ((a), (b))), \
-__ch (__un_args_eq (signed short *, (b)), \
+__ch (__un_args_eq (signed short, *(b)), \
((vector signed short) __builtin_altivec_lvehx ((a), (b))), \
-__ch (__un_args_eq (signed short [], (b)), \
- ((vector signed short) __builtin_altivec_lvehx ((a), (b))), \
-__altivec_link_error_invalid_argument ()))))
+__altivec_link_error_invalid_argument ()))
#define vec_lvebx(a, b) \
-__ch (__un_args_eq (unsigned char *, (b)), \
- ((vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \
-__ch (__un_args_eq (unsigned char [], (b)), \
+__ch (__un_args_eq (unsigned char, *(b)), \
((vector unsigned char) __builtin_altivec_lvebx ((a), (b))), \
-__ch (__un_args_eq (signed char *, (b)), \
+__ch (__un_args_eq (signed char, *(b)), \
((vector signed char) __builtin_altivec_lvebx ((a), (b))), \
-__ch (__un_args_eq (signed char [], (b)), \
- ((vector signed char) __builtin_altivec_lvebx ((a), (b))), \
-__altivec_link_error_invalid_argument ()))))
+__altivec_link_error_invalid_argument ()))
#define vec_ldl(a, b) \
-__ch (__un_args_eq (vector unsigned char *, (b)), \
- ((vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector unsigned char [], (b)), \
+__ch (__un_args_eq (vector unsigned char, *(b)), \
((vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (unsigned char *, (b)), \
+__ch (__un_args_eq (unsigned char, *(b)), \
((vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (unsigned char [], (b)), \
- ((vector unsigned char) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector signed char *, (b)), \
- ((vector signed char) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector signed char [], (b)), \
- ((vector signed char) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (signed char *, (b)), \
+__ch (__un_args_eq (vector signed char, *(b)), \
((vector signed char) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (signed char [], (b)), \
+__ch (__un_args_eq (signed char, *(b)), \
((vector signed char) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector unsigned short *, (b)), \
+__ch (__un_args_eq (vector unsigned short, *(b)), \
((vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector unsigned short [], (b)), \
+__ch (__un_args_eq (unsigned short, *(b)), \
((vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (unsigned short *, (b)), \
- ((vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (unsigned short [], (b)), \
- ((vector unsigned short) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector signed short *, (b)), \
- ((vector signed short) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector signed short [], (b)), \
- ((vector signed short) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (signed short *, (b)), \
+__ch (__un_args_eq (vector signed short, *(b)), \
((vector signed short) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (signed short [], (b)), \
+__ch (__un_args_eq (signed short, *(b)), \
((vector signed short) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector unsigned int *, (b)), \
+__ch (__un_args_eq (vector unsigned int, *(b)), \
((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector unsigned int [], (b)), \
+__ch (__un_args_eq (unsigned int, *(b)), \
((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (unsigned int *, (b)), \
+__ch (__un_args_eq (unsigned long, *(b)), \
((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (unsigned int [], (b)), \
- ((vector unsigned int) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector signed int *, (b)), \
- ((vector signed int) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector signed int [], (b)), \
+__ch (__un_args_eq (vector signed int, *(b)), \
((vector signed int) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (signed int *, (b)), \
+__ch (__un_args_eq (signed int, *(b)), \
((vector signed int) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (signed int [], (b)), \
+__ch (__un_args_eq (signed long, *(b)), \
((vector signed int) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector float *, (b)), \
- ((vector float) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (vector float [], (b)), \
- ((vector float) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (float *, (b)), \
+__ch (__un_args_eq (vector float, *(b)), \
((vector float) __builtin_altivec_lvxl ((a), (b))), \
-__ch (__un_args_eq (float [], (b)), \
+__ch (__un_args_eq (float, *(b)), \
((vector float) __builtin_altivec_lvxl ((a), (b))), \
-__altivec_link_error_invalid_argument ()))))))))))))))))))))))))))))
+__altivec_link_error_invalid_argument ()))))))))))))))))
#define vec_loge(a1) __builtin_altivec_vlogefp ((a1))
-#define vec_lvsl(a1, a2) ((vector unsigned char) __builtin_altivec_lvsl ((a1), (a2)))
-
-#define vec_lvsr(a1, a2) ((vector unsigned char) __builtin_altivec_lvsr ((a1), (a2)))
+#define vec_lvsl(a1, a2) \
+__ch (__un_args_eq (unsigned char, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
+__ch (__un_args_eq (signed char, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
+__ch (__un_args_eq (unsigned short, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
+__ch (__un_args_eq (signed short, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
+__ch (__un_args_eq (unsigned int, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
+__ch (__un_args_eq (signed int, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
+__ch (__un_args_eq (unsigned long, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
+__ch (__un_args_eq (signed long, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
+__ch (__un_args_eq (float, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsl ((a1), (void *) (a2))), \
+__altivec_link_error_invalid_argument ())))))))))
+
+#define vec_lvsr(a1, a2) \
+__ch (__un_args_eq (unsigned char, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
+__ch (__un_args_eq (signed char, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
+__ch (__un_args_eq (unsigned short, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
+__ch (__un_args_eq (signed short, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
+__ch (__un_args_eq (unsigned int, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
+__ch (__un_args_eq (signed int, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
+__ch (__un_args_eq (unsigned long, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
+__ch (__un_args_eq (signed long, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
+__ch (__un_args_eq (float, *(a2)), \
+ ((vector unsigned char) __builtin_altivec_lvsr ((a1), (void *) (a2))), \
+__altivec_link_error_invalid_argument ())))))))))
#define vec_madd(a1, a2, a3) (__builtin_altivec_vmaddfp ((a1), (a2), (a3)))
@@ -6524,7 +7156,7 @@ __ch (__tern_args_eq (vector signed char, (a1), vector unsigned char, (a2), vect
((vector signed int) __builtin_altivec_vmsummbm ((vector signed char) (a1), (vector signed char) (a2), (vector signed int) (a3))), \
__altivec_link_error_invalid_argument ())
-#define vec_msumubm(a1, a2, a3) \
+#define vec_vmsumubm(a1, a2, a3) \
__ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), vector unsigned int, (a3)), \
((vector unsigned int) __builtin_altivec_vmsumubm ((vector signed char) (a1), (vector signed char) (a2), (vector signed int) (a3))), \
__altivec_link_error_invalid_argument ())
@@ -6613,7 +7245,7 @@ __ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)),
((vector unsigned int) __builtin_altivec_vmulouh ((vector signed short) (a1), (vector signed short) (a2))), \
__altivec_link_error_invalid_argument ())
-#define vec_mulosb(a1, a2) \
+#define vec_vmulosb(a1, a2) \
__ch (__bin_args_eq (vector signed char, (a1), vector signed char, (a2)), \
((vector signed short) __builtin_altivec_vmulosb ((vector signed char) (a1), (vector signed char) (a2))), \
__altivec_link_error_invalid_argument ())
@@ -6703,7 +7335,10 @@ __ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)),
((vector unsigned char) __builtin_altivec_vpkuhum ((vector signed short) (a1), (vector signed short) (a2))), \
__altivec_link_error_invalid_argument ()))
-#define vec_packpx(a1, a2) __builtin_altivec_vpkpx ((a1), (a2))
+#define vec_packpx(a1, a2) \
+__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \
+ (vector unsigned short) __builtin_altivec_vpkpx ((vector signed int) (a1), (vector signed int) (a2)), \
+__altivec_link_error_invalid_argument ())
#define vec_packs(a1, a2) \
__ch (__bin_args_eq (vector unsigned short, (a1), vector unsigned short, (a2)), \
@@ -6886,19 +7521,33 @@ __altivec_link_error_invalid_argument ()))
#define vec_sld(a1, a2, a3) \
__ch (__tern_args_eq (vector float, (a1), vector float, (a2), int, (a3)), \
((vector float) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
+__ch (__tern_args_eq (vector float, (a1), vector float, (a2), unsigned int, (a3)), \
+ ((vector float) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
__ch (__tern_args_eq (vector signed int, (a1), vector signed int, (a2), int, (a3)), \
((vector signed int) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
+__ch (__tern_args_eq (vector signed int, (a1), vector signed int, (a2), unsigned int, (a3)), \
+ ((vector signed int) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
__ch (__tern_args_eq (vector unsigned int, (a1), vector unsigned int, (a2), int, (a3)), \
((vector unsigned int) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
+__ch (__tern_args_eq (vector unsigned int, (a1), vector unsigned int, (a2), unsigned int, (a3)), \
+ ((vector unsigned int) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), int, (a3)), \
((vector signed short) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
+__ch (__tern_args_eq (vector signed short, (a1), vector signed short, (a2), unsigned int, (a3)), \
+ ((vector signed short) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), int, (a3)), \
((vector unsigned short) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
+__ch (__tern_args_eq (vector unsigned short, (a1), vector unsigned short, (a2), unsigned int, (a3)), \
+ ((vector unsigned short) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
__ch (__tern_args_eq (vector signed char, (a1), vector signed char, (a2), int, (a3)), \
((vector signed char) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
+__ch (__tern_args_eq (vector signed char, (a1), vector signed char, (a2), unsigned int, (a3)), \
+ ((vector signed char) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
__ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), int, (a3)), \
((vector unsigned char) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
- __altivec_link_error_invalid_argument ())))))))
+__ch (__tern_args_eq (vector unsigned char, (a1), vector unsigned char, (a2), unsigned int, (a3)), \
+ ((vector unsigned char) __builtin_altivec_vsldoi_4si ((vector signed int) (a1), (vector signed int) (a2), (const char) (a3))), \
+ __altivec_link_error_invalid_argument ()))))))))))))))
#define vec_sll(a1, a2) \
__ch (__bin_args_eq (vector signed int, (a1), vector unsigned int, (a2)), \
@@ -6973,42 +7622,70 @@ __ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \
#define vec_splat(a1, a2) \
__ch (__bin_args_eq (vector signed char, ((a1)), int, ((a2))), \
((vector signed char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \
+__ch (__bin_args_eq (vector signed char, ((a1)), unsigned int, ((a2))), \
+ ((vector signed char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \
__ch (__bin_args_eq (vector unsigned char, ((a1)), int, ((a2))), \
((vector unsigned char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \
+__ch (__bin_args_eq (vector unsigned char, ((a1)), unsigned int, ((a2))), \
+ ((vector unsigned char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \
__ch (__bin_args_eq (vector signed short, ((a1)), int, ((a2))), \
((vector signed short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \
+__ch (__bin_args_eq (vector signed short, ((a1)), unsigned int, ((a2))), \
+ ((vector signed short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \
__ch (__bin_args_eq (vector unsigned short, ((a1)), int, ((a2))), \
((vector unsigned short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \
+__ch (__bin_args_eq (vector unsigned short, ((a1)), unsigned int, ((a2))), \
+ ((vector unsigned short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \
__ch (__bin_args_eq (vector float, ((a1)), int, ((a2))), \
((vector float) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \
+__ch (__bin_args_eq (vector float, ((a1)), unsigned int, ((a2))), \
+ ((vector float) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \
__ch (__bin_args_eq (vector signed int, ((a1)), int, ((a2))), \
((vector signed int) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \
+__ch (__bin_args_eq (vector signed int, ((a1)), unsigned int, ((a2))), \
+ ((vector signed int) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \
__ch (__bin_args_eq (vector unsigned int, ((a1)), int, ((a2))), \
((vector unsigned int) __builtin_altivec_vspltw ((vector signed int) (a1), (const char) ((a2)))), \
- __altivec_link_error_invalid_argument ())))))))
+__ch (__bin_args_eq (vector unsigned int, ((a1)), unsigned int, ((a2))), \
+ ((vector unsigned int) __builtin_altivec_vspltw ((vector signed int) (a1), (const char) ((a2)))), \
+ __altivec_link_error_invalid_argument ()))))))))))))))
#define vec_vspltw(a1, a2) \
__ch (__bin_args_eq (vector float, ((a1)), int, ((a2))), \
((vector float) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \
+__ch (__bin_args_eq (vector float, ((a1)), unsigned int, ((a2))), \
+ ((vector float) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \
__ch (__bin_args_eq (vector signed int, ((a1)), int, ((a2))), \
((vector signed int) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \
+__ch (__bin_args_eq (vector signed int, ((a1)), unsigned int, ((a2))), \
+ ((vector signed int) __builtin_altivec_vspltw ((vector signed int) ((a1)), (const char) ((a2)))), \
__ch (__bin_args_eq (vector unsigned int, ((a1)), int, ((a2))), \
((vector unsigned int) __builtin_altivec_vspltw ((vector signed int) (a1), (const char) ((a2)))), \
-__altivec_link_error_invalid_argument ())))
+__ch (__bin_args_eq (vector unsigned int, ((a1)), unsigned int, ((a2))), \
+ ((vector unsigned int) __builtin_altivec_vspltw ((vector signed int) (a1), (const char) ((a2)))), \
+__altivec_link_error_invalid_argument ()))))))
#define vec_vsplth(a1, a2) \
__ch (__bin_args_eq (vector signed short, ((a1)), int, ((a2))), \
((vector signed short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \
+__ch (__bin_args_eq (vector signed short, ((a1)), unsigned int, ((a2))), \
+ ((vector signed short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \
__ch (__bin_args_eq (vector unsigned short, ((a1)), int, ((a2))), \
((vector unsigned short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \
-__altivec_link_error_invalid_argument ()))
+__ch (__bin_args_eq (vector unsigned short, ((a1)), unsigned int, ((a2))), \
+ ((vector unsigned short) __builtin_altivec_vsplth ((vector signed short) ((a1)), (const char) ((a2)))), \
+__altivec_link_error_invalid_argument ()))))
#define vec_vspltb(a1, a2) \
__ch (__bin_args_eq (vector signed char, ((a1)), int, ((a2))), \
((vector signed char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \
+__ch (__bin_args_eq (vector signed char, ((a1)), unsigned int, ((a2))), \
+ ((vector signed char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \
__ch (__bin_args_eq (vector unsigned char, ((a1)), int, ((a2))), \
((vector unsigned char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \
-__altivec_link_error_invalid_argument ()))
+__ch (__bin_args_eq (vector unsigned char, ((a1)), unsigned int, ((a2))), \
+ ((vector unsigned char) __builtin_altivec_vspltb ((vector signed char) ((a1)), (const char) ((a2)))), \
+__altivec_link_error_invalid_argument ()))))
#define vec_splat_s8(a1) __builtin_altivec_vspltisb ((a1))
@@ -7277,7 +7954,10 @@ __ch (__bin_args_eq (vector unsigned char, (a1), vector unsigned char, (a2)), \
((vector unsigned char) __builtin_altivec_vsububm ((vector signed char) (a1), (vector signed char) (a2))), \
__altivec_link_error_invalid_argument ()))))
-#define vec_subc(a1, a2) ((vector unsigned int) __builtin_altivec_vsubcuw ((vector unsigned int) (a1), (vector unsigned int) (a2)))
+#define vec_subc(a1, a2) \
+__ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \
+ ((vector unsigned int) __builtin_altivec_vsubcuw ((vector signed int) (a1), (vector signed int) (a2))), \
+__altivec_link_error_invalid_argument ())
#define vec_subs(a1, a2) \
__ch (__bin_args_eq (vector signed char, (a1), vector unsigned char, (a2)), \
@@ -7381,7 +8061,7 @@ __altivec_link_error_invalid_argument ())
#define vec_unpackh(a1) \
__ch (__un_args_eq (vector signed char, (a1)), \
((vector signed short) __builtin_altivec_vupkhsb ((vector signed char) (a1))), \
-__ch (__un_args_eq (vector signed short, (a1)), \
+__ch (__un_args_eq (vector unsigned short, (a1)), \
((vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) (a1))), \
__ch (__un_args_eq (vector signed short, (a1)), \
((vector signed int) __builtin_altivec_vupkhsh ((vector signed short) (a1))), \
@@ -7393,7 +8073,7 @@ __ch (__un_args_eq (vector signed short, (a1)), \
__altivec_link_error_invalid_argument ())
#define vec_vupkhpx(a1) \
-__ch (__un_args_eq (vector signed short, (a1)), \
+__ch (__un_args_eq (vector unsigned short, (a1)), \
((vector unsigned int) __builtin_altivec_vupkhpx ((vector signed short) (a1))), \
__altivec_link_error_invalid_argument ())
@@ -7405,7 +8085,7 @@ __altivec_link_error_invalid_argument ())
#define vec_unpackl(a1) \
__ch (__un_args_eq (vector signed char, (a1)), \
((vector signed short) __builtin_altivec_vupklsb ((vector signed char) (a1))), \
-__ch (__un_args_eq (vector signed short, (a1)), \
+__ch (__un_args_eq (vector unsigned short, (a1)), \
((vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) (a1))), \
__ch (__un_args_eq (vector signed short, (a1)), \
((vector signed int) __builtin_altivec_vupklsh ((vector signed short) (a1))), \
@@ -7417,7 +8097,7 @@ __ch (__un_args_eq (vector signed short, (a1)), \
__altivec_link_error_invalid_argument ())
#define vec_vupklpx(a1) \
-__ch (__un_args_eq (vector signed short, (a1)), \
+__ch (__un_args_eq (vector unsigned short, (a1)), \
((vector unsigned int) __builtin_altivec_vupklpx ((vector signed short) (a1))), \
__altivec_link_error_invalid_argument ())
@@ -7433,10 +8113,12 @@ __ch (__bin_args_eq (vector float, ((a1)), vector unsigned int, ((a2))), \
((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
__ch (__bin_args_eq (vector unsigned int, ((a1)), vector float, ((a2))), \
((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
+__ch (__bin_args_eq (vector signed int, ((a1)), vector float, ((a2))), \
+ ((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
+__ch (__bin_args_eq (vector float, ((a1)), vector signed int, ((a2))), \
+ ((vector float) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
__ch (__bin_args_eq (vector signed int, ((a1)), vector signed int, ((a2))), \
((vector signed int) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
-__ch (__bin_args_eq (vector unsigned int, ((a1)), vector unsigned int, ((a2))), \
- ((vector unsigned int) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
__ch (__bin_args_eq (vector signed int, ((a1)), vector unsigned int, ((a2))), \
((vector unsigned int) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
__ch (__bin_args_eq (vector unsigned int, ((a1)), vector signed int, ((a2))), \
@@ -7446,9 +8128,9 @@ __ch (__bin_args_eq (vector unsigned int, ((a1)), vector unsigned int, ((a2))),
__ch (__bin_args_eq (vector unsigned short, ((a1)), vector unsigned short, ((a2))), \
((vector unsigned short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
__ch (__bin_args_eq (vector signed short, ((a1)), vector unsigned short, ((a2))), \
- ((vector signed short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
+ ((vector unsigned short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
__ch (__bin_args_eq (vector unsigned short, ((a1)), vector signed short, ((a2))), \
- ((vector signed short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
+ ((vector unsigned short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
__ch (__bin_args_eq (vector unsigned short, ((a1)), vector unsigned short, ((a2))), \
((vector signed short) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
__ch (__bin_args_eq (vector signed short, ((a1)), vector signed short, ((a2))), \
@@ -7470,8 +8152,8 @@ __ch (__bin_args_eq (vector unsigned char, ((a1)), vector unsigned char, ((a2)))
__ch (__bin_args_eq (vector signed char, ((a1)), vector unsigned char, ((a2))), \
((vector signed char) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
__ch (__bin_args_eq (vector unsigned char, ((a1)), vector signed char, ((a2))), \
- ((vector signed char) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
- __altivec_link_error_invalid_argument ()))))))))))))))))))))))
+ ((vector unsigned char) __builtin_altivec_vxor ((vector signed int) ((a1)), (vector signed int) ((a2)))), \
+ __altivec_link_error_invalid_argument ())))))))))))))))))))))))
/* Predicates. */
@@ -7530,7 +8212,7 @@ __ch (__bin_args_eq (vector unsigned int, (a1), vector unsigned int, (a2)), \
__ch (__bin_args_eq (vector signed int, (a1), vector signed int, (a2)), \
__builtin_altivec_vcmpgtsw_p (__CR6_EQ, (vector signed int) (a2), (vector signed int) (a1)), \
__ch (__bin_args_eq (vector float, (a1), vector float, (a2)), \
- __builtin_altivec_vcmpgefp_p (__CR6_EQ, (vector float) (a1), (vector float) (a2)), \
+ __builtin_altivec_vcmpgefp_p (__CR6_LT, (vector float) (a1), (vector float) (a2)), \
__altivec_link_error_invalid_argument ())))))))))))))
#define vec_all_gt(a1, a2) \
diff --git a/contrib/gcc/config/rs6000/linux64.h b/contrib/gcc/config/rs6000/linux64.h
index 40b64dc..f84e1e3 100644
--- a/contrib/gcc/config/rs6000/linux64.h
+++ b/contrib/gcc/config/rs6000/linux64.h
@@ -308,3 +308,22 @@ do { \
|| (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
&& ! TARGET_NO_FP_IN_TOC)))))
+/* This is the same as the dbxelf.h version, except that we need to
+ use the function code label, not the function descriptor. */
+#undef ASM_OUTPUT_SOURCE_LINE
+#define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
+do \
+ { \
+ static int sym_lineno = 1; \
+ char temp[256]; \
+ ASM_GENERATE_INTERNAL_LABEL (temp, "LM", sym_lineno); \
+ fprintf (FILE, "\t.stabn 68,0,%d,", LINE); \
+ assemble_name (FILE, temp); \
+ fputs ("-.", FILE); \
+ assemble_name (FILE, \
+ XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
+ putc ('\n', FILE); \
+ ASM_OUTPUT_INTERNAL_LABEL (FILE, "LM", sym_lineno); \
+ sym_lineno += 1; \
+ } \
+while (0)
diff --git a/contrib/gcc/config/rs6000/netbsd.h b/contrib/gcc/config/rs6000/netbsd.h
index 95f6542..d41e576 100644
--- a/contrib/gcc/config/rs6000/netbsd.h
+++ b/contrib/gcc/config/rs6000/netbsd.h
@@ -60,11 +60,6 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (PowerPC NetBSD/ELF)");
-/* For backward compatibility, we must continue to use the AIX
- structure return convention. */
-#undef DRAFT_V4_STRUCT_RET
-#define DRAFT_V4_STRUCT_RET 1
-
/* Use STABS debugging information by default. DWARF2 makes a mess of
the 1.5.2 linker. */
#undef PREFERRED_DEBUGGING_TYPE
diff --git a/contrib/gcc/config/rs6000/rs6000.c b/contrib/gcc/config/rs6000/rs6000.c
index 45d6fdf..92b1d64 100644
--- a/contrib/gcc/config/rs6000/rs6000.c
+++ b/contrib/gcc/config/rs6000/rs6000.c
@@ -9735,23 +9735,22 @@ output_mi_thunk (file, thunk_fndecl, delta, function)
fprintf (file, "\taddi %s,%s,%d\n", this_reg, this_reg, delta);
}
+ /* 64-bit constants. If "int" is 32 bits, we'll never hit this abort. */
+ else if (TARGET_64BIT && (delta < -2147483647 - 1 || delta > 2147483647))
+ abort ();
+
/* Large constants that can be done by one addis instruction. */
- else if ((delta & 0xffff) == 0 && num_insns_constant_wide (delta) == 1)
+ else if ((delta & 0xffff) == 0)
asm_fprintf (file, "\t{cau|addis} %s,%s,%d\n", this_reg, this_reg,
delta >> 16);
/* 32-bit constants that can be done by an add and addis instruction. */
- else if (TARGET_32BIT || num_insns_constant_wide (delta) == 1)
+ else
{
/* Break into two pieces, propagating the sign bit from the low
word to the upper word. */
- int delta_high = delta >> 16;
- int delta_low = delta & 0xffff;
- if ((delta_low & 0x8000) != 0)
- {
- delta_high++;
- delta_low = (delta_low ^ 0x8000) - 0x8000; /* sign extend */
- }
+ int delta_low = ((delta & 0xffff) ^ 0x8000) - 0x8000;
+ int delta_high = (delta - delta_low) >> 16;
asm_fprintf (file, "\t{cau|addis} %s,%s,%d\n", this_reg, this_reg,
delta_high);
@@ -9762,10 +9761,6 @@ output_mi_thunk (file, thunk_fndecl, delta, function)
fprintf (file, "\taddi %s,%s,%d\n", this_reg, this_reg, delta_low);
}
- /* 64-bit constants, fixme */
- else
- abort ();
-
/* Get the prefix in front of the names. */
switch (DEFAULT_ABI)
{
@@ -9821,7 +9816,10 @@ output_mi_thunk (file, thunk_fndecl, delta, function)
}
assemble_name (file, fname);
putc ('\n', file);
- text_section ();
+ if (TARGET_ELF)
+ function_section (current_function_decl);
+ else
+ text_section ();
if (TARGET_MINIMAL_TOC)
asm_fprintf (file, (TARGET_32BIT)
? "\t{l|lwz} %s,%s(%s)\n" : "\tld %s,%s(%s)\n", r12,
@@ -10157,8 +10155,10 @@ output_toc (file, x, labelno, mode)
if (TARGET_MINIMAL_TOC)
fputs (DOUBLE_INT_ASM_OP, file);
else
- fprintf (file, "\t.tc FD_%lx_%lx[TC],", k[0], k[1]);
- fprintf (file, "0x%lx%08lx\n", k[0], k[1]);
+ fprintf (file, "\t.tc FD_%lx_%lx[TC],",
+ k[0] & 0xffffffff, k[1] & 0xffffffff);
+ fprintf (file, "0x%lx%08lx\n",
+ k[0] & 0xffffffff, k[1] & 0xffffffff);
return;
}
else
@@ -10166,8 +10166,10 @@ output_toc (file, x, labelno, mode)
if (TARGET_MINIMAL_TOC)
fputs ("\t.long ", file);
else
- fprintf (file, "\t.tc FD_%lx_%lx[TC],", k[0], k[1]);
- fprintf (file, "0x%lx,0x%lx\n", k[0], k[1]);
+ fprintf (file, "\t.tc FD_%lx_%lx[TC],",
+ k[0] & 0xffffffff, k[1] & 0xffffffff);
+ fprintf (file, "0x%lx,0x%lx\n",
+ k[0] & 0xffffffff, k[1] & 0xffffffff);
return;
}
}
@@ -10184,8 +10186,8 @@ output_toc (file, x, labelno, mode)
if (TARGET_MINIMAL_TOC)
fputs (DOUBLE_INT_ASM_OP, file);
else
- fprintf (file, "\t.tc FS_%lx[TC],", l);
- fprintf (file, "0x%lx00000000\n", l);
+ fprintf (file, "\t.tc FS_%lx[TC],", l & 0xffffffff);
+ fprintf (file, "0x%lx00000000\n", l & 0xffffffff);
return;
}
else
@@ -10193,8 +10195,8 @@ output_toc (file, x, labelno, mode)
if (TARGET_MINIMAL_TOC)
fputs ("\t.long ", file);
else
- fprintf (file, "\t.tc FS_%lx[TC],", l);
- fprintf (file, "0x%lx\n", l);
+ fprintf (file, "\t.tc FS_%lx[TC],", l & 0xffffffff);
+ fprintf (file, "0x%lx\n", l & 0xffffffff);
return;
}
}
@@ -10244,8 +10246,10 @@ output_toc (file, x, labelno, mode)
if (TARGET_MINIMAL_TOC)
fputs (DOUBLE_INT_ASM_OP, file);
else
- fprintf (file, "\t.tc ID_%lx_%lx[TC],", (long) high, (long) low);
- fprintf (file, "0x%lx%08lx\n", (long) high, (long) low);
+ fprintf (file, "\t.tc ID_%lx_%lx[TC],",
+ (long) high & 0xffffffff, (long) low & 0xffffffff);
+ fprintf (file, "0x%lx%08lx\n",
+ (long) high & 0xffffffff, (long) low & 0xffffffff);
return;
}
else
@@ -10256,16 +10260,17 @@ output_toc (file, x, labelno, mode)
fputs ("\t.long ", file);
else
fprintf (file, "\t.tc ID_%lx_%lx[TC],",
- (long) high, (long) low);
- fprintf (file, "0x%lx,0x%lx\n", (long) high, (long) low);
+ (long) high & 0xffffffff, (long) low & 0xffffffff);
+ fprintf (file, "0x%lx,0x%lx\n",
+ (long) high & 0xffffffff, (long) low & 0xffffffff);
}
else
{
if (TARGET_MINIMAL_TOC)
fputs ("\t.long ", file);
else
- fprintf (file, "\t.tc IS_%lx[TC],", (long) low);
- fprintf (file, "0x%lx\n", (long) low);
+ fprintf (file, "\t.tc IS_%lx[TC],", (long) low & 0xffffffff);
+ fprintf (file, "0x%lx\n", (long) low & 0xffffffff);
}
return;
}
@@ -10879,18 +10884,19 @@ rs6000_select_section (decl, reloc)
if (TREE_CODE (decl) == STRING_CST)
readonly = ! flag_writable_strings;
else if (TREE_CODE (decl) == VAR_DECL)
- readonly = (! (flag_pic && reloc)
+ readonly = (! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc)
&& TREE_READONLY (decl)
&& ! TREE_SIDE_EFFECTS (decl)
&& DECL_INITIAL (decl)
&& DECL_INITIAL (decl) != error_mark_node
&& TREE_CONSTANT (DECL_INITIAL (decl)));
else if (TREE_CODE (decl) == CONSTRUCTOR)
- readonly = (! (flag_pic && reloc)
+ readonly = (! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc)
&& ! TREE_SIDE_EFFECTS (decl)
&& TREE_CONSTANT (decl));
else
- readonly = 1;
+ readonly = ! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc);
+
if (needs_sdata && rs6000_sdata != SDATA_EABI)
readonly = 0;
@@ -10935,14 +10941,15 @@ rs6000_unique_section (decl, reloc)
int needs_sdata;
int size;
- readonly = 1;
if (TREE_CODE (decl) == STRING_CST)
readonly = ! flag_writable_strings;
else if (TREE_CODE (decl) == VAR_DECL)
- readonly = (! (flag_pic && reloc)
+ readonly = (! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc)
&& TREE_READONLY (decl)
&& ! TREE_SIDE_EFFECTS (decl)
&& TREE_CONSTANT (DECL_INITIAL (decl)));
+ else
+ readonly = ! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc);
size = int_size_in_bytes (TREE_TYPE (decl));
needs_sdata = (size > 0
diff --git a/contrib/gcc/config/rs6000/rs6000.h b/contrib/gcc/config/rs6000/rs6000.h
index 3e4c5f2..8c77dd5 100644
--- a/contrib/gcc/config/rs6000/rs6000.h
+++ b/contrib/gcc/config/rs6000/rs6000.h
@@ -105,8 +105,8 @@ Boston, MA 02111-1307, USA. */
%{mcpu=rsc: -mpwr} \
%{mcpu=rsc1: -mpwr} \
%{mcpu=401: -mppc} \
-%{mcpu=403: -mppc} \
-%{mcpu=405: -mppc} \
+%{mcpu=403: -m403} \
+%{mcpu=405: -m405} \
%{mcpu=505: -mppc} \
%{mcpu=601: -m601} \
%{mcpu=602: -mppc} \
@@ -2439,12 +2439,14 @@ extern int toc_initialized;
do \
{ \
fputs ("\t.weak\t", (FILE)); \
- assemble_name ((FILE), (NAME)); \
+ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL \
&& DEFAULT_ABI == ABI_AIX) \
{ \
+ if (TARGET_XCOFF) \
+ fputs ("[DS]", (FILE)); \
fputs ("\n\t.weak\t.", (FILE)); \
- assemble_name ((FILE), (NAME)); \
+ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
} \
fputc ('\n', (FILE)); \
if (VAL) \
@@ -2454,9 +2456,9 @@ extern int toc_initialized;
&& DEFAULT_ABI == ABI_AIX) \
{ \
fputs ("\t.set\t.", (FILE)); \
- assemble_name ((FILE), (NAME)); \
+ RS6000_OUTPUT_BASENAME ((FILE), (NAME)); \
fputs (",.", (FILE)); \
- assemble_name ((FILE), (VAL)); \
+ RS6000_OUTPUT_BASENAME ((FILE), (VAL)); \
fputc ('\n', (FILE)); \
} \
} \
@@ -2479,20 +2481,20 @@ extern int toc_initialized;
if (!RS6000_WEAK || !DECL_WEAK (DECL)) \
{ \
fputs ("\t.globl\t.", FILE); \
- assemble_name (FILE, alias); \
+ RS6000_OUTPUT_BASENAME (FILE, alias); \
putc ('\n', FILE); \
} \
} \
else if (TARGET_XCOFF) \
{ \
fputs ("\t.lglobl\t.", FILE); \
- assemble_name (FILE, alias); \
+ RS6000_OUTPUT_BASENAME (FILE, alias); \
putc ('\n', FILE); \
} \
fputs ("\t.set\t.", FILE); \
- assemble_name (FILE, alias); \
+ RS6000_OUTPUT_BASENAME (FILE, alias); \
fputs (",.", FILE); \
- assemble_name (FILE, name); \
+ RS6000_OUTPUT_BASENAME (FILE, name); \
fputc ('\n', FILE); \
} \
ASM_OUTPUT_DEF (FILE, alias, name); \
diff --git a/contrib/gcc/config/rs6000/rs6000.md b/contrib/gcc/config/rs6000/rs6000.md
index 93c6fc3..5188ce5 100644
--- a/contrib/gcc/config/rs6000/rs6000.md
+++ b/contrib/gcc/config/rs6000/rs6000.md
@@ -5271,9 +5271,18 @@
(clobber (match_dup 4))
(clobber (match_dup 5))
(clobber (match_dup 6))])]
- "! TARGET_POWERPC64 && TARGET_HARD_FLOAT"
+ "TARGET_HARD_FLOAT"
"
{
+ if (TARGET_POWERPC64)
+ {
+ rtx mem = assign_stack_temp (DImode, GET_MODE_SIZE (DImode), 0);
+ rtx t1 = gen_reg_rtx (DImode);
+ rtx t2 = gen_reg_rtx (DImode);
+ emit_insn (gen_floatsidf_ppc64 (operands[0], operands[1], mem, t1, t2));
+ DONE;
+ }
+
operands[2] = force_reg (SImode, GEN_INT (0x43300000));
operands[3] = force_reg (DFmode, rs6000_float_const (\"4503601774854144\", DFmode));
operands[4] = assign_stack_temp (DFmode, GET_MODE_SIZE (DFmode), 0);
@@ -5338,9 +5347,19 @@
(use (match_dup 3))
(clobber (match_dup 4))
(clobber (match_dup 5))])]
- "! TARGET_POWERPC64 && TARGET_HARD_FLOAT"
+ "TARGET_HARD_FLOAT"
"
{
+ if (TARGET_POWERPC64)
+ {
+ rtx mem = assign_stack_temp (DImode, GET_MODE_SIZE (DImode), 0);
+ rtx t1 = gen_reg_rtx (DImode);
+ rtx t2 = gen_reg_rtx (DImode);
+ emit_insn (gen_floatunssidf_ppc64 (operands[0], operands[1], mem,
+ t1, t2));
+ DONE;
+ }
+
operands[2] = force_reg (SImode, GEN_INT (0x43300000));
operands[3] = force_reg (DFmode, rs6000_float_const (\"4503599627370496\", DFmode));
operands[4] = assign_stack_temp (DFmode, GET_MODE_SIZE (DFmode), 0);
@@ -5407,7 +5426,7 @@
(define_insn "*fix_truncdfsi2_internal"
[(set (match_operand:SI 0 "gpc_reg_operand" "=r")
(fix:SI (match_operand:DF 1 "gpc_reg_operand" "f")))
- (clobber (match_operand:DI 2 "gpc_reg_operand" "=f"))
+ (clobber (match_operand:DI 2 "gpc_reg_operand" "=*f"))
(clobber (match_operand:DI 3 "memory_operand" "=o"))]
"(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT"
"#"
@@ -5443,7 +5462,7 @@
; because the first makes it clear that operand 0 is not live
; before the instruction.
(define_insn "fctiwz"
- [(set (match_operand:DI 0 "gpc_reg_operand" "=f")
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=*f")
(unspec:DI [(fix:SI (match_operand:DF 1 "gpc_reg_operand" "f"))] 10))]
"(TARGET_POWER2 || TARGET_POWERPC) && TARGET_HARD_FLOAT"
"{fcirz|fctiwz} %0,%1"
@@ -5451,13 +5470,43 @@
(define_insn "floatdidf2"
[(set (match_operand:DF 0 "gpc_reg_operand" "=f")
- (float:DF (match_operand:DI 1 "gpc_reg_operand" "f")))]
+ (float:DF (match_operand:DI 1 "gpc_reg_operand" "*f")))]
"TARGET_POWERPC64 && TARGET_HARD_FLOAT"
"fcfid %0,%1"
[(set_attr "type" "fp")])
+(define_insn_and_split "floatsidf_ppc64"
+ [(set (match_operand:DF 0 "gpc_reg_operand" "=f")
+ (float:DF (match_operand:SI 1 "gpc_reg_operand" "r")))
+ (clobber (match_operand:DI 2 "memory_operand" "=o"))
+ (clobber (match_operand:DI 3 "gpc_reg_operand" "=r"))
+ (clobber (match_operand:DI 4 "gpc_reg_operand" "=f"))]
+ "TARGET_POWERPC64 && TARGET_HARD_FLOAT"
+ "#"
+ ""
+ [(set (match_dup 3) (sign_extend:DI (match_dup 1)))
+ (set (match_dup 2) (match_dup 3))
+ (set (match_dup 4) (match_dup 2))
+ (set (match_dup 0) (float:DF (match_dup 4)))]
+ "")
+
+(define_insn_and_split "floatunssidf_ppc64"
+ [(set (match_operand:DF 0 "gpc_reg_operand" "=f")
+ (unsigned_float:DF (match_operand:SI 1 "gpc_reg_operand" "r")))
+ (clobber (match_operand:DI 2 "memory_operand" "=o"))
+ (clobber (match_operand:DI 3 "gpc_reg_operand" "=r"))
+ (clobber (match_operand:DI 4 "gpc_reg_operand" "=f"))]
+ "TARGET_POWERPC64 && TARGET_HARD_FLOAT"
+ "#"
+ ""
+ [(set (match_dup 3) (zero_extend:DI (match_dup 1)))
+ (set (match_dup 2) (match_dup 3))
+ (set (match_dup 4) (match_dup 2))
+ (set (match_dup 0) (float:DF (match_dup 4)))]
+ "")
+
(define_insn "fix_truncdfdi2"
- [(set (match_operand:DI 0 "gpc_reg_operand" "=f")
+ [(set (match_operand:DI 0 "gpc_reg_operand" "=*f")
(fix:DI (match_operand:DF 1 "gpc_reg_operand" "f")))]
"TARGET_POWERPC64 && TARGET_HARD_FLOAT"
"fctidz %0,%1"
@@ -13255,15 +13304,15 @@
(define_insn "*ctrdi_internal1"
[(set (pc)
- (if_then_else (ne (match_operand:DI 1 "register_operand" "c,*r,*r,!*f")
+ (if_then_else (ne (match_operand:DI 1 "register_operand" "c,*r,*r")
(const_int 1))
(label_ref (match_operand 0 "" ""))
(pc)))
- (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l,!*f")
+ (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l")
(plus:DI (match_dup 1)
(const_int -1)))
- (clobber (match_scratch:CC 3 "=X,&x,&x,&x"))
- (clobber (match_scratch:DI 4 "=X,X,r,r"))]
+ (clobber (match_scratch:CC 3 "=X,&x,&x"))
+ (clobber (match_scratch:DI 4 "=X,X,r"))]
"TARGET_POWERPC64"
"*
{
@@ -13275,19 +13324,19 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "*,12,16,24")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal2"
[(set (pc)
- (if_then_else (ne (match_operand:DI 1 "register_operand" "c,*r,*r,!*f")
+ (if_then_else (ne (match_operand:DI 1 "register_operand" "c,*r,*r")
(const_int 1))
(pc)
(label_ref (match_operand 0 "" ""))))
- (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l,!*f")
+ (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l")
(plus:DI (match_dup 1)
(const_int -1)))
- (clobber (match_scratch:CC 3 "=X,&x,&x,&x"))
- (clobber (match_scratch:DI 4 "=X,X,r,r"))]
+ (clobber (match_scratch:CC 3 "=X,&x,&x"))
+ (clobber (match_scratch:DI 4 "=X,X,r"))]
"TARGET_POWERPC64"
"*
{
@@ -13299,7 +13348,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "*,12,16,24")])
+ (set_attr "length" "*,12,16")])
;; Similar, but we can use GE since we have a REG_NONNEG.
@@ -13353,15 +13402,15 @@
(define_insn "*ctrdi_internal3"
[(set (pc)
- (if_then_else (ge (match_operand:DI 1 "register_operand" "c,*r,*r,!*f")
+ (if_then_else (ge (match_operand:DI 1 "register_operand" "c,*r,*r")
(const_int 0))
(label_ref (match_operand 0 "" ""))
(pc)))
- (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l,!*f")
+ (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l")
(plus:DI (match_dup 1)
(const_int -1)))
- (clobber (match_scratch:CC 3 "=X,&x,&x,&x"))
- (clobber (match_scratch:DI 4 "=X,X,r,r"))]
+ (clobber (match_scratch:CC 3 "=X,&x,&x"))
+ (clobber (match_scratch:DI 4 "=X,X,r"))]
"TARGET_POWERPC64 && find_reg_note (insn, REG_NONNEG, 0)"
"*
{
@@ -13373,19 +13422,19 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "*,12,16,24")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal4"
[(set (pc)
- (if_then_else (ge (match_operand:DI 1 "register_operand" "c,*r,*r,!*f")
+ (if_then_else (ge (match_operand:DI 1 "register_operand" "c,*r,*r")
(const_int 0))
(pc)
(label_ref (match_operand 0 "" ""))))
- (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l,!*f")
+ (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l")
(plus:DI (match_dup 1)
(const_int -1)))
- (clobber (match_scratch:CC 3 "=X,&x,&x,&x"))
- (clobber (match_scratch:DI 4 "=X,X,r,r"))]
+ (clobber (match_scratch:CC 3 "=X,&x,&x"))
+ (clobber (match_scratch:DI 4 "=X,X,r"))]
"TARGET_POWERPC64 && find_reg_note (insn, REG_NONNEG, 0)"
"*
{
@@ -13397,7 +13446,7 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "*,12,16,24")])
+ (set_attr "length" "*,12,16")])
;; Similar but use EQ
@@ -13451,15 +13500,15 @@
(define_insn "*ctrdi_internal5"
[(set (pc)
- (if_then_else (eq (match_operand:DI 1 "register_operand" "c,*r,*r,!*f")
+ (if_then_else (eq (match_operand:DI 1 "register_operand" "c,*r,*r")
(const_int 1))
(label_ref (match_operand 0 "" ""))
(pc)))
- (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l,!*f")
+ (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l")
(plus:DI (match_dup 1)
(const_int -1)))
- (clobber (match_scratch:CC 3 "=X,&x,&x,&x"))
- (clobber (match_scratch:DI 4 "=X,X,r,r"))]
+ (clobber (match_scratch:CC 3 "=X,&x,&x"))
+ (clobber (match_scratch:DI 4 "=X,X,r"))]
"TARGET_POWERPC64"
"*
{
@@ -13471,19 +13520,19 @@
return \"{bdn|bdnz} $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "*,12,16,24")])
+ (set_attr "length" "*,12,16")])
(define_insn "*ctrdi_internal6"
[(set (pc)
- (if_then_else (eq (match_operand:DI 1 "register_operand" "c,*r,*r,!*f")
+ (if_then_else (eq (match_operand:DI 1 "register_operand" "c,*r,*r")
(const_int 1))
(pc)
(label_ref (match_operand 0 "" ""))))
- (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l,!*f")
+ (set (match_operand:DI 2 "register_operand" "=1,*r,m*c*l")
(plus:DI (match_dup 1)
(const_int -1)))
- (clobber (match_scratch:CC 3 "=X,&x,&x,&x"))
- (clobber (match_scratch:DI 4 "=X,X,r,r"))]
+ (clobber (match_scratch:CC 3 "=X,&x,&x"))
+ (clobber (match_scratch:DI 4 "=X,X,r"))]
"TARGET_POWERPC64"
"*
{
@@ -13495,7 +13544,7 @@
return \"bdz $+8\;b %l0\";
}"
[(set_attr "type" "branch")
- (set_attr "length" "*,12,16,24")])
+ (set_attr "length" "*,12,16")])
;; Now the splitters if we could not allocate the CTR register
@@ -13566,7 +13615,7 @@
(const_int -1)))
(clobber (match_scratch:CC 3 ""))
(clobber (match_scratch:DI 4 ""))]
- "TARGET_POWERPC64 && reload_completed && INT_REGNO_P (REGNO (operands[0]))"
+ "TARGET_POWERPC64 && reload_completed"
[(parallel [(set (match_dup 3)
(compare:CC (plus:DI (match_dup 1)
(const_int -1))
@@ -13610,44 +13659,6 @@
{ operands[7] = gen_rtx (GET_CODE (operands[2]), VOIDmode, operands[3],
const0_rtx); }")
-(define_split
- [(set (pc)
- (if_then_else (match_operator 2 "comparison_operator"
- [(match_operand:DI 1 "gpc_reg_operand" "")
- (const_int 1)])
- (match_operand 5 "" "")
- (match_operand 6 "" "")))
- (set (match_operand:DI 0 "gpc_reg_operand" "")
- (plus:DI (match_dup 1)
- (const_int -1)))
- (clobber (match_scratch:CC 3 ""))
- (clobber (match_scratch:DI 4 ""))]
- "TARGET_POWERPC64 && reload_completed && FP_REGNO_P (REGNO (operands[0]))"
- [(set (match_dup 8)
- (match_dup 1))
- (set (match_dup 4)
- (match_dup 8))
- (parallel [(set (match_dup 3)
- (compare:CC (plus:DI (match_dup 4)
- (const_int -1))
- (const_int 0)))
- (set (match_dup 4)
- (plus:DI (match_dup 4)
- (const_int -1)))])
- (set (match_dup 8)
- (match_dup 4))
- (set (match_dup 0)
- (match_dup 8))
- (set (pc) (if_then_else (match_dup 7)
- (match_dup 5)
- (match_dup 6)))]
- "
-{
- operands[7] = gen_rtx (GET_CODE (operands[2]), VOIDmode, operands[3],
- const0_rtx);
- operands[8] = assign_stack_temp (DImode, GET_MODE_SIZE (DImode), 0);
-}")
-
(define_insn "trap"
[(trap_if (const_int 1) (const_int 0))]
diff --git a/contrib/gcc/config/rs6000/sysv4.h b/contrib/gcc/config/rs6000/sysv4.h
index b807bb7..9274d8f 100644
--- a/contrib/gcc/config/rs6000/sysv4.h
+++ b/contrib/gcc/config/rs6000/sysv4.h
@@ -403,7 +403,6 @@ do { \
: MAX (COMPUTED, SPECIFIED))
#undef BIGGEST_FIELD_ALIGNMENT
-#undef ADJUST_FIELD_ALIGN
/* Use ELF style section commands. */
diff --git a/contrib/gcc/config/rs6000/xcoff.h b/contrib/gcc/config/rs6000/xcoff.h
index 4a51b04..a61061a 100644
--- a/contrib/gcc/config/rs6000/xcoff.h
+++ b/contrib/gcc/config/rs6000/xcoff.h
@@ -457,6 +457,15 @@ toc_section () \
/* This is how we tell the assembler that two symbols have the same value. */
#define SET_ASM_OP "\t.set "
+/* This is how we tell the assembler to equate two values. */
+#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
+ do { fprintf ((FILE), "%s", SET_ASM_OP); \
+ RS6000_OUTPUT_BASENAME (FILE, LABEL1); \
+ fprintf (FILE, ","); \
+ RS6000_OUTPUT_BASENAME (FILE, LABEL2); \
+ fprintf (FILE, "\n"); \
+ } while (0)
+
/* Used by rs6000_assemble_integer, among others. */
#define DOUBLE_INT_ASM_OP "\t.llong\t"
diff --git a/contrib/gcc/config/sparc/netbsd-elf.h b/contrib/gcc/config/sparc/netbsd-elf.h
index b4bbf71..f141f89 100644
--- a/contrib/gcc/config/sparc/netbsd-elf.h
+++ b/contrib/gcc/config/sparc/netbsd-elf.h
@@ -31,12 +31,28 @@ Boston, MA 02111-1307, USA. */
/* CPP defines used for 64 bit code. */
#undef CPP_SUBTARGET_SPEC64
#define CPP_SUBTARGET_SPEC64 \
- "-D__sparc64__ -D__arch64__ -D__sparc_v9__ %{posix:-D_POSIX_SOURCE}"
+ "-D__sparc64__ -D__sparc_v9__ -D_LP64 %{posix:-D_POSIX_SOURCE}"
/* CPP defines used for 32 bit code. */
#undef CPP_SUBTARGET_SPEC32
#define CPP_SUBTARGET_SPEC32 "-D__sparc %{posix:-D_POSIX_SOURCE}"
+/* CPP_ARCH32_SPEC and CPP_ARCH64_SPEC are wrong from sparc/sparc.h; we
+ always want the non-SPARC_BI_ARCH versions, since the SPARC_BI_ARCH
+ versions define __SIZE_TYPE__ and __PTRDIFF_TYPE__ incorrectly for
+ NetBSD. */
+#undef CPP_ARCH32_SPEC
+#define CPP_ARCH32_SPEC "-D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc"
+
+#undef CPP_ARCH64_SPEC
+#define CPP_ARCH64_SPEC "-D__arch64__ -Acpu=sparc64 -Amachine=sparc64"
+
+/* sparc/sparc.h defines NO_BUILTIN_SIZE_TYPE and NO_BUILTIN_PTRDIFF_TYPE
+ if SPARC_BI_ARCH is defined. This is wrong for NetBSD; size_t and
+ ptrdiff_t do not change for 32-bit vs. 64-bit. */
+#undef NO_BUILTIN_PTRDIFF_TYPE
+#undef NO_BUILTIN_SIZE_TYPE
+
/* SIZE_TYPE and PTRDIFF_TYPE are wrong from sparc/sparc.h. */
#undef SIZE_TYPE
#define SIZE_TYPE "long unsigned int"
@@ -99,9 +115,6 @@ Boston, MA 02111-1307, USA. */
* Clean up afterwards generic SPARC ELF configuration.
*/
-#undef TRANSFER_FROM_TRAMPOLINE
-#define TRANSFER_FROM_TRAMPOLINE
-
/* FIXME: Aren't these supposed to be available for SPARC ELF? */
#undef MULDI3_LIBCALL
#undef DIVDI3_LIBCALL
diff --git a/contrib/gcc/config/sparc/openbsd1-64.h b/contrib/gcc/config/sparc/openbsd1-64.h
new file mode 100644
index 0000000..1310538
--- /dev/null
+++ b/contrib/gcc/config/sparc/openbsd1-64.h
@@ -0,0 +1,24 @@
+/* Configuration file for sparc64 OpenBSD target.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#define OBSD_HAS_DECLARE_FUNCTION_NAME
+#define OBSD_HAS_DECLARE_FUNCTION_SIZE
+#define OBSD_HAS_DECLARE_OBJECT
+
diff --git a/contrib/gcc/config/sparc/openbsd64.h b/contrib/gcc/config/sparc/openbsd64.h
new file mode 100644
index 0000000..4dfe381
--- /dev/null
+++ b/contrib/gcc/config/sparc/openbsd64.h
@@ -0,0 +1,75 @@
+/* Configuration file for sparc64 OpenBSD target.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (sparc64 OpenBSD ELF)")
+
+/* XXX - do we really want HARD_QUAD? */
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT \
+(MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
+ + MASK_APP_REGS + MASK_FPU + MASK_STACK_BIAS + MASK_LONG_DOUBLE_128)
+
+#undef SPARC_DEFAULT_CMODEL
+#define SPARC_DEFAULT_CMODEL CM_MEDMID
+
+/* Run-time target specifications. */
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-D__unix__ -D__sparc__ -D__sparc64__ -D__sparcv9__ -D__sparc_v9__ -D__arch64__ -D__ELF__ -D__OpenBSD__ -Asystem(unix) -Asystem(OpenBSD) -Acpu(sparc) -Amachine(sparc)"
+
+#undef CPP_SUBTARGET_SPEC
+#define CPP_SUBTARGET_SPEC ""
+
+#undef MD_EXEC_PREFIX
+#undef MD_STARTFILE_PREFIX
+
+#undef ASM_SPEC
+#define ASM_SPEC "\
+%{v:-V} -s %{fpic:-K PIC} %{fPIC:-K PIC} \
+%{mlittle-endian:-EL} \
+%(asm_cpu) %(asm_arch) \
+"
+
+/* Layout of source language data types. */
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE 32
+
+#undef LONG_DOUBLE_TYPE_SIZE
+#define LONG_DOUBLE_TYPE_SIZE 128
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+ "%{!shared:%{!nostdlib:%{!r*:%{!e*:-e __start}}}} \
+ %{shared:-shared} %{R*} \
+ %{static:-Bstatic} \
+ %{!static:-Bdynamic} \
+ %{assert*} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.so}"
+
+/* As an elf system, we need crtbegin/crtend stuff. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "\
+ %{!shared: %{pg:gcrt0%O%s} %{!pg:%{p:gcrt0%O%s} %{!p:crt0%O%s}} \
+ crtbegin%O%s} %{shared:crtbeginS%O%s}"
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
diff --git a/contrib/gcc/config/sparc/sol2.h b/contrib/gcc/config/sparc/sol2.h
index 67e064d..56bfbb7 100644
--- a/contrib/gcc/config/sparc/sol2.h
+++ b/contrib/gcc/config/sparc/sol2.h
@@ -71,17 +71,21 @@ Boston, MA 02111-1307, USA. */
/* This is here rather than in sparc.h because it's not known what
other assemblers will accept. */
+
#if TARGET_CPU_DEFAULT == TARGET_CPU_v9
#undef ASM_CPU_DEFAULT_SPEC
#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plus"
#endif
+
#if TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc
#undef ASM_CPU_DEFAULT_SPEC
#define ASM_CPU_DEFAULT_SPEC "-xarch=v8plusa"
#endif
+
#undef ASM_CPU_SPEC
#define ASM_CPU_SPEC "\
%{mcpu=v8plus:-xarch=v8plus} \
+%{mcpu=v9:-xarch=v8plus} \
%{mcpu=ultrasparc:-xarch=v8plusa} \
%{!mcpu*:%(asm_cpu_default)} \
"
@@ -227,6 +231,12 @@ Boston, MA 02111-1307, USA. */
#define MODDI3_LIBCALL "__rem64"
#define UMODDI3_LIBCALL "__urem64"
+/* Solaris's _Qp_* library routine implementation clobbers the output
+ memory before the inputs are fully consumed. */
+
+#undef TARGET_BUGGY_QP_LIB
+#define TARGET_BUGGY_QP_LIB 1
+
#undef INIT_SUBTARGET_OPTABS
#define INIT_SUBTARGET_OPTABS \
fixsfdi_libfunc \
diff --git a/contrib/gcc/config/sparc/sparc-protos.h b/contrib/gcc/config/sparc/sparc-protos.h
index fd372de..7de8940 100644
--- a/contrib/gcc/config/sparc/sparc-protos.h
+++ b/contrib/gcc/config/sparc/sparc-protos.h
@@ -123,4 +123,6 @@ extern rtx gen_df_reg PARAMS ((rtx, int));
extern int sparc_extra_constraint_check PARAMS ((rtx, int, int));
#endif /* RTX_CODE */
+extern void sparc_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT, tree));
+
#endif /* __SPARC_PROTOS_H__ */
diff --git a/contrib/gcc/config/sparc/sparc.c b/contrib/gcc/config/sparc/sparc.c
index 28bbcec..6ef28141c 100644
--- a/contrib/gcc/config/sparc/sparc.c
+++ b/contrib/gcc/config/sparc/sparc.c
@@ -2489,9 +2489,17 @@ emit_soft_tfmode_libcall (func_name, nargs, operands)
/* TFmode arguments and return values are passed by reference. */
if (GET_MODE (this_arg) == TFmode)
{
- if (GET_CODE (this_arg) == MEM)
+ int force_stack_temp;
+
+ force_stack_temp = 0;
+ if (TARGET_BUGGY_QP_LIB && i == 0)
+ force_stack_temp = 1;
+
+ if (GET_CODE (this_arg) == MEM
+ && ! force_stack_temp)
this_arg = XEXP (this_arg, 0);
- else if (CONSTANT_P (this_arg))
+ else if (CONSTANT_P (this_arg)
+ && ! force_stack_temp)
{
this_slot = force_const_mem (TFmode, this_arg);
this_arg = XEXP (this_slot, 0);
@@ -8993,3 +9001,70 @@ sparc_extra_constraint_check (op, c, strict)
return reload_ok_mem;
}
+
+/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
+ Used for C++ multiple inheritance. */
+
+void
+sparc_output_mi_thunk (file, thunk_fndecl, delta, function)
+ FILE *file;
+ tree thunk_fndecl ATTRIBUTE_UNUSED;
+ HOST_WIDE_INT delta;
+ tree function;
+{
+ rtx this, insn, funexp, delta_rtx, tmp;
+
+ reload_completed = 1;
+ no_new_pseudos = 1;
+ current_function_uses_only_leaf_regs = 1;
+
+ emit_note (NULL, NOTE_INSN_PROLOGUE_END);
+
+ /* Find the "this" pointer. Normally in %o0, but in ARCH64 if the function
+ returns a structure, the structure return pointer is there instead. */
+ if (TARGET_ARCH64 && aggregate_value_p (TREE_TYPE (TREE_TYPE (function))))
+ this = gen_rtx_REG (Pmode, SPARC_INCOMING_INT_ARG_FIRST + 1);
+ else
+ this = gen_rtx_REG (Pmode, SPARC_INCOMING_INT_ARG_FIRST);
+
+ /* Add DELTA. When possible use a plain add, otherwise load it into
+ a register first. */
+ delta_rtx = GEN_INT (delta);
+ if (!SPARC_SIMM13_P (delta))
+ {
+ rtx scratch = gen_rtx_REG (Pmode, 1);
+ if (TARGET_ARCH64)
+ sparc_emit_set_const64 (scratch, delta_rtx);
+ else
+ sparc_emit_set_const32 (scratch, delta_rtx);
+ delta_rtx = scratch;
+ }
+
+ tmp = gen_rtx_PLUS (Pmode, this, delta_rtx);
+ emit_insn (gen_rtx_SET (VOIDmode, this, tmp));
+
+ /* Generate a tail call to the target function. */
+ if (! TREE_USED (function))
+ {
+ assemble_external (function);
+ TREE_USED (function) = 1;
+ }
+ funexp = XEXP (DECL_RTL (function), 0);
+ funexp = gen_rtx_MEM (FUNCTION_MODE, funexp);
+ insn = emit_call_insn (gen_sibcall (funexp));
+ SIBLING_CALL_P (insn) = 1;
+ emit_barrier ();
+
+ /* Run just enough of rest_of_compilation to get the insns emitted.
+ There's not really enough bulk here to make other passes such as
+ instruction scheduling worth while. Note that use_thunk calls
+ assemble_start_function and assemble_end_function. */
+ insn = get_insns ();
+ shorten_branches (insn);
+ final_start_function (insn, file, 1);
+ final (insn, file, 1, 0);
+ final_end_function ();
+
+ reload_completed = 0;
+ no_new_pseudos = 0;
+}
diff --git a/contrib/gcc/config/sparc/sparc.h b/contrib/gcc/config/sparc/sparc.h
index 3f21578..2902f06 100644
--- a/contrib/gcc/config/sparc/sparc.h
+++ b/contrib/gcc/config/sparc/sparc.h
@@ -1414,6 +1414,8 @@ extern char leaf_reg_remap[];
#define PREFERRED_RELOAD_CLASS(X,CLASS) \
(CONSTANT_P (X) \
? ((FP_REG_CLASS_P (CLASS) \
+ || (CLASS) == GENERAL_OR_FP_REGS \
+ || (CLASS) == GENERAL_OR_EXTRA_FP_REGS \
|| (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT \
&& ! TARGET_FPU) \
|| (GET_MODE (X) == TFmode \
@@ -1958,7 +1960,8 @@ do { \
return an rtx for the address of the word in the frame
that holds the dynamic chain--the previous frame's address.
??? -mflat support? */
-#define DYNAMIC_CHAIN_ADDRESS(frame) plus_constant (frame, 14 * UNITS_PER_WORD)
+#define DYNAMIC_CHAIN_ADDRESS(frame) \
+ plus_constant (frame, 14 * UNITS_PER_WORD + SPARC_STACK_BIAS)
/* The return address isn't on the stack, it is in a register, so we can't
access it from the current frame pointer. We can access it from the
@@ -2568,6 +2571,11 @@ do { \
#define LTTF2_LIBCALL "_Q_flt"
#define LETF2_LIBCALL "_Q_fle"
+/* Assume by default that the _Qp_* 64-bit libcalls are implemented such
+ that the inputs are fully consumed before the output memory is clobbered. */
+
+#define TARGET_BUGGY_QP_LIB 0
+
/* We can define the TFmode sqrt optab only if TARGET_FPU. This is because
with soft-float, the SFmode and DFmode sqrt instructions will be absent,
and the compiler will notice and try to use the TFmode sqrt instruction
@@ -2604,6 +2612,17 @@ do { \
sqrt_optab->handlers[(int) TFmode].libfunc \
= init_one_libfunc ("_Q_sqrt"); \
} \
+ if (TARGET_ARCH64) \
+ { \
+ /* In the SPARC 64bit ABI, these libfuncs do not exist in the \
+ library. Make sure the compiler does not emit calls to them \
+ by accident. */ \
+ sdiv_optab->handlers[(int) SImode].libfunc = NULL; \
+ udiv_optab->handlers[(int) SImode].libfunc = NULL; \
+ smod_optab->handlers[(int) SImode].libfunc = NULL; \
+ umod_optab->handlers[(int) SImode].libfunc = NULL; \
+ smul_optab->handlers[(int) SImode].libfunc = NULL; \
+ } \
INIT_SUBTARGET_OPTABS; \
} while (0)
@@ -2903,24 +2922,8 @@ do { \
/* Output code to add DELTA to the first argument, and then jump to FUNCTION.
Used for C++ multiple inheritance. */
-#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
-do { \
- int reg = 0; \
- \
- if (TARGET_ARCH64 \
- && aggregate_value_p (TREE_TYPE (TREE_TYPE (FUNCTION)))) \
- reg = 1; \
- if ((DELTA) >= 4096 || (DELTA) < -4096) \
- fprintf (FILE, "\tset\t%d, %%g1\n\tadd\t%%o%d, %%g1, %%o%d\n", \
- (int)(DELTA), reg, reg); \
- else \
- fprintf (FILE, "\tadd\t%%o%d, %d, %%o%d\n", reg, (int)(DELTA), reg);\
- fprintf (FILE, "\tor\t%%o7, %%g0, %%g1\n"); \
- fprintf (FILE, "\tcall\t"); \
- assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
- fprintf (FILE, ", 0\n"); \
- fprintf (FILE, "\t or\t%%g1, %%g0, %%o7\n"); \
-} while (0)
+#define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) \
+ sparc_output_mi_thunk (FILE, THUNK_FNDECL, DELTA, FUNCTION)
#define PRINT_OPERAND_PUNCT_VALID_P(CHAR) \
((CHAR) == '#' || (CHAR) == '*' || (CHAR) == '^' || (CHAR) == '(' || (CHAR) == '_')
diff --git a/contrib/gcc/config/sparc/t-crtfm b/contrib/gcc/config/sparc/t-crtfm
index 744537d..e0adb97 100644
--- a/contrib/gcc/config/sparc/t-crtfm
+++ b/contrib/gcc/config/sparc/t-crtfm
@@ -1,4 +1,4 @@
EXTRA_PARTS += crtfastmath.o
-crtfastmath.o: $(srcdir)/config/sparc/crtfastmath.c $(GCC_PASSES)
- $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o crtfastmath.o $(srcdir)/config/sparc/crtfastmath.c
+$(T)crtfastmath.o: $(srcdir)/config/sparc/crtfastmath.c $(GCC_PASSES)
+ $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) $(LIBGCC2_CFLAGS) -c -o $(T)crtfastmath.o $(srcdir)/config/sparc/crtfastmath.c
diff --git a/contrib/gcc/config/sparc/t-linux64 b/contrib/gcc/config/sparc/t-linux64
index c93ff25..a648626 100644
--- a/contrib/gcc/config/sparc/t-linux64
+++ b/contrib/gcc/config/sparc/t-linux64
@@ -7,7 +7,8 @@ MULTILIB_EXCLUSIONS = m32/!m64/mno-app-regs m32/!m64/mcmodel=medany
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
-EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
+EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o \
+ crtfastmath.o
SHLIB_SLIBDIR_SUFFIXES = 64:64 32:
diff --git a/contrib/gcc/config/sparc/t-sol2-64 b/contrib/gcc/config/sparc/t-sol2-64
index ef7dee7..39204d7 100644
--- a/contrib/gcc/config/sparc/t-sol2-64
+++ b/contrib/gcc/config/sparc/t-sol2-64
@@ -5,6 +5,7 @@ MULTILIB_MATCHES =
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
-EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o gmon.o crt1.o crti.o crtn.o gcrt1.o
+EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o gmon.o crt1.o crti.o crtn.o gcrt1.o \
+ crtfastmath.o
SHLIB_SLIBDIR_SUFFIXES = sparcv9:/sparcv9 sparcv7:
diff --git a/contrib/gcc/configure b/contrib/gcc/configure
index 253fa40..6c9263a 100755
--- a/contrib/gcc/configure
+++ b/contrib/gcc/configure
@@ -43,6 +43,8 @@ ac_help="$ac_help
install the user visible C preprocessor in DIR
(relative to PREFIX) as well as PREFIX/bin"
ac_help="$ac_help
+ --enable-__cxa_atexit enable __cxa_atexit for C++"
+ac_help="$ac_help
--enable-c-mbchar enable multibyte characters for C and C++"
ac_help="$ac_help
--enable-threads enable thread usage for target GCC
@@ -107,6 +109,7 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
+sitefile=
srcdir=
target=NONE
verbose=
@@ -221,6 +224,7 @@ Configuration:
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
+ --site-file=FILE use FILE as the site file
--version print the version of autoconf that created configure
Directory and file names:
--prefix=PREFIX install architecture-independent files in PREFIX
@@ -391,6 +395,11 @@ EOF
-site=* | --site=* | --sit=*)
site="$ac_optarg" ;;
+ -site-file | --site-file | --site-fil | --site-fi | --site-f)
+ ac_prev=sitefile ;;
+ -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+ sitefile="$ac_optarg" ;;
+
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
@@ -556,12 +565,16 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+if test -z "$sitefile"; then
+ if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
fi
+else
+ CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -616,7 +629,7 @@ copy=cp
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
echo $ac_n "checking LIBRARY_PATH variable""... $ac_c" 1>&6
-echo "configure:620: checking LIBRARY_PATH variable" >&5
+echo "configure:633: checking LIBRARY_PATH variable" >&5
case ${LIBRARY_PATH} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
library_path_setting="contains current directory"
@@ -641,7 +654,7 @@ fi
# - two terminals occur directly after each other
# - the path contains an element with a dot in it
echo $ac_n "checking GCC_EXEC_PREFIX variable""... $ac_c" 1>&6
-echo "configure:645: checking GCC_EXEC_PREFIX variable" >&5
+echo "configure:658: checking GCC_EXEC_PREFIX variable" >&5
case ${GCC_EXEC_PREFIX} in
[:\;]* | *[:\;] | *[:\;][:\;]* | *[:\;]. | .[:\;]*| . | *[:\;].[:\;]* )
gcc_exec_prefix_setting="contains current directory"
@@ -773,7 +786,7 @@ fi
if test x${gcc_gxx_include_dir} = x; then
if test x${enable_version_specific_runtime_libs} = xyes; then
- gcc_gxx_include_dir='${libsubdir}/include/g++'
+ gcc_gxx_include_dir='${libsubdir}/include/c++'
else
topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
@@ -874,6 +887,20 @@ fi
fi
+# Enable __cxa_atexit for C++.
+# Check whether --enable-__cxa_atexit or --disable-__cxa_atexit was given.
+if test "${enable___cxa_atexit+set}" = set; then
+ enableval="$enable___cxa_atexit"
+ :
+fi
+
+if test x$enable___cxa_atexit = xyes; then
+ cat >> confdefs.h <<\EOF
+#define DEFAULT_USE_CXA_ATEXIT 1
+EOF
+
+fi
+
# Enable Multibyte Characters for C/C++
# Check whether --enable-c-mbchar or --disable-c-mbchar was given.
if test "${enable_c_mbchar+set}" = set; then
@@ -1014,7 +1041,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:1018: checking host system type" >&5
+echo "configure:1045: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -1035,7 +1062,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:1039: checking target system type" >&5
+echo "configure:1066: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -1053,7 +1080,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1057: checking build system type" >&5
+echo "configure:1084: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -1101,7 +1128,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1105: checking for $ac_word" >&5
+echo "configure:1132: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1131,7 +1158,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1135: checking for $ac_word" >&5
+echo "configure:1162: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1182,7 +1209,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1186: checking for $ac_word" >&5
+echo "configure:1213: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1214,7 +1241,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1218: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1245: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1225,12 +1252,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1229 "configure"
+#line 1256 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1256,12 +1283,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1287: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1265: checking whether we are using GNU C" >&5
+echo "configure:1292: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1270,7 +1297,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1289,7 +1316,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1293: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1320: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1322,10 +1349,10 @@ fi
if test "x$CC" != xcc; then
echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
-echo "configure:1326: checking whether $CC and cc understand -c and -o together" >&5
+echo "configure:1353: checking whether $CC and cc understand -c and -o together" >&5
else
echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
-echo "configure:1329: checking whether cc understands -c and -o together" >&5
+echo "configure:1356: checking whether cc understands -c and -o together" >&5
fi
set dummy $CC; ac_cc="`echo $2 |
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
@@ -1337,16 +1364,16 @@ else
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
-if { (eval echo configure:1341: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+if { (eval echo configure:1368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
eval ac_cv_prog_cc_${ac_cc}_c_o=yes
if test "x$CC" != xcc; then
# Test first that cc exists at all.
- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
ac_try='cc -c conftest.c -o conftest.o 1>&5'
- if { (eval echo configure:1349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
- test -f conftest.o && { (eval echo configure:1350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
+ if { (eval echo configure:1376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
+ test -f conftest.o && { (eval echo configure:1377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
then
# cc works too.
:
@@ -1392,7 +1419,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1396: checking for $ac_word" >&5
+echo "configure:1423: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1424,7 +1451,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1428: checking for $ac_word" >&5
+echo "configure:1455: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1457,7 +1484,7 @@ fi
fi
echo $ac_n "checking for compiler driver that understands Ada""... $ac_c" 1>&6
-echo "configure:1461: checking for compiler driver that understands Ada" >&5
+echo "configure:1488: checking for compiler driver that understands Ada" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_adac'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1502,21 +1529,21 @@ fi
echo $ac_n "checking whether ${CC-cc} accepts -Wno-long-long""... $ac_c" 1>&6
-echo "configure:1506: checking whether ${CC-cc} accepts -Wno-long-long" >&5
+echo "configure:1533: checking whether ${CC-cc} accepts -Wno-long-long" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_no_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
save_CFLAGS="$CFLAGS"
CFLAGS="-Wno-long-long"
cat > conftest.$ac_ext <<EOF
-#line 1513 "configure"
+#line 1540 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_prog_cc_no_long_long=yes
else
@@ -1533,7 +1560,7 @@ echo "$ac_t""$ac_cv_prog_cc_no_long_long" 1>&6
if test x$have_gnat != xno ; then
echo $ac_n "checking whether ${ADAC} accepts -Wno-long-long""... $ac_c" 1>&6
-echo "configure:1537: checking whether ${ADAC} accepts -Wno-long-long" >&5
+echo "configure:1564: checking whether ${ADAC} accepts -Wno-long-long" >&5
if eval "test \"`echo '$''{'ac_cv_prog_adac_no_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1561,7 +1588,7 @@ fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1565: checking how to run the C preprocessor" >&5
+echo "configure:1592: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1576,13 +1603,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1580 "configure"
+#line 1607 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1593,13 +1620,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1597 "configure"
+#line 1624 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1610,13 +1637,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1614 "configure"
+#line 1641 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1641,21 +1668,21 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1645: checking for inline" >&5
+echo "configure:1672: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1652 "configure"
+#line 1679 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1681,19 +1708,19 @@ EOF
esac
echo $ac_n "checking for volatile""... $ac_c" 1>&6
-echo "configure:1685: checking for volatile" >&5
+echo "configure:1712: checking for volatile" >&5
if eval "test \"`echo '$''{'gcc_cv_c_volatile'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1690 "configure"
+#line 1717 "configure"
#include "confdefs.h"
int main() {
volatile int foo;
; return 0; }
EOF
-if { (eval echo configure:1697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c_volatile=yes
else
@@ -1715,7 +1742,7 @@ fi
echo $ac_n "checking for long double""... $ac_c" 1>&6
-echo "configure:1719: checking for long double" >&5
+echo "configure:1746: checking for long double" >&5
if eval "test \"`echo '$''{'gcc_cv_c_long_double'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1723,7 +1750,7 @@ else
gcc_cv_c_long_double=yes
else
cat > conftest.$ac_ext <<EOF
-#line 1727 "configure"
+#line 1754 "configure"
#include "confdefs.h"
int main() {
@@ -1733,7 +1760,7 @@ long double foo = 0.0;
switch (0) case 0: case (sizeof(long double) >= sizeof(double)):;
; return 0; }
EOF
-if { (eval echo configure:1737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c_long_double=yes
else
@@ -1755,19 +1782,19 @@ EOF
fi
echo $ac_n "checking for long long int""... $ac_c" 1>&6
-echo "configure:1759: checking for long long int" >&5
+echo "configure:1786: checking for long long int" >&5
if eval "test \"`echo '$''{'ac_cv_c_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1764 "configure"
+#line 1791 "configure"
#include "confdefs.h"
int main() {
long long int i;
; return 0; }
EOF
-if { (eval echo configure:1771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_long_long=yes
else
@@ -1787,19 +1814,19 @@ EOF
fi
echo $ac_n "checking for __int64""... $ac_c" 1>&6
-echo "configure:1791: checking for __int64" >&5
+echo "configure:1818: checking for __int64" >&5
if eval "test \"`echo '$''{'ac_cv_c___int64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1796 "configure"
+#line 1823 "configure"
#include "confdefs.h"
int main() {
__int64 i;
; return 0; }
EOF
-if { (eval echo configure:1803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c___int64=yes
else
@@ -1820,19 +1847,19 @@ EOF
fi
echo $ac_n "checking for built-in _Bool""... $ac_c" 1>&6
-echo "configure:1824: checking for built-in _Bool" >&5
+echo "configure:1851: checking for built-in _Bool" >&5
if eval "test \"`echo '$''{'gcc_cv_c__bool'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1829 "configure"
+#line 1856 "configure"
#include "confdefs.h"
int main() {
_Bool foo;
; return 0; }
EOF
-if { (eval echo configure:1836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c__bool=yes
else
@@ -1856,13 +1883,13 @@ fi
# sizeof(char) is 1 by definition.
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1860: checking size of short" >&5
+echo "configure:1887: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 1866 "configure"
+#line 1893 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -1872,7 +1899,7 @@ int main() {
switch (0) case 0: case (sizeof (short) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:1876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_short=$ac_size
else
@@ -1895,13 +1922,13 @@ EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1899: checking size of int" >&5
+echo "configure:1926: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 1905 "configure"
+#line 1932 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -1911,7 +1938,7 @@ int main() {
switch (0) case 0: case (sizeof (int) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:1915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_int=$ac_size
else
@@ -1934,13 +1961,13 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1938: checking size of long" >&5
+echo "configure:1965: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 1944 "configure"
+#line 1971 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -1950,7 +1977,7 @@ int main() {
switch (0) case 0: case (sizeof (long) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long=$ac_size
else
@@ -1974,13 +2001,13 @@ EOF
if test $ac_cv_c_long_long = yes; then
echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:1978: checking size of long long" >&5
+echo "configure:2005: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 1984 "configure"
+#line 2011 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -1990,7 +2017,7 @@ int main() {
switch (0) case 0: case (sizeof (long long) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof_long_long=$ac_size
else
@@ -2015,13 +2042,13 @@ EOF
fi
if test $ac_cv_c___int64 = yes; then
echo $ac_n "checking size of __int64""... $ac_c" 1>&6
-echo "configure:2019: checking size of __int64" >&5
+echo "configure:2046: checking size of __int64" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
cat > conftest.$ac_ext <<EOF
-#line 2025 "configure"
+#line 2052 "configure"
#include "confdefs.h"
#include "confdefs.h"
#include <sys/types.h>
@@ -2031,7 +2058,7 @@ int main() {
switch (0) case 0: case (sizeof (__int64) == $ac_size):;
; return 0; }
EOF
-if { (eval echo configure:2035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sizeof___int64=$ac_size
else
@@ -2056,12 +2083,12 @@ EOF
fi
echo $ac_n "checking execution character set""... $ac_c" 1>&6
-echo "configure:2060: checking execution character set" >&5
+echo "configure:2087: checking execution character set" >&5
if eval "test \"`echo '$''{'ac_cv_c_charset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2065 "configure"
+#line 2092 "configure"
#include "confdefs.h"
#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
&& 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21
@@ -2077,7 +2104,7 @@ rm -f conftest*
if test x${ac_cv_c_charset+set} != xset; then
cat > conftest.$ac_ext <<EOF
-#line 2081 "configure"
+#line 2108 "configure"
#include "confdefs.h"
#if '\n' == 0x15 && ' ' == 0x40 && '0' == 0xF0 \
&& 'A' == 0xC1 && 'a' == 0x81 && '!' == 0x5A
@@ -2138,7 +2165,7 @@ esac
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:2142: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:2169: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2166,7 +2193,7 @@ fi
echo $ac_n "checking whether a default assembler was specified""... $ac_c" 1>&6
-echo "configure:2170: checking whether a default assembler was specified" >&5
+echo "configure:2197: checking whether a default assembler was specified" >&5
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
if test x"$gas_flag" = x"no"; then
echo "$ac_t""yes ($DEFAULT_ASSEMBLER)" 1>&6
@@ -2178,7 +2205,7 @@ else
fi
echo $ac_n "checking whether a default linker was specified""... $ac_c" 1>&6
-echo "configure:2182: checking whether a default linker was specified" >&5
+echo "configure:2209: checking whether a default linker was specified" >&5
if test x"${DEFAULT_LINKER+set}" = x"set"; then
if test x"$gnu_ld_flag" = x"no"; then
echo "$ac_t""yes ($DEFAULT_LINKER)" 1>&6
@@ -2190,12 +2217,12 @@ else
fi
echo $ac_n "checking for GNU C library""... $ac_c" 1>&6
-echo "configure:2194: checking for GNU C library" >&5
+echo "configure:2221: checking for GNU C library" >&5
if eval "test \"`echo '$''{'gcc_cv_glibc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2199 "configure"
+#line 2226 "configure"
#include "confdefs.h"
#include <features.h>
int main() {
@@ -2205,7 +2232,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:2209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_glibc=yes
else
@@ -2226,12 +2253,12 @@ EOF
fi
# Find some useful tools
-for ac_prog in gawk mawk nawk awk
+for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2235: checking for $ac_word" >&5
+echo "configure:2262: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2261,7 +2288,7 @@ test -n "$AWK" && break
done
echo $ac_n "checking whether ln works""... $ac_c" 1>&6
-echo "configure:2265: checking whether ln works" >&5
+echo "configure:2292: checking whether ln works" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_LN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2293,7 +2320,7 @@ else
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:2297: checking whether ln -s works" >&5
+echo "configure:2324: checking whether ln -s works" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_LN_S'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2327,7 +2354,7 @@ fi
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2331: checking for $ac_word" >&5
+echo "configure:2358: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2365,7 +2392,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2369: checking for a BSD compatible install" >&5
+echo "configure:2396: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -2416,12 +2443,12 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2420: checking for ANSI C header files" >&5
+echo "configure:2447: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2425 "configure"
+#line 2452 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2429,7 +2456,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2446,7 +2473,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2450 "configure"
+#line 2477 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2464,7 +2491,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2468 "configure"
+#line 2495 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2485,7 +2512,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2489 "configure"
+#line 2516 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2496,7 +2523,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2520,12 +2547,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:2524: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:2551: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2529 "configure"
+#line 2556 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -2534,7 +2561,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:2538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -2555,19 +2582,19 @@ EOF
fi
echo $ac_n "checking for working stdbool.h""... $ac_c" 1>&6
-echo "configure:2559: checking for working stdbool.h" >&5
+echo "configure:2586: checking for working stdbool.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdbool_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2564 "configure"
+#line 2591 "configure"
#include "confdefs.h"
#include <stdbool.h>
int main() {
bool foo = false;
; return 0; }
EOF
-if { (eval echo configure:2571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_stdbool_h=yes
else
@@ -2588,12 +2615,12 @@ EOF
fi
echo $ac_n "checking whether string.h and strings.h may both be included""... $ac_c" 1>&6
-echo "configure:2592: checking whether string.h and strings.h may both be included" >&5
+echo "configure:2619: checking whether string.h and strings.h may both be included" >&5
if eval "test \"`echo '$''{'gcc_cv_header_string'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2597 "configure"
+#line 2624 "configure"
#include "confdefs.h"
#include <string.h>
#include <strings.h>
@@ -2601,7 +2628,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:2605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_header_string=yes
else
@@ -2622,12 +2649,12 @@ EOF
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:2626: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:2653: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2631 "configure"
+#line 2658 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -2643,7 +2670,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:2647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -2670,17 +2697,17 @@ for ac_hdr in limits.h stddef.h string.h strings.h stdlib.h time.h \
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2674: checking for $ac_hdr" >&5
+echo "configure:2701: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2679 "configure"
+#line 2706 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2710,17 +2737,17 @@ done
# Check for thread headers.
ac_safe=`echo "thread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for thread.h""... $ac_c" 1>&6
-echo "configure:2714: checking for thread.h" >&5
+echo "configure:2741: checking for thread.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2719 "configure"
+#line 2746 "configure"
#include "confdefs.h"
#include <thread.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2744,17 +2771,17 @@ fi
ac_safe=`echo "pthread.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for pthread.h""... $ac_c" 1>&6
-echo "configure:2748: checking for pthread.h" >&5
+echo "configure:2775: checking for pthread.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2753 "configure"
+#line 2780 "configure"
#include "confdefs.h"
#include <pthread.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2779,12 +2806,12 @@ fi
# These tests can't be done till we know if we have limits.h.
echo $ac_n "checking for CHAR_BIT""... $ac_c" 1>&6
-echo "configure:2783: checking for CHAR_BIT" >&5
+echo "configure:2810: checking for CHAR_BIT" >&5
if eval "test \"`echo '$''{'gcc_cv_decl_char_bit'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2788 "configure"
+#line 2815 "configure"
#include "confdefs.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
@@ -2809,7 +2836,7 @@ fi
echo "$ac_t""$gcc_cv_decl_char_bit" 1>&6
if test $gcc_cv_decl_char_bit = no; then
echo $ac_n "checking number of bits in a byte""... $ac_c" 1>&6
-echo "configure:2813: checking number of bits in a byte" >&5
+echo "configure:2840: checking number of bits in a byte" >&5
if eval "test \"`echo '$''{'gcc_cv_c_nbby'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2817,7 +2844,7 @@ else
gcc_cv_c_nbby=
while test $i -lt 65; do
cat > conftest.$ac_ext <<EOF
-#line 2821 "configure"
+#line 2848 "configure"
#include "confdefs.h"
int main() {
@@ -2827,7 +2854,7 @@ switch(0) {
; }
; return 0; }
EOF
-if { (eval echo configure:2831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_c_nbby=$i; break
else
@@ -2852,7 +2879,7 @@ EOF
fi
fi
echo $ac_n "checking byte ordering""... $ac_c" 1>&6
-echo "configure:2856: checking byte ordering" >&5
+echo "configure:2883: checking byte ordering" >&5
if eval "test \"`echo '$''{'ac_cv_c_compile_endian'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2866,7 +2893,7 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2870 "configure"
+#line 2897 "configure"
#include "confdefs.h"
#ifdef HAVE_LIMITS_H
@@ -2886,7 +2913,7 @@ cat > conftest.$ac_ext <<EOF
'X', '\n'
};
EOF
-if { (eval echo configure:2890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
od -c conftest.o |
sed 's/^[0-7]*[ ]*/ /
s/\*/./g
@@ -2925,7 +2952,7 @@ EOF
fi
echo $ac_n "checking floating point format""... $ac_c" 1>&6
-echo "configure:2929: checking floating point format" >&5
+echo "configure:2956: checking floating point format" >&5
if eval "test \"`echo '$''{'ac_cv_c_float_format'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2938,7 +2965,7 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2942 "configure"
+#line 2969 "configure"
#include "confdefs.h"
/* This will not work unless sizeof(double) == 8. */
extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1];
@@ -2960,7 +2987,7 @@ struct possibility table [] =
C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */
};
EOF
-if { (eval echo configure:2964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
od -c conftest.o |
sed 's/^[0-7]*[ ]*/ /
s/\*/./g
@@ -3049,7 +3076,7 @@ fi
# Extract the first word of "mktemp", so it can be a program name with args.
set dummy mktemp; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3053: checking for $ac_word" >&5
+echo "configure:3080: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_have_mktemp_command'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3088,7 +3115,7 @@ else
# Extract the first word of "makeinfo", so it can be a program name with args.
set dummy makeinfo; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3092: checking for $ac_word" >&5
+echo "configure:3119: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3117,13 +3144,13 @@ fi
if test -n "$MAKEINFO"; then
# Found it, now check the version.
echo $ac_n "checking for modern makeinfo""... $ac_c" 1>&6
-echo "configure:3121: checking for modern makeinfo" >&5
+echo "configure:3148: checking for modern makeinfo" >&5
if eval "test \"`echo '$''{'gcc_cv_prog_makeinfo_modern'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_prog_version=`$MAKEINFO --version 2>&1 |
sed -n 's/^.*GNU texinfo.* \([0-9][0-9.]*\).*$/\1/p'`
- echo "configure:3127: version of makeinfo is $ac_prog_version" >&5
+ echo "configure:3154: version of makeinfo is $ac_prog_version" >&5
case $ac_prog_version in
'') gcc_cv_prog_makeinfo_modern=no;;
4.[1-9]*)
@@ -3151,7 +3178,7 @@ fi
# Is pod2man recent enough to regenerate manpages?
echo $ac_n "checking for recent Pod::Man""... $ac_c" 1>&6
-echo "configure:3155: checking for recent Pod::Man" >&5
+echo "configure:3182: checking for recent Pod::Man" >&5
if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
echo "$ac_t""yes" 1>&6
GENERATED_MANPAGES=generated-manpages
@@ -3167,7 +3194,7 @@ else
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3171: checking for $ac_word" >&5
+echo "configure:3198: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3204,7 +3231,7 @@ else
# Extract the first word of "bison", so it can be a program name with args.
set dummy bison; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3208: checking for $ac_word" >&5
+echo "configure:3235: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3236,7 +3263,7 @@ fi
# These libraries may be used by collect2.
# We may need a special search path to get them linked.
echo $ac_n "checking for collect2 libraries""... $ac_c" 1>&6
-echo "configure:3240: checking for collect2 libraries" >&5
+echo "configure:3267: checking for collect2 libraries" >&5
if eval "test \"`echo '$''{'gcc_cv_collect2_libs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3247,7 +3274,7 @@ for libs in '' -lld -lmld \
do
LIBS="$libs"
cat > conftest.$ac_ext <<EOF
-#line 3251 "configure"
+#line 3278 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3258,7 +3285,7 @@ int main() {
ldopen()
; return 0; }
EOF
-if { (eval echo configure:3262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gcc_cv_collect2_libs="$libs"; break
else
@@ -3284,14 +3311,14 @@ save_LIBS="$LIBS"
LIBS=
echo $ac_n "checking for library containing exc_resume""... $ac_c" 1>&6
-echo "configure:3288: checking for library containing exc_resume" >&5
+echo "configure:3315: checking for library containing exc_resume" >&5
if eval "test \"`echo '$''{'ac_cv_search_exc_resume'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_exc_resume="no"
cat > conftest.$ac_ext <<EOF
-#line 3295 "configure"
+#line 3322 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3302,7 +3329,7 @@ int main() {
exc_resume()
; return 0; }
EOF
-if { (eval echo configure:3306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_exc_resume="none required"
else
@@ -3313,7 +3340,7 @@ rm -f conftest*
test "$ac_cv_search_exc_resume" = "no" && for i in exc; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3317 "configure"
+#line 3344 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3324,7 +3351,7 @@ int main() {
exc_resume()
; return 0; }
EOF
-if { (eval echo configure:3328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_exc_resume="-l$i"
break
@@ -3353,12 +3380,12 @@ LIBS="$save_LIBS"
echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6
-echo "configure:3357: checking for preprocessor stringizing operator" >&5
+echo "configure:3384: checking for preprocessor stringizing operator" >&5
if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3362 "configure"
+#line 3389 "configure"
#include "confdefs.h"
#define x(y) #y
@@ -3391,12 +3418,12 @@ echo "$ac_t""${ac_cv_c_stringize}" 1>&6
# Use <inttypes.h> only if it exists,
# doesn't clash with <sys/types.h>, and declares intmax_t.
echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
-echo "configure:3395: checking for inttypes.h" >&5
+echo "configure:3422: checking for inttypes.h" >&5
if eval "test \"`echo '$''{'gcc_cv_header_inttypes_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3400 "configure"
+#line 3427 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <inttypes.h>
@@ -3404,7 +3431,7 @@ int main() {
intmax_t i = -1;
; return 0; }
EOF
-if { (eval echo configure:3408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_header_inttypes_h=yes
else
@@ -3430,12 +3457,12 @@ for ac_func in times clock dup2 kill getrlimit setrlimit atoll atoq \
fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3434: checking for $ac_func" >&5
+echo "configure:3461: 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 3439 "configure"
+#line 3466 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3458,7 +3485,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3484,12 +3511,12 @@ done
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:3488: checking for ssize_t" >&5
+echo "configure:3515: checking for ssize_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3493 "configure"
+#line 3520 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3520,12 +3547,12 @@ fi
# Try to determine the array type of the second argument of getgroups
# for the target system (int or gid_t).
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:3524: checking for uid_t in sys/types.h" >&5
+echo "configure:3551: checking for uid_t in sys/types.h" >&5
if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3529 "configure"
+#line 3556 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -3554,7 +3581,7 @@ EOF
fi
echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
-echo "configure:3558: checking type of array argument to getgroups" >&5
+echo "configure:3585: checking type of array argument to getgroups" >&5
if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3562,7 +3589,7 @@ else
ac_cv_type_getgroups=cross
else
cat > conftest.$ac_ext <<EOF
-#line 3566 "configure"
+#line 3593 "configure"
#include "confdefs.h"
/* Thanks to Mike Rendell for this test. */
@@ -3587,7 +3614,7 @@ main()
}
EOF
-if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_type_getgroups=gid_t
else
@@ -3601,7 +3628,7 @@ fi
if test $ac_cv_type_getgroups = cross; then
cat > conftest.$ac_ext <<EOF
-#line 3605 "configure"
+#line 3632 "configure"
#include "confdefs.h"
#include <unistd.h>
EOF
@@ -3642,7 +3669,7 @@ fi
echo $ac_n "checking whether the printf functions support %p""... $ac_c" 1>&6
-echo "configure:3646: checking whether the printf functions support %p" >&5
+echo "configure:3673: checking whether the printf functions support %p" >&5
if eval "test \"`echo '$''{'gcc_cv_func_printf_ptr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3650,7 +3677,7 @@ else
gcc_cv_func_printf_ptr=no
else
cat > conftest.$ac_ext <<EOF
-#line 3654 "configure"
+#line 3681 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3663,7 +3690,7 @@ int main()
return (p != q);
}
EOF
-if { (eval echo configure:3667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
gcc_cv_func_printf_ptr=yes
else
@@ -3701,12 +3728,12 @@ case "${host}" in
;;
esac
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3705: checking for pid_t" >&5
+echo "configure:3732: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3710 "configure"
+#line 3737 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3735,17 +3762,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:3739: checking for vfork.h" >&5
+echo "configure:3766: checking for vfork.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3744 "configure"
+#line 3771 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3770,18 +3797,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:3774: checking for working vfork" >&5
+echo "configure:3801: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:3780: checking for vfork" >&5
+echo "configure:3807: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3785 "configure"
+#line 3812 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -3804,7 +3831,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:3808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -3826,7 +3853,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 3830 "configure"
+#line 3857 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -3921,7 +3948,7 @@ main() {
}
}
EOF
-if { (eval echo configure:3925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -3946,12 +3973,12 @@ fi
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3950: checking for $ac_func" >&5
+echo "configure:3977: 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 3955 "configure"
+#line 3982 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3974,7 +4001,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4245,7 +4272,7 @@ main ()
EOF
echo $ac_n "checking for working mmap from /dev/zero""... $ac_c" 1>&6
-echo "configure:4249: checking for working mmap from /dev/zero" >&5
+echo "configure:4276: checking for working mmap from /dev/zero" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_dev_zero'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4261,11 +4288,11 @@ else
esac
else
cat > conftest.$ac_ext <<EOF
-#line 4265 "configure"
+#line 4292 "configure"
#include "confdefs.h"
#include "ct-mmap.inc"
EOF
-if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_dev_zero=yes
else
@@ -4292,7 +4319,7 @@ EOF
fi
echo $ac_n "checking for working mmap with MAP_ANON(YMOUS)""... $ac_c" 1>&6
-echo "configure:4296: checking for working mmap with MAP_ANON(YMOUS)" >&5
+echo "configure:4323: checking for working mmap with MAP_ANON(YMOUS)" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_anon'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4302,12 +4329,12 @@ else
ac_cv_func_mmap_anon=no
else
cat > conftest.$ac_ext <<EOF
-#line 4306 "configure"
+#line 4333 "configure"
#include "confdefs.h"
#define USE_MAP_ANON
#include "ct-mmap.inc"
EOF
-if { (eval echo configure:4311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_anon=yes
else
@@ -4335,7 +4362,7 @@ fi
rm -f ct-mmap.inc
echo $ac_n "checking for working mmap of a file""... $ac_c" 1>&6
-echo "configure:4339: checking for working mmap of a file" >&5
+echo "configure:4366: checking for working mmap of a file" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_file'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4350,7 +4377,7 @@ if test "$cross_compiling" = yes; then
ac_cv_func_mmap_file=no
else
cat > conftest.$ac_ext <<EOF
-#line 4354 "configure"
+#line 4381 "configure"
#include "confdefs.h"
/* Test by Zack Weinberg. Modified from MMAP_ANYWHERE test by
@@ -4387,7 +4414,7 @@ int main()
exit(0);
}
EOF
-if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_file=yes
else
@@ -4426,7 +4453,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:4430: checking for iconv" >&5
+echo "configure:4457: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4434,7 +4461,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 4438 "configure"
+#line 4465 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -4444,7 +4471,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:4448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -4456,7 +4483,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
cat > conftest.$ac_ext <<EOF
-#line 4460 "configure"
+#line 4487 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -4466,7 +4493,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:4470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
@@ -4487,13 +4514,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:4491: checking for iconv declaration" >&5
+echo "configure:4518: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4497 "configure"
+#line 4524 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -4512,7 +4539,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:4516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
@@ -4550,12 +4577,12 @@ for ac_func in getenv atol sbrk abort atof getcwd getwd \
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:4554: checking whether $ac_func is declared" >&5
+echo "configure:4581: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4559 "configure"
+#line 4586 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
@@ -4569,7 +4596,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
-if { (eval echo configure:4573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
@@ -4668,12 +4695,12 @@ for ac_func in getrlimit setrlimit getrusage
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:4672: checking whether $ac_func is declared" >&5
+echo "configure:4699: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4677 "configure"
+#line 4704 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
@@ -4691,7 +4718,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
-if { (eval echo configure:4695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
@@ -4733,12 +4760,12 @@ for ac_func in times
do
ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
echo $ac_n "checking whether $ac_func is declared""... $ac_c" 1>&6
-echo "configure:4737: checking whether $ac_func is declared" >&5
+echo "configure:4764: checking whether $ac_func is declared" >&5
if eval "test \"`echo '$''{'gcc_cv_have_decl_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4742 "configure"
+#line 4769 "configure"
#include "confdefs.h"
#undef $ac_tr_decl
#define $ac_tr_decl 1
@@ -4756,7 +4783,7 @@ char *(*pfn) = (char *(*)) $ac_func ;
#endif
; return 0; }
EOF
-if { (eval echo configure:4760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "gcc_cv_have_decl_$ac_func=yes"
else
@@ -4790,13 +4817,13 @@ fi
# More time-related stuff.
echo $ac_n "checking for struct tms""... $ac_c" 1>&6
-echo "configure:4794: checking for struct tms" >&5
+echo "configure:4821: checking for struct tms" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tms'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4800 "configure"
+#line 4827 "configure"
#include "confdefs.h"
#include "ansidecl.h"
@@ -4809,7 +4836,7 @@ int main() {
struct tms tms;
; return 0; }
EOF
-if { (eval echo configure:4813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tms=yes
else
@@ -4832,13 +4859,13 @@ fi
# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
# revisit after autoconf 2.50.
echo $ac_n "checking for clock_t""... $ac_c" 1>&6
-echo "configure:4836: checking for clock_t" >&5
+echo "configure:4863: checking for clock_t" >&5
if eval "test \"`echo '$''{'gcc_cv_type_clock_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4842 "configure"
+#line 4869 "configure"
#include "confdefs.h"
#include "ansidecl.h"
@@ -4848,7 +4875,7 @@ int main() {
clock_t x;
; return 0; }
EOF
-if { (eval echo configure:4852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_type_clock_t=yes
else
@@ -4873,12 +4900,12 @@ CFLAGS="$saved_CFLAGS"
# mkdir takes a single argument on some systems.
echo $ac_n "checking if mkdir takes one argument""... $ac_c" 1>&6
-echo "configure:4877: checking if mkdir takes one argument" >&5
+echo "configure:4904: checking if mkdir takes one argument" >&5
if eval "test \"`echo '$''{'gcc_cv_mkdir_takes_one_arg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4882 "configure"
+#line 4909 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -4895,7 +4922,7 @@ int main() {
mkdir ("foo", 0);
; return 0; }
EOF
-if { (eval echo configure:4899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
gcc_cv_mkdir_takes_one_arg=no
else
@@ -5163,14 +5190,14 @@ fi
echo $ac_n "checking for library containing strerror""... $ac_c" 1>&6
-echo "configure:5167: checking for library containing strerror" >&5
+echo "configure:5194: checking for library containing strerror" >&5
if eval "test \"`echo '$''{'ac_cv_search_strerror'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_strerror="no"
cat > conftest.$ac_ext <<EOF
-#line 5174 "configure"
+#line 5201 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5181,7 +5208,7 @@ int main() {
strerror()
; return 0; }
EOF
-if { (eval echo configure:5185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_strerror="none required"
else
@@ -5192,7 +5219,7 @@ rm -f conftest*
test "$ac_cv_search_strerror" = "no" && for i in cposix; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5196 "configure"
+#line 5223 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -5203,7 +5230,7 @@ int main() {
strerror()
; return 0; }
EOF
-if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_strerror="-l$i"
break
@@ -5226,12 +5253,12 @@ fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:5230: checking for working const" >&5
+echo "configure:5257: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5235 "configure"
+#line 5262 "configure"
#include "confdefs.h"
int main() {
@@ -5280,7 +5307,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:5284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -5301,12 +5328,12 @@ EOF
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:5305: checking for off_t" >&5
+echo "configure:5332: checking for off_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5310 "configure"
+#line 5337 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -5334,12 +5361,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:5338: checking for size_t" >&5
+echo "configure:5365: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5343 "configure"
+#line 5370 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -5369,19 +5396,19 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:5373: checking for working alloca.h" >&5
+echo "configure:5400: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5378 "configure"
+#line 5405 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:5385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -5402,12 +5429,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:5406: checking for alloca" >&5
+echo "configure:5433: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5411 "configure"
+#line 5438 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -5435,7 +5462,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:5439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -5467,12 +5494,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:5471: checking whether alloca needs Cray hooks" >&5
+echo "configure:5498: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5476 "configure"
+#line 5503 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -5497,12 +5524,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5501: checking for $ac_func" >&5
+echo "configure:5528: 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 5506 "configure"
+#line 5533 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5525,7 +5552,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5552,7 +5579,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:5556: checking stack direction for C alloca" >&5
+echo "configure:5583: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5560,7 +5587,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 5564 "configure"
+#line 5591 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -5579,7 +5606,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:5610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -5602,12 +5629,12 @@ fi
echo $ac_n "checking whether we are using the GNU C Library 2.1 or newer""... $ac_c" 1>&6
-echo "configure:5606: checking whether we are using the GNU C Library 2.1 or newer" >&5
+echo "configure:5633: checking whether we are using the GNU C Library 2.1 or newer" >&5
if eval "test \"`echo '$''{'ac_cv_gnu_library_2_1'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5611 "configure"
+#line 5638 "configure"
#include "confdefs.h"
#include <features.h>
@@ -5643,17 +5670,17 @@ stdlib.h string.h unistd.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5647: checking for $ac_hdr" >&5
+echo "configure:5674: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5652 "configure"
+#line 5679 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -5684,12 +5711,12 @@ getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5688: checking for $ac_func" >&5
+echo "configure:5715: 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 5693 "configure"
+#line 5720 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5712,7 +5739,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5753,7 +5780,7 @@ fi
echo $ac_n "checking for iconv""... $ac_c" 1>&6
-echo "configure:5757: checking for iconv" >&5
+echo "configure:5784: checking for iconv" >&5
if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5761,7 +5788,7 @@ else
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
cat > conftest.$ac_ext <<EOF
-#line 5765 "configure"
+#line 5792 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -5771,7 +5798,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:5775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_func_iconv=yes
else
@@ -5783,7 +5810,7 @@ rm -f conftest*
am_save_LIBS="$LIBS"
LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
cat > conftest.$ac_ext <<EOF
-#line 5787 "configure"
+#line 5814 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
@@ -5793,7 +5820,7 @@ iconv_t cd = iconv_open("","");
iconv_close(cd);
; return 0; }
EOF
-if { (eval echo configure:5797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
@@ -5814,13 +5841,13 @@ echo "$ac_t""$am_cv_func_iconv" 1>&6
EOF
echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
-echo "configure:5818: checking for iconv declaration" >&5
+echo "configure:5845: checking for iconv declaration" >&5
if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5824 "configure"
+#line 5851 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -5839,7 +5866,7 @@ int main() {
; return 0; }
EOF
-if { (eval echo configure:5843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
am_cv_proto_iconv_arg1=""
else
@@ -5868,19 +5895,19 @@ EOF
echo $ac_n "checking for nl_langinfo and CODESET""... $ac_c" 1>&6
-echo "configure:5872: checking for nl_langinfo and CODESET" >&5
+echo "configure:5899: checking for nl_langinfo and CODESET" >&5
if eval "test \"`echo '$''{'am_cv_langinfo_codeset'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5877 "configure"
+#line 5904 "configure"
#include "confdefs.h"
#include <langinfo.h>
int main() {
char* cs = nl_langinfo(CODESET);
; return 0; }
EOF
-if { (eval echo configure:5884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_langinfo_codeset=yes
else
@@ -5903,19 +5930,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:5907: checking for LC_MESSAGES" >&5
+echo "configure:5934: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5912 "configure"
+#line 5939 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:5919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -5936,7 +5963,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:5940: checking whether NLS is requested" >&5
+echo "configure:5967: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -5959,7 +5986,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:5963: checking whether included gettext is requested" >&5
+echo "configure:5990: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -5979,17 +6006,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:5983: checking for libintl.h" >&5
+echo "configure:6010: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5988 "configure"
+#line 6015 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -6010,12 +6037,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
EOF
echo $ac_n "checking for GNU gettext in libc""... $ac_c" 1>&6
-echo "configure:6014: checking for GNU gettext in libc" >&5
+echo "configure:6041: checking for GNU gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6019 "configure"
+#line 6046 "configure"
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
@@ -6024,7 +6051,7 @@ bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:6028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gnugettext1_libc=yes
else
@@ -6040,14 +6067,14 @@ echo "$ac_t""$gt_cv_func_gnugettext1_libc" 1>&6
if test "$gt_cv_func_gnugettext1_libc" != "yes"; then
echo $ac_n "checking for GNU gettext in libintl""... $ac_c" 1>&6
-echo "configure:6044: checking for GNU gettext in libintl" >&5
+echo "configure:6071: checking for GNU gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gnugettext1_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
gt_save_LIBS="$LIBS"
LIBS="$LIBS -lintl $LIBICONV"
cat > conftest.$ac_ext <<EOF
-#line 6051 "configure"
+#line 6078 "configure"
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
@@ -6056,7 +6083,7 @@ bindtextdomain ("", "");
return (int) gettext ("") + _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gnugettext1_libintl=yes
else
@@ -6089,12 +6116,12 @@ EOF
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6093: checking for $ac_func" >&5
+echo "configure:6120: 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 6098 "configure"
+#line 6125 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6117,7 +6144,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -6146,7 +6173,7 @@ done
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6150: checking for $ac_word" >&5
+echo "configure:6177: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6180,7 +6207,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6184: checking for $ac_word" >&5
+echo "configure:6211: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6217,7 +6244,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6221: checking for $ac_word" >&5
+echo "configure:6248: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6267,7 +6294,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6271: checking for $ac_word" >&5
+echo "configure:6298: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6301,7 +6328,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6305: checking for $ac_word" >&5
+echo "configure:6332: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6337,7 +6364,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6341: checking for $ac_word" >&5
+echo "configure:6368: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6409,7 +6436,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6413: checking for $ac_word" >&5
+echo "configure:6440: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_INTLBISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -6442,7 +6469,7 @@ done
ac_verc_fail=yes
else
echo $ac_n "checking version of bison""... $ac_c" 1>&6
-echo "configure:6446: checking version of bison" >&5
+echo "configure:6473: checking version of bison" >&5
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
@@ -6487,7 +6514,7 @@ EOF
if test "x$CATOBJEXT" != x; then
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:6491: checking for catalogs to be installed" >&5
+echo "configure:6518: checking for catalogs to be installed" >&5
# Look for .po and .gmo files in the source directory.
CATALOGS=
XLINGUAS=
@@ -6545,7 +6572,7 @@ fi
case $host_os in
win32 | pe | cygwin* | mingw32* | uwin*)
echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
-echo "configure:6549: checking whether windows registry support is requested" >&5
+echo "configure:6576: checking whether windows registry support is requested" >&5
if test "x$enable_win32_registry" != xno; then
cat >> confdefs.h <<\EOF
#define ENABLE_WIN32_REGISTRY 1
@@ -6554,14 +6581,14 @@ EOF
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for library containing RegOpenKeyExA""... $ac_c" 1>&6
-echo "configure:6558: checking for library containing RegOpenKeyExA" >&5
+echo "configure:6585: checking for library containing RegOpenKeyExA" >&5
if eval "test \"`echo '$''{'ac_cv_search_RegOpenKeyExA'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_RegOpenKeyExA="no"
cat > conftest.$ac_ext <<EOF
-#line 6565 "configure"
+#line 6592 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6572,7 +6599,7 @@ int main() {
RegOpenKeyExA()
; return 0; }
EOF
-if { (eval echo configure:6576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_RegOpenKeyExA="none required"
else
@@ -6583,7 +6610,7 @@ rm -f conftest*
test "$ac_cv_search_RegOpenKeyExA" = "no" && for i in advapi32; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6587 "configure"
+#line 6614 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -6594,7 +6621,7 @@ int main() {
RegOpenKeyExA()
; return 0; }
EOF
-if { (eval echo configure:6598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_RegOpenKeyExA="-l$i"
break
@@ -6636,7 +6663,7 @@ esac
if test "x$enable_win32_registry" != xno; then
echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
-echo "configure:6640: checking registry key on windows hosts" >&5
+echo "configure:6667: checking registry key on windows hosts" >&5
cat >> confdefs.h <<EOF
#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
EOF
@@ -6841,7 +6868,7 @@ fi
# Figure out what assembler we will be using.
echo $ac_n "checking what assembler to use""... $ac_c" 1>&6
-echo "configure:6845: checking what assembler to use" >&5
+echo "configure:6872: checking what assembler to use" >&5
gcc_cv_as=
gcc_cv_gas_major_version=
gcc_cv_gas_minor_version=
@@ -6935,7 +6962,7 @@ fi
# Figure out what linker we will be using.
echo $ac_n "checking what linker to use""... $ac_c" 1>&6
-echo "configure:6939: checking what linker to use" >&5
+echo "configure:6966: checking what linker to use" >&5
gcc_cv_ld=
gcc_cv_gld_major_version=
gcc_cv_gld_minor_version=
@@ -7028,7 +7055,7 @@ fi
# Figure out what nm we will be using.
echo $ac_n "checking what nm to use""... $ac_c" 1>&6
-echo "configure:7032: checking what nm to use" >&5
+echo "configure:7059: checking what nm to use" >&5
if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext
elif test "x$program_prefix" != xNONE; then
@@ -7040,7 +7067,7 @@ echo "$ac_t""$gcc_cv_nm" 1>&6
# Figure out what objdump we will be using.
echo $ac_n "checking what objdump to use""... $ac_c" 1>&6
-echo "configure:7044: checking what objdump to use" >&5
+echo "configure:7071: checking what objdump to use" >&5
if test -x objdump$host_exeext; then
gcc_cv_objdump=./objdump$host_exeext
elif test "x$program_prefix" != xNONE; then
@@ -7052,7 +7079,7 @@ echo "$ac_t""$gcc_cv_objdump" 1>&6
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
-echo "configure:7056: checking assembler alignment features" >&5
+echo "configure:7083: checking assembler alignment features" >&5
gcc_cv_as_alignment_features=none
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
# Gas version 2.6 and later support for .balign and .p2align.
@@ -7100,7 +7127,7 @@ fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
-echo "configure:7104: checking assembler subsection support" >&5
+echo "configure:7131: checking assembler subsection support" >&5
gcc_cv_as_subsections=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@@ -7140,7 +7167,7 @@ fi
echo "$ac_t""$gcc_cv_as_subsections" 1>&6
echo $ac_n "checking assembler weak support""... $ac_c" 1>&6
-echo "configure:7144: checking assembler weak support" >&5
+echo "configure:7171: checking assembler weak support" >&5
gcc_cv_as_weak=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 2 -o "$gcc_cv_gas_major_version" -gt 2; then
@@ -7163,7 +7190,7 @@ fi
echo "$ac_t""$gcc_cv_as_weak" 1>&6
echo $ac_n "checking assembler hidden support""... $ac_c" 1>&6
-echo "configure:7167: checking assembler hidden support" >&5
+echo "configure:7194: checking assembler hidden support" >&5
gcc_cv_as_hidden=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 \
@@ -7189,9 +7216,29 @@ elif test x$gcc_cv_as != x; then
# the date string after the version number.
ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
if echo "$ld_ver" | grep GNU > /dev/null; then
+ ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
if test 0"$ld_date" -lt 20020404; then
- gcc_cv_as_hidden="no"
+ if test -n "$ld_date"; then
+ # If there was date string, but was earlier than 2002-04-04, fail
+ gcc_cv_as_hidden="no"
+ elif test -z "$ld_vers"; then
+ # If there was no date string nor ld version number, something is wrong
+ gcc_cv_as_hidden="no"
+ else
+ ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
+ ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
+ ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
+ test -z "$ld_vers_patch" && ld_vers_patch=0
+ if test "$ld_vers_major" -lt 2; then
+ gcc_cv_as_hidden="no"
+ elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
+ gcc_cv_as_hidden="no"
+ elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
+ -a "$ld_vers_patch" -eq 0; then
+ gcc_cv_as_hidden="no"
+ fi
+ fi
fi
fi
fi
@@ -7207,7 +7254,7 @@ libgcc_visibility=$gcc_cv_as_hidden
echo $ac_n "checking assembler leb128 support""... $ac_c" 1>&6
-echo "configure:7211: checking assembler leb128 support" >&5
+echo "configure:7258: checking assembler leb128 support" >&5
gcc_cv_as_leb128=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 11 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@@ -7252,7 +7299,7 @@ fi
echo "$ac_t""$gcc_cv_as_leb128" 1>&6
echo $ac_n "checking assembler eh_frame optimization""... $ac_c" 1>&6
-echo "configure:7256: checking assembler eh_frame optimization" >&5
+echo "configure:7303: checking assembler eh_frame optimization" >&5
gcc_cv_as_eh_frame=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@@ -7333,7 +7380,7 @@ fi
echo "$ac_t""$gcc_cv_as_eh_frame" 1>&6
echo $ac_n "checking assembler section merging support""... $ac_c" 1>&6
-echo "configure:7337: checking assembler section merging support" >&5
+echo "configure:7384: checking assembler section merging support" >&5
gcc_cv_as_shf_merge=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
@@ -7359,7 +7406,7 @@ case "$target" in
# All TARGET_ABI_OSF targets.
alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
echo $ac_n "checking assembler supports explicit relocations""... $ac_c" 1>&6
-echo "configure:7363: checking assembler supports explicit relocations" >&5
+echo "configure:7410: checking assembler supports explicit relocations" >&5
if eval "test \"`echo '$''{'gcc_cv_as_explicit_relocs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7409,7 +7456,7 @@ EOF
;;
sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
-echo "configure:7413: checking assembler .register pseudo-op support" >&5
+echo "configure:7460: checking assembler .register pseudo-op support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7437,7 +7484,7 @@ EOF
fi
echo $ac_n "checking assembler supports -relax""... $ac_c" 1>&6
-echo "configure:7441: checking assembler supports -relax" >&5
+echo "configure:7488: checking assembler supports -relax" >&5
if eval "test \"`echo '$''{'gcc_cv_as_relax_opt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7465,7 +7512,7 @@ EOF
fi
echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
-echo "configure:7469: checking assembler and linker support unaligned pc related relocs" >&5
+echo "configure:7516: checking assembler and linker support unaligned pc related relocs" >&5
if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7492,7 +7539,7 @@ EOF
fi
echo $ac_n "checking assembler and linker support unaligned pc related relocs against hidden symbols""... $ac_c" 1>&6
-echo "configure:7496: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
+echo "configure:7543: checking assembler and linker support unaligned pc related relocs against hidden symbols" >&5
if eval "test \"`echo '$''{'gcc_cv_as_sparc_ua_pcrel_hidden'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7533,7 +7580,7 @@ EOF
if test "x$gcc_cv_as_flags64" != xno; then
echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
-echo "configure:7537: checking for assembler offsetable %lo() support" >&5
+echo "configure:7584: checking for assembler offsetable %lo() support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7573,7 +7620,7 @@ EOF
i[34567]86-*-* | x86_64-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
-echo "configure:7577: checking assembler instructions" >&5
+echo "configure:7624: checking assembler instructions" >&5
gcc_cv_as_instructions=
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 9 -o "$gcc_cv_gas_major_version" -gt 2; then
@@ -7600,7 +7647,7 @@ EOF
echo "$ac_t""$gcc_cv_as_instructions" 1>&6
echo $ac_n "checking assembler GOTOFF in data directives""... $ac_c" 1>&6
-echo "configure:7604: checking assembler GOTOFF in data directives" >&5
+echo "configure:7651: checking assembler GOTOFF in data directives" >&5
gcc_cv_as_gotoff_in_data=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
then
@@ -7630,7 +7677,7 @@ EOF
esac
echo $ac_n "checking assembler dwarf2 debug_line support""... $ac_c" 1>&6
-echo "configure:7634: checking assembler dwarf2 debug_line support" >&5
+echo "configure:7681: checking assembler dwarf2 debug_line support" >&5
gcc_cv_as_dwarf2_debug_line=no
# ??? Not all targets support dwarf2 debug_line, even within a version
# of gas. Moreover, we need to emit a valid instruction to trigger any
@@ -7686,7 +7733,7 @@ fi
echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
echo $ac_n "checking assembler --gdwarf2 support""... $ac_c" 1>&6
-echo "configure:7690: checking assembler --gdwarf2 support" >&5
+echo "configure:7737: checking assembler --gdwarf2 support" >&5
gcc_cv_as_gdwarf2_flag=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
then
@@ -7715,7 +7762,7 @@ fi
echo "$ac_t""$gcc_cv_as_gdwarf2_flag" 1>&6
echo $ac_n "checking assembler --gstabs support""... $ac_c" 1>&6
-echo "configure:7719: checking assembler --gstabs support" >&5
+echo "configure:7766: checking assembler --gstabs support" >&5
gcc_cv_as_gstabs_flag=no
if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
then
@@ -7743,7 +7790,7 @@ fi
echo "$ac_t""$gcc_cv_as_gstabs_flag" 1>&6
echo $ac_n "checking linker PT_GNU_EH_FRAME support""... $ac_c" 1>&6
-echo "configure:7747: checking linker PT_GNU_EH_FRAME support" >&5
+echo "configure:7794: checking linker PT_GNU_EH_FRAME support" >&5
gcc_cv_ld_eh_frame_hdr=no
if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
@@ -7758,7 +7805,7 @@ fi
echo "$ac_t""$gcc_cv_ld_eh_frame_hdr" 1>&6
if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
echo $ac_n "checking whether linker eh_frame optimizations work properly""... $ac_c" 1>&6
-echo "configure:7762: checking whether linker eh_frame optimizations work properly" >&5
+echo "configure:7809: checking whether linker eh_frame optimizations work properly" >&5
gcc_cv_ld_eh_frame_hdr_works=no
if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 13 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
@@ -7988,7 +8035,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:7992: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:8039: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
diff --git a/contrib/gcc/configure.in b/contrib/gcc/configure.in
index 8893ed6..9cacc4a 100644
--- a/contrib/gcc/configure.in
+++ b/contrib/gcc/configure.in
@@ -167,7 +167,7 @@ esac])
if test x${gcc_gxx_include_dir} = x; then
if test x${enable_version_specific_runtime_libs} = xyes; then
- gcc_gxx_include_dir='${libsubdir}/include/g++'
+ gcc_gxx_include_dir='${libsubdir}/include/c++'
else
topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
changequote(<<, >>)dnl
@@ -259,6 +259,18 @@ elif test x$withval != xno; then
cpp_install_dir=$withval
fi])
+# Enable __cxa_atexit for C++.
+AC_ARG_ENABLE(__cxa_atexit,
+[ --enable-__cxa_atexit enable __cxa_atexit for C++],
+[], [])
+if test x$enable___cxa_atexit = xyes; then
+ AC_DEFINE(DEFAULT_USE_CXA_ATEXIT, 1,
+ [Define if you want to use __cxa_atexit, rather than atexit, to
+ register C++ destructors for local statics and global objects.
+ This is essential for fully standards-compliant handling of
+ destructors, but requires __cxa_atexit in libc.])
+fi
+
# Enable Multibyte Characters for C/C++
AC_ARG_ENABLE(c-mbchar,
[ --enable-c-mbchar enable multibyte characters for C and C++],
@@ -1525,11 +1537,31 @@ elif test x$gcc_cv_as != x; then
ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
if echo "$ld_ver" | grep GNU > /dev/null; then
changequote(,)dnl
+ ld_vers=`echo $ld_ver | sed -n 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\([ ].*\|\)$,\1,p'`
ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
-changequote([,])dnl
if test 0"$ld_date" -lt 20020404; then
- gcc_cv_as_hidden="no"
+ if test -n "$ld_date"; then
+ # If there was date string, but was earlier than 2002-04-04, fail
+ gcc_cv_as_hidden="no"
+ elif test -z "$ld_vers"; then
+ # If there was no date string nor ld version number, something is wrong
+ gcc_cv_as_hidden="no"
+ else
+ ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
+ ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
+ ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
+ test -z "$ld_vers_patch" && ld_vers_patch=0
+ if test "$ld_vers_major" -lt 2; then
+ gcc_cv_as_hidden="no"
+ elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -lt 12; then
+ gcc_cv_as_hidden="no"
+ elif test "$ld_vers_major" -eq 2 -a "$ld_vers_minor" -eq 12 \
+ -a "$ld_vers_patch" -eq 0; then
+ gcc_cv_as_hidden="no"
+ fi
+ fi
fi
+changequote([,])dnl
fi
fi
diff --git a/contrib/gcc/convert.c b/contrib/gcc/convert.c
index 127b22b..156c2cf 100644
--- a/contrib/gcc/convert.c
+++ b/contrib/gcc/convert.c
@@ -227,9 +227,11 @@ convert_to_integer (type, expr)
case LSHIFT_EXPR:
/* We can pass truncation down through left shifting
- when the shift count is a nonnegative constant. */
+ when the shift count is a nonnegative constant and
+ the target type is unsigned. */
if (TREE_CODE (TREE_OPERAND (expr, 1)) == INTEGER_CST
&& tree_int_cst_sgn (TREE_OPERAND (expr, 1)) >= 0
+ && TREE_UNSIGNED (type)
&& TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST)
{
/* If shift count is less than the width of the truncated type,
@@ -311,12 +313,15 @@ convert_to_integer (type, expr)
/* Don't do unsigned arithmetic where signed was wanted,
or vice versa.
Exception: if both of the original operands were
- unsigned then can safely do the work as unsigned.
+ unsigned then we can safely do the work as unsigned;
+ if we are distributing through a LSHIFT_EXPR, we must
+ do the work as unsigned to avoid a signed overflow.
And we may need to do it as unsigned
if we truncate to the original size. */
typex = ((TREE_UNSIGNED (TREE_TYPE (expr))
|| (TREE_UNSIGNED (TREE_TYPE (arg0))
- && TREE_UNSIGNED (TREE_TYPE (arg1))))
+ && TREE_UNSIGNED (TREE_TYPE (arg1)))
+ || ex_form == LSHIFT_EXPR)
? unsigned_type (typex) : signed_type (typex));
return convert (type,
fold (build (ex_form, typex,
diff --git a/contrib/gcc/cp-demangle.c b/contrib/gcc/cp-demangle.c
index 53eeaaf..162aafc 100644
--- a/contrib/gcc/cp-demangle.c
+++ b/contrib/gcc/cp-demangle.c
@@ -1,5 +1,5 @@
/* Demangler for IA64 / g++ V3 ABI.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Alex Samuel <samuel@codesourcery.com>.
This file is part of GNU CC.
@@ -898,7 +898,7 @@ static status_t demangle_number_literally
static status_t demangle_identifier
PARAMS ((demangling_t, int, dyn_string_t));
static status_t demangle_operator_name
- PARAMS ((demangling_t, int, int *));
+ PARAMS ((demangling_t, int, int *, int *));
static status_t demangle_nv_offset
PARAMS ((demangling_t));
static status_t demangle_v_offset
@@ -1325,7 +1325,7 @@ demangle_unqualified_name (dm, suppress_return_type)
if (peek == 'c' && peek_char_next (dm) == 'v')
*suppress_return_type = 1;
- RETURN_IF_ERROR (demangle_operator_name (dm, 0, &num_args));
+ RETURN_IF_ERROR (demangle_operator_name (dm, 0, &num_args, NULL));
}
else if (peek == 'C' || peek == 'D')
{
@@ -1501,7 +1501,9 @@ demangle_identifier (dm, length, identifier)
/* Demangles and emits an <operator-name>. If SHORT_NAME is non-zero,
the short form is emitted; otherwise the full source form
(`operator +' etc.) is emitted. *NUM_ARGS is set to the number of
- operands that the operator takes.
+ operands that the operator takes. If TYPE_ARG is non-NULL,
+ *TYPE_ARG is set to 1 if the first argument is a type and 0
+ otherwise.
<operator-name>
::= nw # new
@@ -1551,15 +1553,17 @@ demangle_identifier (dm, length, identifier)
::= cl # ()
::= ix # []
::= qu # ?
- ::= sz # sizeof
+ ::= st # sizeof (a type)
+ ::= sz # sizeof (an expression)
::= cv <type> # cast
::= v [0-9] <source-name> # vendor extended operator */
static status_t
-demangle_operator_name (dm, short_name, num_args)
+demangle_operator_name (dm, short_name, num_args, type_arg)
demangling_t dm;
int short_name;
int *num_args;
+ int *type_arg;
{
struct operator_code
{
@@ -1633,6 +1637,10 @@ demangle_operator_name (dm, short_name, num_args)
DEMANGLE_TRACE ("operator-name", dm);
+ /* Assume the first argument is not a type. */
+ if (type_arg)
+ *type_arg = 0;
+
/* Is this a vendor-extended operator? */
if (c0 == 'v' && IS_DIGIT (c1))
{
@@ -1652,6 +1660,16 @@ demangle_operator_name (dm, short_name, num_args)
return STATUS_OK;
}
+ /* Is it the sizeof variant that takes a type? */
+ if (c0 == 's' && c1 == 't')
+ {
+ RETURN_IF_ERROR (result_add (dm, " sizeof"));
+ *num_args = 1;
+ if (type_arg)
+ *type_arg = 1;
+ return STATUS_OK;
+ }
+
/* Perform a binary search for the operator code. */
while (1)
{
@@ -3154,6 +3172,7 @@ demangle_expression (dm)
/* An operator expression. */
{
int num_args;
+ int type_arg;
status_t status = STATUS_OK;
dyn_string_t operator_name;
@@ -3161,7 +3180,8 @@ demangle_expression (dm)
operations in infix notation, capture the operator name
first. */
RETURN_IF_ERROR (result_push (dm));
- RETURN_IF_ERROR (demangle_operator_name (dm, 1, &num_args));
+ RETURN_IF_ERROR (demangle_operator_name (dm, 1, &num_args,
+ &type_arg));
operator_name = (dyn_string_t) result_pop (dm);
/* If it's binary, do an operand first. */
@@ -3182,7 +3202,10 @@ demangle_expression (dm)
/* Emit its second (if binary) or only (if unary) operand. */
RETURN_IF_ERROR (result_add_char (dm, '('));
- RETURN_IF_ERROR (demangle_expression (dm));
+ if (type_arg)
+ RETURN_IF_ERROR (demangle_type (dm));
+ else
+ RETURN_IF_ERROR (demangle_expression (dm));
RETURN_IF_ERROR (result_add_char (dm, ')'));
/* The ternary operator takes a third operand. */
diff --git a/contrib/gcc/cp/ChangeLog b/contrib/gcc/cp/ChangeLog
index b2b71e9..e7c5b8c 100644
--- a/contrib/gcc/cp/ChangeLog
+++ b/contrib/gcc/cp/ChangeLog
@@ -1,3 +1,269 @@
+2002-08-27 Mark Mitchell <mark@codesourcery.com>
+
+ * cp-tree.h (warn_abi): Declare it.
+ * decl.c (warn_abi): Define it.
+ (cxx_decode_option): Set it.
+ * class.c (layout_virtual_bases): Warn about bugs in G++ that
+ result in incorrect object layouts.
+ (layout_class_type): Likewise.
+
+2002-08-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/5607
+ * search.c (check_final_overrider): No longer static.
+ * class.c (update_vtable_entry_for_fn): Call it.
+ * cp-tree.h: Adjust.
+
+ * cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
+ (cp_expr_size): New fn.
+ * call.c (convert_arg_to_ellipsis): Promote non-POD warning to error.
+ * typeck.c (build_modify_expr): Don't use save_expr on an lvalue.
+
+2002-08-14 Release Manager
+
+ * GCC 3.2 Released.
+
+2002-08-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR 7470.
+ C++ ABI change - vfunc ordering.
+ * class.c (add_virtual_function): Remove.
+ (dfs_modify_all_vtables): Take list of all declared
+ virtuals. Assign all that are not in primary base.
+ (check_for_override): Adjust comments.
+ (create_vtable_ptr): Take single list of virtuals. Build chain
+ of declared virtuals here.
+ (layout_class_type): Take single list of virtuals. Adjust.
+ (finish_struct_1): Keep virtuals on single list. Adjust.
+
+2002-07-30 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
+
+2002-07-17 Scott Snyder <snyder@fnal.gov>
+
+ PR c++/7320
+ * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
+
+2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
+
+ Repair damage on weak-impared targets caused by my previous patch.
+ * cp-tree.h (import_export_tinfo): Add parameter.
+ * decl2.c (import_export_tinfo): Add parameter, post adjust
+ DECL_COMDAT.
+ * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
+ import_export_tinfo.
+
+2002-06-30 Nathan Sidwell <nathan@codesourcery.com>
+
+ * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
+ (CPTI_TYPE_INFO_PTR_TYPE): ... this.
+ (tinfo_decl_type): Replace with ...
+ (type_info_ptr_type): ... this.
+ (import_export_tinfo): Declare.
+ (tinfo_decl_p): Rename to ...
+ (unemitted_tinfo_decl_p): ... this.
+ * decl2.c (import_export_decl): Break out tinfo handling into ...
+ (import_export_tinfo): ... here. New function.
+ (finish_file): Adjust.
+ * rtti.c (TINFO_REAL_NAME): New macro.
+ (init_rtti_processing): Create the tinfo types.
+ (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
+ (get_tinfo_decl): Adjust.
+ (get_tinfo_ptr): New function.
+ (get_type_id): Use it.
+ (tinfo_base_init): Create vtable decl here, if it doesn't exist.
+ (ptr_initializer): Use get_tinfo_ptr.
+ (ptm_initializer): Likewise.
+ (synthesize_tinfo_var): Break into ...
+ (get_pseudo_ti_init): ... this. Just create the initializer.
+ (get_pseudo_ti_desc): .. and this.
+ (create_real_tinfo_var): Remove.
+ (create_pseudo_type_info): Don't create the vtable decl here.
+ (get_vmi_pseudo_type_info): Remove.
+ (create_tinfo_types): Adjust.
+ (tinfo_decl_p): Rename to ...
+ (unemitted_tinfo_decl_p): ... here. Adjust.
+ (emit_tinfo_decl): Adjust. Create the initializer.
+
+2002-06-14 Jason Merrill <jason@redhat.com>
+
+ C++ ABI changes.
+ * class.c (build_base_field): Set DECL_PACKED.
+ (layout_class_type): Don't use tail padding of PODs.
+ * mangle.c (write_unqualified_name): Fix template conversion op
+ mangling.
+
+2002-05-18 Jason Merrill <jason@redhat.com>
+
+ PR c++/6611
+ * decl2.c (import_export_decl): If we clear
+ DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
+
+2002-05-14 Jason Merrill <jason@redhat.com>
+
+ * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
+ Do set DECL_COMDAT.
+ (synthesize_tinfo_var): Take the public decl.
+ (create_real_tinfo_var): Likewise. Check DECL_COMDAT.
+ (emit_tinfo_decl): Adjust. Call import_export_decl.
+ * decl2.c (import_export_decl): Simplify tinfo decl handling.
+
+2002-07-25 Release Manager
+
+ * GCC 3.1.1 Released.
+
+2002-07-12 Mark Mitchell <mark@codesourcery.com>
+
+ * class.c (add_method): Correct handling of conversion operators.
+
+2002-07-11 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/7224
+ * class.c (add_method): Simplify.
+
+2002-07-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/7279
+ * tree.c (cp_copy_res_decl_for_inlining): Also copy
+ TREE_ADDRESSABLE.
+
+2002-07-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/6255
+ * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
+ modifying the old one.
+
+2002-07-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ * pt.c (can_complete_type_without_circularity): Add static to
+ function definition.
+
+2002-07-05 Jim Wilson <wilson@redhat.com>
+
+ * decl.c (mark_named_label_lists): Add missing & in call to
+ mark_binding_level.
+
+2002-07-05 Jason Merrill <jason@redhat.com>
+
+ * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
+ pointers.
+
+ PR optimization/7145
+ * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
+
+2002-05-18 Jason Merrill <jason@redhat.com>
+
+ PR c++/6611
+ * decl2.c (import_export_decl): If we clear
+ DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
+
+2002-07-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/6944
+ * init.c (build_aggr_init): Remove qualifiers of init before calling
+ build_vec_init.
+ (build_vec_init): Flatten multi-dimensional array during cleanup.
+ (build_vec_delete_1): Abort if the type of each element is array.
+
+2002-07-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/6716
+ * pt.c (can_complete_type_without_circularity): New function.
+ (instantiate_class_template): Use it.
+ * typeck2.c (incomplete_type_error): Improve error message
+ due to incomplete fields.
+
+2002-07-01 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/7112
+ * mangle.c (write_expression): Add mangling for sizeof when
+ applied to a type.
+ * operators.def: Remove stale comment.
+
+2002-06-27 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/6695
+ * pt.c (tsubst_friend_class): Substitute into the context of the
+ friend before using it.
+
+2002-06-23 Matt Thomas <matt@3am-software.com>
+
+ * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
+ "#if VMS_TARGET".
+
+2002-06-20 Richard Henderson <rth@redhat.com>
+
+ PR c++/6747
+ * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
+ Call put_var_into_stack.
+
+2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/6892
+ * pt.c (tsubst_expr): Handle FILE_STMT.
+
+2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/6723
+ * pt.c (lookup_template_class): Don't build complete argument of
+ BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
+ argument.
+
+2002-06-16 Richard Henderson <rth@redhat.com>
+
+ PR opt/6793
+ * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
+ after template instantiation.
+
+2002-06-07 H.J. Lu (hjl@gnu.org)
+
+ * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
+
+2002-05-23 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
+ * cp-tree.h (cxx_post_options): Kill.
+ * cp-lex.c (cxx_post_options): Kill.
+
+2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
+
+2002-05-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/186, DR 259
+ * pt.c (do_decl_instantiation): Don't complain explicit
+ instantiation after explicit specialization.
+ (do_type_instantiation): Likewise.
+
+2002-05-09 Jason Merrill <jason@redhat.com>
+
+ * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
+
+2002-05-15 Alexandre Oliva <aoliva@redhat.com>
+
+ * cp-tree.h (struct lang_type): Added non_zero_init.
+ (CLASSTYPE_NON_ZERO_INIT_P): New macro.
+ (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
+ * class.c (check_field_decls): Test non_zero_init.
+ * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
+ zero-to-NULL conversions.
+ * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
+ type that needs zero-initialization without zeros.
+ (check_initializer_decl): Compute zero-initializer for types
+ that require a non-trivial one.
+ * init.c (build_forced_zero_init): New function.
+ (build_default_init): Use it.
+ * tree.c (zero_init_p): New function.
+ * typeck2.c (force_store_init_value): New function.
+ (process_init_constructor): Create non-trivial zero-initializers
+ for array members and class fields.
+
+2002-05-14 Release Manager
+
+ * GCC 3.1 Released.
+
2002-05-03 Jason Merrill <jason@redhat.com>
* decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
@@ -26,6 +292,7 @@
2002-04-30 Jason Merrill <jason@redhat.com>
+ PR debug/6436
* decl.c (grokdeclarator): Don't override TYPE_NAME of an
anonymous class with a typedef if there are attributes.
@@ -163,12 +430,12 @@
2002-04-11 Andrew Haley <aph@redhat.com>
- * typeck.c (type_after_usual_arithmetic_conversions):
- If two types have the same variant, return immediately.
- When two floating-point operands are the same precision:
- convert to float if one of the operands is float;
- if neither operand is one of the standard types, return the type
- of the first operand.
+ * typeck.c (type_after_usual_arithmetic_conversions):
+ If two types have the same variant, return immediately.
+ When two floating-point operands are the same precision:
+ convert to float if one of the operands is float;
+ if neither operand is one of the standard types, return the type
+ of the first operand.
2002-04-12 Richard Sandiford <rsandifo@redhat.com>
diff --git a/contrib/gcc/cp/Make-lang.in b/contrib/gcc/cp/Make-lang.in
index de4a372..df2de35 100644
--- a/contrib/gcc/cp/Make-lang.in
+++ b/contrib/gcc/cp/Make-lang.in
@@ -251,7 +251,7 @@ cp/spew.o: cp/spew.c $(CXX_TREE_H) cp/parse.h flags.h cp/lex.h toplev.h
cp/lex.o: cp/lex.c $(CXX_TREE_H) cp/parse.h flags.h cp/lex.h c-pragma.h \
toplev.h output.h mbchar.h $(GGC_H) input.h diagnostic.h cp/operators.def \
$(TM_P_H)
-cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) toplev.h langhooks.h langhooks-def.h \
+cp/cp-lang.o: cp/cp-lang.c $(CXX_TREE_H) toplev.h langhooks.h $(LANGHOOKS_DEF_H) \
c-common.h
cp/decl.o: cp/decl.c $(CXX_TREE_H) flags.h cp/lex.h cp/decl.h stack.h \
output.h $(EXPR_H) except.h toplev.h hash.h $(GGC_H) $(RTL_H) \
diff --git a/contrib/gcc/cp/call.c b/contrib/gcc/cp/call.c
index 5527066..c8dcaf0 100644
--- a/contrib/gcc/cp/call.c
+++ b/contrib/gcc/cp/call.c
@@ -4022,9 +4022,12 @@ convert_arg_to_ellipsis (arg)
if (arg != error_mark_node && ! pod_type_p (TREE_TYPE (arg)))
{
- /* Undefined behaviour [expr.call] 5.2.2/7. */
- warning ("cannot pass objects of non-POD type `%#T' through `...'",
- TREE_TYPE (arg));
+ /* Undefined behaviour [expr.call] 5.2.2/7. We used to just warn
+ here and do a bitwise copy, but now cp_expr_size will abort if we
+ try to do that. */
+ error ("cannot pass objects of non-POD type `%#T' through `...'",
+ TREE_TYPE (arg));
+ arg = error_mark_node;
}
return arg;
diff --git a/contrib/gcc/cp/class.c b/contrib/gcc/cp/class.c
index 82360b0..2395d79 100644
--- a/contrib/gcc/cp/class.c
+++ b/contrib/gcc/cp/class.c
@@ -114,7 +114,6 @@ static int build_primary_vtable PARAMS ((tree, tree));
static int build_secondary_vtable PARAMS ((tree, tree));
static void finish_vtbls PARAMS ((tree));
static void modify_vtable_entry PARAMS ((tree, tree, tree, tree, tree *));
-static void add_virtual_function PARAMS ((tree *, tree *, int *, tree, tree));
static tree delete_duplicate_fields_1 PARAMS ((tree, tree));
static void delete_duplicate_fields PARAMS ((tree));
static void finish_struct_bits PARAMS ((tree));
@@ -150,8 +149,8 @@ static void check_methods PARAMS ((tree));
static void remove_zero_width_bit_fields PARAMS ((tree));
static void check_bases PARAMS ((tree, int *, int *, int *));
static void check_bases_and_members PARAMS ((tree, int *));
-static tree create_vtable_ptr PARAMS ((tree, int *, int *, tree *, tree *));
-static void layout_class_type PARAMS ((tree, int *, int *, tree *, tree *));
+static tree create_vtable_ptr PARAMS ((tree, int *, int *, tree *));
+static void layout_class_type PARAMS ((tree, int *, int *, tree *));
static void fixup_pending_inline PARAMS ((tree));
static void fixup_inline_methods PARAMS ((tree));
static void set_primary_base PARAMS ((tree, tree, int *));
@@ -792,61 +791,6 @@ set_vindex (decl, vfuns_p)
? TARGET_VTABLE_USES_DESCRIPTORS : 1);
DECL_VINDEX (decl) = build_shared_int_cst (vindex);
}
-
-/* Add a virtual function to all the appropriate vtables for the class
- T. DECL_VINDEX(X) should be error_mark_node, if we want to
- allocate a new slot in our table. If it is error_mark_node, we
- know that no other function from another vtable is overridden by X.
- VFUNS_P keeps track of how many virtuals there are in our
- main vtable for the type, and we build upon the NEW_VIRTUALS list
- and return it. */
-
-static void
-add_virtual_function (new_virtuals_p, overridden_virtuals_p,
- vfuns_p, fndecl, t)
- tree *new_virtuals_p;
- tree *overridden_virtuals_p;
- int *vfuns_p;
- tree fndecl;
- tree t; /* Structure type. */
-{
- tree new_virtual;
-
- /* If this function doesn't override anything from a base class, we
- can just assign it a new DECL_VINDEX now. Otherwise, if it does
- override something, we keep it around and assign its DECL_VINDEX
- later, in modify_all_vtables. */
- if (TREE_CODE (DECL_VINDEX (fndecl)) == INTEGER_CST)
- /* We've already dealt with this function. */
- return;
-
- new_virtual = make_node (TREE_LIST);
- BV_FN (new_virtual) = fndecl;
- BV_DELTA (new_virtual) = integer_zero_node;
-
- if (DECL_VINDEX (fndecl) == error_mark_node)
- {
- /* FNDECL is a new virtual function; it doesn't override any
- virtual function in a base class. */
-
- /* We remember that this was the base sub-object for rtti. */
- CLASSTYPE_RTTI (t) = t;
-
- /* Now assign virtual dispatch information. */
- set_vindex (fndecl, vfuns_p);
- DECL_VIRTUAL_CONTEXT (fndecl) = t;
-
- /* Save the state we've computed on the NEW_VIRTUALS list. */
- TREE_CHAIN (new_virtual) = *new_virtuals_p;
- *new_virtuals_p = new_virtual;
- }
- else
- {
- /* FNDECL overrides a function from a base class. */
- TREE_CHAIN (new_virtual) = *overridden_virtuals_p;
- *overridden_virtuals_p = new_virtual;
- }
-}
/* Add method METHOD to class TYPE. If ERROR_P is true, we are adding
the method after the class has already been defined because a
@@ -973,69 +917,60 @@ add_method (type, method, error_p)
fns = OVL_NEXT (fns))
{
tree fn = OVL_CURRENT (fns);
-
+ tree parms1;
+ tree parms2;
+ bool same = 1;
+
if (TREE_CODE (fn) != TREE_CODE (method))
continue;
- if (TREE_CODE (method) != TEMPLATE_DECL)
+ /* [over.load] Member function declarations with the
+ same name and the same parameter types cannot be
+ overloaded if any of them is a static member
+ function declaration.
+
+ [namespace.udecl] When a using-declaration brings names
+ from a base class into a derived class scope, member
+ functions in the derived class override and/or hide member
+ functions with the same name and parameter types in a base
+ class (rather than conflicting). */
+ parms1 = TYPE_ARG_TYPES (TREE_TYPE (fn));
+ parms2 = TYPE_ARG_TYPES (TREE_TYPE (method));
+
+ /* Compare the quals on the 'this' parm. Don't compare
+ the whole types, as used functions are treated as
+ coming from the using class in overload resolution. */
+ if (! DECL_STATIC_FUNCTION_P (fn)
+ && ! DECL_STATIC_FUNCTION_P (method)
+ && (TYPE_QUALS (TREE_TYPE (TREE_VALUE (parms1)))
+ != TYPE_QUALS (TREE_TYPE (TREE_VALUE (parms2)))))
+ same = 0;
+ if (! DECL_STATIC_FUNCTION_P (fn))
+ parms1 = TREE_CHAIN (parms1);
+ if (! DECL_STATIC_FUNCTION_P (method))
+ parms2 = TREE_CHAIN (parms2);
+
+ if (same && compparms (parms1, parms2)
+ && (!DECL_CONV_FN_P (fn)
+ || same_type_p (TREE_TYPE (TREE_TYPE (fn)),
+ TREE_TYPE (TREE_TYPE (method)))))
{
- /* [over.load] Member function declarations with the
- same name and the same parameter types cannot be
- overloaded if any of them is a static member
- function declaration.
-
- [namespace.udecl] When a using-declaration brings names
- from a base class into a derived class scope, member
- functions in the derived class override and/or hide member
- functions with the same name and parameter types in a base
- class (rather than conflicting). */
- if ((DECL_STATIC_FUNCTION_P (fn)
- != DECL_STATIC_FUNCTION_P (method))
- || using)
+ if (using && DECL_CONTEXT (fn) == type)
+ /* Defer to the local function. */
+ return;
+ else
{
- tree parms1 = TYPE_ARG_TYPES (TREE_TYPE (fn));
- tree parms2 = TYPE_ARG_TYPES (TREE_TYPE (method));
- int same = 1;
-
- /* Compare the quals on the 'this' parm. Don't compare
- the whole types, as used functions are treated as
- coming from the using class in overload resolution. */
- if (using
- && ! DECL_STATIC_FUNCTION_P (fn)
- && ! DECL_STATIC_FUNCTION_P (method)
- && (TYPE_QUALS (TREE_TYPE (TREE_VALUE (parms1)))
- != TYPE_QUALS (TREE_TYPE (TREE_VALUE (parms2)))))
- same = 0;
- if (! DECL_STATIC_FUNCTION_P (fn))
- parms1 = TREE_CHAIN (parms1);
- if (! DECL_STATIC_FUNCTION_P (method))
- parms2 = TREE_CHAIN (parms2);
-
- if (same && compparms (parms1, parms2))
- {
- if (using && DECL_CONTEXT (fn) == type)
- /* Defer to the local function. */
- return;
- else
- error ("`%#D' and `%#D' cannot be overloaded",
- fn, method);
- }
+ cp_error_at ("`%#D' and `%#D' cannot be overloaded",
+ method, fn, method);
+
+ /* We don't call duplicate_decls here to merge
+ the declarations because that will confuse
+ things if the methods have inline
+ definitions. In particular, we will crash
+ while processing the definitions. */
+ return;
}
}
-
- if (!decls_match (fn, method))
- continue;
-
- /* There has already been a declaration of this method
- or member template. */
- cp_error_at ("`%D' has already been declared in `%T'",
- method, type);
-
- /* We don't call duplicate_decls here to merge the
- declarations because that will confuse things if the
- methods have inline definitions. In particular, we
- will crash while processing the definitions. */
- return;
}
}
@@ -2519,6 +2454,10 @@ update_vtable_entry_for_fn (t, binfo, fn, virtuals)
if (overrider == error_mark_node)
return;
+ /* Check for unsupported covariant returns again now that we've
+ calculated the base offsets. */
+ check_final_overrider (TREE_PURPOSE (overrider), fn);
+
/* Assume that we will produce a thunk that convert all the way to
the final overrider, and not to an intermediate virtual base. */
virtual_base = NULL_TREE;
@@ -2641,18 +2580,18 @@ dfs_modify_vtables (binfo, data)
/* Update all of the primary and secondary vtables for T. Create new
vtables as required, and initialize their RTTI information. Each
- of the functions in OVERRIDDEN_VIRTUALS overrides a virtual
- function from a base class; find and modify the appropriate entries
- to point to the overriding functions. Returns a list, in
- declaration order, of the functions that are overridden in this
- class, but do not appear in the primary base class vtable, and
- which should therefore be appended to the end of the vtable for T. */
+ of the functions in VIRTUALS is declared in T and may override a
+ virtual function from a base class; find and modify the appropriate
+ entries to point to the overriding functions. Returns a list, in
+ declaration order, of the virtual functions that are declared in T,
+ but do not appear in the primary base class vtable, and which
+ should therefore be appended to the end of the vtable for T. */
static tree
-modify_all_vtables (t, vfuns_p, overridden_virtuals)
+modify_all_vtables (t, vfuns_p, virtuals)
tree t;
int *vfuns_p;
- tree overridden_virtuals;
+ tree virtuals;
{
tree binfo = TYPE_BINFO (t);
tree *fnsp;
@@ -2664,14 +2603,16 @@ modify_all_vtables (t, vfuns_p, overridden_virtuals)
t);
dfs_walk (binfo, dfs_unmark, dfs_marked_real_bases_queue_p, t);
- /* Include overriding functions for secondary vtables in our primary
- vtable. */
- for (fnsp = &overridden_virtuals; *fnsp; )
+ /* Add virtual functions not already in our primary vtable. These
+ will be both those introduced by this class, and those overridden
+ from secondary bases. It does not include virtuals merely
+ inherited from secondary bases. */
+ for (fnsp = &virtuals; *fnsp; )
{
tree fn = TREE_VALUE (*fnsp);
- if (!BINFO_VIRTUALS (binfo)
- || !value_member (fn, BINFO_VIRTUALS (binfo)))
+ if (!value_member (fn, BINFO_VIRTUALS (binfo))
+ || DECL_VINDEX (fn) == error_mark_node)
{
/* Set the vtable index. */
set_vindex (fn, vfuns_p);
@@ -2684,8 +2625,7 @@ modify_all_vtables (t, vfuns_p, overridden_virtuals)
BV_DELTA (*fnsp) = integer_zero_node;
BV_VCALL_INDEX (*fnsp) = NULL_TREE;
- /* This is an overridden function not already in our
- vtable. Keep it. */
+ /* This is a function not already in our vtable. Keep it. */
fnsp = &TREE_CHAIN (*fnsp);
}
else
@@ -2693,7 +2633,7 @@ modify_all_vtables (t, vfuns_p, overridden_virtuals)
*fnsp = TREE_CHAIN (*fnsp);
}
- return overridden_virtuals;
+ return virtuals;
}
/* Here, we already know that they match in every respect.
@@ -2763,16 +2703,14 @@ check_for_override (decl, ctype)
|| IDENTIFIER_VIRTUAL_P (DECL_NAME (decl)))
&& look_for_overrides (ctype, decl)
&& !DECL_STATIC_FUNCTION_P (decl))
- {
- /* Set DECL_VINDEX to a value that is neither an
- INTEGER_CST nor the error_mark_node so that
- add_virtual_function will realize this is an
- overriding function. */
- DECL_VINDEX (decl) = decl;
- }
+ /* Set DECL_VINDEX to a value that is neither an INTEGER_CST nor
+ the error_mark_node so that we know it is an overriding
+ function. */
+ DECL_VINDEX (decl) = decl;
+
if (DECL_VIRTUAL_P (decl))
{
- if (DECL_VINDEX (decl) == NULL_TREE)
+ if (!DECL_VINDEX (decl))
DECL_VINDEX (decl) = error_mark_node;
IDENTIFIER_VIRTUAL_P (DECL_NAME (decl)) = 1;
}
@@ -3410,6 +3348,9 @@ check_field_decls (t, access_decls, empty_p,
to be allowed in POD structs. */
CLASSTYPE_NON_POD_P (t) = 1;
+ if (! zero_init_p (type))
+ CLASSTYPE_NON_ZERO_INIT_P (t) = 1;
+
/* If any field is const, the structure type is pseudo-const. */
if (CP_TYPE_CONST_P (type))
{
@@ -3836,6 +3777,8 @@ build_base_field (rli, binfo, empty_p, offsets, t)
DECL_SIZE_UNIT (decl) = CLASSTYPE_SIZE_UNIT (basetype);
DECL_ALIGN (decl) = CLASSTYPE_ALIGN (basetype);
DECL_USER_ALIGN (decl) = CLASSTYPE_USER_ALIGN (basetype);
+ /* Tell the backend not to round up to TYPE_ALIGN. */
+ DECL_PACKED (decl) = 1;
if (!integer_zerop (DECL_SIZE (decl)))
{
@@ -4389,31 +4332,37 @@ check_bases_and_members (t, empty_p)
accordingly. If a new vfield was created (because T doesn't have a
primary base class), then the newly created field is returned. It
is not added to the TYPE_FIELDS list; it is the caller's
- responsibility to do that. */
+ responsibility to do that. Accumulate declared virtual functions
+ on VIRTUALS_P. */
static tree
-create_vtable_ptr (t, empty_p, vfuns_p,
- new_virtuals_p, overridden_virtuals_p)
+create_vtable_ptr (t, empty_p, vfuns_p, virtuals_p)
tree t;
int *empty_p;
int *vfuns_p;
- tree *new_virtuals_p;
- tree *overridden_virtuals_p;
+ tree *virtuals_p;
{
tree fn;
- /* Loop over the virtual functions, adding them to our various
- vtables. */
+ /* Collect the virtual functions declared in T. */
for (fn = TYPE_METHODS (t); fn; fn = TREE_CHAIN (fn))
- if (DECL_VINDEX (fn) && !DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (fn))
- add_virtual_function (new_virtuals_p, overridden_virtuals_p,
- vfuns_p, fn, t);
+ if (DECL_VINDEX (fn) && !DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (fn)
+ && TREE_CODE (DECL_VINDEX (fn)) != INTEGER_CST)
+ {
+ tree new_virtual = make_node (TREE_LIST);
+
+ BV_FN (new_virtual) = fn;
+ BV_DELTA (new_virtual) = integer_zero_node;
+ TREE_CHAIN (new_virtual) = *virtuals_p;
+ *virtuals_p = new_virtual;
+ }
+
/* If we couldn't find an appropriate base class, create a new field
here. Even if there weren't any new virtual functions, we might need a
new virtual function table if we're supposed to include vptrs in
all classes that need them. */
- if (!TYPE_VFIELD (t) && (*vfuns_p || TYPE_CONTAINS_VPTR_P (t)))
+ if (!TYPE_VFIELD (t) && (*virtuals_p || TYPE_CONTAINS_VPTR_P (t)))
{
/* We build this decl with vtbl_ptr_type_node, which is a
`vtable_entry_type*'. It might seem more precise to use
@@ -4608,6 +4557,7 @@ layout_virtual_bases (t, offsets)
{
tree vbases, dsize;
unsigned HOST_WIDE_INT eoc;
+ bool first_vbase = true;
if (CLASSTYPE_N_BASECLASSES (t) == 0)
return;
@@ -4635,6 +4585,7 @@ layout_virtual_bases (t, offsets)
if (!TREE_VIA_VIRTUAL (vbases))
continue;
+
vbase = binfo_for_vbase (BINFO_TYPE (vbases), t);
if (!BINFO_PRIMARY_P (vbase))
@@ -4652,7 +4603,6 @@ layout_virtual_bases (t, offsets)
/* Add padding so that we can put the virtual base class at an
appropriately aligned offset. */
dsize = round_up (dsize, desired_align);
-
usize = size_binop (CEIL_DIV_EXPR, dsize, bitsize_unit_node);
/* We try to squish empty virtual bases in just like
@@ -4680,11 +4630,30 @@ layout_virtual_bases (t, offsets)
CLASSTYPE_SIZE (basetype)));
}
+ /* If the first virtual base might have been placed at a
+ lower address, had we started from CLASSTYPE_SIZE, rather
+ than TYPE_SIZE, issue a warning. There can be both false
+ positives and false negatives from this warning in rare
+ cases; to deal with all the possibilities would probably
+ require performing both layout algorithms and comparing
+ the results which is not particularly tractable. */
+ if (warn_abi
+ && first_vbase
+ && tree_int_cst_lt (size_binop (CEIL_DIV_EXPR,
+ round_up (CLASSTYPE_SIZE (t),
+ desired_align),
+ bitsize_unit_node),
+ BINFO_OFFSET (vbase)))
+ warning ("offset of virtual base `%T' is not ABI-compliant and may change in a future version of GCC",
+ basetype);
+
/* Keep track of the offsets assigned to this virtual base. */
record_subobject_offsets (BINFO_TYPE (vbase),
BINFO_OFFSET (vbase),
offsets,
/*vbases_p=*/0);
+
+ first_vbase = false;
}
}
@@ -4805,16 +4774,14 @@ splay_tree_compare_integer_csts (k1, k2)
/* Calculate the TYPE_SIZE, TYPE_ALIGN, etc for T. Calculate
BINFO_OFFSETs for all of the base-classes. Position the vtable
- pointer. */
+ pointer. Accumulate declared virtual functions on VIRTUALS_P. */
static void
-layout_class_type (t, empty_p, vfuns_p,
- new_virtuals_p, overridden_virtuals_p)
+layout_class_type (t, empty_p, vfuns_p, virtuals_p)
tree t;
int *empty_p;
int *vfuns_p;
- tree *new_virtuals_p;
- tree *overridden_virtuals_p;
+ tree *virtuals_p;
{
tree non_static_data_members;
tree field;
@@ -4824,6 +4791,8 @@ layout_class_type (t, empty_p, vfuns_p,
/* Maps offsets (represented as INTEGER_CSTs) to a TREE_LIST of
types that appear at that offset. */
splay_tree empty_base_offsets;
+ /* True if the last field layed out was a bit-field. */
+ bool last_field_was_bitfield = false;
/* Keep track of the first non-static data member. */
non_static_data_members = TYPE_FIELDS (t);
@@ -4836,8 +4805,7 @@ layout_class_type (t, empty_p, vfuns_p,
determine_primary_base (t, vfuns_p);
/* Create a pointer to our virtual function table. */
- vptr = create_vtable_ptr (t, empty_p, vfuns_p,
- new_virtuals_p, overridden_virtuals_p);
+ vptr = create_vtable_ptr (t, empty_p, vfuns_p, virtuals_p);
/* The vptr is always the first thing in the class. */
if (vptr)
@@ -4914,6 +4882,18 @@ layout_class_type (t, empty_p, vfuns_p,
layout_nonempty_base_or_field (rli, field, NULL_TREE,
empty_base_offsets, t);
+ /* If a bit-field does not immediately follow another bit-field,
+ and yet it starts in the middle of a byte, we have failed to
+ comply with the ABI. */
+ if (warn_abi
+ && DECL_C_BIT_FIELD (field)
+ && !last_field_was_bitfield
+ && !integer_zerop (size_binop (TRUNC_MOD_EXPR,
+ DECL_FIELD_BIT_OFFSET (field),
+ bitsize_unit_node)))
+ cp_warning_at ("offset of `%D' is not ABI-compliant and may change in a future version of GCC",
+ field);
+
/* If we needed additional padding after this field, add it
now. */
if (padding)
@@ -4931,6 +4911,8 @@ layout_class_type (t, empty_p, vfuns_p,
NULL_TREE,
empty_base_offsets, t);
}
+
+ last_field_was_bitfield = DECL_C_BIT_FIELD (field);
}
/* It might be the case that we grew the class to allocate a
@@ -4977,6 +4959,12 @@ layout_class_type (t, empty_p, vfuns_p,
CLASSTYPE_SIZE (t) = bitsize_zero_node;
CLASSTYPE_SIZE_UNIT (t) = size_zero_node;
}
+ /* If this is a POD, we can't reuse its tail padding. */
+ else if (!CLASSTYPE_NON_POD_P (t))
+ {
+ CLASSTYPE_SIZE (t) = TYPE_SIZE (t);
+ CLASSTYPE_SIZE_UNIT (t) = TYPE_SIZE_UNIT (t);
+ }
else
{
CLASSTYPE_SIZE (t) = TYPE_BINFO_SIZE (t);
@@ -5038,15 +5026,8 @@ finish_struct_1 (t)
{
tree x;
int vfuns;
- /* The NEW_VIRTUALS is a TREE_LIST. The TREE_VALUE of each node is
- a FUNCTION_DECL. Each of these functions is a virtual function
- declared in T that does not override any virtual function from a
- base class. */
- tree new_virtuals = NULL_TREE;
- /* The OVERRIDDEN_VIRTUALS list is like the NEW_VIRTUALS list,
- except that each declaration here overrides the declaration from
- a base class. */
- tree overridden_virtuals = NULL_TREE;
+ /* A TREE_LIST. The TREE_VALUE of each node is a FUNCTION_DECL. */
+ tree virtuals = NULL_TREE;
int n_fields = 0;
tree vfield;
int empty = 1;
@@ -5076,8 +5057,7 @@ finish_struct_1 (t)
check_bases_and_members (t, &empty);
/* Layout the class itself. */
- layout_class_type (t, &empty, &vfuns,
- &new_virtuals, &overridden_virtuals);
+ layout_class_type (t, &empty, &vfuns, &virtuals);
/* Make sure that we get our own copy of the vfield FIELD_DECL. */
vfield = TYPE_VFIELD (t);
@@ -5101,8 +5081,7 @@ finish_struct_1 (t)
else
my_friendly_assert (!vfield || DECL_FIELD_CONTEXT (vfield) == t, 20010726);
- overridden_virtuals
- = modify_all_vtables (t, &vfuns, nreverse (overridden_virtuals));
+ virtuals = modify_all_vtables (t, &vfuns, nreverse (virtuals));
/* If we created a new vtbl pointer for this class, add it to the
list. */
@@ -5111,9 +5090,8 @@ finish_struct_1 (t)
= chainon (CLASSTYPE_VFIELDS (t), build_tree_list (NULL_TREE, t));
/* If necessary, create the primary vtable for this class. */
- if (new_virtuals || overridden_virtuals || TYPE_CONTAINS_VPTR_P (t))
+ if (virtuals || TYPE_CONTAINS_VPTR_P (t))
{
- new_virtuals = nreverse (new_virtuals);
/* We must enter these virtuals into the table. */
if (!CLASSTYPE_HAS_PRIMARY_BASE_P (t))
build_primary_vtable (NULL_TREE, t);
@@ -5126,7 +5104,6 @@ finish_struct_1 (t)
constructors might clobber the virtual function table. But
they don't if the derived class shares the exact vtable of the base
class. */
-
CLASSTYPE_NEEDS_VIRTUAL_REINIT (t) = 1;
}
/* If we didn't need a new vtable, see if we should copy one from
@@ -5152,14 +5129,8 @@ finish_struct_1 (t)
20000116);
CLASSTYPE_VSIZE (t) = vfuns;
- /* Entries for virtual functions defined in the primary base are
- followed by entries for new functions unique to this class. */
- TYPE_BINFO_VIRTUALS (t)
- = chainon (TYPE_BINFO_VIRTUALS (t), new_virtuals);
- /* Finally, add entries for functions that override virtuals
- from non-primary bases. */
- TYPE_BINFO_VIRTUALS (t)
- = chainon (TYPE_BINFO_VIRTUALS (t), overridden_virtuals);
+ /* Add entries for virtual functions introduced by this class. */
+ TYPE_BINFO_VIRTUALS (t) = chainon (TYPE_BINFO_VIRTUALS (t), virtuals);
}
finish_struct_bits (t);
diff --git a/contrib/gcc/cp/cp-lang.c b/contrib/gcc/cp/cp-lang.c
index c40330b..7b1d860 100644
--- a/contrib/gcc/cp/cp-lang.c
+++ b/contrib/gcc/cp/cp-lang.c
@@ -1,5 +1,5 @@
/* Language-dependent hooks for C++.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
Contributed by Alexandre Oliva <aoliva@redhat.com>
This file is part of GNU CC.
@@ -28,7 +28,8 @@ Boston, MA 02111-1307, USA. */
#include "langhooks.h"
#include "langhooks-def.h"
-static HOST_WIDE_INT cxx_get_alias_set PARAMS ((tree));
+static HOST_WIDE_INT cxx_get_alias_set PARAMS ((tree));
+static tree cp_expr_size PARAMS ((tree));
#undef LANG_HOOKS_NAME
#define LANG_HOOKS_NAME "GNU C++"
@@ -43,7 +44,7 @@ static HOST_WIDE_INT cxx_get_alias_set PARAMS ((tree));
#undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION cxx_decode_option
#undef LANG_HOOKS_POST_OPTIONS
-#define LANG_HOOKS_POST_OPTIONS cxx_post_options
+#define LANG_HOOKS_POST_OPTIONS c_common_post_options
#undef LANG_HOOKS_GET_ALIAS_SET
#define LANG_HOOKS_GET_ALIAS_SET cxx_get_alias_set
#undef LANG_HOOKS_EXPAND_CONSTANT
@@ -91,6 +92,8 @@ static HOST_WIDE_INT cxx_get_alias_set PARAMS ((tree));
#define LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN cp_dump_tree
#undef LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN
#define LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN cp_type_quals
+#undef LANG_HOOKS_EXPR_SIZE
+#define LANG_HOOKS_EXPR_SIZE cp_expr_size
/* Each front end provides its own hooks, for toplev.c. */
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
@@ -108,3 +111,28 @@ cxx_get_alias_set (t)
return c_common_get_alias_set (t);
}
+
+/* Langhook for expr_size: Tell the backend that the value of an expression
+ of non-POD class type does not include any tail padding; a derived class
+ might have allocated something there. */
+
+static tree
+cp_expr_size (exp)
+ tree exp;
+{
+ if (CLASS_TYPE_P (TREE_TYPE (exp)))
+ {
+ /* The backend should not be interested in the size of an expression
+ of a type with both of these set; all copies of such types must go
+ through a constructor or assignment op. */
+ if (TYPE_HAS_COMPLEX_INIT_REF (TREE_TYPE (exp))
+ && TYPE_HAS_COMPLEX_ASSIGN_REF (TREE_TYPE (exp)))
+ abort ();
+ /* This would be wrong for a type with virtual bases, but they are
+ caught by the abort above. */
+ return CLASSTYPE_SIZE_UNIT (TREE_TYPE (exp));
+ }
+ else
+ /* Use the default code. */
+ return lhd_expr_size (exp);
+}
diff --git a/contrib/gcc/cp/cp-tree.h b/contrib/gcc/cp/cp-tree.h
index 584491a..787114f 100644
--- a/contrib/gcc/cp/cp-tree.h
+++ b/contrib/gcc/cp/cp-tree.h
@@ -539,7 +539,7 @@ enum cp_tree_index
CPTI_STD,
CPTI_ABI,
CPTI_TYPE_INFO_TYPE,
- CPTI_TINFO_DECL_TYPE,
+ CPTI_TYPE_INFO_PTR_TYPE,
CPTI_ABORT_FNDECL,
CPTI_GLOBAL_DELETE_FNDECL,
CPTI_AGGR_TAG,
@@ -626,7 +626,7 @@ extern tree cp_global_trees[CPTI_MAX];
#define std_node cp_global_trees[CPTI_STD]
#define abi_node cp_global_trees[CPTI_ABI]
#define type_info_type_node cp_global_trees[CPTI_TYPE_INFO_TYPE]
-#define tinfo_decl_type cp_global_trees[CPTI_TINFO_DECL_TYPE]
+#define type_info_ptr_type cp_global_trees[CPTI_TYPE_INFO_PTR_TYPE]
#define abort_fndecl cp_global_trees[CPTI_ABORT_FNDECL]
#define global_delete_fndecl cp_global_trees[CPTI_GLOBAL_DELETE_FNDECL]
#define current_aggr cp_global_trees[CPTI_AGGR_TAG]
@@ -934,6 +934,11 @@ extern int flag_operator_names;
extern int flag_gnu_binutils;
+/* Nonzero means warn about things that will change when compiling
+ with an ABI-compliant compiler. */
+
+extern int warn_abi;
+
/* Nonzero means warn about implicit declarations. */
extern int warn_implicit;
@@ -1245,6 +1250,8 @@ struct lang_type
unsigned is_partial_instantiation : 1;
unsigned java_interface : 1;
+ unsigned non_zero_init : 1;
+
/* When adding a flag here, consider whether or not it ought to
apply to a template instance if it applies to the template. If
so, make sure to copy it in instantiate_class_template! */
@@ -1252,7 +1259,7 @@ struct lang_type
/* There are some bits left to fill out a 32-bit word. Keep track
of this by updating the size of this bitfield whenever you add or
remove a flag. */
- unsigned dummy : 8;
+ unsigned dummy : 7;
int vsize;
@@ -1500,9 +1507,14 @@ struct lang_type
#define CLASSTYPE_HAS_MUTABLE(NODE) (TYPE_LANG_SPECIFIC (NODE)->has_mutable)
#define TYPE_HAS_MUTABLE_P(NODE) (cp_has_mutable_p (NODE))
-/* Nonzero means that this class type is a non-POD class. */
+/* Nonzero means that this class type is a non-POD class. */
#define CLASSTYPE_NON_POD_P(NODE) (TYPE_LANG_SPECIFIC (NODE)->non_pod_class)
+/* Nonzero means that this class contains pod types whose default
+ initialization is not a zero initialization (namely, pointers to
+ data members). */
+#define CLASSTYPE_NON_ZERO_INIT_P(NODE) (TYPE_LANG_SPECIFIC (NODE)->non_zero_init)
+
/* Nonzero if this class is "nearly empty", i.e., contains only a
virtual function table pointer. */
#define CLASSTYPE_NEARLY_EMPTY_P(NODE) \
@@ -3812,6 +3824,7 @@ extern tree coerce_delete_type PARAMS ((tree));
extern void comdat_linkage PARAMS ((tree));
extern void import_export_vtable PARAMS ((tree, tree, int));
extern void import_export_decl PARAMS ((tree));
+extern void import_export_tinfo PARAMS ((tree, tree, int));
extern tree build_cleanup PARAMS ((tree));
extern void finish_file PARAMS ((void));
extern tree reparse_absdcl_as_expr PARAMS ((tree, tree));
@@ -3900,6 +3913,7 @@ extern tree build_aggr_init PARAMS ((tree, tree, int));
extern int is_aggr_type PARAMS ((tree, int));
extern tree get_aggr_from_typedef PARAMS ((tree, int));
extern tree get_type_value PARAMS ((tree));
+extern tree build_forced_zero_init PARAMS ((tree));
extern tree build_member_call PARAMS ((tree, tree, tree));
extern tree build_offset_ref PARAMS ((tree, tree));
extern tree resolve_offset_ref PARAMS ((tree));
@@ -3953,7 +3967,6 @@ extern int cp_type_qual_from_rid PARAMS ((tree));
extern const char *cxx_init PARAMS ((const char *));
extern void cxx_finish PARAMS ((void));
extern void cxx_init_options PARAMS ((void));
-extern void cxx_post_options PARAMS ((void));
/* in method.c */
extern void init_method PARAMS ((void));
@@ -4044,7 +4057,7 @@ extern tree get_tinfo_decl PARAMS((tree));
extern tree get_typeid PARAMS((tree));
extern tree build_dynamic_cast PARAMS((tree, tree));
extern void emit_support_tinfos PARAMS((void));
-extern int tinfo_decl_p PARAMS((tree, void *));
+extern int unemitted_tinfo_decl_p PARAMS((tree, void *));
extern int emit_tinfo_decl PARAMS((tree *, void *));
/* in search.c */
@@ -4076,6 +4089,7 @@ extern tree lookup_conversions PARAMS ((tree));
extern tree binfo_for_vtable PARAMS ((tree));
extern tree binfo_from_vbase PARAMS ((tree));
extern tree look_for_overrides_here PARAMS ((tree, tree));
+extern int check_final_overrider PARAMS ((tree, tree));
extern tree dfs_walk PARAMS ((tree,
tree (*) (tree, void *),
tree (*) (tree, void *),
@@ -4212,6 +4226,7 @@ extern void end_input PARAMS ((void));
/* in tree.c */
extern void init_tree PARAMS ((void));
extern int pod_type_p PARAMS ((tree));
+extern int zero_init_p PARAMS ((tree));
extern tree canonical_type_variant PARAMS ((tree));
extern void unshare_base_binfos PARAMS ((tree));
extern int member_p PARAMS ((tree));
@@ -4357,6 +4372,7 @@ extern int abstract_virtuals_error PARAMS ((tree, tree));
#define my_friendly_assert(EXP, N) (void) \
(((EXP) == 0) ? (fancy_abort (__FILE__, __LINE__, __FUNCTION__), 0) : 0)
+extern tree force_store_init_value PARAMS ((tree, tree));
extern tree store_init_value PARAMS ((tree, tree));
extern tree digest_init PARAMS ((tree, tree, tree *));
extern tree build_scoped_ref PARAMS ((tree, tree));
diff --git a/contrib/gcc/cp/cvt.c b/contrib/gcc/cp/cvt.c
index 41cf21f..9b4f68f 100644
--- a/contrib/gcc/cp/cvt.c
+++ b/contrib/gcc/cp/cvt.c
@@ -1,6 +1,6 @@
/* Language-level data type conversion for GNU C++.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -249,6 +249,8 @@ cp_convert_to_pointer (type, expr, force)
else
expr = build_int_2 (0, 0);
TREE_TYPE (expr) = type;
+ /* Fix up the representation of -1 if appropriate. */
+ force_fit_type (expr, 0);
return expr;
}
@@ -285,13 +287,6 @@ convert_to_pointer_force (type, expr)
register tree intype = TREE_TYPE (expr);
register enum tree_code form = TREE_CODE (intype);
- if (integer_zerop (expr))
- {
- expr = build_int_2 (0, 0);
- TREE_TYPE (expr) = type;
- return expr;
- }
-
if (form == POINTER_TYPE)
{
intype = TYPE_MAIN_VARIANT (intype);
diff --git a/contrib/gcc/cp/decl.c b/contrib/gcc/cp/decl.c
index ebff32f..82ec357 100644
--- a/contrib/gcc/cp/decl.c
+++ b/contrib/gcc/cp/decl.c
@@ -1970,7 +1970,7 @@ mark_named_label_lists (labs, uses)
for (; l; l = l->next)
{
ggc_mark (l);
- mark_binding_level (l->binding_level);
+ mark_binding_level (&l->binding_level);
ggc_mark_tree (l->old_value);
ggc_mark_tree (l->label_decl);
ggc_mark_tree (l->bad_decls);
@@ -6101,7 +6101,13 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only)
if (got_scope && got_scope != type
&& val && TREE_CODE (val) == TYPE_DECL
&& TREE_CODE (TREE_TYPE (val)) == TYPENAME_TYPE)
- TYPE_CONTEXT (TREE_TYPE (val)) = got_scope;
+ {
+ val = TREE_TYPE (val);
+ val = build_typename_type (got_scope, name,
+ TYPENAME_TYPE_FULLNAME (val),
+ TREE_TYPE (val));
+ val = TYPE_STUB_DECL (val);
+ }
}
}
else
@@ -7605,7 +7611,13 @@ obscure_complex_init (decl, init)
NULL_TREE);
else
#endif
- DECL_INITIAL (decl) = error_mark_node;
+ {
+ if (zero_init_p (TREE_TYPE (decl)))
+ DECL_INITIAL (decl) = error_mark_node;
+ /* Otherwise, force_store_init_value will have already stored a
+ zero-init initializer in DECL_INITIAL, that should be
+ retained. */
+ }
return init;
}
@@ -7851,8 +7863,16 @@ check_initializer (decl, init)
if (init)
init = obscure_complex_init (decl, init);
}
+ else if (!DECL_EXTERNAL (decl) && !zero_init_p (type))
+ {
+ force_store_init_value (decl, build_forced_zero_init (type));
+
+ if (init)
+ goto process_init;
+ }
else if (init)
{
+ process_init:
if (TYPE_HAS_CONSTRUCTOR (type) || TYPE_NEEDS_CONSTRUCTING (type))
{
if (TREE_CODE (type) == ARRAY_TYPE)
@@ -14222,7 +14242,7 @@ finish_function (flags)
if (DECL_MAIN_P (current_function_decl))
{
/* Make it so that `main' always returns 0 by default. */
-#ifdef VMS_TARGET
+#if VMS_TARGET
finish_return_stmt (integer_one_node);
#else
finish_return_stmt (integer_zero_node);
diff --git a/contrib/gcc/cp/decl2.c b/contrib/gcc/cp/decl2.c
index c419d55..09a30f4 100644
--- a/contrib/gcc/cp/decl2.c
+++ b/contrib/gcc/cp/decl2.c
@@ -172,6 +172,11 @@ int flag_implicit_templates = 1;
int flag_implicit_inline_templates = 1;
+/* Nonzero means warn about things that will change when compiling
+ with an ABI-compliant compiler. */
+
+int warn_abi = 0;
+
/* Nonzero means warn about implicit declarations. */
int warn_implicit = 1;
@@ -376,7 +381,7 @@ int flag_weak = 1;
/* Nonzero to use __cxa_atexit, rather than atexit, to register
destructors for local statics and global objects. */
-int flag_use_cxa_atexit;
+int flag_use_cxa_atexit = DEFAULT_USE_CXA_ATEXIT;
/* Maximum template instantiation depth. This limit is rather
arbitrary, but it exists to limit the time it takes to notice
@@ -600,7 +605,9 @@ cxx_decode_option (argc, argv)
if (p[0] == 'n' && p[1] == 'o' && p[2] == '-')
setting = 0, p += 3;
- if (!strcmp (p, "implicit"))
+ if (!strcmp (p, "abi"))
+ warn_abi = setting;
+ else if (!strcmp (p, "implicit"))
warn_implicit = setting;
else if (!strcmp (p, "long-long"))
warn_long_long = setting;
@@ -2497,7 +2504,10 @@ import_export_decl (decl)
comdat_linkage (decl);
}
else
- DECL_NOT_REALLY_EXTERN (decl) = 0;
+ {
+ DECL_EXTERNAL (decl) = 1;
+ DECL_NOT_REALLY_EXTERN (decl) = 0;
+ }
}
else if (DECL_FUNCTION_MEMBER_P (decl))
{
@@ -2513,6 +2523,9 @@ import_export_decl (decl)
&& ! flag_implement_inlines
&& !DECL_VINDEX (decl)));
+ if (!DECL_NOT_REALLY_EXTERN (decl))
+ DECL_EXTERNAL (decl) = 1;
+
/* Always make artificials weak. */
if (DECL_ARTIFICIAL (decl) && flag_weak)
comdat_linkage (decl);
@@ -2523,48 +2536,53 @@ import_export_decl (decl)
else
comdat_linkage (decl);
}
- else if (tinfo_decl_p (decl, 0))
- {
- tree ctype = TREE_TYPE (DECL_NAME (decl));
-
- if (IS_AGGR_TYPE (ctype))
- import_export_class (ctype);
-
- if (IS_AGGR_TYPE (ctype) && CLASSTYPE_INTERFACE_KNOWN (ctype)
- && TYPE_POLYMORPHIC_P (ctype)
- /* If -fno-rtti, we're not necessarily emitting this stuff with
- the class, so go ahead and emit it now. This can happen
- when a class is used in exception handling. */
- && flag_rtti
- /* If the type is a cv-qualified variant of a type, then we
- must emit the tinfo function in this translation unit
- since it will not be emitted when the vtable for the type
- is output (which is when the unqualified version is
- generated). */
- && same_type_p (ctype, TYPE_MAIN_VARIANT (ctype)))
- {
- DECL_NOT_REALLY_EXTERN (decl)
- = ! (CLASSTYPE_INTERFACE_ONLY (ctype)
- || (DECL_DECLARED_INLINE_P (decl)
- && ! flag_implement_inlines
- && !DECL_VINDEX (decl)));
-
- /* Always make artificials weak. */
- if (flag_weak)
- comdat_linkage (decl);
- }
- else if (TYPE_BUILT_IN (ctype)
- && same_type_p (ctype, TYPE_MAIN_VARIANT (ctype)))
- DECL_NOT_REALLY_EXTERN (decl) = 0;
- else
- comdat_linkage (decl);
- }
else
comdat_linkage (decl);
DECL_INTERFACE_KNOWN (decl) = 1;
}
+/* Here, we only decide whether or not the tinfo node should be
+ emitted with the vtable. IS_IN_LIBRARY is non-zero iff the
+ typeinfo for TYPE should be in the runtime library. */
+
+void
+import_export_tinfo (decl, type, is_in_library)
+ tree decl;
+ tree type;
+ int is_in_library;
+{
+ if (DECL_INTERFACE_KNOWN (decl))
+ return;
+
+ if (IS_AGGR_TYPE (type))
+ import_export_class (type);
+
+ if (IS_AGGR_TYPE (type) && CLASSTYPE_INTERFACE_KNOWN (type)
+ && TYPE_POLYMORPHIC_P (type)
+ /* If -fno-rtti, we're not necessarily emitting this stuff with
+ the class, so go ahead and emit it now. This can happen when
+ a class is used in exception handling. */
+ && flag_rtti)
+ {
+ DECL_NOT_REALLY_EXTERN (decl) = !CLASSTYPE_INTERFACE_ONLY (type);
+ DECL_COMDAT (decl) = 0;
+ }
+ else
+ {
+ DECL_NOT_REALLY_EXTERN (decl) = 1;
+ DECL_COMDAT (decl) = 1;
+ }
+
+ /* Now override some cases. */
+ if (flag_weak)
+ DECL_COMDAT (decl) = 1;
+ else if (is_in_library)
+ DECL_COMDAT (decl) = 0;
+
+ DECL_INTERFACE_KNOWN (decl) = 1;
+}
+
tree
build_cleanup (decl)
tree decl;
@@ -3358,7 +3376,7 @@ finish_file ()
/* Write out needed type info variables. Writing out one variable
might cause others to be needed. */
- if (walk_globals (tinfo_decl_p, emit_tinfo_decl, /*data=*/0))
+ if (walk_globals (unemitted_tinfo_decl_p, emit_tinfo_decl, /*data=*/0))
reconsider = 1;
/* The list of objects with static storage duration is built up
diff --git a/contrib/gcc/cp/error.c b/contrib/gcc/cp/error.c
index aa075ee..8a05558 100644
--- a/contrib/gcc/cp/error.c
+++ b/contrib/gcc/cp/error.c
@@ -474,7 +474,7 @@ dump_type (t, flags)
case TYPEOF_TYPE:
output_add_string (scratch_buffer, "__typeof (");
dump_expr (TYPE_FIELDS (t), flags & ~TFF_EXPR_IN_PARENS);
- print_left_paren (scratch_buffer);
+ print_right_paren (scratch_buffer);
break;
default:
diff --git a/contrib/gcc/cp/init.c b/contrib/gcc/cp/init.c
index 4cb0dab..369e511 100644
--- a/contrib/gcc/cp/init.c
+++ b/contrib/gcc/cp/init.c
@@ -1,6 +1,6 @@
/* Handle initialization things in C++.
Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -176,6 +176,44 @@ initialize_vtbl_ptrs (addr)
dfs_marked_real_bases_queue_p, type);
}
+/* Types containing pointers to data members cannot be
+ zero-initialized with zeros, because the NULL value for such
+ pointers is -1.
+
+ TYPE is a type that requires such zero initialization. The
+ returned value is the initializer. */
+
+tree
+build_forced_zero_init (type)
+ tree type;
+{
+ tree init = NULL;
+
+ if (AGGREGATE_TYPE_P (type) && !TYPE_PTRMEMFUNC_P (type))
+ {
+ /* This is a default initialization of an aggregate, but not one of
+ non-POD class type. We cleverly notice that the initialization
+ rules in such a case are the same as for initialization with an
+ empty brace-initialization list. */
+ init = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, NULL_TREE);
+ }
+ else if (TREE_CODE (type) == REFERENCE_TYPE)
+ /* --if T is a reference type, no initialization is performed. */
+ return NULL_TREE;
+ else
+ {
+ init = integer_zero_node;
+
+ if (TREE_CODE (type) == ENUMERAL_TYPE)
+ /* We must make enumeral types the right type. */
+ init = fold (build1 (NOP_EXPR, type, init));
+ }
+
+ init = digest_init (type, init, 0);
+
+ return init;
+}
+
/* [dcl.init]:
To default-initialize an object of type T means:
@@ -202,28 +240,8 @@ build_default_init (type)
anything with a CONSTRUCTOR for arrays here, as that would imply
copy-initialization. */
return NULL_TREE;
- else if (AGGREGATE_TYPE_P (type) && !TYPE_PTRMEMFUNC_P (type))
- {
- /* This is a default initialization of an aggregate, but not one of
- non-POD class type. We cleverly notice that the initialization
- rules in such a case are the same as for initialization with an
- empty brace-initialization list. */
- init = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, NULL_TREE);
- }
- else if (TREE_CODE (type) == REFERENCE_TYPE)
- /* --if T is a reference type, no initialization is performed. */
- return NULL_TREE;
- else
- {
- init = integer_zero_node;
-
- if (TREE_CODE (type) == ENUMERAL_TYPE)
- /* We must make enumeral types the right type. */
- init = fold (build1 (NOP_EXPR, type, init));
- }
- init = digest_init (type, init, 0);
- return init;
+ return build_forced_zero_init (type);
}
/* Subroutine of emit_base_init. */
@@ -1165,11 +1183,9 @@ build_aggr_init (exp, init, flags)
return error_mark_node;
}
if (cp_type_quals (type) != TYPE_UNQUALIFIED)
- {
- TREE_TYPE (exp) = TYPE_MAIN_VARIANT (type);
- if (init)
- TREE_TYPE (init) = TYPE_MAIN_VARIANT (itype);
- }
+ TREE_TYPE (exp) = TYPE_MAIN_VARIANT (type);
+ if (itype && cp_type_quals (itype) != TYPE_UNQUALIFIED)
+ TREE_TYPE (init) = TYPE_MAIN_VARIANT (itype);
stmt_expr = build_vec_init (exp, init,
init && same_type_p (TREE_TYPE (init),
TREE_TYPE (exp)));
@@ -2575,6 +2591,10 @@ build_vec_delete_1 (base, maxindex, type, auto_delete_vec, use_global_delete)
This is also the containing expression returned by this function. */
tree controller = NULL_TREE;
+ /* We should only have 1-D arrays here. */
+ if (TREE_CODE (type) == ARRAY_TYPE)
+ abort ();
+
if (! IS_AGGR_TYPE (type) || TYPE_HAS_TRIVIAL_DESTRUCTOR (type))
{
loop = integer_zero_node;
@@ -2988,12 +3008,20 @@ build_vec_init (base, init, from_array)
&& from_array != 2)
{
tree e;
+ tree m = cp_build_binary_op (MINUS_EXPR, maxindex, iterator);
+
+ /* Flatten multi-dimensional array since build_vec_delete only
+ expects one-dimensional array. */
+ if (TREE_CODE (type) == ARRAY_TYPE)
+ {
+ m = cp_build_binary_op (MULT_EXPR, m,
+ array_type_nelts_total (type));
+ type = strip_array_types (type);
+ }
finish_compound_stmt (/*has_no_scope=*/1, try_body);
finish_cleanup_try_block (try_block);
- e = build_vec_delete_1 (rval,
- cp_build_binary_op (MINUS_EXPR, maxindex,
- iterator),
+ e = build_vec_delete_1 (rval, m,
type,
sfk_base_destructor,
/*use_global_delete=*/0);
diff --git a/contrib/gcc/cp/lang-specs.h b/contrib/gcc/cp/lang-specs.h
index a8efd10..a2bdf90 100644
--- a/contrib/gcc/cp/lang-specs.h
+++ b/contrib/gcc/cp/lang-specs.h
@@ -38,14 +38,12 @@ Boston, MA 02111-1307, USA. */
"%{E|M|MM:cpp0 -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
%{!Wno-deprecated:-D__DEPRECATED}\
%{!fno-exceptions:-D__EXCEPTIONS}\
- -D__GXX_ABI_VERSION=100\
%{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\
%{!E:%{!M:%{!MM:\
%{save-temps|no-integrated-cpp:cpp0 -lang-c++ \
%{!no-gcc:-D__GNUG__=%v1}\
%{!Wno-deprecated:-D__DEPRECATED}\
%{!fno-exceptions:-D__EXCEPTIONS}\
- -D__GXX_ABI_VERSION=100\
%{ansi:-D__STRICT_ANSI__ -trigraphs -$}\
%(cpp_options) %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\
cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
@@ -53,7 +51,6 @@ Boston, MA 02111-1307, USA. */
%{!no-gcc:-D__GNUG__=%v1} \
%{!Wno-deprecated:-D__DEPRECATED}\
%{!fno-exceptions:-D__EXCEPTIONS}\
- -D__GXX_ABI_VERSION=100\
%{ansi:-D__STRICT_ANSI__}}}\
%{ansi:-trigraphs -$}\
%(cc1_options) %2 %{+e1*}\
diff --git a/contrib/gcc/cp/lex.c b/contrib/gcc/cp/lex.c
index 61e34a8..d68957a 100644
--- a/contrib/gcc/cp/lex.c
+++ b/contrib/gcc/cp/lex.c
@@ -1,6 +1,6 @@
/* Separate lexical analyzer for GNU C++.
Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -237,13 +237,6 @@ static const char *const cplus_tree_code_name[] = {
};
#undef DEFTREECODE
-/* Post-switch processing. */
-void
-cxx_post_options ()
-{
- c_common_post_options ();
-}
-
/* Initialization before switch parsing. */
void
cxx_init_options ()
diff --git a/contrib/gcc/cp/mangle.c b/contrib/gcc/cp/mangle.c
index 2e79581..ba312b7 100644
--- a/contrib/gcc/cp/mangle.c
+++ b/contrib/gcc/cp/mangle.c
@@ -982,8 +982,17 @@ write_unqualified_name (decl)
{
/* Conversion operator. Handle it right here.
<operator> ::= cv <type> */
+ tree type;
+ if (decl_is_template_id (decl, NULL))
+ {
+ tree fn_type = get_mostly_instantiated_function_type (decl, NULL,
+ NULL);
+ type = TREE_TYPE (fn_type);
+ }
+ else
+ type = TREE_TYPE (DECL_NAME (decl));
write_string ("cv");
- write_type (TREE_TYPE (DECL_NAME (decl)));
+ write_type (type);
}
else if (DECL_OVERLOADED_OPERATOR_P (decl))
{
@@ -1818,6 +1827,12 @@ write_expression (expr)
write_mangled_name (expr);
write_char ('E');
}
+ else if (TREE_CODE (expr) == SIZEOF_EXPR
+ && TYPE_P (TREE_OPERAND (expr, 0)))
+ {
+ write_string ("st");
+ write_type (TREE_OPERAND (expr, 0));
+ }
else
{
int i;
@@ -1856,6 +1871,7 @@ write_expression (expr)
write_expression (TREE_OPERAND (expr, 0));
break;
+
/* Handle pointers-to-members specially. */
case SCOPE_REF:
write_type (TREE_OPERAND (expr, 0));
diff --git a/contrib/gcc/cp/operators.def b/contrib/gcc/cp/operators.def
index 775f59d..8504380 100644
--- a/contrib/gcc/cp/operators.def
+++ b/contrib/gcc/cp/operators.def
@@ -5,7 +5,7 @@
non-overloadable operators (like the `?:' ternary operator).
Writtey by Mark Mitchell <mark@codesourcery.com>
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -46,10 +46,6 @@ Boston, MA 02111-1307, USA. */
mangled under the new ABI. For `operator +', for example, this
would be "pl".
- OLD_MANGLING
-
- Analogous, but for the old ABI.
-
ARITY
The arity of the operator, or -1 if any arity is allowed. (As
diff --git a/contrib/gcc/cp/pt.c b/contrib/gcc/cp/pt.c
index 989cf1a..2180e4b 100644
--- a/contrib/gcc/cp/pt.c
+++ b/contrib/gcc/cp/pt.c
@@ -134,6 +134,7 @@ static tree build_template_decl PARAMS ((tree, tree));
static int mark_template_parm PARAMS ((tree, void *));
static tree tsubst_friend_function PARAMS ((tree, tree));
static tree tsubst_friend_class PARAMS ((tree, tree));
+static int can_complete_type_without_circularity PARAMS ((tree));
static tree get_bindings_real PARAMS ((tree, tree, tree, int, int, int));
static int template_decl_level PARAMS ((tree));
static tree maybe_get_template_decl_from_type_decl PARAMS ((tree));
@@ -3942,10 +3943,16 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope, complain)
The template parameter level of T and U are one level larger than
of TT. To proper process the default argument of U, say when an
instantiation `TT<int>' is seen, we need to build the full
- arguments containing {int} as the innermost level. Outer levels
- can be obtained from `current_template_args ()'. */
+ arguments containing {int} as the innermost level. Outer levels,
+ available when not appearing as default template argument, can be
+ obtained from `current_template_args ()'.
- if (processing_template_decl)
+ Suppose that TT is later substituted with std::vector. The above
+ instantiation is `TT<int, std::allocator<T> >' with TT at
+ level 1, and T at level 2, while the template arguments at level 1
+ becomes {std::vector} and the inner level 2 is {int}. */
+
+ if (current_template_parms)
arglist = add_to_template_args (current_template_args (), arglist);
arglist2 = coerce_template_parms (parmlist, arglist, template,
@@ -4805,7 +4812,7 @@ tsubst_friend_class (friend_tmpl, args)
if (TREE_CODE (context) == NAMESPACE_DECL)
push_nested_namespace (context);
else
- push_nested_class (context, 2);
+ push_nested_class (tsubst (context, args, tf_none, NULL_TREE), 2);
}
/* First, we look for a class template. */
@@ -4877,6 +4884,25 @@ tsubst_friend_class (friend_tmpl, args)
return friend_type;
}
+/* Returns zero if TYPE cannot be completed later due to circularity.
+ Otherwise returns one. */
+
+static int
+can_complete_type_without_circularity (type)
+ tree type;
+{
+ if (type == NULL_TREE || type == error_mark_node)
+ return 0;
+ else if (COMPLETE_TYPE_P (type))
+ return 1;
+ else if (TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type))
+ return can_complete_type_without_circularity (TREE_TYPE (type));
+ else if (CLASS_TYPE_P (type) && TYPE_BEING_DEFINED (TYPE_MAIN_VARIANT (type)))
+ return 0;
+ else
+ return 1;
+}
+
tree
instantiate_class_template (type)
tree type;
@@ -5197,7 +5223,20 @@ instantiate_class_template (type)
if (DECL_INITIALIZED_IN_CLASS_P (r))
check_static_variable_definition (r, TREE_TYPE (r));
}
-
+ else if (TREE_CODE (r) == FIELD_DECL)
+ {
+ /* Determine whether R has a valid type and can be
+ completed later. If R is invalid, then it is replaced
+ by error_mark_node so that it will not be added to
+ TYPE_FIELDS. */
+ tree rtype = TREE_TYPE (r);
+ if (!can_complete_type_without_circularity (rtype))
+ {
+ incomplete_type_error (r, rtype);
+ r = error_mark_node;
+ }
+ }
+
/* R will have a TREE_CHAIN if and only if it has already been
processed by finish_member_declaration. This can happen
if, for example, it is a TYPE_DECL for a class-scoped
@@ -5278,6 +5317,8 @@ instantiate_class_template (type)
--processing_template_decl;
}
+ /* Now that TYPE_FIELDS and TYPE_METHODS are set up. We can
+ instantiate templates used by this class. */
for (t = TYPE_FIELDS (type); t; t = TREE_CHAIN (t))
if (TREE_CODE (t) == FIELD_DECL)
{
@@ -7487,6 +7528,11 @@ tsubst_expr (t, args, complain, in_decl)
finish_label_stmt (DECL_NAME (LABEL_STMT_LABEL (t)));
break;
+ case FILE_STMT:
+ input_filename = FILE_STMT_FILENAME (t);
+ add_stmt (build_nt (FILE_STMT, FILE_STMT_FILENAME_NODE (t)));
+ break;
+
case GOTO_STMT:
prep_stmt (t);
tmp = GOTO_DESTINATION (t);
@@ -7502,12 +7548,13 @@ tsubst_expr (t, args, complain, in_decl)
case ASM_STMT:
prep_stmt (t);
- finish_asm_stmt (ASM_CV_QUAL (t),
- tsubst_expr (ASM_STRING (t), args, complain, in_decl),
- tsubst_expr (ASM_OUTPUTS (t), args, complain, in_decl),
- tsubst_expr (ASM_INPUTS (t), args, complain, in_decl),
- tsubst_expr (ASM_CLOBBERS (t), args, complain,
- in_decl));
+ tmp = finish_asm_stmt
+ (ASM_CV_QUAL (t),
+ tsubst_expr (ASM_STRING (t), args, complain, in_decl),
+ tsubst_expr (ASM_OUTPUTS (t), args, complain, in_decl),
+ tsubst_expr (ASM_INPUTS (t), args, complain, in_decl),
+ tsubst_expr (ASM_CLOBBERS (t), args, complain, in_decl));
+ ASM_INPUT_P (tmp) = ASM_INPUT_P (t);
break;
case TRY_BLOCK:
@@ -9501,12 +9548,16 @@ do_decl_instantiation (declspecs, declarator, storage)
if (DECL_TEMPLATE_SPECIALIZATION (result))
{
- /* [temp.spec]
+ /* DR 259 [temp.spec].
+
+ Both an explicit instantiation and a declaration of an explicit
+ specialization shall not appear in a program unless the explicit
+ instantiation follows a declaration of the explicit specialization.
- No program shall both explicitly instantiate and explicitly
- specialize a template. */
- pedwarn ("explicit instantiation of `%#D' after", result);
- cp_pedwarn_at ("explicit specialization here", result);
+ For a given set of template parameters, if an explicit
+ instantiation of a template appears after a declaration of an
+ explicit specialization for that template, the explicit
+ instantiation has no effect. */
return;
}
else if (DECL_EXPLICIT_INSTANTIATION (result))
@@ -9636,15 +9687,16 @@ do_type_instantiation (t, storage, complain)
if (CLASSTYPE_TEMPLATE_SPECIALIZATION (t))
{
- /* [temp.spec]
+ /* DR 259 [temp.spec].
- No program shall both explicitly instantiate and explicitly
- specialize a template. */
- if (complain & tf_error)
- {
- error ("explicit instantiation of `%#T' after", t);
- cp_error_at ("explicit specialization here", t);
- }
+ Both an explicit instantiation and a declaration of an explicit
+ specialization shall not appear in a program unless the explicit
+ instantiation follows a declaration of the explicit specialization.
+
+ For a given set of template parameters, if an explicit
+ instantiation of a template appears after a declaration of an
+ explicit specialization for that template, the explicit
+ instantiation has no effect. */
return;
}
else if (CLASSTYPE_EXPLICIT_INSTANTIATION (t))
diff --git a/contrib/gcc/cp/rtti.c b/contrib/gcc/cp/rtti.c
index 8c9b1c1..ae23234 100644
--- a/contrib/gcc/cp/rtti.c
+++ b/contrib/gcc/cp/rtti.c
@@ -1,5 +1,5 @@
/* RunTime Type Identification
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Mostly written by Jason Merrill (jason@cygnus.com).
@@ -30,16 +30,46 @@ Boston, MA 02111-1307, USA. */
#include "assert.h"
#include "toplev.h"
+/* C++ returns type information to the user in struct type_info
+ objects. We also use type information to implement dynamic_cast and
+ exception handlers. Type information for a particular type is
+ indicated with an ABI defined structure derived from type_info.
+ This would all be very straight forward, but for the fact that the
+ runtime library provides the definitions of the type_info structure
+ and the ABI defined derived classes. We cannot build declarations
+ of them directly in the compiler, but we need to layout objects of
+ their type. Somewhere we have to lie.
+
+ We define layout compatible POD-structs with compiler-defined names
+ and generate the appropriate initializations for them (complete
+ with explicit mention of their vtable). When we have to provide a
+ type_info to the user we reinterpret_cast the internal compiler
+ type to type_info. A well formed program can only explicitly refer
+ to the type_infos of complete types (& cv void). However, we chain
+ pointer type_infos to the pointed-to-type, and that can be
+ incomplete. We only need the addresses of such incomplete
+ type_info objects for static initialization.
+
+ The type information VAR_DECL of a type is held on the
+ IDENTIFIER_GLOBAL_VALUE of the type's mangled name. That VAR_DECL
+ will be the internal type. It will usually have the correct
+ internal type reflecting the kind of type it represents (pointer,
+ array, function, class, inherited class, etc). When the type it
+ represents is incomplete, it will have the internal type
+ corresponding to type_info. That will only happen at the end of
+ translation, when we are emitting the type info objects. */
+
/* Accessors for the type_info objects. We need to remember several things
about each of the type_info types. The global tree nodes such as
bltn_desc_type_node are TREE_LISTs, and these macros are used to access
the required information. */
/* The RECORD_TYPE of a type_info derived class. */
#define TINFO_PSEUDO_TYPE(NODE) TREE_TYPE (NODE)
-/* The VAR_DECL of the vtable for the type_info derived class. */
+/* The VAR_DECL of the vtable for the type_info derived class.
+ This is only filled in at the end of the translation. */
#define TINFO_VTABLE_DECL(NODE) TREE_VALUE (NODE)
-
-extern struct obstack permanent_obstack;
+/* The IDENTIFIER_NODE naming the real class. */
+#define TINFO_REAL_NAME(NODE) TREE_PURPOSE (NODE)
static tree build_headof PARAMS((tree));
static tree ifnonnull PARAMS((tree, tree));
@@ -48,7 +78,8 @@ static tree build_dynamic_cast_1 PARAMS((tree, tree));
static tree throw_bad_cast PARAMS((void));
static tree throw_bad_typeid PARAMS((void));
static tree get_tinfo_decl_dynamic PARAMS((tree));
-static bool typeid_ok_p PARAMS ((void));
+static tree get_tinfo_ptr PARAMS((tree));
+static bool typeid_ok_p PARAMS((void));
static int qualifier_flags PARAMS((tree));
static int target_incomplete_p PARAMS((tree));
static tree tinfo_base_init PARAMS((tree, tree));
@@ -59,15 +90,21 @@ static tree dfs_class_hint_mark PARAMS ((tree, void *));
static tree dfs_class_hint_unmark PARAMS ((tree, void *));
static int class_hint_flags PARAMS((tree));
static tree class_initializer PARAMS((tree, tree, tree));
-static tree synthesize_tinfo_var PARAMS((tree, tree));
-static tree create_real_tinfo_var PARAMS((tree, tree, tree, tree, int));
static tree create_pseudo_type_info PARAMS((const char *, int, ...));
-static tree get_vmi_pseudo_type_info PARAMS((int));
+static tree get_pseudo_ti_init PARAMS ((tree, tree, int *));
+static tree get_pseudo_ti_desc PARAMS((tree));
static void create_tinfo_types PARAMS((void));
static int typeinfo_in_lib_p PARAMS((tree));
static int doing_runtime = 0;
+
+/* Declare language defined type_info type and a pointer to const
+ type_info. This is incomplete here, and will be completed when
+ the user #includes <typeinfo>. There are language defined
+ restrictions on what can be done until that is included. Create
+ the internal versions of the ABI types. */
+
void
init_rtti_processing ()
{
@@ -75,8 +112,11 @@ init_rtti_processing ()
type_info_type_node = xref_tag
(class_type_node, get_identifier ("type_info"), 1);
pop_namespace ();
- tinfo_decl_type =
- build_qualified_type (type_info_type_node, TYPE_QUAL_CONST);
+ type_info_ptr_type =
+ build_pointer_type
+ (build_qualified_type (type_info_type_node, TYPE_QUAL_CONST));
+
+ create_tinfo_types ();
}
/* Given the expression EXP of type `class *', return the head of the
@@ -183,13 +223,12 @@ get_tinfo_decl_dynamic (exp)
/* The RTTI information is at index -1. */
index = integer_minus_one_node;
t = build_vtbl_ref (exp, index);
- TREE_TYPE (t) = build_pointer_type (tinfo_decl_type);
+ TREE_TYPE (t) = type_info_ptr_type;
return t;
}
- /* otherwise return the type_info for the static type of the expr. */
- exp = get_tinfo_decl (TYPE_MAIN_VARIANT (type));
- return build_unary_op (ADDR_EXPR, exp, 0);
+ /* Otherwise return the type_info for the static type of the expr. */
+ return get_tinfo_ptr (TYPE_MAIN_VARIANT (type));
}
static bool
@@ -263,9 +302,9 @@ tinfo_name (type)
return name_string;
}
-/* Returns a decl for the type_info variable for TYPE. You must
- arrange that the decl is mark_used, if actually use it --- decls in
- vtables are only used if the vtable is output. */
+/* Return a VAR_DECL for the internal ABI defined type_info object for
+ TYPE. You must arrange that the decl is mark_used, if actually use
+ it --- decls in vtables are only used if the vtable is output. */
tree
get_tinfo_decl (type)
@@ -278,7 +317,7 @@ get_tinfo_decl (type)
&& TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)
{
error ("cannot create type information for type `%T' because its size is variable",
- type);
+ type);
return error_mark_node;
}
@@ -291,37 +330,45 @@ get_tinfo_decl (type)
name = mangle_typeinfo_for_type (type);
d = IDENTIFIER_GLOBAL_VALUE (name);
- if (d)
- /* OK */;
- else
+ if (!d)
{
- /* The tinfo decl is the type_info object itself. We make all
- tinfo objects look as type_info, even though they will end up
- being a subclass of that when emitted. This means that we'll
- erroneously think we know the dynamic type -- be careful in the
- runtime. */
- d = build_lang_decl (VAR_DECL, name, tinfo_decl_type);
+ tree var_desc = get_pseudo_ti_desc (type);
+
+ d = build_lang_decl (VAR_DECL, name, TINFO_PSEUDO_TYPE (var_desc));
DECL_ARTIFICIAL (d) = 1;
- DECL_ALIGN (d) = TYPE_ALIGN (ptr_type_node);
- DECL_USER_ALIGN (d) = 0;
TREE_READONLY (d) = 1;
TREE_STATIC (d) = 1;
DECL_EXTERNAL (d) = 1;
- TREE_PUBLIC (d) = 1;
- if (flag_weak || !typeinfo_in_lib_p (type))
- comdat_linkage (d);
SET_DECL_ASSEMBLER_NAME (d, name);
+ DECL_COMDAT (d) = 1;
cp_finish_decl (d, NULL_TREE, NULL_TREE, 0);
pushdecl_top_level (d);
+
/* Remember the type it is for. */
TREE_TYPE (name) = type;
- TREE_USED (name) = 1;
}
+
return d;
}
+/* Return a pointer to a type_info object describing TYPE, suitably
+ cast to the language defined type. */
+
+static tree
+get_tinfo_ptr (type)
+ tree type;
+{
+ tree exp = get_tinfo_decl (type);
+
+ /* Convert to type_info type. */
+ exp = build_unary_op (ADDR_EXPR, exp, 0);
+ exp = ocp_convert (type_info_ptr_type, exp, CONV_REINTERPRET, 0);
+
+ return exp;
+}
+
/* Return the type_info object for TYPE. */
tree
@@ -350,7 +397,7 @@ get_typeid (type)
if (!type)
return error_mark_node;
- return get_tinfo_decl (type);
+ return build_indirect_ref (get_tinfo_ptr (type), NULL);
}
/* Check whether TEST is null before returning RESULT. If TEST is used in
@@ -683,6 +730,7 @@ tinfo_base_init (desc, target)
{
tree init = NULL_TREE;
tree name_decl;
+ tree vtable_ptr;
{
tree name_name;
@@ -710,12 +758,40 @@ tinfo_base_init (desc, target)
cp_finish_decl (name_decl, name_string, NULL_TREE, 0);
pushdecl_top_level (name_decl);
}
-
- if (TINFO_VTABLE_DECL (desc))
+
+ vtable_ptr = TINFO_VTABLE_DECL (desc);
+ if (!vtable_ptr)
{
- tree vtbl_ptr = TINFO_VTABLE_DECL (desc);
- init = tree_cons (NULL_TREE, vtbl_ptr, init);
+ tree real_type;
+
+ push_nested_namespace (abi_node);
+ real_type = xref_tag (class_type_node, TINFO_REAL_NAME (desc), 1);
+ pop_nested_namespace (abi_node);
+
+ if (!COMPLETE_TYPE_P (real_type))
+ {
+ /* We never saw a definition of this type, so we need to
+ tell the compiler that this is an exported class, as
+ indeed all of the __*_type_info classes are. */
+ SET_CLASSTYPE_INTERFACE_KNOWN (real_type);
+ CLASSTYPE_INTERFACE_ONLY (real_type) = 1;
+ }
+
+ vtable_ptr = get_vtable_decl (real_type, /*complete=*/1);
+ vtable_ptr = build_unary_op (ADDR_EXPR, vtable_ptr, 0);
+
+ /* We need to point into the middle of the vtable. */
+ vtable_ptr = build
+ (PLUS_EXPR, TREE_TYPE (vtable_ptr), vtable_ptr,
+ size_binop (MULT_EXPR,
+ size_int (2),
+ TYPE_SIZE_UNIT (vtable_entry_type)));
+ TREE_CONSTANT (vtable_ptr) = 1;
+
+ TINFO_VTABLE_DECL (desc) = vtable_ptr;
}
+
+ init = tree_cons (NULL_TREE, vtable_ptr, init);
init = tree_cons (NULL_TREE, decay_conversion (name_decl), init);
@@ -764,8 +840,7 @@ ptr_initializer (desc, target, non_public_ptr)
}
init = tree_cons (NULL_TREE, build_int_2 (flags, 0), init);
init = tree_cons (NULL_TREE,
- build_unary_op (ADDR_EXPR,
- get_tinfo_decl (TYPE_MAIN_VARIANT (to)), 0),
+ get_tinfo_ptr (TYPE_MAIN_VARIANT (to)),
init);
init = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, nreverse (init));
@@ -802,12 +877,11 @@ ptm_initializer (desc, target, non_public_ptr)
}
init = tree_cons (NULL_TREE, build_int_2 (flags, 0), init);
init = tree_cons (NULL_TREE,
- build_unary_op (ADDR_EXPR,
- get_tinfo_decl (TYPE_MAIN_VARIANT (to)), 0),
+ get_tinfo_ptr (TYPE_MAIN_VARIANT (to)),
init);
init = tree_cons (NULL_TREE,
- build_unary_op (ADDR_EXPR, get_tinfo_decl (klass), 0),
- init);
+ get_tinfo_ptr (klass),
+ init);
init = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, nreverse (init));
TREE_HAS_CONSTRUCTOR (init) = TREE_CONSTANT (init) = TREE_STATIC (init) = 1;
@@ -928,77 +1002,63 @@ typeinfo_in_lib_p (type)
}
}
-/* Generate a pseudo_type_info VAR_DECL suitable for the supplied
- TARGET_TYPE and given the REAL_NAME. This is the structure expected by
- the runtime, and therefore has additional fields. If we need not emit a
- definition (because the runtime must contain it), return NULL_TREE,
- otherwise return the VAR_DECL. */
+/* Generate the initializer for the type info describing
+ TYPE. VAR_DESC is a . NON_PUBLIC_P is set non-zero, if the VAR_DECL
+ should not be exported from this object file. This should only be
+ called at the end of translation, when we know that no further
+ types will be completed. */
static tree
-synthesize_tinfo_var (target_type, real_name)
- tree target_type;
- tree real_name;
+get_pseudo_ti_init (type, var_desc, non_public_p)
+ tree type;
+ tree var_desc;
+ int *non_public_p;
{
- tree var_init = NULL_TREE;
- tree var_type = NULL_TREE;
- int non_public = 0;
-
- switch (TREE_CODE (target_type))
+ my_friendly_assert (at_eof, 20021120);
+ switch (TREE_CODE (type))
{
case POINTER_TYPE:
- if (TYPE_PTRMEM_P (target_type))
- {
- var_type = ptm_desc_type_node;
- var_init = ptm_initializer (var_type, target_type, &non_public);
- }
+ if (TYPE_PTRMEM_P (type))
+ return ptm_initializer (var_desc, type, non_public_p);
else
- {
- if (typeinfo_in_lib_p (target_type) && !doing_runtime)
- /* These are in the runtime. */
- return NULL_TREE;
- var_type = ptr_desc_type_node;
- var_init = ptr_initializer (var_type, target_type, &non_public);
- }
+ return ptr_initializer (var_desc, type, non_public_p);
break;
case ENUMERAL_TYPE:
- var_type = enum_desc_type_node;
- var_init = generic_initializer (var_type, target_type);
+ return generic_initializer (var_desc, type);
break;
case FUNCTION_TYPE:
- var_type = func_desc_type_node;
- var_init = generic_initializer (var_type, target_type);
+ return generic_initializer (var_desc, type);
break;
case ARRAY_TYPE:
- var_type = ary_desc_type_node;
- var_init = generic_initializer (var_type, target_type);
+ return generic_initializer (var_desc, type);
break;
case UNION_TYPE:
case RECORD_TYPE:
- if (TYPE_PTRMEMFUNC_P (target_type))
- {
- var_type = ptm_desc_type_node;
- var_init = ptm_initializer (var_type, target_type, &non_public);
- }
- else if (!COMPLETE_TYPE_P (target_type))
- {
- /* Emit a non-public class_type_info. */
- non_public = 1;
- var_type = class_desc_type_node;
- var_init = class_initializer (var_type, target_type, NULL_TREE);
- }
- else if (!CLASSTYPE_N_BASECLASSES (target_type))
+ if (TYPE_PTRMEMFUNC_P (type))
+ return ptm_initializer (var_desc, type, non_public_p);
+ else if (var_desc == class_desc_type_node)
{
- var_type = class_desc_type_node;
- var_init = class_initializer (var_type, target_type, NULL_TREE);
+ if (!COMPLETE_TYPE_P (type))
+ /* Emit a non-public class_type_info. */
+ *non_public_p = 1;
+ return class_initializer (var_desc, type, NULL_TREE);
}
+ else if (var_desc == si_class_desc_type_node)
+ {
+ tree base_binfos = BINFO_BASETYPES (TYPE_BINFO (type));
+ tree base_binfo = TREE_VEC_ELT (base_binfos, 0);
+ tree tinfo = get_tinfo_ptr (BINFO_TYPE (base_binfo));
+ tree base_inits = tree_cons (NULL_TREE, tinfo, NULL_TREE);
+
+ return class_initializer (var_desc, type, base_inits);
+ }
else
{
- /* if this has a single public non-virtual base, it's easier */
- tree binfo = TYPE_BINFO (target_type);
+ int hint = class_hint_flags (type);
+ tree binfo = TYPE_BINFO (type);
int nbases = BINFO_N_BASETYPES (binfo);
tree base_binfos = BINFO_BASETYPES (binfo);
tree base_inits = NULL_TREE;
- int is_simple = nbases == 1;
int ix;
/* Generate the base information initializer. */
@@ -1012,28 +1072,19 @@ synthesize_tinfo_var (target_type, real_name)
if (TREE_PUBLIC (base_binfo))
flags |= 2;
- tinfo = get_tinfo_decl (BINFO_TYPE (base_binfo));
- tinfo = build_unary_op (ADDR_EXPR, tinfo, 0);
+ tinfo = get_tinfo_ptr (BINFO_TYPE (base_binfo));
if (TREE_VIA_VIRTUAL (base_binfo))
{
/* We store the vtable offset at which the virtual
base offset can be found. */
- offset = BINFO_VPTR_FIELD (binfo_for_vbase (BINFO_TYPE (base_binfo),
- target_type));
+ offset = BINFO_VPTR_FIELD
+ (binfo_for_vbase (BINFO_TYPE (base_binfo), type));
offset = convert (sizetype, offset);
flags |= 1;
}
else
offset = BINFO_OFFSET (base_binfo);
- /* is it a single public inheritance? */
- if (is_simple && flags == 2 && integer_zerop (offset))
- {
- base_inits = tree_cons (NULL_TREE, tinfo, NULL_TREE);
- break;
- }
- is_simple = 0;
-
/* combine offset and flags into one field */
offset = cp_build_binary_op (LSHIFT_EXPR, offset,
build_int_2 (8, 0));
@@ -1044,86 +1095,23 @@ synthesize_tinfo_var (target_type, real_name)
base_init = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, base_init);
base_inits = tree_cons (NULL_TREE, base_init, base_inits);
}
-
- if (is_simple)
- var_type = si_class_desc_type_node;
- else
- {
- int hint = class_hint_flags (target_type);
-
- base_inits = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, base_inits);
- base_inits = tree_cons (NULL_TREE, base_inits, NULL_TREE);
- /* Prepend the number of bases. */
- base_inits = tree_cons (NULL_TREE,
- build_int_2 (nbases, 0), base_inits);
- /* Prepend the hint flags. */
- base_inits = tree_cons (NULL_TREE,
- build_int_2 (hint, 0), base_inits);
- var_type = get_vmi_pseudo_type_info (nbases);
- }
- var_init = class_initializer (var_type, target_type, base_inits);
+ base_inits = build (CONSTRUCTOR,
+ NULL_TREE, NULL_TREE, base_inits);
+ base_inits = tree_cons (NULL_TREE, base_inits, NULL_TREE);
+ /* Prepend the number of bases. */
+ base_inits = tree_cons (NULL_TREE,
+ build_int_2 (nbases, 0), base_inits);
+ /* Prepend the hint flags. */
+ base_inits = tree_cons (NULL_TREE,
+ build_int_2 (hint, 0), base_inits);
+
+ return class_initializer (var_desc, type, base_inits);
}
break;
default:
- if (typeinfo_in_lib_p (target_type))
- {
- if (!doing_runtime)
- /* These are guaranteed to be in the runtime. */
- return NULL_TREE;
- var_type = bltn_desc_type_node;
- var_init = generic_initializer (var_type, target_type);
- break;
- }
- abort ();
+ return generic_initializer (var_desc, type);
}
-
- return create_real_tinfo_var (target_type,
- real_name, TINFO_PSEUDO_TYPE (var_type),
- var_init, non_public);
-}
-
-/* Create the real typeinfo variable. NON_PUBLIC indicates that we cannot
- make this variable public (comdat). */
-
-static tree
-create_real_tinfo_var (target_type, name, type, init, non_public)
- tree target_type;
- tree name;
- tree type;
- tree init;
- int non_public;
-{
- static int count = 0;
- tree decl;
- tree hidden_name;
- char hidden[30];
-
- /* We cannot give this the name NAME, as that already is globally
- bound to the tinfo_decl we originally created for this type in
- get_tinfo_decl. */
- sprintf (hidden, "__ti_%d", count++);
- hidden_name = get_identifier (hidden);
-
- decl = build_lang_decl (VAR_DECL, hidden_name,
- build_qualified_type (type, TYPE_QUAL_CONST));
- DECL_ARTIFICIAL (decl) = 1;
- TREE_READONLY (decl) = 1;
- TREE_STATIC (decl) = 1;
- DECL_EXTERNAL (decl) = 0;
-
- if (!non_public)
- {
- TREE_PUBLIC (decl) = 1;
- if (flag_weak || !typeinfo_in_lib_p (target_type))
- comdat_linkage (decl);
- }
- SET_DECL_ASSEMBLER_NAME (decl, name);
- DECL_INITIAL (decl) = init;
- cp_finish_decl (decl, init, NULL_TREE, 0);
- pushdecl_top_level (decl);
- TREE_USED (decl) = 1;
- return decl;
}
/* Generate the RECORD_TYPE containing the data layout of a type_info
@@ -1132,7 +1120,10 @@ create_real_tinfo_var (target_type, name, type, init, non_public)
type's vtable. We explicitly manage the vtable member, and name it for
real type as used in the runtime. The RECORD type has a different name,
to avoid collisions. Return a TREE_LIST who's TINFO_PSEUDO_TYPE
- is the generated type and TINFO_VTABLE_DECL is the vtable decl.
+ is the generated type and TINFO_VTABLE_NAME is the name of the
+ vtable. We have to delay generating the VAR_DECL of the vtable
+ until the end of the translation, when we'll have seen the library
+ definition, if there was one.
REAL_NAME is the runtime's name of the type. Trailing arguments are
additional FIELD_DECL's for the structure. The final argument must be
@@ -1141,9 +1132,8 @@ create_real_tinfo_var (target_type, name, type, init, non_public)
static tree
create_pseudo_type_info VPARAMS((const char *real_name, int ident, ...))
{
- tree real_type, pseudo_type;
+ tree pseudo_type;
char *pseudo_name;
- tree vtable_decl;
int ix;
tree fields[10];
tree field_decl;
@@ -1160,29 +1150,6 @@ create_pseudo_type_info VPARAMS((const char *real_name, int ident, ...))
if (ident)
sprintf (pseudo_name + strlen (pseudo_name), "%d", ident);
- /* Get the vtable decl. */
- real_type = xref_tag (class_type_node, get_identifier (real_name), 1);
- if (! TYPE_SIZE (real_type))
- {
- /* We never saw a definition of this type, so we need to tell the
- compiler that this is an exported class, as indeed all of the
- __*_type_info classes are. */
- SET_CLASSTYPE_INTERFACE_KNOWN (real_type);
- CLASSTYPE_INTERFACE_ONLY (real_type) = 1;
- }
-
- vtable_decl = get_vtable_decl (real_type, /*complete=*/1);
- vtable_decl = build_unary_op (ADDR_EXPR, vtable_decl, 0);
-
- /* We need to point into the middle of the vtable. */
- vtable_decl = build (PLUS_EXPR,
- TREE_TYPE (vtable_decl),
- vtable_decl,
- size_binop (MULT_EXPR,
- size_int (2),
- TYPE_SIZE_UNIT (vtable_entry_type)));
- TREE_CONSTANT (vtable_decl) = 1;
-
/* First field is the pseudo type_info base class. */
fields[0] = build_decl (FIELD_DECL, NULL_TREE, ti_desc_type_node);
@@ -1196,53 +1163,96 @@ create_pseudo_type_info VPARAMS((const char *real_name, int ident, ...))
TYPE_HAS_CONSTRUCTOR (pseudo_type) = 1;
result = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE);
- TINFO_VTABLE_DECL (result) = vtable_decl;
- TINFO_PSEUDO_TYPE (result) = pseudo_type;
+ TINFO_REAL_NAME (result) = get_identifier (real_name);
+ TINFO_PSEUDO_TYPE (result) =
+ cp_build_qualified_type (pseudo_type, TYPE_QUAL_CONST);
VA_CLOSE (ap);
return result;
}
-/* Return a descriptor for a vmi type with NUM_BASES bases. */
+/* Return a pseudo type info type node used to describe TYPE. TYPE
+ must be a complete type (or cv void), except at the end of the
+ translation unit. */
static tree
-get_vmi_pseudo_type_info (num_bases)
- int num_bases;
+get_pseudo_ti_desc (type)
+ tree type;
{
- tree desc;
- tree array_domain, base_array;
-
- if (TREE_VEC_LENGTH (vmi_class_desc_type_node) <= num_bases)
+ switch (TREE_CODE (type))
{
- int ix;
- tree extend = make_tree_vec (num_bases + 5);
-
- for (ix = TREE_VEC_LENGTH (vmi_class_desc_type_node); ix--;)
- TREE_VEC_ELT (extend, ix) = TREE_VEC_ELT (vmi_class_desc_type_node, ix);
- vmi_class_desc_type_node = extend;
- }
- desc = TREE_VEC_ELT (vmi_class_desc_type_node, num_bases);
-
- if (desc)
- return desc;
+ case POINTER_TYPE:
+ return TYPE_PTRMEM_P (type) ? ptm_desc_type_node : ptr_desc_type_node;
+ case ENUMERAL_TYPE:
+ return enum_desc_type_node;
+ case FUNCTION_TYPE:
+ return func_desc_type_node;
+ case ARRAY_TYPE:
+ return ary_desc_type_node;
+ case UNION_TYPE:
+ case RECORD_TYPE:
+ if (TYPE_PTRMEMFUNC_P (type))
+ return ptm_desc_type_node;
+ else if (!COMPLETE_TYPE_P (type))
+ {
+ my_friendly_assert (at_eof, 20020609);
+ return class_desc_type_node;
+ }
+ else if (!CLASSTYPE_N_BASECLASSES (type))
+ return class_desc_type_node;
+ else
+ {
+ tree base_binfo =
+ TREE_VEC_ELT (BINFO_BASETYPES (TYPE_BINFO (type)), 0);
+ int num_bases = BINFO_N_BASETYPES (TYPE_BINFO (type));
+
+ if (num_bases == 1
+ && TREE_PUBLIC (base_binfo)
+ && !TREE_VIA_VIRTUAL (base_binfo)
+ && integer_zerop (BINFO_OFFSET (base_binfo)))
+ /* single non-virtual public. */
+ return si_class_desc_type_node;
+ else
+ {
+ tree var_desc;
+ tree array_domain, base_array;
+
+ if (TREE_VEC_LENGTH (vmi_class_desc_type_node) <= num_bases)
+ {
+ int ix;
+ tree extend = make_tree_vec (num_bases + 5);
+
+ for (ix = TREE_VEC_LENGTH (vmi_class_desc_type_node); ix--;)
+ TREE_VEC_ELT (extend, ix)
+ = TREE_VEC_ELT (vmi_class_desc_type_node, ix);
+ vmi_class_desc_type_node = extend;
+ }
+ var_desc = TREE_VEC_ELT (vmi_class_desc_type_node, num_bases);
+ if (var_desc)
+ return var_desc;
- /* Add number of bases and trailing array of base_class_type_info. */
- array_domain = build_index_type (size_int (num_bases));
- base_array = build_array_type (base_desc_type_node, array_domain);
-
- push_nested_namespace (abi_node);
-
- desc = create_pseudo_type_info
- ("__vmi_class_type_info", num_bases,
- build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
- build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
- build_decl (FIELD_DECL, NULL_TREE, base_array),
- NULL);
-
- pop_nested_namespace (abi_node);
-
- TREE_VEC_ELT (vmi_class_desc_type_node, num_bases) = desc;
- return desc;
+ /* Add number of bases and trailing array of
+ base_class_type_info. */
+ array_domain = build_index_type (size_int (num_bases));
+ base_array =
+ build_array_type (base_desc_type_node, array_domain);
+
+ push_nested_namespace (abi_node);
+ var_desc = create_pseudo_type_info
+ ("__vmi_class_type_info", num_bases,
+ build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
+ build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
+ build_decl (FIELD_DECL, NULL_TREE, base_array),
+ NULL);
+ pop_nested_namespace (abi_node);
+
+ TREE_VEC_ELT (vmi_class_desc_type_node, num_bases) = var_desc;
+ return var_desc;
+ }
+ }
+ default:
+ return bltn_desc_type_node;
+ }
}
/* Make sure the required builtin types exist for generating the type_info
@@ -1251,15 +1261,9 @@ get_vmi_pseudo_type_info (num_bases)
static void
create_tinfo_types ()
{
- tree ptr_type_info;
-
- if (bltn_desc_type_node)
- return;
- push_nested_namespace (abi_node);
+ my_friendly_assert (!ti_desc_type_node, 20020609);
- ptr_type_info = build_pointer_type
- (build_qualified_type
- (type_info_type_node, TYPE_QUAL_CONST));
+ push_nested_namespace (abi_node);
/* Create the internal type_info structure. This is used as a base for
the other structures. */
@@ -1299,7 +1303,7 @@ create_tinfo_types ()
This is really a descendant of __class_type_info. */
si_class_desc_type_node = create_pseudo_type_info
("__si_class_type_info", 0,
- build_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
+ build_decl (FIELD_DECL, NULL_TREE, type_info_ptr_type),
NULL);
/* Base class internal helper. Pointer to base type, offset to base,
@@ -1307,7 +1311,7 @@ create_tinfo_types ()
{
tree fields[2];
- fields[0] = build_decl (FIELD_DECL, NULL_TREE, ptr_type_info);
+ fields[0] = build_decl (FIELD_DECL, NULL_TREE, type_info_ptr_type);
fields[1] = build_decl (FIELD_DECL, NULL_TREE, integer_types[itk_long]);
base_desc_type_node = make_aggr_type (RECORD_TYPE);
finish_builtin_type (base_desc_type_node, "__base_class_type_info_pseudo",
@@ -1324,7 +1328,7 @@ create_tinfo_types ()
ptr_desc_type_node = create_pseudo_type_info
("__pointer_type_info", 0,
build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
- build_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
+ build_decl (FIELD_DECL, NULL_TREE, type_info_ptr_type),
NULL);
/* Pointer to member data type_info. Add qualifications flags,
@@ -1333,8 +1337,8 @@ create_tinfo_types ()
ptm_desc_type_node = create_pseudo_type_info
("__pointer_to_member_type_info", 0,
build_decl (FIELD_DECL, NULL_TREE, integer_type_node),
- build_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
- build_decl (FIELD_DECL, NULL_TREE, ptr_type_info),
+ build_decl (FIELD_DECL, NULL_TREE, type_info_ptr_type),
+ build_decl (FIELD_DECL, NULL_TREE, type_info_ptr_type),
NULL);
pop_nested_namespace (abi_node);
@@ -1401,75 +1405,61 @@ emit_support_tinfos ()
definition emitted for it. */
int
-tinfo_decl_p (t, data)
+unemitted_tinfo_decl_p (t, data)
tree t;
void *data ATTRIBUTE_UNUSED;
{
- return TREE_CODE (t) == VAR_DECL
- && IDENTIFIER_GLOBAL_VALUE (DECL_NAME (t)) == (t)
- && TREE_TYPE (t) == tinfo_decl_type
- && TREE_TYPE (DECL_NAME (t));
+ if (/* It's a var decl */
+ TREE_CODE (t) == VAR_DECL
+ /* whos name points back to itself */
+ && IDENTIFIER_GLOBAL_VALUE (DECL_NAME (t)) == t
+ /* whos name's type is non-null */
+ && TREE_TYPE (DECL_NAME (t))
+ /* and whos type is a struct */
+ && TREE_CODE (TREE_TYPE (t)) == RECORD_TYPE
+ /* with a first field of our pseudo type info */
+ && TREE_TYPE (TYPE_FIELDS (TREE_TYPE (t))) == ti_desc_type_node)
+ return 1;
+ return 0;
}
-/* Emit a suitable type_info definition for the type_info decl pointed to by
- DECL_PTR. We emit a completely new variable, of the correct type for the
- actual type this is describing. The DECL_ASSEMBLER_NAME of the generated
- definition is set to that of the supplied decl, so that they can be tied
- up. Mark the supplied decl as having been dealt with. Emitting one
- definition might cause other definitions to be required.
-
- We need to do things this way, because we're trying to do something like
-
- struct B : A {
- ...
- };
-
- extern const A tinfo_var;
-
- const B tinfo_var = {...};
-
- which is not permitted. Also, we've not necessarily seen the definition of B.
- So we do something like the following,
-
- extern const A tinfo_var;
-
- struct pseudo_A {
- const void *vtable_ptr;
- const char *name;
- };
- struct pseudo_B {
- pseudo_A base;
- ...
- };
-
- const pseudo_B proxy_tinfo_var attribute((assembler_name="tinfo_var")) =
- {
- {&B::vtable, "..."},
- ...
- };
-
- pseudo_A and pseudo_B must be layout equivalent to the real definitions in
- the runtime. */
+/* Finish a type info decl. DECL_PTR is a pointer to an unemitted
+ tinfo decl. Determine whether it needs emitting, and if so
+ generate the initializer. */
int
emit_tinfo_decl (decl_ptr, data)
tree *decl_ptr;
void *data ATTRIBUTE_UNUSED;
{
- tree tinfo_decl = *decl_ptr;
- tree tinfo_type, decl;
-
- my_friendly_assert (TREE_TYPE (tinfo_decl) == tinfo_decl_type, 20000121);
- tinfo_type = TREE_TYPE (DECL_NAME (tinfo_decl));
- my_friendly_assert (tinfo_type != NULL_TREE, 20000120);
+ tree decl = *decl_ptr;
+ tree type = TREE_TYPE (DECL_NAME (decl));
+ int non_public;
+ int in_library = typeinfo_in_lib_p (type);
+ tree var_desc, var_init;
- if (!DECL_NEEDED_P (tinfo_decl))
+ import_export_tinfo (decl, type, in_library);
+ if (DECL_REALLY_EXTERN (decl) || !DECL_NEEDED_P (decl))
return 0;
- /* Say we've dealt with it. */
- TREE_TYPE (DECL_NAME (tinfo_decl)) = NULL_TREE;
+
+ if (!doing_runtime && in_library)
+ return 0;
+
+ non_public = 0;
+ var_desc = get_pseudo_ti_desc (type);
+ var_init = get_pseudo_ti_init (type, var_desc, &non_public);
- create_tinfo_types ();
- decl = synthesize_tinfo_var (tinfo_type, DECL_ASSEMBLER_NAME (tinfo_decl));
+ DECL_EXTERNAL (decl) = 0;
+ TREE_PUBLIC (decl) = !non_public;
+ if (non_public)
+ DECL_COMDAT (decl) = 0;
+
+ DECL_INITIAL (decl) = var_init;
+ cp_finish_decl (decl, var_init, NULL_TREE, 0);
+ /* cp_finish_decl will have dealt with linkage. */
- return decl != 0;
+ /* Say we've dealt with it. */
+ TREE_TYPE (DECL_NAME (decl)) = NULL_TREE;
+
+ return 1;
}
diff --git a/contrib/gcc/cp/search.c b/contrib/gcc/cp/search.c
index ab6e25d..9821907 100644
--- a/contrib/gcc/cp/search.c
+++ b/contrib/gcc/cp/search.c
@@ -100,7 +100,6 @@ static tree dfs_push_decls PARAMS ((tree, void *));
static tree dfs_unuse_fields PARAMS ((tree, void *));
static tree add_conversions PARAMS ((tree, void *));
static int covariant_return_p PARAMS ((tree, tree));
-static int check_final_overrider PARAMS ((tree, tree));
static int look_for_overrides_r PARAMS ((tree, tree));
static struct search_level *push_search_level
PARAMS ((struct stack_level *, struct obstack *));
@@ -1800,7 +1799,7 @@ covariant_return_p (brettype, drettype)
/* Check that virtual overrider OVERRIDER is acceptable for base function
BASEFN. Issue diagnostic, and return zero, if unacceptable. */
-static int
+int
check_final_overrider (overrider, basefn)
tree overrider, basefn;
{
diff --git a/contrib/gcc/cp/tree.c b/contrib/gcc/cp/tree.c
index d703b8a..748ab9a 100644
--- a/contrib/gcc/cp/tree.c
+++ b/contrib/gcc/cp/tree.c
@@ -1,6 +1,6 @@
/* Language-dependent node constructors for parse phase of GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -1898,6 +1898,27 @@ pod_type_p (t)
return 1;
}
+/* Returns 1 iff zero initialization of type T means actually storing
+ zeros in it. */
+
+int
+zero_init_p (t)
+ tree t;
+{
+ t = strip_array_types (t);
+
+ /* NULL pointers to data members are initialized with -1. */
+ if (TYPE_PTRMEM_P (t))
+ return 0;
+
+ /* Classes that contain types that can't be zero-initialized, cannot
+ be zero-initialized themselves. */
+ if (CLASS_TYPE_P (t) && CLASSTYPE_NON_ZERO_INIT_P (t))
+ return 0;
+
+ return 1;
+}
+
/* Table of valid C++ attributes. */
const struct attribute_spec cp_attribute_table[] =
{
@@ -2147,7 +2168,8 @@ cp_cannot_inline_tree_fn (fnp)
&& TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn)))
{
fn = *fnp = instantiate_decl (fn, /*defer_ok=*/0);
- return TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn));
+ if (TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn)))
+ return 1;
}
if (varargs_function_p (fn))
@@ -2262,6 +2284,11 @@ cp_copy_res_decl_for_inlining (result, fn, caller, decl_map_,
DECL_SOURCE_FILE (var) = DECL_SOURCE_FILE (nrv);
DECL_SOURCE_LINE (var) = DECL_SOURCE_LINE (nrv);
DECL_ABSTRACT_ORIGIN (var) = DECL_ORIGIN (nrv);
+ /* Don't lose initialization info. */
+ DECL_INITIAL (var) = DECL_INITIAL (nrv);
+ /* Don't forget that it needs to go in the stack. */
+ TREE_ADDRESSABLE (var) = TREE_ADDRESSABLE (nrv);
+
splay_tree_insert (decl_map,
(splay_tree_key) nrv,
(splay_tree_value) var);
diff --git a/contrib/gcc/cp/typeck.c b/contrib/gcc/cp/typeck.c
index fc37236..d326969 100644
--- a/contrib/gcc/cp/typeck.c
+++ b/contrib/gcc/cp/typeck.c
@@ -4806,9 +4806,6 @@ mark_addressable (exp)
{
register tree x = exp;
- if (TREE_ADDRESSABLE (x) == 1)
- return 1;
-
while (1)
switch (TREE_CODE (x))
{
@@ -4827,6 +4824,8 @@ mark_addressable (exp)
TREE_ADDRESSABLE (x) = 1; /* so compiler doesn't die later */
return 1;
}
+ /* FALLTHRU */
+
case VAR_DECL:
/* Caller should not be trying to mark initialized
constant fields addressable. */
@@ -4834,6 +4833,7 @@ mark_addressable (exp)
|| DECL_IN_AGGR_P (x) == 0
|| TREE_STATIC (x)
|| DECL_EXTERNAL (x), 314);
+ /* FALLTHRU */
case CONST_DECL:
case RESULT_DECL:
@@ -4842,6 +4842,7 @@ mark_addressable (exp)
warning ("address requested for `%D', which is declared `register'",
x);
TREE_ADDRESSABLE (x) = 1;
+ put_var_into_stack (x);
return 1;
case FUNCTION_DECL:
@@ -5449,7 +5450,10 @@ build_modify_expr (lhs, modifycode, rhs)
so the code to compute it is only emitted once. */
tree cond;
- rhs = save_expr (rhs);
+ if (lvalue_p (rhs))
+ rhs = stabilize_reference (rhs);
+ else
+ rhs = save_expr (rhs);
/* Check this here to avoid odd errors when trying to convert
a throw to the type of the COND_EXPR. */
diff --git a/contrib/gcc/cp/typeck2.c b/contrib/gcc/cp/typeck2.c
index 48caade..d3febeb 100644
--- a/contrib/gcc/cp/typeck2.c
+++ b/contrib/gcc/cp/typeck2.c
@@ -1,7 +1,7 @@
/* Report error messages, build initializers, and perform
some front-end optimizations for C++ compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC.
@@ -196,7 +196,8 @@ incomplete_type_error (value, type)
return;
if (value != 0 && (TREE_CODE (value) == VAR_DECL
- || TREE_CODE (value) == PARM_DECL))
+ || TREE_CODE (value) == PARM_DECL
+ || TREE_CODE (value) == FIELD_DECL))
{
cp_error_at ("`%D' has incomplete type", value);
decl = 1;
@@ -211,7 +212,10 @@ retry:
case ENUMERAL_TYPE:
if (!decl)
error ("invalid use of undefined type `%#T'", type);
- cp_error_at ("forward declaration of `%#T'", type);
+ if (!TYPE_TEMPLATE_INFO (type))
+ cp_error_at ("forward declaration of `%#T'", type);
+ else
+ cp_error_at ("declaration of `%#T'", type);
break;
case VOID_TYPE:
@@ -420,6 +424,28 @@ store_init_value (decl, init)
DECL_INITIAL (decl) = value;
return NULL_TREE;
}
+
+/* Same as store_init_value, but used for known-to-be-valid static
+ initializers. Used to introduce a static initializer even in data
+ structures that may require dynamic initialization. */
+
+tree
+force_store_init_value (decl, init)
+ tree decl, init;
+{
+ tree type = TREE_TYPE (decl);
+ int needs_constructing = TYPE_NEEDS_CONSTRUCTING (type);
+
+ TYPE_NEEDS_CONSTRUCTING (type) = 0;
+
+ init = store_init_value (decl, init);
+ if (init)
+ abort ();
+
+ TYPE_NEEDS_CONSTRUCTING (type) = needs_constructing;
+
+ return init;
+}
/* Digest the parser output INIT as an initializer for type TYPE.
Return a C expression of type TYPE to represent the initial value.
@@ -732,6 +758,8 @@ process_init_constructor (type, init, elts)
next1 = build (CONSTRUCTOR, NULL_TREE, NULL_TREE, NULL_TREE);
next1 = digest_init (TREE_TYPE (type), next1, 0);
}
+ else if (! zero_init_p (TREE_TYPE (type)))
+ next1 = build_forced_zero_init (TREE_TYPE (type));
else
/* The default zero-initialization is fine for us; don't
add anything to the CONSTRUCTOR. */
@@ -848,9 +876,12 @@ process_init_constructor (type, init, elts)
&& (!init || TREE_HAS_CONSTRUCTOR (init)))
warning ("missing initializer for member `%D'", field);
- /* The default zero-initialization is fine for us; don't
- add anything to the CONSTRUCTOR. */
- continue;
+ if (! zero_init_p (TREE_TYPE (field)))
+ next1 = build_forced_zero_init (TREE_TYPE (field));
+ else
+ /* The default zero-initialization is fine for us; don't
+ add anything to the CONSTRUCTOR. */
+ continue;
}
if (next1 == error_mark_node)
diff --git a/contrib/gcc/cppfiles.c b/contrib/gcc/cppfiles.c
index 4c595a8..cad35c2 100644
--- a/contrib/gcc/cppfiles.c
+++ b/contrib/gcc/cppfiles.c
@@ -310,9 +310,12 @@ stack_include_file (pfile, inc)
sysp = MAX ((pfile->map ? pfile->map->sysp : 0),
(inc->foundhere ? inc->foundhere->sysp : 0));
- /* For -M, add the file to the dependencies on its first inclusion. */
- if (CPP_OPTION (pfile, print_deps) > sysp && !inc->include_count)
- deps_add_dep (pfile->deps, inc->name);
+ /* Add the file to the dependencies on its first inclusion. */
+ if (CPP_OPTION (pfile, print_deps) > !!sysp && !inc->include_count)
+ {
+ if (pfile->buffer || CPP_OPTION (pfile, deps_ignore_main_file) == 0)
+ deps_add_dep (pfile->deps, inc->name);
+ }
/* Not in cache? */
if (! inc->buffer)
diff --git a/contrib/gcc/cppinit.c b/contrib/gcc/cppinit.c
index 872ba6d..adaa30f 100644
--- a/contrib/gcc/cppinit.c
+++ b/contrib/gcc/cppinit.c
@@ -99,6 +99,7 @@ static void path_include PARAMS ((cpp_reader *,
char *, int));
static void init_library PARAMS ((void));
static void init_builtins PARAMS ((cpp_reader *));
+static void mark_named_operators PARAMS ((cpp_reader *));
static void append_include_chain PARAMS ((cpp_reader *,
char *, int, int));
static struct search_path * remove_dup_dir PARAMS ((cpp_reader *,
@@ -188,7 +189,7 @@ path_include (pfile, list, path)
name[q - p] = 0;
}
- append_include_chain (pfile, name, path, 0);
+ append_include_chain (pfile, name, path, path == SYSTEM);
/* Advance past this name. */
if (*q == 0)
@@ -395,7 +396,7 @@ struct lang_flags
char objc;
char cplusplus;
char extended_numbers;
- char trigraphs;
+ char std;
char dollars_in_ident;
char cplusplus_comments;
char digraphs;
@@ -403,7 +404,7 @@ struct lang_flags
/* ??? Enable $ in identifiers in assembly? */
static const struct lang_flags lang_defaults[] =
-{ /* c99 objc c++ xnum trig dollar c++comm digr */
+{ /* c99 objc c++ xnum std dollar c++comm digr */
/* GNUC89 */ { 0, 0, 0, 1, 0, 1, 1, 1 },
/* GNUC99 */ { 1, 0, 0, 1, 0, 1, 1, 1 },
/* STDC89 */ { 0, 0, 0, 0, 1, 0, 0, 0 },
@@ -430,7 +431,8 @@ set_lang (pfile, lang)
CPP_OPTION (pfile, objc) = l->objc;
CPP_OPTION (pfile, cplusplus) = l->cplusplus;
CPP_OPTION (pfile, extended_numbers) = l->extended_numbers;
- CPP_OPTION (pfile, trigraphs) = l->trigraphs;
+ CPP_OPTION (pfile, std) = l->std;
+ CPP_OPTION (pfile, trigraphs) = l->std;
CPP_OPTION (pfile, dollars_in_ident) = l->dollars_in_ident;
CPP_OPTION (pfile, cplusplus_comments) = l->cplusplus_comments;
CPP_OPTION (pfile, digraphs) = l->digraphs;
@@ -612,28 +614,22 @@ cpp_destroy (pfile)
Two values are not compile time constants, so we tag
them in the FLAGS field instead:
VERS value is the global version_string, quoted
- ULP value is the global user_label_prefix
-
- Also, macros with CPLUS set in the flags field are entered only for C++. */
+ ULP value is the global user_label_prefix */
struct builtin
{
const U_CHAR *name;
const char *value;
unsigned char builtin;
- unsigned char operator;
unsigned short flags;
unsigned short len;
};
#define VERS 0x01
#define ULP 0x02
-#define CPLUS 0x04
#define BUILTIN 0x08
-#define OPERATOR 0x10
-#define B(n, t) { U n, 0, t, 0, BUILTIN, sizeof n - 1 }
-#define C(n, v) { U n, v, 0, 0, 0, sizeof n - 1 }
-#define X(n, f) { U n, 0, 0, 0, f, sizeof n - 1 }
-#define O(n, c, f) { U n, 0, 0, c, OPERATOR | f, sizeof n - 1 }
+#define B(n, t) { U n, 0, t, BUILTIN, sizeof n - 1 }
+#define C(n, v) { U n, v, 0, 0, sizeof n - 1 }
+#define X(n, f) { U n, 0, 0, f, sizeof n - 1 }
static const struct builtin builtin_array[] =
{
B("__TIME__", BT_TIME),
@@ -669,30 +665,55 @@ static const struct builtin builtin_array[] =
#else
C("__STDC__", "1"),
#endif
-
- /* Named operators known to the preprocessor. These cannot be #defined
- and always have their stated meaning. They are treated like normal
- identifiers except for the type code and the meaning. Most of them
- are only for C++ (but see iso646.h). */
- O("and", CPP_AND_AND, CPLUS),
- O("and_eq", CPP_AND_EQ, CPLUS),
- O("bitand", CPP_AND, CPLUS),
- O("bitor", CPP_OR, CPLUS),
- O("compl", CPP_COMPL, CPLUS),
- O("not", CPP_NOT, CPLUS),
- O("not_eq", CPP_NOT_EQ, CPLUS),
- O("or", CPP_OR_OR, CPLUS),
- O("or_eq", CPP_OR_EQ, CPLUS),
- O("xor", CPP_XOR, CPLUS),
- O("xor_eq", CPP_XOR_EQ, CPLUS)
};
#undef B
#undef C
#undef X
-#undef O
#define builtin_array_end \
builtin_array + sizeof(builtin_array)/sizeof(struct builtin)
+/* Named operators known to the preprocessor. These cannot be
+ #defined and always have their stated meaning. They are treated
+ like normal identifiers except for the type code and the meaning.
+ Most of them are only for C++ (but see iso646.h). */
+#define B(n, t) { DSC(n), t }
+static const struct named_op
+{
+ const U_CHAR *name;
+ unsigned int len;
+ enum cpp_ttype value;
+} operator_array[] = {
+ B("and", CPP_AND_AND),
+ B("and_eq", CPP_AND_EQ),
+ B("bitand", CPP_AND),
+ B("bitor", CPP_OR),
+ B("compl", CPP_COMPL),
+ B("not", CPP_NOT),
+ B("not_eq", CPP_NOT_EQ),
+ B("or", CPP_OR_OR),
+ B("or_eq", CPP_OR_EQ),
+ B("xor", CPP_XOR),
+ B("xor_eq", CPP_XOR_EQ)
+};
+#undef B
+
+/* Mark the C++ named operators in the hash table. */
+static void
+mark_named_operators (pfile)
+ cpp_reader *pfile;
+{
+ const struct named_op *b;
+
+ for (b = operator_array;
+ b < (operator_array + ARRAY_SIZE (operator_array));
+ b++)
+ {
+ cpp_hashnode *hp = cpp_lookup (pfile, b->name, b->len);
+ hp->flags |= NODE_OPERATOR;
+ hp->value.operator = b->value;
+ }
+}
+
/* Subroutine of cpp_read_main_file; reads the builtins table above and
enters them, and language-specific macros, into the hash table. */
static void
@@ -703,26 +724,12 @@ init_builtins (pfile)
for(b = builtin_array; b < builtin_array_end; b++)
{
- if ((b->flags & CPLUS) && ! CPP_OPTION (pfile, cplusplus))
- continue;
-
- if ((b->flags & OPERATOR) && ! CPP_OPTION (pfile, operator_names))
- continue;
-
- if (b->flags & (OPERATOR | BUILTIN))
+ if (b->flags & BUILTIN)
{
cpp_hashnode *hp = cpp_lookup (pfile, b->name, b->len);
- if (b->flags & OPERATOR)
- {
- hp->flags |= NODE_OPERATOR;
- hp->value.operator = b->operator;
- }
- else
- {
- hp->type = NT_MACRO;
- hp->flags |= NODE_BUILTIN | NODE_WARN;
- hp->value.builtin = b->builtin;
- }
+ hp->type = NT_MACRO;
+ hp->flags |= NODE_BUILTIN | NODE_WARN;
+ hp->value.builtin = b->builtin;
}
else /* A standard macro of some kind. */
{
@@ -781,7 +788,6 @@ init_builtins (pfile)
#undef OPERATOR
#undef VERS
#undef ULP
-#undef CPLUS
#undef builtin_array_end
/* And another subroutine. This one sets up the standard include path. */
@@ -1001,6 +1007,10 @@ void
cpp_finish_options (pfile)
cpp_reader *pfile;
{
+ /* Mark named operators before handling command line macros. */
+ if (CPP_OPTION (pfile, cplusplus) && CPP_OPTION (pfile, operator_names))
+ mark_named_operators (pfile);
+
/* Install builtins and process command line macros etc. in the order
they appeared, but only if not already preprocessed. */
if (! CPP_OPTION (pfile, preprocessed))
@@ -1871,7 +1881,10 @@ init_dependency_output (pfile)
{
spec = getenv ("SUNPRO_DEPENDENCIES");
if (spec)
- CPP_OPTION (pfile, print_deps) = 2;
+ {
+ CPP_OPTION (pfile, print_deps) = 2;
+ CPP_OPTION (pfile, deps_ignore_main_file) = 1;
+ }
else
return;
}
diff --git a/contrib/gcc/cpplib.c b/contrib/gcc/cpplib.c
index 69e9044..096a711 100644
--- a/contrib/gcc/cpplib.c
+++ b/contrib/gcc/cpplib.c
@@ -406,12 +406,17 @@ run_directive (pfile, dir_no, buf, count)
{
cpp_push_buffer (pfile, (const U_CHAR *) buf, count,
/* from_stage3 */ true, 1);
+ /* Disgusting hack. */
+ if (dir_no == T_PRAGMA)
+ pfile->buffer->inc = pfile->buffer->prev->inc;
start_directive (pfile);
/* We don't want a leading # to be interpreted as a directive. */
pfile->buffer->saved_flags = 0;
pfile->directive = &dtable[dir_no];
(void) (*pfile->directive->handler) (pfile);
end_directive (pfile, 1);
+ if (dir_no == T_PRAGMA)
+ pfile->buffer->inc = NULL;
_cpp_pop_buffer (pfile);
}
diff --git a/contrib/gcc/cpplib.h b/contrib/gcc/cpplib.h
index edd4b5a..c21ada0 100644
--- a/contrib/gcc/cpplib.h
+++ b/contrib/gcc/cpplib.h
@@ -279,6 +279,9 @@ struct cpp_options
/* If true, fopen (deps_file, "a") else fopen (deps_file, "w"). */
unsigned char print_deps_append;
+ /* If true, no dependency is generated on the main file. */
+ unsigned char deps_ignore_main_file;
+
/* Nonzero means print names of header files (-H). */
unsigned char print_include_names;
@@ -335,6 +338,9 @@ struct cpp_options
/* Nonzero for the 1999 C Standard, including corrigenda and amendments. */
unsigned char c99;
+ /* Nonzero if conforming to some particular standard. */
+ unsigned char std;
+
/* Nonzero means give all the error messages the ANSI standard requires. */
unsigned char pedantic;
diff --git a/contrib/gcc/cppmacro.c b/contrib/gcc/cppmacro.c
index b351f96..c85ac21 100644
--- a/contrib/gcc/cppmacro.c
+++ b/contrib/gcc/cppmacro.c
@@ -613,7 +613,20 @@ collect_args (pfile, node)
}
if (!error)
- return base_buff;
+ {
+ /* GCC has special semantics for , ## b where b is a varargs
+ parameter: we remove the comma if b was omitted entirely.
+ If b was merely an empty argument, the comma is retained.
+ If the macro takes just one (varargs) parameter, then we
+ retain the comma only if we are standards conforming.
+
+ If FIRST is NULL replace_args () swallows the comma. */
+ if (macro->variadic && (argc < macro->paramc
+ || (argc == 1 && args[0].count == 0
+ && !CPP_OPTION (pfile, std))))
+ args[macro->paramc - 1].first = NULL;
+ return base_buff;
+ }
_cpp_release_buff (pfile, base_buff);
return NULL;
@@ -673,6 +686,8 @@ enter_macro_context (pfile, node)
/* The presence of a macro invalidates a file's controlling macro. */
pfile->mi_valid = false;
+ pfile->state.angled_headers = false;
+
/* Handle standard macros. */
if (! (node->flags & NODE_BUILTIN))
{
@@ -797,15 +812,13 @@ replace_args (pfile, node, args)
count = arg->count, from = arg->first;
if (dest != first)
{
- /* GCC has special semantics for , ## b where b is a
- varargs parameter: the comma disappears if b was
- given no actual arguments (not merely if b is an
- empty argument); otherwise the paste flag is removed. */
if (dest[-1]->type == CPP_COMMA
&& macro->variadic
&& src->val.arg_no == macro->paramc)
{
- if (count == 0)
+ /* Swallow a pasted comma if from == NULL, otherwise
+ drop the paste flag. */
+ if (from == NULL)
dest--;
else
paste_flag = dest - 1;
@@ -1529,7 +1542,7 @@ cpp_macro_definition (pfile, node)
}
/* Calculate length. */
- len = NODE_LEN (node) + 1; /* ' ' */
+ len = NODE_LEN (node) + 2; /* ' ' and NUL. */
if (macro->fun_like)
{
len += 4; /* "()" plus possible final ".." of named
diff --git a/contrib/gcc/cse.c b/contrib/gcc/cse.c
index a607b0c..65f4542f 100644
--- a/contrib/gcc/cse.c
+++ b/contrib/gcc/cse.c
@@ -2254,10 +2254,11 @@ canon_hash (x, mode)
case REG:
{
unsigned int regno = REGNO (x);
+ bool record;
/* On some machines, we can't record any non-fixed hard register,
because extending its life will cause reload problems. We
- consider ap, fp, and sp to be fixed for this purpose.
+ consider ap, fp, sp, gp to be fixed for this purpose.
We also consider CCmode registers to be fixed for this purpose;
failure to do so leads to failure to simplify 0<100 type of
@@ -2267,16 +2268,28 @@ canon_hash (x, mode)
Nor should we record any register that is in a small
class, as defined by CLASS_LIKELY_SPILLED_P. */
- if (regno < FIRST_PSEUDO_REGISTER
- && (global_regs[regno]
- || CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (regno))
- || (SMALL_REGISTER_CLASSES
- && ! fixed_regs[regno]
- && x != frame_pointer_rtx
- && x != hard_frame_pointer_rtx
- && x != arg_pointer_rtx
- && x != stack_pointer_rtx
- && GET_MODE_CLASS (GET_MODE (x)) != MODE_CC)))
+ if (regno >= FIRST_PSEUDO_REGISTER)
+ record = true;
+ else if (x == frame_pointer_rtx
+ || x == hard_frame_pointer_rtx
+ || x == arg_pointer_rtx
+ || x == stack_pointer_rtx
+ || x == pic_offset_table_rtx)
+ record = true;
+ else if (global_regs[regno])
+ record = false;
+ else if (fixed_regs[regno])
+ record = true;
+ else if (GET_MODE_CLASS (GET_MODE (x)) == MODE_CC)
+ record = true;
+ else if (SMALL_REGISTER_CLASSES)
+ record = false;
+ else if (CLASS_LIKELY_SPILLED_P (REGNO_REG_CLASS (regno)))
+ record = false;
+ else
+ record = true;
+
+ if (!record)
{
do_not_record = 1;
return 0;
@@ -3464,7 +3477,9 @@ fold_rtx (x, insn)
&& GET_CODE (elt->exp) != SIGN_EXTEND
&& GET_CODE (elt->exp) != ZERO_EXTEND
&& GET_CODE (XEXP (elt->exp, 0)) == SUBREG
- && GET_MODE (SUBREG_REG (XEXP (elt->exp, 0))) == mode)
+ && GET_MODE (SUBREG_REG (XEXP (elt->exp, 0))) == mode
+ && (GET_MODE_CLASS (mode)
+ == GET_MODE_CLASS (GET_MODE (XEXP (elt->exp, 0)))))
{
rtx op0 = SUBREG_REG (XEXP (elt->exp, 0));
@@ -4906,7 +4921,10 @@ cse_insn (insn, libcall_insn)
&& (tem = find_reg_note (insn, REG_EQUAL, NULL_RTX)) != 0
&& (! rtx_equal_p (XEXP (tem, 0), SET_SRC (sets[0].rtl))
|| GET_CODE (SET_DEST (sets[0].rtl)) == STRICT_LOW_PART))
- src_eqv = canon_reg (XEXP (tem, 0), NULL_RTX);
+ {
+ src_eqv = fold_rtx (canon_reg (XEXP (tem, 0), NULL_RTX), insn);
+ XEXP (tem, 0) = src_eqv;
+ }
/* Canonicalize sources and addresses of destinations.
We do this in a separate pass to avoid problems when a MATCH_DUP is
@@ -5010,7 +5028,6 @@ cse_insn (insn, libcall_insn)
eqvmode = GET_MODE (SUBREG_REG (XEXP (dest, 0)));
do_not_record = 0;
hash_arg_in_memory = 0;
- src_eqv = fold_rtx (src_eqv, insn);
src_eqv_hash = HASH (src_eqv, eqvmode);
/* Find the equivalence class for the equivalent expression. */
diff --git a/contrib/gcc/cselib.c b/contrib/gcc/cselib.c
index 0eb17b8..b0348fb 100644
--- a/contrib/gcc/cselib.c
+++ b/contrib/gcc/cselib.c
@@ -104,6 +104,10 @@ static int n_useless_values;
static varray_type reg_values;
#define REG_VALUES(I) VARRAY_ELT_LIST (reg_values, (I))
+/* The largest number of hard regs used by any entry added to the
+ REG_VALUES table. Cleared on each clear_table() invocation. */
+static unsigned int max_value_regs;
+
/* Here the set of indices I with REG_VALUES(I) != 0 is saved. This is used
in clear_table() for fast emptying. */
static varray_type used_regs;
@@ -227,6 +231,8 @@ clear_table (clear_all)
for (i = 0; i < VARRAY_ACTIVE_SIZE (used_regs); i++)
REG_VALUES (VARRAY_UINT (used_regs, i)) = 0;
+ max_value_regs = 0;
+
VARRAY_POP_ALL (used_regs);
htab_empty (hash_table);
@@ -897,6 +903,14 @@ cselib_lookup (x, mode, create)
if (! create)
return 0;
+ if (i < FIRST_PSEUDO_REGISTER)
+ {
+ unsigned int n = HARD_REGNO_NREGS (i, mode);
+
+ if (n > max_value_regs)
+ max_value_regs = n;
+ }
+
e = new_cselib_val (++next_unknown_value, GET_MODE (x));
e->locs = new_elt_loc_list (e->locs, x);
if (REG_VALUES (i) == 0)
@@ -957,11 +971,22 @@ cselib_invalidate_regno (regno, mode)
pseudos, only REGNO is affected. For hard regs, we must take MODE
into account, and we must also invalidate lower register numbers
if they contain values that overlap REGNO. */
- endregno = regno + 1;
if (regno < FIRST_PSEUDO_REGISTER && mode != VOIDmode)
- endregno = regno + HARD_REGNO_NREGS (regno, mode);
+ {
+ if (regno < max_value_regs)
+ i = 0;
+ else
+ i = regno - max_value_regs;
- for (i = 0; i < endregno; i++)
+ endregno = regno + HARD_REGNO_NREGS (regno, mode);
+ }
+ else
+ {
+ i = regno;
+ endregno = regno + 1;
+ }
+
+ for (; i < endregno; i++)
{
struct elt_list **l = &REG_VALUES (i);
@@ -1171,6 +1196,14 @@ cselib_record_set (dest, src_elt, dest_addr_elt)
if (REG_VALUES (dreg) == 0)
VARRAY_PUSH_UINT (used_regs, dreg);
+ if (dreg < FIRST_PSEUDO_REGISTER)
+ {
+ unsigned int n = HARD_REGNO_NREGS (dreg, GET_MODE (dest));
+
+ if (n > max_value_regs)
+ max_value_regs = n;
+ }
+
REG_VALUES (dreg) = new_elt_list (REG_VALUES (dreg), src_elt);
if (src_elt->locs == 0)
n_useless_values--;
diff --git a/contrib/gcc/defaults.h b/contrib/gcc/defaults.h
index 8e1e1ec6..c6f8a43 100644
--- a/contrib/gcc/defaults.h
+++ b/contrib/gcc/defaults.h
@@ -462,4 +462,10 @@ You Lose! You must define PREFERRED_DEBUGGING_TYPE!
#define MODE_BASE_REG_CLASS(MODE) BASE_REG_CLASS
#endif
+/* Determine whether __cxa_atexit, rather than atexit, is used to
+ register C++ destructors for local statics and global objects. */
+#ifndef DEFAULT_USE_CXA_ATEXIT
+#define DEFAULT_USE_CXA_ATEXIT 0
+#endif
+
#endif /* ! GCC_DEFAULTS_H */
diff --git a/contrib/gcc/doc/contrib.texi b/contrib/gcc/doc/contrib.texi
index 38eef90..d1a7363 100644
--- a/contrib/gcc/doc/contrib.texi
+++ b/contrib/gcc/doc/contrib.texi
@@ -38,7 +38,8 @@ Alasdair Baird for various bugfixes.
Gerald Baumgartner added the signature extension to the C++ front end.
@item
-Neil Booth for various work on cpplib.
+Neil Booth for work on cpplib, lang hooks, debug hooks and other
+miscellaneous clean-ups.
@item
Per Bothner for his direction via the steering committee and various
diff --git a/contrib/gcc/doc/cpp.texi b/contrib/gcc/doc/cpp.texi
index 808f3c4..8e829d8 100644
--- a/contrib/gcc/doc/cpp.texi
+++ b/contrib/gcc/doc/cpp.texi
@@ -1676,6 +1676,15 @@ eprintf ("success!\n")
@expansion{} fprintf(stderr, "success!\n");
@end example
+@noindent
+The above explanation is ambiguous about the case where the only macro
+parameter is a variable arguments parameter, as it is meaningless to
+try to distinguish whether no argument at all is an empty argument or
+a missing argument. In this case the C99 standard is clear that the
+comma must remain, however the existing GCC extension used to swallow
+the comma. So CPP retains the comma when conforming to a specific C
+standard, and drops it otherwise.
+
C99 mandates that the only place the identifier @code{@w{__VA_ARGS__}}
can appear is in the replacement list of a variadic macro. It may not
be used as a macro name, macro argument name, or within a different type
diff --git a/contrib/gcc/doc/cppenv.texi b/contrib/gcc/doc/cppenv.texi
index 31407bd..d60f7ee 100644
--- a/contrib/gcc/doc/cppenv.texi
+++ b/contrib/gcc/doc/cppenv.texi
@@ -66,7 +66,8 @@ with an optional @option{-MT} switch too.
This variable is the same as the environment variable
@env{DEPENDENCIES_OUTPUT} (@pxref{DEPENDENCIES_OUTPUT}), except that
system header files are not ignored, so it implies @option{-M} rather
-than @option{-MM}.
+than @option{-MM}. However, the dependence on the main input file is
+omitted.
@ifset cppmanual
@xref{Invocation}.
@end ifset
diff --git a/contrib/gcc/doc/include/gcc-common.texi b/contrib/gcc/doc/include/gcc-common.texi
index 947dde1..f25eee1 100644
--- a/contrib/gcc/doc/include/gcc-common.texi
+++ b/contrib/gcc/doc/include/gcc-common.texi
@@ -4,7 +4,7 @@
@c Common values used in the GCC manuals:
-@set version-GCC 3.1
+@set version-GCC 3.2
@c Common macros to support generating man pages:
diff --git a/contrib/gcc/doc/invoke.texi b/contrib/gcc/doc/invoke.texi
index bfab05b..a3b53ed 100644
--- a/contrib/gcc/doc/invoke.texi
+++ b/contrib/gcc/doc/invoke.texi
@@ -187,7 +187,7 @@ in the following sections.
-fno-optional-diags -fpermissive @gol
-frepo -fno-rtti -fstats -ftemplate-depth-@var{n} @gol
-fuse-cxa-atexit -fvtable-gc -fno-weak -nostdinc++ @gol
--fno-default-inline -Wctor-dtor-privacy @gol
+-fno-default-inline -Wabi -Wctor-dtor-privacy @gol
-Wnon-virtual-dtor -Wreorder @gol
-Weffc++ -Wno-deprecated @gol
-Wno-non-template-friend -Wold-style-cast @gol
@@ -211,7 +211,7 @@ in the following sections.
@xref{Warning Options,,Options to Request or Suppress Warnings}.
@gccoptlist{
-fsyntax-only -pedantic -pedantic-errors @gol
--w -W -Wall -Waggregate-return @gol
+-w -W -Wall -Waggregate-return @gol
-Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment @gol
-Wconversion -Wno-deprecated-declarations @gol
-Wdisabled-optimization -Wdiv-by-zero -Werror @gol
@@ -486,6 +486,7 @@ in the following sections.
-mpush-args -maccumulate-outgoing-args -m128bit-long-double @gol
-m96bit-long-double -mregparm=@var{num} -momit-leaf-frame-pointer @gol
-mno-red-zone@gol
+-mcmodel=@var{code-model} @gol
-m32 -m64}
@emph{HPPA Options}
@@ -1550,6 +1551,58 @@ Do not assume @samp{inline} for functions defined inside a class scope.
functions will have linkage like inline functions; they just won't be
inlined by default.
+@item -Wabi @r{(C++ only)}
+@opindex Wabi
+Warn when G++ generates code that is probably not compatible with the
+vendor-neutral C++ ABI. Although an effort has been made to warn about
+all such cases, there are probably some cases that are not warned about,
+even though G++ is generating incompatible code. There may also be
+cases where warnings are emitted even though the code that is generated
+will be compatible.
+
+You should rewrite your code to avoid these warnings if you are
+concerned about the fact that code generated by G++ may not be binary
+compatible with code generated by other compilers.
+
+The known incompatibilites at this point include:
+
+@itemize @bullet
+
+@item
+Incorrect handling of tail-padding for bit-fields. G++ may attempt to
+pack data into the same byte as a base class. For example:
+
+@smallexample
+struct A @{ virtual void f(); int f1 : 1; @};
+struct B : public A @{ int f2 : 1; @};
+@end smallexample
+
+@noindent
+In this case, G++ will place @code{B::f2} into the same byte
+as@code{A::f1}; other compilers will not. You can avoid this problem
+by explicitly padding @code{A} so that its size is a multiple of the
+byte size on your platform; that will cause G++ and other compilers to
+layout @code{B} identically.
+
+@item
+Incorrect handling of tail-padding for virtual bases. G++ does not use
+tail padding when laying out virtual bases. For example:
+
+@smallexample
+struct A @{ virtual void f(); char c1; @};
+struct B @{ B(); char c2; @};
+struct C : public A, public virtual B @{@};
+@end smallexample
+
+@noindent
+In this case, G++ will not place @code{B} into the tail-padding for
+@code{A}; other compilers will. You can avoid this problem by
+explicitly padding @code{A} so that its size is a multiple of its
+alignment (ignoring virtual base classes); that will cause G++ and other
+compilers to layout @code{C} identically.
+
+@end itemize
+
@item -Wctor-dtor-privacy @r{(C++ only)}
@opindex Wctor-dtor-privacy
Warn when a class seems unusable, because all the constructors or
@@ -7415,6 +7468,10 @@ boundary. Aligning @code{double} variables on a two word boundary will
produce code that runs somewhat faster on a @samp{Pentium} at the
expense of more memory.
+@strong{Warning:} if you use the @samp{-malign-double} switch,
+structures containing the above types will be aligned differently than
+the published application binary interface specifications for the 386.
+
@item -m128bit-long-double
@opindex m128bit-long-double
Control the size of @code{long double} type. i386 application binary interface
@@ -7594,6 +7651,32 @@ by the x86-64 ABI, it is a 128-byte area beyond the location of the
stack pointer that will not be modified by signal or interrupt handlers
and therefore can be used for temporary data without adjusting the stack
pointer. The flag @option{-mno-red-zone} disables this red zone.
+
+@item -mcmodel=small
+@opindex mcmodel=small
+Generate code for the small code model: the program and its symbols must
+be linked in the lower 2 GB of the address space. Pointers are 64 bits.
+Programs can be statically or dynamically linked. This is the default
+code model.
+
+@item -mcmodel=kernel
+@opindex mcmodel=kernel
+Generate code for the kernel code model. The kernel runs in the
+negative 2 GB of the address space.
+This model has to be used for Linux kernel code.
+
+@item -mcmodel=medium
+@opindex mcmodel=medium
+Generate code for the medium model: The program is linked in the lower 2
+GB of the address space but symbols can be located anywhere in the
+address space. Programs can be statically or dynamically linked, but
+building of shared libraries are not supported with the medium model.
+
+@item -mcmodel=large
+@opindex mcmodel=large
+Generate code for the large model: This model makes no assumptions
+about addresses and sizes of sections. Currently GCC does not implement
+this model.
@end table
@node HPPA Options
diff --git a/contrib/gcc/doc/md.texi b/contrib/gcc/doc/md.texi
index c5bfd62..b38ef5e 100644
--- a/contrib/gcc/doc/md.texi
+++ b/contrib/gcc/doc/md.texi
@@ -158,7 +158,9 @@ available in a particular run.
For nameless patterns, the condition is applied only when matching an
individual insn, and only after the insn has matched the pattern's
recognition template. The insn's operands may be found in the vector
-@code{operands}.
+@code{operands}. For an insn where the condition has once matched, it
+can't be used to control register allocation, for example by excluding
+certain hard registers or hard register combinations.
@item
The @dfn{output template}: a string that says how to output matching
@@ -1867,7 +1869,7 @@ A constant in the range supported by @code{movrcc} instructions
@item N
Same as @samp{K}, except that it verifies that bits that are not in the
-lower 32-bits range are all zero. Must be used instead of @samp{K} for
+lower 32-bit range are all zero. Must be used instead of @samp{K} for
modes wider than @code{SImode}
@item G
diff --git a/contrib/gcc/doc/tm.texi b/contrib/gcc/doc/tm.texi
index 3d9e453..2e3ad05 100644
--- a/contrib/gcc/doc/tm.texi
+++ b/contrib/gcc/doc/tm.texi
@@ -1072,9 +1072,11 @@ by the @code{__attribute__ ((aligned (@var{n})))} construct.
@findex ADJUST_FIELD_ALIGN
@item ADJUST_FIELD_ALIGN (@var{field}, @var{computed})
An expression for the alignment of a structure field @var{field} if the
-alignment computed in the usual way is @var{computed}. GCC uses
-this value instead of the value in @code{BIGGEST_ALIGNMENT} or
-@code{BIGGEST_FIELD_ALIGNMENT}, if defined.
+alignment computed in the usual way (including applying of
+@code{BIGGEST_ALIGNMENT} and @code{BIGGEST_FIELD_ALIGNMENT} to the
+alignment) is @var{computed}. It overrides alignment only if the
+field alignment has not been set by the
+@code{__attribute__ ((aligned (@var{n})))} construct.
@findex MAX_OFILE_ALIGNMENT
@item MAX_OFILE_ALIGNMENT
@@ -2454,14 +2456,14 @@ A C expression that is true if, for a register in
@code{CLASS_CANNOT_CHANGE_MODE}, the requested mode punning is invalid.
For the example, loading 32-bit integer or floating-point objects into
-floating-point registers on the Alpha extends them to 64-bits.
+floating-point registers on the Alpha extends them to 64 bits.
Therefore loading a 64-bit object and then storing it as a 32-bit object
-does not store the low-order 32-bits, as would be the case for a normal
+does not store the low-order 32 bits, as would be the case for a normal
register. Therefore, @file{alpha.h} defines @code{CLASS_CANNOT_CHANGE_MODE}
as @code{FLOAT_REGS} and @code{CLASS_CANNOT_CHANGE_MODE_P} restricts
mode changes to same-size modes.
-Compare this to IA-64, which extends floating-point values to 82-bits,
+Compare this to IA-64, which extends floating-point values to 82 bits,
and stores 64-bit integers in a different format than 64-bit doubles.
Therefore @code{CLASS_CANNOT_CHANGE_MODE_P} is always true.
@end table
diff --git a/contrib/gcc/dwarf2out.c b/contrib/gcc/dwarf2out.c
index afd9737..c691dd0 100644
--- a/contrib/gcc/dwarf2out.c
+++ b/contrib/gcc/dwarf2out.c
@@ -417,16 +417,17 @@ expand_builtin_init_dwarf_reg_sizes (address)
rtx addr = expand_expr (address, NULL_RTX, VOIDmode, 0);
rtx mem = gen_rtx_MEM (BLKmode, addr);
- for (i = 0; i < DWARF_FRAME_REGISTERS; i++)
- {
- HOST_WIDE_INT offset = DWARF_FRAME_REGNUM (i) * GET_MODE_SIZE (mode);
- HOST_WIDE_INT size = GET_MODE_SIZE (reg_raw_mode[i]);
+ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
+ if (DWARF_FRAME_REGNUM (i) < DWARF_FRAME_REGISTERS)
+ {
+ HOST_WIDE_INT offset = DWARF_FRAME_REGNUM (i) * GET_MODE_SIZE (mode);
+ HOST_WIDE_INT size = GET_MODE_SIZE (reg_raw_mode[i]);
- if (offset < 0)
- continue;
+ if (offset < 0)
+ continue;
- emit_move_insn (adjust_address (mem, mode, offset), GEN_INT (size));
- }
+ emit_move_insn (adjust_address (mem, mode, offset), GEN_INT (size));
+ }
}
/* Convert a DWARF call frame info. operation to its string name */
@@ -1943,7 +1944,8 @@ output_call_frame_info (for_eh)
fde = &fde_table[i];
/* Don't emit EH unwind info for leaf functions that don't need it. */
- if (for_eh && fde->nothrow && ! fde->uses_eh_lsda)
+ if (!flag_asynchronous_unwind_tables && for_eh && fde->nothrow
+ && ! fde->uses_eh_lsda)
continue;
ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, FDE_LABEL, for_eh + i * 2);
@@ -7571,11 +7573,11 @@ modified_type_die (type, is_const_type, is_volatile_type, context_die)
}
/* We want to equate the qualified type to the die below. */
- if (qualified_type)
- type = qualified_type;
+ type = qualified_type;
}
- equate_type_number_to_die (type, mod_type_die);
+ if (type)
+ equate_type_number_to_die (type, mod_type_die);
if (item_type)
/* We must do this after the equate_type_number_to_die call, in case
this is a recursive type. This ensures that the modified_type_die
@@ -8941,21 +8943,18 @@ rtl_for_decl_location (decl)
== strlen (TREE_STRING_POINTER (init)) + 1))
rtl = gen_rtx_CONST_STRING (VOIDmode, TREE_STRING_POINTER (init));
}
-
-#if 0
- /* We mustn't actually emit anything here, as we might not get a
- chance to emit any symbols we refer to. For the release, don't
- try to get this right. */
- if (rtl == NULL)
+ /* If the initializer is something that we know will expand into an
+ immediate RTL constant, expand it now. Expanding anything else
+ tends to produce unresolved symbols; see debug/5770 and c++/6381. */
+ else if (TREE_CODE (DECL_INITIAL (decl)) == INTEGER_CST
+ || TREE_CODE (DECL_INITIAL (decl)) == REAL_CST)
{
rtl = expand_expr (DECL_INITIAL (decl), NULL_RTX, VOIDmode,
EXPAND_INITIALIZER);
- /* If expand_expr returned a MEM, we cannot use it, since
- it won't be output, leading to unresolved symbol. */
+ /* If expand_expr returns a MEM, it wasn't immediate. */
if (rtl && GET_CODE (rtl) == MEM)
- rtl = NULL;
+ abort ();
}
-#endif
}
#ifdef ASM_SIMPLIFY_DWARF_ADDR
diff --git a/contrib/gcc/dwarfout.c b/contrib/gcc/dwarfout.c
index 76b5b75..481d0c0 100644
--- a/contrib/gcc/dwarfout.c
+++ b/contrib/gcc/dwarfout.c
@@ -2086,7 +2086,8 @@ output_reg_number (rtl)
if (regno >= DWARF_FRAME_REGISTERS)
{
- warning_with_decl (dwarf_last_decl, "internal regno botch: regno = %d\n",
+ warning_with_decl (dwarf_last_decl,
+ "internal regno botch: `%s' has regno = %d\n",
regno);
regno = 0;
}
@@ -2303,7 +2304,8 @@ output_bound_representation (bound, dim_num, u_or_l)
|| TREE_CODE (bound) == CONVERT_EXPR)
bound = TREE_OPERAND (bound, 0);
- if (TREE_CODE (bound) == SAVE_EXPR)
+ if (TREE_CODE (bound) == SAVE_EXPR
+ && SAVE_EXPR_RTL (bound))
output_loc_descriptor
(eliminate_regs (SAVE_EXPR_RTL (bound), 0, NULL_RTX));
}
diff --git a/contrib/gcc/emit-rtl.c b/contrib/gcc/emit-rtl.c
index f6c6761..3510265 100644
--- a/contrib/gcc/emit-rtl.c
+++ b/contrib/gcc/emit-rtl.c
@@ -355,6 +355,14 @@ gen_rtx_CONST_INT (mode, arg)
return (rtx) *slot;
}
+rtx
+gen_int_mode (c, mode)
+ HOST_WIDE_INT c;
+ enum machine_mode mode;
+{
+ return GEN_INT (trunc_int_for_mode (c, mode));
+}
+
/* CONST_DOUBLEs needs special handling because their length is known
only at run-time. */
@@ -831,6 +839,11 @@ gen_lowpart_common (mode, x)
> ((xsize + (UNITS_PER_WORD - 1)) / UNITS_PER_WORD)))
return 0;
+ /* Don't allow generating paradoxical FLOAT_MODE subregs. */
+ if (GET_MODE_CLASS (mode) == MODE_FLOAT
+ && GET_MODE (x) != VOIDmode && msize > xsize)
+ return 0;
+
offset = subreg_lowpart_offset (mode, GET_MODE (x));
if ((GET_CODE (x) == ZERO_EXTEND || GET_CODE (x) == SIGN_EXTEND)
@@ -2161,6 +2174,7 @@ widen_memory_access (memref, mode, offset)
/* Similarly for the decl. */
else if (DECL_P (expr)
&& DECL_SIZE_UNIT (expr)
+ && TREE_CODE (DECL_SIZE_UNIT (expr)) == INTEGER_CST
&& compare_tree_int (DECL_SIZE_UNIT (expr), size) >= 0
&& (! memoffset || INTVAL (memoffset) >= 0))
break;
@@ -5023,7 +5037,7 @@ init_emit_once (line_numbers)
tries to use these variables. */
for (i = - MAX_SAVED_CONST_INT; i <= MAX_SAVED_CONST_INT; i++)
const_int_rtx[i + MAX_SAVED_CONST_INT] =
- gen_rtx_raw_CONST_INT (VOIDmode, i);
+ gen_rtx_raw_CONST_INT (VOIDmode, (HOST_WIDE_INT) i);
ggc_add_rtx_root (const_int_rtx, 2 * MAX_SAVED_CONST_INT + 1);
if (STORE_FLAG_VALUE >= - MAX_SAVED_CONST_INT
diff --git a/contrib/gcc/explow.c b/contrib/gcc/explow.c
index 7a770ee..97435a7 100644
--- a/contrib/gcc/explow.c
+++ b/contrib/gcc/explow.c
@@ -34,6 +34,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "insn-config.h"
#include "ggc.h"
#include "recog.h"
+#include "langhooks.h"
static rtx break_out_memory_refs PARAMS ((rtx));
static void emit_stack_probe PARAMS ((rtx));
@@ -285,20 +286,33 @@ rtx
expr_size (exp)
tree exp;
{
- tree size;
-
- if (TREE_CODE_CLASS (TREE_CODE (exp)) == 'd'
- && DECL_SIZE_UNIT (exp) != 0)
- size = DECL_SIZE_UNIT (exp);
- else
- size = size_in_bytes (TREE_TYPE (exp));
+ tree size = (*lang_hooks.expr_size) (exp);
if (TREE_CODE (size) != INTEGER_CST
&& contains_placeholder_p (size))
size = build (WITH_RECORD_EXPR, sizetype, size, exp);
return expand_expr (size, NULL_RTX, TYPE_MODE (sizetype), 0);
+}
+
+/* Return a wide integer for the size in bytes of the value of EXP, or -1
+ if the size can vary or is larger than an integer. */
+
+HOST_WIDE_INT
+int_expr_size (exp)
+ tree exp;
+{
+ tree t = (*lang_hooks.expr_size) (exp);
+
+ if (t == 0
+ || TREE_CODE (t) != INTEGER_CST
+ || TREE_OVERFLOW (t)
+ || TREE_INT_CST_HIGH (t) != 0
+ /* If the result would appear negative, it's too big to represent. */
+ || (HOST_WIDE_INT) TREE_INT_CST_LOW (t) < 0)
+ return -1;
+ return TREE_INT_CST_LOW (t);
}
/* Return a copy of X in which all memory references
diff --git a/contrib/gcc/expmed.c b/contrib/gcc/expmed.c
index 7836de7..ab127ec 100644
--- a/contrib/gcc/expmed.c
+++ b/contrib/gcc/expmed.c
@@ -3049,9 +3049,12 @@ expand_divmod (rem_flag, code, mode, op0, op1, target, unsignedp)
not straightforward to generalize this. Maybe we should make an array
of possible modes in init_expmed? Save this for GCC 2.7. */
- optab1 = (op1_is_pow2 ? (unsignedp ? lshr_optab : ashr_optab)
+ optab1 = ((op1_is_pow2 && op1 != const0_rtx)
+ ? (unsignedp ? lshr_optab : ashr_optab)
: (unsignedp ? udiv_optab : sdiv_optab));
- optab2 = (op1_is_pow2 ? optab1 : (unsignedp ? udivmod_optab : sdivmod_optab));
+ optab2 = ((op1_is_pow2 && op1 != const0_rtx)
+ ? optab1
+ : (unsignedp ? udivmod_optab : sdivmod_optab));
for (compute_mode = mode; compute_mode != VOIDmode;
compute_mode = GET_MODE_WIDER_MODE (compute_mode))
@@ -4136,6 +4139,12 @@ make_tree (type, x)
build (TRUNC_DIV_EXPR, t,
make_tree (t, XEXP (x, 0)),
make_tree (t, XEXP (x, 1)))));
+
+ case SIGN_EXTEND:
+ case ZERO_EXTEND:
+ t = type_for_mode (GET_MODE (XEXP (x, 0)), GET_CODE (x) == ZERO_EXTEND);
+ return fold (convert (type, make_tree (t, XEXP (x, 0))));
+
default:
t = make_node (RTL_EXPR);
TREE_TYPE (t) = type;
diff --git a/contrib/gcc/expr.c b/contrib/gcc/expr.c
index a6ec546..2a5c6f9 100644
--- a/contrib/gcc/expr.c
+++ b/contrib/gcc/expr.c
@@ -6661,8 +6661,7 @@ expand_expr (exp, target, tmode, modifier)
* TYPE_QUAL_CONST))),
0, TREE_ADDRESSABLE (exp), 1);
- store_constructor (exp, target, 0,
- int_size_in_bytes (TREE_TYPE (exp)));
+ store_constructor (exp, target, 0, int_expr_size (exp));
return target;
}
diff --git a/contrib/gcc/expr.h b/contrib/gcc/expr.h
index 91ffa3f..97d734b 100644
--- a/contrib/gcc/expr.h
+++ b/contrib/gcc/expr.h
@@ -548,6 +548,10 @@ extern unsigned int case_values_threshold PARAMS ((void));
/* Return an rtx for the size in bytes of the value of an expr. */
extern rtx expr_size PARAMS ((tree));
+/* Return a wide integer for the size in bytes of the value of EXP, or -1
+ if the size can vary or is larger than an integer. */
+extern HOST_WIDE_INT int_expr_size PARAMS ((tree));
+
extern rtx lookup_static_chain PARAMS ((tree));
/* Convert a stack slot address ADDR valid in function FNDECL
diff --git a/contrib/gcc/f/ChangeLog b/contrib/gcc/f/ChangeLog
index d3f8626..498e64d 100644
--- a/contrib/gcc/f/ChangeLog
+++ b/contrib/gcc/f/ChangeLog
@@ -1,3 +1,42 @@
+2002-08-30 Alan Modra <amodra@bigpond.net.au>
+
+ * target.h (FFETARGET_32bit_longs): Don't define for powerpc64 or
+ mmix.
+
+2002-08-28 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * bugs.texi, news.texi: Update URLs for online news and bugs
+ lists.
+
+2002-08-14 Release Manager
+
+ * GCC 3.2 Released.
+
+2002-08-04 Toon Moene <toon@moene.indiv.nluug.nl>
+
+ * news.texi: Mention nothing changed for 3.2.
+
+Sun Aug 4 16:48:53 2002 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * root.texi (version-gcc): Increase to 3.2.
+
+2002-07-25 Release Manager
+
+ * GCC 3.1.1 Released.
+
+2002-06-30 Toon Moene <toon@moene.indiv.nluug.nl>
+
+ * news.texi: Mention 2 Gbyte limit on 32-bit targets
+ for arrays explicitly in news on g77-3.1.
+
+2002-05-14 Release Manager
+
+ * GCC 3.1 Released.
+
+2002-05-14 Release Manager
+
+ * GCC 3.1 Released.
+
2002-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
* invoke.texi: Use @gol at ends of lines inside @gccoptlist.
diff --git a/contrib/gcc/f/bugs.texi b/contrib/gcc/f/bugs.texi
index dd50190..bdd8765 100644
--- a/contrib/gcc/f/bugs.texi
+++ b/contrib/gcc/f/bugs.texi
@@ -79,7 +79,7 @@ An online, ``live'' version of this document
(derived directly from the mainline, development version
of @code{g77} within @code{gcc})
is available via
-@uref{http://www.gnu.org/software/gcc/onlinedocs/g77_bugs.html}.
+@uref{http://www.gnu.org/software/gcc/onlinedocs/g77/Trouble.html}.
Follow the ``Known Bugs'' link.
The following information was last updated on @value{last-update-bugs}:
diff --git a/contrib/gcc/f/news.texi b/contrib/gcc/f/news.texi
index beb5184..51ee75e 100644
--- a/contrib/gcc/f/news.texi
+++ b/contrib/gcc/f/news.texi
@@ -10,7 +10,7 @@
@c in the standalone derivations of this file (e.g. NEWS).
@set copyrights-news 1995,1996,1997,1998,1999,2000,2001,2002
-@set last-update-news 2002-04-13
+@set last-update-news 2002-08-05
@include root.texi
@@ -148,11 +148,17 @@ An online, ``live'' version of this document
(derived directly from the mainline, development version
of @command{g77} within @command{gcc})
is available at
-@uref{http://www.gnu.org/software/gcc/onlinedocs/g77_news.html}.
+@uref{http://www.gnu.org/software/gcc/onlinedocs/g77/News.html}.
@end ifclear
The following information was last updated on @value{last-update-news}:
+@heading In @code{GCC} 3.2 versus @code{GCC} 3.1:
+@itemize @bullet
+@item
+Nothing.
+@end itemize
+
@heading In @code{GCC} 3.1 (formerly known as g77-0.5.27) versus @code{GCC} 3.0:
@itemize @bullet
@item
@@ -203,9 +209,10 @@ prog.f:2:
^
Array `a' at (^) is too large to handle
@end smallexample
-because 140 000 000 reals is larger than the largest bit-extent that can be
+because 140 000 000 REALs is larger than the largest bit-extent that can be
expressed in 32 bits. However, bit-sizes never play a role after offsets
-have been converted to byte addresses. Therefore this check has been removed.
+have been converted to byte addresses. Therefore this check has been removed,
+and the limit is now 2 Gbyte of memory (around 530 000 000 REALs).
Note: On GNU/Linux systems one has to compile programs that occupy more
than 1 Gbyte statically, i.e.@: @code{g77 -static ...}.
diff --git a/contrib/gcc/f/root.texi b/contrib/gcc/f/root.texi
index bcc52cf..788084d 100644
--- a/contrib/gcc/f/root.texi
+++ b/contrib/gcc/f/root.texi
@@ -3,7 +3,7 @@
@c (e.g. a release branch in the CVS repository for gcc),
@c clear this and set the version information correctly.
@clear DEVELOPMENT
-@set version-gcc 3.1
+@set version-gcc 3.2
@set email-general gcc@@gcc.gnu.org
@set email-help gcc-help@@gcc.gnu.org
diff --git a/contrib/gcc/f/target.h b/contrib/gcc/f/target.h
index 09fbe5f..df73dab 100644
--- a/contrib/gcc/f/target.h
+++ b/contrib/gcc/f/target.h
@@ -1,5 +1,5 @@
/* target.h -- Public #include File (module.h template V1.0)
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2002 Free Software Foundation, Inc.
Contributed by James Craig Burley.
This file is part of GNU Fortran.
@@ -234,7 +234,15 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define FFETARGET_f2cTYLOGICAL2 13
#define FFETARGET_f2cTYQUAD 14
-#if !defined(__alpha__) && (!defined (_ARCH_PPC) || !defined (__64BIT__)) && (!defined(__sparc__) || (!defined(__sparcv9) && !defined(__arch64__))) && (!defined(__ia64__) || !defined(__LP64__)) && (!defined(__hppa__) || !defined(__LP64__)) && !defined(__s390x__) && !defined(__x86_64__)
+#if (!defined(__alpha__) \
+ && (!defined(__hppa__) || !defined(__LP64__)) \
+ && (!defined(__ia64__) || !defined(__LP64__)) \
+ && !defined(__MMIX__) \
+ && (!defined (_ARCH_PPC) || !defined (__64BIT__)) \
+ && !defined(__powerpc64__) \
+ && !defined(__s390x__) \
+ && (!defined(__sparc__) || (!defined(__sparcv9) && !defined(__arch64__)))\
+ && !defined(__x86_64__))
#define FFETARGET_32bit_longs
#endif
diff --git a/contrib/gcc/f/version.c b/contrib/gcc/f/version.c
index d447ab6..bfda27c 100644
--- a/contrib/gcc/f/version.c
+++ b/contrib/gcc/f/version.c
@@ -1,4 +1,4 @@
#include "ansidecl.h"
#include "f/version.h"
-const char *const ffe_version_string = "3.1 20020509 (prerelease)";
+const char *const ffe_version_string = "3.2.1 20020831 (prerelease)";
diff --git a/contrib/gcc/final.c b/contrib/gcc/final.c
index 34eda6c..d86ed5e 100644
--- a/contrib/gcc/final.c
+++ b/contrib/gcc/final.c
@@ -3021,6 +3021,9 @@ get_mem_expr_from_op (op, paddressp)
*paddressp = 0;
+ if (op == NULL)
+ return 0;
+
if (GET_CODE (op) == REG && ORIGINAL_REGNO (op) >= FIRST_PSEUDO_REGISTER)
return REGNO_DECL (ORIGINAL_REGNO (op));
else if (GET_CODE (op) != MEM)
diff --git a/contrib/gcc/flow.c b/contrib/gcc/flow.c
index 09c1094..8fabc2a 100644
--- a/contrib/gcc/flow.c
+++ b/contrib/gcc/flow.c
@@ -1626,7 +1626,42 @@ propagate_one_insn (pbi, insn)
if (libcall_is_dead)
prev = propagate_block_delete_libcall ( insn, note);
else
- propagate_block_delete_insn (pbi->bb, insn);
+ {
+
+ /* If INSN contains a RETVAL note and is dead, but the libcall
+ as a whole is not dead, then we want to remove INSN, but
+ not the whole libcall sequence.
+
+ However, we need to also remove the dangling REG_LIBCALL
+ note so that we do not have mis-matched LIBCALL/RETVAL
+ notes. In theory we could find a new location for the
+ REG_RETVAL note, but it hardly seems worth the effort.
+
+ NOTE at this point will be the RETVAL note if it exists. */
+ if (note)
+ {
+ rtx libcall_note;
+
+ libcall_note
+ = find_reg_note (XEXP (note, 0), REG_LIBCALL, NULL_RTX);
+ remove_note (XEXP (note, 0), libcall_note);
+ }
+
+ /* Similarly if INSN contains a LIBCALL note, remove the
+ dangling REG_RETVAL note. */
+ note = find_reg_note (insn, REG_LIBCALL, NULL_RTX);
+ if (note)
+ {
+ rtx retval_note;
+
+ retval_note
+ = find_reg_note (XEXP (note, 0), REG_RETVAL, NULL_RTX);
+ remove_note (XEXP (note, 0), retval_note);
+ }
+
+ /* Now delete INSN. */
+ propagate_block_delete_insn (pbi->bb, insn);
+ }
return prev;
}
diff --git a/contrib/gcc/fold-const.c b/contrib/gcc/fold-const.c
index 2169998..a7e1e28 100644
--- a/contrib/gcc/fold-const.c
+++ b/contrib/gcc/fold-const.c
@@ -4515,17 +4515,22 @@ extract_muldiv (t, c, code, wide_type)
break;
case CONVERT_EXPR: case NON_LVALUE_EXPR: case NOP_EXPR:
- /* If op0 is an expression, and is unsigned, and the type is
- smaller than ctype, then we cannot widen the expression. */
+ /* If op0 is an expression... */
if ((TREE_CODE_CLASS (TREE_CODE (op0)) == '<'
|| TREE_CODE_CLASS (TREE_CODE (op0)) == '1'
|| TREE_CODE_CLASS (TREE_CODE (op0)) == '2'
|| TREE_CODE_CLASS (TREE_CODE (op0)) == 'e')
- && TREE_UNSIGNED (TREE_TYPE (op0))
- && ! (TREE_CODE (TREE_TYPE (op0)) == INTEGER_TYPE
- && TYPE_IS_SIZETYPE (TREE_TYPE (op0)))
- && (GET_MODE_SIZE (TYPE_MODE (ctype))
- > GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (op0)))))
+ /* ...and is unsigned, and its type is smaller than ctype,
+ then we cannot pass through this widening. */
+ && ((TREE_UNSIGNED (TREE_TYPE (op0))
+ && ! (TREE_CODE (TREE_TYPE (op0)) == INTEGER_TYPE
+ && TYPE_IS_SIZETYPE (TREE_TYPE (op0)))
+ && (GET_MODE_SIZE (TYPE_MODE (ctype))
+ > GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (op0)))))
+ /* ...and its type is larger than ctype,
+ then we cannot pass through this truncation. */
+ || (GET_MODE_SIZE (TYPE_MODE (ctype))
+ < GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (op0))))))
break;
/* Pass the constant down and see if we can make a simplification. If
@@ -6490,7 +6495,125 @@ fold (expr)
}
}
- /* Change X >= CST to X > (CST - 1) if CST is positive. */
+ /* Comparisons with the highest or lowest possible integer of
+ the specified size will have known values and an unsigned
+ <= 0x7fffffff can be simplified. */
+ {
+ int width = GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (arg1)));
+
+ if (TREE_CODE (arg1) == INTEGER_CST
+ && ! TREE_CONSTANT_OVERFLOW (arg1)
+ && width <= HOST_BITS_PER_WIDE_INT
+ && (INTEGRAL_TYPE_P (TREE_TYPE (arg1))
+ || POINTER_TYPE_P (TREE_TYPE (arg1))))
+ {
+ if (TREE_INT_CST_HIGH (arg1) == 0
+ && (TREE_INT_CST_LOW (arg1)
+ == ((unsigned HOST_WIDE_INT) 1 << (width - 1)) - 1)
+ && ! TREE_UNSIGNED (TREE_TYPE (arg1)))
+ switch (TREE_CODE (t))
+ {
+ case GT_EXPR:
+ return omit_one_operand (type,
+ convert (type, integer_zero_node),
+ arg0);
+ case GE_EXPR:
+ TREE_SET_CODE (t, EQ_EXPR);
+ break;
+
+ case LE_EXPR:
+ return omit_one_operand (type,
+ convert (type, integer_one_node),
+ arg0);
+ case LT_EXPR:
+ TREE_SET_CODE (t, NE_EXPR);
+ break;
+
+ default:
+ break;
+ }
+
+ else if (TREE_INT_CST_HIGH (arg1) == -1
+ && (TREE_INT_CST_LOW (arg1)
+ == ((unsigned HOST_WIDE_INT) 1 << (width - 1)))
+ && ! TREE_UNSIGNED (TREE_TYPE (arg1)))
+ switch (TREE_CODE (t))
+ {
+ case LT_EXPR:
+ return omit_one_operand (type,
+ convert (type, integer_zero_node),
+ arg0);
+ case LE_EXPR:
+ TREE_SET_CODE (t, EQ_EXPR);
+ break;
+
+ case GE_EXPR:
+ return omit_one_operand (type,
+ convert (type, integer_one_node),
+ arg0);
+ case GT_EXPR:
+ TREE_SET_CODE (t, NE_EXPR);
+ break;
+
+ default:
+ break;
+ }
+
+ else if (TREE_INT_CST_HIGH (arg1) == 0
+ && (TREE_INT_CST_LOW (arg1)
+ == ((unsigned HOST_WIDE_INT) 1 << (width - 1)) - 1)
+ && TREE_UNSIGNED (TREE_TYPE (arg1))
+ /* signed_type does not work on pointer types. */
+ && INTEGRAL_TYPE_P (TREE_TYPE (arg1)))
+ switch (TREE_CODE (t))
+ {
+ case LE_EXPR:
+ return fold (build (GE_EXPR, type,
+ convert (signed_type (TREE_TYPE (arg0)),
+ arg0),
+ convert (signed_type (TREE_TYPE (arg1)),
+ integer_zero_node)));
+ case GT_EXPR:
+ return fold (build (LT_EXPR, type,
+ convert (signed_type (TREE_TYPE (arg0)),
+ arg0),
+ convert (signed_type (TREE_TYPE (arg1)),
+ integer_zero_node)));
+
+ default:
+ break;
+ }
+
+ else if (TREE_INT_CST_HIGH (arg1) == 0
+ && (TREE_INT_CST_LOW (arg1)
+ == ((unsigned HOST_WIDE_INT) 2 << (width - 1)) - 1)
+ && TREE_UNSIGNED (TREE_TYPE (arg1)))
+ switch (TREE_CODE (t))
+ {
+ case GT_EXPR:
+ return omit_one_operand (type,
+ convert (type, integer_zero_node),
+ arg0);
+ case GE_EXPR:
+ TREE_SET_CODE (t, EQ_EXPR);
+ break;
+
+ case LE_EXPR:
+ return omit_one_operand (type,
+ convert (type, integer_one_node),
+ arg0);
+ case LT_EXPR:
+ TREE_SET_CODE (t, NE_EXPR);
+ break;
+
+ default:
+ break;
+ }
+ }
+ }
+
+ /* Change X >= CST to X > (CST - 1) and X < CST to X <= (CST - 1)
+ if CST is positive. */
if (TREE_CODE (arg1) == INTEGER_CST
&& TREE_CODE (arg0) != INTEGER_CST
&& tree_int_cst_sgn (arg1) > 0)
@@ -6514,6 +6637,35 @@ fold (expr)
}
}
+ /* An unsigned comparison against 0 can be simplified. */
+ if (integer_zerop (arg1)
+ && (INTEGRAL_TYPE_P (TREE_TYPE (arg1))
+ || POINTER_TYPE_P (TREE_TYPE (arg1)))
+ && TREE_UNSIGNED (TREE_TYPE (arg1)))
+ {
+ switch (TREE_CODE (t))
+ {
+ case GT_EXPR:
+ code = NE_EXPR;
+ TREE_SET_CODE (t, NE_EXPR);
+ break;
+ case LE_EXPR:
+ code = EQ_EXPR;
+ TREE_SET_CODE (t, EQ_EXPR);
+ break;
+ case GE_EXPR:
+ return omit_one_operand (type,
+ convert (type, integer_one_node),
+ arg0);
+ case LT_EXPR:
+ return omit_one_operand (type,
+ convert (type, integer_zero_node),
+ arg0);
+ default:
+ break;
+ }
+ }
+
/* If this is an EQ or NE comparison of a constant with a PLUS_EXPR or
a MINUS_EXPR of a constant, we can convert it into a comparison with
a revised constant as long as no overflow occurs. */
@@ -6702,152 +6854,6 @@ fold (expr)
}
}
- /* An unsigned comparison against 0 can be simplified. */
- if (integer_zerop (arg1)
- && (INTEGRAL_TYPE_P (TREE_TYPE (arg1))
- || POINTER_TYPE_P (TREE_TYPE (arg1)))
- && TREE_UNSIGNED (TREE_TYPE (arg1)))
- {
- switch (TREE_CODE (t))
- {
- case GT_EXPR:
- code = NE_EXPR;
- TREE_SET_CODE (t, NE_EXPR);
- break;
- case LE_EXPR:
- code = EQ_EXPR;
- TREE_SET_CODE (t, EQ_EXPR);
- break;
- case GE_EXPR:
- return omit_one_operand (type,
- convert (type, integer_one_node),
- arg0);
- case LT_EXPR:
- return omit_one_operand (type,
- convert (type, integer_zero_node),
- arg0);
- default:
- break;
- }
- }
-
- /* Comparisons with the highest or lowest possible integer of
- the specified size will have known values and an unsigned
- <= 0x7fffffff can be simplified. */
- {
- int width = GET_MODE_BITSIZE (TYPE_MODE (TREE_TYPE (arg1)));
-
- if (TREE_CODE (arg1) == INTEGER_CST
- && ! TREE_CONSTANT_OVERFLOW (arg1)
- && width <= HOST_BITS_PER_WIDE_INT
- && (INTEGRAL_TYPE_P (TREE_TYPE (arg1))
- || POINTER_TYPE_P (TREE_TYPE (arg1))))
- {
- if (TREE_INT_CST_HIGH (arg1) == 0
- && (TREE_INT_CST_LOW (arg1)
- == ((unsigned HOST_WIDE_INT) 1 << (width - 1)) - 1)
- && ! TREE_UNSIGNED (TREE_TYPE (arg1)))
- switch (TREE_CODE (t))
- {
- case GT_EXPR:
- return omit_one_operand (type,
- convert (type, integer_zero_node),
- arg0);
- case GE_EXPR:
- TREE_SET_CODE (t, EQ_EXPR);
- break;
-
- case LE_EXPR:
- return omit_one_operand (type,
- convert (type, integer_one_node),
- arg0);
- case LT_EXPR:
- TREE_SET_CODE (t, NE_EXPR);
- break;
-
- default:
- break;
- }
-
- else if (TREE_INT_CST_HIGH (arg1) == -1
- && (TREE_INT_CST_LOW (arg1)
- == ((unsigned HOST_WIDE_INT) 1 << (width - 1)))
- && ! TREE_UNSIGNED (TREE_TYPE (arg1)))
- switch (TREE_CODE (t))
- {
- case LT_EXPR:
- return omit_one_operand (type,
- convert (type, integer_zero_node),
- arg0);
- case LE_EXPR:
- TREE_SET_CODE (t, EQ_EXPR);
- break;
-
- case GE_EXPR:
- return omit_one_operand (type,
- convert (type, integer_one_node),
- arg0);
- case GT_EXPR:
- TREE_SET_CODE (t, NE_EXPR);
- break;
-
- default:
- break;
- }
-
- else if (TREE_INT_CST_HIGH (arg1) == 0
- && (TREE_INT_CST_LOW (arg1)
- == ((unsigned HOST_WIDE_INT) 1 << (width - 1)) - 1)
- && TREE_UNSIGNED (TREE_TYPE (arg1))
- /* signed_type does not work on pointer types. */
- && INTEGRAL_TYPE_P (TREE_TYPE (arg1)))
- switch (TREE_CODE (t))
- {
- case LE_EXPR:
- return fold (build (GE_EXPR, type,
- convert (signed_type (TREE_TYPE (arg0)),
- arg0),
- convert (signed_type (TREE_TYPE (arg1)),
- integer_zero_node)));
- case GT_EXPR:
- return fold (build (LT_EXPR, type,
- convert (signed_type (TREE_TYPE (arg0)),
- arg0),
- convert (signed_type (TREE_TYPE (arg1)),
- integer_zero_node)));
-
- default:
- break;
- }
-
- else if (TREE_INT_CST_HIGH (arg1) == 0
- && (TREE_INT_CST_LOW (arg1)
- == ((unsigned HOST_WIDE_INT) 2 << (width - 1)) - 1)
- && TREE_UNSIGNED (TREE_TYPE (arg1)))
- switch (TREE_CODE (t))
- {
- case GT_EXPR:
- return omit_one_operand (type,
- convert (type, integer_zero_node),
- arg0);
- case GE_EXPR:
- TREE_SET_CODE (t, EQ_EXPR);
- break;
-
- case LE_EXPR:
- return omit_one_operand (type,
- convert (type, integer_one_node),
- arg0);
- case LT_EXPR:
- TREE_SET_CODE (t, NE_EXPR);
- break;
-
- default:
- break;
- }
- }
- }
-
/* If we are comparing an expression that just has comparisons
of two integer values, arithmetic expressions of those comparisons,
and constants, we can simplify it. There are only three cases
diff --git a/contrib/gcc/function.c b/contrib/gcc/function.c
index 72c64a0..9ddf676 100644
--- a/contrib/gcc/function.c
+++ b/contrib/gcc/function.c
@@ -666,6 +666,7 @@ assign_stack_temp_for_type (mode, size, keep, type)
{
unsigned int align;
struct temp_slot *p, *best_p = 0;
+ rtx slot;
/* If SIZE is -1 it means that somebody tried to allocate a temporary
of a variable size. */
@@ -811,29 +812,26 @@ assign_stack_temp_for_type (mode, size, keep, type)
p->keep = keep;
}
- /* We may be reusing an old slot, so clear any MEM flags that may have been
- set from before. */
- RTX_UNCHANGING_P (p->slot) = 0;
- MEM_IN_STRUCT_P (p->slot) = 0;
- MEM_SCALAR_P (p->slot) = 0;
- MEM_VOLATILE_P (p->slot) = 0;
- set_mem_alias_set (p->slot, 0);
+
+ /* Create a new MEM rtx to avoid clobbering MEM flags of old slots. */
+ slot = gen_rtx_MEM (mode, XEXP (p->slot, 0));
+ stack_slot_list = gen_rtx_EXPR_LIST (VOIDmode, slot, stack_slot_list);
/* If we know the alias set for the memory that will be used, use
it. If there's no TYPE, then we don't know anything about the
alias set for the memory. */
- set_mem_alias_set (p->slot, type ? get_alias_set (type) : 0);
- set_mem_align (p->slot, align);
+ set_mem_alias_set (slot, type ? get_alias_set (type) : 0);
+ set_mem_align (slot, align);
/* If a type is specified, set the relevant flags. */
if (type != 0)
{
- RTX_UNCHANGING_P (p->slot) = TYPE_READONLY (type);
- MEM_VOLATILE_P (p->slot) = TYPE_VOLATILE (type);
- MEM_SET_IN_STRUCT_P (p->slot, AGGREGATE_TYPE_P (type));
+ RTX_UNCHANGING_P (slot) = TYPE_READONLY (type);
+ MEM_VOLATILE_P (slot) = TYPE_VOLATILE (type);
+ MEM_SET_IN_STRUCT_P (slot, AGGREGATE_TYPE_P (type));
}
- return p->slot;
+ return slot;
}
/* Allocate a temporary stack slot and record it for possible later
diff --git a/contrib/gcc/gcc.c b/contrib/gcc/gcc.c
index b594be6..9604516 100644
--- a/contrib/gcc/gcc.c
+++ b/contrib/gcc/gcc.c
@@ -675,7 +675,7 @@ static const char *cpp_unique_options =
%{MMD:-MMD %W{!o: %b.d}%W{o*:%.d%*}}\
%{M} %{MM} %W{MF*} %{MG} %{MP} %{MQ*} %{MT*}\
%{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}}\
- %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
+ %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3 -D__GXX_ABI_VERSION=102}\
%{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs}\
%{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
%{fno-inline|O0|!O*:-D__NO_INLINE__} %{ffast-math:-D__FAST_MATH__}\
diff --git a/contrib/gcc/haifa-sched.c b/contrib/gcc/haifa-sched.c
index 686369d..1d67afb 100644
--- a/contrib/gcc/haifa-sched.c
+++ b/contrib/gcc/haifa-sched.c
@@ -1601,6 +1601,8 @@ move_insn (insn, last)
retval = reemit_notes (insn, insn);
else
reemit_notes (insn, insn);
+ /* Consume SCHED_GROUP_P flag. */
+ SCHED_GROUP_P (insn) = 0;
insn = prev;
}
@@ -1764,7 +1766,10 @@ schedule_block (b, rgn_n_insns)
can_issue_more =
(*targetm.sched.variable_issue) (sched_dump, sched_verbose,
insn, can_issue_more);
- else
+ /* A naked CLOBBER or USE generates no instruction, so do
+ not count them against the issue rate. */
+ else if (GET_CODE (PATTERN (insn)) != USE
+ && GET_CODE (PATTERN (insn)) != CLOBBER)
can_issue_more--;
schedule_insn (insn, &ready, clock_var);
diff --git a/contrib/gcc/hooks.c b/contrib/gcc/hooks.c
index 387f4db..3fd876a 100644
--- a/contrib/gcc/hooks.c
+++ b/contrib/gcc/hooks.c
@@ -26,6 +26,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "system.h"
#include "hooks.h"
+/* Generic hook that does absolutely zappo. */
+void
+hook_void_void ()
+{
+}
+
/* Generic hook that takes no arguments and returns false. */
bool
hook_void_bool_false ()
diff --git a/contrib/gcc/hooks.h b/contrib/gcc/hooks.h
index 7a8daa5..763ab8e 100644
--- a/contrib/gcc/hooks.h
+++ b/contrib/gcc/hooks.h
@@ -19,4 +19,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
You are forbidden to forbid anyone else to use, share and improve
what you give them. Help stamp out software-hoarding! */
+#ifndef GCC_HOOKS_H
+#define GCC_HOOKS_H
+
bool hook_void_bool_false PARAMS ((void));
+void hook_void_void PARAMS ((void));
+
+#endif
diff --git a/contrib/gcc/ifcvt.c b/contrib/gcc/ifcvt.c
index 0d65eab..166c59c 100644
--- a/contrib/gcc/ifcvt.c
+++ b/contrib/gcc/ifcvt.c
@@ -1504,45 +1504,73 @@ noce_try_abs (if_info)
return TRUE;
}
-/* Look for the condition for the jump first. We'd prefer to avoid
- get_condition if we can -- it tries to look back for the contents
- of an original compare. On targets that use normal integers for
- comparisons, e.g. alpha, this is wasteful. */
+/* Similar to get_condition, only the resulting condition must be
+ valid at JUMP, instead of at EARLIEST. */
static rtx
noce_get_condition (jump, earliest)
rtx jump;
rtx *earliest;
{
- rtx cond;
- rtx set;
-
- /* If the condition variable is a register and is MODE_INT, accept it.
- Otherwise, fall back on get_condition. */
+ rtx cond, set, tmp, insn;
+ bool reverse;
if (! any_condjump_p (jump))
return NULL_RTX;
set = pc_set (jump);
+ /* If this branches to JUMP_LABEL when the condition is false,
+ reverse the condition. */
+ reverse = (GET_CODE (XEXP (SET_SRC (set), 2)) == LABEL_REF
+ && XEXP (XEXP (SET_SRC (set), 2), 0) == JUMP_LABEL (jump));
+
+ /* If the condition variable is a register and is MODE_INT, accept it. */
+
cond = XEXP (SET_SRC (set), 0);
- if (GET_CODE (XEXP (cond, 0)) == REG
- && GET_MODE_CLASS (GET_MODE (XEXP (cond, 0))) == MODE_INT)
+ tmp = XEXP (cond, 0);
+ if (REG_P (tmp) && GET_MODE_CLASS (GET_MODE (tmp)) == MODE_INT)
{
*earliest = jump;
- /* If this branches to JUMP_LABEL when the condition is false,
- reverse the condition. */
- if (GET_CODE (XEXP (SET_SRC (set), 2)) == LABEL_REF
- && XEXP (XEXP (SET_SRC (set), 2), 0) == JUMP_LABEL (jump))
+ if (reverse)
cond = gen_rtx_fmt_ee (reverse_condition (GET_CODE (cond)),
- GET_MODE (cond), XEXP (cond, 0),
- XEXP (cond, 1));
+ GET_MODE (cond), tmp, XEXP (cond, 1));
+ return cond;
}
- else
- cond = get_condition (jump, earliest);
- return cond;
+ /* Otherwise, fall back on canonicalize_condition to do the dirty
+ work of manipulating MODE_CC values and COMPARE rtx codes. */
+
+ tmp = canonicalize_condition (jump, cond, reverse, earliest, NULL_RTX);
+ if (!tmp)
+ return NULL_RTX;
+
+ /* We are going to insert code before JUMP, not before EARLIEST.
+ We must therefore be certain that the given condition is valid
+ at JUMP by virtue of not having been modified since. */
+ for (insn = *earliest; insn != jump; insn = NEXT_INSN (insn))
+ if (INSN_P (insn) && modified_in_p (tmp, insn))
+ break;
+ if (insn == jump)
+ return tmp;
+
+ /* The condition was modified. See if we can get a partial result
+ that doesn't follow all the reversals. Perhaps combine can fold
+ them together later. */
+ tmp = XEXP (tmp, 0);
+ if (!REG_P (tmp) || GET_MODE_CLASS (GET_MODE (tmp)) != MODE_INT)
+ return NULL_RTX;
+ tmp = canonicalize_condition (jump, cond, reverse, earliest, tmp);
+ if (!tmp)
+ return NULL_RTX;
+
+ /* For sanity's sake, re-validate the new result. */
+ for (insn = *earliest; insn != jump; insn = NEXT_INSN (insn))
+ if (INSN_P (insn) && modified_in_p (tmp, insn))
+ return NULL_RTX;
+
+ return tmp;
}
/* Return true if OP is ok for if-then-else processing. */
diff --git a/contrib/gcc/langhooks-def.h b/contrib/gcc/langhooks-def.h
index be8304a..e80b798 100644
--- a/contrib/gcc/langhooks-def.h
+++ b/contrib/gcc/langhooks-def.h
@@ -22,6 +22,8 @@ Boston, MA 02111-1307, USA. */
#ifndef GCC_LANG_HOOKS_DEF_H
#define GCC_LANG_HOOKS_DEF_H
+#include "hooks.h"
+
/* Provide a hook routine for alias sets that always returns 1. This is
used by languages that haven't deal with alias sets yet. */
extern HOST_WIDE_INT hook_get_alias_set_0 PARAMS ((tree));
@@ -46,6 +48,7 @@ extern int lhd_staticp PARAMS ((tree));
extern void lhd_clear_binding_stack PARAMS ((void));
extern void lhd_print_tree_nothing PARAMS ((FILE *, tree, int));
extern void lhd_set_yydebug PARAMS ((int));
+extern tree lhd_expr_size PARAMS ((tree));
/* Declarations of default tree inlining hooks. */
tree lhd_tree_inlining_walk_subtrees PARAMS ((tree *, int *,
@@ -71,7 +74,7 @@ tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree));
#define LANG_HOOKS_CLEAR_BINDING_STACK lhd_clear_binding_stack
#define LANG_HOOKS_INIT_OPTIONS lhd_do_nothing
#define LANG_HOOKS_DECODE_OPTION lhd_decode_option
-#define LANG_HOOKS_POST_OPTIONS lhd_do_nothing
+#define LANG_HOOKS_POST_OPTIONS hook_void_void
#define LANG_HOOKS_GET_ALIAS_SET lhd_get_alias_set
#define LANG_HOOKS_EXPAND_CONSTANT lhd_return_tree
#define LANG_HOOKS_SAFE_FROM_P lhd_safe_from_p
@@ -83,6 +86,7 @@ tree lhd_tree_inlining_convert_parm_for_inlining PARAMS ((tree, tree, tree));
#define LANG_HOOKS_PRINT_TYPE lhd_print_tree_nothing
#define LANG_HOOKS_PRINT_IDENTIFIER lhd_print_tree_nothing
#define LANG_HOOKS_SET_YYDEBUG lhd_set_yydebug
+#define LANG_HOOKS_EXPR_SIZE lhd_expr_size
/* Tree inlining hooks. */
#define LANG_HOOKS_TREE_INLINING_WALK_SUBTREES lhd_tree_inlining_walk_subtrees
@@ -154,6 +158,7 @@ int lhd_tree_dump_type_quals PARAMS ((tree));
LANG_HOOKS_PRINT_TYPE, \
LANG_HOOKS_PRINT_IDENTIFIER, \
LANG_HOOKS_SET_YYDEBUG, \
+ LANG_HOOKS_EXPR_SIZE, \
LANG_HOOKS_TREE_INLINING_INITIALIZER, \
LANG_HOOKS_TREE_DUMP_INITIALIZER \
}
diff --git a/contrib/gcc/langhooks.c b/contrib/gcc/langhooks.c
index c0ee16c..e50ebc9 100644
--- a/contrib/gcc/langhooks.c
+++ b/contrib/gcc/langhooks.c
@@ -303,3 +303,16 @@ lhd_tree_dump_type_quals (t)
return TYPE_QUALS (t);
}
+/* lang_hooks.expr_size: Determine the size of the value of an expression T
+ in a language-specific way. Returns a tree for the size in bytes. */
+
+tree
+lhd_expr_size (exp)
+ tree exp;
+{
+ if (TREE_CODE_CLASS (TREE_CODE (exp)) == 'd'
+ && DECL_SIZE_UNIT (exp) != 0)
+ return DECL_SIZE_UNIT (exp);
+ else
+ return size_in_bytes (TREE_TYPE (exp));
+}
diff --git a/contrib/gcc/langhooks.h b/contrib/gcc/langhooks.h
index 56b818f..7a3c3bd 100644
--- a/contrib/gcc/langhooks.h
+++ b/contrib/gcc/langhooks.h
@@ -93,7 +93,10 @@ struct lang_hooks
/* Called when all command line options have been parsed. Should do
any required consistency checks, modifications etc. Complex
initialization should be left to the "init" callback, since GC
- and the identifier hashes are set up between now and then. */
+ and the identifier hashes are set up between now and then.
+
+ If errorcount is non-zero after this call the compiler exits
+ immediately and the finish hook is not called. */
void (*post_options) PARAMS ((void));
/* Called after post_options, to initialize the front end. The main
@@ -153,6 +156,12 @@ struct lang_hooks
warning that the front end does not use such a parser. */
void (*set_yydebug) PARAMS ((int));
+ /* Called from expr_size to calculate the size of the value of an
+ expression in a language-dependent way. Returns a tree for the size
+ in bytes. A frontend can call lhd_expr_size to get the default
+ semantics in cases that it doesn't want to handle specially. */
+ tree (*expr_size) PARAMS ((tree));
+
struct lang_hooks_for_tree_inlining tree_inlining;
struct lang_hooks_for_tree_dump tree_dump;
diff --git a/contrib/gcc/libgcc2.c b/contrib/gcc/libgcc2.c
index 08bfc34..59d48d8 100644
--- a/contrib/gcc/libgcc2.c
+++ b/contrib/gcc/libgcc2.c
@@ -1288,9 +1288,6 @@ struct bb
char *flags;
};
-#ifdef BLOCK_PROFILER_CODE
-BLOCK_PROFILER_CODE
-#else
#ifndef inhibit_libc
/* Simple minded basic block profiling output dumper for
@@ -1491,7 +1488,6 @@ __bb_fork_func (void)
}
#endif /* not inhibit_libc */
-#endif /* not BLOCK_PROFILER_CODE */
#endif /* L_bb */
#ifdef L_clear_cache
diff --git a/contrib/gcc/local-alloc.c b/contrib/gcc/local-alloc.c
index c11398f..05d0bde 100644
--- a/contrib/gcc/local-alloc.c
+++ b/contrib/gcc/local-alloc.c
@@ -245,7 +245,7 @@ static rtx this_insn;
struct equivalence
{
/* Set when an attempt should be made to replace a register
- with the associated src entry. */
+ with the associated src_p entry. */
char replace;
@@ -255,7 +255,7 @@ struct equivalence
rtx replacement;
- rtx src;
+ rtx *src_p;
/* Loop depth is used to recognize equivalences which appear
to be present within the same loop (or in an inner loop). */
@@ -1004,7 +1004,7 @@ update_equiv_regs ()
recorded_label_ref = 1;
reg_equiv[regno].replacement = XEXP (note, 0);
- reg_equiv[regno].src = src;
+ reg_equiv[regno].src_p = &SET_SRC (set);
reg_equiv[regno].loop_depth = loop_depth;
/* Don't mess with things live during setjmp. */
@@ -1086,7 +1086,7 @@ update_equiv_regs ()
if (asm_noperands (PATTERN (equiv_insn)) < 0
&& validate_replace_rtx (regno_reg_rtx[regno],
- reg_equiv[regno].src, insn))
+ *(reg_equiv[regno].src_p), insn))
{
rtx equiv_link;
rtx last_link;
diff --git a/contrib/gcc/loop.c b/contrib/gcc/loop.c
index d653b5c..4045ced 100644
--- a/contrib/gcc/loop.c
+++ b/contrib/gcc/loop.c
@@ -4039,6 +4039,7 @@ emit_prefetch_instructions (loop)
int bytes_ahead = PREFETCH_BLOCK * (ahead + y);
rtx before_insn = info[i].giv->insn;
rtx prev_insn = PREV_INSN (info[i].giv->insn);
+ rtx seq;
/* We can save some effort by offsetting the address on
architectures with offsettable memory references. */
@@ -4053,14 +4054,17 @@ emit_prefetch_instructions (loop)
loc = reg;
}
+ start_sequence ();
/* Make sure the address operand is valid for prefetch. */
if (! (*insn_data[(int)CODE_FOR_prefetch].operand[0].predicate)
(loc,
insn_data[(int)CODE_FOR_prefetch].operand[0].mode))
loc = force_reg (Pmode, loc);
- emit_insn_before (gen_prefetch (loc, GEN_INT (info[i].write),
- GEN_INT (3)),
- before_insn);
+ emit_insn (gen_prefetch (loc, GEN_INT (info[i].write),
+ GEN_INT (3)));
+ seq = gen_sequence ();
+ end_sequence ();
+ emit_insn_before (seq, before_insn);
/* Check all insns emitted and record the new GIV
information. */
@@ -5847,7 +5851,7 @@ check_final_value (loop, v)
#endif
if ((final_value = final_giv_value (loop, v))
- && (v->always_computable || last_use_this_basic_block (v->dest_reg, v->insn)))
+ && (v->always_executed || last_use_this_basic_block (v->dest_reg, v->insn)))
{
int biv_increment_seen = 0, before_giv_insn = 0;
rtx p = v->insn;
diff --git a/contrib/gcc/objc/Make-lang.in b/contrib/gcc/objc/Make-lang.in
index bc5f709..379a16c 100644
--- a/contrib/gcc/objc/Make-lang.in
+++ b/contrib/gcc/objc/Make-lang.in
@@ -93,7 +93,7 @@ objc-act.o : $(srcdir)/objc/objc-act.c \
$(srcdir)/c-tree.h $(srcdir)/c-common.h $(srcdir)/c-lex.h \
$(srcdir)/toplev.h $(srcdir)/flags.h $(srcdir)/objc/objc-act.h \
$(srcdir)/input.h $(srcdir)/function.h $(srcdir)/output.h $(srcdir)/debug.h \
- $(srcdir)/langhooks.h $(srcdir)/langhooks-def.h
+ $(srcdir)/langhooks.h $(LANGHOOKS_DEF_H)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -I$(srcdir)/objc \
-c $(srcdir)/objc/objc-act.c
diff --git a/contrib/gcc/objc/objc-lang.c b/contrib/gcc/objc/objc-lang.c
index 874a9c3..9effd14 100644
--- a/contrib/gcc/objc/objc-lang.c
+++ b/contrib/gcc/objc/objc-lang.c
@@ -1,5 +1,5 @@
/* Language-dependent hooks for Objective-C.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
Contributed by Ziemowit Laski <zlaski@apple.com>
This file is part of GNU CC.
@@ -30,10 +30,9 @@ Boston, MA 02111-1307, USA. */
#include "langhooks-def.h"
static void objc_init_options PARAMS ((void));
-static void objc_post_options PARAMS ((void));
#undef LANG_HOOKS_NAME
-#define LANG_HOOKS_NAME "GNU Objective-C"
+#define LANG_HOOKS_NAME "GNU Objective-C"
#undef LANG_HOOKS_INIT
#define LANG_HOOKS_INIT objc_init
#undef LANG_HOOKS_FINISH
@@ -43,7 +42,11 @@ static void objc_post_options PARAMS ((void));
#undef LANG_HOOKS_DECODE_OPTION
#define LANG_HOOKS_DECODE_OPTION objc_decode_option
#undef LANG_HOOKS_POST_OPTIONS
-#define LANG_HOOKS_POST_OPTIONS objc_post_options
+#define LANG_HOOKS_POST_OPTIONS c_common_post_options
+#undef LANG_HOOKS_GET_ALIAS_SET
+#define LANG_HOOKS_GET_ALIAS_SET c_common_get_alias_set
+#undef LANG_HOOKS_SAFE_FROM_P
+#define LANG_HOOKS_SAFE_FROM_P c_safe_from_p
#undef LANG_HOOKS_STATICP
#define LANG_HOOKS_STATICP c_staticp
#undef LANG_HOOKS_PRINT_IDENTIFIER
@@ -72,13 +75,3 @@ objc_init_options ()
{
c_common_init_options (clk_objective_c);
}
-
-/* Post-switch processing. */
-
-static void
-objc_post_options ()
-{
- c_common_post_options ();
-}
-
-
diff --git a/contrib/gcc/optabs.c b/contrib/gcc/optabs.c
index 7249ffa..d228e58 100644
--- a/contrib/gcc/optabs.c
+++ b/contrib/gcc/optabs.c
@@ -1192,9 +1192,9 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
{
int i;
optab otheroptab = binoptab == add_optab ? sub_optab : add_optab;
- unsigned int nwords = GET_MODE_BITSIZE (mode) / BITS_PER_WORD;
+ int nwords = GET_MODE_BITSIZE (mode) / BITS_PER_WORD;
rtx carry_in = NULL_RTX, carry_out = NULL_RTX;
- rtx xop0, xop1;
+ rtx xop0, xop1, xtarget;
/* We can handle either a 1 or -1 value for the carry. If STORE_FLAG
value is one of those, use it. Otherwise, use 1 since it is the
@@ -1209,19 +1209,20 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
xop0 = force_reg (mode, op0);
xop1 = force_reg (mode, op1);
- if (target == 0 || GET_CODE (target) != REG
- || target == xop0 || target == xop1)
- target = gen_reg_rtx (mode);
+ xtarget = gen_reg_rtx (mode);
+
+ if (target == 0 || GET_CODE (target) != REG)
+ target = xtarget;
/* Indicate for flow that the entire target reg is being set. */
if (GET_CODE (target) == REG)
- emit_insn (gen_rtx_CLOBBER (VOIDmode, target));
+ emit_insn (gen_rtx_CLOBBER (VOIDmode, xtarget));
/* Do the actual arithmetic. */
for (i = 0; i < nwords; i++)
{
int index = (WORDS_BIG_ENDIAN ? nwords - i - 1 : i);
- rtx target_piece = operand_subword (target, index, 1, mode);
+ rtx target_piece = operand_subword (xtarget, index, 1, mode);
rtx op0_piece = operand_subword_force (xop0, index, mode);
rtx op1_piece = operand_subword_force (xop1, index, mode);
rtx x;
@@ -1281,7 +1282,7 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
{
if (mov_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing)
{
- rtx temp = emit_move_insn (target, target);
+ rtx temp = emit_move_insn (target, xtarget);
set_unique_reg_note (temp,
REG_EQUAL,
@@ -1443,6 +1444,9 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
rtx temp = expand_binop (word_mode, binoptab, op0_low, op1_xhigh,
NULL_RTX, 0, OPTAB_DIRECT);
+ if (!REG_P (product_high))
+ product_high = force_reg (word_mode, product_high);
+
if (temp != 0)
temp = expand_binop (word_mode, add_optab, temp, product_high,
product_high, 0, next_methods);
@@ -1462,6 +1466,8 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
if (temp != 0 && temp != product_high)
emit_move_insn (product_high, temp);
+ emit_move_insn (operand_subword (product, high, 1, mode), product_high);
+
if (temp != 0)
{
if (mov_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing)
diff --git a/contrib/gcc/print-rtl.c b/contrib/gcc/print-rtl.c
index b819d14..a93a99b 100644
--- a/contrib/gcc/print-rtl.c
+++ b/contrib/gcc/print-rtl.c
@@ -88,8 +88,9 @@ print_mem_expr (outfile, expr)
print_mem_expr (outfile, TREE_OPERAND (expr, 0));
else
fputs (" <variable>", outfile);
- fprintf (outfile, ".%s",
- IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (expr, 1))));
+ if (DECL_NAME (TREE_OPERAND (expr, 1)))
+ fprintf (outfile, ".%s",
+ IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (expr, 1))));
}
else if (DECL_NAME (expr))
fprintf (outfile, " %s", IDENTIFIER_POINTER (DECL_NAME (expr)));
diff --git a/contrib/gcc/recog.c b/contrib/gcc/recog.c
index d74e399..d9848dd 100644
--- a/contrib/gcc/recog.c
+++ b/contrib/gcc/recog.c
@@ -950,11 +950,13 @@ general_operand (op, mode)
if (code == SUBREG)
{
+ rtx sub = SUBREG_REG (op);
+
#ifdef INSN_SCHEDULING
/* On machines that have insn scheduling, we want all memory
reference to be explicit, so outlaw paradoxical SUBREGs. */
- if (GET_CODE (SUBREG_REG (op)) == MEM
- && GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (SUBREG_REG (op))))
+ if (GET_CODE (sub) == MEM
+ && GET_MODE_SIZE (mode) > GET_MODE_SIZE (GET_MODE (sub)))
return 0;
#endif
/* Avoid memories with nonzero SUBREG_BYTE, as offsetting the memory
@@ -964,10 +966,16 @@ general_operand (op, mode)
??? This is a kludge. */
if (!reload_completed && SUBREG_BYTE (op) != 0
- && GET_CODE (SUBREG_REG (op)) == MEM)
+ && GET_CODE (sub) == MEM)
return 0;
- op = SUBREG_REG (op);
+ /* FLOAT_MODE subregs can't be paradoxical. Combine will occasionally
+ create such rtl, and we must reject it. */
+ if (GET_MODE_CLASS (GET_MODE (op)) == MODE_FLOAT
+ && GET_MODE_SIZE (GET_MODE (op)) > GET_MODE_SIZE (GET_MODE (sub)))
+ return 0;
+
+ op = sub;
code = GET_CODE (op);
}
@@ -1040,28 +1048,36 @@ register_operand (op, mode)
if (GET_CODE (op) == SUBREG)
{
+ rtx sub = SUBREG_REG (op);
+
/* Before reload, we can allow (SUBREG (MEM...)) as a register operand
because it is guaranteed to be reloaded into one.
Just make sure the MEM is valid in itself.
(Ideally, (SUBREG (MEM)...) should not exist after reload,
but currently it does result from (SUBREG (REG)...) where the
reg went on the stack.) */
- if (! reload_completed && GET_CODE (SUBREG_REG (op)) == MEM)
+ if (! reload_completed && GET_CODE (sub) == MEM)
return general_operand (op, mode);
#ifdef CLASS_CANNOT_CHANGE_MODE
- if (GET_CODE (SUBREG_REG (op)) == REG
- && REGNO (SUBREG_REG (op)) < FIRST_PSEUDO_REGISTER
+ if (GET_CODE (sub) == REG
+ && REGNO (sub) < FIRST_PSEUDO_REGISTER
&& (TEST_HARD_REG_BIT
(reg_class_contents[(int) CLASS_CANNOT_CHANGE_MODE],
- REGNO (SUBREG_REG (op))))
- && CLASS_CANNOT_CHANGE_MODE_P (mode, GET_MODE (SUBREG_REG (op)))
- && GET_MODE_CLASS (GET_MODE (SUBREG_REG (op))) != MODE_COMPLEX_INT
- && GET_MODE_CLASS (GET_MODE (SUBREG_REG (op))) != MODE_COMPLEX_FLOAT)
+ REGNO (sub)))
+ && CLASS_CANNOT_CHANGE_MODE_P (mode, GET_MODE (sub))
+ && GET_MODE_CLASS (GET_MODE (sub)) != MODE_COMPLEX_INT
+ && GET_MODE_CLASS (GET_MODE (sub)) != MODE_COMPLEX_FLOAT)
return 0;
#endif
- op = SUBREG_REG (op);
+ /* FLOAT_MODE subregs can't be paradoxical. Combine will occasionally
+ create such rtl, and we must reject it. */
+ if (GET_MODE_CLASS (GET_MODE (op)) == MODE_FLOAT
+ && GET_MODE_SIZE (GET_MODE (op)) > GET_MODE_SIZE (GET_MODE (sub)))
+ return 0;
+
+ op = sub;
}
/* If we have an ADDRESSOF, consider it valid since it will be
diff --git a/contrib/gcc/reg-stack.c b/contrib/gcc/reg-stack.c
index 424b204..8329829 100644
--- a/contrib/gcc/reg-stack.c
+++ b/contrib/gcc/reg-stack.c
@@ -2468,7 +2468,7 @@ convert_regs_exit ()
output_stack->top = value_reg_high - value_reg_low;
for (reg = value_reg_low; reg <= value_reg_high; ++reg)
{
- output_stack->reg[reg - value_reg_low] = reg;
+ output_stack->reg[value_reg_high - reg] = reg;
SET_HARD_REG_BIT (output_stack->reg_set, reg);
}
}
diff --git a/contrib/gcc/regclass.c b/contrib/gcc/regclass.c
index 93a5edb..74594cb 100644
--- a/contrib/gcc/regclass.c
+++ b/contrib/gcc/regclass.c
@@ -824,6 +824,7 @@ globalize_reg (i)
SET_HARD_REG_BIT (fixed_reg_set, i);
SET_HARD_REG_BIT (call_used_reg_set, i);
SET_HARD_REG_BIT (call_fixed_reg_set, i);
+ SET_HARD_REG_BIT (regs_invalidated_by_call, i);
}
/* Now the data and code for the `regclass' pass, which happens
diff --git a/contrib/gcc/regmove.c b/contrib/gcc/regmove.c
index 59b1005..048cfb6 100644
--- a/contrib/gcc/regmove.c
+++ b/contrib/gcc/regmove.c
@@ -664,6 +664,7 @@ optimize_reg_copy_3 (insn, dest, src)
if (src_no < FIRST_PSEUDO_REGISTER
|| dst_no < FIRST_PSEUDO_REGISTER
|| ! find_reg_note (insn, REG_DEAD, src_reg)
+ || REG_N_DEATHS (src_no) != 1
|| REG_N_SETS (src_no) != 1)
return;
for (p = PREV_INSN (insn); p && ! reg_set_p (src_reg, p); p = PREV_INSN (p))
diff --git a/contrib/gcc/reload.c b/contrib/gcc/reload.c
index b5f168a..5c00cce 100644
--- a/contrib/gcc/reload.c
+++ b/contrib/gcc/reload.c
@@ -240,7 +240,8 @@ static int push_secondary_reload PARAMS ((int, rtx, int, int, enum reg_class,
enum machine_mode, enum reload_type,
enum insn_code *));
#endif
-static enum reg_class find_valid_class PARAMS ((enum machine_mode, int));
+static enum reg_class find_valid_class PARAMS ((enum machine_mode, int,
+ unsigned int));
static int reload_inner_reg_of_subreg PARAMS ((rtx, enum machine_mode));
static void push_replacement PARAMS ((rtx *, int, enum machine_mode));
static void combine_reloads PARAMS ((void));
@@ -661,17 +662,22 @@ clear_secondary_mem ()
#endif /* SECONDARY_MEMORY_NEEDED */
/* Find the largest class for which every register number plus N is valid in
- M1 (if in range). Abort if no such class exists. */
+ M1 (if in range) and is cheap to move into REGNO.
+ Abort if no such class exists. */
static enum reg_class
-find_valid_class (m1, n)
+find_valid_class (m1, n, dest_regno)
enum machine_mode m1 ATTRIBUTE_UNUSED;
int n;
+ unsigned int dest_regno;
{
+ int best_cost = -1;
int class;
int regno;
enum reg_class best_class = NO_REGS;
+ enum reg_class dest_class = REGNO_REG_CLASS (dest_regno);
unsigned int best_size = 0;
+ int cost;
for (class = 1; class < N_REG_CLASSES; class++)
{
@@ -682,8 +688,18 @@ find_valid_class (m1, n)
&& ! HARD_REGNO_MODE_OK (regno + n, m1))
bad = 1;
- if (! bad && reg_class_size[class] > best_size)
- best_class = class, best_size = reg_class_size[class];
+ if (bad)
+ continue;
+ cost = REGISTER_MOVE_COST (m1, class, dest_class);
+
+ if ((reg_class_size[class] > best_size
+ && (best_cost < 0 || best_cost >= cost))
+ || best_cost > cost)
+ {
+ best_class = class;
+ best_size = reg_class_size[class];
+ best_cost = REGISTER_MOVE_COST (m1, class, dest_class);
+ }
}
if (best_size == 0)
@@ -1041,7 +1057,8 @@ push_reload (in, out, inloc, outloc, class,
subreg_regno_offset (REGNO (SUBREG_REG (in)),
GET_MODE (SUBREG_REG (in)),
SUBREG_BYTE (in),
- GET_MODE (in)));
+ GET_MODE (in)),
+ REGNO (SUBREG_REG (in)));
/* This relies on the fact that emit_reload_insns outputs the
instructions for input reloads of type RELOAD_OTHER in the same
@@ -1141,7 +1158,8 @@ push_reload (in, out, inloc, outloc, class,
subreg_regno_offset (REGNO (SUBREG_REG (out)),
GET_MODE (SUBREG_REG (out)),
SUBREG_BYTE (out),
- GET_MODE (out))),
+ GET_MODE (out)),
+ REGNO (SUBREG_REG (out))),
VOIDmode, VOIDmode, 0, 0,
opnum, RELOAD_OTHER);
}
diff --git a/contrib/gcc/reload1.c b/contrib/gcc/reload1.c
index d67bd1e..0ce10c4 100644
--- a/contrib/gcc/reload1.c
+++ b/contrib/gcc/reload1.c
@@ -6911,6 +6911,7 @@ do_output_reload (chain, rl, j)
rtx pseudo = rl->out_reg;
if (pseudo
+ && optimize
&& GET_CODE (pseudo) == REG
&& ! rtx_equal_p (rl->in_reg, pseudo)
&& REGNO (pseudo) >= FIRST_PSEUDO_REGISTER
diff --git a/contrib/gcc/rtl.h b/contrib/gcc/rtl.h
index b9a9f10..12f994b 100644
--- a/contrib/gcc/rtl.h
+++ b/contrib/gcc/rtl.h
@@ -1237,6 +1237,8 @@ extern rtx gen_rtx PARAMS ((enum rtx_code,
extern rtvec gen_rtvec PARAMS ((int, ...));
extern rtx copy_insn_1 PARAMS ((rtx));
extern rtx copy_insn PARAMS ((rtx));
+extern rtx gen_int_mode PARAMS ((HOST_WIDE_INT,
+ enum machine_mode));
/* In rtl.c */
extern rtx rtx_alloc PARAMS ((RTX_CODE));
diff --git a/contrib/gcc/sched-deps.c b/contrib/gcc/sched-deps.c
index 5fb23b7..5904f91 100644
--- a/contrib/gcc/sched-deps.c
+++ b/contrib/gcc/sched-deps.c
@@ -1163,6 +1163,16 @@ sched_analyze_insn (deps, x, insn, loop_notes)
CLEAR_REG_SET (reg_pending_clobbers);
CLEAR_REG_SET (reg_pending_sets);
+ /* If we are currently in a libcall scheduling group, then mark the
+ current insn as being in a scheduling group and that it can not
+ be moved into a different basic block. */
+
+ if (deps->libcall_block_tail_insn)
+ {
+ set_sched_group_p (insn);
+ CANT_MOVE (insn) = 1;
+ }
+
/* If a post-call group is still open, see if it should remain so.
This insn must be a simple move of a hard reg to a pseudo or
vice-versa.
@@ -1226,6 +1236,8 @@ sched_analyze (deps, head, tail)
for (insn = head;; insn = NEXT_INSN (insn))
{
+ rtx link, end_seq, r0, set, note;
+
if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN)
{
/* Clear out the stale LOG_LINKS from flow. */
@@ -1252,9 +1264,6 @@ sched_analyze (deps, head, tail)
{
int i;
- /* Clear out stale SCHED_GROUP_P. */
- SCHED_GROUP_P (insn) = 0;
-
CANT_MOVE (insn) = 1;
/* Clear out the stale LOG_LINKS from flow. */
@@ -1356,6 +1365,46 @@ sched_analyze (deps, head, tail)
if (current_sched_info->use_cselib)
cselib_process_insn (insn);
+
+ /* Now that we have completed handling INSN, check and see if it is
+ a CLOBBER beginning a libcall block. If it is, record the
+ end of the libcall sequence.
+
+ We want to schedule libcall blocks as a unit before reload. While
+ this restricts scheduling, it preserves the meaning of a libcall
+ block.
+
+ As a side effect, we may get better code due to decreased register
+ pressure as well as less chance of a foreign insn appearing in
+ a libcall block. */
+ if (!reload_completed
+ /* Note we may have nested libcall sequences. We only care about
+ the outermost libcall sequence. */
+ && deps->libcall_block_tail_insn == 0
+ /* The sequence must start with a clobber of a register. */
+ && GET_CODE (insn) == INSN
+ && GET_CODE (PATTERN (insn)) == CLOBBER
+ && (r0 = XEXP (PATTERN (insn), 0), GET_CODE (r0) == REG)
+ && GET_CODE (XEXP (PATTERN (insn), 0)) == REG
+ /* The CLOBBER must also have a REG_LIBCALL note attached. */
+ && (link = find_reg_note (insn, REG_LIBCALL, NULL_RTX)) != 0
+ && (end_seq = XEXP (link, 0)) != 0
+ /* The insn referenced by the REG_LIBCALL note must be a
+ simple nop copy with the same destination as the register
+ mentioned in the clobber. */
+ && (set = single_set (end_seq)) != 0
+ && SET_DEST (set) == r0 && SET_SRC (set) == r0
+ /* And finally the insn referenced by the REG_LIBCALL must
+ also contain a REG_EQUAL note and a REG_RETVAL note. */
+ && find_reg_note (end_seq, REG_EQUAL, NULL_RTX) != 0
+ && find_reg_note (end_seq, REG_RETVAL, NULL_RTX) != 0)
+ deps->libcall_block_tail_insn = XEXP (link, 0);
+
+ /* If we have reached the end of a libcall block, then close the
+ block. */
+ if (deps->libcall_block_tail_insn == insn)
+ deps->libcall_block_tail_insn = 0;
+
if (insn == tail)
{
if (current_sched_info->use_cselib)
@@ -1449,6 +1498,7 @@ init_deps (deps)
deps->last_function_call = 0;
deps->sched_before_next_call = 0;
deps->in_post_call_group_p = false;
+ deps->libcall_block_tail_insn = 0;
}
/* Free insn lists found in DEPS. */
diff --git a/contrib/gcc/sched-int.h b/contrib/gcc/sched-int.h
index f5a8808..725bf2a 100644
--- a/contrib/gcc/sched-int.h
+++ b/contrib/gcc/sched-int.h
@@ -83,6 +83,12 @@ struct deps
the call. */
bool in_post_call_group_p;
+ /* Set to the tail insn of the outermost libcall block.
+
+ When nonzero, we will mark each insn processed by sched_analyze_insn
+ with SCHED_GROUP_P to ensure libcalls are scheduled as a unit. */
+ rtx libcall_block_tail_insn;
+
/* The maximum register number for the following arrays. Before reload
this is max_reg_num; after reload it is FIRST_PSEUDO_REGISTER. */
int max_reg;
diff --git a/contrib/gcc/stor-layout.c b/contrib/gcc/stor-layout.c
index 2db4675..c330fb6 100644
--- a/contrib/gcc/stor-layout.c
+++ b/contrib/gcc/stor-layout.c
@@ -669,7 +669,8 @@ place_union_field (rli, field)
#endif
#ifdef ADJUST_FIELD_ALIGN
- desired_align = ADJUST_FIELD_ALIGN (field, desired_align);
+ if (! DECL_USER_ALIGN (field))
+ desired_align = ADJUST_FIELD_ALIGN (field, desired_align);
#endif
TYPE_USER_ALIGN (rli->t) |= DECL_USER_ALIGN (field);
@@ -683,10 +684,15 @@ place_union_field (rli, field)
entire union to have `int' alignment. */
if (PCC_BITFIELD_TYPE_MATTERS && DECL_BIT_FIELD_TYPE (field))
{
- rli->record_align = MAX (rli->record_align,
- TYPE_ALIGN (TREE_TYPE (field)));
- rli->unpadded_align = MAX (rli->unpadded_align,
- TYPE_ALIGN (TREE_TYPE (field)));
+ unsigned int type_align = TYPE_ALIGN (TREE_TYPE (field));
+
+#ifdef ADJUST_FIELD_ALIGN
+ if (! TYPE_USER_ALIGN (TREE_TYPE (field)))
+ type_align = ADJUST_FIELD_ALIGN (field, type_align);
+#endif
+ rli->record_align = MAX (rli->record_align, type_align);
+ rli->unpadded_align = MAX (rli->unpadded_align, type_align);
+ TYPE_USER_ALIGN (rli->t) |= TYPE_USER_ALIGN (TREE_TYPE (field));
}
#endif
@@ -783,7 +789,8 @@ place_field (rli, field)
#endif
#ifdef ADJUST_FIELD_ALIGN
- desired_align = ADJUST_FIELD_ALIGN (field, desired_align);
+ if (! user_align)
+ desired_align = ADJUST_FIELD_ALIGN (field, desired_align);
#endif
/* Record must have at least as much alignment as any field.
@@ -827,6 +834,11 @@ place_field (rli, field)
{
unsigned int type_align = TYPE_ALIGN (type);
+#ifdef ADJUST_FIELD_ALIGN
+ if (! TYPE_USER_ALIGN (type))
+ type_align = ADJUST_FIELD_ALIGN (field, type_align);
+#endif
+
if (maximum_field_alignment != 0)
type_align = MIN (type_align, maximum_field_alignment);
else if (DECL_PACKED (field))
@@ -836,6 +848,7 @@ place_field (rli, field)
rli->unpadded_align = MAX (rli->unpadded_align, DECL_ALIGN (field));
if (warn_packed)
rli->unpacked_align = MAX (rli->unpacked_align, TYPE_ALIGN (type));
+ user_align |= TYPE_USER_ALIGN (type);
}
}
else
@@ -915,6 +928,11 @@ place_field (rli, field)
HOST_WIDE_INT offset = tree_low_cst (rli->offset, 0);
HOST_WIDE_INT bit_offset = tree_low_cst (rli->bitpos, 0);
+#ifdef ADJUST_FIELD_ALIGN
+ if (! TYPE_USER_ALIGN (type))
+ type_align = ADJUST_FIELD_ALIGN (field, type_align);
+#endif
+
/* A bit field may not span more units of alignment of its type
than its type itself. Advance to next boundary if necessary. */
if ((((offset * BITS_PER_UNIT + bit_offset + field_size +
@@ -923,6 +941,8 @@ place_field (rli, field)
- (offset * BITS_PER_UNIT + bit_offset) / type_align)
> tree_low_cst (TYPE_SIZE (type), 1) / type_align)
rli->bitpos = round_up (rli->bitpos, type_align);
+
+ user_align |= TYPE_USER_ALIGN (type);
}
#endif
@@ -944,6 +964,11 @@ place_field (rli, field)
HOST_WIDE_INT offset = tree_low_cst (rli->offset, 0);
HOST_WIDE_INT bit_offset = tree_low_cst (rli->bitpos, 0);
+#ifdef ADJUST_FIELD_ALIGN
+ if (! TYPE_USER_ALIGN (type))
+ type_align = ADJUST_FIELD_ALIGN (field, type_align);
+#endif
+
if (maximum_field_alignment != 0)
type_align = MIN (type_align, maximum_field_alignment);
/* ??? This test is opposite the test in the containing if
@@ -959,6 +984,8 @@ place_field (rli, field)
!= ((offset * BITS_PER_UNIT + bit_offset + field_size - 1)
/ type_align))
rli->bitpos = round_up (rli->bitpos, type_align);
+
+ user_align |= TYPE_USER_ALIGN (type);
}
#endif
diff --git a/contrib/gcc/system.h b/contrib/gcc/system.h
index 0577708..ca8a21c 100644
--- a/contrib/gcc/system.h
+++ b/contrib/gcc/system.h
@@ -605,7 +605,10 @@ typedef char _Bool;
OMIT_EH_TABLE EASY_DIV_EXPR IMPLICIT_FIX_EXPR \
LONGJMP_RESTORE_FROM_STACK MAX_INT_TYPE_SIZE ASM_IDENTIFY_GCC \
STDC_VALUE TRAMPOLINE_ALIGN ASM_IDENTIFY_GCC_AFTER_SOURCE \
- SLOW_ZERO_EXTEND SUBREG_REGNO_OFFSET DWARF_LINE_MIN_INSTR_LENGTH
+ SLOW_ZERO_EXTEND SUBREG_REGNO_OFFSET DWARF_LINE_MIN_INSTR_LENGTH \
+ BLOCK_PROFILER BLOCK_PROFILER_CODE FUNCTION_BLOCK_PROFILER \
+ FUNCTION_BLOCK_PROFILER_EXIT MACHINE_STATE_SAVE \
+ MACHINE_STATE_RESTORE
#endif /* IN_GCC */
diff --git a/contrib/gcc/toplev.c b/contrib/gcc/toplev.c
index cbcad52..efc7c97 100644
--- a/contrib/gcc/toplev.c
+++ b/contrib/gcc/toplev.c
@@ -2248,6 +2248,19 @@ rest_of_decl_compilation (decl, asmspec, top_level, at_end)
#define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP, END)
#endif
+ /* We deferred calling assemble_alias so that we could collect
+ other attributes such as visibility. Emit the alias now. */
+ {
+ tree alias;
+ alias = lookup_attribute ("alias", DECL_ATTRIBUTES (decl));
+ if (alias)
+ {
+ alias = TREE_VALUE (TREE_VALUE (alias));
+ alias = get_identifier (TREE_STRING_POINTER (alias));
+ assemble_alias (decl, alias);
+ }
+ }
+
/* Forward declarations for nested functions are not "external",
but we need to treat them as if they were. */
if (TREE_STATIC (decl) || DECL_EXTERNAL (decl)
@@ -3636,12 +3649,6 @@ display_help ()
printf (_(" -Wunused Enable unused warnings\n"));
printf (_(" -Wlarger-than-<number> Warn if an object is larger than <number> bytes\n"));
printf (_(" -p Enable function profiling\n"));
-#if defined (BLOCK_PROFILER) || defined (FUNCTION_BLOCK_PROFILER)
- printf (_(" -a Enable block profiling \n"));
-#endif
-#if defined (BLOCK_PROFILER) || defined (FUNCTION_BLOCK_PROFILER) || defined FUNCTION_BLOCK_PROFILER_EXIT
- printf (_(" -ax Enable jump profiling \n"));
-#endif
printf (_(" -o <file> Place output into <file> \n"));
printf (_("\
-G <number> Put global and static data smaller than <number>\n\
@@ -5232,7 +5239,7 @@ toplev_main (argc, argv)
parse_options_and_default_flags (argc, argv);
/* Exit early if we can (e.g. -help). */
- if (!exit_after_options)
+ if (!errorcount && !exit_after_options)
do_compile ();
if (errorcount || sorrycount)
diff --git a/contrib/gcc/tradcpp.c b/contrib/gcc/tradcpp.c
index f6bc24a..e696bf0 100644
--- a/contrib/gcc/tradcpp.c
+++ b/contrib/gcc/tradcpp.c
@@ -2595,7 +2595,8 @@ process_include (stackp, fbeg, flen, system_header_p, op)
/* Replace all CR NL, NL CR and CR sequences with NL. */
static void
-fixup_newlines (FILE_BUF *fp)
+fixup_newlines (fp)
+ FILE_BUF *fp;
{
U_CHAR *p, *q, *end;
diff --git a/contrib/gcc/tree-inline.c b/contrib/gcc/tree-inline.c
index 5aa141a..79f4c52 100644
--- a/contrib/gcc/tree-inline.c
+++ b/contrib/gcc/tree-inline.c
@@ -762,6 +762,7 @@ expand_call_inline (tp, walk_subtrees, data)
inline_data *id;
tree t;
tree expr;
+ tree stmt;
tree chain;
tree fn;
tree scope_stmt;
@@ -853,10 +854,10 @@ expand_call_inline (tp, walk_subtrees, data)
for the return statements within the function to jump to. The
type of the statement expression is the return type of the
function call. */
- expr = build1 (STMT_EXPR, TREE_TYPE (TREE_TYPE (fn)), NULL_TREE);
+ expr = build1 (STMT_EXPR, TREE_TYPE (TREE_TYPE (fn)), make_node (COMPOUND_STMT));
/* There is no scope associated with the statement-expression. */
STMT_EXPR_NO_SCOPE (expr) = 1;
-
+ stmt = STMT_EXPR_STMT (expr);
/* Local declarations will be replaced by their equivalents in this
map. */
st = id->decl_map;
@@ -871,7 +872,7 @@ expand_call_inline (tp, walk_subtrees, data)
parameters. */
expand_calls_inline (&arg_inits, id);
/* And add them to the tree. */
- STMT_EXPR_STMT (expr) = chainon (STMT_EXPR_STMT (expr), arg_inits);
+ COMPOUND_BODY (stmt) = chainon (COMPOUND_BODY (stmt), arg_inits);
/* Record the function we are about to inline so that we can avoid
recursing into it. */
@@ -906,8 +907,8 @@ expand_call_inline (tp, walk_subtrees, data)
SCOPE_BEGIN_P (scope_stmt) = 1;
SCOPE_NO_CLEANUPS_P (scope_stmt) = 1;
remap_block (scope_stmt, DECL_ARGUMENTS (fn), id);
- TREE_CHAIN (scope_stmt) = STMT_EXPR_STMT (expr);
- STMT_EXPR_STMT (expr) = scope_stmt;
+ TREE_CHAIN (scope_stmt) = COMPOUND_BODY (stmt);
+ COMPOUND_BODY (stmt) = scope_stmt;
/* Tell the debugging backends that this block represents the
outermost scope of the inlined function. */
@@ -915,34 +916,34 @@ expand_call_inline (tp, walk_subtrees, data)
BLOCK_ABSTRACT_ORIGIN (SCOPE_STMT_BLOCK (scope_stmt)) = DECL_ORIGIN (fn);
/* Declare the return variable for the function. */
- STMT_EXPR_STMT (expr)
- = chainon (STMT_EXPR_STMT (expr),
+ COMPOUND_BODY (stmt)
+ = chainon (COMPOUND_BODY (stmt),
declare_return_variable (id, &use_stmt));
/* After we've initialized the parameters, we insert the body of the
function itself. */
- inlined_body = &STMT_EXPR_STMT (expr);
+ inlined_body = &COMPOUND_BODY (stmt);
while (*inlined_body)
inlined_body = &TREE_CHAIN (*inlined_body);
*inlined_body = copy_body (id);
- /* Close the block for the parameters. */
- scope_stmt = build_stmt (SCOPE_STMT, DECL_INITIAL (fn));
- SCOPE_NO_CLEANUPS_P (scope_stmt) = 1;
- remap_block (scope_stmt, NULL_TREE, id);
- STMT_EXPR_STMT (expr)
- = chainon (STMT_EXPR_STMT (expr), scope_stmt);
-
/* After the body of the function comes the RET_LABEL. This must come
before we evaluate the returned value below, because that evalulation
may cause RTL to be generated. */
- STMT_EXPR_STMT (expr)
- = chainon (STMT_EXPR_STMT (expr),
+ COMPOUND_BODY (stmt)
+ = chainon (COMPOUND_BODY (stmt),
build_stmt (LABEL_STMT, id->ret_label));
/* Finally, mention the returned value so that the value of the
statement-expression is the returned value of the function. */
- STMT_EXPR_STMT (expr) = chainon (STMT_EXPR_STMT (expr), use_stmt);
+ COMPOUND_BODY (stmt) = chainon (COMPOUND_BODY (stmt), use_stmt);
+
+ /* Close the block for the parameters. */
+ scope_stmt = build_stmt (SCOPE_STMT, DECL_INITIAL (fn));
+ SCOPE_NO_CLEANUPS_P (scope_stmt) = 1;
+ remap_block (scope_stmt, NULL_TREE, id);
+ COMPOUND_BODY (stmt)
+ = chainon (COMPOUND_BODY (stmt), scope_stmt);
/* Clean up. */
splay_tree_delete (id->decl_map);
diff --git a/contrib/gcc/unroll.c b/contrib/gcc/unroll.c
index 6936a71..6be951e 100644
--- a/contrib/gcc/unroll.c
+++ b/contrib/gcc/unroll.c
@@ -3305,7 +3305,8 @@ final_giv_value (loop, v)
/* Try to calculate the final value as a function of the biv it depends
upon. The only exit from the loop must be the fall through at the bottom
- (otherwise it may not have its final value when the loop exits). */
+ and the insn that sets the giv must be executed on every iteration
+ (otherwise the giv may not have its final value when the loop exits). */
/* ??? Can calculate the final giv value by subtracting off the
extra biv increments times the giv's mult_val. The loop must have
@@ -3313,7 +3314,8 @@ final_giv_value (loop, v)
to be known. */
if (n_iterations != 0
- && ! loop->exit_count)
+ && ! loop->exit_count
+ && v->always_executed)
{
/* ?? It is tempting to use the biv's value here since these insns will
be put after the loop, and hence the biv will have its final value
diff --git a/contrib/gcc/varasm.c b/contrib/gcc/varasm.c
index 6dfc292..4c27011 100644
--- a/contrib/gcc/varasm.c
+++ b/contrib/gcc/varasm.c
@@ -186,7 +186,7 @@ static hashval_t const_str_htab_hash PARAMS ((const void *x));
static int const_str_htab_eq PARAMS ((const void *x, const void *y));
static void const_str_htab_del PARAMS ((void *));
static void asm_emit_uninitialised PARAMS ((tree, const char*, int, int));
-static void resolve_unique_section PARAMS ((tree, int));
+static void resolve_unique_section PARAMS ((tree, int, int));
static void mark_weak PARAMS ((tree));
static enum in_section { no_section, in_text, in_data, in_named
@@ -461,12 +461,13 @@ named_section (decl, name, reloc)
/* If required, set DECL_SECTION_NAME to a unique name. */
static void
-resolve_unique_section (decl, reloc)
+resolve_unique_section (decl, reloc, flag_function_or_data_sections)
tree decl;
int reloc ATTRIBUTE_UNUSED;
+ int flag_function_or_data_sections;
{
if (DECL_SECTION_NAME (decl) == NULL_TREE
- && (flag_function_sections
+ && (flag_function_or_data_sections
|| (targetm.have_named_sections
&& DECL_ONE_ONLY (decl))))
UNIQUE_SECTION (decl, reloc);
@@ -515,7 +516,7 @@ asm_output_bss (file, decl, name, size, rounded)
/* Standard thing is just output label for the object. */
ASM_OUTPUT_LABEL (file, name);
#endif /* ASM_DECLARE_OBJECT_NAME */
- ASM_OUTPUT_SKIP (file, rounded);
+ ASM_OUTPUT_SKIP (file, rounded ? rounded : 1);
}
#endif
@@ -1188,7 +1189,7 @@ assemble_start_function (decl, fnname)
if (CONSTANT_POOL_BEFORE_FUNCTION)
output_constant_pool (fnname, decl);
- resolve_unique_section (decl, 0);
+ resolve_unique_section (decl, 0, flag_function_sections);
function_section (decl);
/* Tell assembler to move to target machine's alignment for functions. */
@@ -1397,7 +1398,7 @@ asm_emit_uninitialised (decl, name, size, rounded)
if (destination == asm_dest_bss)
globalize_decl (decl);
- resolve_unique_section (decl, 0);
+ resolve_unique_section (decl, 0, flag_data_sections);
if (flag_shared_data)
{
@@ -1642,7 +1643,7 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
reloc = output_addressed_constants (DECL_INITIAL (decl));
/* Switch to the appropriate section. */
- resolve_unique_section (decl, reloc);
+ resolve_unique_section (decl, reloc, flag_data_sections);
variable_section (decl, reloc);
/* dbxout.c needs to know this. */
@@ -2560,6 +2561,7 @@ const_hash (exp)
}
case ADDR_EXPR:
+ case FDESC_EXPR:
{
struct addr_const value;
@@ -2801,6 +2803,7 @@ compare_constant_1 (exp, p)
}
case ADDR_EXPR:
+ case FDESC_EXPR:
{
struct addr_const value;
@@ -4247,6 +4250,7 @@ output_addressed_constants (exp)
switch (TREE_CODE (exp))
{
case ADDR_EXPR:
+ case FDESC_EXPR:
/* Go inside any operations that get_inner_reference can handle and see
if what's inside is a constant: no need to do anything here for
addresses of variables or functions. */
@@ -5016,14 +5020,6 @@ merge_weak (newdecl, olddecl)
if (DECL_WEAK (newdecl) == DECL_WEAK (olddecl))
return;
- if (SUPPORTS_WEAK
- && DECL_WEAK (newdecl)
- && DECL_EXTERNAL (newdecl) && DECL_EXTERNAL (olddecl)
- && (TREE_CODE (olddecl) != VAR_DECL || ! TREE_STATIC (olddecl))
- && TREE_USED (olddecl)
- && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (olddecl)))
- warning_with_decl (newdecl, "weak declaration of `%s' after first use results in unspecified behavior");
-
if (DECL_WEAK (newdecl))
{
tree wd;
@@ -5034,10 +5030,17 @@ merge_weak (newdecl, olddecl)
go back and make it weak. This error cannot caught in
declare_weak because the NEWDECL and OLDDECL was not yet
been merged; therefore, TREE_ASM_WRITTEN was not set. */
- if (TREE_CODE (olddecl) == FUNCTION_DECL && TREE_ASM_WRITTEN (olddecl))
+ if (TREE_ASM_WRITTEN (olddecl))
error_with_decl (newdecl,
"weak declaration of `%s' must precede definition");
-
+
+ /* If we've already generated rtl referencing OLDDECL, we may
+ have done so in a way that will not function properly with
+ a weak symbol. */
+ else if (TREE_USED (olddecl)
+ && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (olddecl)))
+ warning_with_decl (newdecl, "weak declaration of `%s' after first use results in unspecified behavior");
+
if (SUPPORTS_WEAK)
{
/* We put the NEWDECL on the weak_decls list at some point.
@@ -5174,7 +5177,6 @@ assemble_alias (decl, target)
#else
ASM_OUTPUT_DEF (asm_out_file, name, IDENTIFIER_POINTER (target));
#endif
- TREE_ASM_WRITTEN (decl) = 1;
#else /* !ASM_OUTPUT_DEF */
#if defined (ASM_OUTPUT_WEAK_ALIAS) || defined (ASM_WEAKEN_DECL)
if (! DECL_WEAK (decl))
@@ -5185,11 +5187,14 @@ assemble_alias (decl, target)
#else
ASM_OUTPUT_WEAK_ALIAS (asm_out_file, name, IDENTIFIER_POINTER (target));
#endif
- TREE_ASM_WRITTEN (decl) = 1;
#else
warning ("alias definitions not supported in this configuration; ignored");
#endif
#endif
+
+ TREE_USED (decl) = 1;
+ TREE_ASM_WRITTEN (decl) = 1;
+ TREE_ASM_WRITTEN (DECL_ASSEMBLER_NAME (decl)) = 1;
}
/* Returns 1 if the target configuration supports defining public symbols
diff --git a/contrib/gcc/version.c b/contrib/gcc/version.c
index 2e6c73a..78d0bcf 100644
--- a/contrib/gcc/version.c
+++ b/contrib/gcc/version.c
@@ -1,4 +1,4 @@
#include "ansidecl.h"
#include "version.h"
-const char *const version_string = "3.1 20020509 (prerelease)";
+const char *const version_string = "3.2.1 20020831 (prerelease)";
OpenPOWER on IntegriCloud