diff options
449 files changed, 7944 insertions, 7416 deletions
diff --git a/ChangeLog b/ChangeLog index 22f9d1d2b57..2cc17cf1a5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-06-01 Daniel Jacobowitz <drow@false.org> + + * MAINTAINERS: Update my email address. + 2011-05-27 Nathan Froyd <froydnj@codesourcery.com> * MAINTAINERS (Write After Approval): Update my email address. diff --git a/ChangeLog.MELT b/ChangeLog.MELT index 508655d4f99..0d6223fd056 100644 --- a/ChangeLog.MELT +++ b/ChangeLog.MELT @@ -1,4 +1,8 @@ +2011-06-04 Basile Starynkevitch <basile@starynkevitch.net> + + MELT branch merged with trunk rev 174636 using svnmerge + 2011-05-31 Basile Starynkevitch <basile@starynkevitch.net> MELT branch merged with trunk rev 174464 using svnmerge diff --git a/MAINTAINERS b/MAINTAINERS index 65e03e2c59e..1a8406b4364 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -379,7 +379,7 @@ Falk Hueffner falk@debian.org Andrew John Hughes gnu_andrew@member.fsf.org Andy Hutchinson hutchinsonandy@aim.com Bernardo Innocenti bernie@develer.com -Daniel Jacobowitz dan@codesourcery.com +Daniel Jacobowitz drow@false.org Andreas Jaeger aj@suse.de Harsha Jagasia harsha.jagasia@amd.com Fariborz Jahanian fjahanian@apple.com diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0e9738198f3..c7f031f4ade 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,639 @@ +2011-06-04 Alexandre Oliva <aoliva@redhat.com> + + PR debug/48333 + * calls.c (emit_call_1): Prefer the __builtin declaration of + builtin functions. + +2011-06-03 Diego Novillo <dnovillo@google.com> + + * lto-streamer-in.c (unpack_value_fields): Remove unneeded asserts. + (lto_input_tree_pointers): Likewise. + * lto-streamer-out.c (pack_value_fields): Likewise. + (lto_output_tree_pointers): Likewise. + * lto-streamer.h (lto_is_streamable): Add check for OMP_CLAUSE + and OPTIMIZATION_NODE. + +2011-06-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config/alpha/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/alpha/osf5.h (MD_UNWIND_SUPPORT): Remove. + * config/alpha/vms.h (MD_UNWIND_SUPPORT): Remove. + * config/bfin/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/bfin/uclinux.h (MD_UNWIND_SUPPORT): Remove. + * config/i386/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/i386/linux64.h (MD_UNWIND_SUPPORT): Remove. + * config/i386/sol2.h (MD_UNWIND_SUPPORT): Remove. + * config/i386/mingw32.h (MD_UNWIND_SUPPORT): Remove. + * config/ia64/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/ia64/vms.h (MD_UNWIND_SUPPORT): Remove. + * config/m68k/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/mips/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/pa/pa-hpux.h (MD_UNWIND_SUPPORT): Remove. + * config/pa/pa32-linux.h (MD_UNWIND_SUPPORT): Remove. + * config/rs6000/darwin.h (MD_UNWIND_SUPPORT): Remove. + * config/rs6000/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/rs6000/linux64.h (MD_UNWIND_SUPPORT): Remove. + * config/s390/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/s390/tpf.h (MD_UNWIND_SUPPORT): Remove. + * config/sh/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/sparc/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/sparc/linux64.h (MD_UNWIND_SUPPORT): Remove. + * config/sparc/sol2.h (MD_UNWIND_SUPPORT): Remove. + * config/xtensa/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/alpha/linux-unwind.h: Move to ../libgcc/config/alpha. + * config/alpha/osf5-unwind.h: Move to ../libgcc/config/alpha. + * config/alpha/vms-unwind.h: Move to ../libgcc/config/alpha. + * config/bfin/linux-unwind.h: Move to ../libgcc/config/bfin. + * config/i386/linux-unwind.h: Move to ../libgcc/config/i386. + * config/i386/sol2-unwind.h: Move to ../libgcc/config/i386. + * config/i386/w32-unwind.h: Move to ../libgcc/config/i386. + * config/ia64/linux-unwind.h: Move to ../libgcc/config/ia64. + * config/ia64/vms-unwind.h: Move to ../libgcc/config/ia64. + * config/m68k/linux-unwind.h: Move to ../libgcc/config/m68k. + * config/mips/linux-unwind.h: Move to ../libgcc/config/mips. + * config/pa/hpux-unwind.h: Move to ../libgcc/config/pa. + * config/pa/linux-unwind.h: Move to ../libgcc/config/pa. + * config/rs6000/darwin-unwind.h: Move to ../libgcc/config/rs6000. + * config/rs6000/linux-unwind.h: Move to ../libgcc/config/rs6000. + * config/s390/linux-unwind.h: Move to ../libgcc/config/s390. + * config/s390/tpf-unwind.h: Move to ../libgcc/config/s390. + * config/sh/linux-unwind.h: Move to ../libgcc/config/sh. + * config/sparc/linux-unwind.h: Move to ../libgcc/config/sparc. + * config/sparc/sol2-unwind.h: Move to ../libgcc/config/sparc. + * config/xtensa/linux-unwind.h: Move to ../libgcc/config/xtensa. + * config/darwin9.h (DARWIN_LIBSYSTEM_HAS_UNWIND): Remove. + * system.h (MD_UNWIND_SUPPORT): Poison. + * doc/tm.texi.in (Exception Handling, MD_UNWIND_SUPPORT): Remove. + * doc/tm.texi: Regenerate. + * unwind-dw2.c: Include md-unwind-support.h instead of + MD_UNWIND_SUPPORT. + * config/ia64/unwind-ia64.c: Likewise. + * config/xtensa/unwind-dw2-xtensa.c: Likewise. + +2011-06-03 Jack Howarth <howarth@bromo.med.uc.edu> + + * varpool.c (varpool_extra_name_alias): Return NULL, not false. + +2011-06-03 Richard Henderson <rth@redhat.com> + Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config/i386/crtfastmath.c [!__x86_64__ && __sun__ && __svr4__] + (sigill_hdlr): Correct insn, insn size. + (set_fast_math) [!__x86_64__ && __sun__ && __svr4__]: Use movaps. + +2011-06-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config.gcc (mips-sgi-irix6.5*): Set tmake_file to mips/t-irix6 + t-slibgcc-dummy. + * config/mips/irix-crti.asm: Move to ../libgcc/config/mips/irix-crti.S. + * config/mips/irix-crtn.asm: Move to ../libgcc/config/mips/irix-crtn.S. + * config/mips/t-iris: Remove. + * config/mips/t-irix6: New file. + * config/mips/t-slibgcc-irix: Move to ../libgcc/config/mips. + +2011-06-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * Makefile.in (LIB2ADDEHDEP): Remove. + * config/arm/t-bpabi (LIB2ADDEHDEP): Remove. + * config/arm/t-symbian (LIB2ADDEHDEP): Remove. + * config/picochip/t-picochip (LIB2ADDEHDEP): Remove. + * config/t-darwin (LIB2ADDEHDEP): Remove. + * config/t-freebsd (LIB2ADDEHDEP): Remove. + * config/t-linux (LIB2ADDEHDEP): Remove. + +2011-06-03 Diego Novillo <dnovillo@google.com> + + * lto-streamer-in.c (get_resolution): Move to lto/lto.c. + (lto_register_var_decl_in_symtab): Likewise. + (lto_register_function_decl_in_symtab): Likewise. + (lto_read_tree): Move VAR_DECL and FUNCTION_DECL registration + logic to uniquify_nodes. + +2011-06-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config/alpha/t-osf5: Remove. + * config/alpha/t-osf-pthread: Remove. + * config.gcc (alpha*-dec-osf5.1*): Set tmake_file to t-slibgcc-dummy. + * mkmap-flat.awk: Handle osf_export for Tru64 UNIX linker -input file. + +2011-06-03 Julian Brown <julian@codesourcery.com> + + * config/arm/arm-cores.def (strongarm, strongarm110, strongarm1100) + (strongarm1110): Use strongarm tuning. + * config/arm/arm-protos.h (tune_params): Add max_insns_skipped + field. + * config/arm/arm.c (arm_strongarm_tune): New. + (arm_slowmul_tune, arm_fastmul_tune, arm_xscale_tune, arm_9e_tune) + (arm_v6t2_tune, arm_cortex_tune, arm_cortex_a5_tune) + (arm_cortex_a9_tune, arm_fa726te_tune): Add max_insns_skipped field + setting, using previous defaults or 1 for Cortex-A5. + (arm_option_override): Set max_insns_skipped from current tuning. + +2011-06-03 Nathan Sidwell <nathan@codesourcery.com> + + * doc/install.texi (Options specification): Document --with-specs. + +2011-06-02 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> + + * config/arm/neon.md (orndi3_neon): Actually split it. + +2011-06-02 Alexandre Oliva <aoliva@redhat.com> + + * params.def (PARAM_MAX_VARTRACK_EXPR_DEPTH): Bump default to 10. + * var-tracking.c (reverse_op): Limite recurse depth to 5. + +2011-06-02 Alexandre Oliva <aoliva@redhat.com> + + PR debug/47590 + * target.def (delay_sched2, delay_vartrack): New. + * doc/tm.texi.in: Update. + * doc/tm.texi: Rebuild. + * sched-rgn.c (gate_handle_sched2): Fail if delay_sched2. + * var-tracking.c (gate_handle_var_tracking): Likewise. + * config/bfin/bfin.c (bfin_flag_schedule_insns2): Drop. + (bfin_flag_var_tracking): Drop. + (output_file_start): Don't save and override flag_var_tracking. + (bfin_option_override): Ditto flag_schedule_insns_after_reload. + (bfin_reorg): Test original variables. + (TARGET_DELAY_SCHED2, TARGET_DELAY_VARTRACK): Define. + * config/ia64/ia64.c (ia64_flag_schedule_insns2): Drop. + (ia64_flag_var_tracking): Drop. + (TARGET_DELAY_SCHED2, TARGET_DELAY_VARTRACK): Define. + (ia64_file_start): Don't save and override flag_var_tracking. + (ia64_override_options_after_change): Ditto + flag_schedule_insns_after_reload. + (ia64_reorg): Test original variables. + * config/picochip/picochip.c (picochip_flag_schedule_insns2): Drop. + (picochip_flag_var_tracking): Drop. + (TARGET_DELAY_SCHED2, TARGET_DELAY_VARTRACK): Define. + (picochip_option_override): Don't save and override + flag_schedule_insns_after_reload. + (picochip_asm_file_start): Ditto flag_var_tracking. + (picochip_reorg): Test original variables. + * config/spu/spu.c (spu_flag_var_tracking): Drop. + (TARGET_DELAY_VARTRACK): Define. + (spu_var_tracking): New. + (spu_machine_dependent_reorg): Call it. + (asm_file_start): Don't save and override flag_var_tracking. + +2011-06-02 Kaz Kojima <kkojima@gcc.gnu.org> + + PR target/49163 + * config/sh/predicates.md (general_movsrc_operand): Return 0 + for memory and memory subreg of which address is an invalid + indexed address for QI and HImode. + (general_movdst_operand): Likewise. + +2011-06-02 Eric Botcazou <ebotcazou@adacore.com> + + * cse.c (cse_find_path): Refine change to exclude EDGE_ABNORMAL_CALL + edges only, when there is a non-local label in the function. + * postreload-gcse.c (bb_has_well_behaved_predecessors): Likewise. + +2011-06-02 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/constraints.md (Y3): New register constraint. + * config/i386/sse.md (*vec_interleave_highv2df): Merge with + *sse3_interleave_highv2df and *sse2_interleave_highv2df. + (*vec_interleave_lowv2df): Merge with *sse3_interleave_lowv2df and + *sse2_interleave_lowv2df. + +2011-06-02 Julian Brown <julian@codesourcery.com> + + * config/arm/arm-cores.def (cortex-a5): Use cortex_a5 tuning. + * config/arm/arm.c (arm_cortex_a5_branch_cost): New. + (arm_cortex_a5_tune): New. + +2011-06-02 Julian Brown <julian@codesourcery.com> + + * config/arm/arm-protos.h (tune_params): Add branch_cost hook. + * config/arm/arm.c (arm_default_branch_cost): New. + (arm_slowmul_tune, arm_fastmul_tune, arm_xscale_tune, arm_9e_tune) + (arm_v6t2_tune, arm_cortex_tune, arm_cortex_a9_tune) + (arm_fa726_tune): Set branch_cost field using + arm_default_branch_cost. + * config/arm/arm.h (BRANCH_COST): Use branch_cost hook from + current_tune structure. + * dojump.c (tm_p.h): Include file. + +2011-06-02 Julian Brown <julian@codesourcery.com> + + * config/arm/arm-cores.def (arm1156t2-s, arm1156t2f-s): Use v6t2 + tuning. + (cortex-a5, cortex-a8, cortex-a15, cortex-r4, cortex-r4f, cortex-m4) + (cortex-m3, cortex-m1, cortex-m0): Use cortex tuning. + * config/arm/arm-protos.h (tune_params): Add prefer_constant_pool + field. + * config/arm/arm.c (arm_slowmul_tune, arm_fastmul_tune) + (arm_xscale_tune, arm_9e_tune, arm_cortex_a9_tune) + (arm_fa726te_tune): Add prefer_constant_pool setting. + (arm_v6t2_tune, arm_cortex_tune): New. + * config/arm/arm.h (TARGET_USE_MOVT): Make dependent on + prefer_constant_pool setting. + +2011-06-02 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.c (standard_sse_constant_p) <case 1>: Simplify + switch statement. + * config/i386/i386.md (*movdf_internal_rex64) <case 8,9,10>: Ditto. + (*movdf_internal) <case 6,7,8>: Ditto. + + * config/i386/constraints.md (Y4): New register constraint. + * config/i386/sse.md (vec_set<mode>_0): Merge with + *vec_set<mode>_0_sse4_1 and *vec_set<mode>_0_sse2. + (*vec_extractv2di_1): Merge from *vec_extractv2di_1_sse2 and + *vec_extractv2di_1_sse. + (*vec_concatv2di_rex64): Merge from *vec_concatv2di_rex64_sse4_1 + and *vec_concatv2di_rex64_sse. + +2011-06-02 Stuart Henderson <shenders@gcc.gnu.org> + + PR target/48807 + * config/bfin/bfin.c (bfin_function_ok_for_sibcall): Check return value + of cgraph_local_info for null before attempting to use it. + +2011-06-02 Eric Botcazou <ebotcazou@adacore.com> + + * function.h (struct stack_usage): Remove dynamic_alloc_count field. + (current_function_dynamic_alloc_count): Delete. + * builtins.c (expand_builtin_setjmp_setup): Do not set calls_setjmp. + (expand_builtin_nonlocal_goto): Remove obsolete comment. + (expand_builtin_update_setjmp_buf): Remove dead code. + * cse.c (cse_find_path): Do not follow a single abnormal incoming edge. + * explow.c (allocate_dynamic_stack_space): Remove SETJMP_VIA_SAVE_AREA + support. + * function.c (instantiate_virtual_regs): Likewise. + * postreload-gcse.c (bb_has_well_behaved_predecessors): Return false + for a block with a single abnormal incoming edge. + * config/sparc/sparc.h (STACK_SAVEAREA_MODE): Define. + (SETJMP_VIA_SAVE_AREA): Delete. + * config/sparc/sparc-protos.h (load_got_register): Declare. + * config/sparc/sparc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define. + (load_got_register): Make global. + (sparc_frame_pointer_required): Add 'static'. + (sparc_can_eliminate): Likewise. Call sparc_frame_pointer_required. + (sparc_builtin_setjmp_frame_value): New function. + * config/sparc/sparc.md (UNSPECV_SETJMP): Remove. + (save_stack_nonlocal): New expander. + (restore_stack_nonlocal): Likewise. + (nonlocal_goto): Remove modes, adjust predicates and reimplement. + (nonlocal_goto_internal): New insn. + (goto_handler_and_restore): Delete. + (builtin_setjmp_setup): Likewise. + (do_builtin_setjmp_setup): Likewise. + (setjmp): Likewise. + (builtin_setjmp_receiver): New expander. + +2011-06-01 David Li <davidxl@google.com> + + PR middle-end/49261 + * tree-pretty-print.c (dump_function_header): Format cleanup. + +2011-06-01 Kaz Kojima <kkojima@gcc.gnu.org> + + PR target/49238 + * config/sh/sh.c (expand_cbranchdi4): Use a scratch register if + needed when original operands are used for msw_skip comparison. + +2011-06-01 Jakub Jelinek <jakub@redhat.com> + + PR debug/49250 + * var-tracking.c (add_uses, add_stores): Don't call + cselib_subst_to_values on ENTRY_VALUE. + +2011-06-01 Diego Novillo <dnovillo@google.com> + + * lto-streamer-out.c (lto_output_ts_decl_with_vis_tree_pointers): Call + output_record_start with LTO_null instead of output_zero. + (lto_output_ts_binfo_tree_pointers): Likewise. + (lto_output_tree): Likewise. + (output_eh_try_list): Likewise. + (output_eh_region): Likewise. + (output_eh_lp): Likewise. + (output_eh_regions): Likewise. + (output_bb): Likewise. + (output_function): Likewise. + (output_unreferenced_globals): Likewise. + * lto-streamer.h (enum LTO_tags): Reserve MAX_TREE_CODES + instead of NUM_TREE_CODES. + (lto_tag_is_tree_code_p): Check max value against MAX_TREE_CODES. + (lto_output_int_in_range): Change << to >> when shifting VAL. + +2011-06-01 Diego Novillo <dnovillo@google.com> + + * lto-streamer-out.c (lto_output_ts_decl_non_common_tree_pointers): + Remove assertion for DECL_SAVED_TREE in FUNCTION_DECL nodes. + +2011-06-01 Richard Sandiford <rdsandiford@googlemail.com> + + PR target/45074 + * optabs.h (valid_multiword_target_p): Declare. + * expmed.c (extract_bit_field_1): Check valid_multiword_target_p when + doing multi-word operations. + * optabs.c (expand_binop): Likewise. + (expand_doubleword_bswap): Likewise. + (expand_absneg_bit): Likewise. + (expand_unop): Likewise. + (expand_copysign_bit): Likewise. + (multiword_target_p): New function. + +2011-06-01 Richard Sandiford <rdsandiford@googlemail.com> + + PR rtl-optimization/48830 + PR rtl-optimization/48808 + PR rtl-optimization/48792 + * reload.c (push_reload): Check contains_reg_of_mode. + * reload1.c (strip_paradoxical_subreg): New function. + (gen_reload_chain_without_interm_reg_p): Use it to handle + paradoxical subregs. + (emit_output_reload_insns, gen_reload): Likewise. + +2011-06-01 David Li <davidxl@google.com> + + * predict.c : Change pass name + * ipa.c: Ditto. + * dce.c: Ditto. + * tree-profile.c: Ditto. + * except.c: Ditto. + +2011-06-01 David Li <davidxl@google.com> + + * tree-pretty-print.c (dump_function_header): New function. + * final.c (rest_of_clean_state): Use header dumper. + * tree-cfg.c (gimple_dump_cfg): Use header dumper. + * passes.c (pass_init_dump_file): Use header dumper. + +2011-06-01 Jakub Jelinek <jakub@redhat.com> + + * dwarf2out.c (compare_loc_descriptor, scompare_loc_descriptor, + ucompare_loc_descriptor, minmax_loc_descriptor, clz_loc_descriptor, + popcount_loc_descriptor, bswap_loc_descriptor, rotate_loc_descriptor): + New functions. + (mem_loc_descriptor): Use them. + + * var-tracking.c (create_entry_value): New function. + (vt_add_function_parameter): Use it. + +2011-06-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config/i386/crtfastmath.c [!__x86_64__ && __sun__ && __svr4__]: + Include <signal.h>, <ucontext.h>. + (sigill_caught): Define. + (sigill_hdlr): New function. + (set_fast_math) [!__x86_64__ && __sun__ && __svr4__]: Check if SSE + insns can be executed. + * config/sol2.h (ENDFILE_SPEC): Use crtfastmath.o if -ffast-math etc. + * config/sparc/sol2.h (ENDFILE_SPEC): Remove. + +2011-06-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config/t-slibgcc-darwin: Move to ... + * config/t-slibgcc-dummy: ... this. Clarify comments. + * config.gcc (i[34567]86-*-darwin*, x86_64-*-darwin*, + powerpc-*-darwin*, powerpc64-*-darwin*): Reflect this. + (i[3456x]86-*-netware*): Add t-slibgcc-dummy to tmake_file. + (i[34567]86-*-rtems*): Remove extra_parts. Use i386/t-rtems. + Remove i386/t-crtstuff from tmake_file. + (i[34567]86-*-solaris2*): Remove t-svr4, + t-slibgcc-elf-ver, t-slibgcc-sld from tmake_file, add + t-slibgcc-dummy. + (sparc-*-elf*, sparc64-*-elf*): Remove tmake_file, extra_parts. + (sparc-*-rtems*, sparc64-*-rtems*): Remove sparc/t-crtin, + sparc/t-crtfm from tmake_file. + (sparc*-*-solaris2*): Remove sparc/t-sol2, sparc/t-crtfm, + t-slibgcc-elf-ver, t-slibgcc-sld, add t-slibgcc-dummy. + Remove extra_parts. + * config/t-sol2 (TARGET_LIBGCC2_CFLAGS): Define. + * config/i386/t-nwld (SHLIB_LINK): Remove. + * config/i386/t-rtems-i386: Rename to ... + * config/i386/t-rtems: ... this. + ($(T)crti.o, $(T)crtn.o): Remove. + (FPBIT, DPBIT, LIB2FUNCS_EXTRA): Remove. + (dp-bit.c, fp-bit.c, xp-bit.c): Remove. + (EXTRA_MULTILIB_PARTS, LIBGCC, INSTALL_LIBGCC): Remove. + * config/i386/t-sol2-10 (LIBGCC, INSTALL_LIBGCC, + EXTRA_MULTILIB_PARTS): Remove. + * config/sparc/t-sol2-64: Likewise. + * config/sparc/t-sol2: Remove. + * config/sparc/t-crtin: Remove. + * config/sparc/gmon-sol2.c: Move to ../libgcc/config. + * config/i386/gmon-sol2.c: Remove. + * config/i386/sol2-c1.asm: Move to ../libgcc/config/i386/sol2-c1.S. + * config/i386/sol2-ci.asm: Move to ../libgcc/config/i386/sol2-ci.S. + * config/i386/sol2-cn.asm: Move to ../libgcc/config/i386/sol2-cn.S. + * config/i386/sol2-gc1.asm: Remove. + * config/sparc/sol2-c1.asm: Move to ../libgcc/config/sparc/sol2-c1.S. + * config/sparc/sol2-ci.asm: Move to ../libgcc/config/sparc/sol2-ci.S. + * config/sparc/sol2-cn.asm: Move to ../libgcc/config/sparc/sol2-cn.S. + * config/t-slibgcc-sld: Remove. + +2011-06-01 Jakub Jelinek <jakub@redhat.com> + + * dwarf2out.c (mem_loc_descriptor) <do_ucompare>: Call + base_type_for_mode with op_mode instead of mode. + +2011-06-01 Paul Brook <paul@cpodesourcery.com> + + * config/arm/arm-cores.def: Add cortex-r5. Add DIV flags to + Cortex-A15. + * config/arm/arm-tune.md: Regenerate. + * config/arm/arm-tables.opt: Regenerate. + * config/arm/arm.c (FL_DIV): Rename... + (FL_THUMB_DIV): ... to this. + (FL_ARM_DIV): Define. + (FL_FOR_ARCH7R, FL_FOR_ARCH7M): Use FL_THUMB_DIV. + (arm_arch_hwdiv): Remove. + (arm_arch_thumb_hwdiv, arm_arch_arm_hwdiv): New variables. + (arm_issue_rate): Add cortexr5. + * config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Set + __ARM_ARCH_EXT_IDIV__. + (TARGET_IDIV): Define. + (arm_arch_hwdiv): Remove. + (arm_arch_arm_hwdiv, arm_arch_thumb_hwdiv): New prototypes. + * config/arm/arm.md (tune_cortexr4): Add cortexr5. + (divsi3, udivsi3): New patterns. + * config/arm/thumb2.md (divsi3, udivsi3): Remove. + * doc/invoke.texi: Document ARM -mcpu=cortex-r5 + +2011-06-01 Martin Jambor <mjambor@suse.cz> + + * ipa-utils.c (ipa_dfs_info): New field scc_no. + * ipa-utils.c (searchc): Set scc_no. + +2011-06-01 Martin Jambor <mjambor@suse.cz> + + * ipa-utils.c (searchc_env): New field allow_overwritable. + (searchc): do not ignore edges to overwritable nodes if indicated + by env->allow_overwritable. + (ipa_reduced_postorder): Set env.allow_overwritable. + +2011-06-01 Richard Guenther <rguenther@suse.de> + + * tree.c (free_lang_data): Do not reset boolean_type_node nor + char_type_node. + * lto-streamer.c (lto_record_common_node): Take node pointer, + do not register types. + (lto_preload_common_nodes): Explicitly skip preloading nodes + that differ between frontends. + +2011-05-31 Pat Haugen <pthaugen@us.ibm.com> + + * config/rs6000/rs6000.h (REG_CLASS_CONTENTS): Remove vr0..vr2 from + NON_FLOAT_REGS. + +2011-05-31 Pat Haugen <pthaugen@us.ibm.com> + + * config/rs6000/rs6000.c (rs6000_register_move_cost): Preserve from + parameter value for dump. Dump cost on outermost call only. + (rs6000_memory_move_cost): Dump cost on outermost call only. + +2011-05-31 Jakub Jelinek <jakub@redhat.com> + + * dwarf2out.c (resolve_addr_in_expr): Optimize away redundant + DW_OP_GNU_convert ops. + + * cselib.c (promote_debug_loc): Allow l->next non-NULL for + cselib_preserve_constants. + (cselib_lookup_1): If cselib_preserve_constants, + a new VALUE is being created for REG and there is a VALUE for the + same register in wider mode, add another loc with lowpart SUBREG of + the wider VALUE. + (cselib_subst_to_values): Handle ENTRY_VALUE. + * var-tracking.c (replace_expr_with_values): Return NULL for + ENTRY_VALUE too. + * dwarf2out.c (convert_descriptor_to_signed): New function. + (mem_loc_descriptor) <case ZERO_EXTEND>: Optimize using DW_OP_and + instead of two shifts. + (mem_loc_descriptor) <do_shift>: ZERO_EXTEND second argument to + the right mode if needed. + (mem_loc_descriptor) <case MOD>: For typed ops just use DW_OP_mod. + (mem_loc_descriptor) <case UNSIGNED_FIX>: Use + convert_descriptor_to_signed. + (mem_loc_descriptor) <case UDIV, CLZ, CTZ, FFS, POPCOUNT, PARITY, + BSWAP, ROTATE, ROTATERT>: Handle these rtls. + + PR target/48688 + * config/i386/i386.md (*lea_general_4): New define_insn_and_split. + +2011-05-31 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.md: Use SWI248x instead of X87MODEI, SWI24 instead + of X87MODEI12 and SWI48x instead of SSEMODEI24. + (SWI248x): New mode iterator, rename from X87MODEI. + (X87MODEI): Remove mode iterator. + (X87MODEI12): Ditto. + (SSEMODEI24): Ditto. + +2011-05-31 Alexandre Oliva <aoliva@redhat.com> + + * params.def (PARAM_MAX_VARTRACK_EXPR_DEPTH): New. + * doc/invoke.texi: Document max-vartrack-expr-depth. + * var-tracking.c (EXPR_DEPTH): New. + (reverse_op, vt_expand_loc, vt_expand_loc_dummy): Use it. + +2011-05-31 Alexandre Oliva <aoliva@redhat.com> + + * config/i386/i386.c (ix86_rtx_costs): Drop NEG from sub for FMA. + * config/i386/sse.md: Add n to negated FMA pattern names. + +2011-05-31 Alexandre Oliva <aoliva@redhat.com> + + * gcc.c (driver_handle_option): Fix disabling of -fcompare-debug. + +2011-05-31 Alexandre Oliva <aoliva@redhat.com> + + * gengtype-state.c (read_state_params_structs): Initialize previous. + +2011-05-31 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.md (*pushxf_nointeger): Merge alternatives 1 and 2. + (FP push_operand splitters): Merge {TF,XF,DF}mode splitters. + +2011-05-31 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.md (*movtf_internal): Avoid allocating general + registers. Penalize F*r->o alternative to prevent partial memory + stalls. Slightly penalize *roF->*r alternative. Generate SSE + CONST_DOUBLE immediates when optimizing function for size. Do not move + CONST_DOUBLEs directly to memory for !TARGET_MEMORY_MISMATCH_STALL. + (*movxf_internal): Slightly penalize Yx*roF->Yx*r alternative. + (*movdf_internal): Slightly penalize Yd*roF->Yd*r alternative. + (*movdf_internal_rex64): Slightly penalize rm->r, F->m and r->m + alternatives. + (*movsf_internal): Slightly penalize rmF->r and Fr->m alternatives. + + (fp_register_operand splitters): Use fp_register_operand + constraint. Do not use FP_REG_P in insn condition. + (any_fp_register_operand splitters): Use any_fp_register_operand + constraint. Do not use ANY_FP_REG_P in insn condition. + +2011-05-31 Jan Hubicka <jh@suse.cz> + + * cgraph.h (cgraph_inline_failed_t): Give enum a name + * lto-cgraph.c (LDPR_NUM_KNOWN): New macro. + (LTO_cgraph_tags): Add LTO_cgraph_last_tag. + (lto_output_edge): Use output_enum and var_len_unsigned. + (lto_output_varpool_node): Likewise. + (input_overwrite_node): Do not take resolution parameter; + extract it from a bitpack. + (input_node): Do not read resolution; use input_enum and + var_len_unsigned. + (input_varpool_node): Likewise. + (input_edge): Likewise. + (input_cgraph_1): Likewise. + +2011-05-31 Richard Guenther <rguenther@suse.de> + + * gimple.c (gimple_register_canonical_type): Do not register + any types via gimple_register_type. + +2011-05-31 Jan Hubicka <jh@suse.cz> + + * lto-symtab.c (lto_symtab_merge_cgraph_nodes): Merge alias decl + of thunks. + +2011-05-31 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/49235 + * tree-ssa-address.c (gen_addr_rtx): Ignore base if it is const0_rtx. + (create_mem_ref_raw): Create MEM_REF even if base is INTEGER_CST. + +2011-05-31 Ira Rosen <ira.rosen@linaro.org> + + PR tree-optimization/49093 + * tree-vect-data-refs.c (vect_analyze_data_refs): Fail for volatile + data references. + +2011-05-31 Dodji Seketeli <dodji@redhat.com> + + PR debug/49047 + * dwarf2out.c (gen_subprogram_die): Emit linkage name attribute + for concrete functions containing the code of cloned functions. + +2011-05-31 Richard Guenther <rguenther@suse.de> + + * tree-ssa-forwprop.c (forward_propagate_into_comparison): Rename + to ... + (forward_propagate_into_comparison_1): ... this. + (forward_propagate_comparison): Rename to ... + (forward_propagate_into_comparison): ... this. Split out + real forward propagation code to ... + (forward_propagate_comparison): ... this. + (forward_propagate_into_gimple_cond): Remove looping. + (forward_propagate_into_cond): Likewise. + (simplify_not_neg_expr): Return whether we have done something. + (simplify_gimple_switch): Likewise. + (tree_ssa_forward_propagate_single_use_vars): Rename to ... + (ssa_forward_propagate_and_combine): ... this. Re-structure + to do a forward forward-propagation walk on BBs and a backward + stmt combining walk on BBs. Consistently re-scan changed statements. + (pass_forwprop): Adjust. + +2011-05-30 Ian Lance Taylor <iant@google.com> + + * godump.c (go_format_type): Correct length of name added to + obstack for anonymous field. + 2011-05-30 Kaz Kojima <kkojima@gcc.gnu.org> PR target/49186 @@ -10,12 +646,12 @@ to prevent partial memory stalls. Do not move CONST_DOUBLEs directly to memory for !TARGET_MEMORY_MISMATCH_STALL. (*movdf_internal_rex64): Do not penalize F->r alternative. - (*movdf_internal): Penalize FYd*r->o alternative to prevent partial + (*movdf_internal): Penalize FYd*r->o alternative to prevent partial memory stalls. Generate SSE and x87 CONST_DOUBLE immediates only when optimizing function for size. Do not move CONST_DOUBLEs directly to memory for !TARGET_MEMORY_MISMATCH_STALL. - (FP move splitters): Merge {TF,XF,DF}mode move splitters. Do not - handle SUBREGs. Do not check for MEM_P operands in the insn condition, + (FP move splitters): Merge {TF,XF,DF}mode splitters. Do not handle + SUBREGs. Do not check for MEM_P operands in the insn condition, check for ANY_FP_REGNO_P instead. * config/i386/constraints.md (Yd): Enable GENERAL_REGS for TARGET_64BIT and for TARGET_INTEGER_DFMODE_MOVES when optimizing @@ -26,8 +662,7 @@ 2011-05-30 H.J. Lu <hongjiu.lu@intel.com> PR target/49168 - * config/i386/i386.md (*movtf_internal): Handle misaligned - load/store. + * config/i386/i386.md (*movtf_internal): Handle misaligned load/store. 2011-05-30 Jakub Jelinek <jakub@redhat.com> @@ -79,9 +714,8 @@ 2011-05-30 Richard Guenther <rguenther@suse.de> PR tree-optimization/49210 - * ipa-split.c (split_function): Care for the case where the - call result is not trivially convertible to the result holding - variable. + * ipa-split.c (split_function): Care for the case where the call + result is not trivially convertible to the result holding variable. 2011-05-30 Richard Guenther <rguenther@suse.de> @@ -275,7 +909,7 @@ as TS_TYPED instead of TS_COMMON. 2011-05-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> - Uros Bizjak <ubizjak@gmail.com> + Uros Bizjak <ubizjak@gmail.com> * configure.ac (gcc_cv_as_ix86_tlsgdplt): Check for @tlsgdplt (HAVE_AS_IX86_TLSGDPTL): Define. @@ -388,7 +1022,7 @@ * lto-section-out.h (bp_pack_val_len_unsigned, bp_pack_val_len_int): New functions. -2011-05-27 Hariharan Sandanagobalane <hariharan@picochip.com> +2011-05-27 Hariharan Sandanagobalane <hariharan@picochip.com> * config/picochip/picochip.c (reorder_var_tracking_notes): Drop call_arg_location instructions down the floor. @@ -423,7 +1057,7 @@ Add chain field. (BLOCK_CHAIN): Use new chain field. -2011-05-26 Pat Haugen <pthaugen@us.ibm.com> +2011-05-26 Pat Haugen <pthaugen@us.ibm.com> * config/rs6000/rs6000.c (rs6000_register_move_cost): Make LR/CTR moves expensive on Power7 also. @@ -461,7 +1095,7 @@ * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section): Wrap declaration in TARGET_SOLARIS. -2011-05-26 Hariharan Sandanagobalane <hariharan@picochip.com> +2011-05-26 Hariharan Sandanagobalane <hariharan@picochip.com> * config/picochip/picochip.md (cbranchhi4): No :CC for match_operator. The instruction is then expanded explicitly. @@ -1287,8 +1921,9 @@ 2011-05-18 H.J. Lu <hongjiu.lu@intel.com> PR target/49002 - * config/i386/sse.md (avx_<ssemodesuffix><avxsizesuffix>_<ssemodesuffix>): - Properly handle load cast. + * config/i386/sse.md + (avx_<ssemodesuffix><avxsizesuffix>_<ssemodesuffix>): Properly handle + load cast. 2011-05-18 Jakub Jelinek <jakub@redhat.com> @@ -4145,7 +4780,6 @@ (warn_uninitialized_var): Pass warning code. * tree-flow.h: Interface change. - 2011-04-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * config/mips/iris6.h (LOCAL_LABEL_PREFIX): Don't test TARGET_NEWABI. diff --git a/gcc/ChangeLog-2009 b/gcc/ChangeLog-2009 index af1a94f7bc9..4167065b58d 100644 --- a/gcc/ChangeLog-2009 +++ b/gcc/ChangeLog-2009 @@ -474,6 +474,13 @@ * intl.c (get_spaces): New. * intl.h (get_spaces): New. +2009-12-14 Mark Mitchell <mark@codesourcery.com> + + * configure.ac (--with-specs): New option. + * configure: Regenerated. + * gcc.c (driver_self_specs): Include CONFIGURE_SPECS. + * Makefile.in (DRIVER_DEFINES): Add -DCONFIGURE_SPECS. + 2009-12-14 Jakub Jelinek <jakub@redhat.com> PR bootstrap/42369 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 2557b39a322..8eaa27af9c2 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20110531 +20110604 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index e56275252f1..fcbd845ef42 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -683,7 +683,6 @@ LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c LIB2ADDEHSTATIC = $(LIB2ADDEH) LIB2ADDEHSHARED = $(LIB2ADDEH) -LIB2ADDEHDEP = $(UNWIND_H) unwind-pe.h unwind.inc unwind-dw2-fde.h unwind-dw2.h # Don't build libunwind by default. LIBUNWIND = diff --git a/gcc/builtins.c b/gcc/builtins.c index a23237dd94a..d37558c1526 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -806,10 +806,6 @@ expand_builtin_setjmp_setup (rtx buf_addr, rtx receiver_label) emit_insn (gen_builtin_setjmp_setup (buf_addr)); #endif - /* Tell optimize_save_area_alloca that extra work is going to - need to go on during alloca. */ - cfun->calls_setjmp = 1; - /* We have a nonlocal label. */ cfun->has_nonlocal_label = 1; } @@ -992,8 +988,8 @@ expand_builtin_nonlocal_goto (tree exp) r_label = convert_memory_address (Pmode, r_label); r_save_area = expand_normal (t_save_area); r_save_area = convert_memory_address (Pmode, r_save_area); - /* Copy the address of the save location to a register just in case it was based - on the frame pointer. */ + /* Copy the address of the save location to a register just in case it was + based on the frame pointer. */ r_save_area = copy_to_reg (r_save_area); r_fp = gen_rtx_MEM (Pmode, r_save_area); r_sp = gen_rtx_MEM (STACK_SAVEAREA_MODE (SAVE_NONLOCAL), @@ -1013,11 +1009,7 @@ expand_builtin_nonlocal_goto (tree exp) emit_clobber (gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode))); emit_clobber (gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx)); - /* Restore frame pointer for containing function. - This sets the actual hard register used for the frame pointer - to the location of the function's incoming static chain info. - The non-local goto handler will then adjust it to contain the - proper value and reload the argument pointer, if needed. */ + /* Restore frame pointer for containing function. */ emit_move_insn (hard_frame_pointer_rtx, r_fp); emit_stack_restore (SAVE_NONLOCAL, r_sp); @@ -1066,29 +1058,13 @@ expand_builtin_nonlocal_goto (tree exp) static void expand_builtin_update_setjmp_buf (rtx buf_addr) { - enum machine_mode sa_mode = Pmode; - rtx stack_save; - - -#ifdef HAVE_save_stack_nonlocal - if (HAVE_save_stack_nonlocal) - sa_mode = insn_data[(int) CODE_FOR_save_stack_nonlocal].operand[0].mode; -#endif -#ifdef STACK_SAVEAREA_MODE - sa_mode = STACK_SAVEAREA_MODE (SAVE_NONLOCAL); -#endif - - stack_save + enum machine_mode sa_mode = STACK_SAVEAREA_MODE (SAVE_NONLOCAL); + rtx stack_save = gen_rtx_MEM (sa_mode, memory_address (sa_mode, plus_constant (buf_addr, 2 * GET_MODE_SIZE (Pmode)))); -#ifdef HAVE_setjmp - if (HAVE_setjmp) - emit_insn (gen_setjmp ()); -#endif - emit_stack_save (SAVE_NONLOCAL, &stack_save); } diff --git a/gcc/calls.c b/gcc/calls.c index 512ff0e4912..f5592c5a6d9 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -272,7 +272,20 @@ emit_call_1 (rtx funexp, tree fntree ATTRIBUTE_UNUSED, tree fndecl ATTRIBUTE_UNU funmem = gen_rtx_MEM (FUNCTION_MODE, funexp); if (fndecl && TREE_CODE (fndecl) == FUNCTION_DECL) - set_mem_expr (funmem, fndecl); + { + tree t = fndecl; + /* Although a built-in FUNCTION_DECL and its non-__builtin + counterpart compare equal and get a shared mem_attrs, they + produce different dump output in compare-debug compilations, + if an entry gets garbage collected in one compilation, then + adds a different (but equivalent) entry, while the other + doesn't run the garbage collector at the same spot and then + shares the mem_attr with the equivalent entry. */ + if (DECL_BUILT_IN_CLASS (t) == BUILT_IN_NORMAL + && built_in_decls[DECL_FUNCTION_CODE (t)]) + t = built_in_decls[DECL_FUNCTION_CODE (t)]; + set_mem_expr (funmem, t); + } else if (fntree) set_mem_expr (funmem, build_simple_mem_ref (CALL_EXPR_FN (fntree))); diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 8be0354c2e2..ded3aedbb0f 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -304,7 +304,7 @@ typedef struct #define DEFCIFCODE(code, string) CIF_ ## code, /* Reasons for inlining failures. */ -typedef enum { +typedef enum cgraph_inline_failed_enum { #include "cif-code.def" CIF_N_REASONS } cgraph_inline_failed_t; diff --git a/gcc/config.gcc b/gcc/config.gcc index 71aeacdb20a..624129bf424 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -756,7 +756,7 @@ alpha*-dec-osf5.1*) extra_passes="mips-tfile mips-tdump" fi use_collect2=yes - tmake_file="alpha/t-alpha alpha/t-ieee alpha/t-crtfm alpha/t-osf5" + tmake_file="t-slibgcc-dummy" tm_file="${tm_file} alpha/osf5.h" tm_defines="${tm_defines} TARGET_SUPPORT_ARCH=1" extra_options="${extra_options} rpath.opt alpha/osf5.opt" @@ -765,7 +765,6 @@ alpha*-dec-osf5.1*) case ${enable_threads} in "" | yes | posix) thread_file='posix' - tmake_file="${tmake_file} alpha/t-osf-pthread" ;; esac ;; @@ -1172,12 +1171,12 @@ i[34567]86-*-darwin*) need_64bit_isa=yes # Baseline choice for a machine that allows m64 support. with_cpu=${with_cpu:-core2} - tmake_file="${tmake_file} t-slibgcc-darwin i386/t-crtpc i386/t-crtfm" + tmake_file="${tmake_file} t-slibgcc-dummy i386/t-crtpc i386/t-crtfm" libgcc_tm_file="$libgcc_tm_file i386/darwin-lib.h" ;; x86_64-*-darwin*) with_cpu=${with_cpu:-core2} - tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc-darwin i386/t-crtpc i386/t-crtfm" + tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc-dummy i386/t-crtpc i386/t-crtfm" tm_file="${tm_file} ${cpu_type}/darwin64.h" libgcc_tm_file="$libgcc_tm_file i386/darwin-lib.h" ;; @@ -1301,7 +1300,7 @@ i[3456x]86-*-netware*) */nwld) extra_objs="$extra_objs nwld.o" tm_file="${tm_file} i386/nwld.h" - tmake_file="${tmake_file} i386/t-nwld" + tmake_file="${tmake_file} i386/t-nwld t-slibgcc-dummy" extra_parts="crt0.o libgcc.def libc.def libcpre.def posixpre.def" ;; esac @@ -1321,8 +1320,7 @@ i[34567]86-*-nto-qnx*) ;; i[34567]86-*-rtems*) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h newlib-stdint.h" - extra_parts="crtbegin.o crtend.o crti.o crtn.o" - tmake_file="${tmake_file} i386/t-rtems-i386 i386/t-crtstuff t-rtems" + tmake_file="${tmake_file} i386/t-rtems t-rtems" ;; i[34567]86-*-solaris2*) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/sysv4.h sol2.h" @@ -1351,16 +1349,13 @@ i[34567]86-*-solaris2*) if test x$gas = xyes; then tm_file="${tm_file} i386/sol2-gas.h" fi - tmake_file="${tmake_file} t-sol2 t-svr4" + tmake_file="${tmake_file} t-sol2 t-slibgcc-dummy" c_target_objs="${c_target_objs} sol2-c.o" cxx_target_objs="${cxx_target_objs} sol2-c.o" extra_objs="sol2.o" tm_p_file="${tm_p_file} sol2-protos.h" if test x$gnu_ld = xyes; then - tmake_file="$tmake_file t-slibgcc-elf-ver" tm_defines="${tm_defines} TARGET_GNU_LD=1" - else - tmake_file="$tmake_file t-slibgcc-sld" fi if test x$gas = xyes; then tm_file="usegas.h ${tm_file}" @@ -1371,9 +1366,6 @@ i[34567]86-*-solaris2*) tm_file="${tm_file} i386/x86-64.h i386/sol2-10.h" tm_defines="${tm_defines} TARGET_BI_ARCH=1" tmake_file="$tmake_file i386/t-sol2-10" - # i386/t-crtstuff only affects libgcc. Its inclusion - # depends on a runtime test and is thus performed in - # libgcc/configure.ac instead. need_64bit_hwint=yes need_64bit_isa=yes use_gcc_stdint=wrap @@ -1786,7 +1778,7 @@ microblaze*-*-*) ;; mips-sgi-irix6.5*) tm_file="elfos.h ${tm_file} mips/iris6.h" - tmake_file="mips/t-iris mips/t-iris6 mips/t-slibgcc-irix" + tmake_file="mips/t-irix6 t-slibgcc-dummy" extra_options="${extra_options} rpath.opt mips/iris6.opt" target_cpu_default="MASK_ABICALLS" tm_defines="${tm_defines} MIPS_ISA_DEFAULT=3 MIPS_ABI_DEFAULT=ABI_N32" @@ -2010,13 +2002,13 @@ powerpc-*-darwin*) *-darwin[0-6]*) ;; esac - tmake_file="${tmake_file} t-slibgcc-darwin" + tmake_file="${tmake_file} t-slibgcc-dummy" extra_headers=altivec.h ;; powerpc64-*-darwin*) extra_options="${extra_options} ${cpu_type}/darwin.opt" extra_parts="crt2.o" - tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc-darwin" + tmake_file="${tmake_file} ${cpu_type}/t-darwin64 t-slibgcc-dummy" tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h" extra_headers=altivec.h ;; @@ -2442,13 +2434,10 @@ sparc-*-elf*) tmake_file="sparc/t-elf" ;; esac - tmake_file="${tmake_file} sparc/t-crtin sparc/t-crtfm" - extra_parts="crtbegin.o crtend.o" ;; sparc-*-rtems*) tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h" - tmake_file="sparc/t-elf sparc/t-crtin sparc/t-crtfm t-rtems" - extra_parts="crtbegin.o crtend.o" + tmake_file="sparc/t-elf t-rtems" ;; sparc-*-linux*) tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h" @@ -2505,12 +2494,7 @@ sparc*-*-solaris2*) tm_file="${tm_file} sol2-gld.h sparc/sol2-gld-bi.h" fi tm_file="${tm_file} tm-dwarf2.h" - tmake_file="t-sol2 sparc/t-sol2 sparc/t-sol2-64 sparc/t-crtin sparc/t-crtfm" - if test x$gnu_ld = xyes; then - tmake_file="$tmake_file t-slibgcc-elf-ver" - else - tmake_file="$tmake_file t-slibgcc-sld" - fi + tmake_file="t-sol2 t-slibgcc-dummy sparc/t-sol2-64" if test x$gas = xyes; then tm_file="usegas.h ${tm_file}" fi @@ -2518,7 +2502,6 @@ sparc*-*-solaris2*) cxx_target_objs="sol2-c.o" extra_objs="sol2.o" tm_p_file="${tm_p_file} sol2-protos.h" - extra_parts="crt1.o gcrt1.o gmon.o crtbegin.o crtend.o" case ${enable_threads}:${have_pthread_h}:${have_thread_h} in "":yes:* | yes:yes:* ) thread_file=posix @@ -2532,14 +2515,11 @@ sparc-wrs-vxworks) sparc64-*-elf*) tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h" extra_options="${extra_options} sparc/little-endian.opt" - tmake_file="${tmake_file} sparc/t-crtin sparc/t-crtfm" - extra_parts="crtbegin.o crtend.o" ;; sparc64-*-rtems*) tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h sparc/sysv4.h sparc/sp64-elf.h sparc/rtemself.h rtems.h" extra_options="${extra_options} sparc/little-endian.opt" - tmake_file="${tmake_file} sparc/t-crtin sparc/t-crtfm t-rtems" - extra_parts="crtbegin.o crtend.o" + tmake_file="${tmake_file} t-rtems" ;; sparc64-*-linux*) tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/linux64.h" diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h index a1881c8168b..38dbdb0c8be 100644 --- a/gcc/config/alpha/linux.h +++ b/gcc/config/alpha/linux.h @@ -1,7 +1,7 @@ /* Definitions of target machine for GNU compiler, for Alpha Linux-based GNU systems. Copyright (C) 1996, 1997, 1998, 2002, 2003, 2004, 2005, 2006, 2007, 2009, - 2010 Free Software Foundation, Inc. + 2010, 2011 Free Software Foundation, Inc. Contributed by Richard Henderson. This file is part of GCC. @@ -84,8 +84,6 @@ along with GCC; see the file COPYING3. If not see #define USE_LD_AS_NEEDED 1 #endif -#define MD_UNWIND_SUPPORT "config/alpha/linux-unwind.h" - /* Define if long doubles should be mangled as 'g'. */ #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING diff --git a/gcc/config/alpha/osf5.h b/gcc/config/alpha/osf5.h index 7713b7ee045..995f35d4f32 100644 --- a/gcc/config/alpha/osf5.h +++ b/gcc/config/alpha/osf5.h @@ -274,5 +274,3 @@ __enable_execute_stack (void *addr) \ /* Handle #pragma extern_prefix. */ #define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX 1 - -#define MD_UNWIND_SUPPORT "config/alpha/osf5-unwind.h" diff --git a/gcc/config/alpha/t-osf5 b/gcc/config/alpha/t-osf5 deleted file mode 100644 index eabf2728f26..00000000000 --- a/gcc/config/alpha/t-osf5 +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright (C) 2000, 2001, 2003, 2004, 2005 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 3, 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 COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -# Compile crtbeginS.o and crtendS.o with pic. -CRTSTUFF_T_CFLAGS_S = -fPIC - -# Compile libgcc2.a with pic. -TARGET_LIBGCC2_CFLAGS = -fPIC - -# Build a shared libgcc library. -SHLIB_EXT = .so -SHLIB_NAME = @shlib_base_name@.so -SHLIB_SONAME = @shlib_base_name@.so.1 -SHLIB_OBJS = @shlib_objs@ - -# Beware *not* to hide the POSIX threads related symbols provided by -# gthr-posix.c, as this would prevent their preemption by real symbols. -SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ - -Wl,-msym -Wl,-set_version,gcc.1 -Wl,-soname,$(SHLIB_SONAME) \ - -o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \ - rm -f $(SHLIB_SONAME) && \ - if [ -f $(SHLIB_NAME) ]; then \ - mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \ - else true; fi && \ - mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \ - $(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME) -# $(slibdir) double quoted to protect it from expansion while building -# libgcc.mk. We want this delayed until actual install time. -SHLIB_INSTALL = \ - $$(mkinstalldirs) $$(DESTDIR)$$(slibdir); \ - $(INSTALL_DATA) $(SHLIB_NAME) $$(DESTDIR)$$(slibdir)/$(SHLIB_SONAME); \ - rm -f $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME); \ - $(LN_S) $(SHLIB_SONAME) $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME) diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h index 8e931033989..f730ea1b5dd 100644 --- a/gcc/config/alpha/vms.h +++ b/gcc/config/alpha/vms.h @@ -225,14 +225,6 @@ typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info; #define LINK_EH_SPEC "vms-dwarf2eh.o%s " #define LINK_GCC_C_SEQUENCE_SPEC "%G" -#ifdef IN_LIBGCC2 -/* Get the definition for MD_FALLBACK_FRAME_STATE_FOR from a separate - file. This avoids having to recompile the world instead of libgcc only - when changes to this macro are exercised. */ - -#define MD_UNWIND_SUPPORT "config/alpha/vms-unwind.h" -#endif - #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ avms_asm_output_external (FILE, DECL, NAME) diff --git a/gcc/config/arm/arm-cores.def b/gcc/config/arm/arm-cores.def index 0bb9aa3ee24..11a6ad93b79 100644 --- a/gcc/config/arm/arm-cores.def +++ b/gcc/config/arm/arm-cores.def @@ -70,10 +70,10 @@ ARM_CORE("arm7dmi", arm7dmi, 3M, FL_CO_PROC | FL_MODE26, fastmul) /* V4 Architecture Processors */ ARM_CORE("arm8", arm8, 4, FL_MODE26 | FL_LDSCHED, fastmul) ARM_CORE("arm810", arm810, 4, FL_MODE26 | FL_LDSCHED, fastmul) -ARM_CORE("strongarm", strongarm, 4, FL_MODE26 | FL_LDSCHED | FL_STRONG, fastmul) -ARM_CORE("strongarm110", strongarm110, 4, FL_MODE26 | FL_LDSCHED | FL_STRONG, fastmul) -ARM_CORE("strongarm1100", strongarm1100, 4, FL_MODE26 | FL_LDSCHED | FL_STRONG, fastmul) -ARM_CORE("strongarm1110", strongarm1110, 4, FL_MODE26 | FL_LDSCHED | FL_STRONG, fastmul) +ARM_CORE("strongarm", strongarm, 4, FL_MODE26 | FL_LDSCHED | FL_STRONG, strongarm) +ARM_CORE("strongarm110", strongarm110, 4, FL_MODE26 | FL_LDSCHED | FL_STRONG, strongarm) +ARM_CORE("strongarm1100", strongarm1100, 4, FL_MODE26 | FL_LDSCHED | FL_STRONG, strongarm) +ARM_CORE("strongarm1110", strongarm1110, 4, FL_MODE26 | FL_LDSCHED | FL_STRONG, strongarm) ARM_CORE("fa526", fa526, 4, FL_LDSCHED, fastmul) ARM_CORE("fa626", fa626, 4, FL_LDSCHED, fastmul) @@ -122,15 +122,16 @@ ARM_CORE("arm1176jz-s", arm1176jzs, 6ZK, FL_LDSCHED, 9e) ARM_CORE("arm1176jzf-s", arm1176jzfs, 6ZK, FL_LDSCHED | FL_VFPV2, 9e) ARM_CORE("mpcorenovfp", mpcorenovfp, 6K, FL_LDSCHED, 9e) ARM_CORE("mpcore", mpcore, 6K, FL_LDSCHED | FL_VFPV2, 9e) -ARM_CORE("arm1156t2-s", arm1156t2s, 6T2, FL_LDSCHED, 9e) -ARM_CORE("arm1156t2f-s", arm1156t2fs, 6T2, FL_LDSCHED | FL_VFPV2, 9e) -ARM_CORE("cortex-a5", cortexa5, 7A, FL_LDSCHED, 9e) -ARM_CORE("cortex-a8", cortexa8, 7A, FL_LDSCHED, 9e) +ARM_CORE("arm1156t2-s", arm1156t2s, 6T2, FL_LDSCHED, v6t2) +ARM_CORE("arm1156t2f-s", arm1156t2fs, 6T2, FL_LDSCHED | FL_VFPV2, v6t2) +ARM_CORE("cortex-a5", cortexa5, 7A, FL_LDSCHED, cortex_a5) +ARM_CORE("cortex-a8", cortexa8, 7A, FL_LDSCHED, cortex) ARM_CORE("cortex-a9", cortexa9, 7A, FL_LDSCHED, cortex_a9) -ARM_CORE("cortex-a15", cortexa15, 7A, FL_LDSCHED, 9e) -ARM_CORE("cortex-r4", cortexr4, 7R, FL_LDSCHED, 9e) -ARM_CORE("cortex-r4f", cortexr4f, 7R, FL_LDSCHED, 9e) -ARM_CORE("cortex-m4", cortexm4, 7EM, FL_LDSCHED, 9e) -ARM_CORE("cortex-m3", cortexm3, 7M, FL_LDSCHED, 9e) -ARM_CORE("cortex-m1", cortexm1, 6M, FL_LDSCHED, 9e) -ARM_CORE("cortex-m0", cortexm0, 6M, FL_LDSCHED, 9e) +ARM_CORE("cortex-a15", cortexa15, 7A, FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV, cortex) +ARM_CORE("cortex-r4", cortexr4, 7R, FL_LDSCHED, cortex) +ARM_CORE("cortex-r4f", cortexr4f, 7R, FL_LDSCHED, cortex) +ARM_CORE("cortex-r5", cortexr5, 7R, FL_LDSCHED | FL_ARM_DIV, cortex) +ARM_CORE("cortex-m4", cortexm4, 7EM, FL_LDSCHED, cortex) +ARM_CORE("cortex-m3", cortexm3, 7M, FL_LDSCHED, cortex) +ARM_CORE("cortex-m1", cortexm1, 6M, FL_LDSCHED, cortex) +ARM_CORE("cortex-m0", cortexm0, 6M, FL_LDSCHED, cortex) diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h index fa252833dae..67aee46e0bf 100644 --- a/gcc/config/arm/arm-protos.h +++ b/gcc/config/arm/arm-protos.h @@ -221,9 +221,14 @@ struct tune_params bool (*rtx_costs) (rtx, RTX_CODE, RTX_CODE, int *, bool); bool (*sched_adjust_cost) (rtx, rtx, rtx, int *); int constant_limit; + /* Maximum number of instructions to conditionalise in + arm_final_prescan_insn. */ + int max_insns_skipped; int num_prefetch_slots; int l1_cache_size; int l1_cache_line_size; + bool prefer_constant_pool; + int (*branch_cost) (bool, bool); }; extern const struct tune_params *current_tune; diff --git a/gcc/config/arm/arm-tables.opt b/gcc/config/arm/arm-tables.opt index f984480a01e..9b3ced651b5 100644 --- a/gcc/config/arm/arm-tables.opt +++ b/gcc/config/arm/arm-tables.opt @@ -250,6 +250,9 @@ EnumValue Enum(processor_type) String(cortex-r4f) Value(cortexr4f) EnumValue +Enum(processor_type) String(cortex-r5) Value(cortexr5) + +EnumValue Enum(processor_type) String(cortex-m4) Value(cortexm4) EnumValue diff --git a/gcc/config/arm/arm-tune.md b/gcc/config/arm/arm-tune.md index 9b664e7e66b..bd1083315ca 100644 --- a/gcc/config/arm/arm-tune.md +++ b/gcc/config/arm/arm-tune.md @@ -1,5 +1,5 @@ ;; -*- buffer-read-only: t -*- ;; Generated automatically by gentune.sh from arm-cores.def (define_attr "tune" - "arm2,arm250,arm3,arm6,arm60,arm600,arm610,arm620,arm7,arm7d,arm7di,arm70,arm700,arm700i,arm710,arm720,arm710c,arm7100,arm7500,arm7500fe,arm7m,arm7dm,arm7dmi,arm8,arm810,strongarm,strongarm110,strongarm1100,strongarm1110,fa526,fa626,arm7tdmi,arm7tdmis,arm710t,arm720t,arm740t,arm9,arm9tdmi,arm920,arm920t,arm922t,arm940t,ep9312,arm10tdmi,arm1020t,arm9e,arm946es,arm966es,arm968es,arm10e,arm1020e,arm1022e,xscale,iwmmxt,iwmmxt2,fa606te,fa626te,fmp626,fa726te,arm926ejs,arm1026ejs,arm1136js,arm1136jfs,arm1176jzs,arm1176jzfs,mpcorenovfp,mpcore,arm1156t2s,arm1156t2fs,cortexa5,cortexa8,cortexa9,cortexa15,cortexr4,cortexr4f,cortexm4,cortexm3,cortexm1,cortexm0" + "arm2,arm250,arm3,arm6,arm60,arm600,arm610,arm620,arm7,arm7d,arm7di,arm70,arm700,arm700i,arm710,arm720,arm710c,arm7100,arm7500,arm7500fe,arm7m,arm7dm,arm7dmi,arm8,arm810,strongarm,strongarm110,strongarm1100,strongarm1110,fa526,fa626,arm7tdmi,arm7tdmis,arm710t,arm720t,arm740t,arm9,arm9tdmi,arm920,arm920t,arm922t,arm940t,ep9312,arm10tdmi,arm1020t,arm9e,arm946es,arm966es,arm968es,arm10e,arm1020e,arm1022e,xscale,iwmmxt,iwmmxt2,fa606te,fa626te,fmp626,fa726te,arm926ejs,arm1026ejs,arm1136js,arm1136jfs,arm1176jzs,arm1176jzfs,mpcorenovfp,mpcore,arm1156t2s,arm1156t2fs,cortexa5,cortexa8,cortexa9,cortexa15,cortexr4,cortexr4f,cortexr5,cortexm4,cortexm3,cortexm1,cortexm0" (const (symbol_ref "((enum attr_tune) arm_tune)"))) diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 22ddcd217ce..057f9bae9c0 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -255,6 +255,8 @@ static bool arm_builtin_support_vector_misalignment (enum machine_mode mode, static void arm_conditional_register_usage (void); static reg_class_t arm_preferred_rename_class (reg_class_t rclass); static unsigned int arm_autovectorize_vector_sizes (void); +static int arm_default_branch_cost (bool, bool); +static int arm_cortex_a5_branch_cost (bool, bool); /* Table of machine attributes. */ @@ -662,12 +664,13 @@ static int thumb_call_reg_needed; #define FL_THUMB2 (1 << 16) /* Thumb-2. */ #define FL_NOTM (1 << 17) /* Instructions not present in the 'M' profile. */ -#define FL_DIV (1 << 18) /* Hardware divide. */ +#define FL_THUMB_DIV (1 << 18) /* Hardware divide (Thumb mode). */ #define FL_VFPV3 (1 << 19) /* Vector Floating Point V3. */ #define FL_NEON (1 << 20) /* Neon instructions. */ #define FL_ARCH7EM (1 << 21) /* Instructions present in the ARMv7E-M architecture. */ #define FL_ARCH7 (1 << 22) /* Architecture 7. */ +#define FL_ARM_DIV (1 << 23) /* Hardware divide (ARM mode). */ #define FL_IWMMXT (1 << 29) /* XScale v2 or "Intel Wireless MMX technology". */ @@ -694,8 +697,8 @@ static int thumb_call_reg_needed; #define FL_FOR_ARCH6M (FL_FOR_ARCH6 & ~FL_NOTM) #define FL_FOR_ARCH7 ((FL_FOR_ARCH6T2 & ~FL_NOTM) | FL_ARCH7) #define FL_FOR_ARCH7A (FL_FOR_ARCH7 | FL_NOTM | FL_ARCH6K) -#define FL_FOR_ARCH7R (FL_FOR_ARCH7A | FL_DIV) -#define FL_FOR_ARCH7M (FL_FOR_ARCH7 | FL_DIV) +#define FL_FOR_ARCH7R (FL_FOR_ARCH7A | FL_THUMB_DIV) +#define FL_FOR_ARCH7M (FL_FOR_ARCH7 | FL_THUMB_DIV) #define FL_FOR_ARCH7EM (FL_FOR_ARCH7M | FL_ARCH7EM) /* The bits in this mask specify which @@ -781,7 +784,8 @@ int arm_cpp_interwork = 0; int arm_arch_thumb2; /* Nonzero if chip supports integer division instruction. */ -int arm_arch_hwdiv; +int arm_arch_arm_hwdiv; +int arm_arch_thumb_hwdiv; /* In case of a PRE_INC, POST_INC, PRE_DEC, POST_DEC memory reference, we must report the mode of the memory reference from @@ -854,48 +858,117 @@ const struct tune_params arm_slowmul_tune = { arm_slowmul_rtx_costs, NULL, - 3, - ARM_PREFETCH_NOT_BENEFICIAL + 3, /* Constant limit. */ + 5, /* Max cond insns. */ + ARM_PREFETCH_NOT_BENEFICIAL, + true, /* Prefer constant pool. */ + arm_default_branch_cost }; const struct tune_params arm_fastmul_tune = { arm_fastmul_rtx_costs, NULL, - 1, - ARM_PREFETCH_NOT_BENEFICIAL + 1, /* Constant limit. */ + 5, /* Max cond insns. */ + ARM_PREFETCH_NOT_BENEFICIAL, + true, /* Prefer constant pool. */ + arm_default_branch_cost +}; + +/* StrongARM has early execution of branches, so a sequence that is worth + skipping is shorter. Set max_insns_skipped to a lower value. */ + +const struct tune_params arm_strongarm_tune = +{ + arm_fastmul_rtx_costs, + NULL, + 1, /* Constant limit. */ + 3, /* Max cond insns. */ + ARM_PREFETCH_NOT_BENEFICIAL, + true, /* Prefer constant pool. */ + arm_default_branch_cost }; const struct tune_params arm_xscale_tune = { arm_xscale_rtx_costs, xscale_sched_adjust_cost, - 2, - ARM_PREFETCH_NOT_BENEFICIAL + 2, /* Constant limit. */ + 3, /* Max cond insns. */ + ARM_PREFETCH_NOT_BENEFICIAL, + true, /* Prefer constant pool. */ + arm_default_branch_cost }; const struct tune_params arm_9e_tune = { arm_9e_rtx_costs, NULL, - 1, - ARM_PREFETCH_NOT_BENEFICIAL + 1, /* Constant limit. */ + 5, /* Max cond insns. */ + ARM_PREFETCH_NOT_BENEFICIAL, + true, /* Prefer constant pool. */ + arm_default_branch_cost +}; + +const struct tune_params arm_v6t2_tune = +{ + arm_9e_rtx_costs, + NULL, + 1, /* Constant limit. */ + 5, /* Max cond insns. */ + ARM_PREFETCH_NOT_BENEFICIAL, + false, /* Prefer constant pool. */ + arm_default_branch_cost +}; + +/* Generic Cortex tuning. Use more specific tunings if appropriate. */ +const struct tune_params arm_cortex_tune = +{ + arm_9e_rtx_costs, + NULL, + 1, /* Constant limit. */ + 5, /* Max cond insns. */ + ARM_PREFETCH_NOT_BENEFICIAL, + false, /* Prefer constant pool. */ + arm_default_branch_cost +}; + +/* Branches can be dual-issued on Cortex-A5, so conditional execution is + less appealing. Set max_insns_skipped to a low value. */ + +const struct tune_params arm_cortex_a5_tune = +{ + arm_9e_rtx_costs, + NULL, + 1, /* Constant limit. */ + 1, /* Max cond insns. */ + ARM_PREFETCH_NOT_BENEFICIAL, + false, /* Prefer constant pool. */ + arm_cortex_a5_branch_cost }; const struct tune_params arm_cortex_a9_tune = { arm_9e_rtx_costs, cortex_a9_sched_adjust_cost, - 1, - ARM_PREFETCH_BENEFICIAL(4,32,32) + 1, /* Constant limit. */ + 5, /* Max cond insns. */ + ARM_PREFETCH_BENEFICIAL(4,32,32), + false, /* Prefer constant pool. */ + arm_default_branch_cost }; const struct tune_params arm_fa726te_tune = { arm_9e_rtx_costs, fa726te_sched_adjust_cost, - 1, - ARM_PREFETCH_NOT_BENEFICIAL + 1, /* Constant limit. */ + 5, /* Max cond insns. */ + ARM_PREFETCH_NOT_BENEFICIAL, + true, /* Prefer constant pool. */ + arm_default_branch_cost }; @@ -1449,7 +1522,8 @@ arm_option_override (void) arm_tune_wbuf = (tune_flags & FL_WBUF) != 0; arm_tune_xscale = (tune_flags & FL_XSCALE) != 0; arm_arch_iwmmxt = (insn_flags & FL_IWMMXT) != 0; - arm_arch_hwdiv = (insn_flags & FL_DIV) != 0; + arm_arch_thumb_hwdiv = (insn_flags & FL_THUMB_DIV) != 0; + arm_arch_arm_hwdiv = (insn_flags & FL_ARM_DIV) != 0; arm_tune_cortex_a9 = (arm_tune == cortexa9) != 0; /* If we are not using the default (ARM mode) section anchor offset @@ -1687,12 +1761,7 @@ arm_option_override (void) max_insns_skipped = 6; } else - { - /* StrongARM has early execution of branches, so a sequence - that is worth skipping is shorter. */ - if (arm_tune_strongarm) - max_insns_skipped = 3; - } + max_insns_skipped = current_tune->max_insns_skipped; /* Hot/Cold partitioning is not currently supported, since we can't handle literal pool placement in that case. */ @@ -8008,6 +8077,21 @@ arm_adjust_cost (rtx insn, rtx link, rtx dep, int cost) return cost; } +static int +arm_default_branch_cost (bool speed_p, bool predictable_p ATTRIBUTE_UNUSED) +{ + if (TARGET_32BIT) + return (TARGET_THUMB2 && !speed_p) ? 1 : 4; + else + return (optimize > 0) ? 2 : 0; +} + +static int +arm_cortex_a5_branch_cost (bool speed_p, bool predictable_p) +{ + return speed_p ? 0 : arm_default_branch_cost (speed_p, predictable_p); +} + static int fp_consts_inited = 0; /* Only zero is valid for VFP. Other values are also valid for FPA. */ @@ -23019,6 +23103,7 @@ arm_issue_rate (void) { case cortexr4: case cortexr4f: + case cortexr5: case cortexa5: case cortexa8: case cortexa9: diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 86d842ddf4a..c32ef1ad030 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -101,6 +101,8 @@ extern char arm_arch_name[]; builtin_define ("__ARM_PCS"); \ builtin_define ("__ARM_EABI__"); \ } \ + if (TARGET_IDIV) \ + builtin_define ("__ARM_ARCH_EXT_IDIV__"); \ } while (0) #include "config/arm/arm-opts.h" @@ -269,7 +271,8 @@ extern void (*arm_lang_output_object_attributes_hook)(void); (TARGET_32BIT && arm_arch6 && (arm_arch_notm || arm_arch7em)) /* Should MOVW/MOVT be used in preference to a constant pool. */ -#define TARGET_USE_MOVT (arm_arch_thumb2 && !optimize_size) +#define TARGET_USE_MOVT \ + (arm_arch_thumb2 && !optimize_size && !current_tune->prefer_constant_pool) /* We could use unified syntax for arm mode, but for now we just use it for Thumb-2. */ @@ -290,6 +293,10 @@ extern void (*arm_lang_output_object_attributes_hook)(void); /* Nonzero if this chip supports ldrex{bhd} and strex{bhd}. */ #define TARGET_HAVE_LDREXBHD ((arm_arch6k && TARGET_ARM) || arm_arch7) +/* Nonzero if integer division instructions supported. */ +#define TARGET_IDIV ((TARGET_ARM && arm_arch_arm_hwdiv) \ + || (TARGET_THUMB2 && arm_arch_thumb_hwdiv)) + /* True iff the full BPABI is being used. If TARGET_BPABI is true, then TARGET_AAPCS_BASED must be true -- but the converse does not hold. TARGET_BPABI implies the use of the BPABI runtime library, @@ -430,8 +437,11 @@ extern int arm_cpp_interwork; /* Nonzero if chip supports Thumb 2. */ extern int arm_arch_thumb2; -/* Nonzero if chip supports integer division instruction. */ -extern int arm_arch_hwdiv; +/* Nonzero if chip supports integer division instruction in ARM mode. */ +extern int arm_arch_arm_hwdiv; + +/* Nonzero if chip supports integer division instruction in Thumb mode. */ +extern int arm_arch_thumb_hwdiv; #ifndef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_APCS_FRAME) @@ -1946,8 +1956,8 @@ typedef struct /* Try to generate sequences that don't involve branches, we can then use conditional instructions */ #define BRANCH_COST(speed_p, predictable_p) \ - (TARGET_32BIT ? (TARGET_THUMB2 && !speed_p ? 1 : 4) \ - : (optimize > 0 ? 2 : 0)) + (current_tune->branch_cost (speed_p, predictable_p)) + /* Position Independent Code. */ /* We decide which register to use based on the compilation options and diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index fad82f01f52..f5b97f65c23 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -496,7 +496,7 @@ (define_attr "tune_cortexr4" "yes,no" (const (if_then_else - (eq_attr "tune" "cortexr4,cortexr4f") + (eq_attr "tune" "cortexr4,cortexr4f,cortexr5") (const_string "yes") (const_string "no")))) @@ -3681,6 +3681,28 @@ (set_attr "predicable" "yes")] ) + +;; Division instructions +(define_insn "divsi3" + [(set (match_operand:SI 0 "s_register_operand" "=r") + (div:SI (match_operand:SI 1 "s_register_operand" "r") + (match_operand:SI 2 "s_register_operand" "r")))] + "TARGET_IDIV" + "sdiv%?\t%0, %1, %2" + [(set_attr "predicable" "yes") + (set_attr "insn" "sdiv")] +) + +(define_insn "udivsi3" + [(set (match_operand:SI 0 "s_register_operand" "=r") + (udiv:SI (match_operand:SI 1 "s_register_operand" "r") + (match_operand:SI 2 "s_register_operand" "r")))] + "TARGET_IDIV" + "udiv%?\t%0, %1, %2" + [(set_attr "predicable" "yes") + (set_attr "insn" "udiv")] +) + ;; Unary arithmetic insns diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md index 2dfa9c14ef3..8c31c48b495 100644 --- a/gcc/config/arm/neon.md +++ b/gcc/config/arm/neon.md @@ -801,17 +801,44 @@ [(set_attr "neon_type" "neon_int_1")] ) -(define_insn "orndi3_neon" - [(set (match_operand:DI 0 "s_register_operand" "=w,?=&r,?&r") - (ior:DI (not:DI (match_operand:DI 2 "s_register_operand" "w,0,r")) - (match_operand:DI 1 "s_register_operand" "w,r,0")))] +;; TODO: investigate whether we should disable +;; this and bicdi3_neon for the A8 in line with the other +;; changes above. +(define_insn_and_split "orndi3_neon" + [(set (match_operand:DI 0 "s_register_operand" "=w,?&r,?&r,?&r") + (ior:DI (not:DI (match_operand:DI 2 "s_register_operand" "w,0,0,r")) + (match_operand:DI 1 "s_register_operand" "w,r,r,0")))] "TARGET_NEON" "@ vorn\t%P0, %P1, %P2 # + # #" - [(set_attr "neon_type" "neon_int_1,*,*") - (set_attr "length" "*,8,8")] + "reload_completed && + (TARGET_NEON && !(IS_VFP_REGNUM (REGNO (operands[0]))))" + [(set (match_dup 0) (ior:SI (not:SI (match_dup 2)) (match_dup 1))) + (set (match_dup 3) (ior:SI (not:SI (match_dup 4)) (match_dup 5)))] + " + { + if (TARGET_THUMB2) + { + operands[3] = gen_highpart (SImode, operands[0]); + operands[0] = gen_lowpart (SImode, operands[0]); + operands[4] = gen_highpart (SImode, operands[2]); + operands[2] = gen_lowpart (SImode, operands[2]); + operands[5] = gen_highpart (SImode, operands[1]); + operands[1] = gen_lowpart (SImode, operands[1]); + } + else + { + emit_insn (gen_one_cmpldi2 (operands[0], operands[2])); + emit_insn (gen_iordi3 (operands[0], operands[1], operands[0])); + DONE; + } + }" + [(set_attr "neon_type" "neon_int_1,*,*,*") + (set_attr "length" "*,16,8,8") + (set_attr "arch" "any,a,t2,t2")] ) (define_insn "bic<mode>3_neon" diff --git a/gcc/config/arm/t-bpabi b/gcc/config/arm/t-bpabi index 61da9ec7b4c..78812b35bd8 100644 --- a/gcc/config/arm/t-bpabi +++ b/gcc/config/arm/t-bpabi @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -29,7 +29,6 @@ UNWIND_H = $(srcdir)/config/arm/unwind-arm.h LIB2ADDEH = $(srcdir)/config/arm/unwind-arm.c \ $(srcdir)/config/arm/libunwind.S \ $(srcdir)/config/arm/pr-support.c $(srcdir)/unwind-c.c -LIB2ADDEHDEP = $(UNWIND_H) $(srcdir)/config/$(LIB1ASMSRC) # Add the BPABI names. SHLIB_MAPFILES += $(srcdir)/config/arm/libgcc-bpabi.ver diff --git a/gcc/config/arm/t-symbian b/gcc/config/arm/t-symbian index 4a1476f6791..3be83f445aa 100644 --- a/gcc/config/arm/t-symbian +++ b/gcc/config/arm/t-symbian @@ -1,4 +1,4 @@ -# Copyright (C) 2004, 2005, 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2006, 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -33,7 +33,6 @@ LIB1ASMFUNCS += \ # Include the gcc personality routine UNWIND_H = $(srcdir)/config/arm/unwind-arm.h LIB2ADDEH = $(srcdir)/unwind-c.c $(srcdir)/config/arm/pr-support.c -LIB2ADDEHDEP = $(UNWIND_H) # Include half-float helpers. LIB2FUNCS_STATIC_EXTRA = $(srcdir)/config/arm/fp16.c diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index 897d80513b2..26dcbdde83e 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -779,26 +779,6 @@ (set_attr "length" "2")] ) -(define_insn "divsi3" - [(set (match_operand:SI 0 "s_register_operand" "=r") - (div:SI (match_operand:SI 1 "s_register_operand" "r") - (match_operand:SI 2 "s_register_operand" "r")))] - "TARGET_THUMB2 && arm_arch_hwdiv" - "sdiv%?\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "insn" "sdiv")] -) - -(define_insn "udivsi3" - [(set (match_operand:SI 0 "s_register_operand" "=r") - (udiv:SI (match_operand:SI 1 "s_register_operand" "r") - (match_operand:SI 2 "s_register_operand" "r")))] - "TARGET_THUMB2 && arm_arch_hwdiv" - "udiv%?\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "insn" "udiv")] -) - (define_insn "*thumb2_subsi_short" [(set (match_operand:SI 0 "low_register_operand" "=l") (minus:SI (match_operand:SI 1 "low_register_operand" "l") diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 4f371fd928f..2af0afe6db5 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -86,14 +86,6 @@ const char *byte_reg_names[] = BYTE_REGISTER_NAMES; static int arg_regs[] = FUNCTION_ARG_REGISTERS; static int ret_regs[] = FUNCTION_RETURN_REGISTERS; -/* Nonzero if -fschedule-insns2 was given. We override it and - call the scheduler ourselves during reorg. */ -static int bfin_flag_schedule_insns2; - -/* Determines whether we run variable tracking in machine dependent - reorganization. */ -static int bfin_flag_var_tracking; - struct bfin_cpu { const char *name; @@ -375,13 +367,6 @@ output_file_start (void) FILE *file = asm_out_file; int i; - /* Variable tracking should be run after all optimizations which change order - of insns. It also needs a valid CFG. This can't be done in - bfin_option_override, because flag_var_tracking is finalized after - that. */ - bfin_flag_var_tracking = flag_var_tracking; - flag_var_tracking = 0; - fprintf (file, ".file \"%s\";\n", input_filename); for (i = 0; arg_regs[i] >= 0; i++) @@ -2110,6 +2095,8 @@ bfin_function_ok_for_sibcall (tree decl ATTRIBUTE_UNUSED, this_func = cgraph_local_info (current_function_decl); called_func = cgraph_local_info (decl); + if (!called_func) + return false; return !called_func->local || this_func->local; } @@ -2772,11 +2759,6 @@ bfin_option_override (void) flag_schedule_insns = 0; - /* Passes after sched2 can break the helpful TImode annotations that - haifa-sched puts on every insn. Just do scheduling in reorg. */ - bfin_flag_schedule_insns2 = flag_schedule_insns_after_reload; - flag_schedule_insns_after_reload = 0; - init_machine_status = bfin_init_machine_status; } @@ -5550,7 +5532,7 @@ bfin_reorg (void) with old MDEP_REORGS that are not CFG based. Recompute it now. */ compute_bb_for_insn (); - if (bfin_flag_schedule_insns2) + if (flag_schedule_insns_after_reload) { splitting_for_sched = 1; split_all_insns (); @@ -5579,7 +5561,7 @@ bfin_reorg (void) workaround_speculation (); - if (bfin_flag_var_tracking) + if (flag_var_tracking) { timevar_push (TV_VAR_TRACKING); variable_tracking_main (); @@ -6765,4 +6747,14 @@ bfin_conditional_register_usage (void) #undef TARGET_EXTRA_LIVE_ON_ENTRY #define TARGET_EXTRA_LIVE_ON_ENTRY bfin_extra_live_on_entry +/* Passes after sched2 can break the helpful TImode annotations that + haifa-sched puts on every insn. Just do scheduling in reorg. */ +#undef TARGET_DELAY_SCHED2 +#define TARGET_DELAY_SCHED2 true + +/* Variable tracking should be run after all optimizations which + change order of insns. It also needs a valid CFG. */ +#undef TARGET_DELAY_VARTRACK +#define TARGET_DELAY_VARTRACK true + struct gcc_target targetm = TARGET_INITIALIZER; diff --git a/gcc/config/bfin/linux.h b/gcc/config/bfin/linux.h index cd15f48ed72..f91cf17f141 100644 --- a/gcc/config/bfin/linux.h +++ b/gcc/config/bfin/linux.h @@ -48,7 +48,5 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -dynamic-linker /lib/ld-uClibc.so.0} \ %{static}} -init __init -fini __fini" -#define MD_UNWIND_SUPPORT "config/bfin/linux-unwind.h" - #undef TARGET_SUPPORTS_SYNC_CALLS #define TARGET_SUPPORTS_SYNC_CALLS 1 diff --git a/gcc/config/bfin/uclinux.h b/gcc/config/bfin/uclinux.h index 354ff55a60b..da26be57606 100644 --- a/gcc/config/bfin/uclinux.h +++ b/gcc/config/bfin/uclinux.h @@ -32,8 +32,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see %{mfast-fp:-lbffastfp} %G %L %{mfast-fp:-lbffastfp} %G \ " -#define MD_UNWIND_SUPPORT "config/bfin/linux-unwind.h" - /* Like the definition in gcc.c, but for purposes of uClinux, every link is static. */ #define MFWRAP_SPEC " %{fmudflap|fmudflapth: \ diff --git a/gcc/config/darwin9.h b/gcc/config/darwin9.h index 82811837282..bb62dd4ca9f 100644 --- a/gcc/config/darwin9.h +++ b/gcc/config/darwin9.h @@ -1,5 +1,5 @@ /* Target definitions for Darwin (Mac OS X) systems. - Copyright (C) 2006, 2007, 2010 Free Software Foundation, Inc. + Copyright (C) 2006, 2007, 2010, 2011 Free Software Foundation, Inc. Contributed by Apple Inc. This file is part of GCC. @@ -35,9 +35,6 @@ along with GCC; see the file COPYING3. If not see /* Tell collect2 to run dsymutil for us as necessary. */ #define COLLECT_RUN_DSYMUTIL 1 -/* libSystem contains unwind information for signal frames. */ -#define DARWIN_LIBSYSTEM_HAS_UNWIND - #undef ASM_OUTPUT_ALIGNED_COMMON #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ do { \ diff --git a/gcc/config/i386/constraints.md b/gcc/config/i386/constraints.md index 3197ba26c66..099c2e15457 100644 --- a/gcc/config/i386/constraints.md +++ b/gcc/config/i386/constraints.md @@ -99,6 +99,12 @@ (define_register_constraint "Y2" "TARGET_SSE2 ? SSE_REGS : NO_REGS" "@internal Any SSE register, when SSE2 is enabled.") +(define_register_constraint "Y3" "TARGET_SSE3 ? SSE_REGS : NO_REGS" + "@internal Any SSE register, when SSE3 is enabled.") + +(define_register_constraint "Y4" "TARGET_SSE4_1 ? SSE_REGS : NO_REGS" + "@internal Any SSE register, when SSE4_1 is enabled.") + (define_register_constraint "Yi" "TARGET_SSE2 && TARGET_INTER_UNIT_MOVES ? SSE_REGS : NO_REGS" "@internal Any SSE register, when SSE2 and inter-unit moves are enabled.") diff --git a/gcc/config/i386/crtfastmath.c b/gcc/config/i386/crtfastmath.c index 1c1ce2c7860..7abe500e981 100644 --- a/gcc/config/i386/crtfastmath.c +++ b/gcc/config/i386/crtfastmath.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc. + * Copyright (C) 2005, 2007, 2009, 2011 Free Software Foundation, Inc. * * This file is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -30,6 +30,26 @@ #include "cpuid.h" #endif +#if !defined __x86_64__ && defined __sun__ && defined __svr4__ +#include <signal.h> +#include <ucontext.h> + +static volatile sig_atomic_t sigill_caught; + +static void +sigill_hdlr (int sig __attribute((unused)), + siginfo_t *sip __attribute__((unused)), + ucontext_t *ucp) +{ + sigill_caught = 1; + /* Set PC to the instruction after the faulting one to skip over it, + otherwise we enter an infinite loop. 3 is the size of the movaps + instruction. */ + ucp->uc_mcontext.gregs[EIP] += 3; + setcontext (ucp); +} +#endif + static void __attribute__((constructor)) #ifndef __x86_64__ /* The i386 ABI only requires 4-byte stack alignment, so this is necessary @@ -47,9 +67,31 @@ set_fast_math (void) if (edx & bit_SSE) { - unsigned int mxcsr = __builtin_ia32_stmxcsr (); + unsigned int mxcsr; - mxcsr |= MXCSR_FTZ; +#if defined __sun__ && defined __svr4__ + /* Solaris 2 before Solaris 9 4/04 cannot execute SSE instructions even + if the CPU supports them. Programs receive SIGILL instead, so check + for that at runtime. */ + struct sigaction act, oact; + + act.sa_handler = sigill_hdlr; + sigemptyset (&act.sa_mask); + /* Need to set SA_SIGINFO so a ucontext_t * is passed to the handler. */ + act.sa_flags = SA_SIGINFO; + sigaction (SIGILL, &act, &oact); + + /* We need a single SSE instruction here so the handler can safely skip + over it. */ + __asm__ volatile ("movaps %xmm0,%xmm0"); + + sigaction (SIGILL, &oact, NULL); + + if (sigill_caught) + return; +#endif /* __sun__ && __svr4__ */ + + mxcsr = __builtin_ia32_stmxcsr () | MXCSR_FTZ; if (edx & bit_FXSAVE) { diff --git a/gcc/config/i386/gmon-sol2.c b/gcc/config/i386/gmon-sol2.c deleted file mode 100644 index 44bbb44488f..00000000000 --- a/gcc/config/i386/gmon-sol2.c +++ /dev/null @@ -1,459 +0,0 @@ -/*- - * Copyright (c) 1991 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. [rescinded 22 July 1999] - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* - * This is a modified gmon.c by J.W.Hawtin <oolon@ankh.org>, - * 14/8/96 based on the original gmon.c in GCC and the hacked version - * solaris 2 sparc version (config/sparc/gmon-sol.c) by Mark Eichin. To do - * process profiling on solaris 2.X X86 - * - * It must be used in conjunction with sol2-gc1.asm, which is used to start - * and stop process monitoring. - * - * Differences. - * - * On Solaris 2 _mcount is called by library functions not mcount, so support - * has been added for both. - * - * Also the prototype for profil() is different - * - * Solaris 2 does not seem to have char *minbrk whcih allows the setting of - * the minimum SBRK region so this code has been removed and lets pray malloc - * does not mess it up. - * - * Notes - * - * This code could easily be integrated with the original gmon.c and perhaps - * should be. - */ -#include "tconfig.h" -#include "tsystem.h" -#include <fcntl.h> /* for creat() */ - -#ifdef DEBUG -#include <stdio.h> -#endif - -static void moncontrol (int); -extern void monstartup (char *, char *); -extern void _mcleanup (void); -extern void internal_mcount ( -#ifdef __x86_64__ - char *, unsigned short * -#else - void -#endif - ); - - -struct phdr { - char *lpc; - char *hpc; - int ncnt; -}; - - -#define HISTFRACTION 2 -#define HISTCOUNTER unsigned short -#define HASHFRACTION 1 -#define ARCDENSITY 2 -#define MINARCS 50 -#define BASEADDRESS 0x8000000 /* On Solaris 2 X86 all executables start here - and not at 0 */ - -struct tostruct { - char *selfpc; - long count; - unsigned short link; -}; - -struct rawarc { - unsigned long raw_frompc; - unsigned long raw_selfpc; - long raw_count; -}; -#define ROUNDDOWN(x,y) (((x)/(y))*(y)) -#define ROUNDUP(x,y) ((((x)+(y)-1)/(y))*(y)) - -/* char *minbrk; */ - -typedef __SIZE_TYPE__ size_t; -typedef __PTRDIFF_TYPE__ intptr_t; - - /* - * froms is actually a bunch of unsigned shorts indexing tos - */ -static int profiling = 3; -static unsigned short *froms; -static struct tostruct *tos = 0; -static long tolimit = 0; -static char *s_lowpc = 0; -static char *s_highpc = 0; -static size_t s_textsize = 0; - -static int ssiz; -static char *sbuf; -static int s_scale; - /* see profil(2) where this is describe (incorrectly) */ -#define SCALE_1_TO_1 0x10000L - -#define MSG "No space for profiling buffer(s)\n" - -extern int errno; - -extern void *sbrk (intptr_t); - -void -monstartup(char *lowpc, char *highpc) -{ - size_t monsize; - char *buffer; - register size_t o; - - /* - * round lowpc and highpc to multiples of the density we're using - * so the rest of the scaling (here and in gprof) stays in ints. - */ - lowpc = (char *) - ROUNDDOWN((size_t)lowpc, HISTFRACTION*sizeof(HISTCOUNTER)); - s_lowpc = lowpc; - highpc = (char *) - ROUNDUP((size_t)highpc, HISTFRACTION*sizeof(HISTCOUNTER)); - s_highpc = highpc; - s_textsize = highpc - lowpc; - monsize = (s_textsize / HISTFRACTION) + sizeof(struct phdr); - buffer = (char *) sbrk( monsize ); - if ( buffer == (char *) -1 ) { - write( 2 , MSG , sizeof(MSG) ); - return; - } - froms = (unsigned short *) sbrk( s_textsize / HASHFRACTION ); - if ( froms == (unsigned short *) -1 ) { - write( 2 , MSG , sizeof(MSG) ); - froms = 0; - return; - } - tolimit = s_textsize * ARCDENSITY / 100; - if ( tolimit < MINARCS ) { - tolimit = MINARCS; - } else if ( tolimit > 65534 ) { - tolimit = 65534; - } - tos = (struct tostruct *) sbrk( tolimit * sizeof( struct tostruct ) ); - if ( tos == (struct tostruct *) -1 ) { - write( 2 , MSG , sizeof(MSG) ); - froms = 0; - tos = 0; - return; - } -/* minbrk = (char *) sbrk(0);*/ - tos[0].link = 0; - sbuf = buffer; - ssiz = monsize; - ( (struct phdr *) buffer ) -> lpc = lowpc; - ( (struct phdr *) buffer ) -> hpc = highpc; - ( (struct phdr *) buffer ) -> ncnt = ssiz; - monsize -= sizeof(struct phdr); - if ( monsize <= 0 ) - return; - o = highpc - lowpc; - if( monsize < o ) -#ifndef hp300 - s_scale = ( (float) monsize / o ) * SCALE_1_TO_1; -#else /* avoid floating point */ - { - int quot = o / monsize; - - if (quot >= 0x10000) - s_scale = 1; - else if (quot >= 0x100) - s_scale = 0x10000 / quot; - else if (o >= 0x800000) - s_scale = 0x1000000 / (o / (monsize >> 8)); - else - s_scale = 0x1000000 / ((o << 8) / monsize); - } -#endif - else - s_scale = SCALE_1_TO_1; - moncontrol(1); -} - -void -_mcleanup (void) -{ - int fd; - int fromindex; - int endfrom; - char *frompc; - int toindex; - struct rawarc rawarc; - - moncontrol(0); - fd = creat( "gmon.out" , 0666 ); - if ( fd < 0 ) { - perror( "mcount: gmon.out" ); - return; - } -# ifdef DEBUG - fprintf( stderr , "[mcleanup] sbuf %#x ssiz %d\n" , sbuf , ssiz ); -# endif /* DEBUG */ - - write( fd , sbuf , ssiz ); - endfrom = s_textsize / (HASHFRACTION * sizeof(*froms)); - for ( fromindex = 0 ; fromindex < endfrom ; fromindex++ ) { - if ( froms[fromindex] == 0 ) { - continue; - } - frompc = s_lowpc + (fromindex * HASHFRACTION * sizeof(*froms)); - for (toindex=froms[fromindex]; toindex!=0; toindex=tos[toindex].link) { -# ifdef DEBUG - fprintf( stderr , - "[mcleanup] frompc %#x selfpc %#x count %d\n" , - frompc , tos[toindex].selfpc , tos[toindex].count ); -# endif /* DEBUG */ - rawarc.raw_frompc = (unsigned long) frompc; - rawarc.raw_selfpc = (unsigned long) tos[toindex].selfpc; - rawarc.raw_count = tos[toindex].count; - write( fd , &rawarc , sizeof rawarc ); - } - } - close( fd ); -} - -#ifdef __x86_64__ -/* See GLIBC for additional information about this technique. */ -asm(".globl _mcount\n" - "\t.type\t_mcount, @function\n" - "_mcount:\n" - /* The compiler calls _mcount after the prologue, and does not - save any of the registers. Therefore we must preserve all - seven registers which may contain function arguments. */ - "\tsubq\t$0x38,%rsp\n" - "\tmovq\t%rax,(%rsp)\n" - "\tmovq\t%rcx,0x08(%rsp)\n" - "\tmovq\t%rdx,0x10(%rsp)\n" - "\tmovq\t%rsi,0x18(%rsp)\n" - "\tmovq\t%rdi,0x20(%rsp)\n" - "\tmovq\t%r8,0x28(%rsp)\n" - "\tmovq\t%r9,0x30(%rsp)\n" - /* Get SELFPC (pushed by the call to this function) and - FROMPCINDEX (via the frame pointer. */ - "\tmovq\t0x38(%rsp),%rdi\n" - "\tmovq\t0x8(%rbp),%rsi\n" - "\tcall\tinternal_mcount\n" - /* Restore the saved registers. */ - "\tmovq\t0x30(%rsp),%r9\n" - "\tmovq\t0x28(%rsp),%r8\n" - "\tmovq\t0x20(%rsp),%rdi\n" - "\tmovq\t0x18(%rsp),%rsi\n" - "\tmovq\t0x10(%rsp),%rdx\n" - "\tmovq\t0x08(%rsp),%rcx\n" - "\tmovq\t(%rsp),%rax\n" - "\taddq\t$0x38,%rsp\n" - "\tretq\n" - ); -#else -/* Solaris 2 libraries use _mcount. */ -asm(".globl _mcount; _mcount: jmp internal_mcount"); -/* This is for compatibility with old versions of gcc which used mcount. */ -asm(".globl mcount; mcount: jmp internal_mcount"); -#endif - -void -internal_mcount ( -#ifdef __x86_64__ - char *selfpc, - unsigned short *frompcindex -#else - void -#endif - ) -{ -#ifndef __x86_64__ - register char *selfpc; - register unsigned short *frompcindex; -#endif - register struct tostruct *top; - register struct tostruct *prevtop; - register long toindex; - static char already_setup; - -#ifndef __x86_64__ - /* - * find the return address for mcount, - * and the return address for mcount's caller. - */ - - /* selfpc = pc pushed by mcount call. - This identifies the function that was just entered. */ - selfpc = (void *) __builtin_return_address (0); - /* frompcindex = pc in preceding frame. - This identifies the caller of the function just entered. */ - frompcindex = (void *) __builtin_return_address (1); -#endif - - if(!already_setup) { - extern char etext[]; - already_setup = 1; -#ifdef __x86_64__ - monstartup(0, etext); -#else - monstartup((char*)0x08040000, etext); -#endif -#ifdef USE_ONEXIT - on_exit(_mcleanup, 0); -#else - atexit(_mcleanup); -#endif - } - /* - * check that we are profiling - * and that we aren't recursively invoked. - */ - if (profiling) { - goto out; - } - profiling++; - /* - * check that frompcindex is a reasonable pc value. - * for example: signal catchers get called from the stack, - * not from text space. too bad. - */ - frompcindex = (unsigned short *)((long)frompcindex - (long)s_lowpc); - if ((unsigned long)frompcindex > s_textsize) { - goto done; - } - frompcindex = - &froms[((long)frompcindex) / (HASHFRACTION * sizeof(*froms))]; - toindex = *frompcindex; - if (toindex == 0) { - /* - * first time traversing this arc - */ - toindex = ++tos[0].link; - if (toindex >= tolimit) { - goto overflow; - } - *frompcindex = toindex; - top = &tos[toindex]; - top->selfpc = selfpc; - top->count = 1; - top->link = 0; - goto done; - } - top = &tos[toindex]; - if (top->selfpc == selfpc) { - /* - * arc at front of chain; usual case. - */ - top->count++; - goto done; - } - /* - * have to go looking down chain for it. - * top points to what we are looking at, - * prevtop points to previous top. - * we know it is not at the head of the chain. - */ - for (; /* goto done */; ) { - if (top->link == 0) { - /* - * top is end of the chain and none of the chain - * had top->selfpc == selfpc. - * so we allocate a new tostruct - * and link it to the head of the chain. - */ - toindex = ++tos[0].link; - if (toindex >= tolimit) { - goto overflow; - } - top = &tos[toindex]; - top->selfpc = selfpc; - top->count = 1; - top->link = *frompcindex; - *frompcindex = toindex; - goto done; - } - /* - * otherwise, check the next arc on the chain. - */ - prevtop = top; - top = &tos[top->link]; - if (top->selfpc == selfpc) { - /* - * there it is. - * increment its count - * move it to the head of the chain. - */ - top->count++; - toindex = prevtop->link; - prevtop->link = top->link; - top->link = *frompcindex; - *frompcindex = toindex; - goto done; - } - - } -done: - profiling--; - /* and fall through */ -out: - return; /* normal return restores saved registers */ - -overflow: - profiling++; /* halt further profiling */ -# define TOLIMIT "mcount: tos overflow\n" - write(2, TOLIMIT, sizeof(TOLIMIT)); - goto out; -} - -/* - * Control profiling - * profiling is what mcount checks to see if - * all the data structures are ready. - */ -static void -moncontrol(int mode) -{ - if (mode) - { - /* start */ - profil((unsigned short *)(sbuf + sizeof(struct phdr)), - ssiz - sizeof(struct phdr), - (size_t)s_lowpc, s_scale); - - profiling = 0; - } else { - /* stop */ - profil((unsigned short *)0, 0, 0, 0); - profiling = 3; - } -} diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 85d145a9428..db6a0d6e141 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -8601,33 +8601,28 @@ standard_sse_constant_opcode (rtx insn, rtx x) case 1: switch (get_attr_mode (insn)) { - case MODE_V4SF: - return "%vxorps\t%0, %d0"; - case MODE_V2DF: - if (TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) - return "%vxorps\t%0, %d0"; - else - return "%vxorpd\t%0, %d0"; case MODE_TI: - if (TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) - return "%vxorps\t%0, %d0"; - else + if (!TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) return "%vpxor\t%0, %d0"; - case MODE_V8SF: - return "vxorps\t%x0, %x0, %x0"; - case MODE_V4DF: - if (TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) - return "vxorps\t%x0, %x0, %x0"; - else - return "vxorpd\t%x0, %x0, %x0"; + case MODE_V2DF: + if (!TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) + return "%vxorpd\t%0, %d0"; + case MODE_V4SF: + return "%vxorps\t%0, %d0"; + case MODE_OI: - if (TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) - return "vxorps\t%x0, %x0, %x0"; - else + if (!TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) return "vpxor\t%x0, %x0, %x0"; + case MODE_V4DF: + if (!TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) + return "vxorpd\t%x0, %x0, %x0"; + case MODE_V8SF: + return "vxorps\t%x0, %x0, %x0"; + default: break; } + case 2: return "%vpcmpeqd\t%0, %d0"; default: @@ -29226,12 +29221,12 @@ ix86_rtx_costs (rtx x, int code, int outer_code_i, int *total, bool speed) /* Negate in op0 or op2 is free: FMS, FNMA, FNMS. */ sub = XEXP (x, 0); if (GET_CODE (sub) == NEG) - sub = XEXP (x, 0); + sub = XEXP (sub, 0); *total += rtx_cost (sub, FMA, speed); sub = XEXP (x, 2); if (GET_CODE (sub) == NEG) - sub = XEXP (x, 0); + sub = XEXP (sub, 0); *total += rtx_cost (sub, FMA, speed); return true; } diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index cf1e883d44b..739580cda35 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -790,24 +790,27 @@ (define_code_attr sgnprefix [(sign_extend "i") (zero_extend "") (div "i") (udiv "")]) -;; 64bit single word integer modes. +;; All integer modes. (define_mode_iterator SWI1248x [QI HI SI DI]) -;; 64bit single word integer modes without QImode and HImode. -(define_mode_iterator SWI48x [SI DI]) +;; All integer modes without QImode. +(define_mode_iterator SWI248x [HI SI DI]) -;; Single word integer modes. -(define_mode_iterator SWI [QI HI SI (DI "TARGET_64BIT")]) +;; All integer modes without QImode and HImode. +(define_mode_iterator SWI48x [SI DI]) -;; Single word integer modes without SImode and DImode. +;; All integer modes without SImode and DImode. (define_mode_iterator SWI12 [QI HI]) -;; Single word integer modes without DImode. +;; All integer modes without DImode. (define_mode_iterator SWI124 [QI HI SI]) -;; Single word integer modes without QImode and DImode. +;; All integer modes without QImode and DImode. (define_mode_iterator SWI24 [HI SI]) +;; Single word integer modes. +(define_mode_iterator SWI [QI HI SI (DI "TARGET_64BIT")]) + ;; Single word integer modes without QImode. (define_mode_iterator SWI248 [HI SI (DI "TARGET_64BIT")]) @@ -824,7 +827,7 @@ (HI "TARGET_HIMODE_MATH") SI (DI "TARGET_64BIT")]) -;; Math-dependant single word integer modes without DImode. +;; Math-dependant integer modes without DImode. (define_mode_iterator SWIM124 [(QI "TARGET_QIMODE_MATH") (HI "TARGET_HIMODE_MATH") SI]) @@ -927,15 +930,6 @@ ;; All x87 floating point modes (define_mode_iterator X87MODEF [SF DF XF]) -;; All integer modes handled by x87 fisttp operator. -(define_mode_iterator X87MODEI [HI SI DI]) - -;; All integer modes handled by integer x87 operators. -(define_mode_iterator X87MODEI12 [HI SI]) - -;; All integer modes handled by SSE cvtts?2si* operators. -(define_mode_iterator SSEMODEI24 [SI DI]) - ;; SSE instruction suffix for various modes (define_mode_attr ssemodesuffix [(SF "ss") (DF "sd") @@ -1425,7 +1419,7 @@ [(compare:CCFP (match_operand 1 "register_operand" "f") (match_operator 3 "float_operator" - [(match_operand:X87MODEI12 2 "memory_operand" "m")]))] + [(match_operand:SWI24 2 "memory_operand" "m")]))] UNSPEC_FNSTSW))] "X87_FLOAT_MODE_P (GET_MODE (operands[1])) && (TARGET_USE_<MODE>MODE_FIOP || optimize_function_for_size_p (cfun)) @@ -1441,7 +1435,7 @@ (compare:CCFP (match_operand 1 "register_operand" "f") (match_operator 3 "float_operator" - [(match_operand:X87MODEI12 2 "memory_operand" "m")]))) + [(match_operand:SWI24 2 "memory_operand" "m")]))) (clobber (match_operand:HI 0 "register_operand" "=a"))] "X87_FLOAT_MODE_P (GET_MODE (operands[1])) && TARGET_SAHF && !TARGET_CMOVE @@ -2678,6 +2672,7 @@ (set_attr "unit" "sse,*,*") (set_attr "mode" "TF,SI,SI")]) +;; %%% Kill this when call knows how to work this out. (define_split [(set (match_operand:TF 0 "push_operand" "") (match_operand:TF 1 "sse_reg_operand" ""))] @@ -2685,14 +2680,6 @@ [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (const_int -16))) (set (mem:TF (reg:P SP_REG)) (match_dup 1))]) -(define_split - [(set (match_operand:TF 0 "push_operand" "") - (match_operand:TF 1 "general_operand" ""))] - "TARGET_SSE2 && reload_completed - && !SSE_REG_P (operands[1])" - [(const_int 0)] - "ix86_split_long_move (operands); DONE;") - (define_insn "*pushxf" [(set (match_operand:XF 0 "push_operand" "=<,<") (match_operand:XF 1 "general_no_elim_operand" "f,ro"))] @@ -2712,17 +2699,18 @@ ;; only once, but this ought to be handled elsewhere). (define_insn "*pushxf_nointeger" - [(set (match_operand:XF 0 "push_operand" "=X,X,X") - (match_operand:XF 1 "general_no_elim_operand" "f,Fo,*r"))] + [(set (match_operand:XF 0 "push_operand" "=X,X") + (match_operand:XF 1 "general_no_elim_operand" "f,*rFo"))] "optimize_function_for_size_p (cfun)" { /* This insn should be already split before reg-stack. */ gcc_unreachable (); } [(set_attr "type" "multi") - (set_attr "unit" "i387,*,*") - (set_attr "mode" "XF,SI,SI")]) + (set_attr "unit" "i387,*") + (set_attr "mode" "XF,SI")]) +;; %%% Kill this when call knows how to work this out. (define_split [(set (match_operand:XF 0 "push_operand" "") (match_operand:XF 1 "fp_register_operand" ""))] @@ -2731,14 +2719,6 @@ (set (mem:XF (reg:P SP_REG)) (match_dup 1))] "operands[2] = GEN_INT (-GET_MODE_SIZE (XFmode));") -(define_split - [(set (match_operand:XF 0 "push_operand" "") - (match_operand:XF 1 "general_operand" ""))] - "reload_completed - && !FP_REG_P (operands[1])" - [(const_int 0)] - "ix86_split_long_move (operands); DONE;") - ;; Size of pushdf is 3 (for sub) + 2 (for fstp) + memory operand size. ;; Size of pushdf using integer instructions is 2+2*memory operand size ;; On the average, pushdf using integers can be still shorter. @@ -2763,14 +2743,6 @@ [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (const_int -8))) (set (mem:DF (reg:P SP_REG)) (match_dup 1))]) -(define_split - [(set (match_operand:DF 0 "push_operand" "") - (match_operand:DF 1 "general_operand" ""))] - "reload_completed - && !ANY_FP_REG_P (operands[1])" - [(const_int 0)] - "ix86_split_long_move (operands); DONE;") - (define_insn "*pushsf_rex64" [(set (match_operand:SF 0 "push_operand" "=X,X,X") (match_operand:SF 1 "nonmemory_no_elim_operand" "f,rF,x"))] @@ -2797,15 +2769,6 @@ (set_attr "unit" "i387,*,*") (set_attr "mode" "SF,SI,SF")]) -(define_split - [(set (match_operand:SF 0 "push_operand" "") - (match_operand:SF 1 "memory_operand" ""))] - "reload_completed - && MEM_P (operands[1]) - && (operands[2] = find_constant_src (insn))" - [(set (match_dup 0) - (match_dup 2))]) - ;; %%% Kill this when call knows how to work this out. (define_split [(set (match_operand:SF 0 "push_operand" "") @@ -2813,7 +2776,25 @@ "reload_completed" [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (match_dup 2))) (set (mem:SF (reg:P SP_REG)) (match_dup 1))] - "operands[2] = GEN_INT (-GET_MODE_SIZE (<MODE>mode));") + "operands[2] = GEN_INT (-GET_MODE_SIZE (<P:MODE>mode));") + +(define_split + [(set (match_operand:SF 0 "push_operand" "") + (match_operand:SF 1 "memory_operand" ""))] + "reload_completed + && (operands[2] = find_constant_src (insn))" + [(set (match_dup 0) (match_dup 2))]) + +(define_split + [(set (match_operand 0 "push_operand" "") + (match_operand 1 "general_operand" ""))] + "reload_completed + && (GET_MODE (operands[0]) == TFmode + || GET_MODE (operands[0]) == XFmode + || GET_MODE (operands[0]) == DFmode) + && !ANY_FP_REG_P (operands[1])" + [(const_int 0)] + "ix86_split_long_move (operands); DONE;") ;; Floating point move instructions. @@ -2833,17 +2814,25 @@ "ix86_expand_move (<MODE>mode, operands); DONE;") (define_insn "*movtf_internal" - [(set (match_operand:TF 0 "nonimmediate_operand" "=x,m,x,?r ,?o") - (match_operand:TF 1 "general_operand" "xm,x,C,roF,Fr"))] + [(set (match_operand:TF 0 "nonimmediate_operand" "=x,m,x,?*r ,!o") + (match_operand:TF 1 "general_operand" "xm,x,C,*roF,F*r"))] "TARGET_SSE2 - && !(MEM_P (operands[0]) && MEM_P (operands[1]))" + && !(MEM_P (operands[0]) && MEM_P (operands[1])) + && (!can_create_pseudo_p () + || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE) + || GET_CODE (operands[1]) != CONST_DOUBLE + || (optimize_function_for_size_p (cfun) + && standard_sse_constant_p (operands[1]) + && !memory_operand (operands[0], TFmode)) + || (!TARGET_MEMORY_MISMATCH_STALL + && memory_operand (operands[0], TFmode)))" { switch (which_alternative) { case 0: case 1: - /* Handle misaligned load/store since we don't have movmisaligntf - pattern. */ + /* Handle misaligned load/store since we + don't have movmisaligntf pattern. */ if (misaligned_operand (operands[0], TFmode) || misaligned_operand (operands[1], TFmode)) { @@ -2892,7 +2881,7 @@ ;; Possible store forwarding (partial memory) stall in alternative 4. (define_insn "*movxf_internal" - [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m,f,Yx*r ,!o") + [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m,f,?Yx*r ,!o") (match_operand:XF 1 "general_operand" "fm,f,G,Yx*roF,FYx*r"))] "!(MEM_P (operands[0]) && MEM_P (operands[1])) && (!can_create_pseudo_p () @@ -2926,9 +2915,9 @@ (define_insn "*movdf_internal_rex64" [(set (match_operand:DF 0 "nonimmediate_operand" - "=f,m,f,r ,m,r,!m,Y2*x,Y2*x,Y2*x,m ,Yi,r ") + "=f,m,f,?r,?m,?r,!m,Y2*x,Y2*x,Y2*x,m ,Yi,r ") (match_operand:DF 1 "general_operand" - "fm,f,G,rm,r,F,F ,C ,Y2*x,m ,Y2*x,r ,Yi"))] + "fm,f,G,rm,r ,F ,F ,C ,Y2*x,m ,Y2*x,r ,Yi"))] "TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1])) && (!can_create_pseudo_p () || (ix86_cmodel == CM_MEDIUM || ix86_cmodel == CM_LARGE) @@ -2967,18 +2956,15 @@ case 10: switch (get_attr_mode (insn)) { - case MODE_V4SF: - return "%vmovaps\t{%1, %0|%0, %1}"; - case MODE_V2DF: - if (TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) - return "%vmovaps\t{%1, %0|%0, %1}"; - else - return "%vmovapd\t{%1, %0|%0, %1}"; case MODE_TI: - if (TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) - return "%vmovaps\t{%1, %0|%0, %1}"; - else + if (!TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) return "%vmovdqa\t{%1, %0|%0, %1}"; + case MODE_V2DF: + if (!TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) + return "%vmovapd\t{%1, %0|%0, %1}"; + case MODE_V4SF: + return "%vmovaps\t{%1, %0|%0, %1}"; + case MODE_DI: return "%vmovq\t{%1, %0|%0, %1}"; case MODE_DF: @@ -3076,7 +3062,7 @@ ;; Possible store forwarding (partial memory) stall in alternative 4. (define_insn "*movdf_internal" [(set (match_operand:DF 0 "nonimmediate_operand" - "=f,m,f,Yd*r ,!o ,Y2*x,Y2*x,Y2*x,m ") + "=f,m,f,?Yd*r ,!o ,Y2*x,Y2*x,Y2*x,m ") (match_operand:DF 1 "general_operand" "fm,f,G,Yd*roF,FYd*r,C ,Y2*x,m ,Y2*x"))] "!TARGET_64BIT && !(MEM_P (operands[0]) && MEM_P (operands[1])) @@ -3113,18 +3099,15 @@ case 8: switch (get_attr_mode (insn)) { - case MODE_V4SF: - return "%vmovaps\t{%1, %0|%0, %1}"; - case MODE_V2DF: - if (TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) - return "%vmovaps\t{%1, %0|%0, %1}"; - else - return "%vmovapd\t{%1, %0|%0, %1}"; case MODE_TI: - if (TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) - return "%vmovaps\t{%1, %0|%0, %1}"; - else + if (!TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) return "%vmovdqa\t{%1, %0|%0, %1}"; + case MODE_V2DF: + if (!TARGET_SSE_PACKED_SINGLE_INSN_OPTIMAL) + return "%vmovapd\t{%1, %0|%0, %1}"; + case MODE_V4SF: + return "%vmovaps\t{%1, %0|%0, %1}"; + case MODE_DI: return "%vmovq\t{%1, %0|%0, %1}"; case MODE_DF: @@ -3212,7 +3195,7 @@ (define_insn "*movsf_internal" [(set (match_operand:SF 0 "nonimmediate_operand" - "=f,m,f,r ,m ,x,x,x ,m,!*y,!m,!*y,?Yi,?r,!*Ym,!r") + "=f,m,f,?r ,?m,x,x,x ,m,!*y,!m,!*y,?Yi,?r,!*Ym,!r") (match_operand:SF 1 "general_operand" "fm,f,G,rmF,Fr,C,x,xm,x,m ,*y,*y ,r ,Yi,r ,*Ym"))] "!(MEM_P (operands[0]) && MEM_P (operands[1])) @@ -3309,14 +3292,13 @@ (const_string "SF")))]) (define_split - [(set (match_operand 0 "register_operand" "") + [(set (match_operand 0 "any_fp_register_operand" "") (match_operand 1 "memory_operand" ""))] "reload_completed && (GET_MODE (operands[0]) == TFmode || GET_MODE (operands[0]) == XFmode || GET_MODE (operands[0]) == DFmode || GET_MODE (operands[0]) == SFmode) - && ANY_FP_REGNO_P (REGNO (operands[0])) && (operands[2] = find_constant_src (insn))" [(set (match_dup 0) (match_dup 2))] { @@ -3329,13 +3311,12 @@ }) (define_split - [(set (match_operand 0 "register_operand" "") + [(set (match_operand 0 "any_fp_register_operand" "") (float_extend (match_operand 1 "memory_operand" "")))] "reload_completed && (GET_MODE (operands[0]) == TFmode || GET_MODE (operands[0]) == XFmode || GET_MODE (operands[0]) == DFmode) - && ANY_FP_REGNO_P (REGNO (operands[0])) && (operands[2] = find_constant_src (insn))" [(set (match_dup 0) (match_dup 2))] { @@ -3349,9 +3330,9 @@ ;; Split the load of -0.0 or -1.0 into fldz;fchs or fld1;fchs sequence (define_split - [(set (match_operand:X87MODEF 0 "register_operand" "") + [(set (match_operand:X87MODEF 0 "fp_register_operand" "") (match_operand:X87MODEF 1 "immediate_operand" ""))] - "reload_completed && FP_REGNO_P (REGNO (operands[0])) + "reload_completed && (standard_80387_constant_p (operands[1]) == 8 || standard_80387_constant_p (operands[1]) == 9)" [(set (match_dup 0)(match_dup 1)) @@ -4422,33 +4403,33 @@ (define_peephole2 [(set (match_operand:MODEF 0 "register_operand" "") (match_operand:MODEF 1 "memory_operand" "")) - (set (match_operand:SSEMODEI24 2 "register_operand" "") - (fix:SSEMODEI24 (match_dup 0)))] + (set (match_operand:SWI48x 2 "register_operand" "") + (fix:SWI48x (match_dup 0)))] "TARGET_SHORTEN_X87_SSE && !(TARGET_AVOID_VECTOR_DECODE && optimize_insn_for_speed_p ()) && peep2_reg_dead_p (2, operands[0])" - [(set (match_dup 2) (fix:SSEMODEI24 (match_dup 1)))]) + [(set (match_dup 2) (fix:SWI48x (match_dup 1)))]) ;; Avoid vector decoded forms of the instruction. (define_peephole2 [(match_scratch:DF 2 "Y2") - (set (match_operand:SSEMODEI24 0 "register_operand" "") - (fix:SSEMODEI24 (match_operand:DF 1 "memory_operand" "")))] + (set (match_operand:SWI48x 0 "register_operand" "") + (fix:SWI48x (match_operand:DF 1 "memory_operand" "")))] "TARGET_AVOID_VECTOR_DECODE && optimize_insn_for_speed_p ()" [(set (match_dup 2) (match_dup 1)) - (set (match_dup 0) (fix:SSEMODEI24 (match_dup 2)))]) + (set (match_dup 0) (fix:SWI48x (match_dup 2)))]) (define_peephole2 [(match_scratch:SF 2 "x") - (set (match_operand:SSEMODEI24 0 "register_operand" "") - (fix:SSEMODEI24 (match_operand:SF 1 "memory_operand" "")))] + (set (match_operand:SWI48x 0 "register_operand" "") + (fix:SWI48x (match_operand:SF 1 "memory_operand" "")))] "TARGET_AVOID_VECTOR_DECODE && optimize_insn_for_speed_p ()" [(set (match_dup 2) (match_dup 1)) - (set (match_dup 0) (fix:SSEMODEI24 (match_dup 2)))]) + (set (match_dup 0) (fix:SWI48x (match_dup 2)))]) (define_insn_and_split "fix_trunc<mode>_fisttp_i387_1" - [(set (match_operand:X87MODEI 0 "nonimmediate_operand" "") - (fix:X87MODEI (match_operand 1 "register_operand" "")))] + [(set (match_operand:SWI248x 0 "nonimmediate_operand" "") + (fix:SWI248x (match_operand 1 "register_operand" "")))] "X87_FLOAT_MODE_P (GET_MODE (operands[1])) && TARGET_FISTTP && !((SSE_FLOAT_MODE_P (GET_MODE (operands[1])) @@ -4474,8 +4455,8 @@ (set_attr "mode" "<MODE>")]) (define_insn "fix_trunc<mode>_i387_fisttp" - [(set (match_operand:X87MODEI 0 "memory_operand" "=m") - (fix:X87MODEI (match_operand 1 "register_operand" "f"))) + [(set (match_operand:SWI248x 0 "memory_operand" "=m") + (fix:SWI248x (match_operand 1 "register_operand" "f"))) (clobber (match_scratch:XF 2 "=&1f"))] "X87_FLOAT_MODE_P (GET_MODE (operands[1])) && TARGET_FISTTP @@ -4487,9 +4468,9 @@ (set_attr "mode" "<MODE>")]) (define_insn "fix_trunc<mode>_i387_fisttp_with_temp" - [(set (match_operand:X87MODEI 0 "nonimmediate_operand" "=m,?r") - (fix:X87MODEI (match_operand 1 "register_operand" "f,f"))) - (clobber (match_operand:X87MODEI 2 "memory_operand" "=X,m")) + [(set (match_operand:SWI248x 0 "nonimmediate_operand" "=m,?r") + (fix:SWI248x (match_operand 1 "register_operand" "f,f"))) + (clobber (match_operand:SWI248x 2 "memory_operand" "=X,m")) (clobber (match_scratch:XF 3 "=&1f,&1f"))] "X87_FLOAT_MODE_P (GET_MODE (operands[1])) && TARGET_FISTTP @@ -4501,22 +4482,22 @@ (set_attr "mode" "<MODE>")]) (define_split - [(set (match_operand:X87MODEI 0 "register_operand" "") - (fix:X87MODEI (match_operand 1 "register_operand" ""))) - (clobber (match_operand:X87MODEI 2 "memory_operand" "")) + [(set (match_operand:SWI248x 0 "register_operand" "") + (fix:SWI248x (match_operand 1 "register_operand" ""))) + (clobber (match_operand:SWI248x 2 "memory_operand" "")) (clobber (match_scratch 3 ""))] "reload_completed" - [(parallel [(set (match_dup 2) (fix:X87MODEI (match_dup 1))) + [(parallel [(set (match_dup 2) (fix:SWI248x (match_dup 1))) (clobber (match_dup 3))]) (set (match_dup 0) (match_dup 2))]) (define_split - [(set (match_operand:X87MODEI 0 "memory_operand" "") - (fix:X87MODEI (match_operand 1 "register_operand" ""))) - (clobber (match_operand:X87MODEI 2 "memory_operand" "")) + [(set (match_operand:SWI248x 0 "memory_operand" "") + (fix:SWI248x (match_operand 1 "register_operand" ""))) + (clobber (match_operand:SWI248x 2 "memory_operand" "")) (clobber (match_scratch 3 ""))] "reload_completed" - [(parallel [(set (match_dup 0) (fix:X87MODEI (match_dup 1))) + [(parallel [(set (match_dup 0) (fix:SWI248x (match_dup 1))) (clobber (match_dup 3))])]) ;; See the comments in i386.h near OPTIMIZE_MODE_SWITCHING for the description @@ -4525,8 +4506,8 @@ ;; clobbering insns can be used. Look at emit_i387_cw_initialization () ;; function in i386.c. (define_insn_and_split "*fix_trunc<mode>_i387_1" - [(set (match_operand:X87MODEI 0 "nonimmediate_operand" "") - (fix:X87MODEI (match_operand 1 "register_operand" ""))) + [(set (match_operand:SWI248x 0 "nonimmediate_operand" "") + (fix:SWI248x (match_operand 1 "register_operand" ""))) (clobber (reg:CC FLAGS_REG))] "X87_FLOAT_MODE_P (GET_MODE (operands[1])) && !TARGET_FISTTP @@ -4614,8 +4595,8 @@ (clobber (match_dup 5))])]) (define_insn "fix_trunc<mode>_i387" - [(set (match_operand:X87MODEI12 0 "memory_operand" "=m") - (fix:X87MODEI12 (match_operand 1 "register_operand" "f"))) + [(set (match_operand:SWI24 0 "memory_operand" "=m") + (fix:SWI24 (match_operand 1 "register_operand" "f"))) (use (match_operand:HI 2 "memory_operand" "m")) (use (match_operand:HI 3 "memory_operand" "m"))] "X87_FLOAT_MODE_P (GET_MODE (operands[1])) @@ -4627,11 +4608,11 @@ (set_attr "mode" "<MODE>")]) (define_insn "fix_trunc<mode>_i387_with_temp" - [(set (match_operand:X87MODEI12 0 "nonimmediate_operand" "=m,?r") - (fix:X87MODEI12 (match_operand 1 "register_operand" "f,f"))) + [(set (match_operand:SWI24 0 "nonimmediate_operand" "=m,?r") + (fix:SWI24 (match_operand 1 "register_operand" "f,f"))) (use (match_operand:HI 2 "memory_operand" "m,m")) (use (match_operand:HI 3 "memory_operand" "m,m")) - (clobber (match_operand:X87MODEI12 4 "memory_operand" "=X,m"))] + (clobber (match_operand:SWI24 4 "memory_operand" "=X,m"))] "X87_FLOAT_MODE_P (GET_MODE (operands[1])) && !TARGET_FISTTP && !SSE_FLOAT_MODE_P (GET_MODE (operands[1]))" @@ -4641,25 +4622,25 @@ (set_attr "mode" "<MODE>")]) (define_split - [(set (match_operand:X87MODEI12 0 "register_operand" "") - (fix:X87MODEI12 (match_operand 1 "register_operand" ""))) + [(set (match_operand:SWI24 0 "register_operand" "") + (fix:SWI24 (match_operand 1 "register_operand" ""))) (use (match_operand:HI 2 "memory_operand" "")) (use (match_operand:HI 3 "memory_operand" "")) - (clobber (match_operand:X87MODEI12 4 "memory_operand" ""))] + (clobber (match_operand:SWI24 4 "memory_operand" ""))] "reload_completed" - [(parallel [(set (match_dup 4) (fix:X87MODEI12 (match_dup 1))) + [(parallel [(set (match_dup 4) (fix:SWI24 (match_dup 1))) (use (match_dup 2)) (use (match_dup 3))]) (set (match_dup 0) (match_dup 4))]) (define_split - [(set (match_operand:X87MODEI12 0 "memory_operand" "") - (fix:X87MODEI12 (match_operand 1 "register_operand" ""))) + [(set (match_operand:SWI24 0 "memory_operand" "") + (fix:SWI24 (match_operand 1 "register_operand" ""))) (use (match_operand:HI 2 "memory_operand" "")) (use (match_operand:HI 3 "memory_operand" "")) - (clobber (match_operand:X87MODEI12 4 "memory_operand" ""))] + (clobber (match_operand:SWI24 4 "memory_operand" ""))] "reload_completed" - [(parallel [(set (match_dup 0) (fix:X87MODEI12 (match_dup 1))) + [(parallel [(set (match_dup 0) (fix:SWI24 (match_dup 1))) (use (match_dup 2)) (use (match_dup 3))])]) @@ -4759,22 +4740,22 @@ && reload_completed" [(set (match_dup 0) (float:X87MODEF (match_dup 1)))]) -(define_expand "float<SSEMODEI24:mode><X87MODEF:mode>2" +(define_expand "float<SWI48x:mode><X87MODEF:mode>2" [(set (match_operand:X87MODEF 0 "register_operand" "") (float:X87MODEF - (match_operand:SSEMODEI24 1 "nonimmediate_operand" "")))] + (match_operand:SWI48x 1 "nonimmediate_operand" "")))] "TARGET_80387 - || ((<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + || ((<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<X87MODEF:MODE>mode) && TARGET_SSE_MATH)" { - if (!((<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + if (!((<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<X87MODEF:MODE>mode) && TARGET_SSE_MATH) - && !X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SSEMODEI24:MODE>mode)) + && !X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SWI48x:MODE>mode)) { rtx reg = gen_reg_rtx (XFmode); rtx (*insn)(rtx, rtx); - emit_insn (gen_float<SSEMODEI24:mode>xf2 (reg, operands[1])); + emit_insn (gen_float<SWI48x:mode>xf2 (reg, operands[1])); if (<X87MODEF:MODE>mode == SFmode) insn = gen_truncxfsf2; @@ -4789,17 +4770,17 @@ }) ;; Pre-reload splitter to add memory clobber to the pattern. -(define_insn_and_split "*float<SSEMODEI24:mode><X87MODEF:mode>2_1" +(define_insn_and_split "*float<SWI48x:mode><X87MODEF:mode>2_1" [(set (match_operand:X87MODEF 0 "register_operand" "") - (float:X87MODEF (match_operand:SSEMODEI24 1 "register_operand" "")))] + (float:X87MODEF (match_operand:SWI48x 1 "register_operand" "")))] "((TARGET_80387 - && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SSEMODEI24:MODE>mode) - && (!((<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SWI48x:MODE>mode) + && (!((<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<X87MODEF:MODE>mode) && TARGET_SSE_MATH) || TARGET_MIX_SSE_I387)) - || ((<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + || ((<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<X87MODEF:MODE>mode) && TARGET_SSE_MATH - && ((<SSEMODEI24:MODE>mode == SImode + && ((<SWI48x:MODE>mode == SImode && TARGET_SSE2 && TARGET_USE_VECTOR_CONVERTS && optimize_function_for_speed_p (cfun) && flag_trapping_math) @@ -4811,11 +4792,11 @@ [(parallel [(set (match_dup 0) (float:X87MODEF (match_dup 1))) (clobber (match_dup 2))])] { - operands[2] = assign_386_stack_local (<SSEMODEI24:MODE>mode, SLOT_TEMP); + operands[2] = assign_386_stack_local (<SWI48x:MODE>mode, SLOT_TEMP); /* Avoid store forwarding (partial memory) stall penalty by passing DImode value through XMM registers. */ - if (<SSEMODEI24:MODE>mode == DImode && !TARGET_64BIT + if (<SWI48x:MODE>mode == DImode && !TARGET_64BIT && TARGET_80387 && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES && optimize_function_for_speed_p (cfun)) { @@ -4858,12 +4839,12 @@ (set_attr "bdver1_decode" "*,direct") (set_attr "fp_int_src" "true")]) -(define_insn "*float<SSEMODEI24:mode><MODEF:mode>2_mixed_with_temp" +(define_insn "*float<SWI48x:mode><MODEF:mode>2_mixed_with_temp" [(set (match_operand:MODEF 0 "register_operand" "=f,f,x,x") (float:MODEF - (match_operand:SSEMODEI24 1 "nonimmediate_operand" "m,?r,r,m"))) - (clobber (match_operand:SSEMODEI24 2 "memory_operand" "=X,m,m,X"))] - "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + (match_operand:SWI48x 1 "nonimmediate_operand" "m,?r,r,m"))) + (clobber (match_operand:SWI48x 2 "memory_operand" "=X,m,m,X"))] + "(<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_MIX_SSE_I387" "#" [(set_attr "type" "fmov,multi,sseicvt,sseicvt") @@ -4876,9 +4857,9 @@ (define_split [(set (match_operand:MODEF 0 "register_operand" "") - (float:MODEF (match_operand:SSEMODEI24 1 "register_operand" ""))) - (clobber (match_operand:SSEMODEI24 2 "memory_operand" ""))] - "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + (float:MODEF (match_operand:SWI48x 1 "register_operand" ""))) + (clobber (match_operand:SWI48x 2 "memory_operand" ""))] + "(<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_MIX_SSE_I387 && TARGET_INTER_UNIT_CONVERSIONS && reload_completed @@ -4889,9 +4870,9 @@ (define_split [(set (match_operand:MODEF 0 "register_operand" "") - (float:MODEF (match_operand:SSEMODEI24 1 "register_operand" ""))) - (clobber (match_operand:SSEMODEI24 2 "memory_operand" ""))] - "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + (float:MODEF (match_operand:SWI48x 1 "register_operand" ""))) + (clobber (match_operand:SWI48x 2 "memory_operand" ""))] + "(<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_MIX_SSE_I387 && !(TARGET_INTER_UNIT_CONVERSIONS || optimize_function_for_size_p (cfun)) && reload_completed @@ -4901,24 +4882,24 @@ [(set (match_dup 2) (match_dup 1)) (set (match_dup 0) (float:MODEF (match_dup 2)))]) -(define_insn "*float<SSEMODEI24:mode><MODEF:mode>2_mixed_interunit" +(define_insn "*float<SWI48x:mode><MODEF:mode>2_mixed_interunit" [(set (match_operand:MODEF 0 "register_operand" "=f,x,x") (float:MODEF - (match_operand:SSEMODEI24 1 "nonimmediate_operand" "m,r,m")))] - "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + (match_operand:SWI48x 1 "nonimmediate_operand" "m,r,m")))] + "(<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_MIX_SSE_I387 && (TARGET_INTER_UNIT_CONVERSIONS || optimize_function_for_size_p (cfun))" "@ fild%Z1\t%1 - %vcvtsi2<MODEF:ssemodesuffix><SSEMODEI24:rex64suffix>\t{%1, %d0|%d0, %1} - %vcvtsi2<MODEF:ssemodesuffix><SSEMODEI24:rex64suffix>\t{%1, %d0|%d0, %1}" + %vcvtsi2<MODEF:ssemodesuffix><SWI48x:rex64suffix>\t{%1, %d0|%d0, %1} + %vcvtsi2<MODEF:ssemodesuffix><SWI48x:rex64suffix>\t{%1, %d0|%d0, %1}" [(set_attr "type" "fmov,sseicvt,sseicvt") (set_attr "prefix" "orig,maybe_vex,maybe_vex") (set_attr "mode" "<MODEF:MODE>") (set (attr "prefix_rex") (if_then_else (and (eq_attr "prefix" "maybe_vex") - (ne (symbol_ref "<SSEMODEI24:MODE>mode == DImode") (const_int 0))) + (ne (symbol_ref "<SWI48x:MODE>mode == DImode") (const_int 0))) (const_string "1") (const_string "*"))) (set_attr "unit" "i387,*,*") @@ -4927,23 +4908,23 @@ (set_attr "bdver1_decode" "*,double,direct") (set_attr "fp_int_src" "true")]) -(define_insn "*float<SSEMODEI24:mode><MODEF:mode>2_mixed_nointerunit" +(define_insn "*float<SWI48x:mode><MODEF:mode>2_mixed_nointerunit" [(set (match_operand:MODEF 0 "register_operand" "=f,x") (float:MODEF - (match_operand:SSEMODEI24 1 "memory_operand" "m,m")))] - "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + (match_operand:SWI48x 1 "memory_operand" "m,m")))] + "(<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_MIX_SSE_I387 && !(TARGET_INTER_UNIT_CONVERSIONS || optimize_function_for_size_p (cfun))" "@ fild%Z1\t%1 - %vcvtsi2<MODEF:ssemodesuffix><SSEMODEI24:rex64suffix>\t{%1, %d0|%d0, %1}" + %vcvtsi2<MODEF:ssemodesuffix><SWI48x:rex64suffix>\t{%1, %d0|%d0, %1}" [(set_attr "type" "fmov,sseicvt") (set_attr "prefix" "orig,maybe_vex") (set_attr "mode" "<MODEF:MODE>") (set (attr "prefix_rex") (if_then_else (and (eq_attr "prefix" "maybe_vex") - (ne (symbol_ref "<SSEMODEI24:MODE>mode == DImode") (const_int 0))) + (ne (symbol_ref "<SWI48x:MODE>mode == DImode") (const_int 0))) (const_string "1") (const_string "*"))) (set_attr "athlon_decode" "*,direct") @@ -5100,12 +5081,12 @@ DONE; }) -(define_insn "*float<SSEMODEI24:mode><MODEF:mode>2_sse_with_temp" +(define_insn "*float<SWI48x:mode><MODEF:mode>2_sse_with_temp" [(set (match_operand:MODEF 0 "register_operand" "=x,x") (float:MODEF - (match_operand:SSEMODEI24 1 "nonimmediate_operand" "r,m"))) - (clobber (match_operand:SSEMODEI24 2 "memory_operand" "=m,X"))] - "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + (match_operand:SWI48x 1 "nonimmediate_operand" "r,m"))) + (clobber (match_operand:SWI48x 2 "memory_operand" "=m,X"))] + "(<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH" "#" [(set_attr "type" "sseicvt") @@ -5115,21 +5096,21 @@ (set_attr "bdver1_decode" "double,direct") (set_attr "fp_int_src" "true")]) -(define_insn "*float<SSEMODEI24:mode><MODEF:mode>2_sse_interunit" +(define_insn "*float<SWI48x:mode><MODEF:mode>2_sse_interunit" [(set (match_operand:MODEF 0 "register_operand" "=x,x") (float:MODEF - (match_operand:SSEMODEI24 1 "nonimmediate_operand" "r,m")))] - "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + (match_operand:SWI48x 1 "nonimmediate_operand" "r,m")))] + "(<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH && (TARGET_INTER_UNIT_CONVERSIONS || optimize_function_for_size_p (cfun))" - "%vcvtsi2<MODEF:ssemodesuffix><SSEMODEI24:rex64suffix>\t{%1, %d0|%d0, %1}" + "%vcvtsi2<MODEF:ssemodesuffix><SWI48x:rex64suffix>\t{%1, %d0|%d0, %1}" [(set_attr "type" "sseicvt") (set_attr "prefix" "maybe_vex") (set_attr "mode" "<MODEF:MODE>") (set (attr "prefix_rex") (if_then_else (and (eq_attr "prefix" "maybe_vex") - (ne (symbol_ref "<SSEMODEI24:MODE>mode == DImode") (const_int 0))) + (ne (symbol_ref "<SWI48x:MODE>mode == DImode") (const_int 0))) (const_string "1") (const_string "*"))) (set_attr "athlon_decode" "double,direct") @@ -5139,9 +5120,9 @@ (define_split [(set (match_operand:MODEF 0 "register_operand" "") - (float:MODEF (match_operand:SSEMODEI24 1 "nonimmediate_operand" ""))) - (clobber (match_operand:SSEMODEI24 2 "memory_operand" ""))] - "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + (float:MODEF (match_operand:SWI48x 1 "nonimmediate_operand" ""))) + (clobber (match_operand:SWI48x 2 "memory_operand" ""))] + "(<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH && (TARGET_INTER_UNIT_CONVERSIONS || optimize_function_for_size_p (cfun)) && reload_completed @@ -5150,21 +5131,21 @@ && SSE_REG_P (operands[0])))" [(set (match_dup 0) (float:MODEF (match_dup 1)))]) -(define_insn "*float<SSEMODEI24:mode><MODEF:mode>2_sse_nointerunit" +(define_insn "*float<SWI48x:mode><MODEF:mode>2_sse_nointerunit" [(set (match_operand:MODEF 0 "register_operand" "=x") (float:MODEF - (match_operand:SSEMODEI24 1 "memory_operand" "m")))] - "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + (match_operand:SWI48x 1 "memory_operand" "m")))] + "(<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH && !(TARGET_INTER_UNIT_CONVERSIONS || optimize_function_for_size_p (cfun))" - "%vcvtsi2<MODEF:ssemodesuffix><SSEMODEI24:rex64suffix>\t{%1, %d0|%d0, %1}" + "%vcvtsi2<MODEF:ssemodesuffix><SWI48x:rex64suffix>\t{%1, %d0|%d0, %1}" [(set_attr "type" "sseicvt") (set_attr "prefix" "maybe_vex") (set_attr "mode" "<MODEF:MODE>") (set (attr "prefix_rex") (if_then_else (and (eq_attr "prefix" "maybe_vex") - (ne (symbol_ref "<SSEMODEI24:MODE>mode == DImode") (const_int 0))) + (ne (symbol_ref "<SWI48x:MODE>mode == DImode") (const_int 0))) (const_string "1") (const_string "*"))) (set_attr "athlon_decode" "direct") @@ -5174,9 +5155,9 @@ (define_split [(set (match_operand:MODEF 0 "register_operand" "") - (float:MODEF (match_operand:SSEMODEI24 1 "register_operand" ""))) - (clobber (match_operand:SSEMODEI24 2 "memory_operand" ""))] - "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + (float:MODEF (match_operand:SWI48x 1 "register_operand" ""))) + (clobber (match_operand:SWI48x 2 "memory_operand" ""))] + "(<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH && !(TARGET_INTER_UNIT_CONVERSIONS || optimize_function_for_size_p (cfun)) && reload_completed @@ -5188,9 +5169,9 @@ (define_split [(set (match_operand:MODEF 0 "register_operand" "") - (float:MODEF (match_operand:SSEMODEI24 1 "memory_operand" ""))) - (clobber (match_operand:SSEMODEI24 2 "memory_operand" ""))] - "(<SSEMODEI24:MODE>mode != DImode || TARGET_64BIT) + (float:MODEF (match_operand:SWI48x 1 "memory_operand" ""))) + (clobber (match_operand:SWI48x 2 "memory_operand" ""))] + "(<SWI48x:MODE>mode != DImode || TARGET_64BIT) && SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH && reload_completed && (SSE_REG_P (operands[0]) @@ -5198,13 +5179,13 @@ && SSE_REG_P (operands[0])))" [(set (match_dup 0) (float:MODEF (match_dup 1)))]) -(define_insn "*float<SSEMODEI24:mode><X87MODEF:mode>2_i387_with_temp" +(define_insn "*float<SWI48x:mode><X87MODEF:mode>2_i387_with_temp" [(set (match_operand:X87MODEF 0 "register_operand" "=f,f") (float:X87MODEF - (match_operand:SSEMODEI24 1 "nonimmediate_operand" "m,?r"))) - (clobber (match_operand:SSEMODEI24 2 "memory_operand" "=X,m"))] + (match_operand:SWI48x 1 "nonimmediate_operand" "m,?r"))) + (clobber (match_operand:SWI48x 2 "memory_operand" "=X,m"))] "TARGET_80387 - && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SSEMODEI24:MODE>mode)" + && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SWI48x:MODE>mode)" "@ fild%Z1\t%1 #" @@ -5213,36 +5194,34 @@ (set_attr "unit" "*,i387") (set_attr "fp_int_src" "true")]) -(define_insn "*float<SSEMODEI24:mode><X87MODEF:mode>2_i387" +(define_insn "*float<SWI48x:mode><X87MODEF:mode>2_i387" [(set (match_operand:X87MODEF 0 "register_operand" "=f") (float:X87MODEF - (match_operand:SSEMODEI24 1 "memory_operand" "m")))] + (match_operand:SWI48x 1 "memory_operand" "m")))] "TARGET_80387 - && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SSEMODEI24:MODE>mode)" + && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SWI48x:MODE>mode)" "fild%Z1\t%1" [(set_attr "type" "fmov") (set_attr "mode" "<X87MODEF:MODE>") (set_attr "fp_int_src" "true")]) (define_split - [(set (match_operand:X87MODEF 0 "register_operand" "") - (float:X87MODEF (match_operand:SSEMODEI24 1 "register_operand" ""))) - (clobber (match_operand:SSEMODEI24 2 "memory_operand" ""))] + [(set (match_operand:X87MODEF 0 "fp_register_operand" "") + (float:X87MODEF (match_operand:SWI48x 1 "register_operand" ""))) + (clobber (match_operand:SWI48x 2 "memory_operand" ""))] "TARGET_80387 - && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SSEMODEI24:MODE>mode) - && reload_completed - && FP_REG_P (operands[0])" + && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SWI48x:MODE>mode) + && reload_completed" [(set (match_dup 2) (match_dup 1)) (set (match_dup 0) (float:X87MODEF (match_dup 2)))]) (define_split - [(set (match_operand:X87MODEF 0 "register_operand" "") - (float:X87MODEF (match_operand:SSEMODEI24 1 "memory_operand" ""))) - (clobber (match_operand:SSEMODEI24 2 "memory_operand" ""))] + [(set (match_operand:X87MODEF 0 "fp_register_operand" "") + (float:X87MODEF (match_operand:SWI48x 1 "memory_operand" ""))) + (clobber (match_operand:SWI48x 2 "memory_operand" ""))] "TARGET_80387 - && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SSEMODEI24:MODE>mode) - && reload_completed - && FP_REG_P (operands[0])" + && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, <SWI48x:MODE>mode) + && reload_completed" [(set (match_dup 0) (float:X87MODEF (match_dup 1)))]) ;; Avoid store forwarding (partial memory) stall penalty @@ -5265,7 +5244,7 @@ (set_attr "fp_int_src" "true")]) (define_split - [(set (match_operand:X87MODEF 0 "register_operand" "") + [(set (match_operand:X87MODEF 0 "fp_register_operand" "") (float:X87MODEF (match_operand:DI 1 "register_operand" ""))) (clobber (match_scratch:V4SI 3 "")) (clobber (match_scratch:V4SI 4 "")) @@ -5273,8 +5252,7 @@ "TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode) && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES && !TARGET_64BIT && optimize_function_for_speed_p (cfun) - && reload_completed - && FP_REG_P (operands[0])" + && reload_completed" [(set (match_dup 2) (match_dup 3)) (set (match_dup 0) (float:X87MODEF (match_dup 2)))] { @@ -5291,7 +5269,7 @@ }) (define_split - [(set (match_operand:X87MODEF 0 "register_operand" "") + [(set (match_operand:X87MODEF 0 "fp_register_operand" "") (float:X87MODEF (match_operand:DI 1 "memory_operand" ""))) (clobber (match_scratch:V4SI 3 "")) (clobber (match_scratch:V4SI 4 "")) @@ -5299,8 +5277,7 @@ "TARGET_80387 && X87_ENABLE_FLOAT (<X87MODEF:MODE>mode, DImode) && TARGET_SSE2 && TARGET_INTER_UNIT_MOVES && !TARGET_64BIT && optimize_function_for_speed_p (cfun) - && reload_completed - && FP_REG_P (operands[0])" + && reload_completed" [(set (match_dup 0) (float:X87MODEF (match_dup 1)))]) ;; Avoid store forwarding (partial memory) stall penalty by extending @@ -6430,6 +6407,40 @@ } [(set_attr "type" "lea") (set_attr "mode" "SI")]) + +(define_insn_and_split "*lea_general_4" + [(set (match_operand:SWI 0 "register_operand" "=r") + (any_or:SWI (ashift:SWI (match_operand:SWI 1 "index_register_operand" "l") + (match_operand:SWI 2 "const_int_operand" "n")) + (match_operand 3 "const_int_operand" "n")))] + "(<MODE>mode == DImode + || <MODE>mode == SImode + || !TARGET_PARTIAL_REG_STALL + || optimize_function_for_size_p (cfun)) + && ((unsigned HOST_WIDE_INT) INTVAL (operands[2])) - 1 < 3 + && ((unsigned HOST_WIDE_INT) INTVAL (operands[3]) + <= ((unsigned HOST_WIDE_INT) 1 << INTVAL (operands[2])))" + "#" + "&& reload_completed" + [(const_int 0)] +{ + rtx pat; + if (<MODE>mode != DImode) + operands[0] = gen_lowpart (SImode, operands[0]); + operands[1] = gen_lowpart (Pmode, operands[1]); + operands[2] = GEN_INT (1 << INTVAL (operands[2])); + pat = plus_constant (gen_rtx_MULT (Pmode, operands[1], operands[2]), + INTVAL (operands[3])); + if (Pmode != SImode && <MODE>mode != DImode) + pat = gen_rtx_SUBREG (SImode, pat, 0); + emit_insn (gen_rtx_SET (VOIDmode, operands[0], pat)); + DONE; +} + [(set_attr "type" "lea") + (set (attr "mode") + (if_then_else (eq (symbol_ref "<MODE>mode == DImode") (const_int 0)) + (const_string "SI") + (const_string "DI")))]) ;; Subtract instructions @@ -10879,7 +10890,7 @@ (if_then_else (match_operator 0 "ix86_swapped_fp_comparison_operator" [(match_operator 1 "float_operator" - [(match_operand:X87MODEI12 2 "nonimmediate_operand" "m,?r")]) + [(match_operand:SWI24 2 "nonimmediate_operand" "m,?r")]) (match_operand 3 "register_operand" "f,f")]) (label_ref (match_operand 4 "" "")) (pc))) @@ -10898,7 +10909,7 @@ (if_then_else (match_operator 0 "ix86_swapped_fp_comparison_operator" [(match_operator 1 "float_operator" - [(match_operand:X87MODEI12 2 "memory_operand" "")]) + [(match_operand:SWI24 2 "memory_operand" "")]) (match_operand 3 "register_operand" "")]) (match_operand 4 "" "") (match_operand 5 "" ""))) @@ -10922,7 +10933,7 @@ (if_then_else (match_operator 0 "ix86_swapped_fp_comparison_operator" [(match_operator 1 "float_operator" - [(match_operand:X87MODEI12 2 "register_operand" "")]) + [(match_operand:SWI24 2 "register_operand" "")]) (match_operand 3 "register_operand" "")]) (match_operand 4 "" "") (match_operand 5 "" ""))) @@ -12828,11 +12839,11 @@ [(set (match_operand:MODEF 0 "register_operand" "=f,f") (match_operator:MODEF 3 "binary_fp_operator" [(float:MODEF - (match_operand:X87MODEI12 1 "nonimmediate_operand" "m,?r")) + (match_operand:SWI24 1 "nonimmediate_operand" "m,?r")) (match_operand:MODEF 2 "register_operand" "0,0")]))] - "TARGET_80387 && X87_ENABLE_FLOAT (<MODEF:MODE>mode, <X87MODEI12:MODE>mode) + "TARGET_80387 && X87_ENABLE_FLOAT (<MODEF:MODE>mode, <SWI24:MODE>mode) && !(SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH) - && (TARGET_USE_<X87MODEI12:MODE>MODE_FIOP || optimize_function_for_size_p (cfun))" + && (TARGET_USE_<SWI24:MODE>MODE_FIOP || optimize_function_for_size_p (cfun))" "* return which_alternative ? \"#\" : output_387_binary_op (insn, operands);" [(set (attr "type") (cond [(match_operand:MODEF 3 "mult_operator" "") @@ -12842,17 +12853,17 @@ ] (const_string "fop"))) (set_attr "fp_int_src" "true") - (set_attr "mode" "<X87MODEI12:MODE>")]) + (set_attr "mode" "<SWI24:MODE>")]) (define_insn "*fop_<MODEF:mode>_3_i387" [(set (match_operand:MODEF 0 "register_operand" "=f,f") (match_operator:MODEF 3 "binary_fp_operator" [(match_operand:MODEF 1 "register_operand" "0,0") (float:MODEF - (match_operand:X87MODEI12 2 "nonimmediate_operand" "m,?r"))]))] - "TARGET_80387 && X87_ENABLE_FLOAT (<MODEF:MODE>mode, <X87MODEI12:MODE>mode) + (match_operand:SWI24 2 "nonimmediate_operand" "m,?r"))]))] + "TARGET_80387 && X87_ENABLE_FLOAT (<MODEF:MODE>mode, <SWI24:MODE>mode) && !(SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH) - && (TARGET_USE_<X87MODEI12:MODE>MODE_FIOP || optimize_function_for_size_p (cfun))" + && (TARGET_USE_<SWI24:MODE>MODE_FIOP || optimize_function_for_size_p (cfun))" "* return which_alternative ? \"#\" : output_387_binary_op (insn, operands);" [(set (attr "type") (cond [(match_operand:MODEF 3 "mult_operator" "") @@ -12955,7 +12966,7 @@ [(set (match_operand:XF 0 "register_operand" "=f,f") (match_operator:XF 3 "binary_fp_operator" [(float:XF - (match_operand:X87MODEI12 1 "nonimmediate_operand" "m,?r")) + (match_operand:SWI24 1 "nonimmediate_operand" "m,?r")) (match_operand:XF 2 "register_operand" "0,0")]))] "TARGET_80387 && (TARGET_USE_<MODE>MODE_FIOP || optimize_function_for_size_p (cfun))" "* return which_alternative ? \"#\" : output_387_binary_op (insn, operands);" @@ -12974,7 +12985,7 @@ (match_operator:XF 3 "binary_fp_operator" [(match_operand:XF 1 "register_operand" "0,0") (float:XF - (match_operand:X87MODEI12 2 "nonimmediate_operand" "m,?r"))]))] + (match_operand:SWI24 2 "nonimmediate_operand" "m,?r"))]))] "TARGET_80387 && (TARGET_USE_<MODE>MODE_FIOP || optimize_function_for_size_p (cfun))" "* return which_alternative ? \"#\" : output_387_binary_op (insn, operands);" [(set (attr "type") @@ -13042,7 +13053,7 @@ (define_split [(set (match_operand 0 "register_operand" "") (match_operator 3 "binary_fp_operator" - [(float (match_operand:X87MODEI12 1 "register_operand" "")) + [(float (match_operand:SWI24 1 "register_operand" "")) (match_operand 2 "register_operand" "")]))] "reload_completed && X87_FLOAT_MODE_P (GET_MODE (operands[0])) @@ -13064,7 +13075,7 @@ [(set (match_operand 0 "register_operand" "") (match_operator 3 "binary_fp_operator" [(match_operand 1 "register_operand" "") - (float (match_operand:X87MODEI12 2 "register_operand" ""))]))] + (float (match_operand:SWI24 2 "register_operand" ""))]))] "reload_completed && X87_FLOAT_MODE_P (GET_MODE (operands[0])) && X87_ENABLE_FLOAT (GET_MODE (operands[0]), GET_MODE (operands[2]))" @@ -14450,9 +14461,9 @@ (clobber (match_dup 3))])]) (define_insn_and_split "*fist<mode>2_1" - [(set (match_operand:X87MODEI12 0 "register_operand" "") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST))] + [(set (match_operand:SWI24 0 "register_operand" "") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST))] "TARGET_USE_FANCY_MATH_387 && can_create_pseudo_p ()" "#" @@ -14468,59 +14479,59 @@ (set_attr "mode" "<MODE>")]) (define_insn "fist<mode>2" - [(set (match_operand:X87MODEI12 0 "memory_operand" "=m") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "f")] - UNSPEC_FIST))] + [(set (match_operand:SWI24 0 "memory_operand" "=m") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "f")] + UNSPEC_FIST))] "TARGET_USE_FANCY_MATH_387" "* return output_fix_trunc (insn, operands, false);" [(set_attr "type" "fpspc") (set_attr "mode" "<MODE>")]) (define_insn "fist<mode>2_with_temp" - [(set (match_operand:X87MODEI12 0 "register_operand" "=r") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "f")] - UNSPEC_FIST)) - (clobber (match_operand:X87MODEI12 2 "memory_operand" "=m"))] + [(set (match_operand:SWI24 0 "register_operand" "=r") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "f")] + UNSPEC_FIST)) + (clobber (match_operand:SWI24 2 "memory_operand" "=m"))] "TARGET_USE_FANCY_MATH_387" "#" [(set_attr "type" "fpspc") (set_attr "mode" "<MODE>")]) (define_split - [(set (match_operand:X87MODEI12 0 "register_operand" "") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST)) - (clobber (match_operand:X87MODEI12 2 "memory_operand" ""))] + [(set (match_operand:SWI24 0 "register_operand" "") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST)) + (clobber (match_operand:SWI24 2 "memory_operand" ""))] "reload_completed" - [(set (match_dup 2) (unspec:X87MODEI12 [(match_dup 1)] UNSPEC_FIST)) + [(set (match_dup 2) (unspec:SWI24 [(match_dup 1)] UNSPEC_FIST)) (set (match_dup 0) (match_dup 2))]) (define_split - [(set (match_operand:X87MODEI12 0 "memory_operand" "") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST)) - (clobber (match_operand:X87MODEI12 2 "memory_operand" ""))] + [(set (match_operand:SWI24 0 "memory_operand" "") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST)) + (clobber (match_operand:SWI24 2 "memory_operand" ""))] "reload_completed" - [(set (match_dup 0) (unspec:X87MODEI12 [(match_dup 1)] UNSPEC_FIST))]) + [(set (match_dup 0) (unspec:SWI24 [(match_dup 1)] UNSPEC_FIST))]) (define_expand "lrintxf<mode>2" - [(set (match_operand:X87MODEI 0 "nonimmediate_operand" "") - (unspec:X87MODEI [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST))] + [(set (match_operand:SWI248x 0 "nonimmediate_operand" "") + (unspec:SWI248x [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST))] "TARGET_USE_FANCY_MATH_387") -(define_expand "lrint<MODEF:mode><SSEMODEI24:mode>2" - [(set (match_operand:SSEMODEI24 0 "nonimmediate_operand" "") - (unspec:SSEMODEI24 [(match_operand:MODEF 1 "register_operand" "")] +(define_expand "lrint<MODEF:mode><SWI48x:mode>2" + [(set (match_operand:SWI48x 0 "nonimmediate_operand" "") + (unspec:SWI48x [(match_operand:MODEF 1 "register_operand" "")] UNSPEC_FIX_NOTRUNC))] "SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH - && ((<SSEMODEI24:MODE>mode != DImode) || TARGET_64BIT)") + && ((<SWI48x:MODE>mode != DImode) || TARGET_64BIT)") -(define_expand "lround<MODEF:mode><SSEMODEI24:mode>2" - [(match_operand:SSEMODEI24 0 "nonimmediate_operand" "") +(define_expand "lround<MODEF:mode><SWI48x:mode>2" + [(match_operand:SWI48x 0 "nonimmediate_operand" "") (match_operand:MODEF 1 "register_operand" "")] "SSE_FLOAT_MODE_P (<MODEF:MODE>mode) && TARGET_SSE_MATH - && ((<SSEMODEI24:MODE>mode != DImode) || TARGET_64BIT) + && ((<SWI48x:MODE>mode != DImode) || TARGET_64BIT) && !flag_trapping_math && !flag_rounding_math" { if (optimize_insn_for_size_p ()) @@ -14622,9 +14633,9 @@ }) (define_insn_and_split "*fist<mode>2_floor_1" - [(set (match_operand:X87MODEI 0 "nonimmediate_operand" "") - (unspec:X87MODEI [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_FLOOR)) + [(set (match_operand:SWI248x 0 "nonimmediate_operand" "") + (unspec:SWI248x [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST_FLOOR)) (clobber (reg:CC FLAGS_REG))] "TARGET_USE_FANCY_MATH_387 && flag_unsafe_math_optimizations @@ -14656,7 +14667,7 @@ (define_insn "fistdi2_floor" [(set (match_operand:DI 0 "memory_operand" "=m") (unspec:DI [(match_operand:XF 1 "register_operand" "f")] - UNSPEC_FIST_FLOOR)) + UNSPEC_FIST_FLOOR)) (use (match_operand:HI 2 "memory_operand" "m")) (use (match_operand:HI 3 "memory_operand" "m")) (clobber (match_scratch:XF 4 "=&1f"))] @@ -14670,7 +14681,7 @@ (define_insn "fistdi2_floor_with_temp" [(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r") (unspec:DI [(match_operand:XF 1 "register_operand" "f,f")] - UNSPEC_FIST_FLOOR)) + UNSPEC_FIST_FLOOR)) (use (match_operand:HI 2 "memory_operand" "m,m")) (use (match_operand:HI 3 "memory_operand" "m,m")) (clobber (match_operand:DI 4 "memory_operand" "=X,m")) @@ -14685,13 +14696,14 @@ (define_split [(set (match_operand:DI 0 "register_operand" "") (unspec:DI [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_FLOOR)) + UNSPEC_FIST_FLOOR)) (use (match_operand:HI 2 "memory_operand" "")) (use (match_operand:HI 3 "memory_operand" "")) (clobber (match_operand:DI 4 "memory_operand" "")) (clobber (match_scratch 5 ""))] "reload_completed" - [(parallel [(set (match_dup 4) (unspec:DI [(match_dup 1)] UNSPEC_FIST_FLOOR)) + [(parallel [(set (match_dup 4) + (unspec:DI [(match_dup 1)] UNSPEC_FIST_FLOOR)) (use (match_dup 2)) (use (match_dup 3)) (clobber (match_dup 5))]) @@ -14700,21 +14712,22 @@ (define_split [(set (match_operand:DI 0 "memory_operand" "") (unspec:DI [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_FLOOR)) + UNSPEC_FIST_FLOOR)) (use (match_operand:HI 2 "memory_operand" "")) (use (match_operand:HI 3 "memory_operand" "")) (clobber (match_operand:DI 4 "memory_operand" "")) (clobber (match_scratch 5 ""))] "reload_completed" - [(parallel [(set (match_dup 0) (unspec:DI [(match_dup 1)] UNSPEC_FIST_FLOOR)) + [(parallel [(set (match_dup 0) + (unspec:DI [(match_dup 1)] UNSPEC_FIST_FLOOR)) (use (match_dup 2)) (use (match_dup 3)) (clobber (match_dup 5))])]) (define_insn "fist<mode>2_floor" - [(set (match_operand:X87MODEI12 0 "memory_operand" "=m") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "f")] - UNSPEC_FIST_FLOOR)) + [(set (match_operand:SWI24 0 "memory_operand" "=m") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "f")] + UNSPEC_FIST_FLOOR)) (use (match_operand:HI 2 "memory_operand" "m")) (use (match_operand:HI 3 "memory_operand" "m"))] "TARGET_USE_FANCY_MATH_387 @@ -14725,12 +14738,12 @@ (set_attr "mode" "<MODE>")]) (define_insn "fist<mode>2_floor_with_temp" - [(set (match_operand:X87MODEI12 0 "nonimmediate_operand" "=m,?r") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "f,f")] - UNSPEC_FIST_FLOOR)) + [(set (match_operand:SWI24 0 "nonimmediate_operand" "=m,?r") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "f,f")] + UNSPEC_FIST_FLOOR)) (use (match_operand:HI 2 "memory_operand" "m,m")) (use (match_operand:HI 3 "memory_operand" "m,m")) - (clobber (match_operand:X87MODEI12 4 "memory_operand" "=X,m"))] + (clobber (match_operand:SWI24 4 "memory_operand" "=X,m"))] "TARGET_USE_FANCY_MATH_387 && flag_unsafe_math_optimizations" "#" @@ -14739,36 +14752,36 @@ (set_attr "mode" "<MODE>")]) (define_split - [(set (match_operand:X87MODEI12 0 "register_operand" "") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_FLOOR)) + [(set (match_operand:SWI24 0 "register_operand" "") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST_FLOOR)) (use (match_operand:HI 2 "memory_operand" "")) (use (match_operand:HI 3 "memory_operand" "")) - (clobber (match_operand:X87MODEI12 4 "memory_operand" ""))] + (clobber (match_operand:SWI24 4 "memory_operand" ""))] "reload_completed" - [(parallel [(set (match_dup 4) (unspec:X87MODEI12 [(match_dup 1)] - UNSPEC_FIST_FLOOR)) + [(parallel [(set (match_dup 4) + (unspec:SWI24 [(match_dup 1)] UNSPEC_FIST_FLOOR)) (use (match_dup 2)) (use (match_dup 3))]) (set (match_dup 0) (match_dup 4))]) (define_split - [(set (match_operand:X87MODEI12 0 "memory_operand" "") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_FLOOR)) + [(set (match_operand:SWI24 0 "memory_operand" "") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST_FLOOR)) (use (match_operand:HI 2 "memory_operand" "")) (use (match_operand:HI 3 "memory_operand" "")) - (clobber (match_operand:X87MODEI12 4 "memory_operand" ""))] + (clobber (match_operand:SWI24 4 "memory_operand" ""))] "reload_completed" - [(parallel [(set (match_dup 0) (unspec:X87MODEI12 [(match_dup 1)] - UNSPEC_FIST_FLOOR)) + [(parallel [(set (match_dup 0) + (unspec:SWI24 [(match_dup 1)] UNSPEC_FIST_FLOOR)) (use (match_dup 2)) (use (match_dup 3))])]) (define_expand "lfloorxf<mode>2" - [(parallel [(set (match_operand:X87MODEI 0 "nonimmediate_operand" "") - (unspec:X87MODEI [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_FLOOR)) + [(parallel [(set (match_operand:SWI248x 0 "nonimmediate_operand" "") + (unspec:SWI248x [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST_FLOOR)) (clobber (reg:CC FLAGS_REG))])] "TARGET_USE_FANCY_MATH_387 && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387) @@ -14879,9 +14892,9 @@ }) (define_insn_and_split "*fist<mode>2_ceil_1" - [(set (match_operand:X87MODEI 0 "nonimmediate_operand" "") - (unspec:X87MODEI [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_CEIL)) + [(set (match_operand:SWI248x 0 "nonimmediate_operand" "") + (unspec:SWI248x [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST_CEIL)) (clobber (reg:CC FLAGS_REG))] "TARGET_USE_FANCY_MATH_387 && flag_unsafe_math_optimizations @@ -14913,7 +14926,7 @@ (define_insn "fistdi2_ceil" [(set (match_operand:DI 0 "memory_operand" "=m") (unspec:DI [(match_operand:XF 1 "register_operand" "f")] - UNSPEC_FIST_CEIL)) + UNSPEC_FIST_CEIL)) (use (match_operand:HI 2 "memory_operand" "m")) (use (match_operand:HI 3 "memory_operand" "m")) (clobber (match_scratch:XF 4 "=&1f"))] @@ -14927,7 +14940,7 @@ (define_insn "fistdi2_ceil_with_temp" [(set (match_operand:DI 0 "nonimmediate_operand" "=m,?r") (unspec:DI [(match_operand:XF 1 "register_operand" "f,f")] - UNSPEC_FIST_CEIL)) + UNSPEC_FIST_CEIL)) (use (match_operand:HI 2 "memory_operand" "m,m")) (use (match_operand:HI 3 "memory_operand" "m,m")) (clobber (match_operand:DI 4 "memory_operand" "=X,m")) @@ -14942,13 +14955,14 @@ (define_split [(set (match_operand:DI 0 "register_operand" "") (unspec:DI [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_CEIL)) + UNSPEC_FIST_CEIL)) (use (match_operand:HI 2 "memory_operand" "")) (use (match_operand:HI 3 "memory_operand" "")) (clobber (match_operand:DI 4 "memory_operand" "")) (clobber (match_scratch 5 ""))] "reload_completed" - [(parallel [(set (match_dup 4) (unspec:DI [(match_dup 1)] UNSPEC_FIST_CEIL)) + [(parallel [(set (match_dup 4) + (unspec:DI [(match_dup 1)] UNSPEC_FIST_CEIL)) (use (match_dup 2)) (use (match_dup 3)) (clobber (match_dup 5))]) @@ -14957,21 +14971,22 @@ (define_split [(set (match_operand:DI 0 "memory_operand" "") (unspec:DI [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_CEIL)) + UNSPEC_FIST_CEIL)) (use (match_operand:HI 2 "memory_operand" "")) (use (match_operand:HI 3 "memory_operand" "")) (clobber (match_operand:DI 4 "memory_operand" "")) (clobber (match_scratch 5 ""))] "reload_completed" - [(parallel [(set (match_dup 0) (unspec:DI [(match_dup 1)] UNSPEC_FIST_CEIL)) + [(parallel [(set (match_dup 0) + (unspec:DI [(match_dup 1)] UNSPEC_FIST_CEIL)) (use (match_dup 2)) (use (match_dup 3)) (clobber (match_dup 5))])]) (define_insn "fist<mode>2_ceil" - [(set (match_operand:X87MODEI12 0 "memory_operand" "=m") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "f")] - UNSPEC_FIST_CEIL)) + [(set (match_operand:SWI24 0 "memory_operand" "=m") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "f")] + UNSPEC_FIST_CEIL)) (use (match_operand:HI 2 "memory_operand" "m")) (use (match_operand:HI 3 "memory_operand" "m"))] "TARGET_USE_FANCY_MATH_387 @@ -14982,12 +14997,12 @@ (set_attr "mode" "<MODE>")]) (define_insn "fist<mode>2_ceil_with_temp" - [(set (match_operand:X87MODEI12 0 "nonimmediate_operand" "=m,?r") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "f,f")] - UNSPEC_FIST_CEIL)) + [(set (match_operand:SWI24 0 "nonimmediate_operand" "=m,?r") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "f,f")] + UNSPEC_FIST_CEIL)) (use (match_operand:HI 2 "memory_operand" "m,m")) (use (match_operand:HI 3 "memory_operand" "m,m")) - (clobber (match_operand:X87MODEI12 4 "memory_operand" "=X,m"))] + (clobber (match_operand:SWI24 4 "memory_operand" "=X,m"))] "TARGET_USE_FANCY_MATH_387 && flag_unsafe_math_optimizations" "#" @@ -14996,36 +15011,36 @@ (set_attr "mode" "<MODE>")]) (define_split - [(set (match_operand:X87MODEI12 0 "register_operand" "") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_CEIL)) + [(set (match_operand:SWI24 0 "register_operand" "") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST_CEIL)) (use (match_operand:HI 2 "memory_operand" "")) (use (match_operand:HI 3 "memory_operand" "")) - (clobber (match_operand:X87MODEI12 4 "memory_operand" ""))] + (clobber (match_operand:SWI24 4 "memory_operand" ""))] "reload_completed" - [(parallel [(set (match_dup 4) (unspec:X87MODEI12 [(match_dup 1)] - UNSPEC_FIST_CEIL)) + [(parallel [(set (match_dup 4) + (unspec:SWI24 [(match_dup 1)] UNSPEC_FIST_CEIL)) (use (match_dup 2)) (use (match_dup 3))]) (set (match_dup 0) (match_dup 4))]) (define_split - [(set (match_operand:X87MODEI12 0 "memory_operand" "") - (unspec:X87MODEI12 [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_CEIL)) + [(set (match_operand:SWI24 0 "memory_operand" "") + (unspec:SWI24 [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST_CEIL)) (use (match_operand:HI 2 "memory_operand" "")) (use (match_operand:HI 3 "memory_operand" "")) - (clobber (match_operand:X87MODEI12 4 "memory_operand" ""))] + (clobber (match_operand:SWI24 4 "memory_operand" ""))] "reload_completed" - [(parallel [(set (match_dup 0) (unspec:X87MODEI12 [(match_dup 1)] - UNSPEC_FIST_CEIL)) + [(parallel [(set (match_dup 0) + (unspec:SWI24 [(match_dup 1)] UNSPEC_FIST_CEIL)) (use (match_dup 2)) (use (match_dup 3))])]) (define_expand "lceilxf<mode>2" - [(parallel [(set (match_operand:X87MODEI 0 "nonimmediate_operand" "") - (unspec:X87MODEI [(match_operand:XF 1 "register_operand" "")] - UNSPEC_FIST_CEIL)) + [(parallel [(set (match_operand:SWI248x 0 "nonimmediate_operand" "") + (unspec:SWI248x [(match_operand:XF 1 "register_operand" "")] + UNSPEC_FIST_CEIL)) (clobber (reg:CC FLAGS_REG))])] "TARGET_USE_FANCY_MATH_387 && (!TARGET_SSE_MATH || TARGET_MIX_SSE_I387) diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h index 833416d59a5..73681fe82f6 100644 --- a/gcc/config/i386/linux.h +++ b/gcc/config/i386/linux.h @@ -22,5 +22,3 @@ along with GCC; see the file COPYING3. If not see #define GNU_USER_LINK_EMULATION "elf_i386" #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - -#define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h" diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h index 99d62496860..9bf7eab04af 100644 --- a/gcc/config/i386/linux64.h +++ b/gcc/config/i386/linux64.h @@ -26,5 +26,3 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" - -#define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h" diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h index 6ae7799359d..c1c12778d70 100644 --- a/gcc/config/i386/mingw32.h +++ b/gcc/config/i386/mingw32.h @@ -241,12 +241,6 @@ __enable_execute_stack (void *addr) \ #include <windows.h> #endif -/* For 64-bit Windows we can't use DW2 unwind info. Also for multilib - builds we can't use it, too. */ -#if !TARGET_64BIT_DEFAULT && !defined (TARGET_BI_ARCH) -#define MD_UNWIND_SUPPORT "config/i386/w32-unwind.h" -#endif - /* This matches SHLIB_SONAME and SHLIB_SOVERSION in t-cygming. */ /* This matches SHLIB_SONAME and SHLIB_SOVERSION in t-cygwin. */ #if DWARF2_UNWIND_INFO diff --git a/gcc/config/i386/sol2-c1.asm b/gcc/config/i386/sol2-c1.asm deleted file mode 100644 index 4a89530cc5f..00000000000 --- a/gcc/config/i386/sol2-c1.asm +++ /dev/null @@ -1,151 +0,0 @@ -! crt1.s for Solaris 2, x86 - -! Copyright (C) 1993, 1998, 2008, 2009 Free Software Foundation, Inc. -! Written By Fred Fish, Nov 1992 -! -! This file is free software; you can redistribute it and/or modify it -! under the terms of the GNU General Public License as published by the -! Free Software Foundation; either version 3, or (at your option) any -! later version. -! -! This file is distributed in the hope that it will be useful, but -! WITHOUT ANY WARRANTY; without even the implied warranty of -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -! General Public License for more details. -! -! Under Section 7 of GPL version 3, you are granted additional -! permissions described in the GCC Runtime Library Exception, version -! 3.1, as published by the Free Software Foundation. -! -! You should have received a copy of the GNU General Public License and -! a copy of the GCC Runtime Library Exception along with this program; -! see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -! <http://www.gnu.org/licenses/>. - - -! This file takes control of the process from the kernel, as specified -! in section 3 of the System V Application Binary Interface, Intel386 -! Processor Supplement. It has been constructed from information obtained -! from the ABI, information obtained from single stepping existing -! Solaris executables through their startup code with gdb, and from -! information obtained by single stepping executables on other i386 SVR4 -! implementations. This file is the first thing linked into any executable. - - .ident "GNU C crt1.s" - .weak _cleanup - .weak _DYNAMIC - .text - -! Start creating the initial frame by pushing a NULL value for the return -! address of the initial frame, and mark the end of the stack frame chain -! (the innermost stack frame) with a NULL value, per page 3-32 of the ABI. -! Initialize the first stack frame pointer in %ebp (the contents of which -! are unspecified at process initialization). - - .globl _start -_start: - pushl $0x0 - pushl $0x0 - movl %esp,%ebp - -! As specified per page 3-32 of the ABI, %edx contains a function -! pointer that should be registered with atexit(), for proper -! shared object termination. Just push it onto the stack for now -! to preserve it. We want to register _cleanup() first. - - pushl %edx - -! Check to see if there is an _cleanup() function linked in, and if -! so, register it with atexit() as the last thing to be run by -! atexit(). - - movl $_cleanup,%eax - testl %eax,%eax - je .L1 - pushl $_cleanup - call atexit - addl $0x4,%esp -.L1: - -! Now check to see if we have an _DYNAMIC table, and if so then -! we need to register the function pointer previously in %edx, but -! now conveniently saved on the stack as the argument to pass to -! atexit(). - - movl $_DYNAMIC,%eax - testl %eax,%eax - je .L2 - call atexit -.L2: - -! Register _fini() with atexit(). We will take care of calling _init() -! directly. - - pushl $_fini - call atexit - -! Compute the address of the environment vector on the stack and load -! it into the global variable _environ. Currently argc is at 8 off -! the frame pointer. Fetch the argument count into %eax, scale by the -! size of each arg (4 bytes) and compute the address of the environment -! vector which is 16 bytes (the two zero words we pushed, plus argc, -! plus the null word terminating the arg vector) further up the stack, -! off the frame pointer (whew!). - - movl 8(%ebp),%eax - leal 16(%ebp,%eax,4),%edx - movl %edx,_environ - -! Push the environment vector pointer, the argument vector pointer, -! and the argument count on to the stack to set up the arguments -! for _init(), _fpstart(), and main(). Note that the environment -! vector pointer and the arg count were previously loaded into -! %edx and %eax respectively. The only new value we need to compute -! is the argument vector pointer, which is at a fixed address off -! the initial frame pointer. - -! -! Make sure the stack is properly aligned. -! - andl $0xfffffff0,%esp - subl $4,%esp - - pushl %edx - leal 12(%ebp),%edx - pushl %edx - pushl %eax - -! Call _init(argc, argv, environ), _fpstart(argc, argv, environ), and -! main(argc, argv, environ). - - call _init - call __fpstart - call main - -! Pop the argc, argv, and environ arguments off the stack, push the -! value returned from main(), and call exit(). - - addl $12,%esp - pushl %eax - call exit - -! An inline equivalent of _exit, as specified in Figure 3-26 of the ABI. - - pushl $0x0 - movl $0x1,%eax - lcall $7,$0 - -! If all else fails, just try a halt! - - hlt - .type _start,@function - .size _start,.-_start - -! A dummy profiling support routine for non-profiling executables, -! in case we link in some objects that have been compiled for profiling. - - .weak _mcount -_mcount: - ret - .type _mcount,@function - .size _mcount,.-_mcount diff --git a/gcc/config/i386/sol2-ci.asm b/gcc/config/i386/sol2-ci.asm deleted file mode 100644 index f2ff2025d45..00000000000 --- a/gcc/config/i386/sol2-ci.asm +++ /dev/null @@ -1,40 +0,0 @@ -! crti.s for Solaris 2, x86. - -! Copyright (C) 1993, 2008, 2009 Free Software Foundation, Inc. -! Written By Fred Fish, Nov 1992 -! -! This file is free software; you can redistribute it and/or modify it -! under the terms of the GNU General Public License as published by the -! Free Software Foundation; either version 3, or (at your option) any -! later version. -! -! This file is distributed in the hope that it will be useful, but -! WITHOUT ANY WARRANTY; without even the implied warranty of -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -! General Public License for more details. -! -! Under Section 7 of GPL version 3, you are granted additional -! permissions described in the GCC Runtime Library Exception, version -! 3.1, as published by the Free Software Foundation. -! -! You should have received a copy of the GNU General Public License and -! a copy of the GCC Runtime Library Exception along with this program; -! see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -! <http://www.gnu.org/licenses/>. - - -! This file just supplies labeled starting points for the .init and .fini -! sections. It is linked in before the values-Xx.o files and also before -! crtbegin.o. - - .ident "GNU C crti.s" - - .section .init - .globl _init - .type _init,@function -_init: - - .section .fini - .globl _fini - .type _fini,@function -_fini: diff --git a/gcc/config/i386/sol2-cn.asm b/gcc/config/i386/sol2-cn.asm deleted file mode 100644 index 217f0409147..00000000000 --- a/gcc/config/i386/sol2-cn.asm +++ /dev/null @@ -1,35 +0,0 @@ -! crtn.s for Solaris 2, x86. - -! Copyright (C) 1993, 2008, 2009 Free Software Foundation, Inc. -! Written By Fred Fish, Nov 1992 -! -! This file is free software; you can redistribute it and/or modify it -! under the terms of the GNU General Public License as published by the -! Free Software Foundation; either version 3, or (at your option) any -! later version. -! -! This file is distributed in the hope that it will be useful, but -! WITHOUT ANY WARRANTY; without even the implied warranty of -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -! General Public License for more details. -! -! Under Section 7 of GPL version 3, you are granted additional -! permissions described in the GCC Runtime Library Exception, version -! 3.1, as published by the Free Software Foundation. -! -! You should have received a copy of the GNU General Public License and -! a copy of the GCC Runtime Library Exception along with this program; -! see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -! <http://www.gnu.org/licenses/>. - - -! This file just supplies returns for the .init and .fini sections. It is -! linked in after all other files. - - .ident "GNU C crtn.o" - - .section .init - ret $0x0 - - .section .fini - ret $0x0 diff --git a/gcc/config/i386/sol2-gc1.asm b/gcc/config/i386/sol2-gc1.asm deleted file mode 100644 index 8cb989a9c25..00000000000 --- a/gcc/config/i386/sol2-gc1.asm +++ /dev/null @@ -1,155 +0,0 @@ -! gcrt1.s for Solaris 2, x86 - -! Copyright (C) 1993, 2008, 2009 Free Software Foundation, Inc. -! Written By Fred Fish, Nov 1992 -! -! This file is free software; you can redistribute it and/or modify it -! under the terms of the GNU General Public License as published by the -! Free Software Foundation; either version 3, or (at your option) any -! later version. -! -! This file is distributed in the hope that it will be useful, but -! WITHOUT ANY WARRANTY; without even the implied warranty of -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -! General Public License for more details. -! -! Under Section 7 of GPL version 3, you are granted additional -! permissions described in the GCC Runtime Library Exception, version -! 3.1, as published by the Free Software Foundation. -! -! You should have received a copy of the GNU General Public License and -! a copy of the GCC Runtime Library Exception along with this program; -! see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -! <http://www.gnu.org/licenses/>. - - -! This file takes control of the process from the kernel, as specified -! in section 3 of the System V Application Binary Interface, Intel386 -! Processor Supplement. It has been constructed from information obtained -! from the ABI, information obtained from single stepping existing -! Solaris executables through their startup code with gdb, and from -! information obtained by single stepping executables on other i386 SVR4 -! implementations. This file is the first thing linked into any executable. - -! This is a modified crt1.s by J.W.Hawtin <oolon@ankh.org> 15/8/96, -! to allow program profiling, by calling monstartup on entry and _mcleanup -! on exit - - .ident "GNU C gcrt1.s" - .weak _DYNAMIC - .text - -! Start creating the initial frame by pushing a NULL value for the return -! address of the initial frame, and mark the end of the stack frame chain -! (the innermost stack frame) with a NULL value, per page 3-32 of the ABI. -! Initialize the first stack frame pointer in %ebp (the contents of which -! are unspecified at process initialization). - - .globl _start -_start: - pushl $0x0 - pushl $0x0 - movl %esp,%ebp - -! As specified per page 3-32 of the ABI, %edx contains a function -! pointer that should be registered with atexit(), for proper -! shared object termination. Just push it onto the stack for now -! to preserve it. We want to register _cleanup() first. - - pushl %edx - -! Check to see if there is an _cleanup() function linked in, and if -! so, register it with atexit() as the last thing to be run by -! atexit(). - - movl $_mcleanup,%eax - testl %eax,%eax - je .L1 - pushl $_mcleanup - call atexit - addl $0x4,%esp -.L1: - -! Now check to see if we have an _DYNAMIC table, and if so then -! we need to register the function pointer previously in %edx, but -! now conveniently saved on the stack as the argument to pass to -! atexit(). - - movl $_DYNAMIC,%eax - testl %eax,%eax - je .L2 - call atexit -.L2: - -! Register _fini() with atexit(). We will take care of calling _init() -! directly. - - pushl $_fini - call atexit - -! Start profiling - - pushl %ebp - movl %esp,%ebp - pushl $_etext - pushl $_start - call monstartup - addl $8,%esp - popl %ebp - -! Compute the address of the environment vector on the stack and load -! it into the global variable _environ. Currently argc is at 8 off -! the frame pointer. Fetch the argument count into %eax, scale by the -! size of each arg (4 bytes) and compute the address of the environment -! vector which is 16 bytes (the two zero words we pushed, plus argc, -! plus the null word terminating the arg vector) further up the stack, -! off the frame pointer (whew!). - - movl 8(%ebp),%eax - leal 16(%ebp,%eax,4),%edx - movl %edx,_environ - -! Push the environment vector pointer, the argument vector pointer, -! and the argument count on to the stack to set up the arguments -! for _init(), _fpstart(), and main(). Note that the environment -! vector pointer and the arg count were previously loaded into -! %edx and %eax respectively. The only new value we need to compute -! is the argument vector pointer, which is at a fixed address off -! the initial frame pointer. - -! -! Make sure the stack is properly aligned. -! - andl $0xfffffff0,%esp - subl $4,%esp - - pushl %edx - leal 12(%ebp),%edx - pushl %edx - pushl %eax - -! Call _init(argc, argv, environ), _fpstart(argc, argv, environ), and -! main(argc, argv, environ). - - call _init - call __fpstart - call main - -! Pop the argc, argv, and environ arguments off the stack, push the -! value returned from main(), and call exit(). - - addl $12,%esp - pushl %eax - call exit - -! An inline equivalent of _exit, as specified in Figure 3-26 of the ABI. - - pushl $0x0 - movl $0x1,%eax - lcall $7,$0 - -! If all else fails, just try a halt! - - hlt - .type _start,@function - .size _start,.-_start diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h index dc5b99e3a85..e466b03d0c9 100644 --- a/gcc/config/i386/sol2.h +++ b/gcc/config/i386/sol2.h @@ -171,5 +171,3 @@ along with GCC; see the file COPYING3. If not see #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "int" - -#define MD_UNWIND_SUPPORT "config/i386/sol2-unwind.h" diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 058f82bb26d..b3982af5ec0 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -1731,7 +1731,7 @@ [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) -(define_insn "*fma_fmadd_<mode>" +(define_insn "*fma_fnmadd_<mode>" [(set (match_operand:FMAMODE 0 "register_operand" "=x,x,x") (fma:FMAMODE (neg:FMAMODE @@ -1746,7 +1746,7 @@ [(set_attr "type" "ssemuladd") (set_attr "mode" "<MODE>")]) -(define_insn "*fma_fmsub_<mode>" +(define_insn "*fma_fnmsub_<mode>" [(set (match_operand:FMAMODE 0 "register_operand" "=x,x,x") (fma:FMAMODE (neg:FMAMODE @@ -3376,79 +3376,35 @@ ;; Avoid combining registers from different units in a single alternative, ;; see comment above inline_secondary_memory_needed function in i386.c -(define_insn "*vec_set<mode>_0_sse4_1" +(define_insn "vec_set<mode>_0" [(set (match_operand:VI4F_128 0 "nonimmediate_operand" - "=x,x,x ,x,x,x ,x ,m,m,m") + "=Y4,Y2,Y2,x,x,x,Y4 ,x ,m,m,m") (vec_merge:VI4F_128 (vec_duplicate:VI4F_128 (match_operand:<ssescalarmode> 2 "general_operand" - " x,m,*r,x,x,*rm,*rm,x,*r,fF")) + " Y4,m ,*r,m,x,x,*rm,*rm,x,*r,fF")) (match_operand:VI4F_128 1 "vector_move_operand" - " C,C,C ,0,x,0 ,x ,0,0 ,0") + " C ,C ,C ,C,0,x,0 ,x ,0,0 ,0") (const_int 1)))] - "TARGET_SSE4_1" + "TARGET_SSE" "@ %vinsertps\t{$0xe, %d2, %0|%0, %d2, 0xe} %vmov<ssescalarmodesuffix>\t{%2, %0|%0, %2} %vmovd\t{%2, %0|%0, %2} movss\t{%2, %0|%0, %2} + movss\t{%2, %0|%0, %2} vmovss\t{%2, %1, %0|%0, %1, %2} pinsrd\t{$0, %2, %0|%0, %2, 0} vpinsrd\t{$0, %2, %1, %0|%0, %1, %2, 0} # # #" - [(set_attr "isa" "base,base,base,noavx,avx,noavx,avx,base,base,base") - (set_attr "type" "sselog,ssemov,ssemov,ssemov,ssemov,sselog,sselog,*,*,*") - (set_attr "prefix_extra" "*,*,*,*,*,1,1,*,*,*") - (set_attr "length_immediate" "*,*,*,*,*,1,1,*,*,*") - (set_attr "prefix" "maybe_vex,maybe_vex,maybe_vex,orig,vex,orig,vex,*,*,*") - (set_attr "mode" "SF,<ssescalarmode>,SI,SF,SF,TI,TI,*,*,*")]) - -;; Avoid combining registers from different units in a single alternative, -;; see comment above inline_secondary_memory_needed function in i386.c -(define_insn "*vec_set<mode>_0_sse2" - [(set (match_operand:VI4F_128 0 "nonimmediate_operand" - "=x,x ,x,m,m ,m") - (vec_merge:VI4F_128 - (vec_duplicate:VI4F_128 - (match_operand:<ssescalarmode> 2 "general_operand" - " m,*r,x,x,*r,fF")) - (match_operand:VI4F_128 1 "vector_move_operand" - " C, C,0,0,0 ,0") - (const_int 1)))] - "TARGET_SSE2" - "@ - mov<ssescalarmodesuffix>\t{%2, %0|%0, %2} - movd\t{%2, %0|%0, %2} - movss\t{%2, %0|%0, %2} - # - # - #" - [(set_attr "type" "ssemov") - (set_attr "mode" "<ssescalarmode>,SI,SF,*,*,*")]) - -;; Avoid combining registers from different units in a single alternative, -;; see comment above inline_secondary_memory_needed function in i386.c -(define_insn "vec_set<mode>_0" - [(set (match_operand:VI4F_128 0 "nonimmediate_operand" - "=x,x,m,m ,m") - (vec_merge:VI4F_128 - (vec_duplicate:VI4F_128 - (match_operand:<ssescalarmode> 2 "general_operand" - " m,x,x,*r,fF")) - (match_operand:VI4F_128 1 "vector_move_operand" - " C,0,0,0 ,0") - (const_int 1)))] - "TARGET_SSE" - "@ - movss\t{%2, %0|%0, %2} - movss\t{%2, %0|%0, %2} - # - # - #" - [(set_attr "type" "ssemov") - (set_attr "mode" "SF,SF,*,*,*")]) + [(set_attr "isa" "base,base,base,noavx,noavx,avx,noavx,avx,base,base,base") + (set_attr "type" "sselog,ssemov,ssemov,ssemov,ssemov,ssemov,sselog,sselog,*,*,*") + (set_attr "prefix_extra" "*,*,*,*,*,*,1,1,*,*,*") + (set_attr "length_immediate" "*,*,*,*,*,*,1,1,*,*,*") + (set_attr "prefix" "maybe_vex,maybe_vex,maybe_vex,orig,orig,vex,orig,vex,*,*,*") + (set_attr "mode" "SF,<ssescalarmode>,SI,SF,SF,SF,TI,TI,*,*,*")]) ;; A subset is vec_setv4sf. (define_insn "*vec_setv4sf_sse4_1" @@ -3848,15 +3804,15 @@ operands[2] = force_reg (V2DFmode, operands[2]); }) -(define_insn "*sse3_interleave_highv2df" - [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,x,x,x,m") +(define_insn "*vec_interleave_highv2df" + [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,Y3,x,x,m") (vec_select:V2DF (vec_concat:V4DF - (match_operand:V2DF 1 "nonimmediate_operand" " 0,x,o,o,o,x") - (match_operand:V2DF 2 "nonimmediate_operand" " x,x,1,0,x,0")) + (match_operand:V2DF 1 "nonimmediate_operand" " 0,x,o ,o,o,x") + (match_operand:V2DF 2 "nonimmediate_operand" " x,x,1 ,0,x,0")) (parallel [(const_int 1) (const_int 3)])))] - "TARGET_SSE3 && ix86_vec_interleave_v2df_operator_ok (operands, 1)" + "TARGET_SSE2 && ix86_vec_interleave_v2df_operator_ok (operands, 1)" "@ unpckhpd\t{%2, %0|%0, %2} vunpckhpd\t{%2, %1, %0|%0, %1, %2} @@ -3870,23 +3826,6 @@ (set_attr "prefix" "orig,vex,maybe_vex,orig,vex,maybe_vex") (set_attr "mode" "V2DF,V2DF,V2DF,V1DF,V1DF,V1DF")]) -(define_insn "*sse2_interleave_highv2df" - [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,m") - (vec_select:V2DF - (vec_concat:V4DF - (match_operand:V2DF 1 "nonimmediate_operand" " 0,o,x") - (match_operand:V2DF 2 "nonimmediate_operand" " x,0,0")) - (parallel [(const_int 1) - (const_int 3)])))] - "TARGET_SSE2 && ix86_vec_interleave_v2df_operator_ok (operands, 1)" - "@ - unpckhpd\t{%2, %0|%0, %2} - movlpd\t{%H1, %0|%0, %H1} - movhpd\t{%1, %0|%0, %1}" - [(set_attr "type" "sselog,ssemov,ssemov") - (set_attr "prefix_data16" "*,1,1") - (set_attr "mode" "V2DF,V1DF,V1DF")]) - ;; Recall that the 256-bit unpck insns only shuffle within their lanes. (define_expand "avx_movddup256" [(set (match_operand:V4DF 0 "register_operand" "") @@ -3967,15 +3906,15 @@ operands[1] = force_reg (V2DFmode, operands[1]); }) -(define_insn "*sse3_interleave_lowv2df" - [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,x,x,x,o") +(define_insn "*vec_interleave_lowv2df" + [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,Y3,x,x,o") (vec_select:V2DF (vec_concat:V4DF - (match_operand:V2DF 1 "nonimmediate_operand" " 0,x,m,0,x,0") - (match_operand:V2DF 2 "nonimmediate_operand" " x,x,1,m,m,x")) + (match_operand:V2DF 1 "nonimmediate_operand" " 0,x,m ,0,x,0") + (match_operand:V2DF 2 "nonimmediate_operand" " x,x,1 ,m,m,x")) (parallel [(const_int 0) (const_int 2)])))] - "TARGET_SSE3 && ix86_vec_interleave_v2df_operator_ok (operands, 0)" + "TARGET_SSE2 && ix86_vec_interleave_v2df_operator_ok (operands, 0)" "@ unpcklpd\t{%2, %0|%0, %2} vunpcklpd\t{%2, %1, %0|%0, %1, %2} @@ -3989,23 +3928,6 @@ (set_attr "prefix" "orig,vex,maybe_vex,orig,vex,maybe_vex") (set_attr "mode" "V2DF,V2DF,V2DF,V1DF,V1DF,V1DF")]) -(define_insn "*sse2_interleave_lowv2df" - [(set (match_operand:V2DF 0 "nonimmediate_operand" "=x,x,o") - (vec_select:V2DF - (vec_concat:V4DF - (match_operand:V2DF 1 "nonimmediate_operand" " 0,0,0") - (match_operand:V2DF 2 "nonimmediate_operand" " x,m,x")) - (parallel [(const_int 0) - (const_int 2)])))] - "TARGET_SSE2 && ix86_vec_interleave_v2df_operator_ok (operands, 0)" - "@ - unpcklpd\t{%2, %0|%0, %2} - movhpd\t{%2, %0|%0, %2} - movlpd\t{%2, %H0|%H0, %2}" - [(set_attr "type" "sselog,ssemov,ssemov") - (set_attr "prefix_data16" "*,1,1") - (set_attr "mode" "V2DF,V1DF,V1DF")]) - (define_split [(set (match_operand:V2DF 0 "memory_operand" "") (vec_select:V2DF @@ -6214,7 +6136,7 @@ (set_attr "prefix" "maybe_vex") (set_attr "mode" "TI")]) -;; It must come before *vec_extractv2di_1_sse since it is preferred. +;; It must come before *vec_extractv2di_1_rex64 since it is preferred. (define_insn "*sse4_1_pextrq" [(set (match_operand:DI 0 "nonimmediate_operand" "=rm") (vec_select:DI @@ -6478,39 +6400,26 @@ (set_attr "prefix" "maybe_vex,orig,vex,maybe_vex,orig") (set_attr "mode" "V2SF,TI,TI,TI,DI")]) -(define_insn "*vec_extractv2di_1_sse2" - [(set (match_operand:DI 0 "nonimmediate_operand" "=m,x,x,x") +(define_insn "*vec_extractv2di_1" + [(set (match_operand:DI 0 "nonimmediate_operand" "=m,Y2,Y2,Y2,x,x") (vec_select:DI - (match_operand:V2DI 1 "nonimmediate_operand" " x,0,x,o") + (match_operand:V2DI 1 "nonimmediate_operand" " x,0 ,Y2,o ,x,o") (parallel [(const_int 1)])))] - "!TARGET_64BIT - && TARGET_SSE2 && !(MEM_P (operands[0]) && MEM_P (operands[1]))" + "!TARGET_64BIT && TARGET_SSE + && !(MEM_P (operands[0]) && MEM_P (operands[1]))" "@ %vmovhps\t{%1, %0|%0, %1} psrldq\t{$8, %0|%0, 8} vpsrldq\t{$8, %1, %0|%0, %1, 8} - %vmovq\t{%H1, %0|%0, %H1}" - [(set_attr "isa" "base,noavx,avx,base") - (set_attr "type" "ssemov,sseishft1,sseishft1,ssemov") - (set_attr "length_immediate" "*,1,1,*") - (set_attr "memory" "*,none,none,*") - (set_attr "prefix" "maybe_vex,orig,vex,maybe_vex") - (set_attr "mode" "V2SF,TI,TI,TI")]) - -;; Not sure this is ever used, but it doesn't hurt to have it. -aoliva -(define_insn "*vec_extractv2di_1_sse" - [(set (match_operand:DI 0 "nonimmediate_operand" "=m,x,x") - (vec_select:DI - (match_operand:V2DI 1 "nonimmediate_operand" " x,x,o") - (parallel [(const_int 1)])))] - "!TARGET_SSE2 && TARGET_SSE - && !(MEM_P (operands[0]) && MEM_P (operands[1]))" - "@ - movhps\t{%1, %0|%0, %1} + %vmovq\t{%H1, %0|%0, %H1} movhlps\t{%1, %0|%0, %1} movlps\t{%H1, %0|%0, %H1}" - [(set_attr "type" "ssemov") - (set_attr "mode" "V2SF,V4SF,V2SF")]) + [(set_attr "isa" "base,noavx,avx,base,noavx,noavx") + (set_attr "type" "ssemov,sseishft1,sseishft1,ssemov,ssemov,ssemov") + (set_attr "length_immediate" "*,1,1,*,*,*") + (set_attr "memory" "*,none,none,*,*,*") + (set_attr "prefix" "maybe_vex,orig,vex,maybe_vex,orig,orig") + (set_attr "mode" "V2SF,TI,TI,TI,V4SF,V2SF")]) (define_insn "*vec_dupv4si_avx" [(set (match_operand:V4SI 0 "register_operand" "=x,x") @@ -6570,8 +6479,8 @@ (match_operand:SI 2 "vector_move_operand" "rm,rm,x,x, C,*ym, C")))] "TARGET_SSE4_1" "@ - pinsrd\t{$0x1, %2, %0|%0, %2, 0x1} - vpinsrd\t{$0x1, %2, %1, %0|%0, %1, %2, 0x1} + pinsrd\t{$1, %2, %0|%0, %2, 1} + vpinsrd\t{$1, %2, %1, %0|%0, %1, %2, 1} punpckldq\t{%2, %0|%0, %2} vpunpckldq\t{%2, %1, %0|%0, %1, %2} %vmovd\t{%1, %0|%0, %1} @@ -6633,18 +6542,18 @@ (set_attr "mode" "TI,TI,V4SF,V2SF,V2SF")]) ;; movd instead of movq is required to handle broken assemblers. -(define_insn "*vec_concatv2di_rex64_sse4_1" +(define_insn "*vec_concatv2di_rex64" [(set (match_operand:V2DI 0 "register_operand" - "=x, x, x,Yi,!x,x,x,x,x") + "=Y4,x ,x ,Yi,!x,x,x,x,x") (vec_concat:V2DI (match_operand:DI 1 "nonimmediate_operand" - " 0, x,xm,r ,*y,0,x,0,x") + " 0 ,x ,xm,r ,*y,0,x,0,x") (match_operand:DI 2 "vector_move_operand" - "rm,rm, C,C ,C ,x,x,m,m")))] - "TARGET_64BIT && TARGET_SSE4_1" + " rm,rm,C ,C ,C ,x,x,m,m")))] + "TARGET_64BIT" "@ - pinsrq\t{$0x1, %2, %0|%0, %2, 0x1} - vpinsrq\t{$0x1, %2, %1, %0|%0, %1, %2, 0x1} + pinsrq\t{$1, %2, %0|%0, %2, 1} + vpinsrq\t{$1, %2, %1, %0|%0, %1, %2, 1} %vmovq\t{%1, %0|%0, %1} %vmovd\t{%1, %0|%0, %1} movq2dq\t{%1, %0|%0, %1} @@ -6653,7 +6562,11 @@ movhps\t{%2, %0|%0, %2} vmovhps\t{%2, %1, %0|%0, %1, %2}" [(set_attr "isa" "noavx,avx,base,base,base,noavx,avx,noavx,avx") - (set_attr "type" "sselog,sselog,ssemov,ssemov,ssemov,sselog,sselog,ssemov,ssemov") + (set (attr "type") + (if_then_else + (eq_attr "alternative" "0,1,5,6") + (const_string "sselog") + (const_string "ssemov"))) (set (attr "prefix_rex") (if_then_else (and (eq_attr "alternative" "0,3") @@ -6665,24 +6578,6 @@ (set_attr "prefix" "orig,vex,maybe_vex,maybe_vex,orig,orig,vex,orig,vex") (set_attr "mode" "TI,TI,TI,TI,TI,TI,TI,V2SF,V2SF")]) -;; movd instead of movq is required to handle broken assemblers. -(define_insn "*vec_concatv2di_rex64_sse" - [(set (match_operand:V2DI 0 "register_operand" "=Y2,Yi,!Y2,Y2,x,x") - (vec_concat:V2DI - (match_operand:DI 1 "nonimmediate_operand" "Y2m,r ,*y ,0 ,0,0") - (match_operand:DI 2 "vector_move_operand" " C ,C ,C ,Y2,x,m")))] - "TARGET_64BIT && TARGET_SSE" - "@ - movq\t{%1, %0|%0, %1} - movd\t{%1, %0|%0, %1} - movq2dq\t{%1, %0|%0, %1} - punpcklqdq\t{%2, %0|%0, %2} - movlhps\t{%2, %0|%0, %2} - movhps\t{%2, %0|%0, %2}" - [(set_attr "type" "ssemov,ssemov,ssemov,sselog,ssemov,ssemov") - (set_attr "prefix_rex" "*,1,*,*,*,*") - (set_attr "mode" "TI,TI,TI,TI,V4SF,V2SF")]) - (define_insn "vec_concatv2di" [(set (match_operand:V2DI 0 "register_operand" "=Y2,?Y2,Y2,x,x,x,x") (vec_concat:V2DI diff --git a/gcc/config/i386/t-nwld b/gcc/config/i386/t-nwld index e7727911636..a468533c1d1 100644 --- a/gcc/config/i386/t-nwld +++ b/gcc/config/i386/t-nwld @@ -45,6 +45,3 @@ nwld.o: $(srcdir)/config/i386/nwld.c $(RTL_H) $(TREE_H) $(CONFIG_H) $(TM_P_H) s-crt0: $(srcdir)/unwind-dw2-fde.h - -# To keep DRIVER_DEFINES correct. -SHLIB_LINK = dummy diff --git a/gcc/config/i386/t-rtems b/gcc/config/i386/t-rtems new file mode 100644 index 00000000000..07d7e5f6a79 --- /dev/null +++ b/gcc/config/i386/t-rtems @@ -0,0 +1,28 @@ +# Copyright (C) 1999, 2001, 2002, 2005, 2007, 2011 +# 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 3, 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 COPYING3. If not see +# <http://www.gnu.org/licenses/>. +# + +MULTILIB_OPTIONS = mtune=i486/mtune=pentium/mtune=pentiumpro \ +msoft-float +MULTILIB_DIRNAMES= m486 mpentium mpentiumpro soft-float +MULTILIB_MATCHES = msoft-float=mno-m80387 +MULTILIB_MATCHES += mtune?pentium=mtune?k6 mtune?pentiumpro=mtune?mathlon +MULTILIB_EXCEPTIONS = \ +mtune=pentium/*msoft-float* \ +mtune=pentiumpro/*msoft-float* diff --git a/gcc/config/i386/t-rtems-i386 b/gcc/config/i386/t-rtems-i386 deleted file mode 100644 index 47dfc7e1132..00000000000 --- a/gcc/config/i386/t-rtems-i386 +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright (C) 1999, 2001, 2002, 2005, 2007 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 3, 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 COPYING3. If not see -# <http://www.gnu.org/licenses/>. -# -# -# This file was based on t-sol2 - x68 Solaris implementation. Actually, -# the source code to create crti.o anf crtn.o are exactly the same -# as the ones for Solaris. Later, we might want to have a RTEMS's -# version of these files. -# - -$(T)crti.o: $(srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES) - sed -e '/^!/d' <$(srcdir)/config/i386/sol2-ci.asm >crti.s - $(GCC_FOR_TARGET) -c -o $(T)crti.o crti.s -$(T)crtn.o: $(srcdir)/config/i386/sol2-cn.asm $(GCC_PASSES) - sed -e '/^!/d' <$(srcdir)/config/i386/sol2-cn.asm >crtn.s - $(GCC_FOR_TARGET) -c -o $(T)crtn.o crtn.s - -# We want fine grained libraries, so use the new code to build the -# floating point emulation libraries. -FPBIT = fp-bit.c -DPBIT = dp-bit.c - -LIB2FUNCS_EXTRA = xp-bit.c - -dp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c - echo '#endif' >> dp-bit.c - cat $(srcdir)/config/fp-bit.c >> dp-bit.c - -fp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define FLOAT' > fp-bit.c - echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c - echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c - echo '#endif' >> fp-bit.c - cat $(srcdir)/config/fp-bit.c >> fp-bit.c - -xp-bit.c: $(srcdir)/config/fp-bit.c - echo '#define EXTENDED_FLOAT_STUBS' > xp-bit.c - cat $(srcdir)/config/fp-bit.c >> xp-bit.c - -MULTILIB_OPTIONS = mtune=i486/mtune=pentium/mtune=pentiumpro \ -msoft-float -MULTILIB_DIRNAMES= m486 mpentium mpentiumpro soft-float -MULTILIB_MATCHES = msoft-float=mno-m80387 -MULTILIB_MATCHES += mtune?pentium=mtune?k6 mtune?pentiumpro=mtune?mathlon -MULTILIB_EXCEPTIONS = \ -mtune=pentium/*msoft-float* \ -mtune=pentiumpro/*msoft-float* - -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o - -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/i386/t-sol2-10 b/gcc/config/i386/t-sol2-10 index 95eabf63dd6..c86870934e5 100644 --- a/gcc/config/i386/t-sol2-10 +++ b/gcc/config/i386/t-sol2-10 @@ -1,4 +1,4 @@ -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -19,11 +19,3 @@ MULTILIB_OPTIONS = m32/m64 MULTILIB_DIRNAMES = 32 amd64 MULTILIB_OSDIRNAMES = . amd64 - -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib - -# GCC contains i386 assembler sources for some of the startfiles -# which aren't appropriate for amd64. Just use the installed -# versions of: crt1.o crti.o crtn.o gcrt1.o -EXTRA_MULTILIB_PARTS=gmon.o crtbegin.o crtend.o diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index c1cebbaf21b..d6eeb3d7069 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -103,14 +103,6 @@ static const char * const ia64_local_reg_names[80] = static const char * const ia64_output_reg_names[8] = { "out0", "out1", "out2", "out3", "out4", "out5", "out6", "out7" }; -/* Determines whether we run our final scheduling pass or not. We always - avoid the normal second scheduling pass. */ -static int ia64_flag_schedule_insns2; - -/* Determines whether we run variable tracking in machine dependent - reorganization. */ -static int ia64_flag_var_tracking; - /* Variables which are this size or smaller are put in the sdata/sbss sections. */ @@ -640,6 +632,14 @@ static const struct default_options ia64_option_optimization_table[] = #undef TARGET_PREFERRED_RELOAD_CLASS #define TARGET_PREFERRED_RELOAD_CLASS ia64_preferred_reload_class +#undef TARGET_DELAY_SCHED2 +#define TARGET_DELAY_SCHED2 true + +/* Variable tracking should be run after all optimizations which + change order of insns. It also needs a valid CFG. */ +#undef TARGET_DELAY_VARTRACK +#define TARGET_DELAY_VARTRACK true + struct gcc_target targetm = TARGET_INITIALIZER; typedef enum @@ -2390,13 +2390,6 @@ ia64_expand_atomic_op (enum rtx_code code, rtx mem, rtx val, static void ia64_file_start (void) { - /* Variable tracking should be run after all optimizations which change order - of insns. It also needs a valid CFG. This can't be done in - ia64_option_override, because flag_var_tracking is finalized after - that. */ - ia64_flag_var_tracking = flag_var_tracking; - flag_var_tracking = 0; - default_file_start (); emit_safe_across_calls (); } @@ -5727,9 +5720,6 @@ ia64_option_override (void) static void ia64_override_options_after_change (void) { - ia64_flag_schedule_insns2 = flag_schedule_insns_after_reload; - flag_schedule_insns_after_reload = 0; - if (optimize >= 3 && !global_options_set.x_flag_selective_scheduling && !global_options_set.x_flag_selective_scheduling2) @@ -9401,7 +9391,7 @@ ia64_reorg (void) if (optimize == 0) split_all_insns (); - if (optimize && ia64_flag_schedule_insns2 + if (optimize && flag_schedule_insns_after_reload && dbg_cnt (ia64_sched2)) { timevar_push (TV_SCHED2); @@ -9531,7 +9521,7 @@ ia64_reorg (void) emit_predicate_relation_info (); - if (ia64_flag_var_tracking) + if (flag_var_tracking) { timevar_push (TV_VAR_TRACKING); variable_tracking_main (); diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h index e6370ea3492..00b0ddba1a0 100644 --- a/gcc/config/ia64/linux.h +++ b/gcc/config/ia64/linux.h @@ -77,8 +77,6 @@ do { \ #undef LINK_EH_SPEC #define LINK_EH_SPEC "" -#define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h" - /* Put all *tf routines in libgcc. */ #undef LIBGCC2_HAS_TF_MODE #define LIBGCC2_HAS_TF_MODE 1 diff --git a/gcc/config/ia64/unwind-ia64.c b/gcc/config/ia64/unwind-ia64.c index f935a0ca3e4..061bd4b8980 100644 --- a/gcc/config/ia64/unwind-ia64.c +++ b/gcc/config/ia64/unwind-ia64.c @@ -1,7 +1,7 @@ /* Subroutines needed for unwinding IA-64 standard format stack frame info for exception handling. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, - 2009 Free Software Foundation, Inc. + 2009, 2011 Free Software Foundation, Inc. Contributed by Andrew MacLeod <amacleod@cygnus.com> Andrew Haley <aph@cygnus.com> David Mosberger-Tang <davidm@hpl.hp.com> @@ -1767,9 +1767,7 @@ _Unwind_GetBSP (struct _Unwind_Context *context) return (_Unwind_Ptr) context->bsp; } -#ifdef MD_UNWIND_SUPPORT -#include MD_UNWIND_SUPPORT -#endif +#include "md-unwind-support.h" static _Unwind_Reason_Code uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs) diff --git a/gcc/config/ia64/vms.h b/gcc/config/ia64/vms.h index 777fa34d9a9..5d87e711856 100644 --- a/gcc/config/ia64/vms.h +++ b/gcc/config/ia64/vms.h @@ -185,8 +185,6 @@ typedef struct crtl_name_spec /* Define this to be nonzero if static stack checking is supported. */ #define STACK_CHECK_STATIC_BUILTIN 1 -#define MD_UNWIND_SUPPORT "config/ia64/vms-unwind.h" - #define UNW_IVMS_MODE(HEADER) (((HEADER) >> 44) & 0x3L) #define MD_UNW_COMPATIBLE_PERSONALITY_P(HEADER) (!UNW_IVMS_MODE (HEADER)) diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h index 6c07e261a6c..70738d221bf 100644 --- a/gcc/config/m68k/linux.h +++ b/gcc/config/m68k/linux.h @@ -235,5 +235,3 @@ along with GCC; see the file COPYING3. If not see #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD - -#define MD_UNWIND_SUPPORT "config/m68k/linux-unwind.h" diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h index aef37bd8f58..544a99f2d0b 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h @@ -99,8 +99,6 @@ along with GCC; see the file COPYING3. If not see %{!shared: \ %{profile:-lc_p} %{!profile:-lc}}" -#define MD_UNWIND_SUPPORT "config/mips/linux-unwind.h" - #ifdef HAVE_AS_NO_SHARED /* Default to -mno-shared for non-PIC. */ # define NO_SHARED_SPECS \ diff --git a/gcc/config/mips/t-iris b/gcc/config/mips/t-iris deleted file mode 100644 index a200cf8c19c..00000000000 --- a/gcc/config/mips/t-iris +++ /dev/null @@ -1,9 +0,0 @@ -$(T)irix-crti.o: $(srcdir)/config/mips/irix-crti.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $@ -x assembler-with-cpp $< - -$(T)irix-crtn.o: $(srcdir)/config/mips/irix-crtn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ - -c -o $@ -x assembler-with-cpp $< - -EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o irix-crti.o irix-crtn.o diff --git a/gcc/config/mips/t-irix6 b/gcc/config/mips/t-irix6 new file mode 100644 index 00000000000..6c76a4ad971 --- /dev/null +++ b/gcc/config/mips/t-irix6 @@ -0,0 +1,4 @@ +MULTILIB_OPTIONS=mabi=n32/mabi=64 +MULTILIB_DIRNAMES=n32 64 +MULTILIB_MATCHES= +MULTILIB_OSDIRNAMES=../lib32 ../lib64 diff --git a/gcc/config/pa/pa-hpux.h b/gcc/config/pa/pa-hpux.h index f167e133eb5..4d91be86dfd 100644 --- a/gcc/config/pa/pa-hpux.h +++ b/gcc/config/pa/pa-hpux.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for HP-UX. - Copyright (C) 1991, 1995, 1996, 2002, 2003, 2004, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 1991, 1995, 1996, 2002, 2003, 2004, 2007, 2008, 2009, + 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -115,5 +115,3 @@ along with GCC; see the file COPYING3. If not see compatibility with the HP-UX unwind library. */ #undef TARGET_HPUX_UNWIND_LIBRARY #define TARGET_HPUX_UNWIND_LIBRARY 1 - -#define MD_UNWIND_SUPPORT "config/pa/hpux-unwind.h" diff --git a/gcc/config/pa/pa32-linux.h b/gcc/config/pa/pa32-linux.h index 8d80a210003..01aa1c4b103 100644 --- a/gcc/config/pa/pa32-linux.h +++ b/gcc/config/pa/pa32-linux.h @@ -1,5 +1,5 @@ /* Definitions for PA_RISC with ELF-32 format - Copyright (C) 2000, 2002, 2004, 2006, 2007, 2010 + Copyright (C) 2000, 2002, 2004, 2006, 2007, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -63,5 +63,3 @@ call_ ## FUNC (void) \ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD - -#define MD_UNWIND_SUPPORT "config/pa/linux-unwind.h" diff --git a/gcc/config/picochip/picochip.c b/gcc/config/picochip/picochip.c index f7f1646901d..f755020b2f6 100644 --- a/gcc/config/picochip/picochip.c +++ b/gcc/config/picochip/picochip.c @@ -149,13 +149,6 @@ const char *picochip_regnames[] = REGISTER_NAMES; /* Target scheduling information. */ -/* Determine whether we run our final scheduling pass or not. We always - avoid the normal second scheduling pass. */ -int picochip_flag_schedule_insns2; - -/* Check if variable tracking needs to be run. */ -int picochip_flag_var_tracking; - /* This flag indicates whether the next instruction to be output is a VLIW continuation instruction. It is used to communicate between final_prescan_insn and asm_output_opcode. */ @@ -343,6 +336,17 @@ static const struct default_options picochip_option_optimization_table[] = #undef TARGET_EXCEPT_UNWIND_INFO #define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info +/* The 2nd scheduling pass option is switched off, and a machine + dependent reorganisation ensures that it is run later on, after the + second jump optimisation. */ +#undef TARGET_DELAY_SCHED2 +#define TARGET_DELAY_SCHED2 true + +/* Variable tracking should be run after all optimizations which + change order of insns. It also needs a valid CFG. */ +#undef TARGET_DELAY_VARTRACK +#define TARGET_DELAY_VARTRACK true + struct gcc_target targetm = TARGET_INITIALIZER; @@ -356,10 +360,7 @@ picochip_return_in_memory(const_tree type, const_tree fntype ATTRIBUTE_UNUSED) return ((unsigned HOST_WIDE_INT) int_size_in_bytes (type) > 4); } -/* Allow some options to be overriden. In particular, the 2nd - scheduling pass option is switched off, and a machine dependent - reorganisation ensures that it is run later on, after the second - jump optimisation. */ +/* Allow some options to be overriden. */ static void picochip_option_override (void) @@ -396,18 +397,16 @@ picochip_option_override (void) if (optimize >= 1) flag_section_anchors = 1; - /* Turn off the second scheduling pass, and move it to - picochip_reorg, to avoid having the second jump optimisation - trash the instruction modes (e.g., instructions are changed to - TImode to mark the beginning of cycles). Two types of DFA - scheduling are possible: space and speed. In both cases, - instructions are reordered to avoid stalls (e.g., memory loads - stall for one cycle). Speed scheduling will also enable VLIW - instruction packing. VLIW instructions use more code space, so - VLIW scheduling is disabled when scheduling for size. */ - picochip_flag_schedule_insns2 = flag_schedule_insns_after_reload; - flag_schedule_insns_after_reload = 0; - if (picochip_flag_schedule_insns2) + /* The second scheduling pass runs within picochip_reorg, to avoid + having the second jump optimisation trash the instruction modes + (e.g., instructions are changed to TImode to mark the beginning + of cycles). Two types of DFA scheduling are possible: space and + speed. In both cases, instructions are reordered to avoid stalls + (e.g., memory loads stall for one cycle). Speed scheduling will + also enable VLIW instruction packing. VLIW instructions use more + code space, so VLIW scheduling is disabled when scheduling for + size. */ + if (flag_schedule_insns_after_reload) { if (optimize_size) picochip_schedule_type = DFA_TYPE_SPACE; @@ -461,7 +460,6 @@ picochip_option_override (void) error ("invalid mul type specified (%s) - expected mac, mul or none", picochip_mul_type_string); } - } @@ -1813,13 +1811,6 @@ picochip_asm_file_start (void) fprintf (asm_out_file, "// Has multiply: Yes (Mac unit)\n"); else fprintf (asm_out_file, "// Has multiply: No\n"); - - /* Variable tracking should be run after all optimizations which change order - of insns. It also needs a valid CFG. This can't be done in - picochip_option_override, because flag_var_tracking is finalized after - that. */ - picochip_flag_var_tracking = flag_var_tracking; - flag_var_tracking = 0; } /* Output the end of an ASM file. */ @@ -3376,15 +3367,16 @@ picochip_reorg (void) delete_insn (prologue_end_note); } } - if (picochip_flag_var_tracking) - { - timevar_push (TV_VAR_TRACKING); - variable_tracking_main (); - /* We also have to deal with variable tracking notes in the middle - of VLIW packets. */ - reorder_var_tracking_notes(); - timevar_pop (TV_VAR_TRACKING); - } + + if (flag_var_tracking) + { + timevar_push (TV_VAR_TRACKING); + variable_tracking_main (); + /* We also have to deal with variable tracking notes in the + middle of VLIW packets. */ + reorder_var_tracking_notes(); + timevar_pop (TV_VAR_TRACKING); + } } /* Return the ALU character identifier for the current diff --git a/gcc/config/picochip/t-picochip b/gcc/config/picochip/t-picochip index c74c12d309f..ba4394eceeb 100644 --- a/gcc/config/picochip/t-picochip +++ b/gcc/config/picochip/t-picochip @@ -1,4 +1,4 @@ -# Copyright (C) 2008 Free Software Foundation, Inc. +# Copyright (C) 2008, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -45,7 +45,6 @@ LIB1ASMSRC = picochip/libgccExtras/fake_libgcc.asm # Turn off the building of exception handling libraries. LIB2ADDEH = -LIB2ADDEHDEP = # Turn off ranlib on target libraries. RANLIB_FOR_TARGET = cat diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index b1fe2eb05b5..82971ae0e32 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -381,10 +381,6 @@ extern int darwin_emit_branch_islands; #include <stdbool.h> #endif -#if !defined(__LP64__) && !defined(DARWIN_LIBSYSTEM_HAS_UNWIND) -#define MD_UNWIND_SUPPORT "config/rs6000/darwin-unwind.h" -#endif - /* True, iff we're generating fast turn around debugging code. When true, we arrange for function prologues to start with 5 nops so that gdb may insert code to redirect them, and for data to be diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h index 305b621e7e2..336727428bc 100644 --- a/gcc/config/rs6000/linux.h +++ b/gcc/config/rs6000/linux.h @@ -113,8 +113,6 @@ #define TARGET_POSIX_IO -#define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" - #ifdef TARGET_LIBC_PROVIDES_SSP /* ppc32 glibc provides __stack_chk_guard in -0x7008(2). */ #define TARGET_THREAD_SSP_OFFSET -0x7008 diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index 5a26d120a46..972f353061a 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -539,8 +539,6 @@ extern int dot_symbols; #define USE_LD_AS_NEEDED 1 #endif -#define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" - #ifdef TARGET_LIBC_PROVIDES_SSP /* ppc32 glibc provides __stack_chk_guard in -0x7008(2), ppc64 glibc provides it at -0x7010(13). */ diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index d6a12fdbe09..a21d85db7bb 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -189,6 +189,8 @@ enum reg_class rs6000_regno_regclass[FIRST_PSEUDO_REGISTER]; /* Reload functions based on the type and the vector unit. */ static enum insn_code rs6000_vector_reload[NUM_MACHINE_MODES][2]; +static int dbg_cost_ctrl; + /* Built in types. */ tree rs6000_builtin_types[RS6000_BTI_MAX]; tree rs6000_builtin_decls[RS6000_BUILTIN_COUNT]; @@ -26428,27 +26430,32 @@ rs6000_register_move_cost (enum machine_mode mode, { int ret; + if (TARGET_DEBUG_COST) + dbg_cost_ctrl++; + /* Moves from/to GENERAL_REGS. */ if (reg_classes_intersect_p (to, GENERAL_REGS) || reg_classes_intersect_p (from, GENERAL_REGS)) { + reg_class_t rclass = from; + if (! reg_classes_intersect_p (to, GENERAL_REGS)) - from = to; + rclass = to; - if (from == FLOAT_REGS || from == ALTIVEC_REGS || from == VSX_REGS) - ret = (rs6000_memory_move_cost (mode, from, false) + if (rclass == FLOAT_REGS || rclass == ALTIVEC_REGS || rclass == VSX_REGS) + ret = (rs6000_memory_move_cost (mode, rclass, false) + rs6000_memory_move_cost (mode, GENERAL_REGS, false)); /* It's more expensive to move CR_REGS than CR0_REGS because of the shift. */ - else if (from == CR_REGS) + else if (rclass == CR_REGS) ret = 4; /* For those processors that have slow LR/CTR moves, make them more expensive than memory in order to bias spills to memory .*/ else if ((rs6000_cpu == PROCESSOR_POWER6 || rs6000_cpu == PROCESSOR_POWER7) - && reg_classes_intersect_p (from, LINK_OR_CTR_REGS)) + && reg_classes_intersect_p (rclass, LINK_OR_CTR_REGS)) ret = 6 * hard_regno_nregs[0][mode]; else @@ -26472,10 +26479,14 @@ rs6000_register_move_cost (enum machine_mode mode, + rs6000_register_move_cost (mode, from, GENERAL_REGS)); if (TARGET_DEBUG_COST) - fprintf (stderr, - "rs6000_register_move_cost:, ret=%d, mode=%s, from=%s, to=%s\n", - ret, GET_MODE_NAME (mode), reg_class_names[from], - reg_class_names[to]); + { + if (dbg_cost_ctrl == 1) + fprintf (stderr, + "rs6000_register_move_cost:, ret=%d, mode=%s, from=%s, to=%s\n", + ret, GET_MODE_NAME (mode), reg_class_names[from], + reg_class_names[to]); + dbg_cost_ctrl--; + } return ret; } @@ -26489,6 +26500,9 @@ rs6000_memory_move_cost (enum machine_mode mode, reg_class_t rclass, { int ret; + if (TARGET_DEBUG_COST) + dbg_cost_ctrl++; + if (reg_classes_intersect_p (rclass, GENERAL_REGS)) ret = 4 * hard_regno_nregs[0][mode]; else if (reg_classes_intersect_p (rclass, FLOAT_REGS)) @@ -26499,9 +26513,13 @@ rs6000_memory_move_cost (enum machine_mode mode, reg_class_t rclass, ret = 4 + rs6000_register_move_cost (mode, rclass, GENERAL_REGS); if (TARGET_DEBUG_COST) - fprintf (stderr, - "rs6000_memory_move_cost: ret=%d, mode=%s, rclass=%s, in=%d\n", - ret, GET_MODE_NAME (mode), reg_class_names[rclass], in); + { + if (dbg_cost_ctrl == 1) + fprintf (stderr, + "rs6000_memory_move_cost: ret=%d, mode=%s, rclass=%s, in=%d\n", + ret, GET_MODE_NAME (mode), reg_class_names[rclass], in); + dbg_cost_ctrl--; + } return ret; } diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 646d9d3b7aa..2c21fb7ea47 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -1224,7 +1224,7 @@ enum reg_class { 0xffffffff, 0x00000000, 0x0000000f, 0x00022000 }, /* SPEC_OR_GEN_REGS */ \ { 0x00000000, 0x00000000, 0x00000010, 0x00000000 }, /* CR0_REGS */ \ { 0x00000000, 0x00000000, 0x00000ff0, 0x00000000 }, /* CR_REGS */ \ - { 0xffffffff, 0x00000000, 0x0000efff, 0x00020000 }, /* NON_FLOAT_REGS */ \ + { 0xffffffff, 0x00000000, 0x00000fff, 0x00020000 }, /* NON_FLOAT_REGS */ \ { 0x00000000, 0x00000000, 0x00001000, 0x00000000 }, /* CA_REGS */ \ { 0xffffffff, 0xffffffff, 0xffffffff, 0x0003ffff } /* ALL_REGS */ \ } diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h index 7bd90d9d3ac..e5385eca313 100644 --- a/gcc/config/s390/linux.h +++ b/gcc/config/s390/linux.h @@ -79,8 +79,6 @@ along with GCC; see the file COPYING3. If not see #define TARGET_ASM_FILE_END file_end_indicate_exec_stack -#define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h" - #ifdef TARGET_LIBC_PROVIDES_SSP /* s390 glibc provides __stack_chk_guard in 0x14(tp), s390x glibc provides it at 0x28(tp). */ diff --git a/gcc/config/s390/tpf.h b/gcc/config/s390/tpf.h index c5e86e4a17a..e4a1b50b6ec 100644 --- a/gcc/config/s390/tpf.h +++ b/gcc/config/s390/tpf.h @@ -118,8 +118,6 @@ along with GCC; see the file COPYING3. If not see %{!shared:-shared} \ %(entry_spec)" -#define MD_UNWIND_SUPPORT "config/s390/tpf-unwind.h" - /* IBM copies these libraries over with these names. */ #define MATH_LIBRARY "CLBM" #define LIBSTDCXX "CPP1" diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h index fc954fe9863..edfd99be652 100644 --- a/gcc/config/sh/linux.h +++ b/gcc/config/sh/linux.h @@ -114,8 +114,6 @@ along with GCC; see the file COPYING3. If not see } \ } while (0) -#define MD_UNWIND_SUPPORT "config/sh/linux-unwind.h" - /* For SH3 and SH4, we use a slot of the unwind frame which correspond to a fake register number 16 as a placeholder for the return address in MD_FALLBACK_FRAME_STATE_FOR and its content will be read with diff --git a/gcc/config/sh/predicates.md b/gcc/config/sh/predicates.md index b6508b70d68..20354588d99 100644 --- a/gcc/config/sh/predicates.md +++ b/gcc/config/sh/predicates.md @@ -394,6 +394,18 @@ return 0; } + if ((mode == QImode || mode == HImode) + && (MEM_P (op) + || (GET_CODE (op) == SUBREG && MEM_P (SUBREG_REG (op))))) + { + rtx x = XEXP ((MEM_P (op) ? op : SUBREG_REG (op)), 0); + + if (GET_CODE (x) == PLUS + && REG_P (XEXP (x, 0)) + && CONST_INT_P (XEXP (x, 1))) + return sh_legitimate_index_p (mode, XEXP (x, 1)); + } + if (TARGET_SHMEDIA && (GET_CODE (op) == PARALLEL || GET_CODE (op) == CONST_VECTOR) && sh_rep_vec (op, mode)) @@ -419,6 +431,18 @@ && ! (high_life_started || reload_completed)) return 0; + if ((mode == QImode || mode == HImode) + && (MEM_P (op) + || (GET_CODE (op) == SUBREG && MEM_P (SUBREG_REG (op))))) + { + rtx x = XEXP ((MEM_P (op) ? op : SUBREG_REG (op)), 0); + + if (GET_CODE (x) == PLUS + && REG_P (XEXP (x, 0)) + && CONST_INT_P (XEXP (x, 1))) + return sh_legitimate_index_p (mode, XEXP (x, 1)); + } + return general_operand (op, mode); }) diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index fb204c648e9..c5fbd569602 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -2199,6 +2199,13 @@ expand_cbranchdi4 (rtx *operands, enum rtx_code comparison) { operands[1] = op1h; operands[2] = op2h; + if (reload_completed + && ! arith_reg_or_0_operand (op2h, SImode) + && (true_regnum (op1h) || (comparison != EQ && comparison != NE))) + { + emit_move_insn (scratch, operands[2]); + operands[2] = scratch; + } } operands[3] = skip_label = gen_label_rtx (); diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h index cf7574830f0..3d539d7ec5b 100644 --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -141,7 +141,9 @@ along with GCC; see the file COPYING3. If not see %{p|pg:-ldl} -lc}" #undef ENDFILE_SPEC -#define ENDFILE_SPEC "crtend.o%s crtn.o%s" +#define ENDFILE_SPEC \ + "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ + crtend.o%s crtn.o%s" /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us. */ #undef STARTFILE_SPEC diff --git a/gcc/config/sparc/gmon-sol2.c b/gcc/config/sparc/gmon-sol2.c deleted file mode 100644 index 452d98d7d94..00000000000 --- a/gcc/config/sparc/gmon-sol2.c +++ /dev/null @@ -1,420 +0,0 @@ -/*- - * Copyright (c) 1991 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. [rescinded 22 July 1999] - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/* Mangled into a form that works on SPARC Solaris 2 by Mark Eichin - * for Cygnus Support, July 1992. - */ - -#include "tconfig.h" -#include "tsystem.h" -#include <fcntl.h> /* for creat() */ - -#if 0 -#include "sparc/gmon.h" -#else -struct phdr { - char *lpc; - char *hpc; - int ncnt; -}; -#define HISTFRACTION 2 -#define HISTCOUNTER unsigned short -#define HASHFRACTION 1 -#define ARCDENSITY 2 -#define MINARCS 50 -struct tostruct { - char *selfpc; - long count; - unsigned short link; -}; -struct rawarc { - unsigned long raw_frompc; - unsigned long raw_selfpc; - long raw_count; -}; -#define ROUNDDOWN(x,y) (((x)/(y))*(y)) -#define ROUNDUP(x,y) ((((x)+(y)-1)/(y))*(y)) - -#endif - -/* extern mcount() asm ("mcount"); */ -/*extern*/ char *minbrk /* asm ("minbrk") */; - - /* - * froms is actually a bunch of unsigned shorts indexing tos - */ -static int profiling = 3; -static unsigned short *froms; -static struct tostruct *tos = 0; -static long tolimit = 0; -static char *s_lowpc = 0; -static char *s_highpc = 0; -static unsigned long s_textsize = 0; - -static int ssiz; -static char *sbuf; -static int s_scale; - /* see profil(2) where this is describe (incorrectly) */ -#define SCALE_1_TO_1 0x10000L - -#define MSG "No space for profiling buffer(s)\n" - -static void moncontrol (int); -extern void monstartup (char *, char *); -extern void _mcleanup (void); - -void monstartup(char *lowpc, char *highpc) -{ - int monsize; - char *buffer; - register int o; - - /* - * round lowpc and highpc to multiples of the density we're using - * so the rest of the scaling (here and in gprof) stays in ints. - */ - lowpc = (char *) - ROUNDDOWN((unsigned long)lowpc, HISTFRACTION*sizeof(HISTCOUNTER)); - s_lowpc = lowpc; - highpc = (char *) - ROUNDUP((unsigned long)highpc, HISTFRACTION*sizeof(HISTCOUNTER)); - s_highpc = highpc; - s_textsize = highpc - lowpc; - monsize = (s_textsize / HISTFRACTION) + sizeof(struct phdr); - buffer = sbrk( monsize ); - if ( buffer == (char *) -1 ) { - write( 2 , MSG , sizeof(MSG) ); - return; - } - froms = (unsigned short *) sbrk( s_textsize / HASHFRACTION ); - if ( froms == (unsigned short *) -1 ) { - write( 2 , MSG , sizeof(MSG) ); - froms = 0; - return; - } - tolimit = s_textsize * ARCDENSITY / 100; - if ( tolimit < MINARCS ) { - tolimit = MINARCS; - } else if ( tolimit > 65534 ) { - tolimit = 65534; - } - tos = (struct tostruct *) sbrk( tolimit * sizeof( struct tostruct ) ); - if ( tos == (struct tostruct *) -1 ) { - write( 2 , MSG , sizeof(MSG) ); - froms = 0; - tos = 0; - return; - } - minbrk = sbrk(0); - tos[0].link = 0; - sbuf = buffer; - ssiz = monsize; - ( (struct phdr *) buffer ) -> lpc = lowpc; - ( (struct phdr *) buffer ) -> hpc = highpc; - ( (struct phdr *) buffer ) -> ncnt = ssiz; - monsize -= sizeof(struct phdr); - if ( monsize <= 0 ) - return; - o = highpc - lowpc; - if( monsize < o ) -#ifndef hp300 - s_scale = ( (float) monsize / o ) * SCALE_1_TO_1; -#else /* avoid floating point */ - { - int quot = o / monsize; - - if (quot >= 0x10000) - s_scale = 1; - else if (quot >= 0x100) - s_scale = 0x10000 / quot; - else if (o >= 0x800000) - s_scale = 0x1000000 / (o / (monsize >> 8)); - else - s_scale = 0x1000000 / ((o << 8) / monsize); - } -#endif - else - s_scale = SCALE_1_TO_1; - moncontrol(1); -} - -void -_mcleanup(void) -{ - int fd; - int fromindex; - int endfrom; - char *frompc; - int toindex; - struct rawarc rawarc; - char *profdir; - const char *proffile; - char *progname; - char buf[PATH_MAX]; - extern char **___Argv; - - moncontrol(0); - - if ((profdir = getenv("PROFDIR")) != NULL) { - /* If PROFDIR contains a null value, no profiling output is produced */ - if (*profdir == '\0') { - return; - } - - progname=strrchr(___Argv[0], '/'); - if (progname == NULL) - progname=___Argv[0]; - else - progname++; - - sprintf(buf, "%s/%ld.%s", profdir, (long) getpid(), progname); - proffile = buf; - } else { - proffile = "gmon.out"; - } - - fd = creat( proffile, 0666 ); - if ( fd < 0 ) { - perror( proffile ); - return; - } -# ifdef DEBUG - fprintf( stderr , "[mcleanup] sbuf 0x%x ssiz %d\n" , sbuf , ssiz ); -# endif /* DEBUG */ - write( fd , sbuf , ssiz ); - endfrom = s_textsize / (HASHFRACTION * sizeof(*froms)); - for ( fromindex = 0 ; fromindex < endfrom ; fromindex++ ) { - if ( froms[fromindex] == 0 ) { - continue; - } - frompc = s_lowpc + (fromindex * HASHFRACTION * sizeof(*froms)); - for (toindex=froms[fromindex]; toindex!=0; toindex=tos[toindex].link) { -# ifdef DEBUG - fprintf( stderr , - "[mcleanup] frompc 0x%x selfpc 0x%x count %d\n" , - frompc , tos[toindex].selfpc , tos[toindex].count ); -# endif /* DEBUG */ - rawarc.raw_frompc = (unsigned long) frompc; - rawarc.raw_selfpc = (unsigned long) tos[toindex].selfpc; - rawarc.raw_count = tos[toindex].count; - write( fd , &rawarc , sizeof rawarc ); - } - } - close( fd ); -} - -/* - * The SPARC stack frame is only held together by the frame pointers - * in the register windows. According to the SVR4 SPARC ABI - * Supplement, Low Level System Information/Operating System - * Interface/Software Trap Types, a type 3 trap will flush all of the - * register windows to the stack, which will make it possible to walk - * the frames and find the return addresses. - * However, it seems awfully expensive to incur a trap (system - * call) for every function call. It turns out that "call" simply puts - * the return address in %o7 expecting the "save" in the procedure to - * shift it into %i7; this means that before the "save" occurs, %o7 - * contains the address of the call to mcount, and %i7 still contains - * the caller above that. The asm mcount here simply saves those - * registers in argument registers and branches to internal_mcount, - * simulating a call with arguments. - * Kludges: - * 1) the branch to internal_mcount is hard coded; it should be - * possible to tell asm to use the assembler-name of a symbol. - * 2) in theory, the function calling mcount could have saved %i7 - * somewhere and reused the register; in practice, I *think* this will - * break longjmp (and maybe the debugger) but I'm not certain. (I take - * some comfort in the knowledge that it will break the native mcount - * as well.) - * 3) if builtin_return_address worked, this could be portable. - * However, it would really have to be optimized for arguments of 0 - * and 1 and do something like what we have here in order to avoid the - * trap per function call performance hit. - * 4) the atexit and monsetup calls prevent this from simply - * being a leaf routine that doesn't do a "save" (and would thus have - * access to %o7 and %i7 directly) but the call to write() at the end - * would have also prevented this. - * - * -- [eichin:19920702.1107EST] - */ - -static void internal_mcount (char *, unsigned short *) __attribute__ ((used)); - -/* i7 == last ret, -> frompcindex */ -/* o7 == current ret, -> selfpc */ -/* Solaris 2 libraries use _mcount. */ -asm(".global _mcount; _mcount: mov %i7,%o1; mov %o7,%o0;b,a internal_mcount"); -/* This is for compatibility with old versions of gcc which used mcount. */ -asm(".global mcount; mcount: mov %i7,%o1; mov %o7,%o0;b,a internal_mcount"); - -static void internal_mcount(char *selfpc, unsigned short *frompcindex) -{ - register struct tostruct *top; - register struct tostruct *prevtop; - register long toindex; - static char already_setup; - - /* - * find the return address for mcount, - * and the return address for mcount's caller. - */ - - if(!already_setup) { - extern char etext[]; - extern char _start[]; - extern char _init[]; - already_setup = 1; - monstartup(_start < _init ? _start : _init, etext); -#ifdef USE_ONEXIT - on_exit(_mcleanup, 0); -#else - atexit(_mcleanup); -#endif - } - /* - * check that we are profiling - * and that we aren't recursively invoked. - */ - if (profiling) { - goto out; - } - profiling++; - /* - * check that frompcindex is a reasonable pc value. - * for example: signal catchers get called from the stack, - * not from text space. too bad. - */ - frompcindex = (unsigned short *)((long)frompcindex - (long)s_lowpc); - if ((unsigned long)frompcindex > s_textsize) { - goto done; - } - frompcindex = - &froms[((long)frompcindex) / (HASHFRACTION * sizeof(*froms))]; - toindex = *frompcindex; - if (toindex == 0) { - /* - * first time traversing this arc - */ - toindex = ++tos[0].link; - if (toindex >= tolimit) { - goto overflow; - } - *frompcindex = toindex; - top = &tos[toindex]; - top->selfpc = selfpc; - top->count = 1; - top->link = 0; - goto done; - } - top = &tos[toindex]; - if (top->selfpc == selfpc) { - /* - * arc at front of chain; usual case. - */ - top->count++; - goto done; - } - /* - * have to go looking down chain for it. - * top points to what we are looking at, - * prevtop points to previous top. - * we know it is not at the head of the chain. - */ - for (; /* goto done */; ) { - if (top->link == 0) { - /* - * top is end of the chain and none of the chain - * had top->selfpc == selfpc. - * so we allocate a new tostruct - * and link it to the head of the chain. - */ - toindex = ++tos[0].link; - if (toindex >= tolimit) { - goto overflow; - } - top = &tos[toindex]; - top->selfpc = selfpc; - top->count = 1; - top->link = *frompcindex; - *frompcindex = toindex; - goto done; - } - /* - * otherwise, check the next arc on the chain. - */ - prevtop = top; - top = &tos[top->link]; - if (top->selfpc == selfpc) { - /* - * there it is. - * increment its count - * move it to the head of the chain. - */ - top->count++; - toindex = prevtop->link; - prevtop->link = top->link; - top->link = *frompcindex; - *frompcindex = toindex; - goto done; - } - - } -done: - profiling--; - /* and fall through */ -out: - return; /* normal return restores saved registers */ - -overflow: - profiling++; /* halt further profiling */ -# define TOLIMIT "mcount: tos overflow\n" - write(2, TOLIMIT, sizeof(TOLIMIT)); - goto out; -} - -/* - * Control profiling - * profiling is what mcount checks to see if - * all the data structures are ready. - */ -static void moncontrol(int mode) -{ - if (mode) { - /* start */ - profil((unsigned short *)(sbuf + sizeof(struct phdr)), - ssiz - sizeof(struct phdr), - (long)s_lowpc, s_scale); - profiling = 0; - } else { - /* stop */ - profil((unsigned short *)0, 0, 0, 0); - profiling = 3; - } -} diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index f8e16dd6926..a9b630e6184 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -141,8 +141,6 @@ do { \ /* Static stack checking is supported by means of probes. */ #define STACK_CHECK_STATIC_BUILTIN 1 -#define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h" - /* Linux currently uses RMO in uniprocessor mode, which is equivalent to TMO, and TMO in multiprocessor mode. But they reserve the right to change their minds. */ diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index 27ff696f0f2..7f8b37891cf 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -261,8 +261,6 @@ do { \ /* Static stack checking is supported by means of probes. */ #define STACK_CHECK_STATIC_BUILTIN 1 -#define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h" - /* Linux currently uses RMO in uniprocessor mode, which is equivalent to TMO, and TMO in multiprocessor mode. But they reserve the right to change their minds. */ diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h index a53b82a8e95..c99b02f8fe3 100644 --- a/gcc/config/sparc/sol2.h +++ b/gcc/config/sparc/sol2.h @@ -117,11 +117,6 @@ along with GCC; see the file COPYING3. If not see #define NO_DBX_BNSYM_ENSYM 1 -#undef ENDFILE_SPEC -#define ENDFILE_SPEC \ - "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ - crtend.o%s crtn.o%s" - /* Select a format to encode pointers in exception handling data. CODE is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is true if the symbol may be affected by dynamic relocations. @@ -201,5 +196,3 @@ along with GCC; see the file COPYING3. If not see /* Static stack checking is supported by means of probes. */ #define STACK_CHECK_STATIC_BUILTIN 1 - -#define MD_UNWIND_SUPPORT "config/sparc/sol2-unwind.h" diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h index c1bbab7e5b6..ccf16573cb4 100644 --- a/gcc/config/sparc/sparc-protos.h +++ b/gcc/config/sparc/sparc-protos.h @@ -60,6 +60,7 @@ extern bool constant_address_p (rtx); extern bool legitimate_pic_operand_p (rtx); extern rtx sparc_legitimize_reload_address (rtx, enum machine_mode, int, int, int, int *win); +extern void load_got_register (void); extern void sparc_emit_call_insn (rtx, rtx); extern void sparc_defer_case_vector (rtx, rtx, int); extern bool sparc_expand_move (enum machine_mode, rtx *); diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index d65ced03d2d..d5d043def0f 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -387,7 +387,6 @@ static rtx sparc_builtin_saveregs (void); static int epilogue_renumber (rtx *, int); static bool sparc_assemble_integer (rtx, unsigned int, int); static int set_extends (rtx); -static void load_got_register (void); static int save_or_restore_regs (int, int, rtx, int, int); static void emit_save_or_restore_regs (int); static void sparc_asm_function_prologue (FILE *, HOST_WIDE_INT); @@ -464,6 +463,7 @@ static void sparc_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; static void sparc_file_end (void); static bool sparc_frame_pointer_required (void); static bool sparc_can_eliminate (const int, const int); +static rtx sparc_builtin_setjmp_frame_value (void); static void sparc_conditional_register_usage (void); #ifdef TARGET_ALTERNATE_LONG_DOUBLE_MANGLING static const char *sparc_mangle_type (const_tree); @@ -650,8 +650,12 @@ static const struct default_options sparc_option_optimization_table[] = #undef TARGET_FRAME_POINTER_REQUIRED #define TARGET_FRAME_POINTER_REQUIRED sparc_frame_pointer_required +#undef TARGET_BUILTIN_SETJMP_FRAME_VALUE +#define TARGET_BUILTIN_SETJMP_FRAME_VALUE sparc_builtin_setjmp_frame_value + #undef TARGET_CAN_ELIMINATE #define TARGET_CAN_ELIMINATE sparc_can_eliminate + #undef TARGET_PREFERRED_RELOAD_CLASS #define TARGET_PREFERRED_RELOAD_CLASS sparc_preferred_reload_class @@ -3770,7 +3774,7 @@ gen_load_pcrel_sym (rtx op0, rtx op1, rtx op2, rtx op3) /* Emit code to load the GOT register. */ -static void +void load_got_register (void) { /* In PIC mode, this will retrieve pic_offset_table_rtx. */ @@ -9801,7 +9805,7 @@ sparc_expand_compare_and_swap_12 (rtx result, rtx mem, rtx oldval, rtx newval) /* Implement TARGET_FRAME_POINTER_REQUIRED. */ -bool +static bool sparc_frame_pointer_required (void) { return !(current_function_is_leaf && only_leaf_regs_used ()); @@ -9812,11 +9816,18 @@ sparc_frame_pointer_required (void) in that case. But the test in update_eliminables doesn't know we are assuming below that we only do the former elimination. */ -bool +static bool sparc_can_eliminate (const int from ATTRIBUTE_UNUSED, const int to) { - return (to == HARD_FRAME_POINTER_REGNUM - || !targetm.frame_pointer_required ()); + return to == HARD_FRAME_POINTER_REGNUM || !sparc_frame_pointer_required (); +} + +/* Return the hard frame pointer directly to bypass the stack bias. */ + +static rtx +sparc_builtin_setjmp_frame_value (void) +{ + return hard_frame_pointer_rtx; } /* If !TARGET_FPU, then make the fp registers and fp cc regs fixed so that diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index ad354e89eca..4f9ef3a5d4c 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -1384,11 +1384,19 @@ do { \ #define EPILOGUE_USES(REGNO) ((REGNO) == 31 \ || (crtl->calls_eh_return && (REGNO) == 1)) +/* We need 2 words, so we can save the stack pointer and the return register + of the function containing a non-local goto target. */ + +#define STACK_SAVEAREA_MODE(LEVEL) \ + ((LEVEL) == SAVE_NONLOCAL ? (TARGET_ARCH64 ? TImode : DImode) : Pmode) + /* Length in units of the trampoline for entering a nested function. */ #define TRAMPOLINE_SIZE (TARGET_ARCH64 ? 32 : 16) -#define TRAMPOLINE_ALIGNMENT 128 /* 16 bytes */ +/* Alignment required for trampolines, in bits. */ + +#define TRAMPOLINE_ALIGNMENT 128 /* Generate RTL to flush the register windows so as to make arbitrary frames available. */ @@ -1631,9 +1639,6 @@ do { \ but a CALL with constant address is cheap. */ #define NO_FUNCTION_CSE -/* alloca should avoid clobbering the old register save area. */ -#define SETJMP_VIA_SAVE_AREA - /* The _Q_* comparison libcalls return booleans. */ #define FLOAT_LIB_COMPARE_RETURNS_BOOL(MODE, COMPARISON) ((MODE) == TFmode) diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md index 5e16179a62b..e6342eca5e9 100644 --- a/gcc/config/sparc/sparc.md +++ b/gcc/config/sparc/sparc.md @@ -1,7 +1,7 @@ ;; Machine description for SPARC chip for GCC ;; Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, -;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 -;; Free Software Foundation, Inc. +;; 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +;; 2011 Free Software Foundation, Inc. ;; Contributed by Michael Tiemann (tiemann@cygnus.com) ;; 64-bit SPARC-V9 support by Michael Tiemann, Jim Wilson, and Doug Evans, ;; at Cygnus Support. @@ -70,7 +70,6 @@ (UNSPECV_FLUSHW 1) (UNSPECV_GOTO 2) (UNSPECV_FLUSH 4) - (UNSPECV_SETJMP 5) (UNSPECV_SAVEW 6) (UNSPECV_CAS 8) (UNSPECV_SWAP 9) @@ -6444,136 +6443,100 @@ "jmp\t%a0%#" [(set_attr "type" "uncond_branch")]) +(define_expand "save_stack_nonlocal" + [(set (match_operand 0 "memory_operand" "") + (match_operand 1 "register_operand" "")) + (set (match_dup 2) (match_dup 3))] + "" +{ + operands[0] = adjust_address_nv (operands[0], Pmode, 0); + operands[2] = adjust_address_nv (operands[0], Pmode, GET_MODE_SIZE (Pmode)); + operands[3] = gen_rtx_REG (Pmode, 31); /* %i7 */ +}) + +(define_expand "restore_stack_nonlocal" + [(set (match_operand 0 "register_operand" "") + (match_operand 1 "memory_operand" ""))] + "" +{ + operands[1] = adjust_address_nv (operands[1], Pmode, 0); +}) + (define_expand "nonlocal_goto" - [(match_operand:SI 0 "general_operand" "") - (match_operand:SI 1 "general_operand" "") - (match_operand:SI 2 "general_operand" "") - (match_operand:SI 3 "" "")] + [(match_operand 0 "general_operand" "") + (match_operand 1 "general_operand" "") + (match_operand 2 "memory_operand" "") + (match_operand 3 "memory_operand" "")] "" { - rtx lab = operands[1]; - rtx stack = operands[2]; - rtx fp = operands[3]; - rtx labreg; + rtx r_label = copy_to_reg (operands[1]); + rtx r_sp = adjust_address_nv (operands[2], Pmode, 0); + rtx r_fp = operands[3]; + rtx r_i7 = adjust_address_nv (operands[2], Pmode, GET_MODE_SIZE (Pmode)); - /* Trap instruction to flush all the register windows. */ + /* We need to flush all the register windows so that their contents will + be re-synchronized by the restore insn of the target function. */ emit_insn (gen_flush_register_windows ()); - /* Load the fp value for the containing fn into %fp. This is needed - because STACK refers to %fp. Note that virtual register instantiation - fails if the virtual %fp isn't set from a register. */ - if (GET_CODE (fp) != REG) - fp = force_reg (Pmode, fp); - emit_move_insn (virtual_stack_vars_rtx, fp); - - /* Find the containing function's current nonlocal goto handler, - which will do any cleanups and then jump to the label. */ - labreg = gen_rtx_REG (Pmode, 8); - emit_move_insn (labreg, lab); + emit_clobber (gen_rtx_MEM (BLKmode, gen_rtx_SCRATCH (VOIDmode))); + emit_clobber (gen_rtx_MEM (BLKmode, hard_frame_pointer_rtx)); - /* Restore %fp from stack pointer value for containing function. - The restore insn that follows will move this to %sp, - and reload the appropriate value into %fp. */ - emit_move_insn (hard_frame_pointer_rtx, stack); + /* Restore frame pointer for containing function. */ + emit_move_insn (hard_frame_pointer_rtx, r_fp); + emit_stack_restore (SAVE_NONLOCAL, r_sp); + /* USE of hard_frame_pointer_rtx added for consistency; + not clear if really needed. */ + emit_use (hard_frame_pointer_rtx); emit_use (stack_pointer_rtx); - /* ??? The V9-specific version was disabled in rev 1.65. */ - emit_jump_insn (gen_goto_handler_and_restore (labreg)); + /* We need to smuggle the load of %i7 as it is a fixed register. */ + emit_jump_insn (gen_nonlocal_goto_internal (r_label, r_i7)); emit_barrier (); DONE; }) -;; Special trap insn to flush register windows. -(define_insn "flush_register_windows" - [(unspec_volatile [(const_int 0)] UNSPECV_FLUSHW)] - "" - { return TARGET_V9 ? "flushw" : "ta\t3"; } - [(set_attr "type" "flushw")]) - -(define_insn "goto_handler_and_restore" - [(unspec_volatile [(match_operand 0 "register_operand" "=r")] UNSPECV_GOTO)] - "GET_MODE (operands[0]) == Pmode" +(define_insn "nonlocal_goto_internal" + [(unspec_volatile [(match_operand 0 "register_operand" "r") + (match_operand 1 "memory_operand" "m")] UNSPECV_GOTO)] + "GET_MODE (operands[0]) == Pmode && GET_MODE (operands[1]) == Pmode" { if (flag_delayed_branch) - return "jmp\t%0\n\t restore"; + { + if (TARGET_ARCH64) + return "jmp\t%0\n\t ldx\t%1, %%i7"; + else + return "jmp\t%0\n\t ld\t%1, %%i7"; + } else - return "mov\t%0,%%g1\n\trestore\n\tjmp\t%%g1\n\t nop"; + { + if (TARGET_ARCH64) + return "ldx\t%1, %%i7\n\tjmp\t%0\n\t nop"; + else + return "ld\t%1, %%i7\n\tjmp\t%0\n\t nop"; + } } [(set (attr "type") (const_string "multi")) (set (attr "length") (if_then_else (eq_attr "delayed_branch" "true") (const_int 2) - (const_int 4)))]) + (const_int 3)))]) -;; For __builtin_setjmp we need to flush register windows iff the function -;; calls alloca as well, because otherwise the current register window might -;; be saved after the %sp adjustment and thus setjmp would crash. -(define_expand "builtin_setjmp_setup" - [(match_operand 0 "register_operand" "r")] - "" +(define_expand "builtin_setjmp_receiver" + [(label_ref (match_operand 0 "" ""))] + "flag_pic" { - emit_insn (gen_do_builtin_setjmp_setup ()); + load_got_register (); DONE; }) -(define_insn "do_builtin_setjmp_setup" - [(unspec_volatile [(const_int 0)] UNSPECV_SETJMP)] - "" -{ - if (!cfun->calls_alloca) - return ""; - if (!TARGET_V9) - return "ta\t3"; - fputs ("\tflushw\n", asm_out_file); - if (flag_pic) - fprintf (asm_out_file, "\tst%c\t%%l7, [%%sp+%d]\n", - TARGET_ARCH64 ? 'x' : 'w', - SPARC_STACK_BIAS + 7 * UNITS_PER_WORD); - fprintf (asm_out_file, "\tst%c\t%%fp, [%%sp+%d]\n", - TARGET_ARCH64 ? 'x' : 'w', - SPARC_STACK_BIAS + 14 * UNITS_PER_WORD); - fprintf (asm_out_file, "\tst%c\t%%i7, [%%sp+%d]\n", - TARGET_ARCH64 ? 'x' : 'w', - SPARC_STACK_BIAS + 15 * UNITS_PER_WORD); - return ""; -} - [(set_attr "type" "multi") - (set (attr "length") - (cond [(eq_attr "calls_alloca" "false") - (const_int 0) - (eq_attr "isa" "!v9") - (const_int 1) - (eq_attr "pic" "true") - (const_int 4)] (const_int 3)))]) - -;; Pattern for use after a setjmp to store registers into the save area. +;; Special insn to flush register windows. -(define_expand "setjmp" - [(const_int 0)] +(define_insn "flush_register_windows" + [(unspec_volatile [(const_int 0)] UNSPECV_FLUSHW)] "" -{ - rtx mem; - - if (flag_pic) - { - mem = gen_rtx_MEM (Pmode, - plus_constant (stack_pointer_rtx, - SPARC_STACK_BIAS + 7 * UNITS_PER_WORD)); - emit_insn (gen_rtx_SET (VOIDmode, mem, pic_offset_table_rtx)); - } - - mem = gen_rtx_MEM (Pmode, - plus_constant (stack_pointer_rtx, - SPARC_STACK_BIAS + 14 * UNITS_PER_WORD)); - emit_insn (gen_rtx_SET (VOIDmode, mem, hard_frame_pointer_rtx)); - - mem = gen_rtx_MEM (Pmode, - plus_constant (stack_pointer_rtx, - SPARC_STACK_BIAS + 15 * UNITS_PER_WORD)); - emit_insn (gen_rtx_SET (VOIDmode, mem, gen_rtx_REG (Pmode, 31))); - DONE; -}) + { return TARGET_V9 ? "flushw" : "ta\t3"; } + [(set_attr "type" "flushw")]) ;; Special pattern for the FLUSH instruction. diff --git a/gcc/config/sparc/t-crtin b/gcc/config/sparc/t-crtin deleted file mode 100644 index 2612bac89f6..00000000000 --- a/gcc/config/sparc/t-crtin +++ /dev/null @@ -1,6 +0,0 @@ -EXTRA_PARTS += crti.o crtn.o - -$(T)crti.o: $(srcdir)/config/sparc/sol2-ci.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/sparc/sol2-ci.asm -$(T)crtn.o: $(srcdir)/config/sparc/sol2-cn.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/sparc/sol2-cn.asm diff --git a/gcc/config/sparc/t-sol2 b/gcc/config/sparc/t-sol2 deleted file mode 100644 index b7f665b1b7b..00000000000 --- a/gcc/config/sparc/t-sol2 +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, -# 2002 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 3, 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 COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -# gmon build rule: -$(T)gmon.o: $(srcdir)/config/sparc/gmon-sol2.c $(GCC_PASSES) \ - $(TCONFIG_H) tsystem.h coretypes.h $(TM_H) stmp-int-hdrs - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) \ - -c $(srcdir)/config/sparc/gmon-sol2.c -o $(T)gmon.o - -# Assemble startup files. -$(T)crt1.o: $(srcdir)/config/sparc/sol2-c1.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -o $(T)crt1.o -x assembler-with-cpp $(srcdir)/config/sparc/sol2-c1.asm -$(T)gcrt1.o: $(srcdir)/config/sparc/sol2-c1.asm $(GCC_PASSES) - $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) -c -DGCRT1 -o $(T)gcrt1.o -x assembler-with-cpp $(srcdir)/config/sparc/sol2-c1.asm - -# We need to use -fPIC when we are using gcc to compile the routines in -# crtstuff.c. This is only really needed when we are going to use gcc/g++ -# to produce a shared library, but since we don't know ahead of time when -# we will be doing that, we just always use -fPIC when compiling the -# routines in crtstuff.c. - -CRTSTUFF_T_CFLAGS = -fPIC -TARGET_LIBGCC2_CFLAGS = -fPIC diff --git a/gcc/config/sparc/t-sol2-64 b/gcc/config/sparc/t-sol2-64 index 1802239d3cf..ec7e4eba6fd 100644 --- a/gcc/config/sparc/t-sol2-64 +++ b/gcc/config/sparc/t-sol2-64 @@ -2,6 +2,3 @@ MULTILIB_OPTIONS = m32/m64 MULTILIB_DIRNAMES = sparcv8plus sparcv9 MULTILIB_MATCHES = MULTILIB_OSDIRNAMES = . sparcv9 - -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 51a771563c6..9e62f16414c 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -248,10 +248,6 @@ int spu_tune; inserted in pairs, so we round down. */ int spu_hint_dist = (8*4) - (2*4); -/* Determines whether we run variable tracking in machine dependent - reorganization. */ -static int spu_flag_var_tracking; - enum spu_immediate { SPU_NONE, SPU_IL, @@ -509,6 +505,11 @@ static const struct attribute_spec spu_attribute_table[] = #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK #define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_const_tree_hwi_hwi_const_tree_true +/* Variable tracking should be run after all optimizations which + change order of insns. It also needs a valid CFG. */ +#undef TARGET_DELAY_VARTRACK +#define TARGET_DELAY_VARTRACK true + struct gcc_target targetm = TARGET_INITIALIZER; static void @@ -2696,6 +2697,19 @@ insert_hbrp (void) static int in_spu_reorg; +static void +spu_var_tracking (void) +{ + if (flag_var_tracking) + { + df_analyze (); + timevar_push (TV_VAR_TRACKING); + variable_tracking_main (); + timevar_pop (TV_VAR_TRACKING); + df_finish_pass (false); + } +} + /* Insert branch hints. There are no branch optimizations after this pass, so it's safe to set our branch hints now. */ static void @@ -2715,6 +2729,7 @@ spu_machine_dependent_reorg (void) function might have hinted a call or return. */ insert_hbrp (); pad_bb (); + spu_var_tracking (); return; } @@ -2921,14 +2936,7 @@ spu_machine_dependent_reorg (void) XVECEXP (unspec, 0, 0) = plus_constant (label_ref, offset); } - if (spu_flag_var_tracking) - { - df_analyze (); - timevar_push (TV_VAR_TRACKING); - variable_tracking_main (); - timevar_pop (TV_VAR_TRACKING); - df_finish_pass (false); - } + spu_var_tracking (); free_bb_for_insn (); @@ -7057,19 +7065,6 @@ spu_libgcc_shift_count_mode (void) static void asm_file_start (void) { - /* Variable tracking should be run after all optimizations which - change order of insns. It also needs a valid CFG. Therefore, - *if* we make nontrivial changes in machine-dependent reorg, - run variable tracking after those. However, if we do not run - our machine-dependent reorg pass, we must still run the normal - variable tracking pass (or else we will ICE in final since - debug insns have not been removed). */ - if (TARGET_BRANCH_HINTS && optimize) - { - spu_flag_var_tracking = flag_var_tracking; - flag_var_tracking = 0; - } - default_file_start (); } diff --git a/gcc/config/t-darwin b/gcc/config/t-darwin index 1faafbe89d3..2703e85f35a 100644 --- a/gcc/config/t-darwin +++ b/gcc/config/t-darwin @@ -54,7 +54,6 @@ $(T)crt3$(objext): $(srcdir)/config/darwin-crt3.c $(GCC_PASSES) \ # Use unwind-dw2-fde-darwin LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-darwin.c \ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c -LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c # -pipe because there's an assembler bug, 4077127, which causes # it to not properly process the first # directive, causing temporary diff --git a/gcc/config/t-freebsd b/gcc/config/t-freebsd index 276e2d7a5ad..af2df24f105 100644 --- a/gcc/config/t-freebsd +++ b/gcc/config/t-freebsd @@ -7,4 +7,3 @@ TARGET_LIBGCC2_CFLAGS += -fPIC # Use unwind-dw2-fde-glibc LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c -LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c diff --git a/gcc/config/t-linux b/gcc/config/t-linux index 38b3b58d9f4..039fa27ae82 100644 --- a/gcc/config/t-linux +++ b/gcc/config/t-linux @@ -29,4 +29,3 @@ SHLIB_MAPFILES += $(srcdir)/config/libgcc-glibc.ver # Use unwind-dw2-fde-glibc LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c -LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c diff --git a/gcc/config/t-slibgcc-darwin b/gcc/config/t-slibgcc-darwin deleted file mode 100644 index b957b353296..00000000000 --- a/gcc/config/t-slibgcc-darwin +++ /dev/null @@ -1,2 +0,0 @@ -# To keep DRIVER_DEFINES correct. -SHLIB_LINK = dummy diff --git a/gcc/config/t-slibgcc-dummy b/gcc/config/t-slibgcc-dummy new file mode 100644 index 00000000000..e68ce5eb24a --- /dev/null +++ b/gcc/config/t-slibgcc-dummy @@ -0,0 +1,3 @@ +# SHLIB_LINK must be non-empty so ENABLE_SHARED_LIBGCC is defined correctly +# in DRIVER_DEFINES if libgcc configuration has been moved to toplevel. +SHLIB_LINK = dummy diff --git a/gcc/config/t-slibgcc-sld b/gcc/config/t-slibgcc-sld deleted file mode 100644 index 013a0d70e9e..00000000000 --- a/gcc/config/t-slibgcc-sld +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (C) 2001, 2002, 2003, 2004, 2005 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 3, 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 COPYING3. If not see -# <http://www.gnu.org/licenses/>. - -# Build a shared libgcc library with the Solaris linker. - -SHLIB_EXT = .so -SHLIB_SOLINK = @shlib_base_name@.so -SHLIB_SONAME = @shlib_base_name@.so.1 -SHLIB_MAP = @shlib_map_file@ -SHLIB_OBJS = @shlib_objs@ -SHLIB_DIR = @multilib_dir@ -SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ - -SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ - -Wl,-h,$(SHLIB_SONAME) -Wl,-z,text -Wl,-z,defs \ - -Wl,-M,$(SHLIB_MAP) -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \ - @multilib_flags@ $(SHLIB_OBJS) -lc && \ - rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ - if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \ - mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \ - $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \ - else true; fi && \ - mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \ - $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) -# $(slibdir) double quoted to protect it from expansion while building -# libgcc.mk. We want this delayed until actual install time. -SHLIB_INSTALL = \ - $$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \ - $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \ - $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \ - rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \ - $(LN_S) $(SHLIB_SONAME) \ - $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) -SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk -SHLIB_MAPFILES = $$(libgcc_objdir)/libgcc-std.ver diff --git a/gcc/config/t-sol2 b/gcc/config/t-sol2 index 9e06665a34a..73fd8eb3667 100644 --- a/gcc/config/t-sol2 +++ b/gcc/config/t-sol2 @@ -29,8 +29,10 @@ sol2.o: $(srcdir)/config/sol2.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/sol2.c +# This is required by gcc/ada/gcc-interface/Makefile.in. +TARGET_LIBGCC2_CFLAGS = -fPIC + # Use unwind-dw2-fde-glibc.c. Unless linker support and dl_iterate_phdr # are present, automatically falls back to unwind-dw2-fde.c. LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde-glibc.c \ $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c -LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h index d058d16015d..f5caeb7a603 100644 --- a/gcc/config/xtensa/linux.h +++ b/gcc/config/xtensa/linux.h @@ -64,5 +64,3 @@ along with GCC; see the file COPYING3. If not see #undef DBX_REGISTER_NUMBER -#define MD_UNWIND_SUPPORT "config/xtensa/linux-unwind.h" - diff --git a/gcc/config/xtensa/unwind-dw2-xtensa.c b/gcc/config/xtensa/unwind-dw2-xtensa.c index 9544f65ab78..54daf7637ce 100644 --- a/gcc/config/xtensa/unwind-dw2-xtensa.c +++ b/gcc/config/xtensa/unwind-dw2-xtensa.c @@ -1,6 +1,6 @@ /* DWARF2 exception handling and frame unwinding for Xtensa. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009 + 2007, 2008, 2009, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -208,9 +208,7 @@ _Unwind_GetTextRelBase (struct _Unwind_Context *context) return (_Unwind_Ptr) context->bases.tbase; } -#ifdef MD_UNWIND_SUPPORT -#include MD_UNWIND_SUPPORT -#endif +#include "md-unwind-support.h" /* Extract any interesting information from the CIE for the translation unit F belongs to. Return a pointer to the byte after the augmentation, diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 24aab154f86..2e70bc6d141 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,36 @@ +2011-06-03 Jakub Jelinek <jakub@redhat.com> + + PR c++/49276 + * mangle.c (write_nested_name): Use CP_DECL_CONTEXT instead of + DECL_CONTEXT. + +2011-06-01 Jason Merrill <jason@redhat.com> + + * pt.c (build_non_dependent_expr): Remove special handling of + REFERENCE_REF_P. + + PR c++/44175 + * pt.c (template_args_equal): Handle one arg being NULL_TREE. + (deduction_tsubst_fntype): Handle excessive non-infinite recursion. + + PR c++/49253 + * typeck2.c (build_x_arrow): Don't use build_min_nt. + +2010-05-31 Fabien Chêne <fabien@gcc.gnu.org> + + PR c++/48010 + * name-lookup.c (supplement_binding_1): If the old binding was a + type name, also check that the DECL actually refers to the same + type or is not a type. + +2011-05-31 Jason Merrill <jason@redhat.com> + + PR c++/44870 + * tree.c (lvalue_kind): Recurse on NON_DEPENDENT_EXPR. Handle + ARROW_EXPR, TYPEID_EXPR, and arbitrary class-valued expressions. + (build_min_non_dep): Preserve reference refs. + (build_min_non_dep_call_vec): Likewise + 2011-05-30 Jakub Jelinek <jakub@redhat.com> PR c++/49223 diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index 7ecfefb3b80..134c9ea7f19 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -1,6 +1,6 @@ /* Name mangling for the 3.0 C++ ABI. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, + 2011 Free Software Foundation, Inc. Written by Alex Samuel <samuel@codesourcery.com> This file is part of GCC. @@ -943,7 +943,7 @@ write_nested_name (const tree decl) else { /* No, just use <prefix> */ - write_prefix (DECL_CONTEXT (decl)); + write_prefix (CP_DECL_CONTEXT (decl)); write_unqualified_name (decl); } write_char ('E'); diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 0e762fd6aca..7f0f6153998 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -1,5 +1,5 @@ /* Definitions for C++ name lookup routines. - Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net> @@ -436,7 +436,9 @@ supplement_binding_1 (cxx_binding *binding, tree decl) && DECL_ANTICIPATED (bval) && !DECL_HIDDEN_FRIEND_P (bval))) binding->value = decl; - else if (TREE_CODE (bval) == TYPE_DECL && DECL_ARTIFICIAL (bval)) + else if (TREE_CODE (bval) == TYPE_DECL && DECL_ARTIFICIAL (bval) + && (TREE_CODE (decl) != TYPE_DECL + || same_type_p (TREE_TYPE (decl), TREE_TYPE (bval)))) { /* The old binding was a type name. It was placed in VALUE field because it was thought, at the point it was diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ae3d83da39d..c9557770ccc 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -6476,6 +6476,8 @@ template_args_equal (tree ot, tree nt) { if (nt == ot) return 1; + if (nt == NULL_TREE || ot == NULL_TREE) + return false; if (TREE_CODE (nt) == TREE_VEC) /* For member templates */ @@ -13598,7 +13600,14 @@ static GTY((param_is (spec_entry))) htab_t current_deduction_htab; /* In C++0x, it's possible to have a function template whose type depends on itself recursively. This is most obvious with decltype, but can also occur with enumeration scope (c++/48969). So we need to catch infinite - recursion and reject the substitution at deduction time. + recursion and reject the substitution at deduction time; this function + will return error_mark_node for any repeated substitution. + + This also catches excessive recursion such as when f<N> depends on + f<N-1> across all integers, and returns error_mark_node for all the + substitutions back up to the initial one. + + This is, of course, not reentrant. Use of a VEC here is O(n^2) in the depth of function template argument deduction substitution, but using a hash table creates a lot of constant @@ -13611,6 +13620,8 @@ static GTY((param_is (spec_entry))) htab_t current_deduction_htab; static tree deduction_tsubst_fntype (tree fn, tree targs) { + static bool excessive_deduction_depth; + unsigned i; spec_entry **slot; spec_entry *p; @@ -13656,6 +13667,14 @@ deduction_tsubst_fntype (tree fn, tree targs) /* If we've created a hash table, look there. */ if (current_deduction_htab) { + if (htab_elements (current_deduction_htab) + > (unsigned) max_tinst_depth) + { + /* Trying to recurse across all integers or some such. */ + excessive_deduction_depth = true; + return error_mark_node; + } + hash = hash_specialization (&elt); slot = (spec_entry **) htab_find_slot_with_hash (current_deduction_htab, &elt, hash, INSERT); @@ -13701,6 +13720,13 @@ deduction_tsubst_fntype (tree fn, tree targs) r = error_mark_node; VEC_pop (spec_entry, current_deduction_vec); } + if (excessive_deduction_depth) + { + r = error_mark_node; + if (htab_elements (current_deduction_htab) == 0) + /* Reset once we're all the way out. */ + excessive_deduction_depth = false; + } return r; } @@ -19163,12 +19189,6 @@ build_non_dependent_expr (tree expr) TREE_OPERAND (expr, 0), build_non_dependent_expr (TREE_OPERAND (expr, 1))); - /* Keep dereferences outside the NON_DEPENDENT_EXPR so lvalue_kind - doesn't need to look inside. */ - if (REFERENCE_REF_P (expr)) - return convert_from_reference (build_non_dependent_expr - (TREE_OPERAND (expr, 0))); - /* If the type is unknown, it can't really be non-dependent */ gcc_assert (TREE_TYPE (expr) != unknown_type_node); diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index c93110b9062..11e195ea581 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -139,6 +139,7 @@ lvalue_kind (const_tree ref) && DECL_IN_AGGR_P (ref)) return clk_none; case INDIRECT_REF: + case ARROW_EXPR: case ARRAY_REF: case PARM_DECL: case RESULT_DECL: @@ -170,6 +171,7 @@ lvalue_kind (const_tree ref) break; case MODIFY_EXPR: + case TYPEID_EXPR: return clk_ordinary; case COMPOUND_EXPR: @@ -182,7 +184,9 @@ lvalue_kind (const_tree ref) return (CLASS_TYPE_P (TREE_TYPE (ref)) ? clk_class : clk_none); case CALL_EXPR: - /* Any class-valued call would be wrapped in a TARGET_EXPR. */ + /* We can see calls outside of TARGET_EXPR in templates. */ + if (CLASS_TYPE_P (TREE_TYPE (ref))) + return clk_class; return clk_none; case FUNCTION_DECL: @@ -199,14 +203,16 @@ lvalue_kind (const_tree ref) return lvalue_kind (BASELINK_FUNCTIONS (CONST_CAST_TREE (ref))); case NON_DEPENDENT_EXPR: - /* We must consider NON_DEPENDENT_EXPRs to be lvalues so that - things like "&E" where "E" is an expression with a - non-dependent type work. It is safe to be lenient because an - error will be issued when the template is instantiated if "E" - is not an lvalue. */ - return clk_ordinary; + /* We used to just return clk_ordinary for NON_DEPENDENT_EXPR because + it was safe enough for C++98, but in C++0x lvalues don't bind to + rvalue references, so we get bogus errors (c++/44870). */ + return lvalue_kind (TREE_OPERAND (ref, 0)); default: + if (!TREE_TYPE (ref)) + return clk_none; + if (CLASS_TYPE_P (TREE_TYPE (ref))) + return clk_class; break; } @@ -1985,6 +1991,9 @@ build_min_non_dep (enum tree_code code, tree non_dep, ...) va_start (p, non_dep); + if (REFERENCE_REF_P (non_dep)) + non_dep = TREE_OPERAND (non_dep, 0); + t = make_node (code); length = TREE_CODE_LENGTH (code); TREE_TYPE (t) = TREE_TYPE (non_dep); @@ -2002,7 +2011,7 @@ build_min_non_dep (enum tree_code code, tree non_dep, ...) COMPOUND_EXPR_OVERLOADED (t) = 1; va_end (p); - return t; + return convert_from_reference (t); } /* Similar to `build_nt_call_vec', but for template definitions of @@ -2013,9 +2022,11 @@ tree build_min_non_dep_call_vec (tree non_dep, tree fn, VEC(tree,gc) *argvec) { tree t = build_nt_call_vec (fn, argvec); + if (REFERENCE_REF_P (non_dep)) + non_dep = TREE_OPERAND (non_dep, 0); TREE_TYPE (t) = TREE_TYPE (non_dep); TREE_SIDE_EFFECTS (t) = TREE_SIDE_EFFECTS (non_dep); - return t; + return convert_from_reference (t); } tree diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 031f076863f..4d5c21ad5f3 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -1463,9 +1463,9 @@ build_x_arrow (tree expr) { if (processing_template_decl) { - expr = build_min_non_dep (ARROW_EXPR, last_rval, orig_expr); - /* It will be dereferenced. */ - TREE_TYPE (expr) = TREE_TYPE (TREE_TYPE (last_rval)); + expr = build_min (ARROW_EXPR, TREE_TYPE (TREE_TYPE (last_rval)), + orig_expr); + TREE_SIDE_EFFECTS (expr) = TREE_SIDE_EFFECTS (last_rval); return expr; } diff --git a/gcc/cse.c b/gcc/cse.c index d83b38a60b8..cfa2b00216c 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -1,7 +1,7 @@ /* Common subexpression elimination for GNU compiler. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998 - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, + 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -6192,7 +6192,9 @@ cse_find_path (basic_block first_bb, struct cse_basic_block_data *data, else e = NULL; - if (e && e->dest != EXIT_BLOCK_PTR + if (e + && !((e->flags & EDGE_ABNORMAL_CALL) && cfun->has_nonlocal_label) + && e->dest != EXIT_BLOCK_PTR && single_pred_p (e->dest) /* Avoid visiting basic blocks twice. The large comment above explains why this can happen. */ diff --git a/gcc/cselib.c b/gcc/cselib.c index 56e6d178576..e0697ecfca8 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -257,7 +257,7 @@ promote_debug_loc (struct elt_loc_list *l) { n_debug_values--; l->setting_insn = cselib_current_insn; - gcc_assert (!l->next); + gcc_assert (!l->next || cselib_preserve_constants); } } @@ -1719,6 +1719,12 @@ cselib_subst_to_values (rtx x, enum machine_mode memmode) } return e->val_rtx; + case ENTRY_VALUE: + e = cselib_lookup (x, GET_MODE (x), 0, memmode); + if (! e) + break; + return e->val_rtx; + case CONST_DOUBLE: case CONST_VECTOR: case CONST_INT: @@ -1843,6 +1849,43 @@ cselib_lookup_1 (rtx x, enum machine_mode mode, used_regs[n_used_regs++] = i; REG_VALUES (i) = new_elt_list (REG_VALUES (i), NULL); } + else if (cselib_preserve_constants + && GET_MODE_CLASS (mode) == MODE_INT) + { + /* During var-tracking, try harder to find equivalences + for SUBREGs. If a setter sets say a DImode register + and user uses that register only in SImode, add a lowpart + subreg location. */ + struct elt_list *lwider = NULL; + l = REG_VALUES (i); + if (l && l->elt == NULL) + l = l->next; + for (; l; l = l->next) + if (GET_MODE_CLASS (GET_MODE (l->elt->val_rtx)) == MODE_INT + && GET_MODE_SIZE (GET_MODE (l->elt->val_rtx)) + > GET_MODE_SIZE (mode) + && (lwider == NULL + || GET_MODE_SIZE (GET_MODE (l->elt->val_rtx)) + < GET_MODE_SIZE (GET_MODE (lwider->elt->val_rtx)))) + { + struct elt_loc_list *el; + if (i < FIRST_PSEUDO_REGISTER + && hard_regno_nregs[i][GET_MODE (l->elt->val_rtx)] != 1) + continue; + for (el = l->elt->locs; el; el = el->next) + if (!REG_P (el->loc)) + break; + if (el) + lwider = l; + } + if (lwider) + { + rtx sub = lowpart_subreg (mode, lwider->elt->val_rtx, + GET_MODE (lwider->elt->val_rtx)); + if (sub) + e->locs->next = new_elt_loc_list (e->locs->next, sub); + } + } REG_VALUES (i)->next = new_elt_list (REG_VALUES (i)->next, e); slot = cselib_find_slot (x, e->hash, INSERT, memmode); *slot = e; diff --git a/gcc/dce.c b/gcc/dce.c index f63d09e4164..ec54c6681b8 100644 --- a/gcc/dce.c +++ b/gcc/dce.c @@ -734,7 +734,7 @@ struct rtl_opt_pass pass_ud_rtl_dce = { { RTL_PASS, - "ud dce", /* name */ + "ud_dce", /* name */ gate_ud_dce, /* gate */ rest_of_handle_ud_dce, /* execute */ NULL, /* sub */ @@ -1086,7 +1086,7 @@ struct rtl_opt_pass pass_fast_rtl_dce = { { RTL_PASS, - "rtl dce", /* name */ + "rtl_dce", /* name */ gate_fast_dce, /* gate */ rest_of_handle_fast_dce, /* execute */ NULL, /* sub */ diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 418fa48fcce..7ebcd924b3e 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -771,6 +771,19 @@ the installation directory for G++ header files. The default depends on other configuration options, and differs between cross and native configurations. +@item --with-specs=@var{specs} +Specify additional command line driver SPECS. +This can be useful if you need to turn on a non-standard feature by +default without modifying the compiler's source code, for instance +@option{--with-specs=%@{!fcommon:%@{!fno-common:-fno-common@}@}}. +@ifnothtml +@xref{Spec Files,, Specifying subprocesses and the switches to pass to them, +gcc, Using the GNU Compiler Collection (GCC)}, +@end ifnothtml +@ifhtml +See ``Spec Files'' in the main manual +@end ifhtml + @end table @item --program-prefix=@var{prefix} diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 33a6aed0069..c97016ba7ef 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -8946,6 +8946,16 @@ the function. If the limit is exceeded even without debug insns, var tracking analysis is completely disabled for the function. Setting the parameter to zero makes it unlimited. +@item max-vartrack-expr-depth +Sets a maximum number of recursion levels when attempting to map +variable names or debug temporaries to value expressions. This trades +compile time for more complete debug information. If this is set too +low, value expressions that are available and could be represented in +debug information may end up not being used; setting this higher may +enable the compiler to find more complex debug expressions, but compile +time may grow exponentially, and even then, it may fail to find more +usable expressions. The default is 10. + @item min-nondebug-insn-uid Use uids starting at this parameter for nondebug insns. The range below the parameter is reserved exclusively for debug insns created by @@ -10237,7 +10247,8 @@ assembly code. Permissible names are: @samp{arm2}, @samp{arm250}, @samp{arm1136j-s}, @samp{arm1136jf-s}, @samp{mpcore}, @samp{mpcorenovfp}, @samp{arm1156t2-s}, @samp{arm1156t2f-s}, @samp{arm1176jz-s}, @samp{arm1176jzf-s}, @samp{cortex-a5}, @samp{cortex-a8}, @samp{cortex-a9}, @samp{cortex-a15}, -@samp{cortex-r4}, @samp{cortex-r4f}, @samp{cortex-m4}, @samp{cortex-m3}, +@samp{cortex-r4}, @samp{cortex-r4f}, @samp{cortex-r5}, +@samp{cortex-m4}, @samp{cortex-m3}, @samp{cortex-m1}, @samp{cortex-m0}, @samp{xscale}, @samp{iwmmxt}, @samp{iwmmxt2}, @samp{ep9312}. diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 6526898617e..e248b817695 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -1,5 +1,5 @@ @c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001, -@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 @c Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -3373,11 +3373,6 @@ of bytes that the format occupies, @var{addr} is the @code{SYMBOL_REF} to be emitted. @end defmac -@defmac MD_UNWIND_SUPPORT -A string specifying a file to be #include'd in unwind-dw2.c. The file -so included typically defines @code{MD_FALLBACK_FRAME_STATE_FOR}. -@end defmac - @defmac MD_FALLBACK_FRAME_STATE_FOR (@var{context}, @var{fs}) This macro allows the target to add CPU and operating system specific code to the call-frame unwinder for use when there is no unwind data @@ -9432,6 +9427,14 @@ tables, and hence is desirable if it works. True if the @code{.debug_pubtypes} and @code{.debug_pubnames} sections should be emitted. These sections are not used on most platforms, and in particular GDB does not use them. @end deftypevr +@deftypevr {Target Hook} bool TARGET_DELAY_SCHED2 +True if sched2 is not to be run at its normal place. This usually means it will be run as part of machine-specific reorg. +@end deftypevr + +@deftypevr {Target Hook} bool TARGET_DELAY_VARTRACK +True if vartrack is not to be run at its normal place. This usually means it will be run as part of machine-specific reorg. +@end deftypevr + @defmac ASM_OUTPUT_DWARF_DELTA (@var{stream}, @var{size}, @var{label1}, @var{label2}) A C statement to issue assembly directives that create a difference @var{lab1} minus @var{lab2}, using an integer of the given @var{size}. diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 226e0bf0bea..528ac136616 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -1,5 +1,5 @@ @c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001, -@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 @c Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -3361,11 +3361,6 @@ of bytes that the format occupies, @var{addr} is the @code{SYMBOL_REF} to be emitted. @end defmac -@defmac MD_UNWIND_SUPPORT -A string specifying a file to be #include'd in unwind-dw2.c. The file -so included typically defines @code{MD_FALLBACK_FRAME_STATE_FOR}. -@end defmac - @defmac MD_FALLBACK_FRAME_STATE_FOR (@var{context}, @var{fs}) This macro allows the target to add CPU and operating system specific code to the call-frame unwinder for use when there is no unwind data @@ -9353,6 +9348,10 @@ tables, and hence is desirable if it works. @hook TARGET_WANT_DEBUG_PUB_SECTIONS +@hook TARGET_DELAY_SCHED2 + +@hook TARGET_DELAY_VARTRACK + @defmac ASM_OUTPUT_DWARF_DELTA (@var{stream}, @var{size}, @var{label1}, @var{label2}) A C statement to issue assembly directives that create a difference @var{lab1} minus @var{lab2}, using an integer of the given @var{size}. diff --git a/gcc/dojump.c b/gcc/dojump.c index 6437a1f2295..7606c15330d 100644 --- a/gcc/dojump.c +++ b/gcc/dojump.c @@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see #include "ggc.h" #include "basic-block.h" #include "output.h" +#include "tm_p.h" static bool prefer_and_bit_test (enum machine_mode, int); static void do_jump_by_parts_greater (tree, tree, int, rtx, rtx, int); diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 7ec1e931eed..b3cf4a65730 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -13824,6 +13824,658 @@ base_type_for_mode (enum machine_mode mode, bool unsignedp) return type_die; } +/* For OP descriptor assumed to be in unsigned MODE, convert it to a signed + type matching MODE, or, if MODE is narrower than DWARF2_ADDR_SIZE, signed + type matching DWARF2_ADDR_SIZE. Return NULL if the conversion is not + possible. */ + +static dw_loc_descr_ref +convert_descriptor_to_signed (enum machine_mode mode, dw_loc_descr_ref op) +{ + enum machine_mode outer_mode = mode; + dw_die_ref type_die; + dw_loc_descr_ref cvt; + + if (GET_MODE_SIZE (mode) < DWARF2_ADDR_SIZE) + { + outer_mode = mode_for_size (DWARF2_ADDR_SIZE * BITS_PER_UNIT, + MODE_INT, 0); + if (outer_mode == BLKmode + || GET_MODE_SIZE (outer_mode) != DWARF2_ADDR_SIZE) + return NULL; + } + type_die = base_type_for_mode (outer_mode, 0); + if (type_die == NULL) + return NULL; + cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); + cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; + cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; + cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; + add_loc_descr (&op, cvt); + return op; +} + +/* Return location descriptor for comparison OP with operands OP0 and OP1. */ + +static dw_loc_descr_ref +compare_loc_descriptor (enum dwarf_location_atom op, dw_loc_descr_ref op0, + dw_loc_descr_ref op1) +{ + dw_loc_descr_ref ret = op0; + add_loc_descr (&ret, op1); + add_loc_descr (&ret, new_loc_descr (op, 0, 0)); + if (STORE_FLAG_VALUE != 1) + { + add_loc_descr (&ret, int_loc_descriptor (STORE_FLAG_VALUE)); + add_loc_descr (&ret, new_loc_descr (DW_OP_mul, 0, 0)); + } + return ret; +} + +/* Return location descriptor for signed comparison OP RTL. */ + +static dw_loc_descr_ref +scompare_loc_descriptor (enum dwarf_location_atom op, rtx rtl, + enum machine_mode mem_mode) +{ + enum machine_mode op_mode = GET_MODE (XEXP (rtl, 0)); + dw_loc_descr_ref op0, op1; + int shift; + + if (op_mode == VOIDmode) + op_mode = GET_MODE (XEXP (rtl, 1)); + if (op_mode == VOIDmode) + return NULL; + + if (dwarf_strict + && (GET_MODE_CLASS (op_mode) != MODE_INT + || GET_MODE_SIZE (op_mode) > DWARF2_ADDR_SIZE)) + return NULL; + + op0 = mem_loc_descriptor (XEXP (rtl, 0), op_mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + op1 = mem_loc_descriptor (XEXP (rtl, 1), op_mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + + if (op0 == NULL || op1 == NULL) + return NULL; + + if (GET_MODE_CLASS (op_mode) != MODE_INT + || GET_MODE_SIZE (op_mode) >= DWARF2_ADDR_SIZE) + return compare_loc_descriptor (op, op0, op1); + + shift = (DWARF2_ADDR_SIZE - GET_MODE_SIZE (op_mode)) * BITS_PER_UNIT; + /* For eq/ne, if the operands are known to be zero-extended, + there is no need to do the fancy shifting up. */ + if (op == DW_OP_eq || op == DW_OP_ne) + { + dw_loc_descr_ref last0, last1; + for (last0 = op0; last0->dw_loc_next != NULL; last0 = last0->dw_loc_next) + ; + for (last1 = op1; last1->dw_loc_next != NULL; last1 = last1->dw_loc_next) + ; + /* deref_size zero extends, and for constants we can check + whether they are zero extended or not. */ + if (((last0->dw_loc_opc == DW_OP_deref_size + && last0->dw_loc_oprnd1.v.val_int <= GET_MODE_SIZE (op_mode)) + || (CONST_INT_P (XEXP (rtl, 0)) + && (unsigned HOST_WIDE_INT) INTVAL (XEXP (rtl, 0)) + == (INTVAL (XEXP (rtl, 0)) & GET_MODE_MASK (op_mode)))) + && ((last1->dw_loc_opc == DW_OP_deref_size + && last1->dw_loc_oprnd1.v.val_int <= GET_MODE_SIZE (op_mode)) + || (CONST_INT_P (XEXP (rtl, 1)) + && (unsigned HOST_WIDE_INT) INTVAL (XEXP (rtl, 1)) + == (INTVAL (XEXP (rtl, 1)) & GET_MODE_MASK (op_mode))))) + return compare_loc_descriptor (op, op0, op1); + } + add_loc_descr (&op0, int_loc_descriptor (shift)); + add_loc_descr (&op0, new_loc_descr (DW_OP_shl, 0, 0)); + if (CONST_INT_P (XEXP (rtl, 1))) + op1 = int_loc_descriptor (INTVAL (XEXP (rtl, 1)) << shift); + else + { + add_loc_descr (&op1, int_loc_descriptor (shift)); + add_loc_descr (&op1, new_loc_descr (DW_OP_shl, 0, 0)); + } + return compare_loc_descriptor (op, op0, op1); +} + +/* Return location descriptor for unsigned comparison OP RTL. */ + +static dw_loc_descr_ref +ucompare_loc_descriptor (enum dwarf_location_atom op, rtx rtl, + enum machine_mode mem_mode) +{ + enum machine_mode op_mode = GET_MODE (XEXP (rtl, 0)); + dw_loc_descr_ref op0, op1; + + if (op_mode == VOIDmode) + op_mode = GET_MODE (XEXP (rtl, 1)); + if (op_mode == VOIDmode) + return NULL; + if (GET_MODE_CLASS (op_mode) != MODE_INT) + return NULL; + + if (dwarf_strict && GET_MODE_SIZE (op_mode) > DWARF2_ADDR_SIZE) + return NULL; + + if (op_mode != VOIDmode && GET_MODE_CLASS (op_mode) != MODE_INT) + return NULL; + + op0 = mem_loc_descriptor (XEXP (rtl, 0), op_mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + op1 = mem_loc_descriptor (XEXP (rtl, 1), op_mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + + if (op0 == NULL || op1 == NULL) + return NULL; + + if (GET_MODE_SIZE (op_mode) < DWARF2_ADDR_SIZE) + { + HOST_WIDE_INT mask = GET_MODE_MASK (op_mode); + dw_loc_descr_ref last0, last1; + for (last0 = op0; last0->dw_loc_next != NULL; last0 = last0->dw_loc_next) + ; + for (last1 = op1; last1->dw_loc_next != NULL; last1 = last1->dw_loc_next) + ; + if (CONST_INT_P (XEXP (rtl, 0))) + op0 = int_loc_descriptor (INTVAL (XEXP (rtl, 0)) & mask); + /* deref_size zero extends, so no need to mask it again. */ + else if (last0->dw_loc_opc != DW_OP_deref_size + || last0->dw_loc_oprnd1.v.val_int > GET_MODE_SIZE (op_mode)) + { + add_loc_descr (&op0, int_loc_descriptor (mask)); + add_loc_descr (&op0, new_loc_descr (DW_OP_and, 0, 0)); + } + if (CONST_INT_P (XEXP (rtl, 1))) + op1 = int_loc_descriptor (INTVAL (XEXP (rtl, 1)) & mask); + /* deref_size zero extends, so no need to mask it again. */ + else if (last1->dw_loc_opc != DW_OP_deref_size + || last1->dw_loc_oprnd1.v.val_int > GET_MODE_SIZE (op_mode)) + { + add_loc_descr (&op1, int_loc_descriptor (mask)); + add_loc_descr (&op1, new_loc_descr (DW_OP_and, 0, 0)); + } + } + else if (GET_MODE_SIZE (op_mode) == DWARF2_ADDR_SIZE) + { + HOST_WIDE_INT bias = 1; + bias <<= (DWARF2_ADDR_SIZE * BITS_PER_UNIT - 1); + add_loc_descr (&op0, new_loc_descr (DW_OP_plus_uconst, bias, 0)); + if (CONST_INT_P (XEXP (rtl, 1))) + op1 = int_loc_descriptor ((unsigned HOST_WIDE_INT) bias + + INTVAL (XEXP (rtl, 1))); + else + add_loc_descr (&op1, new_loc_descr (DW_OP_plus_uconst, + bias, 0)); + } + else + { + dw_die_ref type_die = base_type_for_mode (op_mode, 1); + dw_loc_descr_ref cvt; + + if (type_die == NULL) + return NULL; + cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); + cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; + cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; + cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; + add_loc_descr (&op0, cvt); + cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); + cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; + cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; + cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; + add_loc_descr (&op1, cvt); + } + return compare_loc_descriptor (op, op0, op1); +} + +/* Return location descriptor for {U,S}{MIN,MAX}. */ + +static dw_loc_descr_ref +minmax_loc_descriptor (rtx rtl, enum machine_mode mode, + enum machine_mode mem_mode) +{ + enum dwarf_location_atom op; + dw_loc_descr_ref op0, op1, ret; + dw_loc_descr_ref bra_node, drop_node; + + if (dwarf_strict + && (GET_MODE_CLASS (mode) != MODE_INT + || GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE)) + return NULL; + + op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + + if (op0 == NULL || op1 == NULL) + return NULL; + + add_loc_descr (&op0, new_loc_descr (DW_OP_dup, 0, 0)); + add_loc_descr (&op1, new_loc_descr (DW_OP_swap, 0, 0)); + add_loc_descr (&op1, new_loc_descr (DW_OP_over, 0, 0)); + if (GET_CODE (rtl) == UMIN || GET_CODE (rtl) == UMAX) + { + if (GET_MODE_SIZE (mode) < DWARF2_ADDR_SIZE) + { + HOST_WIDE_INT mask = GET_MODE_MASK (mode); + add_loc_descr (&op0, int_loc_descriptor (mask)); + add_loc_descr (&op0, new_loc_descr (DW_OP_and, 0, 0)); + add_loc_descr (&op1, int_loc_descriptor (mask)); + add_loc_descr (&op1, new_loc_descr (DW_OP_and, 0, 0)); + } + else if (GET_MODE_SIZE (mode) == DWARF2_ADDR_SIZE) + { + HOST_WIDE_INT bias = 1; + bias <<= (DWARF2_ADDR_SIZE * BITS_PER_UNIT - 1); + add_loc_descr (&op0, new_loc_descr (DW_OP_plus_uconst, bias, 0)); + add_loc_descr (&op1, new_loc_descr (DW_OP_plus_uconst, bias, 0)); + } + else + { + dw_die_ref type_die = base_type_for_mode (mode, 1); + dw_loc_descr_ref cvt; + if (type_die == NULL) + return NULL; + cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); + cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; + cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; + cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; + add_loc_descr (&op0, cvt); + cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); + cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; + cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; + cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; + add_loc_descr (&op1, cvt); + } + } + else if (GET_MODE_CLASS (mode) == MODE_INT + && GET_MODE_SIZE (mode) < DWARF2_ADDR_SIZE) + { + int shift = (DWARF2_ADDR_SIZE - GET_MODE_SIZE (mode)) * BITS_PER_UNIT; + add_loc_descr (&op0, int_loc_descriptor (shift)); + add_loc_descr (&op0, new_loc_descr (DW_OP_shl, 0, 0)); + add_loc_descr (&op1, int_loc_descriptor (shift)); + add_loc_descr (&op1, new_loc_descr (DW_OP_shl, 0, 0)); + } + + if (GET_CODE (rtl) == SMIN || GET_CODE (rtl) == UMIN) + op = DW_OP_lt; + else + op = DW_OP_gt; + ret = op0; + add_loc_descr (&ret, op1); + add_loc_descr (&ret, new_loc_descr (op, 0, 0)); + bra_node = new_loc_descr (DW_OP_bra, 0, 0); + add_loc_descr (&ret, bra_node); + add_loc_descr (&ret, new_loc_descr (DW_OP_swap, 0, 0)); + drop_node = new_loc_descr (DW_OP_drop, 0, 0); + add_loc_descr (&ret, drop_node); + bra_node->dw_loc_oprnd1.val_class = dw_val_class_loc; + bra_node->dw_loc_oprnd1.v.val_loc = drop_node; + return ret; +} + +/* CLZ (where constV is CLZ_DEFINED_VALUE_AT_ZERO computed value, + const0 is DW_OP_lit0 or corresponding typed constant, + const1 is DW_OP_lit1 or corresponding typed constant + and constMSB is constant with just the MSB bit set + for the mode): + DW_OP_dup DW_OP_bra <L1> DW_OP_drop constV DW_OP_skip <L4> + L1: const0 DW_OP_swap + L2: DW_OP_dup constMSB DW_OP_and DW_OP_bra <L3> const1 DW_OP_shl + DW_OP_swap DW_OP_plus_uconst <1> DW_OP_swap DW_OP_skip <L2> + L3: DW_OP_drop + L4: DW_OP_nop + + CTZ is similar: + DW_OP_dup DW_OP_bra <L1> DW_OP_drop constV DW_OP_skip <L4> + L1: const0 DW_OP_swap + L2: DW_OP_dup const1 DW_OP_and DW_OP_bra <L3> const1 DW_OP_shr + DW_OP_swap DW_OP_plus_uconst <1> DW_OP_swap DW_OP_skip <L2> + L3: DW_OP_drop + L4: DW_OP_nop + + FFS is similar: + DW_OP_dup DW_OP_bra <L1> DW_OP_drop const0 DW_OP_skip <L4> + L1: const1 DW_OP_swap + L2: DW_OP_dup const1 DW_OP_and DW_OP_bra <L3> const1 DW_OP_shr + DW_OP_swap DW_OP_plus_uconst <1> DW_OP_swap DW_OP_skip <L2> + L3: DW_OP_drop + L4: DW_OP_nop */ + +static dw_loc_descr_ref +clz_loc_descriptor (rtx rtl, enum machine_mode mode, + enum machine_mode mem_mode) +{ + dw_loc_descr_ref op0, ret, tmp; + HOST_WIDE_INT valv; + dw_loc_descr_ref l1jump, l1label; + dw_loc_descr_ref l2jump, l2label; + dw_loc_descr_ref l3jump, l3label; + dw_loc_descr_ref l4jump, l4label; + rtx msb; + + if (GET_MODE_CLASS (mode) != MODE_INT + || GET_MODE (XEXP (rtl, 0)) != mode + || (GET_CODE (rtl) == CLZ + && GET_MODE_BITSIZE (mode) > 2 * HOST_BITS_PER_WIDE_INT)) + return NULL; + + op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (op0 == NULL) + return NULL; + ret = op0; + if (GET_CODE (rtl) == CLZ) + { + if (!CLZ_DEFINED_VALUE_AT_ZERO (mode, valv)) + valv = GET_MODE_BITSIZE (mode); + } + else if (GET_CODE (rtl) == FFS) + valv = 0; + else if (!CTZ_DEFINED_VALUE_AT_ZERO (mode, valv)) + valv = GET_MODE_BITSIZE (mode); + add_loc_descr (&ret, new_loc_descr (DW_OP_dup, 0, 0)); + l1jump = new_loc_descr (DW_OP_bra, 0, 0); + add_loc_descr (&ret, l1jump); + add_loc_descr (&ret, new_loc_descr (DW_OP_drop, 0, 0)); + tmp = mem_loc_descriptor (GEN_INT (valv), mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (tmp == NULL) + return NULL; + add_loc_descr (&ret, tmp); + l4jump = new_loc_descr (DW_OP_skip, 0, 0); + add_loc_descr (&ret, l4jump); + l1label = mem_loc_descriptor (GET_CODE (rtl) == FFS + ? const1_rtx : const0_rtx, + mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (l1label == NULL) + return NULL; + add_loc_descr (&ret, l1label); + add_loc_descr (&ret, new_loc_descr (DW_OP_swap, 0, 0)); + l2label = new_loc_descr (DW_OP_dup, 0, 0); + add_loc_descr (&ret, l2label); + if (GET_CODE (rtl) != CLZ) + msb = const1_rtx; + else if (GET_MODE_BITSIZE (mode) <= HOST_BITS_PER_WIDE_INT) + msb = GEN_INT ((unsigned HOST_WIDE_INT) 1 + << (GET_MODE_BITSIZE (mode) - 1)); + else + msb = immed_double_const (0, (unsigned HOST_WIDE_INT) 1 + << (GET_MODE_BITSIZE (mode) + - HOST_BITS_PER_WIDE_INT - 1), mode); + if (GET_CODE (msb) == CONST_INT && INTVAL (msb) < 0) + tmp = new_loc_descr (HOST_BITS_PER_WIDE_INT == 32 + ? DW_OP_const4u : HOST_BITS_PER_WIDE_INT == 64 + ? DW_OP_const8u : DW_OP_constu, INTVAL (msb), 0); + else + tmp = mem_loc_descriptor (msb, mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (tmp == NULL) + return NULL; + add_loc_descr (&ret, tmp); + add_loc_descr (&ret, new_loc_descr (DW_OP_and, 0, 0)); + l3jump = new_loc_descr (DW_OP_bra, 0, 0); + add_loc_descr (&ret, l3jump); + tmp = mem_loc_descriptor (const1_rtx, mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (tmp == NULL) + return NULL; + add_loc_descr (&ret, tmp); + add_loc_descr (&ret, new_loc_descr (GET_CODE (rtl) == CLZ + ? DW_OP_shl : DW_OP_shr, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_swap, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_plus_uconst, 1, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_swap, 0, 0)); + l2jump = new_loc_descr (DW_OP_skip, 0, 0); + add_loc_descr (&ret, l2jump); + l3label = new_loc_descr (DW_OP_drop, 0, 0); + add_loc_descr (&ret, l3label); + l4label = new_loc_descr (DW_OP_nop, 0, 0); + add_loc_descr (&ret, l4label); + l1jump->dw_loc_oprnd1.val_class = dw_val_class_loc; + l1jump->dw_loc_oprnd1.v.val_loc = l1label; + l2jump->dw_loc_oprnd1.val_class = dw_val_class_loc; + l2jump->dw_loc_oprnd1.v.val_loc = l2label; + l3jump->dw_loc_oprnd1.val_class = dw_val_class_loc; + l3jump->dw_loc_oprnd1.v.val_loc = l3label; + l4jump->dw_loc_oprnd1.val_class = dw_val_class_loc; + l4jump->dw_loc_oprnd1.v.val_loc = l4label; + return ret; +} + +/* POPCOUNT (const0 is DW_OP_lit0 or corresponding typed constant, + const1 is DW_OP_lit1 or corresponding typed constant): + const0 DW_OP_swap + L1: DW_OP_dup DW_OP_bra <L2> DW_OP_dup DW_OP_rot const1 DW_OP_and + DW_OP_plus DW_OP_swap const1 DW_OP_shr DW_OP_skip <L1> + L2: DW_OP_drop + + PARITY is similar: + L1: DW_OP_dup DW_OP_bra <L2> DW_OP_dup DW_OP_rot const1 DW_OP_and + DW_OP_xor DW_OP_swap const1 DW_OP_shr DW_OP_skip <L1> + L2: DW_OP_drop */ + +static dw_loc_descr_ref +popcount_loc_descriptor (rtx rtl, enum machine_mode mode, + enum machine_mode mem_mode) +{ + dw_loc_descr_ref op0, ret, tmp; + dw_loc_descr_ref l1jump, l1label; + dw_loc_descr_ref l2jump, l2label; + + if (GET_MODE_CLASS (mode) != MODE_INT + || GET_MODE (XEXP (rtl, 0)) != mode) + return NULL; + + op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (op0 == NULL) + return NULL; + ret = op0; + tmp = mem_loc_descriptor (const0_rtx, mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (tmp == NULL) + return NULL; + add_loc_descr (&ret, tmp); + add_loc_descr (&ret, new_loc_descr (DW_OP_swap, 0, 0)); + l1label = new_loc_descr (DW_OP_dup, 0, 0); + add_loc_descr (&ret, l1label); + l2jump = new_loc_descr (DW_OP_bra, 0, 0); + add_loc_descr (&ret, l2jump); + add_loc_descr (&ret, new_loc_descr (DW_OP_dup, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_rot, 0, 0)); + tmp = mem_loc_descriptor (const1_rtx, mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (tmp == NULL) + return NULL; + add_loc_descr (&ret, tmp); + add_loc_descr (&ret, new_loc_descr (DW_OP_and, 0, 0)); + add_loc_descr (&ret, new_loc_descr (GET_CODE (rtl) == POPCOUNT + ? DW_OP_plus : DW_OP_xor, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_swap, 0, 0)); + tmp = mem_loc_descriptor (const1_rtx, mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + add_loc_descr (&ret, tmp); + add_loc_descr (&ret, new_loc_descr (DW_OP_shr, 0, 0)); + l1jump = new_loc_descr (DW_OP_skip, 0, 0); + add_loc_descr (&ret, l1jump); + l2label = new_loc_descr (DW_OP_drop, 0, 0); + add_loc_descr (&ret, l2label); + l1jump->dw_loc_oprnd1.val_class = dw_val_class_loc; + l1jump->dw_loc_oprnd1.v.val_loc = l1label; + l2jump->dw_loc_oprnd1.val_class = dw_val_class_loc; + l2jump->dw_loc_oprnd1.v.val_loc = l2label; + return ret; +} + +/* BSWAP (constS is initial shift count, either 56 or 24): + constS const0 + L1: DW_OP_pick <2> constS DW_OP_pick <3> DW_OP_minus DW_OP_shr + const255 DW_OP_and DW_OP_pick <2> DW_OP_shl DW_OP_or + DW_OP_swap DW_OP_dup const0 DW_OP_eq DW_OP_bra <L2> const8 + DW_OP_minus DW_OP_swap DW_OP_skip <L1> + L2: DW_OP_drop DW_OP_swap DW_OP_drop */ + +static dw_loc_descr_ref +bswap_loc_descriptor (rtx rtl, enum machine_mode mode, + enum machine_mode mem_mode) +{ + dw_loc_descr_ref op0, ret, tmp; + dw_loc_descr_ref l1jump, l1label; + dw_loc_descr_ref l2jump, l2label; + + if (GET_MODE_CLASS (mode) != MODE_INT + || BITS_PER_UNIT != 8 + || (GET_MODE_BITSIZE (mode) != 32 + && GET_MODE_BITSIZE (mode) != 64)) + return NULL; + + op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (op0 == NULL) + return NULL; + + ret = op0; + tmp = mem_loc_descriptor (GEN_INT (GET_MODE_BITSIZE (mode) - 8), + mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (tmp == NULL) + return NULL; + add_loc_descr (&ret, tmp); + tmp = mem_loc_descriptor (const0_rtx, mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (tmp == NULL) + return NULL; + add_loc_descr (&ret, tmp); + l1label = new_loc_descr (DW_OP_pick, 2, 0); + add_loc_descr (&ret, l1label); + tmp = mem_loc_descriptor (GEN_INT (GET_MODE_BITSIZE (mode) - 8), + mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + add_loc_descr (&ret, tmp); + add_loc_descr (&ret, new_loc_descr (DW_OP_pick, 3, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_minus, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_shr, 0, 0)); + tmp = mem_loc_descriptor (GEN_INT (255), mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (tmp == NULL) + return NULL; + add_loc_descr (&ret, tmp); + add_loc_descr (&ret, new_loc_descr (DW_OP_and, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_pick, 2, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_shl, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_or, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_swap, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_dup, 0, 0)); + tmp = mem_loc_descriptor (const0_rtx, mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + add_loc_descr (&ret, tmp); + add_loc_descr (&ret, new_loc_descr (DW_OP_eq, 0, 0)); + l2jump = new_loc_descr (DW_OP_bra, 0, 0); + add_loc_descr (&ret, l2jump); + tmp = mem_loc_descriptor (GEN_INT (8), mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + add_loc_descr (&ret, tmp); + add_loc_descr (&ret, new_loc_descr (DW_OP_minus, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_swap, 0, 0)); + l1jump = new_loc_descr (DW_OP_skip, 0, 0); + add_loc_descr (&ret, l1jump); + l2label = new_loc_descr (DW_OP_drop, 0, 0); + add_loc_descr (&ret, l2label); + add_loc_descr (&ret, new_loc_descr (DW_OP_swap, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_drop, 0, 0)); + l1jump->dw_loc_oprnd1.val_class = dw_val_class_loc; + l1jump->dw_loc_oprnd1.v.val_loc = l1label; + l2jump->dw_loc_oprnd1.val_class = dw_val_class_loc; + l2jump->dw_loc_oprnd1.v.val_loc = l2label; + return ret; +} + +/* ROTATE (constMASK is mode mask, BITSIZE is bitsize of mode): + DW_OP_over DW_OP_over DW_OP_shl [ constMASK DW_OP_and ] DW_OP_rot + [ DW_OP_swap constMASK DW_OP_and DW_OP_swap ] DW_OP_neg + DW_OP_plus_uconst <BITSIZE> DW_OP_shr DW_OP_or + + ROTATERT is similar: + DW_OP_over DW_OP_over DW_OP_neg DW_OP_plus_uconst <BITSIZE> + DW_OP_shl [ constMASK DW_OP_and ] DW_OP_rot + [ DW_OP_swap constMASK DW_OP_and DW_OP_swap ] DW_OP_shr DW_OP_or */ + +static dw_loc_descr_ref +rotate_loc_descriptor (rtx rtl, enum machine_mode mode, + enum machine_mode mem_mode) +{ + rtx rtlop1 = XEXP (rtl, 1); + dw_loc_descr_ref op0, op1, ret, mask[2] = { NULL, NULL }; + int i; + + if (GET_MODE_CLASS (mode) != MODE_INT) + return NULL; + + if (GET_MODE (rtlop1) != VOIDmode + && GET_MODE_BITSIZE (GET_MODE (rtlop1)) < GET_MODE_BITSIZE (mode)) + rtlop1 = gen_rtx_ZERO_EXTEND (mode, rtlop1); + op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + op1 = mem_loc_descriptor (rtlop1, mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (op0 == NULL || op1 == NULL) + return NULL; + if (GET_MODE_SIZE (mode) < DWARF2_ADDR_SIZE) + for (i = 0; i < 2; i++) + { + if (GET_MODE_BITSIZE (mode) < HOST_BITS_PER_WIDE_INT) + mask[i] = mem_loc_descriptor (GEN_INT (GET_MODE_MASK (mode)), + mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + else if (GET_MODE_BITSIZE (mode) == HOST_BITS_PER_WIDE_INT) + mask[i] = new_loc_descr (HOST_BITS_PER_WIDE_INT == 32 + ? DW_OP_const4u + : HOST_BITS_PER_WIDE_INT == 64 + ? DW_OP_const8u : DW_OP_constu, + GET_MODE_MASK (mode), 0); + else + mask[i] = NULL; + if (mask[i] == NULL) + return NULL; + add_loc_descr (&mask[i], new_loc_descr (DW_OP_and, 0, 0)); + } + ret = op0; + add_loc_descr (&ret, op1); + add_loc_descr (&ret, new_loc_descr (DW_OP_over, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_over, 0, 0)); + if (GET_CODE (rtl) == ROTATERT) + { + add_loc_descr (&ret, new_loc_descr (DW_OP_neg, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_plus_uconst, + GET_MODE_BITSIZE (mode), 0)); + } + add_loc_descr (&ret, new_loc_descr (DW_OP_shl, 0, 0)); + if (mask[0] != NULL) + add_loc_descr (&ret, mask[0]); + add_loc_descr (&ret, new_loc_descr (DW_OP_rot, 0, 0)); + if (mask[1] != NULL) + { + add_loc_descr (&ret, new_loc_descr (DW_OP_swap, 0, 0)); + add_loc_descr (&ret, mask[1]); + add_loc_descr (&ret, new_loc_descr (DW_OP_swap, 0, 0)); + } + if (GET_CODE (rtl) == ROTATE) + { + add_loc_descr (&ret, new_loc_descr (DW_OP_neg, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_plus_uconst, + GET_MODE_BITSIZE (mode), 0)); + } + add_loc_descr (&ret, new_loc_descr (DW_OP_shr, 0, 0)); + add_loc_descr (&ret, new_loc_descr (DW_OP_or, 0, 0)); + return ret; +} + /* The following routine converts the RTL for a variable or parameter (resident in memory) into an equivalent Dwarf representation of a mechanism for getting the address of that same variable onto the top of a @@ -13986,6 +14638,21 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, mem_mode, VAR_INIT_STATUS_INITIALIZED); if (op0 == 0) break; + else if (GET_CODE (rtl) == ZERO_EXTEND + && GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE + && GET_MODE_BITSIZE (GET_MODE (XEXP (rtl, 0))) + < HOST_BITS_PER_WIDE_INT + /* If DW_OP_const{1,2,4}u won't be used, it is shorter + to expand zero extend as two shifts instead of + masking. */ + && GET_MODE_SIZE (GET_MODE (XEXP (rtl, 0))) <= 4) + { + enum machine_mode imode = GET_MODE (XEXP (rtl, 0)); + mem_loc_result = op0; + add_loc_descr (&mem_loc_result, + int_loc_descriptor (GET_MODE_MASK (imode))); + add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_and, 0, 0)); + } else if (GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE) { int shift = DWARF2_ADDR_SIZE @@ -14239,10 +14906,15 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, do_shift: op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode, VAR_INIT_STATUS_INITIALIZED); - op1 = mem_loc_descriptor (XEXP (rtl, 1), - GET_MODE (XEXP (rtl, 1)) == VOIDmode - ? mode : GET_MODE (XEXP (rtl, 1)), mem_mode, - VAR_INIT_STATUS_INITIALIZED); + { + rtx rtlop1 = XEXP (rtl, 1); + if (GET_MODE (rtlop1) != VOIDmode + && GET_MODE_BITSIZE (GET_MODE (rtlop1)) + < GET_MODE_BITSIZE (mode)) + rtlop1 = gen_rtx_ZERO_EXTEND (mode, rtlop1); + op1 = mem_loc_descriptor (rtlop1, mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + } if (op0 == 0 || op1 == 0) break; @@ -14279,6 +14951,16 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, break; case MOD: + if (GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE && !dwarf_strict) + { + /* If MODE is wider than DWARF2_ADDR_SIZE, mem_loc_descriptor + should return signed typed values and therefore DW_OP_mod + won't be unsigned as it defaults for untyped stack values, + but signed. */ + op = DW_OP_mod; + goto do_binop; + } + op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode, VAR_INIT_STATUS_INITIALIZED); op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode, @@ -14296,6 +14978,38 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_minus, 0, 0)); break; + case UDIV: + if (!dwarf_strict && GET_MODE_CLASS (mode) == MODE_INT) + { + dw_die_ref type_die; + dw_loc_descr_ref cvt; + + type_die = base_type_for_mode (mode, 1); + if (type_die == NULL) + break; + op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode, + VAR_INIT_STATUS_INITIALIZED); + if (op0 == 0 || op1 == 0) + break; + cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); + cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; + cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; + cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; + add_loc_descr (&op0, cvt); + cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); + cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; + cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; + cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; + add_loc_descr (&op1, cvt); + mem_loc_result = op0; + add_loc_descr (&mem_loc_result, op1); + add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_div, 0, 0)); + mem_loc_result = convert_descriptor_to_signed (mode, mem_loc_result); + } + break; + case NOT: op = DW_OP_not; goto do_unop; @@ -14398,218 +15112,44 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, break; case EQ: - op = DW_OP_eq; - goto do_scompare; + mem_loc_result = scompare_loc_descriptor (DW_OP_eq, rtl, mem_mode); + break; case GE: - op = DW_OP_ge; - goto do_scompare; + mem_loc_result = scompare_loc_descriptor (DW_OP_ge, rtl, mem_mode); + break; case GT: - op = DW_OP_gt; - goto do_scompare; + mem_loc_result = scompare_loc_descriptor (DW_OP_gt, rtl, mem_mode); + break; case LE: - op = DW_OP_le; - goto do_scompare; + mem_loc_result = scompare_loc_descriptor (DW_OP_le, rtl, mem_mode); + break; case LT: - op = DW_OP_lt; - goto do_scompare; + mem_loc_result = scompare_loc_descriptor (DW_OP_lt, rtl, mem_mode); + break; case NE: - op = DW_OP_ne; - goto do_scompare; - - do_scompare: - { - enum machine_mode op_mode = GET_MODE (XEXP (rtl, 0)); - - if (op_mode == VOIDmode) - op_mode = GET_MODE (XEXP (rtl, 1)); - if (op_mode == VOIDmode) - break; - - if (dwarf_strict - && (GET_MODE_CLASS (op_mode) != MODE_INT - || GET_MODE_SIZE (op_mode) > DWARF2_ADDR_SIZE)) - break; - - op0 = mem_loc_descriptor (XEXP (rtl, 0), op_mode, mem_mode, - VAR_INIT_STATUS_INITIALIZED); - op1 = mem_loc_descriptor (XEXP (rtl, 1), op_mode, mem_mode, - VAR_INIT_STATUS_INITIALIZED); - - if (op0 == 0 || op1 == 0) - break; - - if (GET_MODE_CLASS (op_mode) == MODE_INT - && GET_MODE_SIZE (op_mode) < DWARF2_ADDR_SIZE) - { - int shift = DWARF2_ADDR_SIZE - GET_MODE_SIZE (op_mode); - shift *= BITS_PER_UNIT; - /* For eq/ne, if the operands are known to be zero-extended, - there is no need to do the fancy shifting up. */ - if (op == DW_OP_eq || op == DW_OP_ne) - { - dw_loc_descr_ref last0, last1; - for (last0 = op0; - last0->dw_loc_next != NULL; - last0 = last0->dw_loc_next) - ; - for (last1 = op1; - last1->dw_loc_next != NULL; - last1 = last1->dw_loc_next) - ; - /* deref_size zero extends, and for constants we can check - whether they are zero extended or not. */ - if (((last0->dw_loc_opc == DW_OP_deref_size - && last0->dw_loc_oprnd1.v.val_int - <= GET_MODE_SIZE (op_mode)) - || (CONST_INT_P (XEXP (rtl, 0)) - && (unsigned HOST_WIDE_INT) INTVAL (XEXP (rtl, 0)) - == (INTVAL (XEXP (rtl, 0)) - & GET_MODE_MASK (op_mode)))) - && ((last1->dw_loc_opc == DW_OP_deref_size - && last1->dw_loc_oprnd1.v.val_int - <= GET_MODE_SIZE (op_mode)) - || (CONST_INT_P (XEXP (rtl, 1)) - && (unsigned HOST_WIDE_INT) - INTVAL (XEXP (rtl, 1)) - == (INTVAL (XEXP (rtl, 1)) - & GET_MODE_MASK (op_mode))))) - goto do_compare; - } - add_loc_descr (&op0, int_loc_descriptor (shift)); - add_loc_descr (&op0, new_loc_descr (DW_OP_shl, 0, 0)); - if (CONST_INT_P (XEXP (rtl, 1))) - op1 = int_loc_descriptor (INTVAL (XEXP (rtl, 1)) << shift); - else - { - add_loc_descr (&op1, int_loc_descriptor (shift)); - add_loc_descr (&op1, new_loc_descr (DW_OP_shl, 0, 0)); - } - } - } - - do_compare: - mem_loc_result = op0; - add_loc_descr (&mem_loc_result, op1); - add_loc_descr (&mem_loc_result, new_loc_descr (op, 0, 0)); - if (STORE_FLAG_VALUE != 1) - { - add_loc_descr (&mem_loc_result, - int_loc_descriptor (STORE_FLAG_VALUE)); - add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_mul, 0, 0)); - } + mem_loc_result = scompare_loc_descriptor (DW_OP_ne, rtl, mem_mode); break; case GEU: - op = DW_OP_ge; - goto do_ucompare; + mem_loc_result = ucompare_loc_descriptor (DW_OP_ge, rtl, mem_mode); + break; case GTU: - op = DW_OP_gt; - goto do_ucompare; + mem_loc_result = ucompare_loc_descriptor (DW_OP_gt, rtl, mem_mode); + break; case LEU: - op = DW_OP_le; - goto do_ucompare; + mem_loc_result = ucompare_loc_descriptor (DW_OP_le, rtl, mem_mode); + break; case LTU: - op = DW_OP_lt; - goto do_ucompare; - - do_ucompare: - { - enum machine_mode op_mode = GET_MODE (XEXP (rtl, 0)); - - if (op_mode == VOIDmode) - op_mode = GET_MODE (XEXP (rtl, 1)); - if (op_mode == VOIDmode) - break; - if (GET_MODE_CLASS (op_mode) != MODE_INT) - break; - - if (dwarf_strict && GET_MODE_SIZE (op_mode) > DWARF2_ADDR_SIZE) - break; - - if (op_mode != VOIDmode && GET_MODE_CLASS (op_mode) != MODE_INT) - break; - - op0 = mem_loc_descriptor (XEXP (rtl, 0), op_mode, mem_mode, - VAR_INIT_STATUS_INITIALIZED); - op1 = mem_loc_descriptor (XEXP (rtl, 1), op_mode, mem_mode, - VAR_INIT_STATUS_INITIALIZED); - - if (op0 == 0 || op1 == 0) - break; - - if (GET_MODE_SIZE (op_mode) < DWARF2_ADDR_SIZE) - { - HOST_WIDE_INT mask = GET_MODE_MASK (op_mode); - dw_loc_descr_ref last0, last1; - for (last0 = op0; - last0->dw_loc_next != NULL; - last0 = last0->dw_loc_next) - ; - for (last1 = op1; - last1->dw_loc_next != NULL; - last1 = last1->dw_loc_next) - ; - if (CONST_INT_P (XEXP (rtl, 0))) - op0 = int_loc_descriptor (INTVAL (XEXP (rtl, 0)) & mask); - /* deref_size zero extends, so no need to mask it again. */ - else if (last0->dw_loc_opc != DW_OP_deref_size - || last0->dw_loc_oprnd1.v.val_int - > GET_MODE_SIZE (op_mode)) - { - add_loc_descr (&op0, int_loc_descriptor (mask)); - add_loc_descr (&op0, new_loc_descr (DW_OP_and, 0, 0)); - } - if (CONST_INT_P (XEXP (rtl, 1))) - op1 = int_loc_descriptor (INTVAL (XEXP (rtl, 1)) & mask); - /* deref_size zero extends, so no need to mask it again. */ - else if (last1->dw_loc_opc != DW_OP_deref_size - || last1->dw_loc_oprnd1.v.val_int - > GET_MODE_SIZE (op_mode)) - { - add_loc_descr (&op1, int_loc_descriptor (mask)); - add_loc_descr (&op1, new_loc_descr (DW_OP_and, 0, 0)); - } - } - else if (GET_MODE_SIZE (op_mode) == DWARF2_ADDR_SIZE) - { - HOST_WIDE_INT bias = 1; - bias <<= (DWARF2_ADDR_SIZE * BITS_PER_UNIT - 1); - add_loc_descr (&op0, new_loc_descr (DW_OP_plus_uconst, bias, 0)); - if (CONST_INT_P (XEXP (rtl, 1))) - op1 = int_loc_descriptor ((unsigned HOST_WIDE_INT) bias - + INTVAL (XEXP (rtl, 1))); - else - add_loc_descr (&op1, new_loc_descr (DW_OP_plus_uconst, - bias, 0)); - } - else - { - dw_die_ref type_die = base_type_for_mode (mode, 1); - dw_loc_descr_ref cvt; - - if (type_die == NULL) - break; - cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); - cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; - cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; - cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; - add_loc_descr (&op0, cvt); - cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); - cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; - cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; - cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; - add_loc_descr (&op1, cvt); - } - } - goto do_compare; + mem_loc_result = ucompare_loc_descriptor (DW_OP_lt, rtl, mem_mode); + break; case UMIN: case UMAX: @@ -14618,87 +15158,7 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, /* FALLTHRU */ case SMIN: case SMAX: - if (dwarf_strict - && (GET_MODE_CLASS (mode) != MODE_INT - || GET_MODE_SIZE (mode) > DWARF2_ADDR_SIZE)) - break; - - op0 = mem_loc_descriptor (XEXP (rtl, 0), mode, mem_mode, - VAR_INIT_STATUS_INITIALIZED); - op1 = mem_loc_descriptor (XEXP (rtl, 1), mode, mem_mode, - VAR_INIT_STATUS_INITIALIZED); - - if (op0 == 0 || op1 == 0) - break; - - add_loc_descr (&op0, new_loc_descr (DW_OP_dup, 0, 0)); - add_loc_descr (&op1, new_loc_descr (DW_OP_swap, 0, 0)); - add_loc_descr (&op1, new_loc_descr (DW_OP_over, 0, 0)); - if (GET_CODE (rtl) == UMIN || GET_CODE (rtl) == UMAX) - { - if (GET_MODE_SIZE (mode) < DWARF2_ADDR_SIZE) - { - HOST_WIDE_INT mask = GET_MODE_MASK (mode); - add_loc_descr (&op0, int_loc_descriptor (mask)); - add_loc_descr (&op0, new_loc_descr (DW_OP_and, 0, 0)); - add_loc_descr (&op1, int_loc_descriptor (mask)); - add_loc_descr (&op1, new_loc_descr (DW_OP_and, 0, 0)); - } - else if (GET_MODE_SIZE (mode) == DWARF2_ADDR_SIZE) - { - HOST_WIDE_INT bias = 1; - bias <<= (DWARF2_ADDR_SIZE * BITS_PER_UNIT - 1); - add_loc_descr (&op0, new_loc_descr (DW_OP_plus_uconst, bias, 0)); - add_loc_descr (&op1, new_loc_descr (DW_OP_plus_uconst, bias, 0)); - } - else - { - dw_die_ref type_die = base_type_for_mode (mode, 1); - dw_loc_descr_ref cvt; - - if (type_die == NULL) - break; - cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); - cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; - cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; - cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; - add_loc_descr (&op0, cvt); - cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); - cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; - cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; - cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; - add_loc_descr (&op1, cvt); - } - } - else if (GET_MODE_CLASS (mode) == MODE_INT - && GET_MODE_SIZE (mode) < DWARF2_ADDR_SIZE) - { - int shift = DWARF2_ADDR_SIZE - GET_MODE_SIZE (mode); - shift *= BITS_PER_UNIT; - add_loc_descr (&op0, int_loc_descriptor (shift)); - add_loc_descr (&op0, new_loc_descr (DW_OP_shl, 0, 0)); - add_loc_descr (&op1, int_loc_descriptor (shift)); - add_loc_descr (&op1, new_loc_descr (DW_OP_shl, 0, 0)); - } - - if (GET_CODE (rtl) == SMIN || GET_CODE (rtl) == UMIN) - op = DW_OP_lt; - else - op = DW_OP_gt; - mem_loc_result = op0; - add_loc_descr (&mem_loc_result, op1); - add_loc_descr (&mem_loc_result, new_loc_descr (op, 0, 0)); - { - dw_loc_descr_ref bra_node, drop_node; - - bra_node = new_loc_descr (DW_OP_bra, 0, 0); - add_loc_descr (&mem_loc_result, bra_node); - add_loc_descr (&mem_loc_result, new_loc_descr (DW_OP_swap, 0, 0)); - drop_node = new_loc_descr (DW_OP_drop, 0, 0); - add_loc_descr (&mem_loc_result, drop_node); - bra_node->dw_loc_oprnd1.val_class = dw_val_class_loc; - bra_node->dw_loc_oprnd1.v.val_loc = drop_node; - } + mem_loc_result = minmax_loc_descriptor (rtl, mode, mem_mode); break; case ZERO_EXTRACT: @@ -14812,31 +15272,35 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, && (GET_CODE (rtl) == UNSIGNED_FIX || GET_MODE_SIZE (mode) < DWARF2_ADDR_SIZE)) { - enum machine_mode outer_mode = mode; - if (GET_MODE_SIZE (mode) < DWARF2_ADDR_SIZE) - { - outer_mode = mode_for_size (DWARF2_ADDR_SIZE * BITS_PER_UNIT, - MODE_INT, 0); - if (outer_mode == BLKmode - || GET_MODE_SIZE (outer_mode) != DWARF2_ADDR_SIZE) - break; - } - type_die = base_type_for_mode (outer_mode, 0); - if (type_die == NULL) + op0 = convert_descriptor_to_signed (mode, op0); + if (op0 == NULL) break; - cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0); - cvt->dw_loc_oprnd1.val_class = dw_val_class_die_ref; - cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die; - cvt->dw_loc_oprnd1.v.val_die_ref.external = 0; - add_loc_descr (&op0, cvt); } mem_loc_result = op0; } break; - case COMPARE: + case CLZ: + case CTZ: + case FFS: + mem_loc_result = clz_loc_descriptor (rtl, mode, mem_mode); + break; + + case POPCOUNT: + case PARITY: + mem_loc_result = popcount_loc_descriptor (rtl, mode, mem_mode); + break; + + case BSWAP: + mem_loc_result = bswap_loc_descriptor (rtl, mode, mem_mode); + break; + case ROTATE: case ROTATERT: + mem_loc_result = rotate_loc_descriptor (rtl, mode, mem_mode); + break; + + case COMPARE: case TRUNCATE: /* In theory, we could implement the above. */ /* DWARF cannot represent the unsigned compare operations @@ -14856,7 +15320,6 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, case US_ASHIFT: case SS_TRUNCATE: case US_TRUNCATE: - case UDIV: case UNORDERED: case ORDERED: case UNEQ: @@ -14870,12 +15333,6 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode, case SAT_FRACT: case UNSIGNED_SAT_FRACT: case SQRT: - case BSWAP: - case FFS: - case CLZ: - case CTZ: - case POPCOUNT: - case PARITY: case ASM_OPERANDS: case VEC_MERGE: case VEC_SELECT: @@ -19636,6 +20093,12 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) subr_die = new_die (DW_TAG_subprogram, context_die, decl); add_abstract_origin_attribute (subr_die, origin); + /* This is where the actual code for a cloned function is. + Let's emit linkage name attribute for it. This helps + debuggers to e.g, set breakpoints into + constructors/destructors when the user asks "break + K::K". */ + add_linkage_name (subr_die, decl); } else if (old_die) { @@ -23680,23 +24143,84 @@ resolve_one_addr (rtx *addr, void *data ATTRIBUTE_UNUSED) static bool resolve_addr_in_expr (dw_loc_descr_ref loc) { + dw_loc_descr_ref keep = NULL; for (; loc; loc = loc->dw_loc_next) - if (((loc->dw_loc_opc == DW_OP_addr || loc->dtprel) - && resolve_one_addr (&loc->dw_loc_oprnd1.v.val_addr, NULL)) - || (loc->dw_loc_opc == DW_OP_implicit_value - && loc->dw_loc_oprnd2.val_class == dw_val_class_addr - && resolve_one_addr (&loc->dw_loc_oprnd2.v.val_addr, NULL))) - return false; - else if (loc->dw_loc_opc == DW_OP_GNU_implicit_pointer - && loc->dw_loc_oprnd1.val_class == dw_val_class_decl_ref) + switch (loc->dw_loc_opc) { - dw_die_ref ref - = lookup_decl_die (loc->dw_loc_oprnd1.v.val_decl_ref); - if (ref == NULL) + case DW_OP_addr: + if (resolve_one_addr (&loc->dw_loc_oprnd1.v.val_addr, NULL)) + return false; + break; + case DW_OP_const4u: + case DW_OP_const8u: + if (loc->dtprel + && resolve_one_addr (&loc->dw_loc_oprnd1.v.val_addr, NULL)) + return false; + break; + case DW_OP_implicit_value: + if (loc->dw_loc_oprnd2.val_class == dw_val_class_addr + && resolve_one_addr (&loc->dw_loc_oprnd2.v.val_addr, NULL)) return false; - loc->dw_loc_oprnd1.val_class = dw_val_class_die_ref; - loc->dw_loc_oprnd1.v.val_die_ref.die = ref; - loc->dw_loc_oprnd1.v.val_die_ref.external = 0; + break; + case DW_OP_GNU_implicit_pointer: + if (loc->dw_loc_oprnd1.val_class == dw_val_class_decl_ref) + { + dw_die_ref ref + = lookup_decl_die (loc->dw_loc_oprnd1.v.val_decl_ref); + if (ref == NULL) + return false; + loc->dw_loc_oprnd1.val_class = dw_val_class_die_ref; + loc->dw_loc_oprnd1.v.val_die_ref.die = ref; + loc->dw_loc_oprnd1.v.val_die_ref.external = 0; + } + break; + case DW_OP_GNU_const_type: + case DW_OP_GNU_regval_type: + case DW_OP_GNU_deref_type: + case DW_OP_GNU_convert: + case DW_OP_GNU_reinterpret: + while (loc->dw_loc_next + && loc->dw_loc_next->dw_loc_opc == DW_OP_GNU_convert) + { + dw_die_ref base1, base2; + unsigned enc1, enc2, size1, size2; + if (loc->dw_loc_opc == DW_OP_GNU_regval_type + || loc->dw_loc_opc == DW_OP_GNU_deref_type) + base1 = loc->dw_loc_oprnd2.v.val_die_ref.die; + else + base1 = loc->dw_loc_oprnd1.v.val_die_ref.die; + base2 = loc->dw_loc_next->dw_loc_oprnd1.v.val_die_ref.die; + gcc_assert (base1->die_tag == DW_TAG_base_type + && base2->die_tag == DW_TAG_base_type); + enc1 = get_AT_unsigned (base1, DW_AT_encoding); + enc2 = get_AT_unsigned (base2, DW_AT_encoding); + size1 = get_AT_unsigned (base1, DW_AT_byte_size); + size2 = get_AT_unsigned (base2, DW_AT_byte_size); + if (size1 == size2 + && (((enc1 == DW_ATE_unsigned || enc1 == DW_ATE_signed) + && (enc2 == DW_ATE_unsigned || enc2 == DW_ATE_signed) + && loc != keep) + || enc1 == enc2)) + { + /* Optimize away next DW_OP_GNU_convert after + adjusting LOC's base type die reference. */ + if (loc->dw_loc_opc == DW_OP_GNU_regval_type + || loc->dw_loc_opc == DW_OP_GNU_deref_type) + loc->dw_loc_oprnd2.v.val_die_ref.die = base2; + else + loc->dw_loc_oprnd1.v.val_die_ref.die = base2; + loc->dw_loc_next = loc->dw_loc_next->dw_loc_next; + continue; + } + /* Don't change integer DW_OP_GNU_convert after e.g. floating + point typed stack entry. */ + else if (enc1 != DW_ATE_unsigned && enc1 != DW_ATE_signed) + keep = loc; + break; + } + break; + default: + break; } return true; } diff --git a/gcc/except.c b/gcc/except.c index 9578e2e907f..1e5c291055f 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -1457,7 +1457,7 @@ struct rtl_opt_pass pass_rtl_eh = { { RTL_PASS, - "rtl eh", /* name */ + "rtl_eh", /* name */ gate_handle_eh, /* gate */ rest_of_handle_eh, /* execute */ NULL, /* sub */ diff --git a/gcc/explow.c b/gcc/explow.c index fe507877c90..7387dad98df 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -1,6 +1,6 @@ /* Subroutines for manipulating rtx's in semantically interesting ways. - Copyright (C) 1987, 1991, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Copyright (C) 1987, 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, + 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -1249,38 +1249,6 @@ allocate_dynamic_stack_space (rtx size, unsigned size_align, size_align = extra_align; } -#ifdef SETJMP_VIA_SAVE_AREA - /* If setjmp restores regs from a save area in the stack frame, - avoid clobbering the reg save area. Note that the offset of - virtual_incoming_args_rtx includes the preallocated stack args space. - It would be no problem to clobber that, but it's on the wrong side - of the old save area. - - What used to happen is that, since we did not know for sure - whether setjmp() was invoked until after RTL generation, we - would use reg notes to store the "optimized" size and fix things - up later. These days we know this information before we ever - start building RTL so the reg notes are unnecessary. */ - if (cfun->calls_setjmp) - { - rtx dynamic_offset - = expand_binop (Pmode, sub_optab, virtual_stack_dynamic_rtx, - stack_pointer_rtx, NULL_RTX, 1, OPTAB_LIB_WIDEN); - - size = expand_binop (Pmode, add_optab, size, dynamic_offset, - NULL_RTX, 1, OPTAB_LIB_WIDEN); - - /* The above dynamic offset cannot be computed statically at this - point, but it will be possible to do so after RTL expansion is - done. Record how many times we will need to add it. */ - if (flag_stack_usage_info) - current_function_dynamic_alloc_count++; - - /* ??? Can we infer a minimum of STACK_BOUNDARY here? */ - size_align = BITS_PER_UNIT; - } -#endif /* SETJMP_VIA_SAVE_AREA */ - /* Round the size to a multiple of the required stack alignment. Since the stack if presumed to be rounded before this allocation, this will maintain the required alignment. diff --git a/gcc/expmed.c b/gcc/expmed.c index 5527c1e7112..314fac79c28 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -1341,7 +1341,7 @@ extract_bit_field_1 (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, unsigned int nwords = (bitsize + (BITS_PER_WORD - 1)) / BITS_PER_WORD; unsigned int i; - if (target == 0 || !REG_P (target)) + if (target == 0 || !REG_P (target) || !valid_multiword_target_p (target)) target = gen_reg_rtx (mode); /* Indicate for flow that the entire target reg is being set. */ diff --git a/gcc/final.c b/gcc/final.c index 7e1ae902477..af8047c1608 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -83,6 +83,7 @@ along with GCC; see the file COPYING3. If not see #include "ggc.h" #include "cfgloop.h" #include "params.h" +#include "tree-pretty-print.h" #ifdef XCOFF_DEBUGGING_INFO #include "xcoffout.h" /* Needed for external data @@ -4360,20 +4361,7 @@ rest_of_clean_state (void) } else { - const char *aname; - struct cgraph_node *node = cgraph_get_node (current_function_decl); - - aname = (IDENTIFIER_POINTER - (DECL_ASSEMBLER_NAME (current_function_decl))); - fprintf (final_output, "\n;; Function (%s) %s\n\n", aname, - node->frequency == NODE_FREQUENCY_HOT - ? " (hot)" - : node->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED - ? " (unlikely executed)" - : node->frequency == NODE_FREQUENCY_EXECUTED_ONCE - ? " (executed once)" - : ""); - + dump_function_header (final_output, current_function_decl); flag_dump_noaddr = flag_dump_unnumbered = 1; if (flag_compare_debug_opt || flag_compare_debug) dump_flags |= TDF_NOUID; diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index da086438ab5..532a30b1ab3 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,63 @@ +2011-06-02 Asher Langton <langton2@llnl.gov> + + PR fortran/49268 + * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray + pointees as AS_EXPLICIT. + +2011-06-02 Asher Langton <langton2@llnl.gov> + + PR fortran/37039 + * decl.c (variable_decl): Merge current_as before copying to cp_as. + +2011-06-02 Steven G. Kargl <kargl@gcc.gnu.org> + + PR fortran/49265 + * decl.c (gfc_match_modproc): Allow for a double colon in a module + procedure statement. + * parse.c ( decode_statement): Deal with whitespace around :: in + gfc_match_modproc. + +2011-05-31 Tobias Burnus <burnus@net-b.de> + + PR fortran/18918 + * intrinsic.c (klass): Add CLASS_ATOMIC. + (add_subroutines): Add atomic_ref/atomic_define. + * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document. + * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref, + gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes. + * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF + and GFC_ISYM_ATOMIC_REF. + (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars. + * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New + functions. + * check.c (gfc_check_atomic, gfc_check_atomic_def, + gfc_check_atomic_ref): New functions. + * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND, + ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value. + * trans-intrinsic.c (conv_intrinsic_atomic_def, + conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New + functions. + (conv_intrinsic_move_alloc) Renamed from + gfc_conv_intrinsic_move_alloc - and made static. + * trans.h (gfc_conv_intrinsic_move_alloc): Remove. + (gfc_conv_intrinsic_subroutine) Add prototype. + * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine. + * trans-types (gfc_atomic_int_kind, gfc_atomic_logical_kind): New + global vars. + (gfc_init_kinds): Set them. + +2011-05-31 Tobias Burnus <burnus@net-b.de> + + PR fortran/18918 + * trans-array.c (gfc_trans_dummy_array_bias): Handle + cobounds of assumed-shape arrays. + +2011-05-31 Tobias Burnus <burnus@net-b.de> + + PR fortran/18918 + * resolve.c (resolve_fl_variable): Handle static coarrays + with non-constant cobounds. + 2011-05-29 Janus Weil <janus@gcc.gnu.org> PR fortran/47601 diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 70c23e663e1..11789673115 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -973,6 +973,72 @@ gfc_check_atan2 (gfc_expr *y, gfc_expr *x) } +static gfc_try +gfc_check_atomic (gfc_expr *atom, gfc_expr *value) +{ + if (!(atom->ts.type == BT_INTEGER && atom->ts.kind == gfc_atomic_int_kind) + && !(atom->ts.type == BT_LOGICAL + && atom->ts.kind == gfc_atomic_logical_kind)) + { + gfc_error ("ATOM argument at %L to intrinsic function %s shall be an " + "integer of ATOMIC_INT_KIND or a logical of " + "ATOMIC_LOGICAL_KIND", &atom->where, gfc_current_intrinsic); + return FAILURE; + } + + if (!gfc_expr_attr (atom).codimension) + { + gfc_error ("ATOM argument at %L of the %s intrinsic function shall be a " + "coarray or coindexed", &atom->where, gfc_current_intrinsic); + return FAILURE; + } + + if (atom->ts.type != value->ts.type) + { + gfc_error ("ATOM and VALUE argument of the %s intrinsic function shall " + "have the same type at %L", gfc_current_intrinsic, + &value->where); + return FAILURE; + } + + return SUCCESS; +} + + +gfc_try +gfc_check_atomic_def (gfc_expr *atom, gfc_expr *value) +{ + if (scalar_check (atom, 0) == FAILURE || scalar_check (value, 1) == FAILURE) + return FAILURE; + + if (gfc_check_vardef_context (atom, false, NULL) == FAILURE) + { + gfc_error ("ATOM argument of the %s intrinsic function at %L shall be " + "definable", gfc_current_intrinsic, &atom->where); + return FAILURE; + } + + return gfc_check_atomic (atom, value); +} + + +gfc_try +gfc_check_atomic_ref (gfc_expr *value, gfc_expr *atom) +{ + if (scalar_check (value, 0) == FAILURE || scalar_check (atom, 1) == FAILURE) + return FAILURE; + + if (gfc_check_vardef_context (value, false, NULL) == FAILURE) + { + gfc_error ("VALUE argument of the %s intrinsic function at %L shall be " + "definable", gfc_current_intrinsic, &value->where); + return FAILURE; + } + + return gfc_check_atomic (atom, value); +} + + /* BESJN and BESYN functions. */ gfc_try diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index e97168fbad2..7098368e56e 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -1763,9 +1763,7 @@ variable_decl (int elem) /* Now we could see the optional array spec. or character length. */ m = gfc_match_array_spec (&as, true, true); - if (gfc_option.flag_cray_pointer && m == MATCH_YES) - cp_as = gfc_copy_array_spec (as); - else if (m == MATCH_ERROR) + if (m == MATCH_ERROR) goto cleanup; if (m == MATCH_NO) @@ -1773,6 +1771,9 @@ variable_decl (int elem) else if (current_as) merge_array_spec (current_as, as, true); + if (gfc_option.flag_cray_pointer) + cp_as = gfc_copy_array_spec (as); + /* At this point, we know for sure if the symbol is PARAMETER and can thus determine (and check) whether it can be implied-shape. If it was parsed as assumed-size, change it because PARAMETERs can not @@ -7016,6 +7017,7 @@ gfc_match_modproc (void) char name[GFC_MAX_SYMBOL_LEN + 1]; gfc_symbol *sym; match m; + locus old_locus; gfc_namespace *module_ns; gfc_interface *old_interface_head, *interface; @@ -7044,10 +7046,23 @@ gfc_match_modproc (void) end up with a syntax error and need to recover. */ old_interface_head = gfc_current_interface_head (); + /* Check if the F2008 optional double colon appears. */ + gfc_gobble_whitespace (); + old_locus = gfc_current_locus; + if (gfc_match ("::") == MATCH_YES) + { + if (gfc_notify_std (GFC_STD_F2008, "Fortran 2008: double colon in " + "MODULE PROCEDURE statement at %L", &old_locus) + == FAILURE) + return MATCH_ERROR; + } + else + gfc_current_locus = old_locus; + for (;;) { - locus old_locus = gfc_current_locus; bool last = false; + old_locus = gfc_current_locus; m = gfc_match_name (name); if (m == MATCH_NO) @@ -7059,6 +7074,7 @@ gfc_match_modproc (void) current namespace. */ if (gfc_match_eos () == MATCH_YES) last = true; + if (!last && gfc_match_char (',') != MATCH_YES) goto syntax; diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index 72e412b3b9f..ff824244d86 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -306,6 +306,8 @@ enum gfc_isym_id GFC_ISYM_ATAN, GFC_ISYM_ATAN2, GFC_ISYM_ATANH, + GFC_ISYM_ATOMIC_DEF, + GFC_ISYM_ATOMIC_REF, GFC_ISYM_BGE, GFC_ISYM_BGT, GFC_ISYM_BIT_SIZE, @@ -2464,6 +2466,8 @@ extern int gfc_default_character_kind; extern int gfc_default_logical_kind; extern int gfc_default_complex_kind; extern int gfc_c_int_kind; +extern int gfc_atomic_int_kind; +extern int gfc_atomic_logical_kind; extern int gfc_intio_kind; extern int gfc_charlen_int_kind; extern int gfc_numeric_storage_size; diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index 6151db77eda..1cce1447b04 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -51,7 +51,7 @@ sizing; enum klass { CLASS_IMPURE = 0, CLASS_PURE, CLASS_ELEMENTAL, - CLASS_INQUIRY, CLASS_TRANSFORMATIONAL }; + CLASS_INQUIRY, CLASS_TRANSFORMATIONAL, CLASS_ATOMIC }; #define ACTUAL_NO 0 #define ACTUAL_YES 1 @@ -2880,6 +2880,18 @@ add_subroutines (void) make_noreturn(); + add_sym_2s ("atomic_define", GFC_ISYM_ATOMIC_DEF, CLASS_ATOMIC, + BT_UNKNOWN, 0, GFC_STD_F2008, + gfc_check_atomic_def, NULL, gfc_resolve_atomic_def, + "atom", BT_INTEGER, di, REQUIRED, INTENT_OUT, + "value", BT_INTEGER, di, REQUIRED, INTENT_IN); + + add_sym_2s ("atomic_ref", GFC_ISYM_ATOMIC_REF, CLASS_ATOMIC, + BT_UNKNOWN, 0, GFC_STD_F2008, + gfc_check_atomic_ref, NULL, gfc_resolve_atomic_ref, + "value", BT_INTEGER, di, REQUIRED, INTENT_OUT, + "atom", BT_INTEGER, di, REQUIRED, INTENT_IN); + add_sym_1s ("cpu_time", GFC_ISYM_CPU_TIME, CLASS_IMPURE, BT_UNKNOWN, 0, GFC_STD_F95, gfc_check_cpu_time, NULL, gfc_resolve_cpu_time, tm, BT_REAL, dr, REQUIRED, INTENT_OUT); diff --git a/gcc/fortran/intrinsic.h b/gcc/fortran/intrinsic.h index 88ce0084856..e64325b99e7 100644 --- a/gcc/fortran/intrinsic.h +++ b/gcc/fortran/intrinsic.h @@ -39,6 +39,8 @@ gfc_try gfc_check_allocated (gfc_expr *); gfc_try gfc_check_associated (gfc_expr *, gfc_expr *); gfc_try gfc_check_atan_2 (gfc_expr *, gfc_expr *); gfc_try gfc_check_atan2 (gfc_expr *, gfc_expr *); +gfc_try gfc_check_atomic_def (gfc_expr *, gfc_expr *); +gfc_try gfc_check_atomic_ref (gfc_expr *, gfc_expr *); gfc_try gfc_check_besn (gfc_expr *, gfc_expr *); gfc_try gfc_check_bessel_n2 (gfc_expr *, gfc_expr *, gfc_expr *); gfc_try gfc_check_bge_bgt_ble_blt (gfc_expr *, gfc_expr *); @@ -414,6 +416,8 @@ void gfc_resolve_asinh (gfc_expr *, gfc_expr *); void gfc_resolve_atan (gfc_expr *, gfc_expr *); void gfc_resolve_atanh (gfc_expr *, gfc_expr *); void gfc_resolve_atan2 (gfc_expr *, gfc_expr *, gfc_expr *); +void gfc_resolve_atomic_def (gfc_code *); +void gfc_resolve_atomic_ref (gfc_code *); void gfc_resolve_besn (gfc_expr *, gfc_expr *, gfc_expr *); void gfc_resolve_bessel_n2 (gfc_expr *, gfc_expr *, gfc_expr *, gfc_expr *a); void gfc_resolve_btest (gfc_expr *, gfc_expr *, gfc_expr *); diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index 2ea4fc5271d..cb46a77e444 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -61,6 +61,8 @@ Some basic guidelines for editing this document: * @code{ATAN}: ATAN, Arctangent function * @code{ATAN2}: ATAN2, Arctangent function * @code{ATANH}: ATANH, Inverse hyperbolic tangent function +* @code{ATOMIC_DEFINE}: ATOMIC_DEFINE, Setting a variable atomically +* @code{ATOMIC_REF}: ATOMIC_REF, Obtaining the value of a variable atomically * @code{BESSEL_J0}: BESSEL_J0, Bessel function of the first kind of order 0 * @code{BESSEL_J1}: BESSEL_J1, Bessel function of the first kind of order 1 * @code{BESSEL_JN}: BESSEL_JN, Bessel function of the first kind @@ -1546,6 +1548,100 @@ Inverse function: @ref{TANH} +@node ATOMIC_DEFINE +@section @code{ATOMIC_DEFINE} --- Setting a variable atomically +@fnindex ATOMIC_DEFINE +@cindex Atomic subroutine, define + +@table @asis +@item @emph{Description}: +@code{ATOMIC_DEFINE(ATOM, VALUE)} defines the variable @var{ATOM} with the value +@var{VALUE} atomically. + +@item @emph{Standard}: +Fortran 2008 and later + +@item @emph{Class}: +Atomic subroutine + +@item @emph{Syntax}: +@code{CALL ATOMIC_DEFINE(ATOM, VALUE)} + +@item @emph{Arguments}: +@multitable @columnfractions .15 .70 +@item @var{ATOM} @tab Scalar coarray or coindexed variable of either integer + type with @code{ATOMIC_INT_KIND} kind or logical type + with @code{ATOMIC_LOGICAL_KIND} kind. +@item @var{VALURE} @tab Scalar and of the same type as @var{ATOM}. If the kind + is different, the value is converted to the kind of + @var{ATOM}. +@end multitable + +@item @emph{Example}: +@smallexample +program atomic + use iso_fortran_env + integer(atomic_int_kind) :: atom[*] + call atomic_define (atom[1], this_image()) +end program atomic +@end smallexample + +@item @emph{See also}: +@ref{ATOMIC_REF}, @ref{ISO_FORTRAN_ENV} +@end table + + + +@node ATOMIC_REF +@section @code{ATOMIC_REF} --- Obtaining the value of a variable atomically +@fnindex ATOMIC_REF +@cindex Atomic subroutine, reference + +@table @asis +@item @emph{Description}: +@code{ATOMIC_DEFINE(ATOM, VALUE)} atomically assigns the value of the +variable @var{ATOM} to @var{VALUE}. + +@item @emph{Standard}: +Fortran 2008 and later + +@item @emph{Class}: +Atomic subroutine + +@item @emph{Syntax}: +@code{CALL ATOMIC_REF(VALUE, ATOM)} + +@item @emph{Arguments}: +@multitable @columnfractions .15 .70 +@item @var{VALURE} @tab Scalar and of the same type as @var{ATOM}. If the kind + is different, the value is converted to the kind of + @var{ATOM}. +@item @var{ATOM} @tab Scalar coarray or coindexed variable of either integer + type with @code{ATOMIC_INT_KIND} kind or logical type + with @code{ATOMIC_LOGICAL_KIND} kind. +@end multitable + +@item @emph{Example}: +@smallexample +program atomic + use iso_fortran_env + logical(atomic_logical_kind) :: atom[*] + logical :: val + call atomic_ref (atom, .false.) + ! ... + call atomic_ref (atom, val) + if (val) then + print *, "Obtained" + end if +end program atomic +@end smallexample + +@item @emph{See also}: +@ref{ATOMIC_DEFINE}, @ref{ISO_FORTRAN_ENV} +@end table + + + @node BESSEL_J0 @section @code{BESSEL_J0} --- Bessel function of the first kind of order 0 @fnindex BESSEL_J0 diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c index 24c9f76d7fe..9d94e3b9107 100644 --- a/gcc/fortran/iresolve.c +++ b/gcc/fortran/iresolve.c @@ -2895,6 +2895,22 @@ create_formal_for_intents (gfc_actual_arglist* actual, const sym_intent* ints) void +gfc_resolve_atomic_def (gfc_code *c) +{ + const char *name = "atomic_define"; + c->resolved_sym = gfc_get_intrinsic_sub_symbol (name); +} + + +void +gfc_resolve_atomic_ref (gfc_code *c) +{ + const char *name = "atomic_ref"; + c->resolved_sym = gfc_get_intrinsic_sub_symbol (name); +} + + +void gfc_resolve_mvbits (gfc_code *c) { static const sym_intent INTENTS[] = {INTENT_IN, INTENT_IN, INTENT_IN, diff --git a/gcc/fortran/iso-fortran-env.def b/gcc/fortran/iso-fortran-env.def index 3586f076926..8ec70745e58 100644 --- a/gcc/fortran/iso-fortran-env.def +++ b/gcc/fortran/iso-fortran-env.def @@ -38,9 +38,9 @@ along with GCC; see the file COPYING3. If not see -- the standard that supports this type */ NAMED_INTCST (ISOFORTRANENV_FILE_ATOMIC_INT_KIND, "atomic_int_kind", \ - gfc_default_integer_kind, GFC_STD_F2008) + gfc_atomic_int_kind, GFC_STD_F2008) NAMED_INTCST (ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND, "atomic_logical_kind", \ - gfc_default_logical_kind, GFC_STD_F2008) + gfc_atomic_logical_kind, GFC_STD_F2008) NAMED_INTCST (ISOFORTRANENV_CHARACTER_STORAGE_SIZE, "character_storage_size", \ gfc_character_storage_size, GFC_STD_F2003) NAMED_INTCST (ISOFORTRANENV_ERROR_UNIT, "error_unit", GFC_STDERR_UNIT_NUMBER, \ diff --git a/gcc/fortran/parse.c b/gcc/fortran/parse.c index 80fcf001430..a47b4578169 100644 --- a/gcc/fortran/parse.c +++ b/gcc/fortran/parse.c @@ -399,7 +399,7 @@ decode_statement (void) break; case 'm': - match ("module% procedure% ", gfc_match_modproc, ST_MODULE_PROC); + match ("module% procedure", gfc_match_modproc, ST_MODULE_PROC); match ("module", gfc_match_module, ST_MODULE); break; diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 4b1852939f2..6ca98f2e721 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -10118,7 +10118,14 @@ resolve_fl_variable (gfc_symbol *sym, int mp_flag) /* Also, they must not have the SAVE attribute. SAVE_IMPLICIT is checked below. */ - if (sym->attr.save == SAVE_EXPLICIT) + if (sym->as && sym->attr.codimension) + { + int corank = sym->as->corank; + sym->as->corank = 0; + no_init_flag = automatic_flag = is_non_constant_shape_array (sym); + sym->as->corank = corank; + } + if (automatic_flag && sym->attr.save == SAVE_EXPLICIT) { gfc_error (auto_save_msg, sym->name, &sym->declared_at); return FAILURE; @@ -12337,6 +12344,7 @@ resolve_symbol (gfc_symbol *sym) if (((sym->ts.type == BT_DERIVED && sym->ts.u.derived->attr.coarray_comp) || sym->attr.codimension) && !(sym->attr.allocatable || sym->attr.dummy || sym->attr.save + || sym->ns->save_all || sym->ns->proc_name->attr.flavor == FL_MODULE || sym->ns->proc_name->attr.is_main_program || sym->attr.function || sym->attr.result || sym->attr.use_assoc)) diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index d83a7a9d8ec..c7aeadb3c8b 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -4648,6 +4648,43 @@ gfc_conv_array_initializer (tree type, gfc_expr * expr) } +/* Generate code to evaluate non-constant coarray cobounds. */ + +void +gfc_trans_array_cobounds (tree type, stmtblock_t * pblock, + const gfc_symbol *sym) +{ + int dim; + tree ubound; + tree lbound; + gfc_se se; + gfc_array_spec *as; + + as = sym->as; + + for (dim = as->rank; dim < as->rank + as->corank; dim++) + { + /* Evaluate non-constant array bound expressions. */ + lbound = GFC_TYPE_ARRAY_LBOUND (type, dim); + if (as->lower[dim] && !INTEGER_CST_P (lbound)) + { + gfc_init_se (&se, NULL); + gfc_conv_expr_type (&se, as->lower[dim], gfc_array_index_type); + gfc_add_block_to_block (pblock, &se.pre); + gfc_add_modify (pblock, lbound, se.expr); + } + ubound = GFC_TYPE_ARRAY_UBOUND (type, dim); + if (as->upper[dim] && !INTEGER_CST_P (ubound)) + { + gfc_init_se (&se, NULL); + gfc_conv_expr_type (&se, as->upper[dim], gfc_array_index_type); + gfc_add_block_to_block (pblock, &se.pre); + gfc_add_modify (pblock, ubound, se.expr); + } + } +} + + /* Generate code to evaluate non-constant array bounds. Sets *poffset and returns the size (in elements) of the array. */ @@ -4728,26 +4765,8 @@ gfc_trans_array_bounds (tree type, gfc_symbol * sym, tree * poffset, size = stride; } - for (dim = as->rank; dim < as->rank + as->corank; dim++) - { - /* Evaluate non-constant array bound expressions. */ - lbound = GFC_TYPE_ARRAY_LBOUND (type, dim); - if (as->lower[dim] && !INTEGER_CST_P (lbound)) - { - gfc_init_se (&se, NULL); - gfc_conv_expr_type (&se, as->lower[dim], gfc_array_index_type); - gfc_add_block_to_block (pblock, &se.pre); - gfc_add_modify (pblock, lbound, se.expr); - } - ubound = GFC_TYPE_ARRAY_UBOUND (type, dim); - if (as->upper[dim] && !INTEGER_CST_P (ubound)) - { - gfc_init_se (&se, NULL); - gfc_conv_expr_type (&se, as->upper[dim], gfc_array_index_type); - gfc_add_block_to_block (pblock, &se.pre); - gfc_add_modify (pblock, ubound, se.expr); - } - } + + gfc_trans_array_cobounds (type, pblock, sym); gfc_trans_vla_type_sizes (sym, pblock); *poffset = offset; @@ -5213,6 +5232,8 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, } } + gfc_trans_array_cobounds (type, &init, sym); + /* Set the offset. */ if (TREE_CODE (GFC_TYPE_ARRAY_OFFSET (type)) == VAR_DECL) gfc_add_modify (&init, GFC_TYPE_ARRAY_OFFSET (type), offset); diff --git a/gcc/fortran/trans-array.h b/gcc/fortran/trans-array.h index fef56ae8535..f29162e5b02 100644 --- a/gcc/fortran/trans-array.h +++ b/gcc/fortran/trans-array.h @@ -132,6 +132,9 @@ tree gfc_conv_array_stride (tree, int); tree gfc_conv_array_lbound (tree, int); tree gfc_conv_array_ubound (tree, int); +/* Set cobounds of an array. */ +void gfc_trans_array_cobounds (tree, stmtblock_t *, const gfc_symbol *); + /* Build expressions for accessing components of an array descriptor. */ tree gfc_conv_descriptor_data_get (tree); tree gfc_conv_descriptor_data_addr (tree); diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 299f2246d9c..a2259153563 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -1349,7 +1349,7 @@ gfc_get_symbol_decl (gfc_symbol * sym) } /* Remember this variable for allocation/cleanup. */ - if (sym->attr.dimension || sym->attr.allocatable + if (sym->attr.dimension || sym->attr.allocatable || sym->attr.codimension || (sym->ts.type == BT_CLASS && (CLASS_DATA (sym)->attr.dimension || CLASS_DATA (sym)->attr.allocatable)) @@ -3465,7 +3465,11 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block) if (sym->attr.dimension || sym->attr.codimension) { - switch (sym->as->type) + /* Assumed-size Cray pointees need to be treated as AS_EXPLICIT. */ + array_type tmp = sym->as->type; + if (tmp == AS_ASSUMED_SIZE && sym->as->cp_was_assumed) + tmp = AS_EXPLICIT; + switch (tmp) { case AS_EXPLICIT: if (sym->attr.dummy || sym->attr.result) @@ -3485,6 +3489,15 @@ gfc_trans_deferred_vars (gfc_symbol * proc_sym, gfc_wrapped_block * block) gfc_trans_deferred_array (sym, block); } } + else if (sym->attr.codimension && TREE_STATIC (sym->backend_decl)) + { + gfc_init_block (&tmpblock); + gfc_trans_array_cobounds (TREE_TYPE (sym->backend_decl), + &tmpblock, sym); + gfc_add_init_cleanup (block, gfc_finish_block (&tmpblock), + NULL_TREE); + continue; + } else if (gfc_option.coarray != GFC_FCOARRAY_LIB) { gfc_save_backend_locus (&loc); diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index 3cfaa0d4245..db2bbc14770 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -6952,8 +6952,44 @@ gfc_walk_intrinsic_function (gfc_ss * ss, gfc_expr * expr, } -tree -gfc_conv_intrinsic_move_alloc (gfc_code *code) +static tree +conv_intrinsic_atomic_def (gfc_code *code) +{ + gfc_se atom, value; + stmtblock_t block; + + gfc_init_se (&atom, NULL); + gfc_init_se (&value, NULL); + gfc_conv_expr (&atom, code->ext.actual->expr); + gfc_conv_expr (&value, code->ext.actual->next->expr); + + gfc_init_block (&block); + gfc_add_modify (&block, atom.expr, + fold_convert (TREE_TYPE (atom.expr), value.expr)); + return gfc_finish_block (&block); +} + + +static tree +conv_intrinsic_atomic_ref (gfc_code *code) +{ + gfc_se atom, value; + stmtblock_t block; + + gfc_init_se (&atom, NULL); + gfc_init_se (&value, NULL); + gfc_conv_expr (&value, code->ext.actual->expr); + gfc_conv_expr (&atom, code->ext.actual->next->expr); + + gfc_init_block (&block); + gfc_add_modify (&block, value.expr, + fold_convert (TREE_TYPE (value.expr), atom.expr)); + return gfc_finish_block (&block); +} + + +static tree +conv_intrinsic_move_alloc (gfc_code *code) { if (code->ext.actual->expr->rank == 0) { @@ -7002,4 +7038,33 @@ gfc_conv_intrinsic_move_alloc (gfc_code *code) } +tree +gfc_conv_intrinsic_subroutine (gfc_code *code) +{ + tree res; + + gcc_assert (code->resolved_isym); + + switch (code->resolved_isym->id) + { + case GFC_ISYM_MOVE_ALLOC: + res = conv_intrinsic_move_alloc (code); + break; + + case GFC_ISYM_ATOMIC_DEF: + res = conv_intrinsic_atomic_def (code); + break; + + case GFC_ISYM_ATOMIC_REF: + res = conv_intrinsic_atomic_ref (code); + break; + + default: + res = NULL_TREE; + break; + } + + return res; +} + #include "gt-fortran-trans-intrinsic.h" diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 02a75fd2819..6d384bedf16 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -118,6 +118,8 @@ int gfc_default_character_kind; int gfc_default_logical_kind; int gfc_default_complex_kind; int gfc_c_int_kind; +int gfc_atomic_int_kind; +int gfc_atomic_logical_kind; /* The kind size used for record offsets. If the target system supports kind=8, this will be set to 8, otherwise it is set to 4. */ @@ -578,6 +580,10 @@ gfc_init_kinds (void) /* Pick a kind the same size as the C "int" type. */ gfc_c_int_kind = INT_TYPE_SIZE / 8; + /* Choose atomic kinds to match C's int. */ + gfc_atomic_int_kind = gfc_c_int_kind; + gfc_atomic_logical_kind = gfc_c_int_kind; + /* initialize the C interoperable kinds */ init_c_interop_kinds(); } diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index 0ab4637851c..f2f13525b39 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -1245,15 +1245,20 @@ trans_code (gfc_code * code, tree cond) dependency check, too. */ { bool is_mvbits = false; + + if (code->resolved_isym) + { + res = gfc_conv_intrinsic_subroutine (code); + if (res != NULL_TREE) + break; + } + if (code->resolved_isym && code->resolved_isym->id == GFC_ISYM_MVBITS) is_mvbits = true; - if (code->resolved_isym - && code->resolved_isym->id == GFC_ISYM_MOVE_ALLOC) - res = gfc_conv_intrinsic_move_alloc (code); - else - res = gfc_trans_call (code, is_mvbits, NULL_TREE, - NULL_TREE, false); + + res = gfc_trans_call (code, is_mvbits, NULL_TREE, + NULL_TREE, false); } break; diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index 95cd9fbf151..e14e41f8a25 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -345,7 +345,8 @@ tree gfc_evaluate_now (tree, stmtblock_t *); /* Find the appropriate variant of a math intrinsic. */ tree gfc_builtin_decl_for_float_kind (enum built_in_function, int); -/* Intrinsic function handling. */ +/* Intrinsic procedure handling. */ +tree gfc_conv_intrinsic_subroutine (gfc_code *); void gfc_conv_intrinsic_function (gfc_se *, gfc_expr *); /* Is the intrinsic expanded inline. */ @@ -356,8 +357,6 @@ bool gfc_inline_intrinsic_function_p (gfc_expr *); gfc_inline_intrinsic_function_p returns true. */ int gfc_is_intrinsic_libcall (gfc_expr *); -tree gfc_conv_intrinsic_move_alloc (gfc_code *); - /* Used to call ordinary functions/subroutines and procedure pointer components. */ int gfc_conv_procedure_call (gfc_se *, gfc_symbol *, gfc_actual_arglist *, diff --git a/gcc/function.c b/gcc/function.c index c0350be5b17..30cc9ff2b4f 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1937,17 +1937,6 @@ instantiate_virtual_regs (void) frame_pointer_rtx. */ virtuals_instantiated = 1; - /* See allocate_dynamic_stack_space for the rationale. */ -#ifdef SETJMP_VIA_SAVE_AREA - if (flag_stack_usage_info && cfun->calls_setjmp) - { - int align = PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT; - dynamic_offset = (dynamic_offset + align - 1) / align * align; - current_function_dynamic_stack_size - += current_function_dynamic_alloc_count * dynamic_offset; - } -#endif - return 0; } diff --git a/gcc/function.h b/gcc/function.h index 0e8bc74aaa5..3b572cc16a7 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -1,6 +1,6 @@ /* Structure for saving state for a nested function. Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -476,9 +476,6 @@ struct GTY(()) stack_usage !ACCUMULATE_OUTGOING_ARGS, it contains the outgoing arguments. */ int pushed_stack_size; - /* # of dynamic allocations in the function. */ - unsigned int dynamic_alloc_count : 31; - /* Nonzero if the amount of stack space allocated dynamically cannot be bounded at compile-time. */ unsigned int has_unbounded_dynamic_stack_size : 1; @@ -487,7 +484,6 @@ struct GTY(()) stack_usage #define current_function_static_stack_size (cfun->su->static_stack_size) #define current_function_dynamic_stack_size (cfun->su->dynamic_stack_size) #define current_function_pushed_stack_size (cfun->su->pushed_stack_size) -#define current_function_dynamic_alloc_count (cfun->su->dynamic_alloc_count) #define current_function_has_unbounded_dynamic_stack_size \ (cfun->su->has_unbounded_dynamic_stack_size) #define current_function_allocates_dynamic_stack_space \ diff --git a/gcc/gcc.c b/gcc/gcc.c index c43e45ab427..eb917cdd995 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -3277,7 +3277,7 @@ driver_handle_option (struct gcc_options *opts, compare_debug_with_arg: gcc_assert (decoded->canonical_option_num_elements == 1); gcc_assert (arg != NULL); - if (arg) + if (*arg) compare_debug = 1; else compare_debug = -1; diff --git a/gcc/gengtype-state.c b/gcc/gengtype-state.c index e9aa5d2ed85..a885d28359e 100644 --- a/gcc/gengtype-state.c +++ b/gcc/gengtype-state.c @@ -2137,7 +2137,7 @@ read_state_param_structs (type_p *param_structs) int nbparamstructs = 0; int countparamstructs = 0; type_p head = NULL; - type_p previous; + type_p previous = NULL; type_p tmp; struct state_token_st *t0 = peek_state_token (0); struct state_token_st *t1 = peek_state_token (1); diff --git a/gcc/gimple.c b/gcc/gimple.c index 0cbd443337b..6a9b58d6023 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -4749,21 +4749,12 @@ tree gimple_register_canonical_type (tree t) { void **slot; - tree orig_t = t; gcc_assert (TYPE_P (t)); if (TYPE_CANONICAL (t)) return TYPE_CANONICAL (t); - /* Use the leader of our main variant for determining our canonical - type. The main variant leader is a type that will always - prevail. */ - t = gimple_register_type (TYPE_MAIN_VARIANT (t)); - - if (TYPE_CANONICAL (t)) - return TYPE_CANONICAL (t); - if (gimple_canonical_types == NULL) gimple_canonical_types = htab_create_ggc (16381, gimple_canonical_type_hash, gimple_canonical_type_eq, 0); @@ -4783,9 +4774,6 @@ gimple_register_canonical_type (tree t) *slot = (void *) t; } - /* Also cache the canonical type in the non-leaders. */ - TYPE_CANONICAL (orig_t) = t; - return t; } diff --git a/gcc/godump.c b/gcc/godump.c index e0d50b5d1b0..3f78eead279 100644 --- a/gcc/godump.c +++ b/gcc/godump.c @@ -700,7 +700,7 @@ go_format_type (struct godump_container *container, tree type, { char buf[100]; - obstack_grow (ob, "Godump_", 2); + obstack_grow (ob, "Godump_", 7); snprintf (buf, sizeof buf, "%d", i); obstack_grow (ob, buf, strlen (buf)); i++; diff --git a/gcc/ipa-utils.c b/gcc/ipa-utils.c index de4f4b6e107..91fe839577d 100644 --- a/gcc/ipa-utils.c +++ b/gcc/ipa-utils.c @@ -67,6 +67,7 @@ struct searchc_env { int order_pos; splay_tree nodes_marked_new; bool reduce; + bool allow_overwritable; int count; }; @@ -101,11 +102,14 @@ searchc (struct searchc_env* env, struct cgraph_node *v, { struct ipa_dfs_info * w_info; struct cgraph_node *w = edge->callee; + enum availability avail = cgraph_function_body_availability (w); if (ignore_edge && ignore_edge (edge)) continue; - if (w->aux && cgraph_function_body_availability (edge->callee) > AVAIL_OVERWRITABLE) + if (w->aux + && (avail > AVAIL_OVERWRITABLE + || (env->allow_overwritable && avail == AVAIL_OVERWRITABLE))) { w_info = (struct ipa_dfs_info *) w->aux; if (w_info->new_node) @@ -134,6 +138,7 @@ searchc (struct searchc_env* env, struct cgraph_node *v, x = env->stack[--(env->stack_size)]; x_info = (struct ipa_dfs_info *) x->aux; x_info->on_stack = false; + x_info->scc_no = v_info->dfn_number; if (env->reduce) { @@ -171,6 +176,7 @@ ipa_reduced_postorder (struct cgraph_node **order, env.nodes_marked_new = splay_tree_new (splay_tree_compare_ints, 0, 0); env.count = 1; env.reduce = reduce; + env.allow_overwritable = allow_overwritable; for (node = cgraph_nodes; node; node = node->next) { diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h index 7b49e6a1c94..7e2190eaee5 100644 --- a/gcc/ipa-utils.h +++ b/gcc/ipa-utils.h @@ -26,6 +26,9 @@ along with GCC; see the file COPYING3. If not see struct ipa_dfs_info { int dfn_number; int low_link; + /* This field will have the samy value for any two nodes in the same strongly + connected component. */ + int scc_no; bool new_node; bool on_stack; struct cgraph_node* next_cycle; diff --git a/gcc/ipa.c b/gcc/ipa.c index 0ac325b5d0f..f40c0aa2efb 100644 --- a/gcc/ipa.c +++ b/gcc/ipa.c @@ -1145,7 +1145,7 @@ struct ipa_opt_pass_d pass_ipa_profile = { { IPA_PASS, - "ipa-profile", /* name */ + "profile_estimate", /* name */ gate_ipa_profile, /* gate */ ipa_profile, /* execute */ NULL, /* sub */ diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 22f44ad9783..1d2f92e9d1e 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -49,6 +49,8 @@ static void output_varpool (cgraph_node_set, varpool_node_set); static void output_cgraph_opt_summary (cgraph_node_set set); static void input_cgraph_opt_summary (VEC (cgraph_node_ptr, heap) * nodes); +/* Number of LDPR values known to GCC. */ +#define LDPR_NUM_KNOWN (LDPR_RESOLVED_DYN + 1) /* Cgraph streaming is organized as set of record whose type is indicated by a tag. */ @@ -62,7 +64,8 @@ enum LTO_cgraph_tags LTO_cgraph_analyzed_node, /* Cgraph edges. */ LTO_cgraph_edge, - LTO_cgraph_indirect_edge + LTO_cgraph_indirect_edge, + LTO_cgraph_last_tag }; /* Create a new cgraph encoder. */ @@ -262,9 +265,11 @@ lto_output_edge (struct lto_simple_output_block *ob, struct cgraph_edge *edge, struct bitpack_d bp; if (edge->indirect_unknown_callee) - lto_output_uleb128_stream (ob->main_stream, LTO_cgraph_indirect_edge); + lto_output_enum (ob->main_stream, LTO_cgraph_tags, LTO_cgraph_last_tag, + LTO_cgraph_indirect_edge); else - lto_output_uleb128_stream (ob->main_stream, LTO_cgraph_edge); + lto_output_enum (ob->main_stream, LTO_cgraph_tags, LTO_cgraph_last_tag, + LTO_cgraph_edge); ref = lto_cgraph_encoder_lookup (encoder, edge->caller); gcc_assert (ref != LCC_NOT_FOUND); @@ -282,9 +287,10 @@ lto_output_edge (struct lto_simple_output_block *ob, struct cgraph_edge *edge, bp = bitpack_create (ob->main_stream); uid = (!gimple_has_body_p (edge->caller->decl) ? edge->lto_stmt_uid : gimple_uid (edge->call_stmt)); - bp_pack_value (&bp, uid, HOST_BITS_PER_INT); - bp_pack_value (&bp, edge->inline_failed, HOST_BITS_PER_INT); - bp_pack_value (&bp, edge->frequency, HOST_BITS_PER_INT); + bp_pack_enum (&bp, cgraph_inline_failed_enum, + CIF_N_REASONS, edge->inline_failed); + bp_pack_var_len_unsigned (&bp, uid); + bp_pack_var_len_unsigned (&bp, edge->frequency); bp_pack_value (&bp, edge->indirect_inlining_edge, 1); bp_pack_value (&bp, edge->call_stmt_cannot_inline_p, 1); bp_pack_value (&bp, edge->can_throw_external, 1); @@ -415,7 +421,7 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, else tag = LTO_cgraph_unavail_node; - lto_output_uleb128_stream (ob->main_stream, tag); + lto_output_enum (ob->main_stream, LTO_cgraph_tags, LTO_cgraph_last_tag, tag); /* In WPA mode, we only output part of the call-graph. Also, we fake cgraph node attributes. There are two cases that we care. @@ -503,8 +509,9 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, bp_pack_value (&bp, node->only_called_at_startup, 1); bp_pack_value (&bp, node->only_called_at_exit, 1); bp_pack_value (&bp, node->thunk.thunk_p && !boundary_p, 1); + bp_pack_enum (&bp, ld_plugin_symbol_resolution, + LDPR_NUM_KNOWN, node->resolution); lto_output_bitpack (&bp); - lto_output_uleb128_stream (ob->main_stream, node->resolution); if (node->thunk.thunk_p && !boundary_p) { @@ -534,7 +541,8 @@ lto_output_node (struct lto_simple_output_block *ob, struct cgraph_node *node, lto_output_fn_decl_index (ob->decl_state, ob->main_stream, alias->thunk.alias); gcc_assert (cgraph_get_node (alias->thunk.alias) == node); - lto_output_uleb128_stream (ob->main_stream, alias->resolution); + lto_output_enum (ob->main_stream, ld_plugin_symbol_resolution, + LDPR_NUM_KNOWN, alias->resolution); alias = alias->previous; } while (alias); @@ -595,7 +603,8 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, struct varpool_node else ref = LCC_NOT_FOUND; lto_output_sleb128_stream (ob->main_stream, ref); - lto_output_uleb128_stream (ob->main_stream, node->resolution); + lto_output_enum (ob->main_stream, ld_plugin_symbol_resolution, + LDPR_NUM_KNOWN, node->resolution); if (count) { @@ -603,7 +612,8 @@ lto_output_varpool_node (struct lto_simple_output_block *ob, struct varpool_node for (alias = node->extra_name; alias; alias = alias->next) { lto_output_var_decl_index (ob->decl_state, ob->main_stream, alias->decl); - lto_output_uleb128_stream (ob->main_stream, alias->resolution); + lto_output_enum (ob->main_stream, ld_plugin_symbol_resolution, + LDPR_NUM_KNOWN, alias->resolution); } } } @@ -909,8 +919,7 @@ static void input_overwrite_node (struct lto_file_decl_data *file_data, struct cgraph_node *node, enum LTO_cgraph_tags tag, - struct bitpack_d *bp, - enum ld_plugin_symbol_resolution resolution) + struct bitpack_d *bp) { node->aux = (void *) tag; node->local.lto_file_data = file_data; @@ -946,7 +955,8 @@ input_overwrite_node (struct lto_file_decl_data *file_data, node->only_called_at_startup = bp_unpack_value (bp, 1); node->only_called_at_exit = bp_unpack_value (bp, 1); node->thunk.thunk_p = bp_unpack_value (bp, 1); - node->resolution = resolution; + node->resolution = bp_unpack_enum (bp, ld_plugin_symbol_resolution, + LDPR_NUM_KNOWN); } /* Output the part of the cgraph in SET. */ @@ -989,7 +999,6 @@ input_node (struct lto_file_decl_data *file_data, int ref = LCC_NOT_FOUND, ref2 = LCC_NOT_FOUND; unsigned long same_body_count = 0; int clone_ref; - enum ld_plugin_symbol_resolution resolution; clone_ref = lto_input_sleb128 (ib); @@ -1021,8 +1030,7 @@ input_node (struct lto_file_decl_data *file_data, "node %d", node->uid); bp = lto_input_bitpack (ib); - resolution = (enum ld_plugin_symbol_resolution)lto_input_uleb128 (ib); - input_overwrite_node (file_data, node, tag, &bp, resolution); + input_overwrite_node (file_data, node, tag, &bp); /* Store a reference for now, and fix up later to be a pointer. */ node->global.inlined_to = (cgraph_node_ptr) (intptr_t) ref; @@ -1058,7 +1066,8 @@ input_node (struct lto_file_decl_data *file_data, real_alias = lto_file_decl_data_get_fn_decl (file_data, decl_index); alias = cgraph_same_body_alias (node, alias_decl, real_alias); gcc_assert (alias); - alias->resolution = (enum ld_plugin_symbol_resolution)lto_input_uleb128 (ib); + alias->resolution = lto_input_enum (ib, ld_plugin_symbol_resolution, + LDPR_NUM_KNOWN); } return node; } @@ -1102,7 +1111,8 @@ input_varpool_node (struct lto_file_decl_data *file_data, ref = lto_input_sleb128 (ib); /* Store a reference for now, and fix up later to be a pointer. */ node->same_comdat_group = (struct varpool_node *) (intptr_t) ref; - node->resolution = (enum ld_plugin_symbol_resolution)lto_input_uleb128 (ib); + node->resolution = lto_input_enum (ib, ld_plugin_symbol_resolution, + LDPR_NUM_KNOWN); if (aliases_p) { count = lto_input_uleb128 (ib); @@ -1112,7 +1122,8 @@ input_varpool_node (struct lto_file_decl_data *file_data, lto_input_uleb128 (ib)); struct varpool_node *alias; alias = varpool_extra_name_alias (decl, var_decl); - alias->resolution = (enum ld_plugin_symbol_resolution)lto_input_uleb128 (ib); + alias->resolution = lto_input_enum (ib, ld_plugin_symbol_resolution, + LDPR_NUM_KNOWN); } } return node; @@ -1179,10 +1190,9 @@ input_edge (struct lto_input_block *ib, VEC(cgraph_node_ptr, heap) *nodes, count = (gcov_type) lto_input_sleb128 (ib); bp = lto_input_bitpack (ib); - stmt_id = (unsigned int) bp_unpack_value (&bp, HOST_BITS_PER_INT); - inline_failed = (cgraph_inline_failed_t) bp_unpack_value (&bp, - HOST_BITS_PER_INT); - freq = (int) bp_unpack_value (&bp, HOST_BITS_PER_INT); + inline_failed = bp_unpack_enum (&bp, cgraph_inline_failed_enum, CIF_N_REASONS); + stmt_id = bp_unpack_var_len_unsigned (&bp); + freq = (int) bp_unpack_var_len_unsigned (&bp); if (indirect) edge = cgraph_create_indirect_edge (caller, NULL, 0, count, freq); @@ -1225,7 +1235,7 @@ input_cgraph_1 (struct lto_file_decl_data *file_data, unsigned i; unsigned HOST_WIDE_INT len; - tag = (enum LTO_cgraph_tags) lto_input_uleb128 (ib); + tag = lto_input_enum (ib, LTO_cgraph_tags, LTO_cgraph_last_tag); while (tag) { if (tag == LTO_cgraph_edge) @@ -1241,7 +1251,7 @@ input_cgraph_1 (struct lto_file_decl_data *file_data, lto_cgraph_encoder_encode (file_data->cgraph_node_encoder, node); } - tag = (enum LTO_cgraph_tags) lto_input_uleb128 (ib); + tag = lto_input_enum (ib, LTO_cgraph_tags, LTO_cgraph_last_tag); } /* Input toplevel asms. */ diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 88966f2d03d..3a5eb5a63fe 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -1533,31 +1533,6 @@ lto_input_constructors_and_inits (struct lto_file_decl_data *file_data, } -/* Return the resolution for the decl with index INDEX from DATA_IN. */ - -static enum ld_plugin_symbol_resolution -get_resolution (struct data_in *data_in, unsigned index) -{ - if (data_in->globals_resolution) - { - ld_plugin_symbol_resolution_t ret; - /* We can have references to not emitted functions in - DECL_FUNCTION_PERSONALITY at least. So we can and have - to indeed return LDPR_UNKNOWN in some cases. */ - if (VEC_length (ld_plugin_symbol_resolution_t, - data_in->globals_resolution) <= index) - return LDPR_UNKNOWN; - ret = VEC_index (ld_plugin_symbol_resolution_t, - data_in->globals_resolution, - index); - return ret; - } - else - /* Delay resolution finding until decl merging. */ - return LDPR_UNKNOWN; -} - - /* Unpack all the non-pointer fields of the TS_BASE structure of expression EXPR from bitpack BP. */ @@ -1864,24 +1839,6 @@ unpack_value_fields (struct bitpack_d *bp, tree expr) if (CODE_CONTAINS_STRUCT (code, TS_BLOCK)) unpack_ts_block_value_fields (bp, expr); - if (CODE_CONTAINS_STRUCT (code, TS_SSA_NAME)) - { - /* We only stream the version number of SSA names. */ - gcc_unreachable (); - } - - if (CODE_CONTAINS_STRUCT (code, TS_STATEMENT_LIST)) - { - /* This is only used by GENERIC. */ - gcc_unreachable (); - } - - if (CODE_CONTAINS_STRUCT (code, TS_OMP_CLAUSE)) - { - /* This is only used by High GIMPLE. */ - gcc_unreachable (); - } - if (CODE_CONTAINS_STRUCT (code, TS_TRANSLATION_UNIT_DECL)) unpack_ts_translation_unit_decl_value_fields (bp, expr); } @@ -2433,38 +2390,15 @@ lto_input_tree_pointers (struct lto_input_block *ib, struct data_in *data_in, if (CODE_CONTAINS_STRUCT (code, TS_EXP)) lto_input_ts_exp_tree_pointers (ib, data_in, expr); - if (CODE_CONTAINS_STRUCT (code, TS_SSA_NAME)) - { - /* We only stream the version number of SSA names. */ - gcc_unreachable (); - } - if (CODE_CONTAINS_STRUCT (code, TS_BLOCK)) lto_input_ts_block_tree_pointers (ib, data_in, expr); if (CODE_CONTAINS_STRUCT (code, TS_BINFO)) lto_input_ts_binfo_tree_pointers (ib, data_in, expr); - if (CODE_CONTAINS_STRUCT (code, TS_STATEMENT_LIST)) - { - /* This should only appear in GENERIC. */ - gcc_unreachable (); - } - if (CODE_CONTAINS_STRUCT (code, TS_CONSTRUCTOR)) lto_input_ts_constructor_tree_pointers (ib, data_in, expr); - if (CODE_CONTAINS_STRUCT (code, TS_OMP_CLAUSE)) - { - /* This should only appear in High GIMPLE. */ - gcc_unreachable (); - } - - if (CODE_CONTAINS_STRUCT (code, TS_OPTIMIZATION)) - { - sorry ("optimization options not supported yet"); - } - if (CODE_CONTAINS_STRUCT (code, TS_TARGET_OPTION)) lto_input_ts_target_option (ib, expr); @@ -2473,117 +2407,6 @@ lto_input_tree_pointers (struct lto_input_block *ib, struct data_in *data_in, } -/* Register DECL with the global symbol table and change its - name if necessary to avoid name clashes for static globals across - different files. */ - -static void -lto_register_var_decl_in_symtab (struct data_in *data_in, tree decl) -{ - tree context; - - /* Variable has file scope, not local. Need to ensure static variables - between different files don't clash unexpectedly. */ - if (!TREE_PUBLIC (decl) - && !((context = decl_function_context (decl)) - && auto_var_in_fn_p (decl, context))) - { - /* ??? We normally pre-mangle names before we serialize them - out. Here, in lto1, we do not know the language, and - thus cannot do the mangling again. Instead, we just - append a suffix to the mangled name. The resulting name, - however, is not a properly-formed mangled name, and will - confuse any attempt to unmangle it. */ - const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - char *label; - - ASM_FORMAT_PRIVATE_NAME (label, name, DECL_UID (decl)); - SET_DECL_ASSEMBLER_NAME (decl, get_identifier (label)); - rest_of_decl_compilation (decl, 1, 0); - - VEC_safe_push (tree, gc, lto_global_var_decls, decl); - } - - /* If this variable has already been declared, queue the - declaration for merging. */ - if (TREE_PUBLIC (decl)) - { - unsigned ix; - if (!lto_streamer_cache_lookup (data_in->reader_cache, decl, &ix)) - gcc_unreachable (); - lto_symtab_register_decl (decl, get_resolution (data_in, ix), - data_in->file_data); - } -} - - - -/* Register DECL with the global symbol table and change its - name if necessary to avoid name clashes for static globals across - different files. DATA_IN contains descriptors and tables for the - file being read. */ - -static void -lto_register_function_decl_in_symtab (struct data_in *data_in, tree decl) -{ - /* Need to ensure static entities between different files - don't clash unexpectedly. */ - if (!TREE_PUBLIC (decl)) - { - /* We must not use the DECL_ASSEMBLER_NAME macro here, as it - may set the assembler name where it was previously empty. */ - tree old_assembler_name = decl->decl_with_vis.assembler_name; - - /* FIXME lto: We normally pre-mangle names before we serialize - them out. Here, in lto1, we do not know the language, and - thus cannot do the mangling again. Instead, we just append a - suffix to the mangled name. The resulting name, however, is - not a properly-formed mangled name, and will confuse any - attempt to unmangle it. */ - const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); - char *label; - - ASM_FORMAT_PRIVATE_NAME (label, name, DECL_UID (decl)); - SET_DECL_ASSEMBLER_NAME (decl, get_identifier (label)); - - /* We may arrive here with the old assembler name not set - if the function body is not needed, e.g., it has been - inlined away and does not appear in the cgraph. */ - if (old_assembler_name) - { - tree new_assembler_name = DECL_ASSEMBLER_NAME (decl); - - /* Make the original assembler name available for later use. - We may have used it to indicate the section within its - object file where the function body may be found. - FIXME lto: Find a better way to maintain the function decl - to body section mapping so we don't need this hack. */ - lto_record_renamed_decl (data_in->file_data, - IDENTIFIER_POINTER (old_assembler_name), - IDENTIFIER_POINTER (new_assembler_name)); - - /* Also register the reverse mapping so that we can find the - new name given to an existing assembler name (used when - restoring alias pairs in input_constructors_or_inits. */ - lto_record_renamed_decl (data_in->file_data, - IDENTIFIER_POINTER (new_assembler_name), - IDENTIFIER_POINTER (old_assembler_name)); - } - } - - /* If this variable has already been declared, queue the - declaration for merging. */ - if (TREE_PUBLIC (decl) && !DECL_ABSTRACT (decl)) - { - unsigned ix; - if (!lto_streamer_cache_lookup (data_in->reader_cache, decl, &ix)) - gcc_unreachable (); - lto_symtab_register_decl (decl, get_resolution (data_in, ix), - data_in->file_data); - } -} - - /* Read an index IX from input block IB and return the tree node at DATA_IN->FILE_DATA->GLOBALS_INDEX[IX]. */ @@ -2665,11 +2488,6 @@ lto_read_tree (struct lto_input_block *ib, struct data_in *data_in, if (TREE_CODE (result) == FUNCTION_DECL) gcc_assert (!lto_stream_as_builtin_p (result)); - if (TREE_CODE (result) == VAR_DECL) - lto_register_var_decl_in_symtab (data_in, result); - else if (TREE_CODE (result) == FUNCTION_DECL && !DECL_BUILT_IN (result)) - lto_register_function_decl_in_symtab (data_in, result); - /* end_marker = */ lto_input_1_unsigned (ib); #ifdef LTO_STREAMER_DEBUG diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index b3b81bdf917..66b1ac6f100 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -589,24 +589,6 @@ pack_value_fields (struct bitpack_d *bp, tree expr) if (CODE_CONTAINS_STRUCT (code, TS_BLOCK)) pack_ts_block_value_fields (bp, expr); - if (CODE_CONTAINS_STRUCT (code, TS_SSA_NAME)) - { - /* We only stream the version number of SSA names. */ - gcc_unreachable (); - } - - if (CODE_CONTAINS_STRUCT (code, TS_STATEMENT_LIST)) - { - /* This is only used by GENERIC. */ - gcc_unreachable (); - } - - if (CODE_CONTAINS_STRUCT (code, TS_OMP_CLAUSE)) - { - /* This is only used by High GIMPLE. */ - gcc_unreachable (); - } - if (CODE_CONTAINS_STRUCT (code, TS_TRANSLATION_UNIT_DECL)) pack_ts_translation_unit_decl_value_fields (bp, expr); } @@ -931,11 +913,6 @@ lto_output_ts_decl_non_common_tree_pointers (struct output_block *ob, { if (TREE_CODE (expr) == FUNCTION_DECL) { - /* DECL_SAVED_TREE holds the GENERIC representation for DECL. - At this point, it should not exist. Either because it was - converted to gimple or because DECL didn't have a GENERIC - representation in this TU. */ - gcc_assert (DECL_SAVED_TREE (expr) == NULL_TREE); lto_output_tree_or_ref (ob, DECL_ARGUMENTS (expr), ref_p); lto_output_tree_or_ref (ob, DECL_RESULT (expr), ref_p); } @@ -955,7 +932,7 @@ lto_output_ts_decl_with_vis_tree_pointers (struct output_block *ob, tree expr, if (DECL_ASSEMBLER_NAME_SET_P (expr)) lto_output_tree_or_ref (ob, DECL_ASSEMBLER_NAME (expr), ref_p); else - output_zero (ob); + output_record_start (ob, LTO_null); lto_output_tree_or_ref (ob, DECL_SECTION_NAME (expr), ref_p); lto_output_tree_or_ref (ob, DECL_COMDAT_GROUP (expr), ref_p); @@ -1136,7 +1113,7 @@ lto_output_ts_binfo_tree_pointers (struct output_block *ob, tree expr, is needed to build the empty BINFO node on the reader side. */ FOR_EACH_VEC_ELT (tree, BINFO_BASE_BINFOS (expr), i, t) lto_output_tree_or_ref (ob, t, ref_p); - output_zero (ob); + output_record_start (ob, LTO_null); lto_output_tree_or_ref (ob, BINFO_OFFSET (expr), ref_p); lto_output_tree_or_ref (ob, BINFO_VTABLE (expr), ref_p); @@ -1256,12 +1233,6 @@ lto_output_tree_pointers (struct output_block *ob, tree expr, bool ref_p) if (CODE_CONTAINS_STRUCT (code, TS_EXP)) lto_output_ts_exp_tree_pointers (ob, expr, ref_p); - if (CODE_CONTAINS_STRUCT (code, TS_SSA_NAME)) - { - /* We only stream the version number of SSA names. */ - gcc_unreachable (); - } - if (CODE_CONTAINS_STRUCT (code, TS_BLOCK)) lto_output_ts_block_tree_pointers (ob, expr, ref_p); @@ -1271,21 +1242,6 @@ lto_output_tree_pointers (struct output_block *ob, tree expr, bool ref_p) if (CODE_CONTAINS_STRUCT (code, TS_CONSTRUCTOR)) lto_output_ts_constructor_tree_pointers (ob, expr, ref_p); - if (CODE_CONTAINS_STRUCT (code, TS_STATEMENT_LIST)) - { - /* This should only appear in GENERIC. */ - gcc_unreachable (); - } - - if (CODE_CONTAINS_STRUCT (code, TS_OMP_CLAUSE)) - { - /* This should only appear in High GIMPLE. */ - gcc_unreachable (); - } - - if (CODE_CONTAINS_STRUCT (code, TS_OPTIMIZATION)) - sorry ("gimple bytecode streams do not support the optimization attribute"); - if (CODE_CONTAINS_STRUCT (code, TS_TARGET_OPTION)) lto_output_ts_target_option (ob, expr); @@ -1430,7 +1386,7 @@ lto_output_tree (struct output_block *ob, tree expr, bool ref_p) if (expr == NULL_TREE) { - output_zero (ob); + output_record_start (ob, LTO_null); return; } @@ -1486,7 +1442,7 @@ output_eh_try_list (struct output_block *ob, eh_catch first) lto_output_tree_ref (ob, n->label); } - output_zero (ob); + output_record_start (ob, LTO_null); } @@ -1501,7 +1457,7 @@ output_eh_region (struct output_block *ob, eh_region r) if (r == NULL) { - output_zero (ob); + output_record_start (ob, LTO_null); return; } @@ -1564,7 +1520,7 @@ output_eh_lp (struct output_block *ob, eh_landing_pad lp) { if (lp == NULL) { - output_zero (ob); + output_record_start (ob, LTO_null); return; } @@ -1633,9 +1589,9 @@ output_eh_regions (struct output_block *ob, struct function *fn) } } - /* The 0 either terminates the record or indicates that there are no - eh_records at all. */ - output_zero (ob); + /* The LTO_null either terminates the record or indicates that there + are no eh_records at all. */ + output_record_start (ob, LTO_null); } @@ -1880,10 +1836,10 @@ output_bb (struct output_block *ob, basic_block bb, struct function *fn) output_sleb128 (ob, region); } else - output_zero (ob); + output_record_start (ob, LTO_null); } - output_zero (ob); + output_record_start (ob, LTO_null); for (bsi = gsi_start_phis (bb); !gsi_end_p (bsi); gsi_next (&bsi)) { @@ -1896,7 +1852,7 @@ output_bb (struct output_block *ob, basic_block bb, struct function *fn) output_phi (ob, phi); } - output_zero (ob); + output_record_start (ob, LTO_null); } } @@ -2053,7 +2009,7 @@ output_function (struct cgraph_node *node) output_bb (ob, bb, fn); /* The terminator for this function. */ - output_zero (ob); + output_record_start (ob, LTO_null); output_cfg (ob, fn); @@ -2167,7 +2123,7 @@ output_unreferenced_globals (cgraph_node_set set, varpool_node_set vset) } symbol_alias_set_destroy (defined); - output_zero (ob); + output_record_start (ob, LTO_null); produce_asm (ob, NULL); destroy_output_block (ob); diff --git a/gcc/lto-streamer.c b/gcc/lto-streamer.c index abccd10ccee..763ecc5e903 100644 --- a/gcc/lto-streamer.c +++ b/gcc/lto-streamer.c @@ -478,10 +478,8 @@ lto_streamer_cache_get (struct lto_streamer_cache_d *cache, unsigned ix) /* Record NODE in CACHE. */ static void -lto_record_common_node (struct lto_streamer_cache_d *cache, tree *nodep) +lto_record_common_node (struct lto_streamer_cache_d *cache, tree node) { - tree node = *nodep; - /* We have to make sure to fill exactly the same number of elements for all frontends. That can include NULL trees. As our hash table can't deal with zero entries we'll simply stream @@ -491,25 +489,12 @@ lto_record_common_node (struct lto_streamer_cache_d *cache, tree *nodep) if (!node) node = error_mark_node; - if (TYPE_P (node)) - { - /* Type merging will get confused by the canonical types as they - are set by the middle-end. */ - if (in_lto_p) - TYPE_CANONICAL (node) = NULL_TREE; - node = gimple_register_type (node); - TYPE_CANONICAL (node) = gimple_register_canonical_type (node); - if (in_lto_p) - TYPE_CANONICAL (*nodep) = TYPE_CANONICAL (node); - *nodep = node; - } - lto_streamer_cache_append (cache, node); if (POINTER_TYPE_P (node) || TREE_CODE (node) == COMPLEX_TYPE || TREE_CODE (node) == ARRAY_TYPE) - lto_record_common_node (cache, &TREE_TYPE (node)); + lto_record_common_node (cache, TREE_TYPE (node)); else if (TREE_CODE (node) == RECORD_TYPE) { /* The FIELD_DECLs of structures should be shared, so that every @@ -519,7 +504,7 @@ lto_record_common_node (struct lto_streamer_cache_d *cache, tree *nodep) nonoverlapping_component_refs_p). */ tree f; for (f = TYPE_FIELDS (node); f; f = TREE_CHAIN (f)) - lto_record_common_node (cache, &f); + lto_record_common_node (cache, f); } } @@ -553,16 +538,20 @@ lto_preload_common_nodes (struct lto_streamer_cache_d *cache) gcc_assert (fileptr_type_node == ptr_type_node); gcc_assert (TYPE_MAIN_VARIANT (fileptr_type_node) == ptr_type_node); - /* Skip itk_char. char_type_node is shared with the appropriately - signed variant. */ - for (i = itk_signed_char; i < itk_none; i++) - lto_record_common_node (cache, &integer_types[i]); + for (i = 0; i < itk_none; i++) + /* Skip itk_char. char_type_node is dependent on -f[un]signed-char. */ + if (i != itk_char) + lto_record_common_node (cache, integer_types[i]); for (i = 0; i < TYPE_KIND_LAST; i++) - lto_record_common_node (cache, &sizetype_tab[i]); + lto_record_common_node (cache, sizetype_tab[i]); for (i = 0; i < TI_MAX; i++) - lto_record_common_node (cache, &global_trees[i]); + /* Skip boolean type and constants, they are frontend dependent. */ + if (i != TI_BOOLEAN_TYPE + && i != TI_BOOLEAN_FALSE + && i != TI_BOOLEAN_TRUE) + lto_record_common_node (cache, global_trees[i]); } /* Create a cache of pickled nodes. */ diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h index e8410d4c70a..5f69655fb98 100644 --- a/gcc/lto-streamer.h +++ b/gcc/lto-streamer.h @@ -186,7 +186,7 @@ enum LTO_tags Conversely, to map between LTO tags and tree/gimple codes, the reverse operation must be applied. */ - LTO_bb0 = 1 + NUM_TREE_CODES + LAST_AND_UNUSED_GIMPLE_CODE, + LTO_bb0 = 1 + MAX_TREE_CODES + LAST_AND_UNUSED_GIMPLE_CODE, LTO_bb1, /* EH region holding the previous statement. */ @@ -957,7 +957,7 @@ extern VEC(lto_out_decl_state_ptr, heap) *lto_function_decl_states; static inline bool lto_tag_is_tree_code_p (enum LTO_tags tag) { - return tag > LTO_null && (unsigned) tag <= NUM_TREE_CODES; + return tag > LTO_null && (unsigned) tag <= MAX_TREE_CODES; } @@ -1081,6 +1081,8 @@ lto_is_streamable (tree expr) && code != BIND_EXPR && code != WITH_CLEANUP_EXPR && code != STATEMENT_LIST + && code != OMP_CLAUSE + && code != OPTIMIZATION_NODE && (code == CASE_LABEL_EXPR || code == DECL_EXPR || TREE_CODE_CLASS (code) != tcc_statement); @@ -1226,11 +1228,11 @@ lto_output_int_in_range (struct lto_output_stream *obs, val -= min; lto_output_1_stream (obs, val & 255); if (range >= 0xff) - lto_output_1_stream (obs, (val << 8) & 255); + lto_output_1_stream (obs, (val >> 8) & 255); if (range >= 0xffff) - lto_output_1_stream (obs, (val << 16) & 255); + lto_output_1_stream (obs, (val >> 16) & 255); if (range >= 0xffffff) - lto_output_1_stream (obs, (val << 24) & 255); + lto_output_1_stream (obs, (val >> 24) & 255); } /* Input VAL into OBS and verify it is in range MIN...MAX that is supposed diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c index 8dc10e8e6c5..af8106de94f 100644 --- a/gcc/lto-symtab.c +++ b/gcc/lto-symtab.c @@ -821,11 +821,15 @@ lto_symtab_merge_cgraph_nodes (void) htab_traverse (lto_symtab_identifiers, lto_symtab_merge_cgraph_nodes_1, NULL); for (node = cgraph_nodes; node; node = node->next) - for (alias = node->same_body; alias; alias = next) - { - next = alias->next; - alias->thunk.alias = lto_symtab_prevailing_decl (alias->thunk.alias); - } + { + if (node->thunk.thunk_p) + node->thunk.alias = lto_symtab_prevailing_decl (node->thunk.alias); + for (alias = node->same_body; alias; alias = next) + { + next = alias->next; + alias->thunk.alias = lto_symtab_prevailing_decl (alias->thunk.alias); + } + } } /* Given the decl DECL, return the prevailing decl with the same name. */ diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 9412f76ae1d..b247dbbdd07 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,18 @@ +2011-06-03 Diego Novillo <dnovillo@google.com> + + * lto.c (get_resolution): Move from lto-streamer-in.c. + (lto_register_var_decl_in_symtab): Likewise. + (lto_register_function_decl_in_symtab): Likewise. + (uniquify_nodes): Call lto_register_var_decl and + lto_register_function_decl_in_symtab after reading a new + VAR_DECL or FUNCTION_DECL. + +2011-06-01 Richard Guenther <rguenther@suse.de> + + * lto-lang.c (lto_register_canonical_types): New function. + (lto_init): Register common nodes with the canonical type machinery. + Do not play tricks with char_type_node. + 2011-05-26 Richard Guenther <rguenther@suse.de> * lto.c (uniquify_nodes): Fix bug in one of the previous changes. diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index 5fe89b87d1e..296a71976d1 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -1052,12 +1052,31 @@ lto_build_c_type_nodes (void) pid_type_node = integer_type_node; } +/* Re-compute TYPE_CANONICAL for NODE and related types. */ + +static void +lto_register_canonical_types (tree node) +{ + if (!node + || !TYPE_P (node)) + return; + + TYPE_CANONICAL (node) = NULL_TREE; + TYPE_CANONICAL (node) = gimple_register_canonical_type (node); + + if (POINTER_TYPE_P (node) + || TREE_CODE (node) == COMPLEX_TYPE + || TREE_CODE (node) == ARRAY_TYPE) + lto_register_canonical_types (TREE_TYPE (node)); +} /* Perform LTO-specific initialization. */ static bool lto_init (void) { + unsigned i; + /* We need to generate LTO if running in WPA mode. */ flag_generate_lto = flag_wpa; @@ -1068,33 +1087,16 @@ lto_init (void) /* Create the basic integer types. */ build_common_tree_nodes (flag_signed_char); - /* Share char_type_node with whatever would be the default for the target. - char_type_node will be used for internal types such as - va_list_type_node but will not be present in the lto stream. */ - /* ??? This breaks the more common case of consistent but non-standard - setting of flag_signed_char, so share according to flag_signed_char. - See PR42528. */ - char_type_node - = flag_signed_char ? signed_char_type_node : unsigned_char_type_node; - /* Tell the middle end what type to use for the size of objects. */ if (strcmp (SIZE_TYPE, "unsigned int") == 0) - { - set_sizetype (unsigned_type_node); - size_type_node = unsigned_type_node; - } + size_type_node = unsigned_type_node; else if (strcmp (SIZE_TYPE, "long unsigned int") == 0) - { - set_sizetype (long_unsigned_type_node); - size_type_node = long_unsigned_type_node; - } + size_type_node = long_unsigned_type_node; else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0) - { - set_sizetype (long_long_unsigned_type_node); - size_type_node = long_long_unsigned_type_node; - } + size_type_node = long_long_unsigned_type_node; else gcc_unreachable (); + set_sizetype (size_type_node); /* The global tree for the main identifier is filled in by language-specific front-end initialization that is not run in the @@ -1158,6 +1160,17 @@ lto_init (void) NAME_TYPE (boolean_type_node, "bool"); #undef NAME_TYPE + /* Register the common node types with the canonical type machinery so + we properly share alias-sets across languages and TUs. Do not + expose the common nodes as type merge target - those that should be + are already exposed so by pre-loading the LTO streamer caches. */ + for (i = 0; i < itk_none; ++i) + lto_register_canonical_types (integer_types[i]); + /* The sizetypes are not used to access data so we do not need to + do anything about them. */ + for (i = 0; i < TI_MAX; ++i) + lto_register_canonical_types (global_trees[i]); + /* Initialize LTO-specific data structures. */ lto_global_var_decls = VEC_alloc (tree, gc, 256); in_lto_p = true; diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 9d4e2edd250..70d5bdee458 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -501,6 +501,141 @@ lto_fixup_types (tree t) } } + +/* Return the resolution for the decl with index INDEX from DATA_IN. */ + +static enum ld_plugin_symbol_resolution +get_resolution (struct data_in *data_in, unsigned index) +{ + if (data_in->globals_resolution) + { + ld_plugin_symbol_resolution_t ret; + /* We can have references to not emitted functions in + DECL_FUNCTION_PERSONALITY at least. So we can and have + to indeed return LDPR_UNKNOWN in some cases. */ + if (VEC_length (ld_plugin_symbol_resolution_t, + data_in->globals_resolution) <= index) + return LDPR_UNKNOWN; + ret = VEC_index (ld_plugin_symbol_resolution_t, + data_in->globals_resolution, + index); + return ret; + } + else + /* Delay resolution finding until decl merging. */ + return LDPR_UNKNOWN; +} + + +/* Register DECL with the global symbol table and change its + name if necessary to avoid name clashes for static globals across + different files. */ + +static void +lto_register_var_decl_in_symtab (struct data_in *data_in, tree decl) +{ + tree context; + + /* Variable has file scope, not local. Need to ensure static variables + between different files don't clash unexpectedly. */ + if (!TREE_PUBLIC (decl) + && !((context = decl_function_context (decl)) + && auto_var_in_fn_p (decl, context))) + { + /* ??? We normally pre-mangle names before we serialize them + out. Here, in lto1, we do not know the language, and + thus cannot do the mangling again. Instead, we just + append a suffix to the mangled name. The resulting name, + however, is not a properly-formed mangled name, and will + confuse any attempt to unmangle it. */ + const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); + char *label; + + ASM_FORMAT_PRIVATE_NAME (label, name, DECL_UID (decl)); + SET_DECL_ASSEMBLER_NAME (decl, get_identifier (label)); + rest_of_decl_compilation (decl, 1, 0); + VEC_safe_push (tree, gc, lto_global_var_decls, decl); + } + + /* If this variable has already been declared, queue the + declaration for merging. */ + if (TREE_PUBLIC (decl)) + { + unsigned ix; + if (!lto_streamer_cache_lookup (data_in->reader_cache, decl, &ix)) + gcc_unreachable (); + lto_symtab_register_decl (decl, get_resolution (data_in, ix), + data_in->file_data); + } +} + + +/* Register DECL with the global symbol table and change its + name if necessary to avoid name clashes for static globals across + different files. DATA_IN contains descriptors and tables for the + file being read. */ + +static void +lto_register_function_decl_in_symtab (struct data_in *data_in, tree decl) +{ + /* Need to ensure static entities between different files + don't clash unexpectedly. */ + if (!TREE_PUBLIC (decl)) + { + /* We must not use the DECL_ASSEMBLER_NAME macro here, as it + may set the assembler name where it was previously empty. */ + tree old_assembler_name = decl->decl_with_vis.assembler_name; + + /* FIXME lto: We normally pre-mangle names before we serialize + them out. Here, in lto1, we do not know the language, and + thus cannot do the mangling again. Instead, we just append a + suffix to the mangled name. The resulting name, however, is + not a properly-formed mangled name, and will confuse any + attempt to unmangle it. */ + const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); + char *label; + + ASM_FORMAT_PRIVATE_NAME (label, name, DECL_UID (decl)); + SET_DECL_ASSEMBLER_NAME (decl, get_identifier (label)); + + /* We may arrive here with the old assembler name not set + if the function body is not needed, e.g., it has been + inlined away and does not appear in the cgraph. */ + if (old_assembler_name) + { + tree new_assembler_name = DECL_ASSEMBLER_NAME (decl); + + /* Make the original assembler name available for later use. + We may have used it to indicate the section within its + object file where the function body may be found. + FIXME lto: Find a better way to maintain the function decl + to body section mapping so we don't need this hack. */ + lto_record_renamed_decl (data_in->file_data, + IDENTIFIER_POINTER (old_assembler_name), + IDENTIFIER_POINTER (new_assembler_name)); + + /* Also register the reverse mapping so that we can find the + new name given to an existing assembler name (used when + restoring alias pairs in input_constructors_or_inits. */ + lto_record_renamed_decl (data_in->file_data, + IDENTIFIER_POINTER (new_assembler_name), + IDENTIFIER_POINTER (old_assembler_name)); + } + } + + /* If this variable has already been declared, queue the + declaration for merging. */ + if (TREE_PUBLIC (decl) && !DECL_ABSTRACT (decl)) + { + unsigned ix; + if (!lto_streamer_cache_lookup (data_in->reader_cache, decl, &ix)) + gcc_unreachable (); + lto_symtab_register_decl (decl, get_resolution (data_in, ix), + data_in->file_data); + } +} + + /* Given a streamer cache structure DATA_IN (holding a sequence of trees for one compilation unit) go over all trees starting at index FROM until the end of the sequence and replace fields of those trees, and the trees @@ -513,20 +648,25 @@ uniquify_nodes (struct data_in *data_in, unsigned from) unsigned len = VEC_length (tree, cache->nodes); unsigned i; - /* Go backwards because childs streamed for the first time come + /* Go backwards because children streamed for the first time come as part of their parents, and hence are created after them. */ - /* First register all types in the cache. + /* First register all declarations and types in the cache. This makes sure to have the original structure in the type cycles when registering them and computing hashes. */ for (i = len; i-- > from;) { tree t = VEC_index (tree, cache->nodes, i); - if (!t - || !TYPE_P (t)) + + if (t == NULL_TREE) continue; - gimple_register_type (t); + if (TREE_CODE (t) == VAR_DECL) + lto_register_var_decl_in_symtab (data_in, t); + else if (TREE_CODE (t) == FUNCTION_DECL && !DECL_BUILT_IN (t)) + lto_register_function_decl_in_symtab (data_in, t); + else if (TYPE_P (t)) + gimple_register_type (t); } /* Second fixup all trees in the new cache entries. */ @@ -665,6 +805,7 @@ uniquify_nodes (struct data_in *data_in, unsigned from) } } + /* Read all the symbols from buffer DATA, using descriptors in DECL_DATA. RESOLUTIONS is the set of symbols picked by the linker (read from the resolution file when the linker plugin is being used). */ diff --git a/gcc/mkmap-flat.awk b/gcc/mkmap-flat.awk index 4afa69f4653..ec5e1fdf513 100644 --- a/gcc/mkmap-flat.awk +++ b/gcc/mkmap-flat.awk @@ -1,5 +1,5 @@ # Generate a flat list of symbols to export. -# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc. # Contributed by Richard Henderson <rth@cygnus.com> # # This file is part of GCC. @@ -20,6 +20,8 @@ # Options: # "-v leading_underscore=1" : Symbols in map need leading underscore. +# "-v osf_export=1" : Create -input file for Tru64 UNIX linker +# instead of map file. # "-v pe_dll=1" : Create .DEF file for Windows PECOFF # DLL link instead of map file. @@ -98,6 +100,10 @@ END { } for (sym in export) - if (def[sym] || (pe_dll && def["_" sym])) - print sym; + if (def[sym] || (pe_dll && def["_" sym])) { + if (!osf_export) + print sym; + else + print "-exported_symbol " sym; + } } diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 0b8b595e63c..50c80b5c7cb 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,17 @@ +2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com> + + PR objc/48539 + * objc-act.c (objc_finish_message_expr): Warn if messaging a class + that was only declared using @class without an @interface. Warn + if messaging an instance of a class that was only declared using + @class without an @interface, unless the receiver was also typed + with a protocol list. + +2011-06-01 Nicola Pero <nicola.pero@meta-innovation.com> + + * objc-act.c (objc_decl_method_attributes): Implement nonnull + attribute for Objective-C methods. + 2011-05-21 Nicola Pero <nicola.pero@meta-innovation.com> * config-lang.in (gtfiles): Updated order of files to fix building diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 0e15fe55aa7..e7acb7f05b1 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -5042,6 +5042,48 @@ objc_decl_method_attributes (tree *node, tree attributes, int flags) filtered_attributes = chainon (filtered_attributes, new_attribute); } + else if (is_attribute_p ("nonnull", name)) + { + /* We need to fixup all the argument indexes by adding 2 + for the two hidden arguments of an Objective-C method + invocation, similat to what we do above for the + "format" attribute. */ + /* FIXME: This works great in terms of implementing the + functionality, but the warnings that are produced by + nonnull do mention the argument index (while the + format ones don't). For example, you could get + "warning: null argument where non-null required + (argument 3)". Now in that message, "argument 3" + includes the 2 hidden arguments; it would be much + more friendly to call it "argument 1", as that would + be consistent with __attribute__ ((nonnnull (1))). + To do this, we'd need to have the C family code that + checks the arguments know about adding/removing 2 to + the argument index ... or alternatively we could + maybe store the "printable" argument index in + addition to the actual argument index ? Some + refactoring is needed to do this elegantly. */ + tree new_attribute = copy_node (attribute); + tree argument = TREE_VALUE (attribute); + while (argument != NULL_TREE) + { + /* Get the value of the argument and add 2. */ + tree number = TREE_VALUE (argument); + if (number + && TREE_CODE (number) == INTEGER_CST + && TREE_INT_CST_HIGH (number) == 0 + && TREE_INT_CST_LOW (number) != 0) + { + TREE_VALUE (argument) + = build_int_cst (integer_type_node, + TREE_INT_CST_LOW (number) + 2); + } + argument = TREE_CHAIN (argument); + } + + filtered_attributes = chainon (filtered_attributes, + new_attribute); + } else warning (OPT_Wattributes, "%qE attribute directive ignored", name); } @@ -5390,15 +5432,21 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params, from the implementation context). */ rtype = receiver; while (TREE_CODE (rtype) == COMPOUND_EXPR - || TREE_CODE (rtype) == MODIFY_EXPR - || CONVERT_EXPR_P (rtype) - || TREE_CODE (rtype) == COMPONENT_REF) + || TREE_CODE (rtype) == MODIFY_EXPR + || CONVERT_EXPR_P (rtype) + || TREE_CODE (rtype) == COMPONENT_REF) rtype = TREE_OPERAND (rtype, 0); + /* self is 1 if this is a message to self, 0 otherwise */ self = (rtype == self_decl); + + /* super is 1 if this is a message to super, 0 otherwise. */ super = (rtype == UOBJC_SUPER_decl); + + /* rtype is the type of the receiver. */ rtype = TREE_TYPE (receiver); + /* have_cast is 1 if the receiver is casted. */ have_cast = (TREE_CODE (receiver) == NOP_EXPR || (TREE_CODE (receiver) == COMPOUND_EXPR && !IS_SUPER (rtype))); @@ -5408,7 +5456,10 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params, should_call_super_dealloc = 0; /* If the receiver is a class object, retrieve the corresponding - @interface, if one exists. */ + @interface, if one exists. class_tree is the class name + identifier, or NULL_TREE if this is not a class method or the + class name could not be determined (as in the case "Class c; [c + method];"). */ class_tree = receiver_is_class_object (receiver, self, super); /* Now determine the receiver type (if an explicit cast has not been @@ -5416,7 +5467,27 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params, if (!have_cast) { if (class_tree) - rtype = lookup_interface (class_tree); + { + /* We are here when we have no cast, and we have a class + name. So, this is a plain method to a class object, as + in [NSObject alloc]. Find the interface corresponding to + the class name. */ + rtype = lookup_interface (class_tree); + + if (rtype == NULL_TREE) + { + /* If 'rtype' is NULL_TREE at this point it means that + we have seen no @interface corresponding to that + class name, only a @class declaration. So, we have a + class name (class_tree) but no actual details of the + class methods. We won't be able to check that the + class responds to the method, and we will have to + guess the method prototype. Emit a warning, then + keep going (this will use any method with a matching + name, as if the receiver was of type 'Class'). */ + warning (0, "@interface of class %qE not found", class_tree); + } + } /* Handle `self' and `super'. */ else if (super) { @@ -5432,28 +5503,41 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params, rtype = lookup_interface (CLASS_NAME (implementation_template)); } - /* If receiver is of type `id' or `Class' (or if the @interface for a - class is not visible), we shall be satisfied with the existence of - any instance or class method. */ if (objc_is_id (rtype)) { + /* The receiver is of type 'id' or 'Class' (with or without some + protocols attached to it). */ + + /* We set class_tree to the identifier for 'Class' if this is a + class method, and to NULL_TREE if not. */ class_tree = (IS_CLASS (rtype) ? objc_class_name : NULL_TREE); + + /* 'rprotos' is the list of protocols that the receiver + supports. */ rprotos = (TYPE_HAS_OBJC_INFO (TREE_TYPE (rtype)) ? TYPE_OBJC_PROTOCOL_LIST (TREE_TYPE (rtype)) : NULL_TREE); + + /* We have no information on the type, and we set it to + NULL_TREE. */ rtype = NULL_TREE; + /* If there are any protocols, check that the method we are + calling appears in the protocol list. If there are no + protocols, this is a message to 'id' or 'Class' and we accept + any method that exists. */ if (rprotos) { - /* If messaging 'id <Protos>' or 'Class <Proto>', first search - in protocols themselves for the method prototype. */ + /* If messaging 'id <Protos>' or 'Class <Proto>', first + search in protocols themselves for the method + prototype. */ method_prototype = lookup_method_in_protocol_list (rprotos, sel_name, class_tree != NULL_TREE); - /* If messaging 'Class <Proto>' but did not find a class method - prototype, search for an instance method instead, and warn - about having done so. */ + /* If messaging 'Class <Proto>' but did not find a class + method prototype, search for an instance method instead, + and warn about having done so. */ if (!method_prototype && !rtype && class_tree != NULL_TREE) { method_prototype @@ -5467,6 +5551,8 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params, } else if (rtype) { + /* We have a receiver type which is more specific than 'id' or + 'Class'. */ tree orig_rtype = rtype; if (TREE_CODE (rtype) == POINTER_TYPE) @@ -5481,25 +5567,70 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params, rprotos = TYPE_OBJC_PROTOCOL_LIST (rtype); rtype = TYPE_OBJC_INTERFACE (rtype); } - /* If we could not find an @interface declaration, we must have - only seen a @class declaration; so, we cannot say anything - more intelligent about which methods the receiver will - understand. */ if (!rtype || TREE_CODE (rtype) == IDENTIFIER_NODE) { + /* If we could not find an @interface declaration, we must + have only seen a @class declaration; so, we cannot say + anything more intelligent about which methods the + receiver will understand. Note that this only happens + for instance methods; for class methods to a class where + we have only seen a @class declaration, + lookup_interface() above would have set rtype to + NULL_TREE. */ + if (rprotos) + { + /* We could not find an @interface declaration, yet, if + there are protocols attached to the type, we can + still look up the method in the protocols. Ie, we + are in the following case: + + @class MyClass; + MyClass<MyProtocol> *x; + [x method]; + + If 'MyProtocol' has the method 'method', we can check + and retrieve the method prototype. */ + method_prototype + = lookup_method_in_protocol_list (rprotos, sel_name, 0); + + /* At this point, if we have found the method_prototype, + we are quite happy. The details of the class are + irrelevant. If we haven't found it, a warning will + have been produced that the method could not be found + in the protocol, and we won't produce further + warnings (please note that this means that "@class + MyClass; MyClass <MyProtocol> *x;" is exactly + equivalent to "id <MyProtocol> x", which isn't too + satisfactory but it's not easy to see how to do + better). */ + } + else + { + if (rtype) + { + /* We could not find an @interface declaration, and + there are no protocols attached to the receiver, + so we can't complete the check that the receiver + responds to the method, and we can't retrieve the + method prototype. But, because the receiver has + a well-specified class, the programmer did want + this check to be performed. Emit a warning, then + keep going as if it was an 'id'. To remove the + warning, either include an @interface for the + class, or cast the receiver to 'id'. Note that + rtype is an IDENTIFIER_NODE at this point. */ + warning (0, "@interface of class %qE not found", rtype); + } + } + rtype = NULL_TREE; - /* We could not find an @interface declaration, yet Message maybe in a - @class's protocol. */ - if (!method_prototype && rprotos) - method_prototype - = lookup_method_in_protocol_list (rprotos, sel_name, 0); } else if (TREE_CODE (rtype) == CLASS_INTERFACE_TYPE || TREE_CODE (rtype) == CLASS_IMPLEMENTATION_TYPE) { - /* We have a valid ObjC class name. Look up the method name - in the published @interface for the class (and its - superclasses). */ + /* We have a valid ObjC class name with an associated + @interface. Look up the method name in the published + @interface for the class (and its superclasses). */ method_prototype = lookup_method_static (rtype, sel_name, class_tree != NULL_TREE); @@ -5524,6 +5655,7 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params, } else { + /* We have a type, but it's not an Objective-C type (!). */ warning (0, "invalid receiver type %qs", identifier_to_locale (gen_type_name (orig_rtype))); /* After issuing the "invalid receiver" warning, perform method @@ -5531,11 +5663,13 @@ objc_finish_message_expr (tree receiver, tree sel_name, tree method_params, rtype = rprotos = NULL_TREE; } } + /* Note that rtype could also be NULL_TREE. This happens if we are + messaging a class by name, but the class was only + forward-declared using @class. */ - - /* For 'id' or 'Class' receivers, search in the global hash table - as a last resort. For all receivers, warn if protocol searches - have failed. */ + /* For 'id' or 'Class' receivers, search in the global hash table as + a last resort. For all receivers, warn if protocol searches have + failed. */ if (!method_prototype) { if (rprotos) diff --git a/gcc/optabs.c b/gcc/optabs.c index 1473b0f13af..224fb11b59b 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -1537,7 +1537,10 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, /* If TARGET is the same as one of the operands, the REG_EQUAL note won't be accurate, so use a new target. */ - if (target == 0 || target == op0 || target == op1) + if (target == 0 + || target == op0 + || target == op1 + || !valid_multiword_target_p (target)) target = gen_reg_rtx (mode); start_sequence (); @@ -1605,7 +1608,10 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, /* If TARGET is the same as one of the operands, the REG_EQUAL note won't be accurate, so use a new target. */ - if (target == 0 || target == op0 || target == op1) + if (target == 0 + || target == op0 + || target == op1 + || !valid_multiword_target_p (target)) target = gen_reg_rtx (mode); start_sequence (); @@ -1659,7 +1665,11 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, opportunities, and second because if target and op0 happen to be MEMs designating the same location, we would risk clobbering it too early in the code sequence we generate below. */ - if (target == 0 || target == op0 || target == op1 || ! REG_P (target)) + if (target == 0 + || target == op0 + || target == op1 + || !REG_P (target) + || !valid_multiword_target_p (target)) target = gen_reg_rtx (mode); start_sequence (); @@ -1779,7 +1789,7 @@ expand_binop (enum machine_mode mode, optab binoptab, rtx op0, rtx op1, xtarget = gen_reg_rtx (mode); - if (target == 0 || !REG_P (target)) + if (target == 0 || !REG_P (target) || !valid_multiword_target_p (target)) target = xtarget; /* Indicate for flow that the entire target reg is being set. */ @@ -2481,7 +2491,7 @@ expand_doubleword_bswap (enum machine_mode mode, rtx op, rtx target) t0 = expand_unop (word_mode, bswap_optab, operand_subword_force (op, 1, mode), NULL_RTX, true); - if (target == 0) + if (target == 0 || !valid_multiword_target_p (target)) target = gen_reg_rtx (mode); if (REG_P (target)) emit_clobber (target); @@ -2724,7 +2734,9 @@ expand_absneg_bit (enum rtx_code code, enum machine_mode mode, if (code == ABS) mask = double_int_not (mask); - if (target == 0 || target == op0) + if (target == 0 + || target == op0 + || (nwords > 1 && !valid_multiword_target_p (target))) target = gen_reg_rtx (mode); if (nwords > 1) @@ -2915,7 +2927,7 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, int i; rtx insns; - if (target == 0 || target == op0) + if (target == 0 || target == op0 || !valid_multiword_target_p (target)) target = gen_reg_rtx (mode); start_sequence (); @@ -3386,7 +3398,10 @@ expand_copysign_bit (enum machine_mode mode, rtx op0, rtx op1, rtx target, mask = double_int_setbit (double_int_zero, bitpos); - if (target == 0 || target == op0 || target == op1) + if (target == 0 + || target == op0 + || target == op1 + || (nwords > 1 && !valid_multiword_target_p (target))) target = gen_reg_rtx (mode); if (nwords > 1) @@ -7034,6 +7049,23 @@ insn_operand_matches (enum insn_code icode, unsigned int opno, rtx operand) (operand, insn_data[(int) icode].operand[opno].mode))); } +/* TARGET is a target of a multiword operation that we are going to + implement as a series of word-mode operations. Return true if + TARGET is suitable for this purpose. */ + +bool +valid_multiword_target_p (rtx target) +{ + enum machine_mode mode; + int i; + + mode = GET_MODE (target); + for (i = 0; i < GET_MODE_SIZE (mode); i += UNITS_PER_WORD) + if (!validate_subreg (word_mode, mode, target, i)) + return false; + return true; +} + /* Like maybe_legitimize_operand, but do not change the code of the current rtx value. */ diff --git a/gcc/optabs.h b/gcc/optabs.h index db6e65e8975..62bc14e4840 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -1059,6 +1059,8 @@ create_integer_operand (struct expand_operand *op, HOST_WIDE_INT intval) create_expand_operand (op, EXPAND_INTEGER, GEN_INT (intval), VOIDmode, false); } +extern bool valid_multiword_target_p (rtx); + extern bool maybe_legitimize_operands (enum insn_code icode, unsigned int opno, unsigned int nops, struct expand_operand *ops); diff --git a/gcc/params.def b/gcc/params.def index 739c840ab74..aa2d0465533 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -863,6 +863,14 @@ DEFPARAM (PARAM_MAX_VARTRACK_SIZE, "Max. size of var tracking hash tables", 50000000, 0, 0) +/* Set maximum recursion depth for var tracking expression expansion + and resolution. */ + +DEFPARAM (PARAM_MAX_VARTRACK_EXPR_DEPTH, + "max-vartrack-expr-depth", + "Max. recursion depth for expanding var tracking expressions", + 20, 0, 0) + /* Set minimum insn uid for non-debug insns. */ DEFPARAM (PARAM_MIN_NONDEBUG_INSN_UID, diff --git a/gcc/passes.c b/gcc/passes.c index 4056f2f17ab..48dc9279413 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -74,6 +74,7 @@ along with GCC; see the file COPYING3. If not see #include "lto-streamer.h" #include "plugin.h" #include "ipa-utils.h" +#include "tree-pretty-print.h" #if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO) #include "dwarf2out.h" @@ -1637,21 +1638,7 @@ pass_init_dump_file (struct opt_pass *pass) dump_file_name = get_dump_file_name (pass->static_pass_number); dump_file = dump_begin (pass->static_pass_number, &dump_flags); if (dump_file && current_function_decl) - { - const char *dname, *aname; - struct cgraph_node *node = cgraph_get_node (current_function_decl); - dname = lang_hooks.decl_printable_name (current_function_decl, 2); - aname = (IDENTIFIER_POINTER - (DECL_ASSEMBLER_NAME (current_function_decl))); - fprintf (dump_file, "\n;; Function %s (%s)%s\n\n", dname, aname, - node->frequency == NODE_FREQUENCY_HOT - ? " (hot)" - : node->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED - ? " (unlikely executed)" - : node->frequency == NODE_FREQUENCY_EXECUTED_ONCE - ? " (executed once)" - : ""); - } + dump_function_header (dump_file, current_function_decl); return initializing_dump; } else diff --git a/gcc/postreload-gcse.c b/gcc/postreload-gcse.c index 8e26419f39c..bc55ead744f 100644 --- a/gcc/postreload-gcse.c +++ b/gcc/postreload-gcse.c @@ -1,5 +1,5 @@ /* Post reload partially redundant load elimination - Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010 + Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -923,6 +923,9 @@ bb_has_well_behaved_predecessors (basic_block bb) if ((pred->flags & EDGE_ABNORMAL) && EDGE_CRITICAL_P (pred)) return false; + if ((pred->flags & EDGE_ABNORMAL_CALL) && cfun->has_nonlocal_label) + return false; + if (JUMP_TABLE_DATA_P (BB_END (pred->src))) return false; } diff --git a/gcc/predict.c b/gcc/predict.c index e18f9379c3f..870526bc6b3 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -2306,7 +2306,7 @@ struct gimple_opt_pass pass_profile = { { GIMPLE_PASS, - "profile", /* name */ + "profile_estimate", /* name */ gate_estimate_probability, /* gate */ tree_estimate_probability_driver, /* execute */ NULL, /* sub */ diff --git a/gcc/reload.c b/gcc/reload.c index 045e5594195..27d57877501 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -1019,6 +1019,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc, #ifdef CANNOT_CHANGE_MODE_CLASS && !CANNOT_CHANGE_MODE_CLASS (GET_MODE (SUBREG_REG (in)), inmode, rclass) #endif + && contains_reg_of_mode[(int) rclass][(int) GET_MODE (SUBREG_REG (in))] && (CONSTANT_P (SUBREG_REG (in)) || GET_CODE (SUBREG_REG (in)) == PLUS || strict_low @@ -1125,6 +1126,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc, #ifdef CANNOT_CHANGE_MODE_CLASS && !CANNOT_CHANGE_MODE_CLASS (GET_MODE (SUBREG_REG (out)), outmode, rclass) #endif + && contains_reg_of_mode[(int) rclass][(int) GET_MODE (SUBREG_REG (out))] && (CONSTANT_P (SUBREG_REG (out)) || strict_low || (((REG_P (SUBREG_REG (out)) diff --git a/gcc/reload1.c b/gcc/reload1.c index ea7df99580d..e65503b9fa5 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -4471,6 +4471,43 @@ scan_paradoxical_subregs (rtx x) } } } + +/* *OP_PTR and *OTHER_PTR are two operands to a conceptual reload. + If *OP_PTR is a paradoxical subreg, try to remove that subreg + and apply the corresponding narrowing subreg to *OTHER_PTR. + Return true if the operands were changed, false otherwise. */ + +static bool +strip_paradoxical_subreg (rtx *op_ptr, rtx *other_ptr) +{ + rtx op, inner, other, tem; + + op = *op_ptr; + if (GET_CODE (op) != SUBREG) + return false; + + inner = SUBREG_REG (op); + if (GET_MODE_SIZE (GET_MODE (op)) <= GET_MODE_SIZE (GET_MODE (inner))) + return false; + + other = *other_ptr; + tem = gen_lowpart_common (GET_MODE (inner), other); + if (!tem) + return false; + + /* If the lowpart operation turned a hard register into a subreg, + rather than simplifying it to another hard register, then the + mode change cannot be properly represented. For example, OTHER + might be valid in its current mode, but not in the new one. */ + if (GET_CODE (tem) == SUBREG + && REG_P (other) + && HARD_REGISTER_P (other)) + return false; + + *op_ptr = inner; + *other_ptr = tem; + return true; +} /* A subroutine of reload_as_needed. If INSN has a REG_EH_REGION note, examine all of the reload insns between PREV and NEXT exclusive, and @@ -5538,7 +5575,7 @@ gen_reload_chain_without_interm_reg_p (int r1, int r2) chain reloads or do need an intermediate hard registers. */ bool result = true; int regno, n, code; - rtx out, in, tem, insn; + rtx out, in, insn; rtx last = get_last_insn (); /* Make r2 a component of r1. */ @@ -5557,11 +5594,7 @@ gen_reload_chain_without_interm_reg_p (int r1, int r2) /* If IN is a paradoxical SUBREG, remove it and try to put the opposite SUBREG on OUT. Likewise for a paradoxical SUBREG on OUT. */ - if (GET_CODE (in) == SUBREG - && (GET_MODE_SIZE (GET_MODE (in)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))) - && (tem = gen_lowpart_common (GET_MODE (SUBREG_REG (in)), out)) != 0) - in = SUBREG_REG (in), out = tem; + strip_paradoxical_subreg (&in, &out); if (GET_CODE (in) == PLUS && (REG_P (XEXP (in, 0)) @@ -7557,7 +7590,6 @@ emit_output_reload_insns (struct insn_chain *chain, struct reload *rl, if (tertiary_icode != CODE_FOR_nothing) { rtx third_reloadreg = rld[tertiary_reload].reg_rtx; - rtx tem; /* Copy primary reload reg to secondary reload reg. (Note that these have been swapped above, then @@ -7566,13 +7598,7 @@ emit_output_reload_insns (struct insn_chain *chain, struct reload *rl, /* If REAL_OLD is a paradoxical SUBREG, remove it and try to put the opposite SUBREG on RELOADREG. */ - if (GET_CODE (real_old) == SUBREG - && (GET_MODE_SIZE (GET_MODE (real_old)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (real_old)))) - && 0 != (tem = gen_lowpart_common - (GET_MODE (SUBREG_REG (real_old)), - reloadreg))) - real_old = SUBREG_REG (real_old), reloadreg = tem; + strip_paradoxical_subreg (&real_old, &reloadreg); gen_reload (reloadreg, second_reloadreg, rl->opnum, rl->when_needed); @@ -8388,16 +8414,8 @@ gen_reload (rtx out, rtx in, int opnum, enum reload_type type) /* If IN is a paradoxical SUBREG, remove it and try to put the opposite SUBREG on OUT. Likewise for a paradoxical SUBREG on OUT. */ - if (GET_CODE (in) == SUBREG - && (GET_MODE_SIZE (GET_MODE (in)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (in)))) - && (tem = gen_lowpart_common (GET_MODE (SUBREG_REG (in)), out)) != 0) - in = SUBREG_REG (in), out = tem; - else if (GET_CODE (out) == SUBREG - && (GET_MODE_SIZE (GET_MODE (out)) - > GET_MODE_SIZE (GET_MODE (SUBREG_REG (out)))) - && (tem = gen_lowpart_common (GET_MODE (SUBREG_REG (out)), in)) != 0) - out = SUBREG_REG (out), in = tem; + if (!strip_paradoxical_subreg (&in, &out)) + strip_paradoxical_subreg (&out, &in); /* How to do this reload can get quite tricky. Normally, we are being asked to reload a simple operand, such as a MEM, a constant, or a pseudo diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 2c00907036f..248b870a75a 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -3508,7 +3508,7 @@ gate_handle_sched2 (void) { #ifdef INSN_SCHEDULING return optimize > 0 && flag_schedule_insns_after_reload - && dbg_cnt (sched2_func); + && !targetm.delay_sched2 && dbg_cnt (sched2_func); #else return 0; #endif diff --git a/gcc/system.h b/gcc/system.h index e39a6f928e9..d08166135fa 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -763,7 +763,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; /* Target macros only used for code built for the target, that have moved to libgcc-tm.h or have never been present elsewhere. */ - #pragma GCC poison DECLARE_LIBRARY_RENAMES LIBGCC2_GNU_PREFIX + #pragma GCC poison DECLARE_LIBRARY_RENAMES LIBGCC2_GNU_PREFIX \ + MD_UNWIND_SUPPORT /* Other obsolete target macros, or macros that used to be in target headers and were not used, and may be obsolete or may never have diff --git a/gcc/target.def b/gcc/target.def index ea283f374ef..3215bd3ddcf 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -2717,6 +2717,16 @@ DEFHOOKPOD in particular GDB does not use them.", bool, false) +DEFHOOKPOD +(delay_sched2, "True if sched2 is not to be run at its normal place. \ +This usually means it will be run as part of machine-specific reorg.", +bool, false) + +DEFHOOKPOD +(delay_vartrack, "True if vartrack is not to be run at its normal place. \ +This usually means it will be run as part of machine-specific reorg.", +bool, false) + /* Leave the boolean fields at the end. */ /* Close the 'struct gcc_target' definition. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d9bfc914011..6dd2803c754 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,191 @@ +2011-06-04 Jakub Jelinek <jakub@redhat.com> + + * gcc.dg/guality/rotatetest.c (f5, f6): Fix up pastos. + +2011-06-03 Jakub Jelinek <jakub@redhat.com> + + PR c++/49276 + * g++.dg/cpp0x/lambda/lambda-mangle2.C: New test. + +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * objc.dg/headers.m: Do not include sarray.h and hash.h. + +2011-06-03 Richard Henderson <rth@redhat.com> + Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * lib/target-supports.exp (check_sse_os_support_available): Use + movaps. + +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * objc.dg/headers.m: Do not include objc-list.h. + +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * objc.dg/type-stream-1.m: Test removed. + * objc.dg/headers.m: Do not include typedstream.h. + +2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com> + + * objc.dg/torture/forward-1.m (main): Updated testcase. + +2011-06-02 Kaz Kojima <kkojima@gcc.gnu.org> + + PR target/49163 + * gcc.c-torture/compile/pr49163.c: New. + +2011-06-02 Asher Langton <langton2@llnl.gov> + + PR fortran/49268 + * gfortran.dg/PR49268.f90: New test. + +2011-06-02 Asher Langton <langton2@llnl.gov> + + PR fortran/37039 + * gfortran.dg/PR37039.f90: New test. + +2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com> + + PR objc/48539 + * objc.dg/method-5.m: Updated. + * objc.dg/method-19.m: Updated. + * objc.dg/method-lookup-1.m: New. + * obj-c++.dg/method-6.mm: Updated. + * obj-c++.dg/method-7.mm: Updated. + * obj-c++.dg/method-lookup-1.mm: New. + +2011-06-02 DJ Delorie <dj@redhat.com> + + * lib/timeout.exp (timeout): Add board_info support. + +2011-06-02 Uros Bizjak <ubizjak@gmail.com> + + * gcc.target/i386/sse2-init-v2di-2: Update scan-assembler-times string. + +2011-06-02 Steven G. Kargl <kargl@gcc.gnu.org> + + PR fortran/49265 + * gfortran.dg/module_procedure_double_colon_1.f90: New test. + * gfortran.dg/module_procedure_double_colon_2.f90: New test. + +2011-06-02 Eric Botcazou <ebotcazou@adacore.com> + Hans-Peter Nilsson <hp@axis.com> + + PR rtl-optimization/48840 + * gcc.target/sparc/ultrasp13.c: New test. + +2011-06-01 Kaz Kojima <kkojima@gcc.gnu.org> + + PR target/49238 + * gcc.c-torture/compile/pr49238.c: New. + +2011-06-01 Sofiane Naci <sofiane.naci@arm.com> + + * gcc.target/arm/g2.c: Skip test in -mthumb. + Skip test unless cpu is xscale. + * gcc.target/arm/scd42-2.c: Likewise. + * gcc.target/arm/mmx-1.c: Skip test in -mthumb. + +2011-06-01 Jason Merrill <jason@redhat.com> + + * g++.dg/cpp0x/decltype28.C: New. + * g++.dg/cpp0x/decltype29.C: New. + +2011-06-01 Richard Sandiford <rdsandiford@googlemail.com> + + PR target/45074 + * gcc.target/mips/pr45074.c: New test. + +2011-06-01 Eric Botcazou <ebotcazou@adacore.com> + Hans-Peter Nilsson <hp@axis.com> + + PR rtl-optimization/48830 + * gcc.target/sparc/ultrasp12.c: New test. + +2011-06-01 David Li <davidxl@google.com> + + * testsuite/gcc.dg/profile-dir-1.c: Change pass name. + * testsuite/gcc.dg/profile-dir-2.c: Ditto. + * testsuite/gcc.dg/tree-ssa/dump-1.c: Ditto. + * testsuite/gcc.dg/tree-ssa/loop-25.c: Ditto. + * testsuite/gcc.dg/tree-prof/stringop-1.c: Ditto. + * testsuite/gcc.dg/tree-prof/update-loopch.c: Ditto. + * testsuite/gcc.dg/tree-prof/stringop-2.c: Ditto. + * testsuite/gcc.dg/tree-prof/ic-misattribution-1.c: Ditto. + * testsuite/gcc.dg/tree-prof/ic-misattribution-1a.c: Ditto. + * testsuite/gcc.dg/tree-prof/indir-call-prof.c: Ditto. + * testsuite/gcc.dg/tree-prof/val-prof-1.c: Ditto. + * testsuite/gcc.dg/tree-prof/val-prof-2.c: Ditto. + * testsuite/gcc.dg/tree-prof/val-prof-3.c: Ditto. + * testsuite/gcc.dg/tree-prof/val-prof-4.c: Ditto. + * testsuite/gcc.dg/tree-prof/val-prof-5.c: Ditto. + * testsuite/gcc.dg/tree-prof/val-prof-7.c: Ditto. + * testsuite/gcc.dg/profile-dir-3.c: Ditto. + * testsuite/g++.dg/tree-prof/indir-call-prof.C: Ditto. + +2011-06-01 Nicola Pero <nicola.pero@meta-innovation.com> + + * objc.dg/attributes/method-nonnull-1.m: New test. + * obj-c++.dg/attributes/method-nonnull-1.mm: New test. + +2011-05-31 Tobias Burnus <burnus@net-b.de> + + PR fortran/18918 + * gfortran.dg/coarray_atomic_1.f90: New. + * gfortran.dg/coarray/atomic_1.f90: New. + +2011-05-31 Jakub Jelinek <jakub@redhat.com> + + * gcc.dg/guality/bswaptest.c: New test. + * gcc.dg/guality/clztest.c: New test. + * gcc.dg/guality/ctztest.c: New test. + * gcc.dg/guality/rotatetest.c: New test. + + PR target/48688 + * gcc.target/i386/pr48688.c: New test. + +2010-11-15 Fabien Chêne <fabien@gcc.gnu.org> + + PR c++/48010 + * g++.dg/lookup/name-clash9.C: New. + +2011-05-31 Tobias Burnus <burnus@net-b.de> + + PR fortran/18918 + * gfortran.dg/coarray/dummy_1.f90: New. + +2011-05-31 Tobias Burnus <burnus@net-b.de> + + PR fortran/18918 + * gfortran.dg/coarray/save_1.f90: New. + * gfortran.dg/coarray_4.f90: Update dg-error. + +2011-05-31 Jason Merrill <jason@redhat.com> + + * g++.dg/cpp0x/rv-template1.C: New. + +2011-05-31 Jakub Jelinek <jakub@redhat.com> + + PR rtl-optimization/49235 + * gcc.dg/pr49235.c: New test. + +2011-05-31 Ira Rosen <ira.rosen@linaro.org> + + PR tree-optimization/49093 + * gcc.dg/vect/pr49093.c: New test. + +2011-05-31 Dodji Seketeli <dodji@redhat.com> + + PR debug/49047 + * g++.dg/debug/dwarf2/cdtor-1.C: New test. + +2011-05-31 Ira Rosen <ira.rosen@linaro.org> + + PR testsuite/49239 + * gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c: Initialize the + output array. + 2011-05-30 Kaz Kojima <kkojima@gcc.gnu.org> PR target/49186 diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype28.C b/gcc/testsuite/g++.dg/cpp0x/decltype28.C new file mode 100644 index 00000000000..0ab8932d7f8 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype28.C @@ -0,0 +1,16 @@ +// PR c++/44175 +// { dg-options -std=c++0x } + +template <bool, class T> struct enable_if { }; +template <class T> struct enable_if <true, T> { typedef T type; }; + +template <class F, int N> +void ft (F f, typename enable_if<N!=0, int>::type) {} + +template< class F, int N > +decltype(ft<F, N-1> (F(), 0)) +ft (F f, typename enable_if<N==0, int>::type) {} + +int main() { + ft<struct a*, 2> (0, 0); +} diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype29.C b/gcc/testsuite/g++.dg/cpp0x/decltype29.C new file mode 100644 index 00000000000..1dd5a5f9bf7 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/decltype29.C @@ -0,0 +1,19 @@ +// PR c++/44175 +// { dg-options -std=c++0x } + +template <bool, class T> struct enable_if { }; +template <class T> struct enable_if <true, T> { typedef T type; }; + +template <int x> +typename enable_if<x==0,int>::type +ft() {} + +template<class F, int N> +decltype (ft<F> (F())) +ft() {} + +int main() { + ft<struct a*, 0>(); // { dg-error "no match" } +} + +// { dg-prune-output "note" } diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle2.C new file mode 100644 index 00000000000..4b7d15ad953 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle2.C @@ -0,0 +1,21 @@ +// PR c++/49276 +// { dg-do compile } +// { dg-options "-std=c++0x" } + +template <int N> +struct F +{ + template <typename U> F (U); +}; + +struct S +{ + void foo (F <0> x = [] {}) {} +}; + +int +main () +{ + S s; + s.foo (); +} diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-template1.C b/gcc/testsuite/g++.dg/cpp0x/rv-template1.C new file mode 100644 index 00000000000..11f53bd1c0a --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/rv-template1.C @@ -0,0 +1,11 @@ +// PR c++/44870 +// { dg-options -std=c++0x } + +void foo(int&& data); + +template <typename T> +void bar(T t) +{ foo(int()); } + +void baz() +{ bar(0); } diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C new file mode 100644 index 00000000000..6d39e54ae08 --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/dwarf2/cdtor-1.C @@ -0,0 +1,17 @@ +// origin PR debug/49047 +// { dg-options "-g -dA" } +// { dg-do compile } + +struct K +{ + K () { } + ~K () { } +}; + +int +main() +{ + K k; +} + +// { dg-final {scan-assembler-times "\[^\n\r\]*DW_AT_MIPS_linkage_name:" 2 } } diff --git a/gcc/testsuite/g++.dg/lookup/name-clash9.C b/gcc/testsuite/g++.dg/lookup/name-clash9.C new file mode 100644 index 00000000000..4167f47b4a9 --- /dev/null +++ b/gcc/testsuite/g++.dg/lookup/name-clash9.C @@ -0,0 +1,8 @@ +// { dg-do compile } +// PR c++/48010 + +struct A +{ + struct type {}; // { dg-error "conflicts with previous" } + typedef int type; // { dg-error "declaration" } +}; diff --git a/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C b/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C index 80b41865c0c..91874a30e04 100644 --- a/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C +++ b/gcc/testsuite/g++.dg/tree-prof/indir-call-prof.C @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-tree_profile_ipa" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ struct A { A () {} @@ -33,7 +33,7 @@ main (void) return 0; } -/* { dg-final-use { scan-ipa-dump "Indirect call -> direct call.* AA transformation on insn" "tree_profile_ipa" } } */ +/* { dg-final-use { scan-ipa-dump "Indirect call -> direct call.* AA transformation on insn" "profile" } } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized" } } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49163.c b/gcc/testsuite/gcc.c-torture/compile/pr49163.c new file mode 100644 index 00000000000..f14ab1531e6 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr49163.c @@ -0,0 +1,35 @@ +/* PR target/49163 */ +struct S1 +{ + unsigned f0:18; + int f1; +} __attribute__ ((packed)); + +struct S2 +{ + volatile long long f0; + int f1; +}; + +struct S1 s1; +struct S2 s2; +const struct S2 s2array[2][1] = { }; + +struct S2 **sptr; + +extern int bar (char a, long long b, int * c, long long d, long long e); +extern int baz (void); + +int i; +int *ptr; + +void +foo (int *arg) +{ + for (i = 0; i < 1; i = baz()) + { + *arg = *(int *)sptr; + *ptr = bar (*arg, s2.f1, ptr, + bar (s2array[1][0].f0, *arg, ptr, s1.f1, *ptr), *arg); + } +} diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49238.c b/gcc/testsuite/gcc.c-torture/compile/pr49238.c new file mode 100644 index 00000000000..fd8443a8f08 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr49238.c @@ -0,0 +1,18 @@ +/* PR target/49238 */ +extern int bar (void); + +void +foo (unsigned long long a, int b) +{ + int i; + + if (b) + for (a = -12; a >= 10; a = bar ()) + break; + else + return; + + for (i = 0; i < 10; i += 10) + if ((i == bar ()) | (bar () >= a)) + bar (); +} diff --git a/gcc/testsuite/gcc.dg/guality/bswaptest.c b/gcc/testsuite/gcc.dg/guality/bswaptest.c new file mode 100644 index 00000000000..38b9d981c87 --- /dev/null +++ b/gcc/testsuite/gcc.dg/guality/bswaptest.c @@ -0,0 +1,32 @@ +/* { dg-do run { target { x86_64-*-* && lp64 } } } */ +/* { dg-options "-g" } */ + +volatile int vv; + +__attribute__((noclone, noinline)) long +foo (long x) +{ + long f = __builtin_bswap64 (x); + long g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 12 "g" "f" } } */ + return f; +} + +__attribute__((noclone, noinline)) int +bar (int x) +{ + int f = __builtin_bswap32 (x); + int g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 22 "g" "f" } } */ + return f; +} + +int +main () +{ + foo (0x123456789abcde0fUL); + bar (0x12345678); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/guality/clztest.c b/gcc/testsuite/gcc.dg/guality/clztest.c new file mode 100644 index 00000000000..9428be30b87 --- /dev/null +++ b/gcc/testsuite/gcc.dg/guality/clztest.c @@ -0,0 +1,33 @@ +/* { dg-do run { target { x86_64-*-* && lp64 } } } */ +/* { dg-options "-g" } */ + +volatile int vv; + +__attribute__((noinline, noclone)) long +foo (long x) +{ + long f = __builtin_clzl (x); + long g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 12 "g" "f" } } */ + return f; +} + +__attribute__((noinline, noclone)) long +bar (long x) +{ + long f = __builtin_clzl (x); + long g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 22 "g" "f" } } */ + return f; +} + +int +main () +{ + long x = vv; + foo (x + 0x123456UL); + bar (x + 0x7fffffffUL); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/guality/ctztest.c b/gcc/testsuite/gcc.dg/guality/ctztest.c new file mode 100644 index 00000000000..d243845ec98 --- /dev/null +++ b/gcc/testsuite/gcc.dg/guality/ctztest.c @@ -0,0 +1,33 @@ +/* { dg-do run { target { x86_64-*-* && lp64 } } } */ +/* { dg-options "-g" } */ + +volatile int vv; + +__attribute__((noinline, noclone)) long +foo (long x) +{ + long f = __builtin_ctzl (x); + long g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 12 "g" "f" } } */ + return f; +} + +__attribute__((noinline, noclone)) long +bar (long x) +{ + long f = __builtin_ctzl (x); + long g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 22 "g" "f" } } */ + return f; +} + +int +main () +{ + long x = vv; + foo (x + 0x1234560UL); + bar (x + 0x7fff8000UL); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/guality/rotatetest.c b/gcc/testsuite/gcc.dg/guality/rotatetest.c new file mode 100644 index 00000000000..64f5340a090 --- /dev/null +++ b/gcc/testsuite/gcc.dg/guality/rotatetest.c @@ -0,0 +1,76 @@ +/* { dg-do run { target { x86_64-*-* && lp64 } } } */ +/* { dg-options "-g" } */ + +volatile int vv; + +__attribute__((noclone, noinline)) long +f1 (unsigned long x) +{ + long f = (x << 12) | (x >> (64 - 12)); + long g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 12 "g" "f" } } */ + return f; +} + +__attribute__((noclone, noinline)) long +f2 (unsigned long x, int y) +{ + long f = (x << y) | (x >> (64 - y)); + long g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 22 "g" "f" } } */ + return f; +} + +__attribute__((noclone, noinline)) long +f3 (unsigned long x, int y) +{ + long f = (x >> y) | (x << (64 - y)); + long g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 32 "g" "f" } } */ + return f; +} + +__attribute__((noclone, noinline)) unsigned int +f4 (unsigned int x) +{ + unsigned int f = (x << 12) | (x >> (32 - 12)); + unsigned int g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 42 "g" "f" } } */ + return f; +} + +__attribute__((noclone, noinline)) unsigned int +f5 (unsigned int x, int y) +{ + unsigned int f = (x << y) | (x >> (32 - y)); + unsigned int g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 52 "g" "f" } } */ + return f; +} + +__attribute__((noclone, noinline)) unsigned int +f6 (unsigned int x, int y) +{ + unsigned int f = (x >> y) | (x << (32 - y)); + unsigned int g = f; + asm volatile ("" : "+r" (f)); + vv++; /* { dg-final { gdb-test 62 "g" "f" } } */ + return f; +} + +int +main () +{ + f1 (0x123456789abcde0fUL); + f2 (0x123456789abcde0fUL, 18); + f3 (0x123456789abcde0fUL, 17); + f4 (0x12345678); + f5 (0x12345678, 18); + f6 (0x12345678, 17); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/pr49235.c b/gcc/testsuite/gcc.dg/pr49235.c new file mode 100644 index 00000000000..f1e589f7558 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr49235.c @@ -0,0 +1,25 @@ +/* PR rtl-optimization/49235 */ +/* { dg-do compile { target { int32plus } } } */ +/* { dg-options "-O -fno-delete-null-pointer-checks -fno-tree-scev-cprop -ftree-vectorize -fno-vect-cost-model -w" } */ + +void +foo (void) +{ + unsigned i; + unsigned *p = 0; + for (i = 0; i < 4; ++i) + *p++ = 0; + for (i = 0; i < 4; ++i) + *p++ = 0; +} + +void +bar (void) +{ + unsigned i; + unsigned *p = (unsigned *) (__UINTPTR_TYPE__) 0x12340000; + for (i = 0; i < 4; ++i) + *p++ = 0; + for (i = 0; i < 4; ++i) + *p++ = 0; +} diff --git a/gcc/testsuite/gcc.dg/profile-dir-1.c b/gcc/testsuite/gcc.dg/profile-dir-1.c index 62f31303142..97763721abc 100644 --- a/gcc/testsuite/gcc.dg/profile-dir-1.c +++ b/gcc/testsuite/gcc.dg/profile-dir-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O -fprofile-generate=. -fdump-ipa-tree_profile_ipa" } */ -/* { dg-final { scan-ipa-dump " ./profile-dir-1.gcda" "tree_profile_ipa" } } */ +/* { dg-options "-O -fprofile-generate=. -fdump-ipa-profile" } */ +/* { dg-final { scan-ipa-dump " ./profile-dir-1.gcda" "profile" } } */ int main(void) @@ -8,4 +8,4 @@ main(void) return 0; } -/* { dg-final { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/profile-dir-2.c b/gcc/testsuite/gcc.dg/profile-dir-2.c index 7bad03c5c04..d49dcc37605 100644 --- a/gcc/testsuite/gcc.dg/profile-dir-2.c +++ b/gcc/testsuite/gcc.dg/profile-dir-2.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O -fprofile-generate -fdump-ipa-tree_profile_ipa" } */ -/* { dg-final { scan-ipa-dump "/profile-dir-2.gcda" "tree_profile_ipa" } } */ +/* { dg-options "-O -fprofile-generate -fdump-ipa-profile" } */ +/* { dg-final { scan-ipa-dump "/profile-dir-2.gcda" "profile" } } */ int main(void) @@ -8,4 +8,4 @@ main(void) return 0; } -/* { dg-final { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/profile-dir-3.c b/gcc/testsuite/gcc.dg/profile-dir-3.c index a4622233dc7..0ae329d4698 100644 --- a/gcc/testsuite/gcc.dg/profile-dir-3.c +++ b/gcc/testsuite/gcc.dg/profile-dir-3.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-O -fprofile-generate -fprofile-dir=. -fdump-ipa-tree_profile_ipa" } */ -/* { dg-final { scan-ipa-dump " ./profile-dir-3.gcda" "tree_profile_ipa" } } */ +/* { dg-options "-O -fprofile-generate -fprofile-dir=. -fdump-ipa-profile" } */ +/* { dg-final { scan-ipa-dump " ./profile-dir-3.gcda" "profile" } } */ int main(void) @@ -8,4 +8,4 @@ main(void) return 0; } -/* { dg-final { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1.c b/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1.c index 94a5953c9f2..e9f3a418dca 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-ipa-tree_profile_ipa" } */ +/* { dg-options "-O2 -fdump-ipa-profile" } */ /* { dg-additional-sources "ic-misattribution-1a.c" } */ extern void other_caller (void); @@ -15,5 +15,5 @@ caller(void (*func) (void)) func (); } -/* { dg-final-use { scan-ipa-dump "hist->count 1 hist->all 1" "tree_profile_ipa" } } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { scan-ipa-dump "hist->count 1 hist->all 1" "profile" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1a.c b/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1a.c index caa10fec52f..fa9d6e70522 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1a.c +++ b/gcc/testsuite/gcc.dg/tree-prof/ic-misattribution-1a.c @@ -19,4 +19,4 @@ main () return 0; } -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c index 8f7508b4960..df7481f4daf 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c +++ b/gcc/testsuite/gcc.dg/tree-prof/indir-call-prof.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-tree_profile_ipa" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ static int a1 (void) { @@ -37,7 +37,7 @@ main (void) return 0; } -/* { dg-final-use { scan-ipa-dump "Indirect call -> direct call.* a1 transformation on insn" "tree_profile_ipa"} } */ +/* { dg-final-use { scan-ipa-dump "Indirect call -> direct call.* a1 transformation on insn" "profile"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/stringop-1.c b/gcc/testsuite/gcc.dg/tree-prof/stringop-1.c index fe200c82f22..f7306138732 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/stringop-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/stringop-1.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-tree_profile_ipa" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ int a[1000]; int b[1000]; int size=1; @@ -13,10 +13,10 @@ main() } return 0; } -/* { dg-final-use { scan-ipa-dump "Single value 4 stringop" "tree_profile_ipa"} } */ +/* { dg-final-use { scan-ipa-dump "Single value 4 stringop" "profile"} } */ /* Really this ought to simplify into assignment, but we are not there yet. */ /* a[0] = b[0] is what we fold the resulting memcpy into. */ /* { dg-final-use { scan-tree-dump " = MEM.*&b" "optimized"} } */ /* { dg-final-use { scan-tree-dump "MEM.*&a\\\] = " "optimized"} } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/stringop-2.c b/gcc/testsuite/gcc.dg/tree-prof/stringop-2.c index aa951c97c74..d5c58561be2 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/stringop-2.c +++ b/gcc/testsuite/gcc.dg/tree-prof/stringop-2.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-tree_profile_ipa" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ int a[1000]; int b[1000]; int size=1; @@ -13,8 +13,8 @@ main() } return 0; } -/* { dg-final-use { scan-ipa-dump "Single value 4 stringop" "tree_profile_ipa"} } */ +/* { dg-final-use { scan-ipa-dump "Single value 4 stringop" "profile"} } */ /* The versioned memset of size 4 should be optimized to an assignment. */ /* { dg-final-use { scan-tree-dump "a\\\[0\\\] = 168430090" "optimized"} } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c b/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c index 6b7dbd418a8..2bce8a2e5ff 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c +++ b/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-ipa-tree_profile_ipa-blocks -fdump-tree-optimized-blocks" } */ +/* { dg-options "-O2 -fdump-ipa-profile-blocks -fdump-tree-optimized-blocks" } */ int max = 33333; int a[8]; int @@ -14,8 +14,8 @@ main () /* Loop header copying will peel away the initial conditional, so the loop body is once reached directly from entry point of function, rest via loopback edge. */ -/* { dg-final-use { scan-ipa-dump "count:33333" "tree_profile_ipa"} } */ +/* { dg-final-use { scan-ipa-dump "count:33333" "profile"} } */ /* { dg-final-use { scan-tree-dump "count:33332" "optimized"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-1.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-1.c index 181b3d18443..d6f603e8b3c 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-1.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-tree_profile_ipa" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ int a[1000]; int b = 256; int c = 257; @@ -15,8 +15,8 @@ main () } return 0; } -/* { dg-final-use { scan-ipa-dump "Div.mod by constant n_\[0-9\]*=257 transformation on insn" "tree_profile_ipa"} } */ +/* { dg-final-use { scan-ipa-dump "Div.mod by constant n_\[0-9\]*=257 transformation on insn" "profile"} } */ /* { dg-final-use { scan-tree-dump "if \\(n_\[0-9\]* != 257\\)" "optimized"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-2.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-2.c index 97c91de8d61..16839612d0e 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-2.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-2.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-tree_profile_ipa" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ unsigned int a[1000]; unsigned int b = 256; unsigned int c = 1024; @@ -23,10 +23,10 @@ main () } return 0; } -/* { dg-final-use { scan-ipa-dump "Mod power of 2 transformation on insn" "tree_profile_ipa" } } */ +/* { dg-final-use { scan-ipa-dump "Mod power of 2 transformation on insn" "profile" } } */ /* This is part of code checking that n is power of 2, so we are sure that the transformation didn't get optimized out. */ /* { dg-final-use { scan-tree-dump "n_\[0-9\]* \\+ (4294967295|0x0*ffffffff)" "optimized"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c index 802dbf02af4..d7b3914a85a 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-3.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-tree_profile_ipa" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ unsigned int a[1000]; unsigned int b = 257; unsigned int c = 1023; @@ -23,10 +23,10 @@ main () } return 0; } -/* { dg-final-use { scan-ipa-dump "Mod subtract transformation on insn" "tree_profile_ipa" } } */ +/* { dg-final-use { scan-ipa-dump "Mod subtract transformation on insn" "profile" } } */ /* This is part of code checking that n is greater than the divisor so we are sure that it didn't get optimized out. */ /* { dg-final-use { scan-tree-dump "if \\(n_\[0-9\]* \\>" "optimized"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-4.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-4.c index d4d3085aa4e..239bf595d99 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-4.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-4.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-tree_profile_ipa" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ unsigned int a[1000]; unsigned int b = 999; unsigned int c = 1002; @@ -23,10 +23,10 @@ main () } return 0; } -/* { dg-final-use { scan-ipa-dump "Mod subtract transformation on insn" "tree_profile_ipa" } } */ +/* { dg-final-use { scan-ipa-dump "Mod subtract transformation on insn" "profile" } } */ /* This is part of code checking that n is greater than the divisor so we are sure that it didn't get optimized out. */ /* { dg-final-use { scan-tree-dump "if \\(n_\[0-9\]* \\>" "optimized"} } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c index 581f4d54a43..1a804a76716 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-5.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-tree_profile_ipa" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile" } */ int a[1000]; int b=997; main() @@ -11,7 +11,7 @@ main() a[i]/=b; return 0; } -/* { dg-final-use { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "tree_profile_ipa" } } */ +/* { dg-final-use { scan-ipa-dump "Div.mod by constant b.*=997 transformation on insn" "profile" } } */ /* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */ /* { dg-final-use { cleanup-tree-dump "optimized" } } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c b/gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c index 664b62039fc..5f532638445 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-prof-7.c @@ -1,4 +1,4 @@ -/* { dg-options "-O2 -fdump-ipa-tree_profile_ipa -mtune=core2" } */ +/* { dg-options "-O2 -fdump-ipa-profile -mtune=core2" } */ /* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */ #include <strings.h> @@ -22,5 +22,5 @@ int main() { return 0; } -/* { dg-final-use { scan-ipa-dump "Single value 8 stringop transformation on bzero" "tree_profile_ipa" } } */ -/* { dg-final-use { cleanup-ipa-dump "tree_profile_ipa" } } */ +/* { dg-final-use { scan-ipa-dump "Single value 8 stringop transformation on bzero" "profile" } } */ +/* { dg-final-use { cleanup-ipa-dump "profile" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/dump-1.c b/gcc/testsuite/gcc.dg/tree-ssa/dump-1.c index 382f3231b71..e55084899f6 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/dump-1.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/dump-1.c @@ -1,9 +1,9 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-profile-details" } */ +/* { dg-options "-O1 -fdump-tree-profile_estimate-details" } */ int f(void) { return 0; } -/* { dg-final { cleanup-tree-dump "profile" } } */ +/* { dg-final { cleanup-tree-dump "profile_estimate" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-25.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-25.c index 479ed81d970..c2fb74e5871 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/loop-25.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-25.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O1 -fdump-tree-profile" } */ +/* { dg-options "-O1 -fdump-tree-profile_estimate" } */ int foo(void); void bla(void); @@ -118,12 +118,12 @@ void test5 (void) } } -/* { dg-final { scan-tree-dump-times "Disambiguating loop" 5 "profile" } } */ +/* { dg-final { scan-tree-dump-times "Disambiguating loop" 5 "profile_estimate" } } */ /* For the following xfail marks, see PR35629. */ -/* { dg-final { scan-tree-dump-times "Found latch edge" 5 "profile" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "Merged latch edges" 2 "profile" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "4 loops found" 2 "profile" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "3 loops found" 2 "profile" { xfail *-*-* } } } */ -/* { dg-final { scan-tree-dump-times "2 loops found" 1 "profile" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "Found latch edge" 5 "profile_estimate" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "Merged latch edges" 2 "profile_estimate" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "4 loops found" 2 "profile_estimate" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "3 loops found" 2 "profile_estimate" { xfail *-*-* } } } */ +/* { dg-final { scan-tree-dump-times "2 loops found" 1 "profile_estimate" { xfail *-*-* } } } */ -/* { dg-final { cleanup-tree-dump "profile" } } */ +/* { dg-final { cleanup-tree-dump "profile_estimate" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/pr49093.c b/gcc/testsuite/gcc.dg/vect/pr49093.c new file mode 100644 index 00000000000..b8bded68687 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/pr49093.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -ftree-vectorize -fdump-tree-vect-details -fno-tree-fre" } */ + +volatile unsigned char g_324[4] = {0, 1, 0, 1}; +void foo (int); +int x, y; +void func_81(void) +{ + int l_466, l_439[7] = {0}, g_97; +lbl_473: + if (x) { + for (g_97 = 0; (g_97 < 4); ++g_97) { + if (y) + goto lbl_473; + g_324[g_97]; + l_466 = l_439[g_97]; + } + foo(l_466); + } +} + +/* { dg-final { cleanup-tree-dump "vect" } } */ diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c index a13bc98ba05..7cfac72d7f1 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c +++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c @@ -25,6 +25,19 @@ main1 (s *arr, int n) s res[N]; unsigned char x; + for (i = 0; i < N; i++) + { + res[i].a = 0; + res[i].b = 0; + res[i].c = 0; + res[i].d = 0; + res[i].e = 0; + res[i].f = 0; + res[i].g = 0; + res[i].h = 0; + __asm__ volatile (""); + } + /* Check peeling for gaps for unknown loop bound. */ for (i = 0; i < n; i++) { diff --git a/gcc/testsuite/gcc.target/arm/g2.c b/gcc/testsuite/gcc.target/arm/g2.c index 031b93657da..85ba1906a91 100644 --- a/gcc/testsuite/gcc.target/arm/g2.c +++ b/gcc/testsuite/gcc.target/arm/g2.c @@ -2,6 +2,8 @@ /* { dg-do compile } */ /* { dg-options "-mcpu=xscale -O2" } */ /* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */ +/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */ +/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ /* { dg-require-effective-target arm32 } */ /* Brett Gaines' test case. */ diff --git a/gcc/testsuite/gcc.target/arm/mmx-1.c b/gcc/testsuite/gcc.target/arm/mmx-1.c index c2eca7f78f5..d13c9828456 100644 --- a/gcc/testsuite/gcc.target/arm/mmx-1.c +++ b/gcc/testsuite/gcc.target/arm/mmx-1.c @@ -4,6 +4,7 @@ /* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mcpu=*" } { "-mcpu=iwmmxt" } } */ /* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mabi=*" } { "-mabi=iwmmxt" } } */ /* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-march=*" } { "-march=iwmmxt" } } */ +/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ /* { dg-options "-O -mno-apcs-frame -mcpu=iwmmxt -mabi=iwmmxt" } */ /* { dg-require-effective-target arm32 } */ /* { dg-require-effective-target arm_iwmmxt_ok } */ diff --git a/gcc/testsuite/gcc.target/arm/scd42-2.c b/gcc/testsuite/gcc.target/arm/scd42-2.c index 0c372983a54..e077402344b 100644 --- a/gcc/testsuite/gcc.target/arm/scd42-2.c +++ b/gcc/testsuite/gcc.target/arm/scd42-2.c @@ -2,6 +2,8 @@ /* { dg-do compile } */ /* { dg-options "-mcpu=xscale -O" } */ /* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-march=*" } { "-march=xscale" } } */ +/* { dg-skip-if "Test is specific to the Xscale" { arm*-*-* } { "-mcpu=*" } { "-mcpu=xscale" } } */ +/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ /* { dg-require-effective-target arm32 } */ unsigned load2(void) __attribute__ ((naked)); diff --git a/gcc/testsuite/gcc.target/i386/pr48688.c b/gcc/testsuite/gcc.target/i386/pr48688.c new file mode 100644 index 00000000000..f4d663a210b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr48688.c @@ -0,0 +1,24 @@ +/* PR target/48688 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int fn1 (int x) { return (x << 3) | 5; } +int fn2 (int x) { return (x * 8) | 5; } +int fn3 (int x) { return (x << 3) + 5; } +int fn4 (int x) { return (x * 8) + 5; } +int fn5 (int x) { return (x << 3) ^ 5; } +int fn6 (int x) { return (x * 8) ^ 5; } +long fn7 (long x) { return (x << 3) | 5; } +long fn8 (long x) { return (x * 8) | 5; } +long fn9 (long x) { return (x << 3) + 5; } +long fn10 (long x) { return (x * 8) + 5; } +long fn11 (long x) { return (x << 3) ^ 5; } +long fn12 (long x) { return (x * 8) ^ 5; } +long fn13 (unsigned x) { return (x << 3) | 5; } +long fn14 (unsigned x) { return (x * 8) | 5; } +long fn15 (unsigned x) { return (x << 3) + 5; } +long fn16 (unsigned x) { return (x * 8) + 5; } +long fn17 (unsigned x) { return (x << 3) ^ 5; } +long fn18 (unsigned x) { return (x * 8) ^ 5; } + +/* { dg-final { scan-assembler-not "\[ \t\]x?or\[bwlq\]\[ \t\]" } } */ diff --git a/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c b/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c index abfe5f3761b..2502fe77414 100644 --- a/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c +++ b/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c @@ -10,4 +10,4 @@ test (long long b) return _mm_cvtsi64_si128 (b); } -/* { dg-final { scan-assembler-times "\\*vec_concatv2di_rex64_sse4_1/4" 1 } } */ +/* { dg-final { scan-assembler-times "\\*vec_concatv2di_rex64/4" 1 } } */ diff --git a/gcc/testsuite/gcc.target/mips/pr45074.c b/gcc/testsuite/gcc.target/mips/pr45074.c new file mode 100644 index 00000000000..ba578c838c1 --- /dev/null +++ b/gcc/testsuite/gcc.target/mips/pr45074.c @@ -0,0 +1,8 @@ +/* { dg-options "-mhard-float -mgp32 -O" } */ +register double g __asm__("$f20"); + +NOMIPS16 void +test (double a) +{ + g = -a; +} diff --git a/gcc/testsuite/gcc.target/sparc/ultrasp12.c b/gcc/testsuite/gcc.target/sparc/ultrasp12.c new file mode 100644 index 00000000000..6c37f5662f8 --- /dev/null +++ b/gcc/testsuite/gcc.target/sparc/ultrasp12.c @@ -0,0 +1,64 @@ +/* PR rtl-optimization/48830 */ +/* Testcase by Hans-Peter Nilsson <hp@gcc.gnu.org> */ + +/* { dg-do compile } */ +/* { dg-require-effective-target lp64 } */ +/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */ + +typedef unsigned char uint8_t; +typedef unsigned int uint32_t; +typedef unsigned long int uint64_t; +typedef unsigned long int uintmax_t; +typedef unsigned char rc_vec_t __attribute__((__vector_size__(8))); +typedef short rc_svec_type_ __attribute__((__vector_size__(8))); +typedef unsigned char rc_vec4_type_ __attribute__((__vector_size__(4))); + +void +rc_stat_xsum_acc(const uint8_t *__restrict src1, int src1_dim, + const uint8_t *__restrict src2, int src2_dim, + int len, int height, uintmax_t sum[5]) +{ + uint32_t s1 = 0; + uint32_t s2 = 0; + uintmax_t s11 = 0; + uintmax_t s22 = 0; + uintmax_t s12 = 0; + int full = len / ((1024) < (1024) ? (1024) : (1024)); + int rem = len % ((1024) < (1024) ? (1024) : (1024)); + int rem1 = rem / 1; + int y; + unsigned int rc_gsr_scale_ __attribute__ ((__unused__)) = 7; unsigned int rc_gsr_align_ __attribute__ ((__unused__)) = 4; unsigned int rc_gsr_set_ __attribute__ ((__unused__)) = 0; register unsigned int rc_gsr_fakedep_ __attribute__ ((__unused__)) = 0; unsigned int rc_gsr_ldinit_ __attribute__ ((__unused__)) = 0; + for (y = 0; y < height; y++) { + rc_vec_t a1, a2, a11, a22, a12; + int i1 = (y)*(src1_dim); + int i2 = (y)*(src2_dim); + int x; + ((a1) = ((rc_vec_t) {0})); + ((a2) = ((rc_vec_t) {0})); + ((a11) = ((rc_vec_t) {0})); + ((a22) = ((rc_vec_t) {0})); + ((a12) = ((rc_vec_t) {0})); + for (x = 0; x < full; x++) { + int k; + for (k = 0; k < ((1024) < (1024) ? (1024) : (1024)) / + 1; k++) + { + do { rc_vec_t v1, v2; ((v1) = *(const rc_vec_t*)(&(src1)[i1])); ((v2) = *(const rc_vec_t*)(&(src2)[i2])); ((a1) = (((union { rc_vec_t v; uint64_t i; })(uint64_t)(__builtin_vis_pdist (v1, ((rc_vec_t) {0}), (((union { rc_vec_t v; uint64_t i; })(uint64_t)(a1)).i)))).v)); ((a2) = (((union { rc_vec_t v; uint64_t i; })(uint64_t)(__builtin_vis_pdist (v2, ((rc_vec_t) {0}), (((union { rc_vec_t v; uint64_t i; })(uint64_t)(a2)).i)))).v)); do { rc_vec_t s1_ = (v1); rc_vec_t s2_ = (v1); rc_vec_t accvin_ = (a11); rc_vec_t s1lo7_, s1msb_, accvout_; uint32_t maclo_, machi_; rc_svec_type_ masklow_ = (rc_svec_type_){(255), (255), (255), (255)}; rc_svec_type_ s1msbhi_, s1msblo_, s1lo7hi_, s1lo7lo_; rc_svec_type_ s1msbdiv2hi_, s1msbdiv2lo_; rc_vec4_type_ s1lo7hi4_, s1lo7lo4_, s1msbhi4_, s1msblo4_; rc_vec4_type_ s1msbdiv2hi4_, s1msbdiv2lo4_, s2hi4_, s2lo4_; rc_vec4_type_ accvhi4_, accvlo4_; rc_svec_type_ mulhilo7_, mullolo7_, mulhimsbdiv2_, mullomsbdiv2_; rc_svec_type_ mulhi_, mullo_, mulhihi_, mullohi_; rc_svec_type_ mulhilo_, mullolo_; rc_vec4_type_ zero4_ = (((union { rc_vec4_type_ v; uint64_t i; })(uint64_t)(0)).v); rc_vec_t msb_ = (rc_vec_t){(0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80)}; ((s1msb_) = (s1_) & (msb_)); ((s1lo7_) = (s1_) & (~msb_)); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_) : "0" (s1msb_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1msb_); (s1msbhi4_) = hl_.hilo_.hi_; (s1msblo4_) = hl_.hilo_.lo_; } while (0); s1msbhi_ = __builtin_vis_fexpand(s1msbhi4_); s1msblo_ = __builtin_vis_fexpand(s1msblo4_); s1msbdiv2hi4_ = __builtin_vis_fpack16(s1msbhi_); s1msbdiv2lo4_ = __builtin_vis_fpack16(s1msblo_); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s2_); (s2hi4_) = hl_.hilo_.hi_; (s2lo4_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1lo7_); (s1lo7hi4_) = hl_.hilo_.hi_; (s1lo7lo4_) = hl_.hilo_.lo_; } while (0); s1msbdiv2hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2hi4_, zero4_); s1msbdiv2lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2lo4_, zero4_); s1lo7hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7hi4_, zero4_); s1lo7lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7lo4_, zero4_); mulhilo7_ = __builtin_vis_fmul8x16(s2hi4_, s1lo7hi_); mullolo7_ = __builtin_vis_fmul8x16(s2lo4_, s1lo7lo_); mulhimsbdiv2_ = __builtin_vis_fmul8x16(s2hi4_, s1msbdiv2hi_); mullomsbdiv2_ = __builtin_vis_fmul8x16(s2lo4_, s1msbdiv2lo_); mulhi_ = mulhilo7_ + mulhimsbdiv2_ + mulhimsbdiv2_; mullo_ = mullolo7_ + mullomsbdiv2_ + mullomsbdiv2_; mulhihi_ = mulhi_ & ~masklow_; mulhilo_ = mulhi_ & masklow_; mullohi_ = mullo_ & ~masklow_; mullolo_ = mullo_ & masklow_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (accvin_); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); maclo_ = __builtin_vis_pdist ((rc_vec_t)mullolo_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i)); maclo_ = __builtin_vis_pdist ((rc_vec_t)mulhilo_, ((rc_vec_t) {0}), maclo_); machi_ = __builtin_vis_pdist ((rc_vec_t)mullohi_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i)); machi_ = __builtin_vis_pdist ((rc_vec_t)mulhihi_, ((rc_vec_t) {0}), machi_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)machi_)).v)), ((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)maclo_)).v))}}; (accvout_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (accvout_), "0" (rc_gsr_fakedep_)); (a11) = accvout_; } while (0); do { rc_vec_t s1_ = (v2); rc_vec_t s2_ = (v2); rc_vec_t accvin_ = (a22); rc_vec_t s1lo7_, s1msb_, accvout_; uint32_t maclo_, machi_; rc_svec_type_ masklow_ = (rc_svec_type_){(255), (255), (255), (255)}; rc_svec_type_ s1msbhi_, s1msblo_, s1lo7hi_, s1lo7lo_; rc_svec_type_ s1msbdiv2hi_, s1msbdiv2lo_; rc_vec4_type_ s1lo7hi4_, s1lo7lo4_, s1msbhi4_, s1msblo4_; rc_vec4_type_ s1msbdiv2hi4_, s1msbdiv2lo4_, s2hi4_, s2lo4_; rc_vec4_type_ accvhi4_, accvlo4_; rc_svec_type_ mulhilo7_, mullolo7_, mulhimsbdiv2_, mullomsbdiv2_; rc_svec_type_ mulhi_, mullo_, mulhihi_, mullohi_; rc_svec_type_ mulhilo_, mullolo_; rc_vec4_type_ zero4_ = (((union { rc_vec4_type_ v; uint64_t i; })(uint64_t)(0)).v); rc_vec_t msb_ = (rc_vec_t){(0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80)}; ((s1msb_) = (s1_) & (msb_)); ((s1lo7_) = (s1_) & (~msb_)); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_) : "0" (s1msb_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1msb_); (s1msbhi4_) = hl_.hilo_.hi_; (s1msblo4_) = hl_.hilo_.lo_; } while (0); s1msbhi_ = __builtin_vis_fexpand(s1msbhi4_); s1msblo_ = __builtin_vis_fexpand(s1msblo4_); s1msbdiv2hi4_ = __builtin_vis_fpack16(s1msbhi_); s1msbdiv2lo4_ = __builtin_vis_fpack16(s1msblo_); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s2_); (s2hi4_) = hl_.hilo_.hi_; (s2lo4_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1lo7_); (s1lo7hi4_) = hl_.hilo_.hi_; (s1lo7lo4_) = hl_.hilo_.lo_; } while (0); s1msbdiv2hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2hi4_, zero4_); s1msbdiv2lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2lo4_, zero4_); s1lo7hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7hi4_, zero4_); s1lo7lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7lo4_, zero4_); mulhilo7_ = __builtin_vis_fmul8x16(s2hi4_, s1lo7hi_); mullolo7_ = __builtin_vis_fmul8x16(s2lo4_, s1lo7lo_); mulhimsbdiv2_ = __builtin_vis_fmul8x16(s2hi4_, s1msbdiv2hi_); mullomsbdiv2_ = __builtin_vis_fmul8x16(s2lo4_, s1msbdiv2lo_); mulhi_ = mulhilo7_ + mulhimsbdiv2_ + mulhimsbdiv2_; mullo_ = mullolo7_ + mullomsbdiv2_ + mullomsbdiv2_; mulhihi_ = mulhi_ & ~masklow_; mulhilo_ = mulhi_ & masklow_; mullohi_ = mullo_ & ~masklow_; mullolo_ = mullo_ & masklow_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (accvin_); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); maclo_ = __builtin_vis_pdist ((rc_vec_t)mullolo_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i)); maclo_ = __builtin_vis_pdist ((rc_vec_t)mulhilo_, ((rc_vec_t) {0}), maclo_); machi_ = __builtin_vis_pdist ((rc_vec_t)mullohi_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i)); machi_ = __builtin_vis_pdist ((rc_vec_t)mulhihi_, ((rc_vec_t) {0}), machi_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)machi_)).v)), ((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)maclo_)).v))}}; (accvout_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (accvout_), "0" (rc_gsr_fakedep_)); (a22) = accvout_; } while (0); do { rc_vec_t s1_ = (v1); rc_vec_t s2_ = (v2); rc_vec_t accvin_ = (a12); rc_vec_t s1lo7_, s1msb_, accvout_; uint32_t maclo_, machi_; rc_svec_type_ masklow_ = (rc_svec_type_){(255), (255), (255), (255)}; rc_svec_type_ s1msbhi_, s1msblo_, s1lo7hi_, s1lo7lo_; rc_svec_type_ s1msbdiv2hi_, s1msbdiv2lo_; rc_vec4_type_ s1lo7hi4_, s1lo7lo4_, s1msbhi4_, s1msblo4_; rc_vec4_type_ s1msbdiv2hi4_, s1msbdiv2lo4_, s2hi4_, s2lo4_; rc_vec4_type_ accvhi4_, accvlo4_; rc_svec_type_ mulhilo7_, mullolo7_, mulhimsbdiv2_, mullomsbdiv2_; rc_svec_type_ mulhi_, mullo_, mulhihi_, mullohi_; rc_svec_type_ mulhilo_, mullolo_; rc_vec4_type_ zero4_ = (((union { rc_vec4_type_ v; uint64_t i; })(uint64_t)(0)).v); rc_vec_t msb_ = (rc_vec_t){(0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80)}; ((s1msb_) = (s1_) & (msb_)); ((s1lo7_) = (s1_) & (~msb_)); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_) : "0" (s1msb_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1msb_); (s1msbhi4_) = hl_.hilo_.hi_; (s1msblo4_) = hl_.hilo_.lo_; } while (0); s1msbhi_ = __builtin_vis_fexpand(s1msbhi4_); s1msblo_ = __builtin_vis_fexpand(s1msblo4_); s1msbdiv2hi4_ = __builtin_vis_fpack16(s1msbhi_); s1msbdiv2lo4_ = __builtin_vis_fpack16(s1msblo_); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s2_); (s2hi4_) = hl_.hilo_.hi_; (s2lo4_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1lo7_); (s1lo7hi4_) = hl_.hilo_.hi_; (s1lo7lo4_) = hl_.hilo_.lo_; } while (0); s1msbdiv2hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2hi4_, zero4_); s1msbdiv2lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2lo4_, zero4_); s1lo7hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7hi4_, zero4_); s1lo7lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7lo4_, zero4_); mulhilo7_ = __builtin_vis_fmul8x16(s2hi4_, s1lo7hi_); mullolo7_ = __builtin_vis_fmul8x16(s2lo4_, s1lo7lo_); mulhimsbdiv2_ = __builtin_vis_fmul8x16(s2hi4_, s1msbdiv2hi_); mullomsbdiv2_ = __builtin_vis_fmul8x16(s2lo4_, s1msbdiv2lo_); mulhi_ = mulhilo7_ + mulhimsbdiv2_ + mulhimsbdiv2_; mullo_ = mullolo7_ + mullomsbdiv2_ + mullomsbdiv2_; mulhihi_ = mulhi_ & ~masklow_; mulhilo_ = mulhi_ & masklow_; mullohi_ = mullo_ & ~masklow_; mullolo_ = mullo_ & masklow_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (accvin_); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); maclo_ = __builtin_vis_pdist ((rc_vec_t)mullolo_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i)); maclo_ = __builtin_vis_pdist ((rc_vec_t)mulhilo_, ((rc_vec_t) {0}), maclo_); machi_ = __builtin_vis_pdist ((rc_vec_t)mullohi_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i)); machi_ = __builtin_vis_pdist ((rc_vec_t)mulhihi_, ((rc_vec_t) {0}), machi_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)machi_)).v)), ((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)maclo_)).v))}}; (accvout_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (accvout_), "0" (rc_gsr_fakedep_)); (a12) = accvout_; } while (0); (i1) += 8; (i2) += 8; } while (0); + + } + do { uint32_t t1, t2, t11, t22, t12; ((t1) = (((union { rc_vec_t v; uint64_t i; })(uint64_t)(a1)).i)); ((t2) = (((union { rc_vec_t v; uint64_t i; })(uint64_t)(a2)).i)); do { rc_vec4_type_ accvhi4_, accvlo4_; uint64_t machi_, maclo_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (a11); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); machi_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i); maclo_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i); (t11) = maclo_ + machi_ * 256; } while (0); do { rc_vec4_type_ accvhi4_, accvlo4_; uint64_t machi_, maclo_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (a22); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); machi_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i); maclo_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i); (t22) = maclo_ + machi_ * 256; } while (0); do { rc_vec4_type_ accvhi4_, accvlo4_; uint64_t machi_, maclo_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (a12); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); machi_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i); maclo_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i); (t12) = maclo_ + machi_ * 256; } while (0); ((a1) = ((rc_vec_t) {0})); ((a2) = ((rc_vec_t) {0})); ((a11) = ((rc_vec_t) {0})); ((a22) = ((rc_vec_t) {0})); ((a12) = ((rc_vec_t) {0})); (s1) += t1; (s2) += t2; (s11) += t11; (s22) += t22; (s12) += t12; } while (0); + } + for (x = 0; x < rem1; x++) { + do { rc_vec_t v1, v2; ((v1) = *(const rc_vec_t*)(&(src1)[i1])); ((v2) = *(const rc_vec_t*)(&(src2)[i2])); ((a1) = (((union { rc_vec_t v; uint64_t i; })(uint64_t)(__builtin_vis_pdist (v1, ((rc_vec_t) {0}), (((union { rc_vec_t v; uint64_t i; })(uint64_t)(a1)).i)))).v)); ((a2) = (((union { rc_vec_t v; uint64_t i; })(uint64_t)(__builtin_vis_pdist (v2, ((rc_vec_t) {0}), (((union { rc_vec_t v; uint64_t i; })(uint64_t)(a2)).i)))).v)); do { rc_vec_t s1_ = (v1); rc_vec_t s2_ = (v1); rc_vec_t accvin_ = (a11); rc_vec_t s1lo7_, s1msb_, accvout_; uint32_t maclo_, machi_; rc_svec_type_ masklow_ = (rc_svec_type_){(255), (255), (255), (255)}; rc_svec_type_ s1msbhi_, s1msblo_, s1lo7hi_, s1lo7lo_; rc_svec_type_ s1msbdiv2hi_, s1msbdiv2lo_; rc_vec4_type_ s1lo7hi4_, s1lo7lo4_, s1msbhi4_, s1msblo4_; rc_vec4_type_ s1msbdiv2hi4_, s1msbdiv2lo4_, s2hi4_, s2lo4_; rc_vec4_type_ accvhi4_, accvlo4_; rc_svec_type_ mulhilo7_, mullolo7_, mulhimsbdiv2_, mullomsbdiv2_; rc_svec_type_ mulhi_, mullo_, mulhihi_, mullohi_; rc_svec_type_ mulhilo_, mullolo_; rc_vec4_type_ zero4_ = (((union { rc_vec4_type_ v; uint64_t i; })(uint64_t)(0)).v); rc_vec_t msb_ = (rc_vec_t){(0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80)}; ((s1msb_) = (s1_) & (msb_)); ((s1lo7_) = (s1_) & (~msb_)); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_) : "0" (s1msb_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1msb_); (s1msbhi4_) = hl_.hilo_.hi_; (s1msblo4_) = hl_.hilo_.lo_; } while (0); s1msbhi_ = __builtin_vis_fexpand(s1msbhi4_); s1msblo_ = __builtin_vis_fexpand(s1msblo4_); s1msbdiv2hi4_ = __builtin_vis_fpack16(s1msbhi_); s1msbdiv2lo4_ = __builtin_vis_fpack16(s1msblo_); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s2_); (s2hi4_) = hl_.hilo_.hi_; (s2lo4_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1lo7_); (s1lo7hi4_) = hl_.hilo_.hi_; (s1lo7lo4_) = hl_.hilo_.lo_; } while (0); s1msbdiv2hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2hi4_, zero4_); s1msbdiv2lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2lo4_, zero4_); s1lo7hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7hi4_, zero4_); s1lo7lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7lo4_, zero4_); mulhilo7_ = __builtin_vis_fmul8x16(s2hi4_, s1lo7hi_); mullolo7_ = __builtin_vis_fmul8x16(s2lo4_, s1lo7lo_); mulhimsbdiv2_ = __builtin_vis_fmul8x16(s2hi4_, s1msbdiv2hi_); mullomsbdiv2_ = __builtin_vis_fmul8x16(s2lo4_, s1msbdiv2lo_); mulhi_ = mulhilo7_ + mulhimsbdiv2_ + mulhimsbdiv2_; mullo_ = mullolo7_ + mullomsbdiv2_ + mullomsbdiv2_; mulhihi_ = mulhi_ & ~masklow_; mulhilo_ = mulhi_ & masklow_; mullohi_ = mullo_ & ~masklow_; mullolo_ = mullo_ & masklow_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (accvin_); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); maclo_ = __builtin_vis_pdist ((rc_vec_t)mullolo_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i)); maclo_ = __builtin_vis_pdist ((rc_vec_t)mulhilo_, ((rc_vec_t) {0}), maclo_); machi_ = __builtin_vis_pdist ((rc_vec_t)mullohi_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i)); machi_ = __builtin_vis_pdist ((rc_vec_t)mulhihi_, ((rc_vec_t) {0}), machi_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)machi_)).v)), ((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)maclo_)).v))}}; (accvout_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (accvout_), "0" (rc_gsr_fakedep_)); (a11) = accvout_; } while (0); do { rc_vec_t s1_ = (v2); rc_vec_t s2_ = (v2); rc_vec_t accvin_ = (a22); rc_vec_t s1lo7_, s1msb_, accvout_; uint32_t maclo_, machi_; rc_svec_type_ masklow_ = (rc_svec_type_){(255), (255), (255), (255)}; rc_svec_type_ s1msbhi_, s1msblo_, s1lo7hi_, s1lo7lo_; rc_svec_type_ s1msbdiv2hi_, s1msbdiv2lo_; rc_vec4_type_ s1lo7hi4_, s1lo7lo4_, s1msbhi4_, s1msblo4_; rc_vec4_type_ s1msbdiv2hi4_, s1msbdiv2lo4_, s2hi4_, s2lo4_; rc_vec4_type_ accvhi4_, accvlo4_; rc_svec_type_ mulhilo7_, mullolo7_, mulhimsbdiv2_, mullomsbdiv2_; rc_svec_type_ mulhi_, mullo_, mulhihi_, mullohi_; rc_svec_type_ mulhilo_, mullolo_; rc_vec4_type_ zero4_ = (((union { rc_vec4_type_ v; uint64_t i; })(uint64_t)(0)).v); rc_vec_t msb_ = (rc_vec_t){(0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80)}; ((s1msb_) = (s1_) & (msb_)); ((s1lo7_) = (s1_) & (~msb_)); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_) : "0" (s1msb_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1msb_); (s1msbhi4_) = hl_.hilo_.hi_; (s1msblo4_) = hl_.hilo_.lo_; } while (0); s1msbhi_ = __builtin_vis_fexpand(s1msbhi4_); s1msblo_ = __builtin_vis_fexpand(s1msblo4_); s1msbdiv2hi4_ = __builtin_vis_fpack16(s1msbhi_); s1msbdiv2lo4_ = __builtin_vis_fpack16(s1msblo_); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s2_); (s2hi4_) = hl_.hilo_.hi_; (s2lo4_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1lo7_); (s1lo7hi4_) = hl_.hilo_.hi_; (s1lo7lo4_) = hl_.hilo_.lo_; } while (0); s1msbdiv2hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2hi4_, zero4_); s1msbdiv2lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2lo4_, zero4_); s1lo7hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7hi4_, zero4_); s1lo7lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7lo4_, zero4_); mulhilo7_ = __builtin_vis_fmul8x16(s2hi4_, s1lo7hi_); mullolo7_ = __builtin_vis_fmul8x16(s2lo4_, s1lo7lo_); mulhimsbdiv2_ = __builtin_vis_fmul8x16(s2hi4_, s1msbdiv2hi_); mullomsbdiv2_ = __builtin_vis_fmul8x16(s2lo4_, s1msbdiv2lo_); mulhi_ = mulhilo7_ + mulhimsbdiv2_ + mulhimsbdiv2_; mullo_ = mullolo7_ + mullomsbdiv2_ + mullomsbdiv2_; mulhihi_ = mulhi_ & ~masklow_; mulhilo_ = mulhi_ & masklow_; mullohi_ = mullo_ & ~masklow_; mullolo_ = mullo_ & masklow_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (accvin_); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); maclo_ = __builtin_vis_pdist ((rc_vec_t)mullolo_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i)); maclo_ = __builtin_vis_pdist ((rc_vec_t)mulhilo_, ((rc_vec_t) {0}), maclo_); machi_ = __builtin_vis_pdist ((rc_vec_t)mullohi_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i)); machi_ = __builtin_vis_pdist ((rc_vec_t)mulhihi_, ((rc_vec_t) {0}), machi_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)machi_)).v)), ((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)maclo_)).v))}}; (accvout_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (accvout_), "0" (rc_gsr_fakedep_)); (a22) = accvout_; } while (0); do { rc_vec_t s1_ = (v1); rc_vec_t s2_ = (v2); rc_vec_t accvin_ = (a12); rc_vec_t s1lo7_, s1msb_, accvout_; uint32_t maclo_, machi_; rc_svec_type_ masklow_ = (rc_svec_type_){(255), (255), (255), (255)}; rc_svec_type_ s1msbhi_, s1msblo_, s1lo7hi_, s1lo7lo_; rc_svec_type_ s1msbdiv2hi_, s1msbdiv2lo_; rc_vec4_type_ s1lo7hi4_, s1lo7lo4_, s1msbhi4_, s1msblo4_; rc_vec4_type_ s1msbdiv2hi4_, s1msbdiv2lo4_, s2hi4_, s2lo4_; rc_vec4_type_ accvhi4_, accvlo4_; rc_svec_type_ mulhilo7_, mullolo7_, mulhimsbdiv2_, mullomsbdiv2_; rc_svec_type_ mulhi_, mullo_, mulhihi_, mullohi_; rc_svec_type_ mulhilo_, mullolo_; rc_vec4_type_ zero4_ = (((union { rc_vec4_type_ v; uint64_t i; })(uint64_t)(0)).v); rc_vec_t msb_ = (rc_vec_t){(0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80), (0x80)}; ((s1msb_) = (s1_) & (msb_)); ((s1lo7_) = (s1_) & (~msb_)); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1msb_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1msb_) : "0" (s1msb_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1msb_); (s1msbhi4_) = hl_.hilo_.hi_; (s1msblo4_) = hl_.hilo_.lo_; } while (0); s1msbhi_ = __builtin_vis_fexpand(s1msbhi4_); s1msblo_ = __builtin_vis_fexpand(s1msblo4_); s1msbdiv2hi4_ = __builtin_vis_fpack16(s1msbhi_); s1msbdiv2lo4_ = __builtin_vis_fpack16(s1msblo_); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s2_); (s2hi4_) = hl_.hilo_.hi_; (s2lo4_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1lo7_); (s1lo7hi4_) = hl_.hilo_.hi_; (s1lo7lo4_) = hl_.hilo_.lo_; } while (0); s1msbdiv2hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2hi4_, zero4_); s1msbdiv2lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1msbdiv2lo4_, zero4_); s1lo7hi_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7hi4_, zero4_); s1lo7lo_ = (rc_svec_type_)__builtin_vis_fpmerge(s1lo7lo4_, zero4_); mulhilo7_ = __builtin_vis_fmul8x16(s2hi4_, s1lo7hi_); mullolo7_ = __builtin_vis_fmul8x16(s2lo4_, s1lo7lo_); mulhimsbdiv2_ = __builtin_vis_fmul8x16(s2hi4_, s1msbdiv2hi_); mullomsbdiv2_ = __builtin_vis_fmul8x16(s2lo4_, s1msbdiv2lo_); mulhi_ = mulhilo7_ + mulhimsbdiv2_ + mulhimsbdiv2_; mullo_ = mullolo7_ + mullomsbdiv2_ + mullomsbdiv2_; mulhihi_ = mulhi_ & ~masklow_; mulhilo_ = mulhi_ & masklow_; mullohi_ = mullo_ & ~masklow_; mullolo_ = mullo_ & masklow_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (accvin_); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); maclo_ = __builtin_vis_pdist ((rc_vec_t)mullolo_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i)); maclo_ = __builtin_vis_pdist ((rc_vec_t)mulhilo_, ((rc_vec_t) {0}), maclo_); machi_ = __builtin_vis_pdist ((rc_vec_t)mullohi_, ((rc_vec_t) {0}), (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i)); machi_ = __builtin_vis_pdist ((rc_vec_t)mulhihi_, ((rc_vec_t) {0}), machi_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)machi_)).v)), ((((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)((uint32_t)maclo_)).v))}}; (accvout_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (accvout_), "0" (rc_gsr_fakedep_)); (a12) = accvout_; } while (0); (i1) += 8; (i2) += 8; } while (0); + } + do { uint32_t t1, t2, t11, t22, t12; ((t1) = (((union { rc_vec_t v; uint64_t i; })(uint64_t)(a1)).i)); ((t2) = (((union { rc_vec_t v; uint64_t i; })(uint64_t)(a2)).i)); do { rc_vec4_type_ accvhi4_, accvlo4_; uint64_t machi_, maclo_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (a11); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); machi_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i); maclo_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i); (t11) = maclo_ + machi_ * 256; } while (0); do { rc_vec4_type_ accvhi4_, accvlo4_; uint64_t machi_, maclo_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (a22); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); machi_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i); maclo_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i); (t22) = maclo_ + machi_ * 256; } while (0); do { rc_vec4_type_ accvhi4_, accvlo4_; uint64_t machi_, maclo_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (a12); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); machi_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i); maclo_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i); (t12) = maclo_ + machi_ * 256; } while (0); ((a1) = ((rc_vec_t) {0})); ((a2) = ((rc_vec_t) {0})); ((a11) = ((rc_vec_t) {0})); ((a22) = ((rc_vec_t) {0})); ((a12) = ((rc_vec_t) {0})); (s1) += t1; (s2) += t2; (s11) += t11; (s22) += t22; (s12) += t12; } while (0); + + do { uint32_t t1, t2, t11, t22, t12; ((t1) = (((union { rc_vec_t v; uint64_t i; })(uint64_t)(a1)).i)); ((t2) = (((union { rc_vec_t v; uint64_t i; })(uint64_t)(a2)).i)); do { rc_vec4_type_ accvhi4_, accvlo4_; uint64_t machi_, maclo_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (a11); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); machi_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i); maclo_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i); (t11) = maclo_ + machi_ * 256; } while (0); do { rc_vec4_type_ accvhi4_, accvlo4_; uint64_t machi_, maclo_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (a22); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); machi_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i); maclo_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i); (t22) = maclo_ + machi_ * 256; } while (0); do { rc_vec4_type_ accvhi4_, accvlo4_; uint64_t machi_, maclo_; do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (a12); (accvhi4_) = hl_.hilo_.hi_; (accvlo4_) = hl_.hilo_.lo_; } while (0); machi_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvhi4_)).i); maclo_ = (((union { rc_vec4_type_ v; uint32_t i; })(uint32_t)(accvlo4_)).i); (t12) = maclo_ + machi_ * 256; } while (0); ((a1) = ((rc_vec_t) {0})); ((a2) = ((rc_vec_t) {0})); ((a11) = ((rc_vec_t) {0})); ((a22) = ((rc_vec_t) {0})); ((a12) = ((rc_vec_t) {0})); (s1) += t1; (s2) += t2; (s11) += t11; (s22) += t22; (s12) += t12; } while (0); + } + sum[0] = s1; + sum[1] = s2; + sum[2] = s11; + sum[3] = s22; + sum[4] = s12; + ; +} diff --git a/gcc/testsuite/gcc.target/sparc/ultrasp13.c b/gcc/testsuite/gcc.target/sparc/ultrasp13.c new file mode 100644 index 00000000000..2a068546c5e --- /dev/null +++ b/gcc/testsuite/gcc.target/sparc/ultrasp13.c @@ -0,0 +1,23 @@ +/* PR rtl-optimization/48840 */ +/* Testcase by Hans-Peter Nilsson <hp@gcc.gnu.org> */ + +/* { dg-do compile } */ +/* { dg-require-effective-target lp64 } */ +/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */ + +typedef unsigned char uint8_t; + +typedef unsigned char rc_vec_t __attribute__((__vector_size__(8))); +typedef short rc_svec_type_ __attribute__((__vector_size__(8))); + +typedef unsigned char rc_vec4_type_ __attribute__((__vector_size__(4))); +typedef short rc_svec2_type_ __attribute__((__vector_size__(4))); + +void +rc_filter_sobel_3x3_horz_u8(uint8_t *__restrict dst, int dst_dim, + const uint8_t *__restrict src, int src_dim, + int width, int height) +{ + do { int tot = (((width) + (8) - 1) / (8)); int len = tot / 3; int rem = tot % 3; int y; unsigned int rc_gsr_scale_ __attribute__ ((__unused__)) = 7; unsigned int rc_gsr_align_ __attribute__ ((__unused__)) = 4; unsigned int rc_gsr_set_ __attribute__ ((__unused__)) = 0; register unsigned int rc_gsr_fakedep_ __attribute__ ((__unused__)) = 0; unsigned int rc_gsr_ldinit_ __attribute__ ((__unused__)) = 0; for (y = 0; y < (height); y++) { rc_vec_t v11, v12, v13; rc_vec_t v21, v22, v23; rc_vec_t v31, v32, v33; rc_vec_t s1, s2, s3; int j = y*(dst_dim); int i2 = y*(src_dim) + 8; int i1 = i2 - (src_dim); int i3 = i2 + (src_dim); int x; ((s1) = *(const rc_vec_t*)(&(src)[i1 - 2*8])); ((s2) = *(const rc_vec_t*)(&(src)[i2 - 2*8])); ((s3) = *(const rc_vec_t*)(&(src)[i3 - 2*8])); do { do { rc_vec_t s1_ = (s1); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s3); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v11) = dstv_; } while (0); do { rc_vec_t s1_ = (v11); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_) + (rc_svec_type_){(16), (16), (16), (16)}; los_ = (lo1_) + (lo2_) + (rc_svec_type_){(16), (16), (16), (16)}; hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v21) = dstv_; } while (0); do { rc_vec_t s1_ = (v11); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v11) = dstv_; } while (0); } while (0); ((s1) = *(const rc_vec_t*)(&(src)[i1 - 8])); ((s2) = *(const rc_vec_t*)(&(src)[i2 - 8])); ((s3) = *(const rc_vec_t*)(&(src)[i3 - 8])); do { do { rc_vec_t s1_ = (s1); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s3); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v12) = dstv_; } while (0); do { rc_vec_t s1_ = (v12); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_) + (rc_svec_type_){(16), (16), (16), (16)}; los_ = (lo1_) + (lo2_) + (rc_svec_type_){(16), (16), (16), (16)}; hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v22) = dstv_; } while (0); do { rc_vec_t s1_ = (v12); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v12) = dstv_; } while (0); } while (0); ((v13) = ((rc_vec_t) {0})); ((v23) = ((rc_vec_t) {0})); ((v33) = ((rc_vec_t) {0})); (void)v21, (void)v22; (void)v31, (void)v32; for (x = 0; x < len; x++) { do { rc_vec_t p1, p2, p3, sum; ((p1) = *(const rc_vec_t*)(&(src)[i1])); ((p2) = *(const rc_vec_t*)(&(src)[i2])); ((p3) = *(const rc_vec_t*)(&(src)[i3])); do { do { rc_vec_t s1_ = (p1); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p3); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v13) = dstv_; } while (0); do { rc_vec_t s1_ = (v13); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_) + (rc_svec_type_){(16), (16), (16), (16)}; los_ = (lo1_) + (lo2_) + (rc_svec_type_){(16), (16), (16), (16)}; hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v23) = dstv_; } while (0); do { rc_vec_t s1_ = (v13); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v13) = dstv_; } while (0); } while (0); do { rc_vec_t u12, u23; do { rc_vec_t shv_; do { rc_vec_t v_ = (v12); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(8 - 1) || !__builtin_constant_p(rc_gsr_scale_) || !rc_gsr_set_ || (unsigned) (8 - 1) != rc_gsr_align_ || (unsigned) (rc_gsr_scale_) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (8 - 1); rc_gsr_scale_ = (rc_gsr_scale_); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_) : "0" (v_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); (shv_) = v_; } while (0); do { rc_vec_t dstv_ = __builtin_vis_faligndatav8qi(v11, shv_); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (u12) = dstv_; } while (0); } while (0); do { rc_vec_t shv_; do { rc_vec_t v_ = (v23); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(1) || !__builtin_constant_p(rc_gsr_scale_) || !rc_gsr_set_ || (unsigned) (1) != rc_gsr_align_ || (unsigned) (rc_gsr_scale_) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (1); rc_gsr_scale_ = (rc_gsr_scale_); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_) : "0" (v_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); (shv_) = v_; } while (0); do { rc_vec_t dstv_ = __builtin_vis_faligndatav8qi(v22, shv_); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (u23) = dstv_; } while (0); } while (0); do { rc_vec_t s1_ = (u23); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (u12); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = ((hi1_) - (hi2_) + (rc_svec_type_){(256*16), (256*16), (256*16), (256*16)}); los_ = ((lo1_) - (lo2_) + (rc_svec_type_){(256*16), (256*16), (256*16), (256*16)}); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (sum) = dstv_; } while (0); } while (0); (*(rc_vec_t*)(&(dst)[j]) = (sum)); (i1) += 8; (i2) += 8; (i3) += 8; (j) += 8; } while (0); do { rc_vec_t p1, p2, p3, sum; ((p1) = *(const rc_vec_t*)(&(src)[i1])); ((p2) = *(const rc_vec_t*)(&(src)[i2])); ((p3) = *(const rc_vec_t*)(&(src)[i3])); do { do { rc_vec_t s1_ = (p1); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p3); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v11) = dstv_; } while (0); do { rc_vec_t s1_ = (v11); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_) + (rc_svec_type_){(16), (16), (16), (16)}; los_ = (lo1_) + (lo2_) + (rc_svec_type_){(16), (16), (16), (16)}; hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v21) = dstv_; } while (0); do { rc_vec_t s1_ = (v11); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v11) = dstv_; } while (0); } while (0); do { rc_vec_t u12, u23; do { rc_vec_t shv_; do { rc_vec_t v_ = (v13); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(8 - 1) || !__builtin_constant_p(rc_gsr_scale_) || !rc_gsr_set_ || (unsigned) (8 - 1) != rc_gsr_align_ || (unsigned) (rc_gsr_scale_) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (8 - 1); rc_gsr_scale_ = (rc_gsr_scale_); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_) : "0" (v_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); (shv_) = v_; } while (0); do { rc_vec_t dstv_ = __builtin_vis_faligndatav8qi(v12, shv_); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (u12) = dstv_; } while (0); } while (0); do { rc_vec_t shv_; do { rc_vec_t v_ = (v21); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(1) || !__builtin_constant_p(rc_gsr_scale_) || !rc_gsr_set_ || (unsigned) (1) != rc_gsr_align_ || (unsigned) (rc_gsr_scale_) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (1); rc_gsr_scale_ = (rc_gsr_scale_); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_) : "0" (v_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); (shv_) = v_; } while (0); do { rc_vec_t dstv_ = __builtin_vis_faligndatav8qi(v23, shv_); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (u23) = dstv_; } while (0); } while (0); do { rc_vec_t s1_ = (u23); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (u12); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = ((hi1_) - (hi2_) + (rc_svec_type_){(256*16), (256*16), (256*16), (256*16)}); los_ = ((lo1_) - (lo2_) + (rc_svec_type_){(256*16), (256*16), (256*16), (256*16)}); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (sum) = dstv_; } while (0); } while (0); (*(rc_vec_t*)(&(dst)[j]) = (sum)); (i1) += 8; (i2) += 8; (i3) += 8; (j) += 8; } while (0); do { rc_vec_t p1, p2, p3, sum; ((p1) = *(const rc_vec_t*)(&(src)[i1])); ((p2) = *(const rc_vec_t*)(&(src)[i2])); ((p3) = *(const rc_vec_t*)(&(src)[i3])); do { do { rc_vec_t s1_ = (p1); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p3); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v12) = dstv_; } while (0); do { rc_vec_t s1_ = (v12); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_) + (rc_svec_type_){(16), (16), (16), (16)}; los_ = (lo1_) + (lo2_) + (rc_svec_type_){(16), (16), (16), (16)}; hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v22) = dstv_; } while (0); do { rc_vec_t s1_ = (v12); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v12) = dstv_; } while (0); } while (0); do { rc_vec_t u12, u23; do { rc_vec_t shv_; do { rc_vec_t v_ = (v11); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(8 - 1) || !__builtin_constant_p(rc_gsr_scale_) || !rc_gsr_set_ || (unsigned) (8 - 1) != rc_gsr_align_ || (unsigned) (rc_gsr_scale_) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (8 - 1); rc_gsr_scale_ = (rc_gsr_scale_); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_) : "0" (v_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); (shv_) = v_; } while (0); do { rc_vec_t dstv_ = __builtin_vis_faligndatav8qi(v13, shv_); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (u12) = dstv_; } while (0); } while (0); do { rc_vec_t shv_; do { rc_vec_t v_ = (v22); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(1) || !__builtin_constant_p(rc_gsr_scale_) || !rc_gsr_set_ || (unsigned) (1) != rc_gsr_align_ || (unsigned) (rc_gsr_scale_) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (1); rc_gsr_scale_ = (rc_gsr_scale_); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_) : "0" (v_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); (shv_) = v_; } while (0); do { rc_vec_t dstv_ = __builtin_vis_faligndatav8qi(v21, shv_); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (u23) = dstv_; } while (0); } while (0); do { rc_vec_t s1_ = (u23); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (u12); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = ((hi1_) - (hi2_) + (rc_svec_type_){(256*16), (256*16), (256*16), (256*16)}); los_ = ((lo1_) - (lo2_) + (rc_svec_type_){(256*16), (256*16), (256*16), (256*16)}); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (sum) = dstv_; } while (0); } while (0); (*(rc_vec_t*)(&(dst)[j]) = (sum)); (i1) += 8; (i2) += 8; (i3) += 8; (j) += 8; } while (0); } if (rem > 0) { do { rc_vec_t p1, p2, p3, sum; ((p1) = *(const rc_vec_t*)(&(src)[i1])); ((p2) = *(const rc_vec_t*)(&(src)[i2])); ((p3) = *(const rc_vec_t*)(&(src)[i3])); do { do { rc_vec_t s1_ = (p1); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p3); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v13) = dstv_; } while (0); do { rc_vec_t s1_ = (v13); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_) + (rc_svec_type_){(16), (16), (16), (16)}; los_ = (lo1_) + (lo2_) + (rc_svec_type_){(16), (16), (16), (16)}; hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v23) = dstv_; } while (0); do { rc_vec_t s1_ = (v13); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v13) = dstv_; } while (0); } while (0); do { rc_vec_t u12, u23; do { rc_vec_t shv_; do { rc_vec_t v_ = (v12); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(8 - 1) || !__builtin_constant_p(rc_gsr_scale_) || !rc_gsr_set_ || (unsigned) (8 - 1) != rc_gsr_align_ || (unsigned) (rc_gsr_scale_) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (8 - 1); rc_gsr_scale_ = (rc_gsr_scale_); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_) : "0" (v_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); (shv_) = v_; } while (0); do { rc_vec_t dstv_ = __builtin_vis_faligndatav8qi(v11, shv_); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (u12) = dstv_; } while (0); } while (0); do { rc_vec_t shv_; do { rc_vec_t v_ = (v23); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(1) || !__builtin_constant_p(rc_gsr_scale_) || !rc_gsr_set_ || (unsigned) (1) != rc_gsr_align_ || (unsigned) (rc_gsr_scale_) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (1); rc_gsr_scale_ = (rc_gsr_scale_); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_) : "0" (v_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); (shv_) = v_; } while (0); do { rc_vec_t dstv_ = __builtin_vis_faligndatav8qi(v22, shv_); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (u23) = dstv_; } while (0); } while (0); do { rc_vec_t s1_ = (u23); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (u12); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = ((hi1_) - (hi2_) + (rc_svec_type_){(256*16), (256*16), (256*16), (256*16)}); los_ = ((lo1_) - (lo2_) + (rc_svec_type_){(256*16), (256*16), (256*16), (256*16)}); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (sum) = dstv_; } while (0); } while (0); (*(rc_vec_t*)(&(dst)[j]) = (sum)); (i1) += 8; (i2) += 8; (i3) += 8; (j) += 8; } while (0); } if (rem > 1) { do { rc_vec_t p1, p2, p3, sum; ((p1) = *(const rc_vec_t*)(&(src)[i1])); ((p2) = *(const rc_vec_t*)(&(src)[i2])); ((p3) = *(const rc_vec_t*)(&(src)[i3])); do { do { rc_vec_t s1_ = (p1); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p3); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v11) = dstv_; } while (0); do { rc_vec_t s1_ = (v11); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_) + (rc_svec_type_){(16), (16), (16), (16)}; los_ = (lo1_) + (lo2_) + (rc_svec_type_){(16), (16), (16), (16)}; hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v21) = dstv_; } while (0); do { rc_vec_t s1_ = (v11); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (p2); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = (hi1_) + (hi2_); los_ = (lo1_) + (lo2_); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (v11) = dstv_; } while (0); } while (0); do { rc_vec_t u12, u23; do { rc_vec_t shv_; do { rc_vec_t v_ = (v13); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(8 - 1) || !__builtin_constant_p(rc_gsr_scale_) || !rc_gsr_set_ || (unsigned) (8 - 1) != rc_gsr_align_ || (unsigned) (rc_gsr_scale_) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (8 - 1); rc_gsr_scale_ = (rc_gsr_scale_); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_) : "0" (v_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); (shv_) = v_; } while (0); do { rc_vec_t dstv_ = __builtin_vis_faligndatav8qi(v12, shv_); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (u12) = dstv_; } while (0); } while (0); do { rc_vec_t shv_; do { rc_vec_t v_ = (v21); do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(1) || !__builtin_constant_p(rc_gsr_scale_) || !rc_gsr_set_ || (unsigned) (1) != rc_gsr_align_ || (unsigned) (rc_gsr_scale_) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (1); rc_gsr_scale_ = (rc_gsr_scale_); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (v_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (v_) : "0" (v_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); (shv_) = v_; } while (0); do { rc_vec_t dstv_ = __builtin_vis_faligndatav8qi(v23, shv_); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (u23) = dstv_; } while (0); } while (0); do { rc_vec_t s1_ = (u23); rc_vec_t dstv_; rc_vec4_type_ hi_, lo_; rc_vec4_type_ s1hi_, s1lo_; rc_vec4_type_ s2hi_, s2lo_; rc_svec_type_ hi1_, hi2_, lo1_, lo2_, his_, los_; do { if (rc_gsr_ldinit_) { extern void rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(void); rc_mixing_GSR_setting_with_RC_VEC_LDINIT_(); } if (!__builtin_constant_p(rc_gsr_align_) || !__builtin_constant_p(2) || !rc_gsr_set_ || (unsigned) (rc_gsr_align_) != rc_gsr_align_ || (unsigned) (2) != rc_gsr_scale_) { rc_gsr_set_ = 1; rc_gsr_align_ = (rc_gsr_align_); rc_gsr_scale_ = (2); unsigned int val_ = (rc_gsr_scale_ << 3) | rc_gsr_align_; if (__builtin_constant_p (val_)) { __asm__("wr %%g0,%[gsrval],%%gsr\n" ";# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "i" (val_), "1" (rc_gsr_fakedep_)); } else { __asm__("wr %[gsrval],0,%%gsr" "\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_), [fakegsr] "=rm" (rc_gsr_fakedep_) : "0" (s1_), [gsrval] "r" (val_), "1" (rc_gsr_fakedep_)); } } else { __asm__("\n;# dep %[depvec] on fake GSR %[fakegsr]" : [depvec] "=brm" (s1_) : "0" (s1_), [fakegsr] "g" (rc_gsr_fakedep_)); } } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (s1_); (s1hi_) = hl_.hilo_.hi_; (s1lo_) = hl_.hilo_.lo_; } while (0); do { typedef union { rc_vec_t v_; struct { rc_vec4_type_ hi_, lo_; } hilo_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) (u12); (s2hi_) = hl_.hilo_.hi_; (s2lo_) = hl_.hilo_.lo_; } while (0); hi1_ = __builtin_vis_fexpand(s1hi_); lo1_ = __builtin_vis_fexpand(s1lo_); hi2_ = __builtin_vis_fexpand(s2hi_); lo2_ = __builtin_vis_fexpand(s2lo_); his_ = ((hi1_) - (hi2_) + (rc_svec_type_){(256*16), (256*16), (256*16), (256*16)}); los_ = ((lo1_) - (lo2_) + (rc_svec_type_){(256*16), (256*16), (256*16), (256*16)}); hi_ = __builtin_vis_fpack16(his_); lo_ = __builtin_vis_fpack16(los_); do { typedef union { struct { rc_vec4_type_ hi_, lo_; } hilo_; rc_vec_t v_; } RC_hl_type_; RC_hl_type_ hl_ = (RC_hl_type_) {{(hi_), (lo_)}}; (dstv_) = hl_.v_; } while (0); __asm__("\n;# dep fake GSR %[fakegsr] on %[xdep]" : [fakegsr] "=brm" (rc_gsr_fakedep_) : [xdep] "brm" (dstv_), "0" (rc_gsr_fakedep_)); (sum) = dstv_; } while (0); } while (0); (*(rc_vec_t*)(&(dst)[j]) = (sum)); (i1) += 8; (i2) += 8; (i3) += 8; (j) += 8; } while (0); } } ; } while (0); + +} diff --git a/gcc/testsuite/gfortran.dg/PR37039.f90 b/gcc/testsuite/gfortran.dg/PR37039.f90 new file mode 100644 index 00000000000..6311f274c8a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/PR37039.f90 @@ -0,0 +1,15 @@ +! { dg-do compile } +! { dg-options "-fcray-pointer" } +! +! Test for PR37039, from an issue on comp.lang.fortran +! http://groups.google.com/group/comp.lang.fortran/msg/8cfa06f222721386 + + subroutine test(nnode) + implicit none + integer n,nnode + pointer(ip_tab, tab) + integer , dimension(1:nnode) :: tab + do n=1,nnode + tab(n) = 0 + enddo + end subroutine test diff --git a/gcc/testsuite/gfortran.dg/PR49268.f90 b/gcc/testsuite/gfortran.dg/PR49268.f90 new file mode 100644 index 00000000000..5b274cf483d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/PR49268.f90 @@ -0,0 +1,51 @@ +! { dg-do run } +! { dg-options "-fcray-pointer" } + +! Test the fix for a runtime error +! Contributed by Mike Kumbera <kumbera1@llnl.gov> + + program bob + implicit none + integer*8 ipfoo + integer n,m,i,j + real*8 foo + + common /ipdata/ ipfoo + common /ipsize/ n,m + POINTER ( ipfoo, foo(3,7) ) + + n=3 + m=7 + + ipfoo=malloc(8*n*m) + do i=1,n + do j=1,m + foo(i,j)=1.d0 + end do + end do + call use_foo() + end program bob + + + subroutine use_foo() + implicit none + integer n,m,i,j + integer*8 ipfoo + common /ipdata/ ipfoo + common /ipsize/ n,m + real*8 foo,boo + + !fails if * is the last dimension + POINTER ( ipfoo, foo(n,*) ) + + !works if the last dimension is specified + !POINTER ( ipfoo, foo(n,m) ) + boo=0.d0 + do i=1,n + do j=1,m + boo=foo(i,j)+1.0 + if (abs (boo - 2.0) .gt. 1e-6) call abort + end do + end do + + end subroutine use_foo diff --git a/gcc/testsuite/gfortran.dg/coarray/atomic_1.f90 b/gcc/testsuite/gfortran.dg/coarray/atomic_1.f90 new file mode 100644 index 00000000000..1cf621287a6 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray/atomic_1.f90 @@ -0,0 +1,27 @@ +! { dg-do run } +! +! PR fortran/18918 +! +! Basic atomic def/ref test +! + +use iso_fortran_env, only: atomic_int_kind, atomic_logical_kind +implicit none +integer(atomic_int_kind) :: a(1)[*] +logical(atomic_logical_kind) :: c[*] +intrinsic :: atomic_define +intrinsic :: atomic_ref +integer(8) :: b +logical(1) :: d + +call atomic_define(a(1), 7_2) +call atomic_ref(b, a(1)) +if (b /= a(1)) call abort() + +call atomic_define(c, .false.) +call atomic_ref(d, c[this_image()]) +if (d .neqv. .false.) call abort() +call atomic_define(c[this_image()], .true.) +call atomic_ref(d, c) +if (d .neqv. .true.) call abort() +end diff --git a/gcc/testsuite/gfortran.dg/coarray/dummy_1.f90 b/gcc/testsuite/gfortran.dg/coarray/dummy_1.f90 new file mode 100644 index 00000000000..8e4b7d7fcf1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray/dummy_1.f90 @@ -0,0 +1,70 @@ +! { dg-do run } +! +! PR fortran/18918 +! +! Check whether assumed-shape's cobounds are properly handled +! + implicit none + integer :: B(1)[*] + integer :: C(8:11)[-3:10,43:*] + integer, allocatable :: D(:)[:,:] + + allocate (D(20)[2:3,5:*]) + + call sub (B,5) + call sub (C,3) + call sub (D,3) + + call sub2 (B, -3) + call sub2 (C, 44) + call sub2 (D, 44) + + call sub3 (B) + call sub3 (C) + call sub3 (D) + + call sub4 (B) + call sub4 (C) + call sub4 (D) + + call sub5 (D) + contains + + subroutine sub(A,n) + integer :: n + integer :: A(n:)[n:2*n,3*n:*] + if (lbound(A,dim=1) /= n) call abort () + if (any (lcobound(A) /= [n, 3*n])) call abort () + if (ucobound(A, dim=1) /= 2*n) call abort() + end subroutine sub + + subroutine sub2(A,n) + integer :: n + integer :: A(:)[-n:*] + if (lbound(A,dim=1) /= 1) call abort () + if (lcobound(A, dim=1) /= -n) call abort () + end subroutine sub2 + + subroutine sub3(A) + integer :: A(:)[0,*] + if (lbound(A,dim=1) /= 1) call abort () + if (lcobound(A, dim=1) /= 1) call abort () + if (ucobound(A, dim=1) /= 0) call abort () + if (lcobound(A, dim=2) /= 1) call abort () + end subroutine sub3 + + subroutine sub4(A) + integer :: A(:)[*] + if (lbound(A,dim=1) /= 1) call abort () + if (lcobound(A, dim=1) /= 1) call abort () + end subroutine sub4 + + subroutine sub5(A) + integer, allocatable :: A(:)[:,:] + + if (lbound(A,dim=1) /= 1) call abort () + if (lcobound(A, dim=1) /= 2) call abort () + if (ucobound(A, dim=1) /= 3) call abort () + if (lcobound(A, dim=2) /= 5) call abort () + end subroutine sub5 + end diff --git a/gcc/testsuite/gfortran.dg/coarray_4.f90 b/gcc/testsuite/gfortran.dg/coarray_4.f90 index 5607ec99ace..be2bc4edb5c 100644 --- a/gcc/testsuite/gfortran.dg/coarray_4.f90 +++ b/gcc/testsuite/gfortran.dg/coarray_4.f90 @@ -18,7 +18,8 @@ subroutine valid(n, c, f) save :: k integer :: ii = 7 block - integer, save :: kk[ii, *] ! { dg-error "cannot have the SAVE attribute" } + integer :: j = 5 + integer, save :: kk[j, *] ! { dg-error "Variable .j. cannot appear in the expression" } end block end subroutine valid @@ -43,10 +44,10 @@ subroutine invalid(n) complex, save :: hh(n)[*] ! { dg-error "cannot have the SAVE attribute" } integer :: j = 6 - integer, save :: hf1[j,*] ! { dg-error "cannot appear in the expression|cannot have the SAVE attribute" } - integer, save :: hf2[n,*] ! { dg-error "cannot have the SAVE attribute" } + integer, save :: hf1[j,*] ! { dg-error "cannot appear in the expression" } + integer, save :: hf2[n,*] ! OK integer, save :: hf3(4)[j,*] ! { dg-error "cannot appear in the expression|cannot have the SAVE attribute" } - integer, save :: hf4(5)[n,*] ! { dg-error "cannot have the SAVE attribute" } + integer, save :: hf4(5)[n,*] ! OK integer, allocatable :: a2[*] ! { dg-error "must have deferred shape" } integer, allocatable :: a3(:)[*] ! { dg-error "must have deferred shape" } diff --git a/gcc/testsuite/gfortran.dg/coarray_atomic_1.f90 b/gcc/testsuite/gfortran.dg/coarray_atomic_1.f90 new file mode 100644 index 00000000000..bf94b914cb7 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_atomic_1.f90 @@ -0,0 +1,21 @@ +! { dg-do compile } +! { dg-options "-fcoarray=single -std=f2008" } +! +! PR fortran/18918 +! +! Diagnostic for atomic subroutines +! +use iso_fortran_env, only: atomic_int_kind, atomic_logical_kind +implicit none +integer(atomic_int_kind) :: a(1)[*] +logical(1) :: c[*] +integer(atomic_int_kind) :: b +logical(atomic_logical_kind) :: d, e[*] + +call atomic_define(a, 7_2) ! { dg-error "must be a scalar" } +call atomic_ref(b, b) ! { dg-error "shall be a coarray" } + +call atomic_define(c, 7) ! { dg-error "an integer of ATOMIC_INT_KIND or a logical of ATOMIC_LOGICAL_KIND" } +call atomic_ref(d, a(1)) ! { dg-error "shall have the same type" } +call atomic_ref(.true., e) ! { dg-error "shall be definable" } +end diff --git a/gcc/testsuite/gfortran.dg/module_procedure_double_colon_1.f90 b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_1.f90 new file mode 100644 index 00000000000..200f0ff26e1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_1.f90 @@ -0,0 +1,23 @@ +! { dg-do compile } +! +! PR fortran/49265 +! Contributed by Erik Toussaint +! +module m1 + implicit none + interface foo + module procedure::bar + module procedure ::bar_none + module procedure:: none_bar + end interface +contains + subroutine bar + end subroutine + subroutine bar_none(i) + integer i + end subroutine + subroutine none_bar(x) + real x + end subroutine +end module +! { dg-final { cleanup-modules "m1" } } diff --git a/gcc/testsuite/gfortran.dg/module_procedure_double_colon_2.f90 b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_2.f90 new file mode 100644 index 00000000000..9300215e749 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_2.f90 @@ -0,0 +1,24 @@ +! { dg-do compile } +! { dg-options "-std=f95" } +! +! PR fortran/49265 +! Contributed by Erik Toussaint +! +module m1 + implicit none + interface foo + module procedure::bar ! { dg-error "double colon" } + module procedure ::bar_none ! { dg-error "double colon" } + module procedure:: none_bar ! { dg-error "double colon" } + end interface +contains + subroutine bar + end subroutine + subroutine bar_none(i) + integer i + end subroutine + subroutine none_bar(x) + real x + end subroutine +end module +! { dg-final { cleanup-modules "m1" } } diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 53990f60631..37dd6b8dceb 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1059,7 +1059,7 @@ proc check_sse_os_support_available { } { check_runtime_nocache sse_os_support_available { int main () { - __asm__ volatile ("movss %xmm2,%xmm1"); + __asm__ volatile ("movaps %xmm0,%xmm0"); return 0; } } "-msse" diff --git a/gcc/testsuite/lib/timeout.exp b/gcc/testsuite/lib/timeout.exp index b4f4c18c704..c8cb09fddcd 100644 --- a/gcc/testsuite/lib/timeout.exp +++ b/gcc/testsuite/lib/timeout.exp @@ -46,6 +46,8 @@ proc timeout_value { args } { set val $tool_timeout } elseif [target_info exists gcc,timeout] { set val [target_info gcc,timeout] + } elseif [board_info target exists gcc,timeout] { + set val [board_info target gcc,timeout] } else { # This is really, REALLY ugly, but this is the default from # remote.exp deep within DejaGnu. diff --git a/gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm b/gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm new file mode 100644 index 00000000000..c554894b228 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/attributes/method-nonnull-1.mm @@ -0,0 +1,46 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, May 2011. */ +/* { dg-do compile } */ +/* { dg-options "-Wall" } */ + +#include <objc/objc.h> +#include <stdlib.h> + +@interface MyArray +{ + Class isa; +} ++ (void) addObject: (id)object __attribute__ ((nonnull)); +- (void) addObject: (id)object __attribute__ ((nonnull)); + ++ (void) insertObject: (id)object atIndex: (size_t)index __attribute__ ((nonnull (1))); +- (void) insertObject: (id)object atIndex: (size_t)index __attribute__ ((nonnull (1))); + ++ (void) insertObject: (id)object atIndex: (size_t)index andObject: (id)anotherObject atIndex: (size_t)anotherIndex __attribute__ ((nonnull (1, 3))); +- (void) insertObject: (id)object atIndex: (size_t)index andObject: (id)anotherObject atIndex: (size_t)anotherIndex __attribute__ ((nonnull (1, 3))); + +/* Test the behaviour with invalid code. */ ++ (void) removeObject: (id)object __attribute__ ((nonnull (0))); /* { dg-error "out-of-range" } */ +- (void) removeObject: (id)object __attribute__ ((nonnull (0))); /* { dg-error "out-of-range" } */ + ++ (void) removeObject: (id)object __attribute__ ((nonnull (2))); /* { dg-error "out-of-range" } */ +- (void) removeObject: (id)object __attribute__ ((nonnull (2))); /* { dg-error "out-of-range" } */ + ++ (void) removeObjectAtIndex: (size_t)object __attribute__ ((nonnull (1))); /* { dg-error "non-pointer operand" } */ +- (void) removeObjectAtIndex: (size_t)object __attribute__ ((nonnull (1))); /* { dg-error "non-pointer operand" } */ + ++ (void) removeObject: (id)object __attribute__ ((nonnull (MyArray))); /* { dg-error "" } */ +- (void) removeObject: (id)object __attribute__ ((nonnull (MyArray))); /* { dg-error "" } */ +@end + +void test (MyArray *object) +{ + [object addObject: object]; + [object addObject: nil]; /* { dg-warning "null argument where non-null required" } */ + + [object insertObject: object atIndex: 4]; + [object insertObject: nil atIndex: 4]; /* { dg-warning "null argument where non-null required" } */ + + [object insertObject: object atIndex: 2 andObject: object atIndex: 3]; + [object insertObject: nil atIndex: 2 andObject: object atIndex: 3]; /* { dg-warning "null argument where non-null required" } */ + [object insertObject: object atIndex: 2 andObject: nil atIndex: 3]; /* { dg-warning "null argument where non-null required" } */ +} diff --git a/gcc/testsuite/obj-c++.dg/method-6.mm b/gcc/testsuite/obj-c++.dg/method-6.mm index 6c21e799589..0e099227cd1 100644 --- a/gcc/testsuite/obj-c++.dg/method-6.mm +++ b/gcc/testsuite/obj-c++.dg/method-6.mm @@ -1,6 +1,5 @@ -/* The following should NOT generate "may not respond to" warnings, - since a forward-declared @class (instance) should be treated like a - 'Class') ('id'). */ +/* The following should NOT generate "may not respond to" warnings, since a forward-declared + @class (instance) should be treated like a 'Class') ('id'). */ /* { dg-do compile } */ @@ -9,11 +8,11 @@ @class NotKnown; void foo(NotKnown *n) { - [NotKnown new]; - [n nonexistent_method]; /* { dg-warning "no .\\-nonexistent_method. method found" } */ + [NotKnown new]; /* { dg-warning ".interface of class .NotKnown. not found" } */ + [n nonexistent_method]; /* { dg-warning ".interface of class .NotKnown. not found" } */ + /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 12 } */ } /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 0 } */ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 0 } */ - diff --git a/gcc/testsuite/obj-c++.dg/method-7.mm b/gcc/testsuite/obj-c++.dg/method-7.mm index e9e2d3a4307..85abf7d3117 100644 --- a/gcc/testsuite/obj-c++.dg/method-7.mm +++ b/gcc/testsuite/obj-c++.dg/method-7.mm @@ -1,6 +1,5 @@ /* Check if sending messages to "underspecified" objects is handled gracefully. */ /* Author: Ziemowit Laski <zlaski@apple.com>. */ - /* { dg-do compile } */ @class UnderSpecified; @@ -10,10 +9,12 @@ typedef struct NotAClass { void foo(UnderSpecified *u, NotAClass *n) { [n nonexistent_method]; /* { dg-warning "invalid receiver type" } */ - /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 12 } */ + /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 11 } */ [NotAClass nonexistent_method]; /* { dg-error ".NotAClass. is not an Objective\\-C class name or alias" } */ - [u nonexistent_method]; /* { dg-warning "no .\\-nonexistent_method. method found" } */ - [UnderSpecified nonexistent_method]; /* { dg-warning "no .\\+nonexistent_method. method found" } */ + [u nonexistent_method]; /* { dg-warning ".interface of class .UnderSpecified. not found" } */ + /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 14 } */ + [UnderSpecified nonexistent_method]; /* { dg-warning ".interface of class .UnderSpecified. not found" } */ + /* { dg-warning "no .\\+nonexistent_method. method found" "" { target *-*-* } 16 } */ } /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/obj-c++.dg/method-lookup-1.mm b/gcc/testsuite/obj-c++.dg/method-lookup-1.mm new file mode 100644 index 00000000000..47499c37c08 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/method-lookup-1.mm @@ -0,0 +1,94 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, June 2011. */ +/* { dg-do compile } */ + +@class NotKnown; + +@protocol MyProtocol ++ (id) classMethod; +- (id) instanceMethod; +@end + +@protocol MyProtocol2 ++ (id) classMethod2; +- (id) instanceMethod2; +@end + +void test (Class x, Class <MyProtocol> y, id w, id <MyProtocol> z, NotKnown *a, NotKnown <MyProtocol> *b) +{ + /* "Class x" means that "x" responds to any class methods, and may + also respond to instance methods because instance methods of the + root class are class methods. */ + [x classMethod]; /* No warning here. */ + + [x instanceMethod]; /* No warning here. */ + + + /* "Class <MyProtocol> y" means that "y" responds to any class + methods specified in the protocol MyProtocol, but not to other + class or instance methods. If a class method is not found, an + instance method from the protocol may be used instead but that is + suspicious and gets a warning. */ + [y classMethod]; /* No warning here. */ + + [y instanceMethod]; /* { dg-warning "found .\\-instanceMethod. instead of .\\+instanceMethod. in protocol" } */ + + [y classMethod2]; /* { dg-warning ".\\+classMethod2. not found in protocol" } */ + + [y instanceMethod2]; /* { dg-warning ".\\+instanceMethod2. not found in protocol" } */ + + + /* If a class is specified by name, the @interface must be available + to check what it responds to. */ + [NotKnown classMethod]; /* { dg-warning ".interface of class .NotKnown. not found" } */ + + + /* "id w" means that "w" responds to anything, both class and + instance methods. */ + [w instanceMethod]; /* No warning here. */ + + [w instanceMethod2]; /* No warning here. */ + + [w classMethod]; /* No warning here. */ + + [w classMethod2]; /* No warning here. */ + + + /* "id <MyProtocol> z" means that "z" responds to any instance + methods in the protocol, but not class methods. To select class + methods, you use "Class <MyProtocol> z". */ + [z instanceMethod]; /* No warning here. */ + + [z instanceMethod2]; /* { dg-warning ".\\-instanceMethod2. not found in protocol" } */ + + [z classMethod]; /* { dg-warning ".\\-classMethod. not found in protocol" } */ + + [z classMethod2]; /* { dg-warning ".\\-classMethod2. not found in protocol" } */ + + + /* "NotKnown *a" means that "a" is an instance of NotKnown. Since + the programmer explicitly specified the class name, it must be + because they expect the compiler to do type-checking; the + @interface must be available to do this check, otherwise the + compiler does not know what "a" responds to. */ + [a instanceMethod]; /* { dg-warning ".interface of class .NotKnown. not found" } */ + + /* But, if you cast it to "id", then you're disabling type-checking + and the warnings should go away. */ + [(id)a instanceMethod]; /* No warning here. */ + + + /* "NotKnown <MyProtocol> *b" means that "a" is an instance of + NotKnown, and also implements protocol <MyProtocol>. If you send + a message that is part of the protocol, then the compiler can do + type-checking and all is fine. */ + [b instanceMethod]; + + /* But if you send a message that is not part of the protocol, then + you'll get a warning that the method can not be found in the + protocol. */ + [b instanceMethod2]; /* { dg-warning ".\\-instanceMethod2. not found in protocol" } */ + + /* But, if you cast it to "id", then you're disabling type-checking + and the warnings should go away. */ + [(id)b instanceMethod2]; /* No warning here. */ +} diff --git a/gcc/testsuite/objc.dg/attributes/method-nonnull-1.m b/gcc/testsuite/objc.dg/attributes/method-nonnull-1.m new file mode 100644 index 00000000000..49003242d76 --- /dev/null +++ b/gcc/testsuite/objc.dg/attributes/method-nonnull-1.m @@ -0,0 +1,46 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, May 2011. */ +/* { dg-do compile } */ +/* { dg-options "-Wall" } */ + +#include <objc/objc.h> +#include <stdlib.h> + +@interface MyArray +{ + Class isa; +} ++ (void) addObject: (id)object __attribute__ ((nonnull)); +- (void) addObject: (id)object __attribute__ ((nonnull)); + ++ (void) insertObject: (id)object atIndex: (size_t)index __attribute__ ((nonnull (1))); +- (void) insertObject: (id)object atIndex: (size_t)index __attribute__ ((nonnull (1))); + ++ (void) insertObject: (id)object atIndex: (size_t)index andObject: (id)anotherObject atIndex: (size_t)anotherIndex __attribute__ ((nonnull (1, 3))); +- (void) insertObject: (id)object atIndex: (size_t)index andObject: (id)anotherObject atIndex: (size_t)anotherIndex __attribute__ ((nonnull (1, 3))); + +/* Test the behaviour with invalid code. */ ++ (void) removeObject: (id)object __attribute__ ((nonnull (0))); /* { dg-error "out-of-range" } */ +- (void) removeObject: (id)object __attribute__ ((nonnull (0))); /* { dg-error "out-of-range" } */ + ++ (void) removeObject: (id)object __attribute__ ((nonnull (2))); /* { dg-error "out-of-range" } */ +- (void) removeObject: (id)object __attribute__ ((nonnull (2))); /* { dg-error "out-of-range" } */ + ++ (void) removeObjectAtIndex: (size_t)object __attribute__ ((nonnull (1))); /* { dg-error "non-pointer operand" } */ +- (void) removeObjectAtIndex: (size_t)object __attribute__ ((nonnull (1))); /* { dg-error "non-pointer operand" } */ + ++ (void) removeObject: (id)object __attribute__ ((nonnull (MyArray))); /* { dg-error "invalid operand" } */ +- (void) removeObject: (id)object __attribute__ ((nonnull (MyArray))); /* { dg-error "invalid operand" } */ +@end + +void test (MyArray *object) +{ + [object addObject: object]; + [object addObject: nil]; /* { dg-warning "null argument where non-null required" } */ + + [object insertObject: object atIndex: 4]; + [object insertObject: nil atIndex: 4]; /* { dg-warning "null argument where non-null required" } */ + + [object insertObject: object atIndex: 2 andObject: object atIndex: 3]; + [object insertObject: nil atIndex: 2 andObject: object atIndex: 3]; /* { dg-warning "null argument where non-null required" } */ + [object insertObject: object atIndex: 2 andObject: nil atIndex: 3]; /* { dg-warning "null argument where non-null required" } */ +} diff --git a/gcc/testsuite/objc.dg/headers.m b/gcc/testsuite/objc.dg/headers.m index 4c61e1e5524..c20b36ac111 100644 --- a/gcc/testsuite/objc.dg/headers.m +++ b/gcc/testsuite/objc.dg/headers.m @@ -14,18 +14,11 @@ #include <objc/objc-runtime.h> #else #include <objc/encoding.h> -#include <objc/hash.h> #endif #include <objc/objc-api.h> -#ifndef __NEXT_RUNTIME__ -#include <objc/objc-list.h> -#endif - #include <objc/objc.h> #ifndef __NEXT_RUNTIME__ -#include <objc/sarray.h> #include <objc/thr.h> -#include <objc/typedstream.h> #endif diff --git a/gcc/testsuite/objc.dg/method-19.m b/gcc/testsuite/objc.dg/method-19.m index 362d55858f9..0e099227cd1 100644 --- a/gcc/testsuite/objc.dg/method-19.m +++ b/gcc/testsuite/objc.dg/method-19.m @@ -8,8 +8,9 @@ @class NotKnown; void foo(NotKnown *n) { - [NotKnown new]; - [n nonexistent_method]; /* { dg-warning "no .\\-nonexistent_method. method found" } */ + [NotKnown new]; /* { dg-warning ".interface of class .NotKnown. not found" } */ + [n nonexistent_method]; /* { dg-warning ".interface of class .NotKnown. not found" } */ + /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 12 } */ } /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/objc.dg/method-5.m b/gcc/testsuite/objc.dg/method-5.m index 9fa8cb6d988..85abf7d3117 100644 --- a/gcc/testsuite/objc.dg/method-5.m +++ b/gcc/testsuite/objc.dg/method-5.m @@ -11,8 +11,10 @@ void foo(UnderSpecified *u, NotAClass *n) { [n nonexistent_method]; /* { dg-warning "invalid receiver type" } */ /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 11 } */ [NotAClass nonexistent_method]; /* { dg-error ".NotAClass. is not an Objective\\-C class name or alias" } */ - [u nonexistent_method]; /* { dg-warning "no .\\-nonexistent_method. method found" } */ - [UnderSpecified nonexistent_method]; /* { dg-warning "no .\\+nonexistent_method. method found" } */ + [u nonexistent_method]; /* { dg-warning ".interface of class .UnderSpecified. not found" } */ + /* { dg-warning "no .\\-nonexistent_method. method found" "" { target *-*-* } 14 } */ + [UnderSpecified nonexistent_method]; /* { dg-warning ".interface of class .UnderSpecified. not found" } */ + /* { dg-warning "no .\\+nonexistent_method. method found" "" { target *-*-* } 16 } */ } /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/objc.dg/method-lookup-1.m b/gcc/testsuite/objc.dg/method-lookup-1.m new file mode 100644 index 00000000000..47499c37c08 --- /dev/null +++ b/gcc/testsuite/objc.dg/method-lookup-1.m @@ -0,0 +1,94 @@ +/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, June 2011. */ +/* { dg-do compile } */ + +@class NotKnown; + +@protocol MyProtocol ++ (id) classMethod; +- (id) instanceMethod; +@end + +@protocol MyProtocol2 ++ (id) classMethod2; +- (id) instanceMethod2; +@end + +void test (Class x, Class <MyProtocol> y, id w, id <MyProtocol> z, NotKnown *a, NotKnown <MyProtocol> *b) +{ + /* "Class x" means that "x" responds to any class methods, and may + also respond to instance methods because instance methods of the + root class are class methods. */ + [x classMethod]; /* No warning here. */ + + [x instanceMethod]; /* No warning here. */ + + + /* "Class <MyProtocol> y" means that "y" responds to any class + methods specified in the protocol MyProtocol, but not to other + class or instance methods. If a class method is not found, an + instance method from the protocol may be used instead but that is + suspicious and gets a warning. */ + [y classMethod]; /* No warning here. */ + + [y instanceMethod]; /* { dg-warning "found .\\-instanceMethod. instead of .\\+instanceMethod. in protocol" } */ + + [y classMethod2]; /* { dg-warning ".\\+classMethod2. not found in protocol" } */ + + [y instanceMethod2]; /* { dg-warning ".\\+instanceMethod2. not found in protocol" } */ + + + /* If a class is specified by name, the @interface must be available + to check what it responds to. */ + [NotKnown classMethod]; /* { dg-warning ".interface of class .NotKnown. not found" } */ + + + /* "id w" means that "w" responds to anything, both class and + instance methods. */ + [w instanceMethod]; /* No warning here. */ + + [w instanceMethod2]; /* No warning here. */ + + [w classMethod]; /* No warning here. */ + + [w classMethod2]; /* No warning here. */ + + + /* "id <MyProtocol> z" means that "z" responds to any instance + methods in the protocol, but not class methods. To select class + methods, you use "Class <MyProtocol> z". */ + [z instanceMethod]; /* No warning here. */ + + [z instanceMethod2]; /* { dg-warning ".\\-instanceMethod2. not found in protocol" } */ + + [z classMethod]; /* { dg-warning ".\\-classMethod. not found in protocol" } */ + + [z classMethod2]; /* { dg-warning ".\\-classMethod2. not found in protocol" } */ + + + /* "NotKnown *a" means that "a" is an instance of NotKnown. Since + the programmer explicitly specified the class name, it must be + because they expect the compiler to do type-checking; the + @interface must be available to do this check, otherwise the + compiler does not know what "a" responds to. */ + [a instanceMethod]; /* { dg-warning ".interface of class .NotKnown. not found" } */ + + /* But, if you cast it to "id", then you're disabling type-checking + and the warnings should go away. */ + [(id)a instanceMethod]; /* No warning here. */ + + + /* "NotKnown <MyProtocol> *b" means that "a" is an instance of + NotKnown, and also implements protocol <MyProtocol>. If you send + a message that is part of the protocol, then the compiler can do + type-checking and all is fine. */ + [b instanceMethod]; + + /* But if you send a message that is not part of the protocol, then + you'll get a warning that the method can not be found in the + protocol. */ + [b instanceMethod2]; /* { dg-warning ".\\-instanceMethod2. not found in protocol" } */ + + /* But, if you cast it to "id", then you're disabling type-checking + and the warnings should go away. */ + [(id)b instanceMethod2]; /* No warning here. */ +} diff --git a/gcc/testsuite/objc.dg/torture/forward-1.m b/gcc/testsuite/objc.dg/torture/forward-1.m index bccf4a11233..0d6f9ac4017 100644 --- a/gcc/testsuite/objc.dg/torture/forward-1.m +++ b/gcc/testsuite/objc.dg/torture/forward-1.m @@ -71,7 +71,9 @@ id forwarder, receiver; /* If we have a reciever try to perform on that object */ if (receiver) return [receiver performv: theSel: theArgFrame]; - return [self doesNotRecognize:theSel]; + + /* Normally you'd emit an error here. */ + printf ("Unrecognized selector\n"); } @end int main() diff --git a/gcc/testsuite/objc.dg/type-stream-1.m b/gcc/testsuite/objc.dg/type-stream-1.m deleted file mode 100644 index 9f2d509fbf7..00000000000 --- a/gcc/testsuite/objc.dg/type-stream-1.m +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do compile } */ -/* { dg-skip-if "" { *-*-* } { "-fnext-runtime" } { "" } } */ - -/* Test warning for deprecated typedstream functions. These functions - will be removed in the release after 4.6.0, at which point this - testcase can be removed too. - */ - -#include <objc/typedstream.h> - -void dummy (void) -{ - TypedStream* t = objc_open_typed_stream_for_file ("dummy", 0); /* { dg-warning "deprecated" } */ - - objc_write_object (t, nil); /* { dg-warning "deprecated" } */ - objc_read_object (t, NULL); /* { dg-warning "deprecated" } */ -} diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index f6b171024bd..5ba659c2b0b 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2052,11 +2052,7 @@ gimple_dump_cfg (FILE *file, int flags) { if (flags & TDF_DETAILS) { - const char *funcname - = lang_hooks.decl_printable_name (current_function_decl, 2); - - fputc ('\n', file); - fprintf (file, ";; Function %s\n\n", funcname); + dump_function_header (file, current_function_decl); fprintf (file, ";; \n%d basic blocks, %d edges, last basic block %d.\n\n", n_basic_blocks, n_edges, last_basic_block); @@ -7525,4 +7521,3 @@ struct gimple_opt_pass pass_warn_unused_result = 0, /* todo_flags_finish */ } }; - diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index f2f5a220018..bfdcad637c8 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -3013,3 +3013,39 @@ pp_base_tree_identifier (pretty_printer *pp, tree id) pp_append_text (pp, IDENTIFIER_POINTER (id), IDENTIFIER_POINTER (id) + IDENTIFIER_LENGTH (id)); } + +/* A helper function that is used to dump function information before the + function dump. */ + +void +dump_function_header (FILE *dump_file, tree fdecl) +{ + const char *dname, *aname; + struct cgraph_node *node = cgraph_get_node (fdecl); + struct function *fun = DECL_STRUCT_FUNCTION (fdecl); + + dname = lang_hooks.decl_printable_name (fdecl, 2); + + if (DECL_ASSEMBLER_NAME_SET_P (fdecl)) + aname = (IDENTIFIER_POINTER + (DECL_ASSEMBLER_NAME (fdecl))); + else + aname = "<unset-asm-name>"; + + if (node) + { + fprintf (dump_file, "\n;; Function %s (%s, funcdef_no=%d, decl_uid=%d, cgraph_uid=%d)", + dname, aname, fun->funcdef_no, DECL_UID(fdecl), node->uid); + fprintf (dump_file, "%s\n\n", + node->frequency == NODE_FREQUENCY_HOT + ? " (hot)" + : node->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED + ? " (unlikely executed)" + : node->frequency == NODE_FREQUENCY_EXECUTED_ONCE + ? " (executed once)" + : ""); + } + else + fprintf (dump_file, "\n;; Function %s (%s, funcdef_no=%d, decl_uid = %d)", + dname, aname, fun->funcdef_no, DECL_UID(fdecl)); +} diff --git a/gcc/tree-pretty-print.h b/gcc/tree-pretty-print.h index 8346dc4e48f..60758789f15 100644 --- a/gcc/tree-pretty-print.h +++ b/gcc/tree-pretty-print.h @@ -50,6 +50,7 @@ extern void debug_generic_expr (tree); extern void debug_generic_stmt (tree); extern void debug_tree_chain (tree); extern void percent_K_format (text_info *); +extern void dump_function_header (FILE *, tree); /* In toplev.c */ extern bool default_tree_printer (pretty_printer *, text_info *, const char *, diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index 69d77f07892..ab51e261a56 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -579,7 +579,7 @@ struct simple_ipa_opt_pass pass_ipa_tree_profile = { { SIMPLE_IPA_PASS, - "tree_profile_ipa", /* name */ + "profile", /* name */ gate_tree_profile_ipa, /* gate */ tree_profiling, /* execute */ NULL, /* sub */ diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c index 2e6eabc8ccb..e3934e15506 100644 --- a/gcc/tree-ssa-address.c +++ b/gcc/tree-ssa-address.c @@ -1,5 +1,5 @@ /* Memory address lowering and addressing mode selection. - Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 + Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -129,7 +129,7 @@ gen_addr_rtx (enum machine_mode address_mode, *addr = act_elem; } - if (base) + if (base && base != const0_rtx) { if (*addr) *addr = simplify_gen_binary (PLUS, address_mode, base, *addr); @@ -365,7 +365,7 @@ create_mem_ref_raw (tree type, tree alias_ptr_type, struct mem_address *addr, ??? As IVOPTs does not follow restrictions to where the base pointer may point to create a MEM_REF only if we know that base is valid. */ - if (TREE_CODE (base) == ADDR_EXPR + if ((TREE_CODE (base) == ADDR_EXPR || TREE_CODE (base) == INTEGER_CST) && (!index2 || integer_zerop (index2)) && (!addr->index || integer_zerop (addr->index))) return fold_build2 (MEM_REF, type, base, addr->offset); diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c index ddc1ac4187d..56ba5226af4 100644 --- a/gcc/tree-ssa-forwprop.c +++ b/gcc/tree-ssa-forwprop.c @@ -392,9 +392,9 @@ combine_cond_expr_cond (location_t loc, enum tree_code code, tree type, were no simplifying combines. */ static tree -forward_propagate_into_comparison (location_t loc, - enum tree_code code, tree type, - tree op0, tree op1) +forward_propagate_into_comparison_1 (location_t loc, + enum tree_code code, tree type, + tree op0, tree op1) { tree tmp = NULL_TREE; tree rhs0 = NULL_TREE, rhs1 = NULL_TREE; @@ -439,141 +439,31 @@ forward_propagate_into_comparison (location_t loc, return tmp; } -/* Forward propagate the comparison defined in STMT like - cond_1 = x CMP y to uses of the form - a_1 = (T')cond_1 - a_1 = !cond_1 - a_1 = cond_1 != 0 - Returns 1 if a transformation was done and 2 if the CFG should - be cleaned up. Else returns 0. */ +/* Propagate from the ssa name definition statements of the assignment + from a comparison at *GSI into the conditional if that simplifies it. + Returns true if the stmt was modified, false if not. */ -static int -forward_propagate_comparison (gimple stmt) +static bool +forward_propagate_into_comparison (gimple_stmt_iterator *gsi) { - tree name = gimple_assign_lhs (stmt); - gimple use_stmt; - tree tmp = NULL_TREE; - int did_something = 0; + gimple stmt = gsi_stmt (*gsi); + tree tmp; /* Combine the comparison with defining statements. */ - do + tmp = forward_propagate_into_comparison_1 (gimple_location (stmt), + gimple_assign_rhs_code (stmt), + TREE_TYPE + (gimple_assign_lhs (stmt)), + gimple_assign_rhs1 (stmt), + gimple_assign_rhs2 (stmt)); + if (tmp) { - tmp = forward_propagate_into_comparison (gimple_location (stmt), - gimple_assign_rhs_code (stmt), - TREE_TYPE (name), - gimple_assign_rhs1 (stmt), - gimple_assign_rhs2 (stmt)); - if (tmp) - { - gimple_stmt_iterator gsi = gsi_for_stmt (stmt); - bool inv = is_gimple_min_invariant (tmp); - gimple_assign_set_rhs_from_tree (&gsi, tmp); - gcc_assert (gsi_stmt (gsi) == stmt); - update_stmt (stmt); - did_something = MAX (did_something, inv ? 2 : 1); - if (TREE_CODE_CLASS (gimple_assign_rhs_code (stmt)) != tcc_comparison) - return did_something; - } - } - while (tmp); - - /* Don't propagate ssa names that occur in abnormal phis. */ - if ((TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME - && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_assign_rhs1 (stmt))) - || (TREE_CODE (gimple_assign_rhs2 (stmt)) == SSA_NAME - && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_assign_rhs2 (stmt)))) - return did_something; - - /* Do not un-cse comparisons. But propagate through copies. */ - use_stmt = get_prop_dest_stmt (name, &name); - if (!use_stmt) - return did_something; - - /* Conversion of the condition result to another integral type. */ - if (is_gimple_assign (use_stmt) - && (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (use_stmt)) - || TREE_CODE_CLASS (gimple_assign_rhs_code (use_stmt)) - == tcc_comparison - || gimple_assign_rhs_code (use_stmt) == TRUTH_NOT_EXPR) - && INTEGRAL_TYPE_P (TREE_TYPE (gimple_assign_lhs (use_stmt)))) - { - tree lhs = gimple_assign_lhs (use_stmt); - - /* We can propagate the condition into a conversion. */ - if (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (use_stmt))) - { - /* Avoid using fold here as that may create a COND_EXPR with - non-boolean condition as canonical form. */ - tmp = build2 (gimple_assign_rhs_code (stmt), TREE_TYPE (lhs), - gimple_assign_rhs1 (stmt), gimple_assign_rhs2 (stmt)); - } - /* We can propagate the condition into X op CST where op - is EQ_EXPR or NE_EXPR and CST is either one or zero. */ - else if (TREE_CODE_CLASS (gimple_assign_rhs_code (use_stmt)) - == tcc_comparison - && TREE_CODE (gimple_assign_rhs1 (use_stmt)) == SSA_NAME - && TREE_CODE (gimple_assign_rhs2 (use_stmt)) == INTEGER_CST) - { - enum tree_code code = gimple_assign_rhs_code (use_stmt); - tree cst = gimple_assign_rhs2 (use_stmt); - tree cond; - - cond = build2 (gimple_assign_rhs_code (stmt), - TREE_TYPE (cst), - gimple_assign_rhs1 (stmt), - gimple_assign_rhs2 (stmt)); - - tmp = combine_cond_expr_cond (gimple_location (use_stmt), - code, TREE_TYPE (lhs), - cond, cst, false); - if (tmp == NULL_TREE) - return did_something; - } - /* We can propagate the condition into a statement that - computes the logical negation of the comparison result. */ - else if (gimple_assign_rhs_code (use_stmt) == TRUTH_NOT_EXPR) - { - tree type = TREE_TYPE (gimple_assign_rhs1 (stmt)); - bool nans = HONOR_NANS (TYPE_MODE (type)); - enum tree_code code; - code = invert_tree_comparison (gimple_assign_rhs_code (stmt), nans); - if (code == ERROR_MARK) - return did_something; - - tmp = build2 (code, TREE_TYPE (lhs), gimple_assign_rhs1 (stmt), - gimple_assign_rhs2 (stmt)); - } - else - return did_something; - - { - gimple_stmt_iterator gsi = gsi_for_stmt (use_stmt); - bool inv = is_gimple_min_invariant (tmp); - gimple_assign_set_rhs_from_tree (&gsi, unshare_expr (tmp)); - did_something = MAX (did_something, inv ? 2 : 1); - use_stmt = gsi_stmt (gsi); - update_stmt (use_stmt); - } - - if (dump_file && (dump_flags & TDF_DETAILS)) - { - tree old_rhs = rhs_to_tree (TREE_TYPE (gimple_assign_lhs (stmt)), - stmt); - fprintf (dump_file, " Replaced '"); - print_generic_expr (dump_file, old_rhs, dump_flags); - fprintf (dump_file, "' with '"); - print_generic_expr (dump_file, tmp, dump_flags); - fprintf (dump_file, "'\n"); - } - - /* Remove defining statements. */ - if (remove_prop_source_from_use (name)) - did_something = 2; - else - did_something = MAX (did_something, 1); + gimple_assign_set_rhs_from_tree (gsi, tmp); + update_stmt (stmt); + return true; } - return did_something; + return false; } /* Propagate from the ssa name definition statements of COND_EXPR @@ -588,48 +478,41 @@ forward_propagate_into_gimple_cond (gimple stmt) { int did_something = 0; location_t loc = gimple_location (stmt); + tree tmp; + enum tree_code code = gimple_cond_code (stmt); + + /* We can do tree combining on SSA_NAME and comparison expressions. */ + if (TREE_CODE_CLASS (gimple_cond_code (stmt)) != tcc_comparison) + return 0; + + tmp = forward_propagate_into_comparison_1 (loc, code, + boolean_type_node, + gimple_cond_lhs (stmt), + gimple_cond_rhs (stmt)); + if (tmp) + { + if (dump_file && tmp) + { + tree cond = build2 (gimple_cond_code (stmt), + boolean_type_node, + gimple_cond_lhs (stmt), + gimple_cond_rhs (stmt)); + fprintf (dump_file, " Replaced '"); + print_generic_expr (dump_file, cond, 0); + fprintf (dump_file, "' with '"); + print_generic_expr (dump_file, tmp, 0); + fprintf (dump_file, "'\n"); + } - do { - tree tmp = NULL_TREE; - enum tree_code code = gimple_cond_code (stmt); - - /* We can do tree combining on SSA_NAME and comparison expressions. */ - if (TREE_CODE_CLASS (gimple_cond_code (stmt)) == tcc_comparison) - tmp = forward_propagate_into_comparison (loc, code, - boolean_type_node, - gimple_cond_lhs (stmt), - gimple_cond_rhs (stmt)); - - if (tmp) - { - if (dump_file && tmp) - { - tree cond = build2 (gimple_cond_code (stmt), - boolean_type_node, - gimple_cond_lhs (stmt), - gimple_cond_rhs (stmt)); - fprintf (dump_file, " Replaced '"); - print_generic_expr (dump_file, cond, 0); - fprintf (dump_file, "' with '"); - print_generic_expr (dump_file, tmp, 0); - fprintf (dump_file, "'\n"); - } - - gimple_cond_set_condition_from_tree (stmt, unshare_expr (tmp)); - update_stmt (stmt); - - /* Remove defining statements. */ - if (is_gimple_min_invariant (tmp)) - did_something = 2; - else if (did_something == 0) - did_something = 1; - - /* Continue combining. */ - continue; - } + gimple_cond_set_condition_from_tree (stmt, unshare_expr (tmp)); + update_stmt (stmt); - break; - } while (1); + /* Remove defining statements. */ + if (is_gimple_min_invariant (tmp)) + did_something = 2; + else if (did_something == 0) + did_something = 1; + } return did_something; } @@ -648,57 +531,49 @@ forward_propagate_into_cond (gimple_stmt_iterator *gsi_p) gimple stmt = gsi_stmt (*gsi_p); location_t loc = gimple_location (stmt); int did_something = 0; + tree tmp = NULL_TREE; + tree cond = gimple_assign_rhs1 (stmt); - do { - tree tmp = NULL_TREE; - tree cond = gimple_assign_rhs1 (stmt); - - /* We can do tree combining on SSA_NAME and comparison expressions. */ - if (COMPARISON_CLASS_P (cond)) - tmp = forward_propagate_into_comparison (loc, TREE_CODE (cond), + /* We can do tree combining on SSA_NAME and comparison expressions. */ + if (COMPARISON_CLASS_P (cond)) + tmp = forward_propagate_into_comparison_1 (loc, TREE_CODE (cond), boolean_type_node, TREE_OPERAND (cond, 0), TREE_OPERAND (cond, 1)); - else if (TREE_CODE (cond) == SSA_NAME) - { - tree name = cond, rhs0; - gimple def_stmt = get_prop_source_stmt (name, true, NULL); - if (!def_stmt || !can_propagate_from (def_stmt)) - return did_something; - - rhs0 = gimple_assign_rhs1 (def_stmt); - tmp = combine_cond_expr_cond (loc, NE_EXPR, boolean_type_node, rhs0, - build_int_cst (TREE_TYPE (rhs0), 0), - false); - } - - if (tmp) - { - if (dump_file && tmp) - { - fprintf (dump_file, " Replaced '"); - print_generic_expr (dump_file, cond, 0); - fprintf (dump_file, "' with '"); - print_generic_expr (dump_file, tmp, 0); - fprintf (dump_file, "'\n"); - } + else if (TREE_CODE (cond) == SSA_NAME) + { + tree name = cond, rhs0; + gimple def_stmt = get_prop_source_stmt (name, true, NULL); + if (!def_stmt || !can_propagate_from (def_stmt)) + return did_something; - gimple_assign_set_rhs_from_tree (gsi_p, unshare_expr (tmp)); - stmt = gsi_stmt (*gsi_p); - update_stmt (stmt); + rhs0 = gimple_assign_rhs1 (def_stmt); + tmp = combine_cond_expr_cond (loc, NE_EXPR, boolean_type_node, rhs0, + build_int_cst (TREE_TYPE (rhs0), 0), + false); + } - /* Remove defining statements. */ - if (is_gimple_min_invariant (tmp)) - did_something = 2; - else if (did_something == 0) - did_something = 1; + if (tmp) + { + if (dump_file && tmp) + { + fprintf (dump_file, " Replaced '"); + print_generic_expr (dump_file, cond, 0); + fprintf (dump_file, "' with '"); + print_generic_expr (dump_file, tmp, 0); + fprintf (dump_file, "'\n"); + } - /* Continue combining. */ - continue; - } + gimple_assign_set_rhs_from_tree (gsi_p, unshare_expr (tmp)); + stmt = gsi_stmt (*gsi_p); + update_stmt (stmt); - break; - } while (1); + /* Remove defining statements. */ + if (is_gimple_min_invariant (tmp)) + did_something = 2; + else if (did_something == 0) + did_something = 1; + } return did_something; } @@ -1224,6 +1099,116 @@ forward_propagate_addr_expr (tree name, tree rhs) return all && has_zero_uses (name); } + +/* Forward propagate the comparison defined in STMT like + cond_1 = x CMP y to uses of the form + a_1 = (T')cond_1 + a_1 = !cond_1 + a_1 = cond_1 != 0 + Returns true if stmt is now unused. */ + +static bool +forward_propagate_comparison (gimple stmt) +{ + tree name = gimple_assign_lhs (stmt); + gimple use_stmt; + tree tmp = NULL_TREE; + + /* Don't propagate ssa names that occur in abnormal phis. */ + if ((TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_assign_rhs1 (stmt))) + || (TREE_CODE (gimple_assign_rhs2 (stmt)) == SSA_NAME + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_assign_rhs2 (stmt)))) + return false; + + /* Do not un-cse comparisons. But propagate through copies. */ + use_stmt = get_prop_dest_stmt (name, &name); + if (!use_stmt) + return false; + + /* Conversion of the condition result to another integral type. */ + if (is_gimple_assign (use_stmt) + && (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (use_stmt)) + || TREE_CODE_CLASS (gimple_assign_rhs_code (use_stmt)) + == tcc_comparison + || gimple_assign_rhs_code (use_stmt) == TRUTH_NOT_EXPR) + && INTEGRAL_TYPE_P (TREE_TYPE (gimple_assign_lhs (use_stmt)))) + { + tree lhs = gimple_assign_lhs (use_stmt); + + /* We can propagate the condition into a conversion. */ + if (CONVERT_EXPR_CODE_P (gimple_assign_rhs_code (use_stmt))) + { + /* Avoid using fold here as that may create a COND_EXPR with + non-boolean condition as canonical form. */ + tmp = build2 (gimple_assign_rhs_code (stmt), TREE_TYPE (lhs), + gimple_assign_rhs1 (stmt), gimple_assign_rhs2 (stmt)); + } + /* We can propagate the condition into X op CST where op + is EQ_EXPR or NE_EXPR and CST is either one or zero. */ + else if (TREE_CODE_CLASS (gimple_assign_rhs_code (use_stmt)) + == tcc_comparison + && TREE_CODE (gimple_assign_rhs1 (use_stmt)) == SSA_NAME + && TREE_CODE (gimple_assign_rhs2 (use_stmt)) == INTEGER_CST) + { + enum tree_code code = gimple_assign_rhs_code (use_stmt); + tree cst = gimple_assign_rhs2 (use_stmt); + tree cond; + + cond = build2 (gimple_assign_rhs_code (stmt), + TREE_TYPE (cst), + gimple_assign_rhs1 (stmt), + gimple_assign_rhs2 (stmt)); + + tmp = combine_cond_expr_cond (gimple_location (use_stmt), + code, TREE_TYPE (lhs), + cond, cst, false); + if (tmp == NULL_TREE) + return false; + } + /* We can propagate the condition into a statement that + computes the logical negation of the comparison result. */ + else if (gimple_assign_rhs_code (use_stmt) == TRUTH_NOT_EXPR) + { + tree type = TREE_TYPE (gimple_assign_rhs1 (stmt)); + bool nans = HONOR_NANS (TYPE_MODE (type)); + enum tree_code code; + code = invert_tree_comparison (gimple_assign_rhs_code (stmt), nans); + if (code == ERROR_MARK) + return false; + + tmp = build2 (code, TREE_TYPE (lhs), gimple_assign_rhs1 (stmt), + gimple_assign_rhs2 (stmt)); + } + else + return false; + + { + gimple_stmt_iterator gsi = gsi_for_stmt (use_stmt); + gimple_assign_set_rhs_from_tree (&gsi, unshare_expr (tmp)); + use_stmt = gsi_stmt (gsi); + update_stmt (use_stmt); + } + + if (dump_file && (dump_flags & TDF_DETAILS)) + { + tree old_rhs = rhs_to_tree (TREE_TYPE (gimple_assign_lhs (stmt)), + stmt); + fprintf (dump_file, " Replaced '"); + print_generic_expr (dump_file, old_rhs, dump_flags); + fprintf (dump_file, "' with '"); + print_generic_expr (dump_file, tmp, dump_flags); + fprintf (dump_file, "'\n"); + } + + /* Remove defining statements. */ + return remove_prop_source_from_use (name); + } + + return false; +} + + /* If we have lhs = ~x (STMT), look and see if earlier we had x = ~y. If so, we can change STMT into lhs = y which can later be copy propagated. Similarly for negation. @@ -1236,9 +1221,11 @@ forward_propagate_addr_expr (tree name, tree rhs) there's less work to do for each NOT/NEG expression we find. Backwards propagation needs to look at the statement in a single backlink. Forward propagation needs to look at potentially more - than one forward link. */ + than one forward link. -static void + Returns true when the statement was changed. */ + +static bool simplify_not_neg_expr (gimple_stmt_iterator *gsi_p) { gimple stmt = gsi_stmt (*gsi_p); @@ -1258,14 +1245,17 @@ simplify_not_neg_expr (gimple_stmt_iterator *gsi_p) gimple_assign_set_rhs_from_tree (gsi_p, rhs_def_operand); stmt = gsi_stmt (*gsi_p); update_stmt (stmt); + return true; } } + + return false; } /* STMT is a SWITCH_EXPR for which we attempt to find equivalent forms of the condition which we may be able to optimize better. */ -static void +static bool simplify_gimple_switch (gimple stmt) { tree cond = gimple_switch_index (stmt); @@ -1311,10 +1301,13 @@ simplify_gimple_switch (gimple stmt) { gimple_switch_set_index (stmt, def); update_stmt (stmt); + return true; } } } } + + return false; } /* For pointers p2 and p1 return p2 - p1 if the @@ -2206,10 +2199,11 @@ combine_conversions (gimple_stmt_iterator *gsi) return false; } -/* Main entry point for the forward propagation optimizer. */ +/* Main entry point for the forward propagation and statement combine + optimizer. */ static unsigned int -tree_ssa_forward_propagate_single_use_vars (void) +ssa_forward_propagate_and_combine (void) { basic_block bb; unsigned int todoflags = 0; @@ -2220,166 +2214,187 @@ tree_ssa_forward_propagate_single_use_vars (void) { gimple_stmt_iterator gsi; - /* Note we update GSI within the loop as necessary. */ + /* Apply forward propagation to all stmts in the basic-block. + Note we update GSI within the loop as necessary. */ for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); ) { gimple stmt = gsi_stmt (gsi); + tree lhs, rhs; + enum tree_code code; - /* If this statement sets an SSA_NAME to an address, - try to propagate the address into the uses of the SSA_NAME. */ - if (is_gimple_assign (stmt)) + if (!is_gimple_assign (stmt)) { - tree lhs = gimple_assign_lhs (stmt); - tree rhs = gimple_assign_rhs1 (stmt); - enum tree_code code = gimple_assign_rhs_code (stmt); + gsi_next (&gsi); + continue; + } - if (TREE_CODE (lhs) != SSA_NAME - || has_zero_uses (lhs)) - { - gsi_next (&gsi); - continue; - } + lhs = gimple_assign_lhs (stmt); + rhs = gimple_assign_rhs1 (stmt); + code = gimple_assign_rhs_code (stmt); + if (TREE_CODE (lhs) != SSA_NAME + || has_zero_uses (lhs)) + { + gsi_next (&gsi); + continue; + } - if (code == ADDR_EXPR - /* Handle pointer conversions on invariant addresses - as well, as this is valid gimple. */ - || (CONVERT_EXPR_CODE_P (code) - && TREE_CODE (rhs) == ADDR_EXPR - && POINTER_TYPE_P (TREE_TYPE (lhs)))) - { - tree base = get_base_address (TREE_OPERAND (rhs, 0)); - if ((!base - || !DECL_P (base) - || decl_address_invariant_p (base)) - && !stmt_references_abnormal_ssa_name (stmt) - && forward_propagate_addr_expr (lhs, rhs)) - { - release_defs (stmt); - todoflags |= TODO_remove_unused_locals; - gsi_remove (&gsi, true); - } - else - gsi_next (&gsi); - } - else if (code == POINTER_PLUS_EXPR - && can_propagate_from (stmt)) - { - if (TREE_CODE (gimple_assign_rhs2 (stmt)) == INTEGER_CST - /* ??? Better adjust the interface to that function - instead of building new trees here. */ - && forward_propagate_addr_expr - (lhs, - build1 (ADDR_EXPR, - TREE_TYPE (rhs), - fold_build2 (MEM_REF, - TREE_TYPE (TREE_TYPE (rhs)), - rhs, - fold_convert - (ptr_type_node, - gimple_assign_rhs2 (stmt)))))) - { - release_defs (stmt); - todoflags |= TODO_remove_unused_locals; - gsi_remove (&gsi, true); - } - else if (is_gimple_min_invariant (rhs)) - { - /* Make sure to fold &a[0] + off_1 here. */ - fold_stmt_inplace (stmt); - update_stmt (stmt); - if (gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR) - gsi_next (&gsi); - } - else - gsi_next (&gsi); - } - else if ((code == BIT_NOT_EXPR - || code == NEGATE_EXPR) - && TREE_CODE (rhs) == SSA_NAME) - { - simplify_not_neg_expr (&gsi); - gsi_next (&gsi); - } - else if (code == COND_EXPR) - { - /* In this case the entire COND_EXPR is in rhs1. */ - int did_something; - fold_defer_overflow_warnings (); - did_something = forward_propagate_into_cond (&gsi); - stmt = gsi_stmt (gsi); - if (did_something == 2) - cfg_changed = true; - fold_undefer_overflow_warnings (!TREE_NO_WARNING (rhs) - && did_something, stmt, WARN_STRICT_OVERFLOW_CONDITIONAL); - gsi_next (&gsi); - } - else if (TREE_CODE_CLASS (code) == tcc_comparison) - { - bool no_warning = gimple_no_warning_p (stmt); - int did_something; - fold_defer_overflow_warnings (); - did_something = forward_propagate_comparison (stmt); - if (did_something == 2) - cfg_changed = true; - fold_undefer_overflow_warnings - (!no_warning && did_something, - stmt, WARN_STRICT_OVERFLOW_CONDITIONAL); - gsi_next (&gsi); - } - else if (code == BIT_AND_EXPR - || code == BIT_IOR_EXPR - || code == BIT_XOR_EXPR) + /* If this statement sets an SSA_NAME to an address, + try to propagate the address into the uses of the SSA_NAME. */ + if (code == ADDR_EXPR + /* Handle pointer conversions on invariant addresses + as well, as this is valid gimple. */ + || (CONVERT_EXPR_CODE_P (code) + && TREE_CODE (rhs) == ADDR_EXPR + && POINTER_TYPE_P (TREE_TYPE (lhs)))) + { + tree base = get_base_address (TREE_OPERAND (rhs, 0)); + if ((!base + || !DECL_P (base) + || decl_address_invariant_p (base)) + && !stmt_references_abnormal_ssa_name (stmt) + && forward_propagate_addr_expr (lhs, rhs)) { - if (!simplify_bitwise_binary (&gsi)) - gsi_next (&gsi); + release_defs (stmt); + todoflags |= TODO_remove_unused_locals; + gsi_remove (&gsi, true); } - else if (code == PLUS_EXPR - || code == MINUS_EXPR) + else + gsi_next (&gsi); + } + else if (code == POINTER_PLUS_EXPR + && can_propagate_from (stmt)) + { + if (TREE_CODE (gimple_assign_rhs2 (stmt)) == INTEGER_CST + /* ??? Better adjust the interface to that function + instead of building new trees here. */ + && forward_propagate_addr_expr + (lhs, + build1 (ADDR_EXPR, + TREE_TYPE (rhs), + fold_build2 (MEM_REF, + TREE_TYPE (TREE_TYPE (rhs)), + rhs, + fold_convert + (ptr_type_node, + gimple_assign_rhs2 (stmt)))))) { - cfg_changed |= associate_plusminus (stmt); - gsi_next (&gsi); + release_defs (stmt); + todoflags |= TODO_remove_unused_locals; + gsi_remove (&gsi, true); } - else if (CONVERT_EXPR_CODE_P (code) - || code == FLOAT_EXPR - || code == FIX_TRUNC_EXPR) + else if (is_gimple_min_invariant (rhs)) { - if (!combine_conversions (&gsi)) + /* Make sure to fold &a[0] + off_1 here. */ + fold_stmt_inplace (stmt); + update_stmt (stmt); + if (gimple_assign_rhs_code (stmt) == POINTER_PLUS_EXPR) gsi_next (&gsi); } else gsi_next (&gsi); } - else if (gimple_code (stmt) == GIMPLE_SWITCH) + else if (TREE_CODE_CLASS (code) == tcc_comparison) { - simplify_gimple_switch (stmt); + forward_propagate_comparison (stmt); gsi_next (&gsi); } - else if (gimple_code (stmt) == GIMPLE_COND) - { - int did_something; - fold_defer_overflow_warnings (); - did_something = forward_propagate_into_gimple_cond (stmt); - if (did_something == 2) - cfg_changed = true; - fold_undefer_overflow_warnings (did_something, stmt, - WARN_STRICT_OVERFLOW_CONDITIONAL); - gsi_next (&gsi); - } - else if (is_gimple_call (stmt)) - { - tree callee = gimple_call_fndecl (stmt); - if (callee == NULL_TREE - || DECL_BUILT_IN_CLASS (callee) != BUILT_IN_NORMAL - || !simplify_builtin_call (&gsi, callee)) - gsi_next (&gsi); - } else gsi_next (&gsi); } + + /* Combine stmts with the stmts defining their operands. + Note we update GSI within the loop as necessary. */ + for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi);) + { + gimple stmt = gsi_stmt (gsi); + bool changed = false; + + switch (gimple_code (stmt)) + { + case GIMPLE_ASSIGN: + { + tree rhs1 = gimple_assign_rhs1 (stmt); + enum tree_code code = gimple_assign_rhs_code (stmt); + + if ((code == BIT_NOT_EXPR + || code == NEGATE_EXPR) + && TREE_CODE (rhs1) == SSA_NAME) + changed = simplify_not_neg_expr (&gsi); + else if (code == COND_EXPR) + { + /* In this case the entire COND_EXPR is in rhs1. */ + int did_something; + fold_defer_overflow_warnings (); + did_something = forward_propagate_into_cond (&gsi); + stmt = gsi_stmt (gsi); + if (did_something == 2) + cfg_changed = true; + fold_undefer_overflow_warnings + (!TREE_NO_WARNING (rhs1) && did_something, stmt, + WARN_STRICT_OVERFLOW_CONDITIONAL); + changed = did_something != 0; + } + else if (TREE_CODE_CLASS (code) == tcc_comparison) + { + bool no_warning = gimple_no_warning_p (stmt); + fold_defer_overflow_warnings (); + changed = forward_propagate_into_comparison (&gsi); + fold_undefer_overflow_warnings + (!no_warning && changed, + stmt, WARN_STRICT_OVERFLOW_CONDITIONAL); + } + else if (code == BIT_AND_EXPR + || code == BIT_IOR_EXPR + || code == BIT_XOR_EXPR) + changed = simplify_bitwise_binary (&gsi); + else if (code == PLUS_EXPR + || code == MINUS_EXPR) + changed = associate_plusminus (stmt); + else if (CONVERT_EXPR_CODE_P (code) + || code == FLOAT_EXPR + || code == FIX_TRUNC_EXPR) + changed = combine_conversions (&gsi); + break; + } + + case GIMPLE_SWITCH: + changed = simplify_gimple_switch (stmt); + break; + + case GIMPLE_COND: + { + int did_something; + fold_defer_overflow_warnings (); + did_something = forward_propagate_into_gimple_cond (stmt); + if (did_something == 2) + cfg_changed = true; + fold_undefer_overflow_warnings + (did_something, stmt, WARN_STRICT_OVERFLOW_CONDITIONAL); + changed = did_something != 0; + break; + } + + case GIMPLE_CALL: + { + tree callee = gimple_call_fndecl (stmt); + if (callee != NULL_TREE + && DECL_BUILT_IN_CLASS (callee) == BUILT_IN_NORMAL) + changed = simplify_builtin_call (&gsi, callee); + break; + } + + default:; + } + + /* If the stmt changed try combining it again. */ + if (!changed) + gsi_prev (&gsi); + } } if (cfg_changed) todoflags |= TODO_cleanup_cfg; + return todoflags; } @@ -2396,7 +2411,7 @@ struct gimple_opt_pass pass_forwprop = GIMPLE_PASS, "forwprop", /* name */ gate_forwprop, /* gate */ - tree_ssa_forward_propagate_single_use_vars, /* execute */ + ssa_forward_propagate_and_combine, /* execute */ NULL, /* sub */ NULL, /* next */ 0, /* static_pass_number */ diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index ee059977559..5023710f1e5 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -2584,6 +2584,16 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo, return false; } + if (TREE_THIS_VOLATILE (DR_REF (dr))) + { + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOCATIONS)) + { + fprintf (vect_dump, "not vectorized: volatile type "); + print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM); + } + return false; + } + base = unshare_expr (DR_BASE_ADDRESS (dr)); offset = unshare_expr (DR_OFFSET (dr)); init = unshare_expr (DR_INIT (dr)); diff --git a/gcc/tree.c b/gcc/tree.c index 293e02c46d9..764a0f422df 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5176,25 +5176,6 @@ free_lang_data (void) /* Create gimple variants for common types. */ ptrdiff_type_node = integer_type_node; fileptr_type_node = ptr_type_node; - if (TREE_CODE (boolean_type_node) != BOOLEAN_TYPE - || (TYPE_MODE (boolean_type_node) - != mode_for_size (BOOL_TYPE_SIZE, MODE_INT, 0)) - || TYPE_PRECISION (boolean_type_node) != 1 - || !TYPE_UNSIGNED (boolean_type_node)) - { - boolean_type_node = make_unsigned_type (BOOL_TYPE_SIZE); - TREE_SET_CODE (boolean_type_node, BOOLEAN_TYPE); - TYPE_MAX_VALUE (boolean_type_node) = build_int_cst (boolean_type_node, 1); - TYPE_PRECISION (boolean_type_node) = 1; - boolean_false_node = TYPE_MIN_VALUE (boolean_type_node); - boolean_true_node = TYPE_MAX_VALUE (boolean_type_node); - } - - /* Unify char_type_node with its properly signed variant. */ - if (TYPE_UNSIGNED (char_type_node)) - unsigned_char_type_node = char_type_node; - else - signed_char_type_node = char_type_node; /* Reset some langhooks. Do not reset types_compatible_p, it may still be used indirectly via the get_alias_set langhook. */ diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c index 25990b4e73b..19da29982b6 100644 --- a/gcc/unwind-dw2.c +++ b/gcc/unwind-dw2.c @@ -333,9 +333,7 @@ _Unwind_GetTextRelBase (struct _Unwind_Context *context) } #endif -#ifdef MD_UNWIND_SUPPORT -#include MD_UNWIND_SUPPORT -#endif +#include "md-unwind-support.h" /* Extract any interesting information from the CIE for the translation unit F belongs to. Return a pointer to the byte after the augmentation, diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 2c16d08e02c..0ddc8d7619e 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -4837,7 +4837,7 @@ get_address_mode (rtx mem) static rtx replace_expr_with_values (rtx loc) { - if (REG_P (loc)) + if (REG_P (loc) || GET_CODE (loc) == ENTRY_VALUE) return NULL; else if (MEM_P (loc)) { @@ -5052,6 +5052,7 @@ add_uses (rtx *ploc, void *data) if (MEM_P (vloc) && !REG_P (XEXP (vloc, 0)) && !MEM_P (XEXP (vloc, 0)) + && GET_CODE (XEXP (vloc, 0)) != ENTRY_VALUE && (GET_CODE (XEXP (vloc, 0)) != PLUS || XEXP (XEXP (vloc, 0), 0) != cfa_base_rtx || !CONST_INT_P (XEXP (XEXP (vloc, 0), 1)))) @@ -5130,6 +5131,7 @@ add_uses (rtx *ploc, void *data) if (MEM_P (oloc) && !REG_P (XEXP (oloc, 0)) && !MEM_P (XEXP (oloc, 0)) + && GET_CODE (XEXP (oloc, 0)) != ENTRY_VALUE && (GET_CODE (XEXP (oloc, 0)) != PLUS || XEXP (XEXP (oloc, 0), 0) != cfa_base_rtx || !CONST_INT_P (XEXP (XEXP (oloc, 0), 1)))) @@ -5215,6 +5217,8 @@ add_uses_1 (rtx *x, void *cui) for_each_rtx (x, add_uses, cui); } +#define EXPR_DEPTH (PARAM_VALUE (PARAM_MAX_VARTRACK_EXPR_DEPTH)) + /* Attempt to reverse the EXPR operation in the debug info. Say for reg1 = reg2 + 6 even when reg2 is no longer live we can express its value as VAL - 6. */ @@ -5381,6 +5385,7 @@ add_stores (rtx loc, const_rtx expr, void *cuip) if (MEM_P (loc) && type == MO_VAL_SET && !REG_P (XEXP (loc, 0)) && !MEM_P (XEXP (loc, 0)) + && GET_CODE (XEXP (loc, 0)) != ENTRY_VALUE && (GET_CODE (XEXP (loc, 0)) != PLUS || XEXP (XEXP (loc, 0), 0) != cfa_base_rtx || !CONST_INT_P (XEXP (XEXP (loc, 0), 1)))) @@ -7416,7 +7421,7 @@ vt_expand_loc (rtx loc, htab_t vars, bool ignore_cur_loc) data.dummy = false; data.cur_loc_changed = false; data.ignore_cur_loc = ignore_cur_loc; - loc = cselib_expand_value_rtx_cb (loc, scratch_regs, 8, + loc = cselib_expand_value_rtx_cb (loc, scratch_regs, EXPR_DEPTH, vt_expand_loc_callback, &data); if (loc && MEM_P (loc)) @@ -7438,7 +7443,7 @@ vt_expand_loc_dummy (rtx loc, htab_t vars, bool *pcur_loc_changed) data.dummy = true; data.cur_loc_changed = false; data.ignore_cur_loc = false; - ret = cselib_dummy_expand_value_rtx_cb (loc, scratch_regs, 8, + ret = cselib_dummy_expand_value_rtx_cb (loc, scratch_regs, EXPR_DEPTH, vt_expand_loc_callback, &data); *pcur_loc_changed = data.cur_loc_changed; return ret; @@ -8376,6 +8381,39 @@ vt_get_decl_and_offset (rtx rtl, tree *declp, HOST_WIDE_INT *offsetp) return false; } +/* Helper function for vt_add_function_parameter. RTL is + the expression and VAL corresponding cselib_val pointer + for which ENTRY_VALUE should be created. */ + +static void +create_entry_value (rtx rtl, cselib_val *val) +{ + cselib_val *val2; + struct elt_loc_list *el; + el = (struct elt_loc_list *) ggc_alloc_cleared_atomic (sizeof (*el)); + el->next = val->locs; + el->loc = gen_rtx_ENTRY_VALUE (GET_MODE (rtl)); + ENTRY_VALUE_EXP (el->loc) = rtl; + el->setting_insn = get_insns (); + val->locs = el; + val2 = cselib_lookup_from_insn (el->loc, GET_MODE (rtl), true, + VOIDmode, get_insns ()); + if (val2 + && val2 != val + && val2->locs + && rtx_equal_p (val2->locs->loc, el->loc)) + { + struct elt_loc_list *el2; + + preserve_value (val2); + el2 = (struct elt_loc_list *) ggc_alloc_cleared_atomic (sizeof (*el2)); + el2->next = val2->locs; + el2->loc = val->val_rtx; + el2->setting_insn = get_insns (); + val2->locs = el2; + } +} + /* Insert function parameter PARM in IN and OUT sets of ENTRY_BLOCK. */ static void @@ -8499,32 +8537,8 @@ vt_add_function_parameter (tree parm) VAR_INIT_STATUS_INITIALIZED, NULL, INSERT); if (dv_is_value_p (dv)) { - cselib_val *val = CSELIB_VAL_PTR (dv_as_value (dv)), *val2; - struct elt_loc_list *el; - el = (struct elt_loc_list *) - ggc_alloc_cleared_atomic (sizeof (*el)); - el->next = val->locs; - el->loc = gen_rtx_ENTRY_VALUE (GET_MODE (incoming)); - ENTRY_VALUE_EXP (el->loc) = incoming; - el->setting_insn = get_insns (); - val->locs = el; - val2 = cselib_lookup_from_insn (el->loc, GET_MODE (incoming), - true, VOIDmode, get_insns ()); - if (val2 - && val2 != val - && val2->locs - && rtx_equal_p (val2->locs->loc, el->loc)) - { - struct elt_loc_list *el2; - - preserve_value (val2); - el2 = (struct elt_loc_list *) - ggc_alloc_cleared_atomic (sizeof (*el2)); - el2->next = val2->locs; - el2->loc = dv_as_value (dv); - el2->setting_insn = get_insns (); - val2->locs = el2; - } + cselib_val *val = CSELIB_VAL_PTR (dv_as_value (dv)); + create_entry_value (incoming, val); if (TREE_CODE (TREE_TYPE (parm)) == REFERENCE_TYPE && INTEGRAL_TYPE_P (TREE_TYPE (TREE_TYPE (parm)))) { @@ -8536,31 +8550,7 @@ vt_add_function_parameter (tree parm) if (val) { preserve_value (val); - el = (struct elt_loc_list *) - ggc_alloc_cleared_atomic (sizeof (*el)); - el->next = val->locs; - el->loc = gen_rtx_ENTRY_VALUE (indmode); - ENTRY_VALUE_EXP (el->loc) = mem; - el->setting_insn = get_insns (); - val->locs = el; - val2 = cselib_lookup_from_insn (el->loc, GET_MODE (mem), - true, VOIDmode, - get_insns ()); - if (val2 - && val2 != val - && val2->locs - && rtx_equal_p (val2->locs->loc, el->loc)) - { - struct elt_loc_list *el2; - - preserve_value (val2); - el2 = (struct elt_loc_list *) - ggc_alloc_cleared_atomic (sizeof (*el2)); - el2->next = val2->locs; - el2->loc = val->val_rtx; - el2->setting_insn = get_insns (); - val2->locs = el2; - } + create_entry_value (mem, val); } } } @@ -9121,7 +9111,7 @@ variable_tracking_main (void) static bool gate_handle_var_tracking (void) { - return (flag_var_tracking); + return (flag_var_tracking && !targetm.delay_vartrack); } diff --git a/gcc/varpool.c b/gcc/varpool.c index 5d0eb6893ff..43ee2290389 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -676,7 +676,7 @@ varpool_extra_name_alias (tree alias, tree decl) #ifndef ASM_OUTPUT_DEF /* If aliases aren't supported by the assembler, fail. */ - return false; + return NULL; #endif gcc_assert (TREE_CODE (decl) == VAR_DECL); diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 2630138b6e4..485d66e8285 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2011-05-29 John Tytgat <John.Tytgat@aaug.net> + + * files.c (read_file_guts): Add test on non-zero value of S_ISREG. + 2011-05-22 Uros Bizjak <ubizjak@gmail.com> PR target/49104 diff --git a/libcpp/files.c b/libcpp/files.c index cd0bc4847b2..d2c6b8bdecf 100644 --- a/libcpp/files.c +++ b/libcpp/files.c @@ -1,6 +1,6 @@ /* Part of CPP library. File handling. Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998, - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Written by Per Bothner, 1994. Based on CCCP program by Paul Rubin, June 1986 @@ -595,7 +595,7 @@ read_file_guts (cpp_reader *pfile, _cpp_file *file) return false; } - regular = S_ISREG (file->st.st_mode); + regular = S_ISREG (file->st.st_mode) != 0; if (regular) { /* off_t might have a wider range than ssize_t - in other words, diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index d8c0729814d..b1dace7cd98 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,150 @@ +2011-06-04 Kaz Kojima <kkojima@gcc.gnu.org> + + * config.host (sh*-*-linux*): Fix typo. + +2011-06-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config/alpha/linux-unwind.h: Move from ../gcc/config/alpha. + * config/alpha/osf5-unwind.h: Move from ../gcc/config/alpha. + * config/alpha/vms-unwind.h: Move from ../gcc/config/alpha. + * config/bfin/linux-unwind.h: Move from ../gcc/config/bfin. + * config/i386/linux-unwind.h: Move from ../gcc/config/i386. + * config/i386/sol2-unwind.h: Move from ../gcc/config/i386. + * config/i386/w32-unwind.h: Move from ../gcc/config/i386. + Wrap in !__MINGW64__. + * config/ia64/linux-unwind.h: Move from ../gcc/config/ia64. + * config/ia64/vms-unwind.h: Move from ../gcc/config/ia64. + * config/m68k/linux-unwind.h: Move from ../gcc/config/m68k. + * config/mips/linux-unwind.h: Move from ../gcc/config/mips. + * config/pa/hpux-unwind.h: Move from ../gcc/config/pa. + * config/pa/linux-unwind.h: Move from ../gcc/config/pa. + * config/rs6000/darwin-unwind.h: Move from ../gcc/config/rs6000. + Wrap in !__LP64__. + * config/rs6000/linux-unwind.h: Move from ../gcc/config/rs6000. + * config/s390/linux-unwind.h: Move from ../gcc/config/s390. + * config/s390/tpf-unwind.h: Move from ../gcc/config/s390. + * config/sh/linux-unwind.h: Move from ../gcc/config/sh. + * config/sparc/linux-unwind.h: Move from ../gcc/config/sparc. + * config/sparc/sol2-unwind.h: Move from ../gcc/config/sparc. + * config/xtensa/linux-unwind.h: Move from ../gcc/config/xtensa. + * config/no-unwind.h: New file. + * config.host (md_unwind_header): Document. + Define. + (alpha*-*-linux*, alpha*-dec-osf5.1*, alpha64-dec-*vms*, + alpha*-dec-*vms*, bfin*-uclinux*, bfin*-linux-uclibc*, + hppa*-*-linux*, hppa[12]*-*-hpux10*, hppa*64*-*-hpux11*, + hppa[12]*-*-hpux11*): Set md_unwind_header. + (i[34567]86-*-linux*): Handle i[34567]86-*-kopensolaris*-gnu. + Set md_unwind_header. + (x86_64-*-linux*, i[34567]86-*-solaris2*): Set md_unwind_header. + (i[34567]86-*-cygwin*): Split from i[34567]86-*-mingw*. + (i[34567]86-*-mingw*, ia64*-*-linux*, ia64-hp-*vms*, + m68k-*-uclinux*, m68k-*-linux*, mips64*-*-linux*, mips*-*-linux*, + powerpc-*-darwin*, powerpc-*-linux*, s390-*-linux*, + s390x-*-linux*, s390x-ibm-tpf*, sh*-*-linux*, sparc-*-linux*, + sparc*-*-solaris2*, sparc64-*-linux*, xtensa*-*-linux*): Set + md_unwind_header. + * configure.ac: Link md-unwind-support.h to $md_unwind_header. + * configure: Regenerate. + +2011-06-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config.host (mips-sgi-irix[56]*): Restrict to mips-sgi-irix6.5*. + Set tmake_file, extra_parts. + * config/mips/irix-crti.S: Move from ../gcc/config/mips/irix-crti.asm. + Remove O32 support. + * config/mips/irix-crtn.S: Move from ../gcc/config/mips/irix-crtn.asm. + Remove O32 support. + * config/mips/t-irix6: New file. + * config/mips/t-slibgcc-irix: New file. + +2011-06-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config/s390/t-tpf (LIB2ADDEHDEP): Remove. + * config/t-sol2 (LIB2ADDEH): Use gcc_srcdir, add emutls.c. + +2011-06-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * configure.ac (target_thread_file): Determine thread model. + * configure: Regenerate. + * config.host (alpha*-dec-osf5.1*): Set tmake_file, extra_parts. + * config/alpha/t-alpha: New file. + * config/alpha/t-crtfm: Use $<. + * config/alpha/t-ieee: New file. + * config/alpha/t-osf-pthread: New file. + * config/alpha/t-slibgcc-osf: New file. + * config/alpha/libgcc-osf5.ver: New file. + +2011-06-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config.host (i[34567]86-*-solaris2*): Add i386/t-crtfm to + tmake_file. + Add crtfastmath.o to extra_parts. + +2011-06-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config/gmon-sol2.c: Reindent. + Cleanup comments. + Remove, correct casts. + Use STDERR_FILENO, NULL. + (BASEADDRESS): Remove. + (minbrk): Remove. + (errno, sbrk): Remove declarations. + (monstartup) [hp300]: Remove. + (mcount): Remove. + +2011-06-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * Makefile.in (cpu_type): Define. + * config.host (i[34567]86-*-rtems*): Handle it. + (i[34567]86-*-solaris2*): Move body ... + (*-*-solaris2*): ... here. + New case, generalize. + (sparc-*-elf*): Handle it. + (sparc-*-linux*, sparc64-*-linux*): Replace sparc/t-crtfm by t-crtfm. + (sparc-*-rtems*, sparc64-*-rtems*); Handle it. + (sparc64-*-solaris2*, sparcv9-*-solaris2*, sparc-*-solaris2*): + Fold into ... + (sparc*-*-solaris2*): ... this. + New case. + (sparc64-*-elf*): Handle it. + * config/gmon-sol2.c: Move from ../gcc/config/sparc. + Merge ../gcc/config/i386/gmon-sol2.c. + * config/i386/sol2-c1.S: Move from ../gcc/config/i386/sol2-c1.asm. + Use C comments. + Merge ../gcc/config/i386/sol2-gc1.asm. + * config/i386/sol2-ci.S: Move from ../gcc/config/i386/sol2-ci.asm. + Use C comments. + * config/i386/sol2-cn.S: Move from ../gcc/config/i386/sol2-cn.asm. + Use C comments. + * config/i386/t-crtfm (crtfastmath.o): Use $<. + * config/i386/t-crtstuff: New file. + * config/i386/t-softfp: New file. + * config/i386/t-sol2 ($(T)gmon.o, $(T)gcrt1.o, $(T)crt1.o), + $(T)crti.o, $(T)crtn.o): Remove. + (gcrt1.o): New rule. + (TARGET_LIBGCC2_CFLAGS): Remove. + * config/sparc/sol2-c1.S: Move from ../gcc/config/sparc/sol2-c1.asm. + * config/sparc/sol2-ci.S: Move from ../gcc/config/sparc/sol2-ci.asm. + * config/sparc/sol2-cn.S: Move from ../gcc/config/sparc/sol2-cn.asm. + * config/sparc/t-sol2: New file. + * config/sparc/t-crtfm: Move to ... + * config/t-crtfm: ... this. + Use $(cpu_type), $<. + * config/t-crtin: New file. + * config/sparc/t-softfp: New file. + * config/sparc/t-softmul: New file. + * config/t-rtems: New file. + * config/t-slibgcc: New file. + * config/t-slibgcc-elf-ver: New file. + * config/t-slibgcc-gld: New file. + * config/t-slibgcc-sld: New file. + * config/t-sol2: New file. + * configure.ac: Include ../config/lib-ld.m4. + Call AC_LIB_PROG_LD_GNU. + Substitute cpu_type. + * configure: Regenerate. + 2011-05-27 Bernd Schmidt <bernds@codesourcery.com> PR bootstrap/49173 diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index 557fab36e48..4a075ff8f29 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -1,6 +1,6 @@ # Makefile.in -# Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation +# Copyright (C) 2005, 2006, 2009, 2010, 2011 Free Software Foundation # # This file is part of GCC. # @@ -35,6 +35,7 @@ shlib_slibdir = @slibdir@ SHELL = @SHELL@ +cpu_type = @cpu_type@ enable_shared = @enable_shared@ decimal_float = @decimal_float@ enable_decimal_float = @enable_decimal_float@ diff --git a/libgcc/config.host b/libgcc/config.host index e3c48bb7f46..851ff9b9bdc 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -1,6 +1,6 @@ # libgcc host-specific configuration file. # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -# 2008, 2009, 2010 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011 Free Software Foundation, Inc. #This file is part of GCC. @@ -50,6 +50,8 @@ # If either is set, EXTRA_PARTS and # EXTRA_MULTILIB_PARTS inherited from the GCC # subdirectory will be ignored. +# md_unwind_header The name of a header file defining +# MD_FALLBACK_FRAME_STATE_FOR. # tmake_file A list of machine-description-specific # makefile-fragments, if different from # "$cpu_type/t-$cpu_type". @@ -57,6 +59,7 @@ asm_hidden_op=.hidden extra_parts= tmake_file= +md_unwind_header=no-unwind.h # Set default cpu_type so it can be updated in each machine entry. cpu_type=`echo ${host} | sed 's/-.*$//'` @@ -168,6 +171,31 @@ case ${host} in ;; *-*-rtems*) ;; +*-*-solaris2*) + tmake_file="$tmake_file t-sol2 t-slibgcc t-slibgcc-elf-ver" + if test $with_gnu_ld = yes; then + tmake_file="$tmake_file t-slibgcc-gld" + else + tmake_file="$tmake_file t-slibgcc-sld" + fi + # Add cpu-specific t-sol2 after t-slibgcc-* so it can augment SHLIB_MAPFILES. + tmake_file="$tmake_file $cpu_type/t-sol2" + extra_parts="gmon.o crtbegin.o crtend.o" + case ${host} in + i?86-*-solaris2.1[0-9]*) + # Solaris 10+/x86 provides crt1.o, crti.o, crtn.o, and gcrt1.o as + # part of the base system. + ;; + sparc*-*-solaris2.1[0-9]*) + # Solaris 10+/SPARC lacks crt1.o and gcrt1.o. + extra_parts="$extra_parts crt1.o gcrt1.o" + ;; + *) + tmake_file="$tmake_file t-crtin" + extra_parts="$extra_parts crt1.o crti.o crtn.o gcrt1.o" + ;; + esac + ;; *-*-vxworks*) ;; *-*-elf) @@ -185,6 +213,7 @@ case ${host} in alpha*-*-linux*) tmake_file="${tmake_file} alpha/t-crtfm" extra_parts="$extra_parts crtfastmath.o" + md_unwind_header=alpha/linux-unwind.h ;; alpha*-*-freebsd*) ;; @@ -193,12 +222,22 @@ alpha*-*-netbsd*) alpha*-*-openbsd*) ;; alpha*-dec-osf5.1*) + tmake_file="${tmake_file} alpha/t-alpha alpha/t-ieee alpha/t-crtfm t-slibgcc alpha/t-slibgcc-osf" + case ${target_thread_file} in + posix) + tmake_file="${tmake_file} alpha/t-osf-pthread" + ;; + esac + extra_parts="${extra_parts} qrnnd.o crtfastmath.o gthr-posix.o" + md_unwind_header=alpha/osf5-unwind.h ;; alpha64-dec-*vms*) tmake_file="vms/t-vms vms/t-vms64 alpha/t-vms" + md_unwind_header=alpha/vms-unwind.h ;; alpha*-dec-*vms*) tmake_file="vms/t-vms alpha/t-vms" + md_unwind_header=alpha/vms-unwind.h ;; arm-wrs-vxworks) ;; @@ -229,11 +268,13 @@ avr-*-*) bfin*-elf*) ;; bfin*-uclinux*) + md_unwind_header=bfin/linux-unwind.h ;; bfin*-linux-uclibc*) # No need to build crtbeginT.o on uClibc systems. Should probably # be moved to the OS specific section above. extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + md_unwind_header=bfin/linux-unwind.h ;; bfin*-*) ;; @@ -257,12 +298,16 @@ h8300-*-elf*) hppa*64*-*-linux*) ;; hppa*-*-linux*) + md_unwind_header=pa/pa32-linux.h ;; hppa[12]*-*-hpux10*) + md_unwind_header=pa/hpux-unwind.h ;; hppa*64*-*-hpux11*) + md_unwind_header=pa/hpux-unwind.h ;; hppa[12]*-*-hpux11*) + md_unwind_header=pa/hpux-unwind.h ;; i[34567]86-*-darwin*) ;; @@ -287,13 +332,15 @@ i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123]) ;; i[34567]86-*-openbsd*) ;; -i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*) +i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu) extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm" + md_unwind_header=i386/linux-unwind.h ;; x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu) extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm" + md_unwind_header=i386/linux-unwind.h ;; i[34567]86-pc-msdosdjgpp*) ;; @@ -309,26 +356,25 @@ i[3456x]86-*-netware*) i[34567]86-*-nto-qnx*) ;; i[34567]86-*-rtems*) + extra_parts="crtbegin.o crtend.o crti.o crtn.o" + tmake_file="${tmake_file} t-crtin i386/t-softfp i386/t-crtstuff t-rtems" ;; i[34567]86-*-solaris2*) - tmake_file="${tmake_file} i386/t-sol2" - case ${host} in - *-*-solaris2.1[0-9]*) - # Solaris 2.10 provides crt1.o, crti.o, crtn.o, and gcrt1.o as - # part of the base system. - extra_parts="gmon.o crtbegin.o crtend.o" - ;; - *) - extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o" - ;; - esac + tmake_file="$tmake_file i386/t-crtfm" + extra_parts="$extra_parts crtfastmath.o" + md_unwind_header=i386/sol2-unwind.h ;; i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae) ;; -i[34567]86-*-cygwin* | i[34567]86-*-mingw*) +i[34567]86-*-cygwin*) extra_parts="crtbegin.o crtend.o crtfastmath.o" tmake_file="i386/t-cygming i386/t-crtfm" ;; +i[34567]86-*-mingw*) + extra_parts="crtbegin.o crtend.o crtfastmath.o" + tmake_file="i386/t-cygming i386/t-crtfm" + md_unwind_header=i386/w32-unwind.h + ;; x86_64-*-mingw*) ;; i[34567]86-*-interix3*) @@ -344,11 +390,13 @@ ia64*-*-freebsd*) ia64*-*-linux*) extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" tmake_file="ia64/t-ia64 t-softfp ia64/t-fprules-softfp ia64/t-softfp-compat" + md_unwind_header=ia64/linux-unwind.h ;; ia64*-*-hpux*) ;; ia64-hp-*vms*) tmake_file="vms/t-vms vms/t-vms64 ia64/t-vms" + md_unwind_header=ia64/vms-unwind.h ;; iq2000*-*-elf*) ;; @@ -375,10 +423,12 @@ m68k*-*-netbsdelf*) m68k*-*-openbsd*) ;; m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc + md_unwind_header=m68k/linux-unwind.h ;; -m68k-*-linux*) # Motorola m68k's running GNU/Linux +m68k-*-linux*) # Motorola m68k's running GNU/Linux # with ELF format using glibc 2 # aka the GNU/Linux C library 6. + md_unwind_header=m68k/linux-unwind.h ;; m68k-*-rtems*) ;; @@ -387,17 +437,21 @@ mcore-*-elf) microblaze*-*-*) tmake_file="microblaze/t-microblaze" ;; -mips-sgi-irix[56]*) +mips-sgi-irix6.5*) + tmake_file="mips/t-irix6 t-slibgcc mips/t-slibgcc-irix" + extra_parts="crtbegin.o crtend.o irix-crti.o irix-crtn.o" ;; mips*-*-netbsd*) # NetBSD/mips, either endian. ;; mips64*-*-linux*) extra_parts="$extra_parts crtfastmath.o" tmake_file="{$tmake_file} mips/t-crtfm" + md_unwind_header=mips/linux-unwind.h ;; mips*-*-linux*) # Linux MIPS, either endian. extra_parts="$extra_parts crtfastmath.o" tmake_file="{$tmake_file} mips/t-crtfm" + md_unwind_header=mips/linux-unwind.h ;; mips*-*-openbsd*) ;; @@ -442,6 +496,15 @@ pdp11-*-*) picochip-*-*) ;; powerpc-*-darwin*) + case ${host} in + *-*-darwin9* | *-*-darwin[12][0-9]*) + # libSystem contains unwind information for signal frames since + # Darwin 9. + ;; + *) + md_unwind_header=rs6000/darwin-unwind.h + ;; + esac ;; powerpc64-*-darwin*) ;; @@ -468,6 +531,7 @@ powerpc-*-rtems*) ;; powerpc-*-linux* | powerpc64-*-linux*) tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp" + md_unwind_header=rs6000/linux-unwind.h ;; powerpc-wrs-vxworks|powerpc-wrs-vxworksae) ;; @@ -491,12 +555,15 @@ rx-*-elf) ;; s390-*-linux*) tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/32/t-floattodi" + md_unwind_header=s390/linux-unwind.h ;; s390x-*-linux*) tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux" + md_unwind_header=s390/linux-unwind.h ;; s390x-ibm-tpf*) tmake_file="${tmake_file} s390/t-crtstuff s390/t-tpf" + md_unwind_header-s390/tpf-unwind.h ;; score-*-elf) ;; @@ -507,6 +574,7 @@ sh-*-elf* | sh[12346l]*-*-elf* | \ case ${host} in sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux" + md_unwind_header=sh/linux-unwind.h ;; esac ;; @@ -519,18 +587,33 @@ sparc-*-netbsdelf*) sparc64-*-openbsd*) ;; sparc-*-elf*) + case ${host} in + *-leon[3-9]*) + ;; + *) + tmake_file="sparc/t-softmul" + ;; + esac + tmake_file="${tmake_file} sparc/t-softfp t-crtin t-crtfm" + extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o" ;; sparc-*-linux*) # SPARC's running GNU/Linux, libc6 extra_parts="$extra_parts crtfastmath.o" - tmake_file="${tmake_file} sparc/t-crtfm" + tmake_file="${tmake_file} t-crtfm" + md_unwind_header=sparc/linux.h ;; sparc-*-rtems* | sparc64-*-rtems* ) + tmake_file="sparc/t-elf t-crtin t-crtfm t-rtems" + extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o" ;; -sparc64-*-solaris2* | sparcv9-*-solaris2*) - ;; -sparc-*-solaris2*) +sparc*-*-solaris2*) + tmake_file="$tmake_file t-crtfm" + extra_parts="$extra_parts crtfastmath.o" + md_unwind_header=sparc/sol2-unwind.h ;; sparc64-*-elf*) + tmake_file="${tmake_file} t-crtin t-crtfm" + extra_parts="crtbegin.o crtend.o crti.o crtn.o crtfastmath.o" ;; sparc-wrs-vxworks) ;; @@ -538,7 +621,8 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*) ;; sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux extra_parts="$extra_parts crtfastmath.o" - tmake_file="${tmake_file} sparc/t-crtfm" + tmake_file="${tmake_file} t-crtfm" + md_unwind_header=sparc/linux-unwind.h ;; sparc64-*-netbsd*) ;; @@ -561,6 +645,7 @@ xstormy16-*-elf) xtensa*-*-elf*) ;; xtensa*-*-linux*) + md_unwind_header=xtensa/linux-unwind.h ;; am33_2.0-*-linux*) extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" diff --git a/libgcc/config/alpha/libgcc-osf5.ver b/libgcc/config/alpha/libgcc-osf5.ver new file mode 100644 index 00000000000..4266928d1cf --- /dev/null +++ b/libgcc/config/alpha/libgcc-osf5.ver @@ -0,0 +1,58 @@ +# Copyright (C) 2011 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 3, 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 COPYING3. If not see +# <http://www.gnu.org/licenses/>. + +# Tru64 UNIX specific additions to libgcc-std.ver. + +GCC_4.7.0 { + __udiv_qrnnd + # Beware *not* to hide the POSIX threads related symbols provided by + # gthr-posix.c, as this would prevent their preemption by real symbols. + __pthread_cancel + __pthread_cond_broadcast + __pthread_cond_destroy + __pthread_cond_init + __pthread_cond_signal + __pthread_cond_timedwait + __pthread_cond_wait + __pthread_create + __pthread_detach + __pthread_exit + __pthread_getspecific + __pthread_join + __pthread_mutex_destroy + __pthread_mutex_init + __pthread_mutex_lock + __pthread_mutex_trylock + __pthread_mutex_unlock + __pthread_once + __pthread_self + __pthread_setspecific + pthread_attr_destroy + pthread_attr_init + pthread_attr_setdetachstate + pthread_getschedparam + pthread_key_create + pthread_key_delete + pthread_mutexattr_destroy + pthread_mutexattr_init + pthread_mutexattr_settype + pthread_setschedparam + sched_get_priority_max + sched_get_priority_min + sched_yield +} diff --git a/gcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h index e43aacfd00b..e43aacfd00b 100644 --- a/gcc/config/alpha/linux-unwind.h +++ b/libgcc/config/alpha/linux-unwind.h diff --git a/gcc/config/alpha/osf5-unwind.h b/libgcc/config/alpha/osf5-unwind.h index c649099349e..c649099349e 100644 --- a/gcc/config/alpha/osf5-unwind.h +++ b/libgcc/config/alpha/osf5-unwind.h diff --git a/libgcc/config/alpha/t-alpha b/libgcc/config/alpha/t-alpha new file mode 100644 index 00000000000..14c72d0808b --- /dev/null +++ b/libgcc/config/alpha/t-alpha @@ -0,0 +1,2 @@ +# This is a support routine for longlong.h, used by libgcc2.c. +LIB2ADD += $(gcc_srcdir)/config/alpha/qrnnd.asm diff --git a/libgcc/config/alpha/t-crtfm b/libgcc/config/alpha/t-crtfm index 48c21d88f24..5060c156451 100644 --- a/libgcc/config/alpha/t-crtfm +++ b/libgcc/config/alpha/t-crtfm @@ -2,5 +2,4 @@ # while migrating this rule from the GCC directory, but I do not # know why it is necessary if no other crt file uses it. crtfastmath.o: $(gcc_srcdir)/config/alpha/crtfastmath.c - $(gcc_compile) -frandom-seed=gcc-crtfastmath -c \ - $(gcc_srcdir)/config/alpha/crtfastmath.c + $(gcc_compile) -frandom-seed=gcc-crtfastmath -c $< diff --git a/libgcc/config/alpha/t-ieee b/libgcc/config/alpha/t-ieee new file mode 100644 index 00000000000..5fdc729ec52 --- /dev/null +++ b/libgcc/config/alpha/t-ieee @@ -0,0 +1,2 @@ +# All alphas get an IEEE complaint set of libraries. +HOST_LIBGCC2_CFLAGS += -mieee diff --git a/gcc/config/alpha/t-osf-pthread b/libgcc/config/alpha/t-osf-pthread index 968e65cce9e..c51f375a048 100644 --- a/gcc/config/alpha/t-osf-pthread +++ b/libgcc/config/alpha/t-osf-pthread @@ -1,5 +1,5 @@ -# Provide dummy POSIX threads functions -LIB2FUNCS_EXTRA += $(srcdir)/gthr-posix.c - # Compile libgcc2 with POSIX threads supports -TARGET_LIBGCC2_CFLAGS=-pthread +HOST_LIBGCC2_CFLAGS += -pthread + +# Provide dummy POSIX threads functions +LIB2ADD += $(gcc_srcdir)/gthr-posix.c diff --git a/libgcc/config/alpha/t-slibgcc-osf b/libgcc/config/alpha/t-slibgcc-osf new file mode 100644 index 00000000000..33a07a7b6aa --- /dev/null +++ b/libgcc/config/alpha/t-slibgcc-osf @@ -0,0 +1,29 @@ +# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2011 +# 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 3, 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 COPYING3. If not see +# <http://www.gnu.org/licenses/>. + +# Build a shared libgcc library with the Tru64 UNIX linker. + +SHLIB_LDFLAGS = -Wl,-msym -Wl,-set_version,gcc.1 -Wl,-soname,$(SHLIB_SONAME) \ + -Wl,-hidden -Wl,-input,$(SHLIB_MAP) + +SHLIB_MKMAP = $(gcc_srcdir)/mkmap-flat.awk +SHLIB_MKMAP_OPTS = -v osf_export=1 +# Needed so mkmap-flat.awk can parse the nm output. +SHLIB_NM_FLAGS = -Bg +SHLIB_MAPFILES = libgcc-std.ver $(srcdir)/config/alpha/libgcc-osf5.ver diff --git a/gcc/config/alpha/vms-unwind.h b/libgcc/config/alpha/vms-unwind.h index 71cb7b87920..71cb7b87920 100644 --- a/gcc/config/alpha/vms-unwind.h +++ b/libgcc/config/alpha/vms-unwind.h diff --git a/gcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h index 88c8285632d..88c8285632d 100644 --- a/gcc/config/bfin/linux-unwind.h +++ b/libgcc/config/bfin/linux-unwind.h diff --git a/libgcc/config/gmon-sol2.c b/libgcc/config/gmon-sol2.c new file mode 100644 index 00000000000..7d6149665d0 --- /dev/null +++ b/libgcc/config/gmon-sol2.c @@ -0,0 +1,444 @@ +/*- + * Copyright (c) 1991 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. [rescinded 22 July 1999] + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* Mangled into a form that works on Solaris 2/SPARC by Mark Eichin + * for Cygnus Support, July 1992. + * + * Modified to support Solaris 2/x86 by J.W.Hawtin <oolon@ankh.org>, 14/8/96. + * + * It must be used in conjunction with sol2-gc1.S, which is used to start + * and stop process monitoring. + */ + +#include "tconfig.h" +#include "tsystem.h" +#include <fcntl.h> /* For creat. */ + +extern void monstartup (char *, char *); +extern void _mcleanup (void); +#ifdef __i386__ +static void internal_mcount (void) __attribute__ ((used)); +#else +static void internal_mcount (char *, unsigned short *) __attribute__ ((used)); +#endif +static void moncontrol (int); + +struct phdr { + char *lpc; + char *hpc; + int ncnt; +}; + +#define HISTFRACTION 2 +#define HISTCOUNTER unsigned short +#define HASHFRACTION 1 +#define ARCDENSITY 2 +#define MINARCS 50 + +struct tostruct { + char *selfpc; + long count; + unsigned short link; +}; + +struct rawarc { + unsigned long raw_frompc; + unsigned long raw_selfpc; + long raw_count; +}; + +#define ROUNDDOWN(x, y) (((x) / (y)) * (y)) +#define ROUNDUP(x, y) ((((x) + (y) - 1) / (y)) * (y)) + +/* froms is actually a bunch of unsigned shorts indexing tos. */ +static int profiling = 3; +static unsigned short *froms; +static struct tostruct *tos = NULL; +static long tolimit = 0; +static char *s_lowpc = NULL; +static char *s_highpc = NULL; +static size_t s_textsize = 0; + +static int ssiz; +static char *sbuf; +static int s_scale; +/* See profil(2) where this is describe (incorrectly). */ +#define SCALE_1_TO_1 0x10000L + +#define MSG "No space for profiling buffer(s)\n" + +void +monstartup (char *lowpc, char *highpc) +{ + size_t monsize; + char *buffer; + size_t o; + + /* Round lowpc and highpc to multiples of the density we're using + so the rest of the scaling (here and in gprof) stays in ints. */ + lowpc = (char *) ROUNDDOWN ((size_t) lowpc, + HISTFRACTION * sizeof (HISTCOUNTER)); + s_lowpc = lowpc; + highpc = (char *) ROUNDUP ((size_t) highpc, + HISTFRACTION * sizeof (HISTCOUNTER)); + s_highpc = highpc; + s_textsize = highpc - lowpc; + monsize = (s_textsize / HISTFRACTION) + sizeof (struct phdr); + buffer = sbrk (monsize); + if (buffer == (void *) -1) { + write (STDERR_FILENO, MSG, sizeof (MSG)); + return; + } + froms = sbrk (s_textsize / HASHFRACTION); + if (froms == (void *) -1) { + write (STDERR_FILENO, MSG, sizeof (MSG)); + froms = NULL; + return; + } + tolimit = s_textsize * ARCDENSITY / 100; + if (tolimit < MINARCS) { + tolimit = MINARCS; + } else if (tolimit > 65534) { + tolimit = 65534; + } + tos = sbrk (tolimit * sizeof (struct tostruct)); + if (tos == (void *) -1) { + write (STDERR_FILENO, MSG, sizeof (MSG)); + froms = NULL; + tos = NULL; + return; + } + tos[0].link = 0; + sbuf = buffer; + ssiz = monsize; + ((struct phdr *) buffer)->lpc = lowpc; + ((struct phdr *) buffer)->hpc = highpc; + ((struct phdr *) buffer)->ncnt = ssiz; + monsize -= sizeof (struct phdr); + if (monsize <= 0) + return; + o = highpc - lowpc; + if(monsize < o) + s_scale = ((float) monsize / o) * SCALE_1_TO_1; + else + s_scale = SCALE_1_TO_1; + moncontrol (1); +} + +void +_mcleanup (void) +{ + int fd; + int fromindex; + int endfrom; + char *frompc; + int toindex; + struct rawarc rawarc; + char *profdir; + const char *proffile; + char *progname; + char buf[PATH_MAX]; + extern char **___Argv; + + moncontrol (0); + + if ((profdir = getenv ("PROFDIR")) != NULL) { + /* If PROFDIR contains a null value, no profiling output is produced. */ + if (*profdir == '\0') { + return; + } + + progname = strrchr (___Argv[0], '/'); + if (progname == NULL) + progname = ___Argv[0]; + else + progname++; + + sprintf (buf, "%s/%ld.%s", profdir, (long) getpid (), progname); + proffile = buf; + } else { + proffile = "gmon.out"; + } + + fd = creat (proffile, 0666); + if (fd < 0) { + perror (proffile); + return; + } +#ifdef DEBUG + fprintf (stderr, "[mcleanup] sbuf %#x ssiz %d\n", sbuf, ssiz); +#endif /* DEBUG */ + + write (fd, sbuf, ssiz); + endfrom = s_textsize / (HASHFRACTION * sizeof (*froms)); + for (fromindex = 0; fromindex < endfrom; fromindex++) { + if (froms[fromindex] == 0) { + continue; + } + frompc = s_lowpc + (fromindex * HASHFRACTION * sizeof (*froms)); + for (toindex = froms[fromindex]; + toindex != 0; + toindex = tos[toindex].link) { +#ifdef DEBUG + fprintf (stderr, "[mcleanup] frompc %#x selfpc %#x count %d\n", + frompc, tos[toindex].selfpc, tos[toindex].count); +#endif /* DEBUG */ + rawarc.raw_frompc = (unsigned long) frompc; + rawarc.raw_selfpc = (unsigned long) tos[toindex].selfpc; + rawarc.raw_count = tos[toindex].count; + write (fd, &rawarc, sizeof (rawarc)); + } + } + close (fd); +} + +/* Solaris 2 libraries use _mcount. */ +#if defined __i386__ +asm(".globl _mcount\n" + "_mcount:\n" + " jmp internal_mcount\n"); +#elif defined __x86_64__ +/* See GLIBC for additional information about this technique. */ +asm(".globl _mcount\n" + " .type _mcount, @function\n" + "_mcount:\n" + /* The compiler calls _mcount after the prologue, and does not + save any of the registers. Therefore we must preserve all + seven registers which may contain function arguments. */ + " subq $0x38, %rsp\n" + " movq %rax, (%rsp)\n" + " movq %rcx, 0x08(%rsp)\n" + " movq %rdx, 0x10(%rsp)\n" + " movq %rsi, 0x18(%rsp)\n" + " movq %rdi, 0x20(%rsp)\n" + " movq %r8, 0x28(%rsp)\n" + " movq %r9, 0x30(%rsp)\n" + /* Get SELFPC (pushed by the call to this function) and + FROMPCINDEX (via the frame pointer). */ + " movq 0x38(%rsp), %rdi\n" + " movq 0x8(%rbp), %rsi\n" + " call internal_mcount\n" + /* Restore the saved registers. */ + " movq 0x30(%rsp), %r9\n" + " movq 0x28(%rsp), %r8\n" + " movq 0x20(%rsp), %rdi\n" + " movq 0x18(%rsp), %rsi\n" + " movq 0x10(%rsp), %rdx\n" + " movq 0x08(%rsp), %rcx\n" + " movq (%rsp), %rax\n" + " addq $0x38, %rsp\n" + " retq\n"); +#elif defined __sparc__ +/* The SPARC stack frame is only held together by the frame pointers + in the register windows. According to the SVR4 SPARC ABI + Supplement, Low Level System Information/Operating System + Interface/Software Trap Types, a type 3 trap will flush all of the + register windows to the stack, which will make it possible to walk + the frames and find the return addresses. + However, it seems awfully expensive to incur a trap (system + call) for every function call. It turns out that "call" simply puts + the return address in %o7 expecting the "save" in the procedure to + shift it into %i7; this means that before the "save" occurs, %o7 + contains the address of the call to mcount, and %i7 still contains + the caller above that. The asm mcount here simply saves those + registers in argument registers and branches to internal_mcount, + simulating a call with arguments. + Kludges: + 1) the branch to internal_mcount is hard coded; it should be + possible to tell asm to use the assembler-name of a symbol. + 2) in theory, the function calling mcount could have saved %i7 + somewhere and reused the register; in practice, I *think* this will + break longjmp (and maybe the debugger) but I'm not certain. (I take + some comfort in the knowledge that it will break the native mcount + as well.) + 3) if builtin_return_address worked, this could be portable. + However, it would really have to be optimized for arguments of 0 + and 1 and do something like what we have here in order to avoid the + trap per function call performance hit. + 4) the atexit and monsetup calls prevent this from simply + being a leaf routine that doesn't do a "save" (and would thus have + access to %o7 and %i7 directly) but the call to write() at the end + would have also prevented this. + + -- [eichin:19920702.1107EST] */ +asm(".global _mcount\n" + "_mcount:\n" + /* i7 == last ret, -> frompcindex. */ + " mov %i7, %o1\n" + /* o7 == current ret, -> selfpc. */ + " mov %o7, %o0\n" + " b,a internal_mcount\n"); +#endif + +static void +#ifdef __i386__ +internal_mcount (void) +#else +internal_mcount (char *selfpc, unsigned short *frompcindex) +#endif +{ + struct tostruct *top; + struct tostruct *prevtop; + long toindex; + static char already_setup; + +#ifdef __i386__ + char *selfpc; + unsigned short *frompcindex; + + /* Find the return address for mcount and the return address for mcount's + caller. */ + + /* selfpc = pc pushed by mcount call. + This identifies the function that was just entered. */ + selfpc = (void *) __builtin_return_address (0); + /* frompcindex = pc in preceding frame. + This identifies the caller of the function just entered. */ + frompcindex = (void *) __builtin_return_address (1); +#endif + + if(!already_setup) { + extern char etext[]; + + already_setup = 1; + +#if defined __i386__ + /* <sys/vmparam.h> USERSTACK. */ + monstartup ((char *) 0x8048000, etext); +#elif defined __x86_64__ + monstartup (NULL, etext); +#elif defined __sparc__ + { + extern char _start[]; + extern char _init[]; + + monstartup (_start < _init ? _start : _init, etext); + } +#endif + atexit (_mcleanup); + } + /* Check that we are profiling and that we aren't recursively invoked. */ + if (profiling) { + goto out; + } + profiling++; + /* Check that frompcindex is a reasonable pc value. For example: signal + catchers get called from the stack, not from text space. too bad. */ + frompcindex = (unsigned short *) ((long) frompcindex - (long) s_lowpc); + if ((unsigned long) frompcindex > s_textsize) { + goto done; + } + frompcindex = &froms[((long) frompcindex) / (HASHFRACTION * sizeof (*froms))]; + toindex = *frompcindex; + if (toindex == 0) { + /* First time traversing this arc. */ + toindex = ++tos[0].link; + if (toindex >= tolimit) { + goto overflow; + } + *frompcindex = toindex; + top = &tos[toindex]; + top->selfpc = selfpc; + top->count = 1; + top->link = 0; + goto done; + } + top = &tos[toindex]; + if (top->selfpc == selfpc) { + /* arc at front of chain; usual case. */ + top->count++; + goto done; + } + /* Have to go looking down chain for it. Top points to what we are + looking at, prevtop points to previous top. We know it is not at the + head of the chain. */ + for (; /* goto done */; ) { + if (top->link == 0) { + /* top is end of the chain and none of the chain had top->selfpc == + selfpc, so we allocate a new tostruct and link it to the head of + the chain. */ + toindex = ++tos[0].link; + if (toindex >= tolimit) { + goto overflow; + } + top = &tos[toindex]; + top->selfpc = selfpc; + top->count = 1; + top->link = *frompcindex; + *frompcindex = toindex; + goto done; + } + /* Otherwise, check the next arc on the chain. */ + prevtop = top; + top = &tos[top->link]; + if (top->selfpc == selfpc) { + /* There it is. Increment its count move it to the head of the + chain. */ + top->count++; + toindex = prevtop->link; + prevtop->link = top->link; + top->link = *frompcindex; + *frompcindex = toindex; + goto done; + } + + } + done: + profiling--; + /* ... and fall through. */ + out: + /* Normal return restores saved registers. */ + return; + + overflow: + /* Halt further profiling. */ + profiling++; + +#define TOLIMIT "mcount: tos overflow\n" + write (STDERR_FILENO, TOLIMIT, sizeof (TOLIMIT)); + goto out; +} + +/* Control profiling. Profiling is what mcount checks to see if all the + data structures are ready. */ +static void +moncontrol (int mode) +{ + if (mode) { + /* Start. */ + profil ((unsigned short *) (sbuf + sizeof (struct phdr)), + ssiz - sizeof (struct phdr), (size_t) s_lowpc, s_scale); + profiling = 0; + } else { + /* Stop. */ + profil ((unsigned short *) 0, 0, 0, 0); + profiling = 3; + } +} diff --git a/gcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h index de44823e053..de44823e053 100644 --- a/gcc/config/i386/linux-unwind.h +++ b/libgcc/config/i386/linux-unwind.h diff --git a/libgcc/config/i386/sol2-c1.S b/libgcc/config/i386/sol2-c1.S new file mode 100644 index 00000000000..b2e473f5b9c --- /dev/null +++ b/libgcc/config/i386/sol2-c1.S @@ -0,0 +1,173 @@ +/* crt1.s for Solaris 2, x86 + + Copyright (C) 1993, 1998, 2008, 2009, 2011 Free Software Foundation, Inc. + Written By Fred Fish, Nov 1992 + +This file is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +<http://www.gnu.org/licenses/>. */ + + +/* This file takes control of the process from the kernel, as specified + in section 3 of the System V Application Binary Interface, Intel386 + Processor Supplement. It has been constructed from information obtained + from the ABI, information obtained from single stepping existing + Solaris executables through their startup code with gdb, and from + information obtained by single stepping executables on other i386 SVR4 + implementations. This file is the first thing linked into any + executable. */ + +#ifndef GCRT1 + .ident "GNU C crt1.s" +#define CLEANUP _cleanup +#else +/* This is a modified crt1.s by J.W.Hawtin <oolon@ankh.org> 15/8/96, + to allow program profiling, by calling monstartup on entry and _mcleanup + on exit. */ + .ident "GNU C gcrt1.s" +#define CLEANUP _mcleanup +#endif + .weak _cleanup + .weak _DYNAMIC + .text + +/* Start creating the initial frame by pushing a NULL value for the return + address of the initial frame, and mark the end of the stack frame chain + (the innermost stack frame) with a NULL value, per page 3-32 of the ABI. + Initialize the first stack frame pointer in %ebp (the contents of which + are unspecified at process initialization). */ + + .globl _start +_start: + pushl $0x0 + pushl $0x0 + movl %esp,%ebp + +/* As specified per page 3-32 of the ABI, %edx contains a function + pointer that should be registered with atexit(), for proper + shared object termination. Just push it onto the stack for now + to preserve it. We want to register _cleanup() first. */ + + pushl %edx + +/* Check to see if there is an _cleanup() function linked in, and if + so, register it with atexit() as the last thing to be run by + atexit(). */ + + movl $CLEANUP,%eax + testl %eax,%eax + je .L1 + pushl $CLEANUP + call atexit + addl $0x4,%esp +.L1: + +/* Now check to see if we have an _DYNAMIC table, and if so then + we need to register the function pointer previously in %edx, but + now conveniently saved on the stack as the argument to pass to + atexit(). */ + + movl $_DYNAMIC,%eax + testl %eax,%eax + je .L2 + call atexit +.L2: + +/* Register _fini() with atexit(). We will take care of calling _init() + directly. */ + + pushl $_fini + call atexit + +#ifdef GCRT1 +/* Start profiling. */ + + pushl %ebp + movl %esp,%ebp + pushl $_etext + pushl $_start + call monstartup + addl $8,%esp + popl %ebp +#endif + +/* Compute the address of the environment vector on the stack and load + it into the global variable _environ. Currently argc is at 8 off + the frame pointer. Fetch the argument count into %eax, scale by the + size of each arg (4 bytes) and compute the address of the environment + vector which is 16 bytes (the two zero words we pushed, plus argc, + plus the null word terminating the arg vector) further up the stack, + off the frame pointer (whew!). */ + + movl 8(%ebp),%eax + leal 16(%ebp,%eax,4),%edx + movl %edx,_environ + +/* Push the environment vector pointer, the argument vector pointer, + and the argument count on to the stack to set up the arguments + for _init(), _fpstart(), and main(). Note that the environment + vector pointer and the arg count were previously loaded into + %edx and %eax respectively. The only new value we need to compute + is the argument vector pointer, which is at a fixed address off + the initial frame pointer. */ + +/* Make sure the stack is properly aligned. */ + andl $0xfffffff0,%esp + subl $4,%esp + + pushl %edx + leal 12(%ebp),%edx + pushl %edx + pushl %eax + +/* Call _init(argc, argv, environ), _fpstart(argc, argv, environ), and + main(argc, argv, environ). */ + + call _init + call __fpstart + call main + +/* Pop the argc, argv, and environ arguments off the stack, push the + value returned from main(), and call exit(). */ + + addl $12,%esp + pushl %eax + call exit + +/* An inline equivalent of _exit, as specified in Figure 3-26 of the ABI. */ + + pushl $0x0 + movl $0x1,%eax + lcall $7,$0 + +/* If all else fails, just try a halt! */ + + hlt + .type _start,@function + .size _start,.-_start + +#ifndef GCRT1 +/* A dummy profiling support routine for non-profiling executables, + in case we link in some objects that have been compiled for profiling. */ + + .weak _mcount +_mcount: + ret + .type _mcount,@function + .size _mcount,.-_mcount +#endif diff --git a/libgcc/config/i386/sol2-ci.S b/libgcc/config/i386/sol2-ci.S new file mode 100644 index 00000000000..61e1436f560 --- /dev/null +++ b/libgcc/config/i386/sol2-ci.S @@ -0,0 +1,40 @@ +/* crti.s for Solaris 2, x86. + + Copyright (C) 1993, 2008, 2009 Free Software Foundation, Inc. + Written By Fred Fish, Nov 1992 + +This file is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +<http://www.gnu.org/licenses/>. */ + + +/* This file just supplies labeled starting points for the .init and .fini + sections. It is linked in before the values-Xx.o files and also before + crtbegin.o. */ + + .ident "GNU C crti.s" + + .section .init + .globl _init + .type _init,@function +_init: + + .section .fini + .globl _fini + .type _fini,@function +_fini: diff --git a/libgcc/config/i386/sol2-cn.S b/libgcc/config/i386/sol2-cn.S new file mode 100644 index 00000000000..993675d2341 --- /dev/null +++ b/libgcc/config/i386/sol2-cn.S @@ -0,0 +1,35 @@ +/* crtn.s for Solaris 2, x86. + + Copyright (C) 1993, 2008, 2009 Free Software Foundation, Inc. + Written By Fred Fish, Nov 1992 + +This file is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 3, or (at your option) any +later version. + +This file is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +<http://www.gnu.org/licenses/>. */ + + +/* This file just supplies returns for the .init and .fini sections. It is + linked in after all other files. */ + + .ident "GNU C crtn.o" + + .section .init + ret $0x0 + + .section .fini + ret $0x0 diff --git a/gcc/config/i386/sol2-unwind.h b/libgcc/config/i386/sol2-unwind.h index d93b60c781c..d93b60c781c 100644 --- a/gcc/config/i386/sol2-unwind.h +++ b/libgcc/config/i386/sol2-unwind.h diff --git a/libgcc/config/i386/t-crtfm b/libgcc/config/i386/t-crtfm index 6e89296b2b3..f71f99a7123 100644 --- a/libgcc/config/i386/t-crtfm +++ b/libgcc/config/i386/t-crtfm @@ -1,5 +1,4 @@ # This is an endfile, Use -minline-all-stringops to ensure # that __builtin_memset doesn't refer to the lib function memset(). crtfastmath.o: $(gcc_srcdir)/config/i386/crtfastmath.c - $(gcc_compile) -msse -minline-all-stringops -c \ - $(gcc_srcdir)/config/i386/crtfastmath.c + $(gcc_compile) -msse -minline-all-stringops -c $< diff --git a/libgcc/config/i386/t-crtstuff b/libgcc/config/i386/t-crtstuff new file mode 100644 index 00000000000..c14dd9411ae --- /dev/null +++ b/libgcc/config/i386/t-crtstuff @@ -0,0 +1,7 @@ +# The pushl in CTOR initialization interferes with frame pointer elimination. +# crtend*.o cannot be compiled without -fno-asynchronous-unwind-tables, +# because then __FRAME_END__ might not be the last thing in .eh_frame +# section. -fno-asynchronous-unwind-tables is off by default for i386 +# and is on by default for x86-64. We turn it off for both i386 and +# x86-64. +CRTSTUFF_T_CFLAGS += -fno-omit-frame-pointer -fno-asynchronous-unwind-tables diff --git a/libgcc/config/i386/t-sol2 b/libgcc/config/i386/t-sol2 index 883b1a92acc..1102146a589 100644 --- a/libgcc/config/i386/t-sol2 +++ b/libgcc/config/i386/t-sol2 @@ -1,25 +1,3 @@ -# gmon build rule: -$(T)gmon.o: $(gcc_srcdir)/config/i386/gmon-sol2.c $(GCC_PASSES) $(CONFIG_H) - $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(CFLAGS) \ - -c $(gcc_srcdir)/config/i386/gmon-sol2.c -o $(T)gmon.o - -# Assemble startup files. -# Apparently Sun believes that assembler files don't need comments, because no -# single ASCII character is valid (tried them all). So we manually strip out -# the comments with sed. This bug may only be in the Early Access releases. -$(T)gcrt1.o: $(gcc_srcdir)/config/i386/sol2-gc1.asm $(GCC_PASSES) - sed -e '/^!/d' <$(gcc_srcdir)/config/i386/sol2-gc1.asm >gcrt1.s - $(GCC_FOR_TARGET) $(CFLAGS) -c -o $(T)gcrt1.o gcrt1.s -$(T)crt1.o: $(gcc_srcdir)/config/i386/sol2-c1.asm $(GCC_PASSES) - sed -e '/^!/d' <$(gcc_srcdir)/config/i386/sol2-c1.asm >crt1.s - $(GCC_FOR_TARGET) $(CFLAGS) -c -o $(T)crt1.o crt1.s -$(T)crti.o: $(gcc_srcdir)/config/i386/sol2-ci.asm $(GCC_PASSES) - sed -e '/^!/d' <$(gcc_srcdir)/config/i386/sol2-ci.asm >crti.s - $(GCC_FOR_TARGET) $(CFLAGS) -c -o $(T)crti.o crti.s -$(T)crtn.o: $(gcc_srcdir)/config/i386/sol2-cn.asm $(GCC_PASSES) - sed -e '/^!/d' <$(gcc_srcdir)/config/i386/sol2-cn.asm >crtn.s - $(GCC_FOR_TARGET) $(CFLAGS) -c -o $(T)crtn.o crtn.s - # We need to use -fPIC when we are using gcc to compile the routines in # crtstuff.c. This is only really needed when we are going to use gcc/g++ # to produce a shared library, but since we don't know ahead of time when @@ -29,9 +7,7 @@ $(T)crtn.o: $(gcc_srcdir)/config/i386/sol2-cn.asm $(GCC_PASSES) # We must also enable optimization to avoid having any code appear after # the call & alignment statement, but before we switch back to the # .text section. - CRTSTUFF_T_CFLAGS = -fPIC -O2 -TARGET_LIBGCC2_CFLAGS = -fPIC # Add support for the introduction of 128-bit long double. SHLIB_MAPFILES += $(srcdir)/config/i386/libgcc-sol2.ver diff --git a/gcc/config/i386/w32-unwind.h b/libgcc/config/i386/w32-unwind.h index 449e9a9c5d6..d77b8e3bd9a 100644 --- a/gcc/config/i386/w32-unwind.h +++ b/libgcc/config/i386/w32-unwind.h @@ -1,5 +1,5 @@ /* Definitions for Dwarf2 EH unwind support for Windows32 targets - Copyright (C) 2007, 2009, 2010 + Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Pascal Obry <obry@adacore.com> @@ -82,6 +82,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see Note that this implementation follows closely the same principles as the GNU/Linux and OSF ones. */ +#ifndef __MINGW64__ + #define WIN32_MEAN_AND_LEAN #include <windows.h> /* Patterns found experimentally to be on a Windows signal handler */ @@ -202,3 +204,5 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context, else return _URC_END_OF_STACK; } + +#endif /* !__MINGW64__ */ diff --git a/gcc/config/ia64/linux-unwind.h b/libgcc/config/ia64/linux-unwind.h index 93f762de573..93f762de573 100644 --- a/gcc/config/ia64/linux-unwind.h +++ b/libgcc/config/ia64/linux-unwind.h diff --git a/gcc/config/ia64/vms-unwind.h b/libgcc/config/ia64/vms-unwind.h index 41c76ae768c..41c76ae768c 100644 --- a/gcc/config/ia64/vms-unwind.h +++ b/libgcc/config/ia64/vms-unwind.h diff --git a/gcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h index 053c15558ca..053c15558ca 100644 --- a/gcc/config/m68k/linux-unwind.h +++ b/libgcc/config/m68k/linux-unwind.h diff --git a/gcc/config/mips/irix-crti.asm b/libgcc/config/mips/irix-crti.S index 0e52e61941a..b9fc1918f74 100644 --- a/gcc/config/mips/irix-crti.asm +++ b/libgcc/config/mips/irix-crti.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2008, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -52,26 +52,16 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see .section .gcc_init,"ax",@progbits .globl __gcc_init __gcc_init: -#if _MIPS_SIM == _ABIO32 - addiu $sp,$sp,-16 - sw $31,0($sp) -#else daddiu $sp,$sp,-16 sd $31,0($sp) sd $28,8($sp) -#endif .section .gcc_fini,"ax",@progbits .globl __gcc_fini __gcc_fini: -#if _MIPS_SIM == _ABIO32 - addiu $sp,$sp,-16 - sw $31,0($sp) -#else daddiu $sp,$sp,-16 sd $31,0($sp) sd $28,8($sp) -#endif /* This object will typically be included in the final link for both shared libraries and executable, and we need to hide the symbols to diff --git a/gcc/config/mips/irix-crtn.asm b/libgcc/config/mips/irix-crtn.S index 7c28c6ff467..8194cacf5d7 100644 --- a/gcc/config/mips/irix-crtn.asm +++ b/libgcc/config/mips/irix-crtn.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -26,25 +26,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see .set nomacro .section .gcc_init,"ax",@progbits -#if _MIPS_SIM == _ABIO32 - lw $31,0($sp) - jr $31 - addiu $sp,$sp,16 -#else ld $31,0($sp) ld $28,8($sp) jr $31 daddiu $sp,$sp,16 -#endif .section .gcc_fini,"ax",@progbits -#if _MIPS_SIM == _ABIO32 - lw $31,0($sp) - jr $31 - addiu $sp,$sp,16 -#else ld $31,0($sp) ld $28,8($sp) jr $31 daddiu $sp,$sp,16 -#endif diff --git a/gcc/config/mips/linux-unwind.h b/libgcc/config/mips/linux-unwind.h index 02f7cd54c5a..02f7cd54c5a 100644 --- a/gcc/config/mips/linux-unwind.h +++ b/libgcc/config/mips/linux-unwind.h diff --git a/gcc/config/mips/t-iris6 b/libgcc/config/mips/t-irix6 index 49f16d7fc10..77dd41da276 100644 --- a/gcc/config/mips/t-iris6 +++ b/libgcc/config/mips/t-irix6 @@ -1,5 +1,5 @@ # Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, -# 2006, 2010 Free Software Foundation, Inc. +# 2006, 2010, 2011 Free Software Foundation, Inc. # # This file is part of GCC. # @@ -17,22 +17,20 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -MULTILIB_OPTIONS=mabi=n32/mabi=64 -MULTILIB_DIRNAMES=n32 64 -MULTILIB_MATCHES= -MULTILIB_OSDIRNAMES=../lib32 ../lib64 +irix-crti.o: $(srcdir)/config/mips/irix-crti.S + $(crt_compile) -c $< -LIBGCC = stmp-multilib -INSTALL_LIBGCC = install-multilib +irix-crtn.o: $(srcdir)/config/mips/irix-crtn.S + $(crt_compile) -c $< TPBIT = tp-bit.c -tp-bit.c: $(srcdir)/config/fp-bit.c - echo '#ifdef __MIPSEL__' > tp-bit.c - echo '# define FLOAT_BIT_ORDER_MISMATCH' >> tp-bit.c - echo '#endif' >> tp-bit.c - echo '#define QUIET_NAN_NEGATED' >> tp-bit.c - echo '#if __LDBL_MANT_DIG__ == 106' >> tp-bit.c - echo '# define TFLOAT' >> tp-bit.c - cat $(srcdir)/config/fp-bit.c >> tp-bit.c - echo '#endif' >> tp-bit.c +$(gcc_objdir)/tp-bit.c: $(gcc_srcdir)/config/fp-bit.c + echo '#ifdef __MIPSEL__' > $@ + echo '# define FLOAT_BIT_ORDER_MISMATCH' >> $@ + echo '#endif' >> $@ + echo '#define QUIET_NAN_NEGATED' >> $@ + echo '#if __LDBL_MANT_DIG__ == 106' >> $@ + echo '# define TFLOAT' >> $@ + cat $< >> $@ + echo '#endif' >> $@ diff --git a/libgcc/config/mips/t-slibgcc-irix b/libgcc/config/mips/t-slibgcc-irix new file mode 100644 index 00000000000..6e0ac365437 --- /dev/null +++ b/libgcc/config/mips/t-slibgcc-irix @@ -0,0 +1,7 @@ +# Build a shared libgcc library with the SGI linker. + +SHLIB_LDFLAGS = -Wl,-soname,$(SHLIB_SONAME) \ + -Wl,-exports_file,$(SHLIB_MAP) + +SHLIB_MKMAP = $(gcc_srcdir)/mkmap-flat.awk +SHLIB_MAPFILES = libgcc-std.ver diff --git a/libgcc/config/no-unwind.h b/libgcc/config/no-unwind.h new file mode 100644 index 00000000000..0ecd78a60de --- /dev/null +++ b/libgcc/config/no-unwind.h @@ -0,0 +1,2 @@ +/* Dummy header for targets without a definition of + MD_FALLBACK_FRAME_STATE_FOR. */ diff --git a/gcc/config/pa/hpux-unwind.h b/libgcc/config/pa/hpux-unwind.h index 92061ec3677..92061ec3677 100644 --- a/gcc/config/pa/hpux-unwind.h +++ b/libgcc/config/pa/hpux-unwind.h diff --git a/gcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h index a0560e97445..a0560e97445 100644 --- a/gcc/config/pa/linux-unwind.h +++ b/libgcc/config/pa/linux-unwind.h diff --git a/gcc/config/rs6000/darwin-unwind.h b/libgcc/config/rs6000/darwin-unwind.h index 9fdc115be5a..8a4fbd55ac1 100644 --- a/gcc/config/rs6000/darwin-unwind.h +++ b/libgcc/config/rs6000/darwin-unwind.h @@ -1,5 +1,5 @@ -/* DWARF2 EH unwinding support for Darwin. - Copyright (C) 2004, 2009 Free Software Foundation, Inc. +/* DWARF2 EH unwinding support for 32-bit PowerPC Darwin. + Copyright (C) 2004, 2009, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -22,9 +22,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef __LP64__ + extern bool _Unwind_fallback_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs); #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS) \ (_Unwind_fallback_frame_state_for (CONTEXT, FS) \ ? _URC_NO_REASON : _URC_END_OF_STACK) + +#endif diff --git a/gcc/config/rs6000/linux-unwind.h b/libgcc/config/rs6000/linux-unwind.h index a16df97e97e..a16df97e97e 100644 --- a/gcc/config/rs6000/linux-unwind.h +++ b/libgcc/config/rs6000/linux-unwind.h diff --git a/gcc/config/s390/linux-unwind.h b/libgcc/config/s390/linux-unwind.h index 558087fad94..558087fad94 100644 --- a/gcc/config/s390/linux-unwind.h +++ b/libgcc/config/s390/linux-unwind.h diff --git a/libgcc/config/s390/t-tpf b/libgcc/config/s390/t-tpf index 7890d27297e..2110c688d5f 100644 --- a/libgcc/config/s390/t-tpf +++ b/libgcc/config/s390/t-tpf @@ -5,4 +5,3 @@ HOST_LIBGCC2_CFLAGS += -fPIC LIB2ADDEH = $(gcc_srcdir)/unwind-dw2.c $(gcc_srcdir)/unwind-dw2-fde-glibc.c \ $(gcc_srcdir)/unwind-sjlj.c $(gcc_srcdir)/unwind-c.c \ $(gcc_srcdir)/emutls.c -LIB2ADDEHDEP = unwind.inc unwind-dw2-fde.h diff --git a/gcc/config/s390/tpf-unwind.h b/libgcc/config/s390/tpf-unwind.h index 33fd5f5c8c5..33fd5f5c8c5 100644 --- a/gcc/config/s390/tpf-unwind.h +++ b/libgcc/config/s390/tpf-unwind.h diff --git a/gcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h index 94ed95d55e1..94ed95d55e1 100644 --- a/gcc/config/sh/linux-unwind.h +++ b/libgcc/config/sh/linux-unwind.h diff --git a/gcc/config/sparc/linux-unwind.h b/libgcc/config/sparc/linux-unwind.h index adfef6ec29d..adfef6ec29d 100644 --- a/gcc/config/sparc/linux-unwind.h +++ b/libgcc/config/sparc/linux-unwind.h diff --git a/gcc/config/sparc/sol2-c1.asm b/libgcc/config/sparc/sol2-c1.S index 63aa748e879..63aa748e879 100644 --- a/gcc/config/sparc/sol2-c1.asm +++ b/libgcc/config/sparc/sol2-c1.S diff --git a/gcc/config/sparc/sol2-ci.asm b/libgcc/config/sparc/sol2-ci.S index 8825f795834..8825f795834 100644 --- a/gcc/config/sparc/sol2-ci.asm +++ b/libgcc/config/sparc/sol2-ci.S diff --git a/gcc/config/sparc/sol2-cn.asm b/libgcc/config/sparc/sol2-cn.S index b92f3cf08d6..b92f3cf08d6 100644 --- a/gcc/config/sparc/sol2-cn.asm +++ b/libgcc/config/sparc/sol2-cn.S diff --git a/gcc/config/sparc/sol2-unwind.h b/libgcc/config/sparc/sol2-unwind.h index f8b99027247..f8b99027247 100644 --- a/gcc/config/sparc/sol2-unwind.h +++ b/libgcc/config/sparc/sol2-unwind.h diff --git a/libgcc/config/sparc/t-crtfm b/libgcc/config/sparc/t-crtfm deleted file mode 100644 index d6d616f1713..00000000000 --- a/libgcc/config/sparc/t-crtfm +++ /dev/null @@ -1,2 +0,0 @@ -crtfastmath.o: $(gcc_srcdir)/config/sparc/crtfastmath.c - $(gcc_compile) -c $(gcc_srcdir)/config/sparc/crtfastmath.c diff --git a/libgcc/config/sparc/t-softfp b/libgcc/config/sparc/t-softfp new file mode 100644 index 00000000000..94dfcfae0a1 --- /dev/null +++ b/libgcc/config/sparc/t-softfp @@ -0,0 +1,29 @@ +# Copyright (C) 2010, 2011 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 3, 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 COPYING3. If not see +# <http://www.gnu.org/licenses/>. + +# We want fine grained libraries, so use the new code to build the +# floating point emulation libraries. +FPBIT = fp-bit.c +DPBIT = dp-bit.c + +$(gcc_objdir)/dp-bit.c: $(gcc_srcdir)/config/fp-bit.c + cat $< > $@ + +$(gcc_objdir)/fp-bit.c: $(gcc_srcdir)/config/fp-bit.c + echo '#define FLOAT' > $@ + cat $< >> $@ diff --git a/libgcc/config/sparc/t-softmul b/libgcc/config/sparc/t-softmul new file mode 100644 index 00000000000..49faae47c53 --- /dev/null +++ b/libgcc/config/sparc/t-softmul @@ -0,0 +1,2 @@ +LIB1ASMSRC = sparc/lb1spc.asm +LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 diff --git a/libgcc/config/sparc/t-sol2 b/libgcc/config/sparc/t-sol2 new file mode 100644 index 00000000000..372522bd0e4 --- /dev/null +++ b/libgcc/config/sparc/t-sol2 @@ -0,0 +1,6 @@ +# We need to use -fPIC when we are using gcc to compile the routines in +# crtstuff.c. This is only really needed when we are going to use gcc/g++ +# to produce a shared library, but since we don't know ahead of time when +# we will be doing that, we just always use -fPIC when compiling the +# routines in crtstuff.c. +CRTSTUFF_T_CFLAGS = -fPIC diff --git a/libgcc/config/t-crtfm b/libgcc/config/t-crtfm new file mode 100644 index 00000000000..6b9d84cf768 --- /dev/null +++ b/libgcc/config/t-crtfm @@ -0,0 +1,2 @@ +crtfastmath.o: $(gcc_srcdir)/config/$(cpu_type)/crtfastmath.c + $(gcc_compile) -c $< diff --git a/libgcc/config/t-crtin b/libgcc/config/t-crtin new file mode 100644 index 00000000000..b30e0d52e2f --- /dev/null +++ b/libgcc/config/t-crtin @@ -0,0 +1,4 @@ +crti.o: $(srcdir)/config/$(cpu_type)/sol2-ci.S + $(crt_compile) -c $< +crtn.o: $(srcdir)/config/$(cpu_type)/sol2-cn.S + $(crt_compile) -c $< diff --git a/libgcc/config/t-rtems b/libgcc/config/t-rtems new file mode 100644 index 00000000000..85e931e60f6 --- /dev/null +++ b/libgcc/config/t-rtems @@ -0,0 +1,4 @@ +# If we are building next to newlib, this will let us find the RTEMS +# limits.h when building libgcc2. Otherwise, newlib must be installed +# first. +HOST_LIBGCC2_CFLAGS = -I$(srcdir)/../newlib/libc/sys/rtems/include diff --git a/gcc/config/mips/t-slibgcc-irix b/libgcc/config/t-slibgcc index e9f168e49d2..0b5cc4bfc50 100644 --- a/gcc/config/mips/t-slibgcc-irix +++ b/libgcc/config/t-slibgcc @@ -1,4 +1,5 @@ -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2011 +# Free Software Foundation, Inc. # # This file is part of GCC. # @@ -27,9 +28,12 @@ SHLIB_OBJS = @shlib_objs@ SHLIB_DIR = @multilib_dir@ SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ SHLIB_LC = -lc +SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) +SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) -SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ - -Wl,-soname,$(SHLIB_SONAME) \ +SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ + $(SHLIB_LDFLAGS) \ -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \ $(SHLIB_OBJS) $(SHLIB_LC) && \ rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ @@ -38,15 +42,10 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ $(SHLIB_DIR)/$(SHLIB_SONAME).backup; \ else true; fi && \ mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \ - $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) -# $(slibdir) double quoted to protect it from expansion while building -# libgcc.mk. We want this delayed until actual install time. + $(SHLIB_MAKE_SOLINK) SHLIB_INSTALL = \ - $$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \ + $(mkinstalldirs) $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL); \ $(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \ - $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \ - rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \ - $(LN_S) $(SHLIB_SONAME) \ - $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) -SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk -SHLIB_MAPFILES = $$(libgcc_objdir)/libgcc-std.ver + $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \ + rm -f $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \ + $(SHLIB_INSTALL_SOLINK) diff --git a/libgcc/config/t-slibgcc-elf-ver b/libgcc/config/t-slibgcc-elf-ver new file mode 100644 index 00000000000..2616d31cae5 --- /dev/null +++ b/libgcc/config/t-slibgcc-elf-ver @@ -0,0 +1,4 @@ +# Build a shared libgcc library for ELF with symbol versioning. + +SHLIB_MKMAP = $(gcc_srcdir)/mkmap-symver.awk +SHLIB_MAPFILES = libgcc-std.ver diff --git a/libgcc/config/t-slibgcc-gld b/libgcc/config/t-slibgcc-gld new file mode 100644 index 00000000000..7e77e0a0b27 --- /dev/null +++ b/libgcc/config/t-slibgcc-gld @@ -0,0 +1,5 @@ +# Build a shared libgcc library for ELF with symbol versioning +# with the GNU linker. + +SHLIB_LDFLAGS = -Wl,--soname=$(SHLIB_SONAME) \ + -Wl,--version-script=$(SHLIB_MAP) diff --git a/libgcc/config/t-slibgcc-sld b/libgcc/config/t-slibgcc-sld new file mode 100644 index 00000000000..178700047cc --- /dev/null +++ b/libgcc/config/t-slibgcc-sld @@ -0,0 +1,5 @@ +# Build a shared libgcc library for ELF with symbol versioning +# with the Solaris linker. + +SHLIB_LDFLAGS = -Wl,-h,$(SHLIB_SONAME) -Wl,-z,text -Wl,-z,defs \ + -Wl,-M,$(SHLIB_MAP) diff --git a/libgcc/config/t-sol2 b/libgcc/config/t-sol2 new file mode 100644 index 00000000000..e55c64f646d --- /dev/null +++ b/libgcc/config/t-sol2 @@ -0,0 +1,34 @@ +# Copyright (C) 2004, 2008, 2009, 2010, 2011 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 3, 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 COPYING3. If not see +# <http://www.gnu.org/licenses/>. + +# Use unwind-dw2-fde-glibc.c. Unless linker support and dl_iterate_phdr +# are present, automatically falls back to unwind-dw2-fde.c. +LIB2ADDEH = $(gcc_srcdir)/unwind-dw2.c $(gcc_srcdir)/unwind-dw2-fde-glibc.c \ + $(gcc_srcdir)/unwind-sjlj.c $(gcc_srcdir)/unwind-c.c $(gcc_srcdir)/emutls.c + +# gmon build rule: +gmon.o: $(srcdir)/config/gmon-sol2.c + $(gcc_compile) -c $< + +# Assemble startup files. +crt1.o: $(srcdir)/config/$(cpu_type)/sol2-c1.S + $(crt_compile) -c $< +gcrt1.o: $(srcdir)/config/$(cpu_type)/sol2-c1.S + $(crt_compile) -c -DGCRT1 $< + +HOST_LIBGCC2_CFLAGS = -fPIC diff --git a/gcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h index 32e93497287..32e93497287 100644 --- a/gcc/config/xtensa/linux-unwind.h +++ b/libgcc/config/xtensa/linux-unwind.h diff --git a/libgcc/configure b/libgcc/configure index 8a27aab1886..1a3a0bde258 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -555,6 +555,7 @@ ac_subst_vars='LTLIBOBJS LIBOBJS asm_hidden_op extra_parts +cpu_type tmake_file set_use_emutls set_have_cc_tls @@ -3742,6 +3743,29 @@ $as_echo "$libgcc_cv_fixed_point" >&6; } fixed_point=$libgcc_cv_fixed_point +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } +if test "${acl_cv_prog_gnu_ld+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then + acl_cv_prog_gnu_ld=yes +else + acl_cv_prog_gnu_ld=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 +$as_echo "$acl_cv_prog_gnu_ld" >&6; } +with_gnu_ld=$acl_cv_prog_gnu_ld + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread model used by GCC" >&5 +$as_echo_n "checking for thread model used by GCC... " >&6; } +target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_thread_file" >&5 +$as_echo "$target_thread_file" >&6; } + # Check for assembler CFI support. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports CFI directives" >&5 $as_echo_n "checking whether assembler supports CFI directives... " >&6; } @@ -3938,6 +3962,9 @@ tmake_file="${tmake_file_}" +ac_config_links="$ac_config_links md-unwind-support.h:config/$md_unwind_header" + + # We need multilib support. ac_config_files="$ac_config_files Makefile" @@ -4507,6 +4534,7 @@ esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" +config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF @@ -4531,6 +4559,9 @@ Usage: $0 [OPTION]... [TAG]... Configuration files: $config_files +Configuration links: +$config_links + Configuration commands: $config_commands @@ -4658,6 +4689,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in + "md-unwind-support.h") CONFIG_LINKS="$CONFIG_LINKS md-unwind-support.h:config/$md_unwind_header" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; @@ -4672,6 +4704,7 @@ done # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi @@ -4851,7 +4884,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +eval set X " :F $CONFIG_FILES :L $CONFIG_LINKS :C $CONFIG_COMMANDS" shift for ac_tag do @@ -5064,7 +5097,38 @@ which seems to be undefined. Please make sure it is defined." >&2;} || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + :L) + # + # CONFIG_LINK + # + + if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then + : + else + # Prefer the file from the source tree if names are identical. + if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then + ac_source=$srcdir/$ac_source + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 +$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} + if test ! -r "$ac_source"; then + as_fn_error "$ac_source: file not found" "$LINENO" 5 + fi + rm -f "$ac_file" + + # Try a relative symlink, then a hard link, then a copy. + case $srcdir in + [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; + *) ac_rel_source=$ac_top_build_prefix$ac_source ;; + esac + ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || + ln "$ac_source" "$ac_file" 2>/dev/null || + cp -p "$ac_source" "$ac_file" || + as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 + fi + ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 7dbe114e394..f2bcabf4872 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -4,6 +4,7 @@ sinclude(../config/enable.m4) sinclude(../config/tls.m4) sinclude(../config/acx.m4) sinclude(../config/no-executables.m4) +sinclude(../config/lib-ld.m4) sinclude(../config/override.m4) sinclude(../config/dfp.m4) @@ -166,6 +167,12 @@ AC_CACHE_CHECK([whether fixed-point is supported], [libgcc_cv_fixed_point], fixed_point=$libgcc_cv_fixed_point AC_SUBST(fixed_point) +AC_LIB_PROG_LD_GNU + +AC_MSG_CHECKING([for thread model used by GCC]) +target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` +AC_MSG_RESULT([$target_thread_file]) + # Check for assembler CFI support. AC_CACHE_CHECK([whether assembler supports CFI directives], [libgcc_cv_cfi], [AC_COMPILE_IFELSE( @@ -268,8 +275,10 @@ tmake_file="${tmake_file_}" AC_SUBST(tmake_file) # Substitute configuration variables +AC_SUBST(cpu_type) AC_SUBST(extra_parts) AC_SUBST(asm_hidden_op) +AC_CONFIG_LINKS([md-unwind-support.h:config/$md_unwind_header]) # We need multilib support. AC_CONFIG_FILES([Makefile]) diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 90929219d8c..5a22cd32bc7 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2011-06-03 Richard Henderson <rth@redhat.com> + Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config/fpu-387.h [__sun__ && __svr4__] (sigill_hdlr): Correct + insn, insn size. + (has_sse) [!__x86_64__ && __sun__ && __svr4__]: Use movaps. + 2011-05-29 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/48931 diff --git a/libgfortran/config/fpu-387.h b/libgfortran/config/fpu-387.h index c3e57cba39b..8bf55b28a61 100644 --- a/libgfortran/config/fpu-387.h +++ b/libgfortran/config/fpu-387.h @@ -1,5 +1,5 @@ /* FPU-related code for x86 and x86_64 processors. - Copyright 2005, 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright 2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Francois-Xavier Coudert <coudert@clipper.ens.fr> This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -40,9 +40,9 @@ sigill_hdlr (int sig __attribute((unused)), { sigill_caught = 1; /* Set PC to the instruction after the faulting one to skip over it, - otherwise we enter an infinite loop. 4 is the size of the stmxcsr + otherwise we enter an infinite loop. 3 is the size of the movaps instruction. */ - ucp->uc_mcontext.gregs[EIP] += 4; + ucp->uc_mcontext.gregs[EIP] += 3; setcontext (ucp); } #endif @@ -73,7 +73,7 @@ has_sse (void) /* We need a single SSE instruction here so the handler can safely skip over it. */ - __asm__ volatile ("movss %xmm2,%xmm1"); + __asm__ volatile ("movaps %xmm0,%xmm0"); sigaction (SIGILL, &oact, NULL); diff --git a/libgo/go/os/stat.go b/libgo/go/os/stat.go index d6c7a54ed83..8eb4ab4391d 100644 --- a/libgo/go/os/stat.go +++ b/libgo/go/os/stat.go @@ -25,7 +25,7 @@ func fileInfoFromStat(name string, fi *FileInfo, lstat, stat *syscall.Stat_t) *F fi.Blocks = int64(stat.Blocks) fi.Atime_ns = int64(stat.Atime.Sec)*1e9 + int64(stat.Atime.Nsec) fi.Mtime_ns = int64(stat.Mtime.Sec)*1e9 + int64(stat.Mtime.Nsec) - fi.Ctime_ns = int64(stat.Ctime.Sec)*1e9 + int64(stat.Atime.Nsec) + fi.Ctime_ns = int64(stat.Ctime.Sec)*1e9 + int64(stat.Ctime.Nsec) for i := len(name)-1; i >= 0; i-- { if name[i] == '/' { name = name[i+1:] diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh index 19885fb000d..a837cbaed71 100755 --- a/libgo/mksysinfo.sh +++ b/libgo/mksysinfo.sh @@ -358,6 +358,7 @@ fi | sed -e 's/type _stat64/type Stat_t/' \ -e 's/\([^a-zA-Z0-9_]\)_timespec_t\([^a-zA-Z0-9_]\)/\1Timespec\2/g' \ -e 's/\([^a-zA-Z0-9_]\)_timespec\([^a-zA-Z0-9_]\)/\1Timespec\2/g' \ -e 's/\([^a-zA-Z0-9_]\)_timestruc_t\([^a-zA-Z0-9_]\)/\1Timestruc\2/g' \ + -e 's/Godump_[0-9] struct { \([^;]*;\) };/\1/g' \ >> ${OUT} # The directory searching types. diff --git a/libgo/syscalls/syscall_linux_alpha.go b/libgo/syscalls/syscall_linux_alpha.go index 35259b27fe7..d58f8eb13a5 100644 --- a/libgo/syscalls/syscall_linux_alpha.go +++ b/libgo/syscalls/syscall_linux_alpha.go @@ -6,6 +6,38 @@ package syscall +type PtraceRegs struct { + R0 uint64 + R1 uint64 + R2 uint64 + R3 uint64 + R4 uint64 + R5 uint64 + R6 uint64 + R7 uint64 + R8 uint64 + R19 uint64 + R20 uint64 + R21 uint64 + R22 uint64 + R23 uint64 + R24 uint64 + R25 uint64 + R26 uint64 + R27 uint64 + R28 uint64 + Hae uint64 + Trap_a0 uint64 + Trap_a1 uint64 + Trap_a2 uint64 + Ps uint64 + Pc uint64 + Gp uint64 + R16 uint64 + R17 uint64 + R18 uint64 +} + func (r *PtraceRegs) PC() uint64 { return r.Pc; } diff --git a/libjava/ChangeLog b/libjava/ChangeLog index c0b2fa7c323..4ca6cf4c4e0 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,14 @@ +2011-05-31 H.J. Lu <hongjiu.lu@intel.com> + + PR libgcj/49193 + * configure.host (sysdeps_dir): Set to i386 for x86_64. + + * sysdep/i386/locks.h (compare_and_swap): Call + __sync_bool_compare_and_swap. + (release_set): Call write_barrier (). + + * sysdep/x86-64/locks.h: Removed. + 2011-04-24 Gerald Pfeifer <gerald@pfeifer.com> * README: Refer to our generic bug reporting page. diff --git a/libjava/configure.host b/libjava/configure.host index 5b8847803b3..9d4f2b6a1db 100644 --- a/libjava/configure.host +++ b/libjava/configure.host @@ -132,7 +132,7 @@ case "${host}" in slow_pthread_self=yes ;; x86_64-*) - sysdeps_dir=x86-64 + sysdeps_dir=i386 # For 64-bit we always use SSE registers for arithmetic, # which doesn't have the extra precision problems of the fpu. # But be careful about 32-bit multilibs. @@ -279,7 +279,7 @@ EOF slow_pthread_self= ;; i[34567]86-*-solaris2.1[0-9]* ) - sysdeps_dir=x86-64 + sysdeps_dir=i386 DIVIDESPEC=-f%{m32:no-}%{!m32:%{!m64:no-}}%{m64:}use-divide-subroutine ;; mips-sgi-irix6* ) diff --git a/libjava/sysdep/i386/locks.h b/libjava/sysdep/i386/locks.h index 9d130b0f515..7b99f0bd781 100644 --- a/libjava/sysdep/i386/locks.h +++ b/libjava/sysdep/i386/locks.h @@ -1,6 +1,6 @@ /* locks.h - Thread synchronization primitives. X86/x86-64 implementation. - Copyright (C) 2002 Free Software Foundation + Copyright (C) 2002, 2011 Free Software Foundation This file is part of libgcj. @@ -23,19 +23,25 @@ compare_and_swap(volatile obj_addr_t *addr, obj_addr_t old, obj_addr_t new_val) { - char result; -#ifdef __x86_64__ - __asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1" - : "=m"(*(addr)), "=q"(result) - : "r" (new_val), "a"(old), "m"(*addr) - : "memory"); -#else - __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" - : "=m"(*addr), "=q"(result) - : "r" (new_val), "a"(old), "m"(*addr) - : "memory"); -#endif - return (bool) result; + return __sync_bool_compare_and_swap (addr, old, new_val); +} + +// Ensure that subsequent instructions do not execute on stale +// data that was loaded from memory before the barrier. +// On X86/x86-64, the hardware ensures that reads are properly ordered. +inline static void +read_barrier() +{ +} + +// Ensure that prior stores to memory are completed with respect to other +// processors. +inline static void +write_barrier() +{ + /* x86-64/X86 does not reorder writes. We just need to ensure that + gcc also doesn't. */ + __asm__ __volatile__(" " : : : "memory"); } // Set *addr to new_val with release semantics, i.e. making sure @@ -46,7 +52,7 @@ compare_and_swap(volatile obj_addr_t *addr, inline static void release_set(volatile obj_addr_t *addr, obj_addr_t new_val) { - __asm__ __volatile__(" " : : : "memory"); + write_barrier (); *(addr) = new_val; } @@ -60,22 +66,4 @@ compare_and_swap_release(volatile obj_addr_t *addr, { return compare_and_swap(addr, old, new_val); } - -// Ensure that subsequent instructions do not execute on stale -// data that was loaded from memory before the barrier. -// On X86/x86-64, the hardware ensures that reads are properly ordered. -inline static void -read_barrier() -{ -} - -// Ensure that prior stores to memory are completed with respect to other -// processors. -inline static void -write_barrier() -{ - /* x86-64/X86 does not reorder writes. We just need to ensure that - gcc also doesn't. */ - __asm__ __volatile__(" " : : : "memory"); -} #endif diff --git a/libjava/sysdep/x86-64/locks.h b/libjava/sysdep/x86-64/locks.h deleted file mode 100644 index fdc0a3efb82..00000000000 --- a/libjava/sysdep/x86-64/locks.h +++ /dev/null @@ -1,83 +0,0 @@ -/* locks.h - Thread synchronization primitives. X86/x86-64 implementation. - - Copyright (C) 2002 Free Software Foundation - - Contributed by Bo Thorsen <bo@suse.de>. - - This file is part of libgcj. - -This software is copyrighted work licensed under the terms of the -Libgcj License. Please consult the file "LIBGCJ_LICENSE" for -details. */ - -#ifndef __SYSDEP_LOCKS_H__ -#define __SYSDEP_LOCKS_H__ - -typedef size_t obj_addr_t; /* Integer type big enough for object */ - /* address. */ - -// Atomically replace *addr by new_val if it was initially equal to old. -// Return true if the comparison succeeded. -// Assumed to have acquire semantics, i.e. later memory operations -// cannot execute before the compare_and_swap finishes. -inline static bool -compare_and_swap(volatile obj_addr_t *addr, - obj_addr_t old, - obj_addr_t new_val) -{ - char result; -#ifdef __x86_64__ - __asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1" - : "=m"(*(addr)), "=q"(result) - : "r" (new_val), "a"(old), "m"(*addr) - : "memory"); -#else - __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" - : "=m"(*addr), "=q"(result) - : "r" (new_val), "a"(old), "m"(*addr) - : "memory"); -#endif - return (bool) result; -} - -// Set *addr to new_val with release semantics, i.e. making sure -// that prior loads and stores complete before this -// assignment. -// On X86/x86-64, the hardware shouldn't reorder reads and writes, -// so we just have to convince gcc not to do it either. -inline static void -release_set(volatile obj_addr_t *addr, obj_addr_t new_val) -{ - __asm__ __volatile__(" " : : : "memory"); - *(addr) = new_val; -} - -// Compare_and_swap with release semantics instead of acquire semantics. -// On many architecture, the operation makes both guarantees, so the -// implementation can be the same. -inline static bool -compare_and_swap_release(volatile obj_addr_t *addr, - obj_addr_t old, - obj_addr_t new_val) -{ - return compare_and_swap(addr, old, new_val); -} - -// Ensure that subsequent instructions do not execute on stale -// data that was loaded from memory before the barrier. -// On X86/x86-64, the hardware ensures that reads are properly ordered. -inline static void -read_barrier() -{ -} - -// Ensure that prior stores to memory are completed with respect to other -// processors. -inline static void -write_barrier() -{ - /* x86-64/X86 does not reorder writes. We just need to ensure that - gcc also doesn't. */ - __asm__ __volatile__(" " : : : "memory"); -} -#endif diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index 00cf2ac7b8a..03441de2062 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,136 @@ +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * Makefile.in (OBJC_DEPRECATED_H): Removed struct_objc_static_instances.h + and objc_get_uninstalled_dtable.h. + * objc/deprecated/struct_objc_static_instances.h: Removed. + * objc/deprecated/objc_get_uninstalled_dtable.h: Removed. + * objc/objc-api.h: Do not include deprecated/objc_static_instances.h + and deprecated/objc_get_uninstalled_dtable.h. + +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * Makefile.in (OBJC_DEPRECATED_H): Removed objc_object_alloc.h. + * objc/deprecated/objc_object_alloc.h: Removed. + * objc/objc-api.h: Do not include deprecated/objc_object_alloc.h. + * objects.c (_objc_object_alloc, _objc_object_dispose, + _objc_object_copy): Removed. + * libobjc.def (__objc_object_alloc, __objc_object_copy, + __objc_object_dispose): Removed. + +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * Makefile.in (OBJC_DEPRECATED_H): Removed METHOD_NULL.h. + * objc/objc-api.h: Do not include deprecated/METHOD_NULL.h. + * objc/deprecated/METHOD_NULL.h: Removed. + +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * Makefile.in (OBJC_DEPRECATED_H): Removed objc_valloc.h, + objc_malloc.h and objc_unexpected_exception.h. + (exception.lo): Do not use -Wno-deprecated-declarations. + (exception_gc.lo): Likewise. + * objc/objc-api.h: Do not include deprecated/objc_valloc.h, + deprecated/objc_malloc.h and + deprecated/objc_unexpected_exception.h. + * objc/deprecated/objc_valloc.h: Removed. + * objc/deprecated/objc_malloc.h: Removed. + * objc/deprecated/objc_unexpected_exception.h: Removed. + * exception.c (_objc_unexpected_exception): Removed. + (objc_exception_throw): Do not check for + _objc_unexpected_exception. + * memory.c (objc_valloc, _objc_malloc, _objc_atomic_malloc, + _objc_valloc, _objc_realloc, _objc_calloc, _objc_free): Removed. + * libobjc.def (_objc_unexpected_exception, objc_valloc): Removed. + +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * objc/objc.h: Do not include deprecated/STR.h. + * objc/deprecated/STR.h: Removed. + * Makefile.in (OBJC_DEPRECATED_H): removed STR.h. + +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * Makefile.in (OBJC_H): Removed hash.h and sarray.h. + (OBJC_DEPRECATED_H): Likewise. + * libobjc.def (objc_hash_new, objc_hash_delete, objc_hash_add, + objc_hash_remove, objc_hash_next, objc_hash_value_for_key, + objc_hash_is_key_in_hash, hash_add, hash_delete, hash_new, + hash_next, hash_remove, hash_value_for_key, hash_is_key_in_hash, + sarray_at_put, sarray_at_put_safe, sarray_free, sarray_lazy_copy, + sarray_new, sarray_realloc, sarray_remove_garbage): Removed. + * objc/sarray.h: Removed. + * objc/hash.h: Removed. + * objc/deprecated/sarray.h: Removed. + * objc/deprecated/hash.h: Removed. + * objc/Object.h: Do not include objc/deprecated/hash.h + * Object.m: Include string.h. + * objc/objc-api.h: Do not include objc/deprecated/hash.h. + * objc-private/common.h (GNU_LIBOBJC_COMPILING_LIBOBJC_ITSELF): + Removed. + +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * Object.m ([-forward::]): Removed. + * objc/deprecated/Object.h ([-forward::]): Removed. + * sendmsg.c (__objc_forward): Updated comments. + +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * Makefile.in (OBJC_H): Removed objc-list.h. + (OBJC_DEPRECATED_H): Removed objc-list.h. + * objc/objc-list.h: File removed. + * objc/deprecated/objc-list.h: File removed. + +2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com> + + * Makefile.in (OBJC_H): Removed typedstream.h. + (OBJC_DEPRECATED_H): Removed typedstream.h. + (C_SOURCE_FILES): Removed archive.c. + (Object.lo): Rule removed. + (Object_gc.lo): Likewise. + (archive.lo): Likewise. + (archive_gc.lo): Likewise. + * objc/deprecated/Object.h ([+streamVersion:], [-read], [-write], + [-awake]): Removed. + Do not include deprecated/typedstream.h. + * Object.m: Removed the same methods. + * archive.c: File removed. + * objc/typedstream.h: File removed. + * objc/deprecated/typedstream.h: File removed. + * libobjc.def (__objc_read_nbyte_uint, __objc_read_nbyte_ulong, + __objc_write_class, __objc_write_object, __objc_write_selector, + objc_close_typed_stream, objc_end_of_typed_stream, + objc_flush_typed_stream, objc_get_stream_class_version, + objc_open_typed_stream, objc_open_typed_stream_for_file, + objc_read_array, objc_read_char, objc_read_int, objc_read_long, + objc_read_object, objc_read_selector, objc_read_short, + objc_read_string, objc_read_type, objc_read_types, + objc_read_unsigned_char, objc_read_unsigned_int, + objc_read_unsigned_long, objc_read_unsigned_short, + objc_write_array, objc_write_char, objc_write_int, + objc_write_long, objc_write_object, objc_write_object_reference, + objc_write_root_object, objc_write_selector, objc_write_short, + objc_write_string, objc_write_string_atomic, objc_write_type, + objc_write_types, objc_write_unsigned_char, + objc_write_unsigned_int, objc_write_unsigned_long, + objc_write_unsigned_short): Removed. + +2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com> + + * Makefile.in (OBJC_DEPRECATED_H): Removed objc_error.h. + * objc/deprecated/objc_error.h: Removed. + * objc/objc-api.h: Do not include deprecated/objc_error.h. + * libobjc.def (objc_error, objc_verror): Removed. + * error.c (_objc_error_handler, objc_error, objc_verror, + objc_set_error_handler): Removed. + * Object.m ([-error:], [-perform:], [-perform:with:], + [-perform:with:with], [-subclassResponsibility:], + [-notImplemented:], [-shouldNotImplement:], [-doesNotRecognize:]): + Removed. + * objc/deprecated/Object.h: Removed the same methods. + * sendmsg.c (__objc_forward): Do not try to invoke the "error:" + method after trying to invoke the "doesNotRecognize:" method. + 2011-05-26 Nicola Pero <nicola.pero@meta-innovation.com> * sendmsg.c: Reindented part of the file. No non-trivial changes diff --git a/libobjc/Makefile.in b/libobjc/Makefile.in index e52f441d47a..baadc897a2e 100644 --- a/libobjc/Makefile.in +++ b/libobjc/Makefile.in @@ -122,31 +122,15 @@ OBJC_H = \ objc-api.h \ objc-decls.h \ runtime.h \ - thr.h \ - \ - hash.h \ - objc-list.h \ - sarray.h \ - typedstream.h + thr.h # User-visible header files containing deprecated APIs, from the # objc/deprecated directory OBJC_DEPRECATED_H = \ - METHOD_NULL.h \ MetaClass.h \ Object.h \ Protocol.h \ - STR.h \ - hash.h \ - objc-list.h \ - objc_error.h \ - objc_get_uninstalled_dtable.h \ - objc_malloc.h \ objc_msg_sendv.h \ - objc_object_alloc.h \ - objc_unexpected_exception.h \ - objc_valloc.h \ - sarray.h \ struct_objc_category.h \ struct_objc_class.h \ struct_objc_ivar.h \ @@ -157,9 +141,7 @@ OBJC_DEPRECATED_H = \ struct_objc_protocol.h \ struct_objc_protocol_list.h \ struct_objc_selector.h \ - struct_objc_static_instances.h \ - struct_objc_symtab.h \ - typedstream.h + struct_objc_symtab.h # Objective-C source files to compile OBJC_SOURCE_FILES = \ @@ -171,7 +153,6 @@ OBJC_SOURCE_FILES = \ # C source files to compile C_SOURCE_FILES = \ - archive.c \ class.c \ encoding.c \ error.c \ @@ -279,38 +260,15 @@ sendmsg_gc.lo: sendmsg.c runtime-info.h # These files have separate rules because they require special # compiler flags. -archive.lo: archive.c - $(LIBTOOL_COMPILE) $(CC) $< -c \ - $(ALL_CFLAGS) $(INCLUDES) -Wno-deprecated-declarations \ - -o $@ - -archive_gc.lo: archive.c - $(LIBTOOL_COMPILE) $(CC) $< -c \ - $(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) -Wno-deprecated-declarations \ - -o $@ - -# -Wno-deprecated-declarations is for the objc/typedstream.h functions. -Object.lo: Object.m - $(LIBTOOL_COMPILE) $(CC) $< -c \ - $(ALL_CFLAGS) $(INCLUDES) -fgnu-runtime -Wno-deprecated-declarations \ - -o $@ - -# -Wno-deprecated-declarations is for the objc/typedstream.h functions. -Object_gc.lo: Object.m - $(LIBTOOL_COMPILE) $(CC) $< -c \ - $(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) -fgnu-runtime -Wno-deprecated-declarations \ - -o $@ -# -Wno-deprecated-declarations is to silence warnings from using -# _objc_unexpected_exception. exception.lo: exception.c $(LIBTOOL_COMPILE) $(CC) $< -c \ - $(ALL_CFLAGS) $(INCLUDES) -fexceptions -Wno-deprecated-declarations \ + $(ALL_CFLAGS) $(INCLUDES) -fexceptions \ -o $@ exception_gc.lo: exception.c $(LIBTOOL_COMPILE) $(CC) $< -c \ - $(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) -fexceptions -Wno-deprecated-declarations \ + $(ALL_CFLAGS) $(INCLUDES) $(OBJC_GCFLAGS) -fexceptions \ -o $@ doc: info dvi pdf html diff --git a/libobjc/Object.m b/libobjc/Object.m index 224c0aa66bc..9781fad1d7f 100644 --- a/libobjc/Object.m +++ b/libobjc/Object.m @@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "objc-private/common.h" #include <stdarg.h> +#include <string.h> /* For strcmp. */ #include <errno.h> #include "objc/Object.h" #include "objc/Protocol.h" @@ -248,36 +249,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see :class_get_class_method(self->isa, aSel))); } -- perform:(SEL)aSel -{ - IMP msg = objc_msg_lookup(self, aSel); - if (!msg) - return [self error:"invalid selector passed to %s", sel_get_name(_cmd)]; - return (*msg)(self, aSel); -} - -- perform:(SEL)aSel with:anObject -{ - IMP msg = objc_msg_lookup(self, aSel); - if (!msg) - return [self error:"invalid selector passed to %s", sel_get_name(_cmd)]; - return (*msg)(self, aSel, anObject); -} - -- perform:(SEL)aSel with:anObject1 with:anObject2 -{ - IMP msg = objc_msg_lookup(self, aSel); - if (!msg) - return [self error:"invalid selector passed to %s", sel_get_name(_cmd)]; - return (*msg)(self, aSel, anObject1, anObject2); -} - -- (retval_t)forward:(SEL)aSel :(arglist_t)argFrame -{ - (void) argFrame; /* UNUSED */ - return (retval_t)[self doesNotRecognize: aSel]; -} - - (retval_t)performv:(SEL)aSel :(arglist_t)argFrame { return objc_msg_sendv(self, aSel, argFrame); @@ -302,45 +273,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see return nil; } -- subclassResponsibility:(SEL)aSel -{ - return [self error:"subclass should override %s", sel_get_name(aSel)]; -} - -- notImplemented:(SEL)aSel -{ - return [self error:"method %s not implemented", sel_get_name(aSel)]; -} - -- shouldNotImplement:(SEL)aSel -{ - return [self error:"%s should not implement %s", - object_get_class_name(self), sel_get_name(aSel)]; -} - -- doesNotRecognize:(SEL)aSel -{ - return [self error:"%s does not recognize %s", - object_get_class_name(self), sel_get_name(aSel)]; -} - -- error:(const char *)aString, ... -{ -#define FMT "error: %s (%s)\n%s\n" - char fmt[(strlen((char*)FMT)+strlen((char*)object_get_class_name(self)) - +((aString!=NULL)?strlen((char*)aString):0)+8)]; - va_list ap; - - sprintf(fmt, FMT, object_get_class_name(self), - object_is_instance(self)?"instance":"class", - (aString!=NULL)?aString:""); - va_start(ap, aString); - objc_verror(self, OBJC_ERR_UNKNOWN, fmt, ap); - va_end(ap); - return nil; -#undef FMT -} - + (int)version { return class_get_version(self); @@ -352,38 +284,4 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see return self; } -+ (int)streamVersion: (TypedStream*)aStream -{ - if (aStream->mode == OBJC_READONLY) - return objc_get_stream_class_version (aStream, self); - else - return class_get_version (self); -} - -// These are used to write or read the instance variables -// declared in this particular part of the object. Subclasses -// should extend these, by calling [super read/write: aStream] -// before doing their own archiving. These methods are private, in -// the sense that they should only be called from subclasses. - -- read: (TypedStream*)aStream -{ - (void) aStream; /* UNUSED */ - // [super read: aStream]; - return self; -} - -- write: (TypedStream*)aStream -{ - (void) aStream; /* UNUSED */ - // [super write: aStream]; - return self; -} - -- awake -{ - // [super awake]; - return self; -} - @end diff --git a/libobjc/archive.c b/libobjc/archive.c deleted file mode 100644 index f691b13b601..00000000000 --- a/libobjc/archive.c +++ /dev/null @@ -1,1656 +0,0 @@ - /* GNU Objective C Runtime archiving - Copyright (C) 1993, 1995, 1996, 1997, 2002, 2004, 2009, - 2010 Free Software Foundation, Inc. - Contributed by Kresten Krab Thorup - -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 3, 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - -/* This file is entirely deprecated and will be removed. */ - -#include "objc-private/common.h" -#include "objc-private/error.h" -#include "tconfig.h" -#include "objc/objc-api.h" -#include "objc/hash.h" -#include "objc/objc-list.h" -#include "objc-private/runtime.h" -#include "objc/typedstream.h" -#include "objc/encoding.h" -#include <stdlib.h> - -extern int fflush (FILE *); - -#define ROUND(V, A) \ - ({ typeof (V) __v = (V); typeof (A) __a = (A); \ - __a * ((__v + __a - 1)/__a); }) - -#define PTR2LONG(P) (((char *) (P))-(char *) 0) -#define LONG2PTR(L) (((char *) 0) + (L)) - -/* Declare some functions... */ - -static int -objc_read_class (struct objc_typed_stream *stream, Class *class); - -int objc_sizeof_type (const char *type); - -static int -objc_write_use_common (struct objc_typed_stream *stream, unsigned long key); - -static int -objc_write_register_common (struct objc_typed_stream *stream, - unsigned long key); - -static int -objc_write_class (struct objc_typed_stream *stream, - struct objc_class *class); - -const char *objc_skip_type (const char *type); - -static void __objc_finish_write_root_object (struct objc_typed_stream *); -static void __objc_finish_read_root_object (struct objc_typed_stream *); - -static inline int -__objc_code_unsigned_char (unsigned char *buf, unsigned char val) -{ - if ((val&_B_VALUE) == val) - { - buf[0] = val|_B_SINT; - return 1; - } - else - { - buf[0] = _B_NINT|0x01; - buf[1] = val; - return 2; - } -} - -int -objc_write_unsigned_char (struct objc_typed_stream *stream, - unsigned char value) -{ - unsigned char buf[sizeof (unsigned char) + 1]; - int len = __objc_code_unsigned_char (buf, value); - return (*stream->write) (stream->physical, (char*)buf, len); -} - -static inline int -__objc_code_char (unsigned char *buf, signed char val) -{ - if (val >= 0) - return __objc_code_unsigned_char (buf, val); - else - { - buf[0] = _B_NINT|_B_SIGN|0x01; - buf[1] = -val; - return 2; - } -} - -int -objc_write_char (struct objc_typed_stream *stream, signed char value) -{ - unsigned char buf[sizeof (char) + 1]; - int len = __objc_code_char (buf, value); - return (*stream->write) (stream->physical, (char*)buf, len); -} - -static inline int -__objc_code_unsigned_short (unsigned char *buf, unsigned short val) -{ - if ((val&_B_VALUE) == val) - { - buf[0] = val|_B_SINT; - return 1; - } - else - { - int c, b; - - buf[0] = _B_NINT; - - for (c = sizeof (short); c != 0; c -= 1) - if (((val >> (8*(c - 1)))%0x100) != 0) - break; - - buf[0] |= c; - - for (b = 1; c != 0; c--, b++) - { - buf[b] = (val >> (8*(c - 1)))%0x100; - } - - return b; - } -} - -int -objc_write_unsigned_short (struct objc_typed_stream *stream, - unsigned short value) -{ - unsigned char buf[sizeof (unsigned short) + 1]; - int len = __objc_code_unsigned_short (buf, value); - return (*stream->write) (stream->physical, (char*)buf, len); -} - -static inline int -__objc_code_short (unsigned char *buf, short val) -{ - int sign = (val < 0); - int size = __objc_code_unsigned_short (buf, sign ? -val : val); - if (sign) - buf[0] |= _B_SIGN; - return size; -} - -int -objc_write_short (struct objc_typed_stream *stream, short value) -{ - unsigned char buf[sizeof (short) + 1]; - int len = __objc_code_short (buf, value); - return (*stream->write) (stream->physical, (char*)buf, len); -} - - -static inline int -__objc_code_unsigned_int (unsigned char *buf, unsigned int val) -{ - if ((val&_B_VALUE) == val) - { - buf[0] = val|_B_SINT; - return 1; - } - else - { - int c, b; - - buf[0] = _B_NINT; - - for (c = sizeof (int); c != 0; c -= 1) - if (((val >> (8*(c - 1)))%0x100) != 0) - break; - - buf[0] |= c; - - for (b = 1; c != 0; c--, b++) - { - buf[b] = (val >> (8*(c-1)))%0x100; - } - - return b; - } -} - -int -objc_write_unsigned_int (struct objc_typed_stream *stream, unsigned int value) -{ - unsigned char buf[sizeof (unsigned int) + 1]; - int len = __objc_code_unsigned_int (buf, value); - return (*stream->write) (stream->physical, (char*)buf, len); -} - -static inline int -__objc_code_int (unsigned char *buf, int val) -{ - int sign = (val < 0); - int size = __objc_code_unsigned_int (buf, sign ? -val : val); - if (sign) - buf[0] |= _B_SIGN; - return size; -} - -int -objc_write_int (struct objc_typed_stream *stream, int value) -{ - unsigned char buf[sizeof (int) + 1]; - int len = __objc_code_int (buf, value); - return (*stream->write) (stream->physical, (char*)buf, len); -} - -static inline int -__objc_code_unsigned_long (unsigned char *buf, unsigned long val) -{ - if ((val&_B_VALUE) == val) - { - buf[0] = val|_B_SINT; - return 1; - } - else - { - int c, b; - - buf[0] = _B_NINT; - - for (c = sizeof (long); c != 0; c -= 1) - if (((val >> (8*(c - 1)))%0x100) != 0) - break; - - buf[0] |= c; - - for (b = 1; c != 0; c--, b++) - { - buf[b] = (val >> (8*(c - 1)))%0x100; - } - - return b; - } -} - -int -objc_write_unsigned_long (struct objc_typed_stream *stream, - unsigned long value) -{ - unsigned char buf[sizeof (unsigned long) + 1]; - int len = __objc_code_unsigned_long (buf, value); - return (*stream->write) (stream->physical, (char*)buf, len); -} - -static inline int -__objc_code_long (unsigned char *buf, long val) -{ - int sign = (val < 0); - int size = __objc_code_unsigned_long (buf, sign ? -val : val); - if (sign) - buf[0] |= _B_SIGN; - return size; -} - -int -objc_write_long (struct objc_typed_stream *stream, long value) -{ - unsigned char buf[sizeof (long) + 1]; - int len = __objc_code_long (buf, value); - return (*stream->write) (stream->physical, (char*)buf, len); -} - - -int -objc_write_string (struct objc_typed_stream *stream, - const unsigned char *string, unsigned int nbytes) -{ - unsigned char buf[sizeof (unsigned int) + 1]; - int len = __objc_code_unsigned_int (buf, nbytes); - - if ((buf[0]&_B_CODE) == _B_SINT) - buf[0] = (buf[0]&_B_VALUE)|_B_SSTR; - - else /* _B_NINT */ - buf[0] = (buf[0]&_B_VALUE)|_B_NSTR; - - if ((*stream->write) (stream->physical, (char*)buf, len) != 0) - return (*stream->write) (stream->physical, (char*)string, nbytes); - else - return 0; -} - -int -objc_write_string_atomic (struct objc_typed_stream *stream, - unsigned char *string, unsigned int nbytes) -{ - unsigned long key; - if ((key = PTR2LONG(objc_hash_value_for_key (stream->stream_table, string)))) - return objc_write_use_common (stream, key); - else - { - int length; - objc_hash_add (&stream->stream_table, - LONG2PTR(key=PTR2LONG(string)), string); - if ((length = objc_write_register_common (stream, key))) - return objc_write_string (stream, string, nbytes); - return length; - } -} - -static int -objc_write_register_common (struct objc_typed_stream *stream, - unsigned long key) -{ - unsigned char buf[sizeof (unsigned long)+2]; - int len = __objc_code_unsigned_long (buf + 1, key); - if (len == 1) - { - buf[0] = _B_RCOMM|0x01; - buf[1] &= _B_VALUE; - return (*stream->write) (stream->physical, (char*)buf, len + 1); - } - else - { - buf[1] = (buf[1]&_B_VALUE)|_B_RCOMM; - return (*stream->write) (stream->physical, (char*)buf + 1, len); - } -} - -static int -objc_write_use_common (struct objc_typed_stream *stream, unsigned long key) -{ - unsigned char buf[sizeof (unsigned long)+2]; - int len = __objc_code_unsigned_long (buf + 1, key); - if (len == 1) - { - buf[0] = _B_UCOMM|0x01; - buf[1] &= _B_VALUE; - return (*stream->write) (stream->physical, (char*)buf, 2); - } - else - { - buf[1] = (buf[1]&_B_VALUE)|_B_UCOMM; - return (*stream->write) (stream->physical, (char*)buf + 1, len); - } -} - -static inline int -__objc_write_extension (struct objc_typed_stream *stream, unsigned char code) -{ - if (code <= _B_VALUE) - { - unsigned char buf = code|_B_EXT; - return (*stream->write) (stream->physical, (char*)&buf, 1); - } - else - { - _objc_abort ("__objc_write_extension: bad opcode %c\n", code); - return -1; - } -} - -int -__objc_write_object (struct objc_typed_stream *stream, id object) -{ - unsigned char buf = '\0'; - SEL write_sel = sel_get_any_uid ("write:"); - if (object) - { - __objc_write_extension (stream, _BX_OBJECT); - objc_write_class (stream, object->class_pointer); - (*objc_msg_lookup (object, write_sel)) (object, write_sel, stream); - return (*stream->write) (stream->physical, (char*)&buf, 1); - } - else - return objc_write_use_common (stream, 0); -} - -int -objc_write_object_reference (struct objc_typed_stream *stream, id object) -{ - unsigned long key; - if ((key = PTR2LONG(objc_hash_value_for_key (stream->object_table, object)))) - return objc_write_use_common (stream, key); - - __objc_write_extension (stream, _BX_OBJREF); - return objc_write_unsigned_long (stream, PTR2LONG (object)); -} - -int -objc_write_root_object (struct objc_typed_stream *stream, id object) -{ - int len = 0; - if (stream->writing_root_p) - _objc_abort ("objc_write_root_object called recursively"); - else - { - stream->writing_root_p = 1; - __objc_write_extension (stream, _BX_OBJROOT); - if ((len = objc_write_object (stream, object))) - __objc_finish_write_root_object (stream); - stream->writing_root_p = 0; - } - return len; -} - -int -objc_write_object (struct objc_typed_stream *stream, id object) -{ - unsigned long key; - if ((key = PTR2LONG(objc_hash_value_for_key (stream->object_table, object)))) - return objc_write_use_common (stream, key); - - else if (object == nil) - return objc_write_use_common (stream, 0); - - else - { - int length; - objc_hash_add (&stream->object_table, - LONG2PTR(key=PTR2LONG(object)), object); - if ((length = objc_write_register_common (stream, key))) - return __objc_write_object (stream, object); - return length; - } -} - -int -__objc_write_class (struct objc_typed_stream *stream, struct objc_class *class) -{ - __objc_write_extension (stream, _BX_CLASS); - objc_write_string_atomic (stream, (unsigned char *) class->name, - strlen ((char *) class->name)); - return objc_write_unsigned_long (stream, class->version); -} - - -static int -objc_write_class (struct objc_typed_stream *stream, - struct objc_class *class) -{ - unsigned long key; - if ((key = PTR2LONG(objc_hash_value_for_key (stream->stream_table, class)))) - return objc_write_use_common (stream, key); - else - { - int length; - objc_hash_add (&stream->stream_table, - LONG2PTR(key = PTR2LONG(class)), class); - if ((length = objc_write_register_common (stream, key))) - return __objc_write_class (stream, class); - return length; - } -} - - -int -__objc_write_selector (struct objc_typed_stream *stream, SEL selector) -{ - const char *sel_name; - __objc_write_extension (stream, _BX_SEL); - /* to handle NULL selectors */ - if ((SEL)0 == selector) - return objc_write_string (stream, (unsigned char*)"", 0); - sel_name = sel_get_name (selector); - return objc_write_string (stream, (unsigned char*)sel_name, strlen ((char*)sel_name)); -} - -int -objc_write_selector (struct objc_typed_stream *stream, SEL selector) -{ - const char *sel_name; - unsigned long key; - - /* to handle NULL selectors */ - if ((SEL)0 == selector) - return __objc_write_selector (stream, selector); - - sel_name = sel_get_name (selector); - if ((key = PTR2LONG(objc_hash_value_for_key (stream->stream_table, - sel_name)))) - return objc_write_use_common (stream, key); - else - { - int length; - objc_hash_add (&stream->stream_table, - LONG2PTR(key = PTR2LONG(sel_name)), (char *) sel_name); - if ((length = objc_write_register_common (stream, key))) - return __objc_write_selector (stream, selector); - return length; - } -} - - - -/* -** Read operations -*/ - -int -objc_read_char (struct objc_typed_stream *stream, char *val) -{ - unsigned char buf; - int len; - len = (*stream->read) (stream->physical, (char*)&buf, 1); - if (len != 0) - { - if ((buf & _B_CODE) == _B_SINT) - (*val) = (buf & _B_VALUE); - - else if ((buf & _B_NUMBER) == 1) - { - len = (*stream->read) (stream->physical, val, 1); - if (buf&_B_SIGN) - (*val) = -1 * (*val); - } - - else - _objc_abort ("expected 8bit signed int, got %dbit int", - (int) (buf&_B_NUMBER)*8); - } - return len; -} - - -int -objc_read_unsigned_char (struct objc_typed_stream *stream, unsigned char *val) -{ - unsigned char buf; - int len; - if ((len = (*stream->read) (stream->physical, (char*)&buf, 1))) - { - if ((buf & _B_CODE) == _B_SINT) - (*val) = (buf & _B_VALUE); - - else if ((buf & _B_NUMBER) == 1) - len = (*stream->read) (stream->physical, (char*)val, 1); - - else - _objc_abort ("expected 8bit unsigned int, got %dbit int", - (int) (buf&_B_NUMBER)*8); - } - return len; -} - -int -objc_read_short (struct objc_typed_stream *stream, short *value) -{ - unsigned char buf[sizeof (short) + 1]; - int len; - if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) - { - if ((buf[0] & _B_CODE) == _B_SINT) - (*value) = (buf[0] & _B_VALUE); - - else - { - int pos = 1; - int nbytes = buf[0] & _B_NUMBER; - if (nbytes > (int) sizeof (short)) - _objc_abort ("expected short, got bigger (%dbits)", nbytes*8); - len = (*stream->read) (stream->physical, (char*)buf + 1, nbytes); - (*value) = 0; - while (pos <= nbytes) - (*value) = ((*value)*0x100) + buf[pos++]; - if (buf[0] & _B_SIGN) - (*value) = -(*value); - } - } - return len; -} - -int -objc_read_unsigned_short (struct objc_typed_stream *stream, - unsigned short *value) -{ - unsigned char buf[sizeof (unsigned short) + 1]; - int len; - if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) - { - if ((buf[0] & _B_CODE) == _B_SINT) - (*value) = (buf[0] & _B_VALUE); - - else - { - int pos = 1; - int nbytes = buf[0] & _B_NUMBER; - if (nbytes > (int) sizeof (short)) - _objc_abort ("expected short, got int or bigger"); - len = (*stream->read) (stream->physical, (char*)buf + 1, nbytes); - (*value) = 0; - while (pos <= nbytes) - (*value) = ((*value)*0x100) + buf[pos++]; - } - } - return len; -} - - -int -objc_read_int (struct objc_typed_stream *stream, int *value) -{ - unsigned char buf[sizeof (int) + 1]; - int len; - if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) - { - if ((buf[0] & _B_CODE) == _B_SINT) - (*value) = (buf[0] & _B_VALUE); - - else - { - int pos = 1; - int nbytes = buf[0] & _B_NUMBER; - if (nbytes > (int) sizeof (int)) - _objc_abort ("expected int, got bigger"); - len = (*stream->read) (stream->physical, (char*)buf + 1, nbytes); - (*value) = 0; - while (pos <= nbytes) - (*value) = ((*value)*0x100) + buf[pos++]; - if (buf[0] & _B_SIGN) - (*value) = -(*value); - } - } - return len; -} - -int -objc_read_long (struct objc_typed_stream *stream, long *value) -{ - unsigned char buf[sizeof (long) + 1]; - int len; - if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) - { - if ((buf[0] & _B_CODE) == _B_SINT) - (*value) = (buf[0] & _B_VALUE); - - else - { - int pos = 1; - int nbytes = buf[0] & _B_NUMBER; - if (nbytes > (int) sizeof (long)) - _objc_abort ("expected long, got bigger"); - len = (*stream->read) (stream->physical, (char*)buf + 1, nbytes); - (*value) = 0; - while (pos <= nbytes) - (*value) = ((*value)*0x100) + buf[pos++]; - if (buf[0] & _B_SIGN) - (*value) = -(*value); - } - } - return len; -} - -int -__objc_read_nbyte_uint (struct objc_typed_stream *stream, - unsigned int nbytes, unsigned int *val) -{ - int len; - unsigned int pos = 0; - unsigned char buf[sizeof (unsigned int) + 1]; - - if (nbytes > sizeof (int)) - _objc_abort ("expected int, got bigger"); - - len = (*stream->read) (stream->physical, (char*)buf, nbytes); - (*val) = 0; - while (pos < nbytes) - (*val) = ((*val)*0x100) + buf[pos++]; - return len; -} - - -int -objc_read_unsigned_int (struct objc_typed_stream *stream, - unsigned int *value) -{ - unsigned char buf[sizeof (unsigned int) + 1]; - int len; - if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) - { - if ((buf[0] & _B_CODE) == _B_SINT) - (*value) = (buf[0] & _B_VALUE); - - else - len = __objc_read_nbyte_uint (stream, (buf[0] & _B_VALUE), value); - - } - return len; -} - -int -__objc_read_nbyte_ulong (struct objc_typed_stream *stream, - unsigned int nbytes, unsigned long *val) -{ - int len; - unsigned int pos = 0; - unsigned char buf[sizeof (unsigned long) + 1]; - - if (nbytes > sizeof (long)) - _objc_abort ("expected long, got bigger"); - - len = (*stream->read) (stream->physical, (char*)buf, nbytes); - (*val) = 0; - while (pos < nbytes) - (*val) = ((*val)*0x100) + buf[pos++]; - return len; -} - - -int -objc_read_unsigned_long (struct objc_typed_stream *stream, - unsigned long *value) -{ - unsigned char buf[sizeof (unsigned long) + 1]; - int len; - if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) - { - if ((buf[0] & _B_CODE) == _B_SINT) - (*value) = (buf[0] & _B_VALUE); - - else - len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), value); - - } - return len; -} - -int -objc_read_string (struct objc_typed_stream *stream, - char **string) -{ - unsigned char buf[sizeof (unsigned int) + 1]; - int len; - if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) - { - unsigned long key = 0; - - if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ - { - len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); - len = (*stream->read) (stream->physical, (char*)buf, 1); - } - - switch (buf[0]&_B_CODE) { - case _B_SSTR: - { - int length = buf[0]&_B_VALUE; - (*string) = (char*)objc_malloc (length + 1); - if (key) - objc_hash_add (&stream->stream_table, LONG2PTR(key), *string); - len = (*stream->read) (stream->physical, *string, length); - (*string)[length] = '\0'; - } - break; - - case _B_UCOMM: - { - char *tmp; - len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); - tmp = objc_hash_value_for_key (stream->stream_table, LONG2PTR (key)); - *string = objc_malloc (strlen (tmp) + 1); - strcpy (*string, tmp); - } - break; - - case _B_NSTR: - { - unsigned int nbytes = buf[0]&_B_VALUE; - len = __objc_read_nbyte_uint (stream, nbytes, &nbytes); - if (len) { - (*string) = (char*)objc_malloc (nbytes + 1); - if (key) - objc_hash_add (&stream->stream_table, LONG2PTR(key), *string); - len = (*stream->read) (stream->physical, *string, nbytes); - (*string)[nbytes] = '\0'; - } - } - break; - - default: - _objc_abort ("expected string, got opcode %c\n", (buf[0]&_B_CODE)); - } - } - - return len; -} - - -int -objc_read_object (struct objc_typed_stream *stream, id *object) -{ - unsigned char buf[sizeof (unsigned int)]; - int len; - if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) - { - SEL read_sel = sel_get_any_uid ("read:"); - unsigned long key = 0; - - if ((buf[0]&_B_CODE) == _B_RCOMM) /* register common */ - { - len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); - len = (*stream->read) (stream->physical, (char*)buf, 1); - } - - if (buf[0] == (_B_EXT | _BX_OBJECT)) - { - Class class; - - /* get class */ - len = objc_read_class (stream, &class); - - /* create instance */ - (*object) = class_create_instance (class); - - /* register? */ - if (key) - objc_hash_add (&stream->object_table, LONG2PTR(key), *object); - - /* send -read: */ - if (__objc_responds_to (*object, read_sel)) - (*get_imp (class, read_sel)) (*object, read_sel, stream); - - /* check null-byte */ - len = (*stream->read) (stream->physical, (char*)buf, 1); - if (buf[0] != '\0') - _objc_abort ("expected null-byte, got opcode %c", buf[0]); - } - - else if ((buf[0]&_B_CODE) == _B_UCOMM) - { - if (key) - _objc_abort ("cannot register use upcode..."); - len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); - (*object) = objc_hash_value_for_key (stream->object_table, - LONG2PTR(key)); - } - - else if (buf[0] == (_B_EXT | _BX_OBJREF)) /* a forward reference */ - { - struct objc_list *other; - len = objc_read_unsigned_long (stream, &key); - other - = (struct objc_list *) objc_hash_value_for_key (stream->object_refs, - LONG2PTR(key)); - objc_hash_add (&stream->object_refs, LONG2PTR(key), - (void *)list_cons (object, other)); - } - - else if (buf[0] == (_B_EXT | _BX_OBJROOT)) /* a root object */ - { - if (key) - _objc_abort ("cannot register root object..."); - len = objc_read_object (stream, object); - __objc_finish_read_root_object (stream); - } - - else - _objc_abort ("expected object, got opcode %c", buf[0]); - } - return len; -} - -static int -objc_read_class (struct objc_typed_stream *stream, Class *class) -{ - unsigned char buf[sizeof (unsigned int)]; - int len; - if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) - { - unsigned long key = 0; - - if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ - { - len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); - len = (*stream->read) (stream->physical, (char*)buf, 1); - } - - if (buf[0] == (_B_EXT | _BX_CLASS)) - { - char temp[1] = ""; - char *class_name = temp; - unsigned long version; - - /* get class */ - len = objc_read_string (stream, &class_name); - (*class) = objc_get_class (class_name); - objc_free (class_name); - - /* register */ - if (key) - objc_hash_add (&stream->stream_table, LONG2PTR(key), *class); - - objc_read_unsigned_long (stream, &version); - objc_hash_add (&stream->class_table, - (*class)->name, (void *) ((size_t) version)); - } - - else if ((buf[0]&_B_CODE) == _B_UCOMM) - { - if (key) - _objc_abort ("cannot register use upcode..."); - len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); - *class = objc_hash_value_for_key (stream->stream_table, - LONG2PTR(key)); - if (! *class) - _objc_abort ("cannot find class for key %lu", key); - } - - else - _objc_abort ("expected class, got opcode %c", buf[0]); - } - return len; -} - -int -objc_read_selector (struct objc_typed_stream *stream, SEL* selector) -{ - unsigned char buf[sizeof (unsigned int)]; - int len; - if ((len = (*stream->read) (stream->physical, (char*)buf, 1))) - { - unsigned long key = 0; - - if ((buf[0]&_B_CODE) == _B_RCOMM) /* register following */ - { - len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); - len = (*stream->read) (stream->physical, (char*)buf, 1); - } - - if (buf[0] == (_B_EXT|_BX_SEL)) /* selector! */ - { - char temp[1] = ""; - char *selector_name = temp; - - /* get selector */ - len = objc_read_string (stream, &selector_name); - /* To handle NULL selectors */ - if (0 == strlen (selector_name)) - { - (*selector) = (SEL)0; - return 0; - } - else - (*selector) = sel_get_any_uid (selector_name); - objc_free (selector_name); - - /* register */ - if (key) - objc_hash_add (&stream->stream_table, - LONG2PTR(key), (void *) *selector); - } - - else if ((buf[0]&_B_CODE) == _B_UCOMM) - { - if (key) - _objc_abort ("cannot register use upcode..."); - len = __objc_read_nbyte_ulong (stream, (buf[0] & _B_VALUE), &key); - (*selector) = objc_hash_value_for_key (stream->stream_table, - LONG2PTR(key)); - } - - else - _objc_abort ("expected selector, got opcode %c", buf[0]); - } - return len; -} - -/* -** USER LEVEL FUNCTIONS -*/ - -/* -** Write one object, encoded in TYPE and pointed to by DATA to the -** typed stream STREAM. -*/ - -int -objc_write_type (TypedStream *stream, const char *type, const void *data) -{ - switch (*type) { - case _C_ID: - return objc_write_object (stream, *(id *) data); - break; - - case _C_CLASS: - return objc_write_class (stream, *(Class *) data); - break; - - case _C_SEL: - return objc_write_selector (stream, *(SEL *) data); - break; - - case _C_CHR: - return objc_write_char (stream, *(signed char *) data); - break; - - case _C_UCHR: - return objc_write_unsigned_char (stream, *(unsigned char *) data); - break; - - case _C_SHT: - return objc_write_short (stream, *(short *) data); - break; - - case _C_USHT: - return objc_write_unsigned_short (stream, *(unsigned short *) data); - break; - - case _C_INT: - return objc_write_int (stream, *(int *) data); - break; - - case _C_UINT: - return objc_write_unsigned_int (stream, *(unsigned int *) data); - break; - - case _C_LNG: - return objc_write_long (stream, *(long *) data); - break; - - case _C_ULNG: - return objc_write_unsigned_long (stream, *(unsigned long *) data); - break; - - case _C_CHARPTR: - return objc_write_string (stream, - *(unsigned char **) data, strlen (*(char **) data)); - break; - - case _C_ATOM: - return objc_write_string_atomic (stream, *(unsigned char **) data, - strlen (*(char **) data)); - break; - - case _C_ARY_B: - { - int len = atoi (type + 1); - while (isdigit ((unsigned char) *++type)) - ; - return objc_write_array (stream, type, len, data); - } - break; - - case _C_STRUCT_B: - { - int acc_size = 0; - int align; - while (*type != _C_STRUCT_E && *type++ != '=') - ; /* skip "<name>=" */ - while (*type != _C_STRUCT_E) - { - align = objc_alignof_type (type); /* padd to alignment */ - acc_size = ROUND (acc_size, align); - objc_write_type (stream, type, ((char *) data) + acc_size); - acc_size += objc_sizeof_type (type); /* add component size */ - type = objc_skip_typespec (type); /* skip component */ - } - return 1; - } - - default: - { - _objc_abort ("objc_write_type: cannot parse typespec: %s\n", type); - return 0; - } - } -} - -/* -** Read one object, encoded in TYPE and pointed to by DATA to the -** typed stream STREAM. DATA specifies the address of the types to -** read. Expected type is checked against the type actually present -** on the stream. -*/ - -int -objc_read_type(TypedStream *stream, const char *type, void *data) -{ - char c; - switch (c = *type) { - case _C_ID: - return objc_read_object (stream, (id*)data); - break; - - case _C_CLASS: - return objc_read_class (stream, (Class*)data); - break; - - case _C_SEL: - return objc_read_selector (stream, (SEL*)data); - break; - - case _C_CHR: - return objc_read_char (stream, (char*)data); - break; - - case _C_UCHR: - return objc_read_unsigned_char (stream, (unsigned char*)data); - break; - - case _C_SHT: - return objc_read_short (stream, (short*)data); - break; - - case _C_USHT: - return objc_read_unsigned_short (stream, (unsigned short*)data); - break; - - case _C_INT: - return objc_read_int (stream, (int*)data); - break; - - case _C_UINT: - return objc_read_unsigned_int (stream, (unsigned int*)data); - break; - - case _C_LNG: - return objc_read_long (stream, (long*)data); - break; - - case _C_ULNG: - return objc_read_unsigned_long (stream, (unsigned long*)data); - break; - - case _C_CHARPTR: - case _C_ATOM: - return objc_read_string (stream, (char**)data); - break; - - case _C_ARY_B: - { - int len = atoi (type + 1); - while (isdigit ((unsigned char) *++type)) - ; - return objc_read_array (stream, type, len, data); - } - break; - - case _C_STRUCT_B: - { - int acc_size = 0; - int align; - while (*type != _C_STRUCT_E && *type++ != '=') - ; /* skip "<name>=" */ - while (*type != _C_STRUCT_E) - { - align = objc_alignof_type (type); /* padd to alignment */ - acc_size = ROUND (acc_size, align); - objc_read_type (stream, type, ((char*)data)+acc_size); - acc_size += objc_sizeof_type (type); /* add component size */ - type = objc_skip_typespec (type); /* skip component */ - } - return 1; - } - - default: - { - _objc_abort ("objc_read_type: cannot parse typespec: %s\n", type); - return 0; - } - } -} - -/* -** Write the object specified by the template TYPE to STREAM. Last -** arguments specify addresses of values to be written. It might -** seem surprising to specify values by address, but this is extremely -** convenient for copy-paste with objc_read_types calls. A more -** down-to-the-earth cause for this passing of addresses is that values -** of arbitrary size is not well supported in ANSI C for functions with -** variable number of arguments. -*/ - -int -objc_write_types (TypedStream *stream, const char *type, ...) -{ - va_list args; - const char *c; - int res = 0; - - va_start(args, type); - - for (c = type; *c; c = objc_skip_typespec (c)) - { - switch (*c) { - case _C_ID: - res = objc_write_object (stream, *va_arg (args, id*)); - break; - - case _C_CLASS: - res = objc_write_class (stream, *va_arg (args, Class*)); - break; - - case _C_SEL: - res = objc_write_selector (stream, *va_arg (args, SEL*)); - break; - - case _C_CHR: - res = objc_write_char (stream, *va_arg (args, char*)); - break; - - case _C_UCHR: - res = objc_write_unsigned_char (stream, - *va_arg (args, unsigned char*)); - break; - - case _C_SHT: - res = objc_write_short (stream, *va_arg (args, short*)); - break; - - case _C_USHT: - res = objc_write_unsigned_short (stream, - *va_arg (args, unsigned short*)); - break; - - case _C_INT: - res = objc_write_int(stream, *va_arg (args, int*)); - break; - - case _C_UINT: - res = objc_write_unsigned_int(stream, *va_arg (args, unsigned int*)); - break; - - case _C_LNG: - res = objc_write_long(stream, *va_arg (args, long*)); - break; - - case _C_ULNG: - res = objc_write_unsigned_long(stream, *va_arg (args, unsigned long*)); - break; - - case _C_CHARPTR: - { - unsigned char **str = va_arg (args, unsigned char **); - res = objc_write_string (stream, *str, strlen ((char*)*str)); - } - break; - - case _C_ATOM: - { - unsigned char **str = va_arg (args, unsigned char **); - res = objc_write_string_atomic (stream, *str, strlen ((char*)*str)); - } - break; - - case _C_ARY_B: - { - int len = atoi (c + 1); - const char *t = c; - while (isdigit ((unsigned char) *++t)) - ; - res = objc_write_array (stream, t, len, va_arg (args, void *)); - t = objc_skip_typespec (t); - if (*t != _C_ARY_E) - _objc_abort ("expected `]', got: %s", t); - } - break; - - default: - _objc_abort ("objc_write_types: cannot parse typespec: %s\n", type); - } - } - va_end(args); - return res; -} - - -/* -** Last arguments specify addresses of values to be read. Expected -** type is checked against the type actually present on the stream. -*/ - -int -objc_read_types(TypedStream *stream, const char *type, ...) -{ - va_list args; - const char *c; - int res = 0; - - va_start (args, type); - - for (c = type; *c; c = objc_skip_typespec(c)) - { - switch (*c) { - case _C_ID: - res = objc_read_object(stream, va_arg (args, id*)); - break; - - case _C_CLASS: - res = objc_read_class(stream, va_arg (args, Class*)); - break; - - case _C_SEL: - res = objc_read_selector(stream, va_arg (args, SEL*)); - break; - - case _C_CHR: - res = objc_read_char(stream, va_arg (args, char*)); - break; - - case _C_UCHR: - res = objc_read_unsigned_char(stream, va_arg (args, unsigned char*)); - break; - - case _C_SHT: - res = objc_read_short(stream, va_arg (args, short*)); - break; - - case _C_USHT: - res = objc_read_unsigned_short(stream, va_arg (args, unsigned short*)); - break; - - case _C_INT: - res = objc_read_int(stream, va_arg (args, int*)); - break; - - case _C_UINT: - res = objc_read_unsigned_int(stream, va_arg (args, unsigned int*)); - break; - - case _C_LNG: - res = objc_read_long(stream, va_arg (args, long*)); - break; - - case _C_ULNG: - res = objc_read_unsigned_long(stream, va_arg (args, unsigned long*)); - break; - - case _C_CHARPTR: - case _C_ATOM: - { - char **str = va_arg (args, char **); - res = objc_read_string (stream, str); - } - break; - - case _C_ARY_B: - { - int len = atoi (c + 1); - const char *t = c; - while (isdigit ((unsigned char) *++t)) - ; - res = objc_read_array (stream, t, len, va_arg (args, void *)); - t = objc_skip_typespec (t); - if (*t != _C_ARY_E) - _objc_abort ("expected `]', got: %s", t); - } - break; - - default: - _objc_abort ("objc_read_types: cannot parse typespec: %s\n", type); - } - } - va_end (args); - return res; -} - -/* -** Write an array of COUNT elements of TYPE from the memory address DATA. -** This is equivalent of objc_write_type (stream, "[N<type>]", data) -*/ - -int -objc_write_array (TypedStream *stream, const char *type, - int count, const void *data) -{ - int off = objc_sizeof_type(type); - const char *where = data; - - while (count-- > 0) - { - objc_write_type(stream, type, where); - where += off; - } - return 1; -} - -/* -** Read an array of COUNT elements of TYPE into the memory address -** DATA. The memory pointed to by data is supposed to be allocated -** by the callee. This is equivalent of -** objc_read_type (stream, "[N<type>]", data) -*/ - -int -objc_read_array (TypedStream *stream, const char *type, - int count, void *data) -{ - int off = objc_sizeof_type(type); - char *where = (char*)data; - - while (count-- > 0) - { - objc_read_type(stream, type, where); - where += off; - } - return 1; -} - -static int -__objc_fread (FILE *file, char *data, int len) -{ - return fread(data, len, 1, file); -} - -static int -__objc_fwrite (FILE *file, char *data, int len) -{ - return fwrite(data, len, 1, file); -} - -static int -__objc_feof (FILE *file) -{ - return feof(file); -} - -static int -__objc_no_write (FILE *file __attribute__ ((__unused__)), - const char *data __attribute__ ((__unused__)), - int len __attribute__ ((__unused__))) -{ - _objc_abort ("TypedStream not open for writing"); - return 0; -} - -static int -__objc_no_read (FILE *file __attribute__ ((__unused__)), - const char *data __attribute__ ((__unused__)), - int len __attribute__ ((__unused__))) -{ - _objc_abort ("TypedStream not open for reading"); - return 0; -} - -static int -__objc_read_typed_stream_signature (TypedStream *stream) -{ - char buffer[80]; - int pos = 0; - do - (*stream->read) (stream->physical, buffer+pos, 1); - while (buffer[pos++] != '\0') - ; - sscanf (buffer, "GNU TypedStream %d", &stream->version); - if (stream->version != OBJC_TYPED_STREAM_VERSION) - _objc_abort ("cannot handle TypedStream version %d", stream->version); - return 1; -} - -static int -__objc_write_typed_stream_signature (TypedStream *stream) -{ - char buffer[80]; - sprintf(buffer, "GNU TypedStream %d", OBJC_TYPED_STREAM_VERSION); - stream->version = OBJC_TYPED_STREAM_VERSION; - (*stream->write) (stream->physical, buffer, strlen (buffer) + 1); - return 1; -} - -static void __objc_finish_write_root_object(struct objc_typed_stream *stream) -{ - objc_hash_delete (stream->object_table); - stream->object_table = objc_hash_new (64, - (hash_func_type) objc_hash_ptr, - (compare_func_type) objc_compare_ptrs); -} - -static void __objc_finish_read_root_object(struct objc_typed_stream *stream) -{ - node_ptr node; - SEL awake_sel = sel_get_any_uid ("awake"); - cache_ptr free_list = objc_hash_new (64, - (hash_func_type) objc_hash_ptr, - (compare_func_type) objc_compare_ptrs); - - /* resolve object forward references */ - for (node = objc_hash_next (stream->object_refs, NULL); node; - node = objc_hash_next (stream->object_refs, node)) - { - struct objc_list *reflist = node->value; - const void *key = node->key; - id object = objc_hash_value_for_key (stream->object_table, key); - while (reflist) - { - *((id*) reflist->head) = object; - if (objc_hash_value_for_key (free_list,reflist) == NULL) - objc_hash_add (&free_list,reflist,reflist); - - reflist = reflist->tail; - } - } - - /* apply __objc_free to all objects stored in free_list */ - for (node = objc_hash_next (free_list, NULL); node; - node = objc_hash_next (free_list, node)) - objc_free ((void *) node->key); - - objc_hash_delete (free_list); - - /* empty object reference table */ - objc_hash_delete (stream->object_refs); - stream->object_refs = objc_hash_new (8, (hash_func_type) objc_hash_ptr, - (compare_func_type) objc_compare_ptrs); - - /* call -awake for all objects read */ - if (awake_sel) - { - for (node = objc_hash_next (stream->object_table, NULL); node; - node = objc_hash_next (stream->object_table, node)) - { - id object = node->value; - if (__objc_responds_to (object, awake_sel)) - (*objc_msg_lookup (object, awake_sel)) (object, awake_sel); - } - } - - /* empty object table */ - objc_hash_delete (stream->object_table); - stream->object_table = objc_hash_new(64, - (hash_func_type)objc_hash_ptr, - (compare_func_type)objc_compare_ptrs); -} - -/* -** Open the stream PHYSICAL in MODE -*/ - -TypedStream * -objc_open_typed_stream (FILE *physical, int mode) -{ - TypedStream *s = (TypedStream *) objc_malloc (sizeof (TypedStream)); - - s->mode = mode; - s->physical = physical; - s->stream_table = objc_hash_new (64, - (hash_func_type) objc_hash_ptr, - (compare_func_type) objc_compare_ptrs); - s->object_table = objc_hash_new (64, - (hash_func_type) objc_hash_ptr, - (compare_func_type) objc_compare_ptrs); - s->eof = (objc_typed_eof_func) __objc_feof; - s->flush = (objc_typed_flush_func) fflush; - s->writing_root_p = 0; - if (mode == OBJC_READONLY) - { - s->class_table - = objc_hash_new (8, (hash_func_type) objc_hash_string, - (compare_func_type) objc_compare_strings); - s->object_refs = objc_hash_new (8, (hash_func_type) objc_hash_ptr, - (compare_func_type) objc_compare_ptrs); - s->read = (objc_typed_read_func) __objc_fread; - s->write = (objc_typed_write_func) __objc_no_write; - __objc_read_typed_stream_signature (s); - } - else if (mode == OBJC_WRITEONLY) - { - s->class_table = 0; - s->object_refs = 0; - s->read = (objc_typed_read_func) __objc_no_read; - s->write = (objc_typed_write_func) __objc_fwrite; - __objc_write_typed_stream_signature (s); - } - else - { - objc_close_typed_stream (s); - return NULL; - } - s->type = OBJC_FILE_STREAM; - return s; -} - -/* -** Open the file named by FILE_NAME in MODE -*/ - -TypedStream* -objc_open_typed_stream_for_file (const char *file_name, int mode) -{ - FILE *file = NULL; - TypedStream *s; - - if (mode == OBJC_READONLY) - file = fopen (file_name, "r"); - else - file = fopen (file_name, "w"); - - if (file) - { - s = objc_open_typed_stream (file, mode); - if (s) - s->type |= OBJC_MANAGED_STREAM; - return s; - } - else - return NULL; -} - -/* -** Close STREAM freeing the structure it self. If it was opened with -** objc_open_typed_stream_for_file, the file will also be closed. -*/ - -void -objc_close_typed_stream (TypedStream *stream) -{ - if (stream->mode == OBJC_READONLY) - { - __objc_finish_read_root_object (stream); /* Just in case... */ - objc_hash_delete (stream->class_table); - objc_hash_delete (stream->object_refs); - } - - objc_hash_delete (stream->stream_table); - objc_hash_delete (stream->object_table); - - if (stream->type == (OBJC_MANAGED_STREAM | OBJC_FILE_STREAM)) - fclose ((FILE *)stream->physical); - - objc_free(stream); -} - -BOOL -objc_end_of_typed_stream (TypedStream *stream) -{ - return (*stream->eof) (stream->physical); -} - -void -objc_flush_typed_stream (TypedStream *stream) -{ - (*stream->flush) (stream->physical); -} - -long -objc_get_stream_class_version (TypedStream *stream, Class class) -{ - if (stream->class_table) - return PTR2LONG(objc_hash_value_for_key (stream->class_table, - class->name)); - else - return class_get_version (class); -} - diff --git a/libobjc/error.c b/libobjc/error.c index 1dae36594f2..51d6402b998 100644 --- a/libobjc/error.c +++ b/libobjc/error.c @@ -45,53 +45,3 @@ _objc_abort (const char *fmt, ...) abort (); va_end (ap); } - -/* The rest of the file is deprecated. */ -#include "objc/objc-api.h" /* For objc_error_handler. */ - -/* -** Error handler function -** NULL so that default is to just print to stderr -*/ -static objc_error_handler _objc_error_handler = NULL; - -/* Trigger an objc error */ -void -objc_error (id object, int code, const char *fmt, ...) -{ - va_list ap; - - va_start (ap, fmt); - objc_verror (object, code, fmt, ap); - va_end (ap); -} - -/* Trigger an objc error */ -void -objc_verror (id object, int code, const char *fmt, va_list ap) -{ - BOOL result = NO; - - /* Call the error handler if its there - Otherwise print to stderr */ - if (_objc_error_handler) - result = (*_objc_error_handler) (object, code, fmt, ap); - else - vfprintf (stderr, fmt, ap); - - /* Continue if the error handler says its ok - Otherwise abort the program */ - if (result) - return; - else - abort (); -} - -/* Set the error handler */ -objc_error_handler -objc_set_error_handler (objc_error_handler func) -{ - objc_error_handler temp = _objc_error_handler; - _objc_error_handler = func; - return temp; -} diff --git a/libobjc/exception.c b/libobjc/exception.c index 1ffb80b5352..37daed8f30c 100644 --- a/libobjc/exception.c +++ b/libobjc/exception.c @@ -31,12 +31,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "unwind-pe.h" #include <string.h> /* For memcpy */ -/* This hook allows libraries to sepecify special actions when an - exception is thrown without a handler in place. This is deprecated - in favour of objc_set_uncaught_exception_handler (). */ -void (*_objc_unexpected_exception) (id exception); /* !T:SAFE */ - - /* 'is_kind_of_exception_matcher' is our default exception matcher - it determines if the object 'exception' is of class 'catch_class', or of a subclass. */ @@ -539,13 +533,6 @@ objc_exception_throw (id exception) (*__objc_uncaught_exception_handler) (exception); } - /* As a last resort support the old, deprecated way of setting an - uncaught exception handler. */ - if (_objc_unexpected_exception != 0) - { - (*_objc_unexpected_exception) (exception); - } - abort (); } diff --git a/libobjc/libobjc.def b/libobjc/libobjc.def index e84d839ad1d..8a295c824f7 100644 --- a/libobjc/libobjc.def +++ b/libobjc/libobjc.def @@ -23,13 +23,9 @@ LIBRARY libobjc EXPORTS search_for_method_in_list objc_get_uninstalled_dtable -objc_hash_is_key_in_hash -hash_is_key_in_hash -objc_verror _objc_load_callback objc_malloc objc_atomic_malloc -objc_valloc objc_realloc objc_calloc objc_free @@ -39,7 +35,6 @@ objc_mutex_deallocate objc_mutex_lock objc_mutex_trylock objc_mutex_unlock -_objc_unexpected_exception objc_thread_detach objc_thread_exit objc_thread_get_data @@ -53,10 +48,6 @@ objc_thread_remove __objc_class_name_Object __objc_class_name_Protocol __objc_class_name_NXConstantString -objc_error -__objc_object_alloc -__objc_object_copy -__objc_object_dispose class_create_instance object_copy object_dispose @@ -87,48 +78,6 @@ objc_skip_argspec objc_skip_offset objc_skip_type_qualifiers objc_skip_typespec -__objc_read_nbyte_uint -__objc_read_nbyte_ulong -__objc_write_class -__objc_write_object -__objc_write_selector -objc_close_typed_stream -objc_end_of_typed_stream -objc_flush_typed_stream -objc_get_stream_class_version -objc_open_typed_stream -objc_open_typed_stream_for_file -objc_read_array -objc_read_char -objc_read_int -objc_read_long -objc_read_object -objc_read_selector -objc_read_short -objc_read_string -objc_read_type -objc_read_types -objc_read_unsigned_char -objc_read_unsigned_int -objc_read_unsigned_long -objc_read_unsigned_short -objc_write_array -objc_write_char -objc_write_int -objc_write_long -objc_write_object -objc_write_object_reference -objc_write_root_object -objc_write_selector -objc_write_short -objc_write_string -objc_write_string_atomic -objc_write_type -objc_write_types -objc_write_unsigned_char -objc_write_unsigned_int -objc_write_unsigned_long -objc_write_unsigned_short __objc_exec_class __objc_init_dispatch_tables __objc_install_premature_dtable @@ -150,22 +99,3 @@ objc_get_class objc_get_meta_class objc_lookup_class objc_next_class -sarray_at_put -sarray_at_put_safe -sarray_free -sarray_lazy_copy -sarray_new -sarray_realloc -sarray_remove_garbage -objc_hash_add -hash_add -objc_hash_delete -hash_delete -objc_hash_new -hash_new -objc_hash_next -hash_next -objc_hash_remove -hash_remove -objc_hash_value_for_key -hash_value_for_key diff --git a/libobjc/memory.c b/libobjc/memory.c index b0519fc87a1..c02176ef874 100644 --- a/libobjc/memory.c +++ b/libobjc/memory.c @@ -133,38 +133,3 @@ objc_free (void *mem) } #endif /* !OBJC_WITH_GC */ - -/* The rest of the file contains deprecated code. */ - -#if OBJC_WITH_GC - -void * -objc_valloc (size_t size) -{ - void *res = (void *)(GC_malloc (size)); - if (! res) - _objc_abort ("Virtual memory exhausted\n"); - return res; -} - -#else - -void * -objc_valloc (size_t size) -{ - void *res = (void *)(malloc (size)); - if (! res) - _objc_abort ("Virtual memory exhausted\n"); - return res; -} - -#endif /* !OBJC_WITH_GC */ - -/* Hook functions for memory allocation and disposal. Deprecated and - currently unused. */ -void *(*_objc_malloc) (size_t) = malloc; -void *(*_objc_atomic_malloc) (size_t) = malloc; -void *(*_objc_valloc) (size_t) = malloc; -void *(*_objc_realloc) (void *, size_t) = realloc; -void *(*_objc_calloc) (size_t, size_t) = calloc; -void (*_objc_free) (void *) = free; diff --git a/libobjc/objc-private/common.h b/libobjc/objc-private/common.h index 4f4ec5cd077..d1f071114ec 100644 --- a/libobjc/objc-private/common.h +++ b/libobjc/objc-private/common.h @@ -28,11 +28,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* This file contains definitions that should be included by all .c and .m files in libobjc. */ -/* This variable allows the public headers to determine when they are - being included by a file inside libobjc itself, or when they are - being included by an external file. */ -#define GNU_LIBOBJC_COMPILING_LIBOBJC_ITSELF 1 - /* When debugging libobjc, add #define DEBUG 1 diff --git a/libobjc/objc/Object.h b/libobjc/objc/Object.h index f036b76b9a2..11c4617a98c 100644 --- a/libobjc/objc/Object.h +++ b/libobjc/objc/Object.h @@ -57,8 +57,6 @@ extern "C" { /* All of the following includes were deprecated in GCC 4.6 and will be removed in the next release. */ -#include "deprecated/hash.h" -#include "deprecated/typedstream.h" #include "deprecated/Object.h" #ifdef __cplusplus diff --git a/libobjc/objc/deprecated/METHOD_NULL.h b/libobjc/objc/deprecated/METHOD_NULL.h deleted file mode 100644 index 6912be345e1..00000000000 --- a/libobjc/objc/deprecated/METHOD_NULL.h +++ /dev/null @@ -1,2 +0,0 @@ -/* For functions which return Method_t */ -#define METHOD_NULL (Method_t)0 diff --git a/libobjc/objc/deprecated/Object.h b/libobjc/objc/deprecated/Object.h index e15cf7dd996..d7924e04761 100644 --- a/libobjc/objc/deprecated/Object.h +++ b/libobjc/objc/deprecated/Object.h @@ -48,37 +48,16 @@ + (struct objc_method_description *)descriptionForInstanceMethod:(SEL)aSel; - (struct objc_method_description *)descriptionForMethod:(SEL)aSel; -/* Sending messages determined at run time */ -- perform:(SEL)aSel; -- perform:(SEL)aSel with:anObject; -- perform:(SEL)aSel with:anObject1 with:anObject2; - /* Forwarding */ -- (retval_t)forward:(SEL)aSel :(arglist_t)argFrame; - (retval_t)performv:(SEL)aSel :(arglist_t)argFrame; /* Posing */ + poseAs:(Class)aClassObject; - (Class)transmuteClassTo:(Class)aClassObject; -/* Enforcing intentions */ -- subclassResponsibility:(SEL)aSel; -- notImplemented:(SEL)aSel; -- shouldNotImplement:(SEL)aSel; - -/* Error handling */ -- doesNotRecognize:(SEL)aSel; -- error:(const char *)aString, ...; - /* Archiving */ + (int)version; + setVersion:(int)aVersion; -+ (int)streamVersion: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */ - -- read: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */ -- write: (TypedStream*)aStream; /* __attribute__ ((deprecated)) */ -- awake; /* __attribute__ ((deprecated)) */ - @end diff --git a/libobjc/objc/deprecated/STR.h b/libobjc/objc/deprecated/STR.h deleted file mode 100644 index 17c20e2d6e3..00000000000 --- a/libobjc/objc/deprecated/STR.h +++ /dev/null @@ -1,2 +0,0 @@ -/* Incredibly obsolete. */ -typedef char *STR; /* String alias */ diff --git a/libobjc/objc/deprecated/hash.h b/libobjc/objc/deprecated/hash.h deleted file mode 100644 index 8b718a4417d..00000000000 --- a/libobjc/objc/deprecated/hash.h +++ /dev/null @@ -1,211 +0,0 @@ -/* Hash tables for Objective C method dispatch. - Copyright (C) 1993, 1995, 1996, 2004, 2009 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 3, 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - - - -#ifndef __hash_INCLUDE_GNU -#define __hash_INCLUDE_GNU - -#include <stddef.h> -#include <string.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/* - * This data structure is used to hold items - * stored in a hash table. Each node holds - * a key/value pair. - * - * Items in the cache are really of type void *. - */ -typedef struct cache_node -{ - struct cache_node *next; /* Pointer to next entry on the list. - NULL indicates end of list. */ - const void *key; /* Key used to locate the value. Used - to locate value when more than one - key computes the same hash - value. */ - void *value; /* Value stored for the key. */ -} *node_ptr; - - -/* - * This data type is the function that computes a hash code given a key. - * Therefore, the key can be a pointer to anything and the function specific - * to the key type. - * - * Unfortunately there is a mutual data structure reference problem with this - * typedef. Therefore, to remove compiler warnings the functions passed to - * objc_hash_new will have to be casted to this type. - */ -typedef unsigned int (*hash_func_type) (void *, const void *); - -/* - * This data type is the function that compares two hash keys and returns an - * integer greater than, equal to, or less than 0, according as the first - * parameter is lexicographically greater than, equal to, or less than the - * second. - */ - -typedef int (*compare_func_type) (const void *, const void *); - - -/* - * This data structure is the cache. - * - * It must be passed to all of the hashing routines - * (except for new). - */ -typedef struct cache -{ - /* Variables used to implement the hash itself. */ - node_ptr *node_table; /* Pointer to an array of hash nodes. */ - /* Variables used to track the size of the hash table so to determine - when to resize it. */ - unsigned int size; /* Number of buckets allocated for the hash table - (number of array entries allocated for - "node_table"). Must be a power of two. */ - unsigned int used; /* Current number of entries in the hash table. */ - unsigned int mask; /* Precomputed mask. */ - - /* Variables used to implement indexing through the hash table. */ - - unsigned int last_bucket; /* Tracks which entry in the array where - the last value was returned. */ - /* Function used to compute a hash code given a key. - This function is specified when the hash table is created. */ - hash_func_type hash_func; - /* Function used to compare two hash keys to see if they are equal. */ - compare_func_type compare_func; -} *cache_ptr; - - -/* Allocate and initialize a hash table. */ - -cache_ptr objc_hash_new (unsigned int size, - hash_func_type hash_func, - compare_func_type compare_func); - -/* Deallocate all of the hash nodes and the cache itself. */ - -void objc_hash_delete (cache_ptr cache); - -/* Add the key/value pair to the hash table. If the - hash table reaches a level of fullness then it will be resized. - - assert if the key is already in the hash. */ - -void objc_hash_add (cache_ptr *cachep, const void *key, void *value); - -/* Remove the key/value pair from the hash table. - assert if the key isn't in the table. */ - -void objc_hash_remove (cache_ptr cache, const void *key); - -/* Used to index through the hash table. Start with NULL - to get the first entry. - - Successive calls pass the value returned previously. - ** Don't modify the hash during this operation *** - - Cache nodes are returned such that key or value can - be extracted. */ - -node_ptr objc_hash_next (cache_ptr cache, node_ptr node); - -/* Used to return a value from a hash table using a given key. */ - -void *objc_hash_value_for_key (cache_ptr cache, const void *key); - -/* Used to determine if the given key exists in the hash table */ - -BOOL objc_hash_is_key_in_hash (cache_ptr cache, const void *key); - -/************************************************ - - Useful hashing functions. - - Declared inline for your pleasure. - -************************************************/ - -/* Calculate a hash code by performing some - manipulation of the key pointer. (Use the lowest bits - except for those likely to be 0 due to alignment.) */ - -static inline unsigned int -objc_hash_ptr (cache_ptr cache, const void *key) -{ - return ((size_t)key / sizeof (void *)) & cache->mask; -} - - -/* Calculate a hash code by iterating over a NULL - terminate string. */ -static inline unsigned int -objc_hash_string (cache_ptr cache, const void *key) -{ - unsigned int ret = 0; - unsigned int ctr = 0; - const char *ckey = (const char *) key; - - while (*ckey) { - ret ^= *ckey++ << ctr; - ctr = (ctr + 1) % sizeof (void *); - } - - return ret & cache->mask; -} - - -/* Compare two pointers for equality. */ -static inline int -objc_compare_ptrs (const void *k1, const void *k2) -{ - return (k1 == k2); -} - - -/* Compare two strings. */ -static inline int -objc_compare_strings (const void *k1, const void *k2) -{ - if (k1 == k2) - return 1; - else if (k1 == 0 || k2 == 0) - return 0; - else - return ! strcmp ((const char *) k1, (const char *) k2); -} - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* not __hash_INCLUDE_GNU */ diff --git a/libobjc/objc/deprecated/objc-list.h b/libobjc/objc/deprecated/objc-list.h deleted file mode 100644 index e542bfc0498..00000000000 --- a/libobjc/objc/deprecated/objc-list.h +++ /dev/null @@ -1,155 +0,0 @@ -/* Generic single linked list to keep various information - Copyright (C) 1993, 1994, 1996, 2009 Free Software Foundation, Inc. - Contributed by Kresten Krab Thorup. - -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 3, 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - - -#ifndef __GNU_OBJC_LIST_H -#define __GNU_OBJC_LIST_H - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct objc_list { - void *head; - struct objc_list *tail; -}; - -/* Return a cons cell produced from (head . tail) */ - -static inline struct objc_list* -list_cons(void* head, struct objc_list* tail) -{ - struct objc_list* cell; - - cell = (struct objc_list*)objc_malloc(sizeof(struct objc_list)); - cell->head = head; - cell->tail = tail; - return cell; -} - -/* Return the length of a list, list_length(NULL) returns zero */ - -static inline int -list_length(struct objc_list* list) -{ - int i = 0; - while(list) - { - i += 1; - list = list->tail; - } - return i; -} - -/* Return the Nth element of LIST, where N count from zero. If N - larger than the list length, NULL is returned */ - -static inline void* -list_nth(int indx, struct objc_list* list) -{ - while(indx-- != 0) - { - if(list->tail) - list = list->tail; - else - return 0; - } - return list->head; -} - -/* Remove the element at the head by replacing it by its successor */ - -static inline void -list_remove_head(struct objc_list** list) -{ - if ((*list)->tail) - { - struct objc_list* tail = (*list)->tail; /* fetch next */ - *(*list) = *tail; /* copy next to list head */ - objc_free(tail); /* free next */ - } - else /* only one element in list */ - { - objc_free(*list); - (*list) = 0; - } -} - - -/* Remove the element with `car' set to ELEMENT */ - -static inline void -list_remove_elem(struct objc_list** list, void* elem) -{ - while (*list) { - if ((*list)->head == elem) - list_remove_head(list); - list = &((*list)->tail); - } -} - -/* Map FUNCTION over all elements in LIST */ - -static inline void -list_mapcar(struct objc_list* list, void(*function)(void*)) -{ - while(list) - { - (*function)(list->head); - list = list->tail; - } -} - -/* Return element that has ELEM as car */ - -static inline struct objc_list** -list_find(struct objc_list** list, void* elem) -{ - while(*list) - { - if ((*list)->head == elem) - return list; - list = &((*list)->tail); - } - return NULL; -} - -/* Free list (backwards recursive) */ - -static inline void -list_free(struct objc_list* list) -{ - if(list) - { - list_free(list->tail); - objc_free(list); - } -} - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* not __GNU_OBJC_LIST_H */ diff --git a/libobjc/objc/deprecated/objc_error.h b/libobjc/objc/deprecated/objc_error.h deleted file mode 100644 index 7a7ebe941b2..00000000000 --- a/libobjc/objc/deprecated/objc_error.h +++ /dev/null @@ -1,56 +0,0 @@ -/* This API is incredibly limited and unsophisticated. objc_error() - generally causes the program to abort, so it should only be used - when something so dramatic happens that it could be pointless to - continue. Only two cases I can think of: failure to allocate new - memory or failure to load an Objective-C module. -*/ -/* Error handling - - Call objc_error() or objc_verror() to record an error; this error - routine will generally exit the program but not necessarily if the - user has installed his own error handler. - - Call objc_set_error_handler to assign your own function for - handling errors. The function should return YES if it is ok - to continue execution, or return NO or just abort if the - program should be stopped. The default error handler is just to - print a message on stderr. - - The error handler function should be of type objc_error_handler - The first parameter is an object instance of relevance. - The second parameter is an error code. - The third parameter is a format string in the printf style. - The fourth parameter is a variable list of arguments. */ -void objc_error(id object, int code, const char* fmt, ...); -void objc_verror(id object, int code, const char* fmt, va_list ap); -typedef BOOL (*objc_error_handler)(id, int code, const char *fmt, va_list ap); -objc_error_handler objc_set_error_handler(objc_error_handler func); - -/* Error codes - These are used by the runtime library, and your - error handling may use them to determine if the error is - hard or soft thus whether execution can continue or abort. */ -#define OBJC_ERR_UNKNOWN 0 /* Generic error */ - -#define OBJC_ERR_OBJC_VERSION 1 /* Incorrect runtime version */ -#define OBJC_ERR_GCC_VERSION 2 /* Incorrect compiler version */ -#define OBJC_ERR_MODULE_SIZE 3 /* Bad module size */ -#define OBJC_ERR_PROTOCOL_VERSION 4 /* Incorrect protocol version */ - -#define OBJC_ERR_MEMORY 10 /* Out of memory */ - -#define OBJC_ERR_RECURSE_ROOT 20 /* Attempt to archive the root - object more than once. */ -#define OBJC_ERR_BAD_DATA 21 /* Didn't read expected data */ -#define OBJC_ERR_BAD_KEY 22 /* Bad key for object */ -#define OBJC_ERR_BAD_CLASS 23 /* Unknown class */ -#define OBJC_ERR_BAD_TYPE 24 /* Bad type specification */ -#define OBJC_ERR_NO_READ 25 /* Cannot read stream */ -#define OBJC_ERR_NO_WRITE 26 /* Cannot write stream */ -#define OBJC_ERR_STREAM_VERSION 27 /* Incorrect stream version */ -#define OBJC_ERR_BAD_OPCODE 28 /* Bad opcode */ - -#define OBJC_ERR_UNIMPLEMENTED 30 /* Method is not implemented */ - -#define OBJC_ERR_BAD_STATE 40 /* Bad thread state */ - diff --git a/libobjc/objc/deprecated/objc_get_uninstalled_dtable.h b/libobjc/objc/deprecated/objc_get_uninstalled_dtable.h deleted file mode 100644 index 48d508a1592..00000000000 --- a/libobjc/objc/deprecated/objc_get_uninstalled_dtable.h +++ /dev/null @@ -1,2 +0,0 @@ -objc_EXPORT struct sarray* -objc_get_uninstalled_dtable(void); diff --git a/libobjc/objc/deprecated/objc_malloc.h b/libobjc/objc/deprecated/objc_malloc.h deleted file mode 100644 index cf6c6e9d092..00000000000 --- a/libobjc/objc/deprecated/objc_malloc.h +++ /dev/null @@ -1,17 +0,0 @@ -/* -** Hook functions for memory allocation and disposal. -** This makes it easy to substitute garbage collection systems -** such as Boehm's GC by assigning these function pointers -** to the GC's allocation routines. By default these point -** to the ANSI standard malloc, realloc, free, etc. -** -** Users should call the normal objc routines above for -** memory allocation and disposal within their programs. -*/ -objc_EXPORT void *(*_objc_malloc)(size_t); -objc_EXPORT void *(*_objc_atomic_malloc)(size_t); -objc_EXPORT void *(*_objc_valloc)(size_t); -objc_EXPORT void *(*_objc_realloc)(void *, size_t); -objc_EXPORT void *(*_objc_calloc)(size_t, size_t); -objc_EXPORT void (*_objc_free)(void *); - diff --git a/libobjc/objc/deprecated/objc_object_alloc.h b/libobjc/objc/deprecated/objc_object_alloc.h deleted file mode 100644 index f6336ca8efa..00000000000 --- a/libobjc/objc/deprecated/objc_object_alloc.h +++ /dev/null @@ -1,8 +0,0 @@ -/* These functions are deprecated and currently ignored. */ -/* -** Hook functions for allocating, copying and disposing of instances -*/ -objc_EXPORT id (*_objc_object_alloc)(Class _class); -objc_EXPORT id (*_objc_object_copy)(id object); -objc_EXPORT id (*_objc_object_dispose)(id object); - diff --git a/libobjc/objc/deprecated/objc_unexpected_exception.h b/libobjc/objc/deprecated/objc_unexpected_exception.h deleted file mode 100644 index 69ffd4e87da..00000000000 --- a/libobjc/objc/deprecated/objc_unexpected_exception.h +++ /dev/null @@ -1,9 +0,0 @@ -/* -** Hook for uncaught exceptions. This hook is called when an -** exception is thrown and no valid exception handler is in place. -** The function is expected never to return. If the function returns -** the result is currently undefined. This is deprecated. Please use -** objc_set_uncaught_exception_handler() from objc/objc-exception.h -** instead. -*/ -objc_EXPORT void (*_objc_unexpected_exception)(id) __attribute__ ((deprecated)); diff --git a/libobjc/objc/deprecated/objc_valloc.h b/libobjc/objc/deprecated/objc_valloc.h deleted file mode 100644 index a715f1a7330..00000000000 --- a/libobjc/objc/deprecated/objc_valloc.h +++ /dev/null @@ -1,2 +0,0 @@ -void * -objc_valloc(size_t size); diff --git a/libobjc/objc/deprecated/sarray.h b/libobjc/objc/deprecated/sarray.h deleted file mode 100644 index aa2f3350a45..00000000000 --- a/libobjc/objc/deprecated/sarray.h +++ /dev/null @@ -1,240 +0,0 @@ -/* Sparse Arrays for Objective C dispatch tables - Copyright (C) 1993, 1995, 1996, 2004, 2009 Free Software Foundation, Inc. - Contributed by Kresten Krab Thorup. - -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 3, 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - - -#ifndef __sarray_INCLUDE_GNU -#define __sarray_INCLUDE_GNU - -#define OBJC_SPARSE2 /* 2-level sparse array */ -/* #define OBJC_SPARSE3 */ /* 3-level sparse array */ - -#ifdef OBJC_SPARSE2 -extern const char* __objc_sparse2_id; -#endif - -#ifdef OBJC_SPARSE3 -extern const char* __objc_sparse3_id; -#endif - -#include <stddef.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -extern int nbuckets; /* for stats */ -extern int nindices; -extern int narrays; -extern int idxsize; - -/* An unsigned integer of same size as a pointer */ -#define SIZET_BITS (sizeof(size_t)*8) - -#if defined(__sparc__) || defined(OBJC_SPARSE2) -#define PRECOMPUTE_SELECTORS -#endif - -#ifdef OBJC_SPARSE3 - -/* Buckets are 8 words each */ -#define BUCKET_BITS 3 -#define BUCKET_SIZE (1<<BUCKET_BITS) -#define BUCKET_MASK (BUCKET_SIZE-1) - -/* Indices are 16 words each */ -#define INDEX_BITS 4 -#define INDEX_SIZE (1<<INDEX_BITS) -#define INDEX_MASK (INDEX_SIZE-1) - -#define INDEX_CAPACITY (BUCKET_SIZE*INDEX_SIZE) - -#else /* OBJC_SPARSE2 */ - -/* Buckets are 32 words each */ -#define BUCKET_BITS 5 -#define BUCKET_SIZE (1<<BUCKET_BITS) -#define BUCKET_MASK (BUCKET_SIZE-1) - -#endif /* OBJC_SPARSE2 */ - -typedef size_t sidx; - -#ifdef PRECOMPUTE_SELECTORS - -struct soffset { -#ifdef OBJC_SPARSE3 - unsigned int unused : SIZET_BITS/4; - unsigned int eoffset : SIZET_BITS/4; - unsigned int boffset : SIZET_BITS/4; - unsigned int ioffset : SIZET_BITS/4; -#else /* OBJC_SPARSE2 */ -#ifdef __sparc__ - unsigned long boffset : (SIZET_BITS - 2) - BUCKET_BITS; - unsigned int eoffset : BUCKET_BITS; - unsigned int unused : 2; -#else - unsigned int boffset : SIZET_BITS/2; - unsigned int eoffset : SIZET_BITS/2; -#endif -#endif /* OBJC_SPARSE2 */ -}; - -union sofftype { - struct soffset off; - sidx idx; -}; - -#endif /* not PRECOMPUTE_SELECTORS */ - -union sversion { - int version; - void *next_free; -}; - -struct sbucket { - void* elems[BUCKET_SIZE]; /* elements stored in array */ - union sversion version; /* used for copy-on-write */ -}; - -#ifdef OBJC_SPARSE3 - -struct sindex { - struct sbucket* buckets[INDEX_SIZE]; - union sversion version; /* used for copy-on-write */ -}; - -#endif /* OBJC_SPARSE3 */ - -struct sarray { -#ifdef OBJC_SPARSE3 - struct sindex** indices; - struct sindex* empty_index; -#else /* OBJC_SPARSE2 */ - struct sbucket** buckets; -#endif /* OBJC_SPARSE2 */ - struct sbucket* empty_bucket; - union sversion version; /* used for copy-on-write */ - short ref_count; - struct sarray* is_copy_of; - size_t capacity; -}; - -struct sarray* sarray_new(int, void* default_element); -void sarray_free(struct sarray*); -struct sarray* sarray_lazy_copy(struct sarray*); -void sarray_realloc(struct sarray*, int new_size); -void sarray_at_put(struct sarray*, sidx indx, void* elem); -void sarray_at_put_safe(struct sarray*, sidx indx, void* elem); - -struct sarray* sarray_hard_copy(struct sarray*); /* ... like the name? */ -void sarray_remove_garbage(void); - - -#ifdef PRECOMPUTE_SELECTORS -/* Transform soffset values to ints and vica verca */ -static inline unsigned int -soffset_decode(sidx indx) -{ - union sofftype x; - x.idx = indx; -#ifdef OBJC_SPARSE3 - return x.off.eoffset - + (x.off.boffset*BUCKET_SIZE) - + (x.off.ioffset*INDEX_CAPACITY); -#else /* OBJC_SPARSE2 */ - return x.off.eoffset + (x.off.boffset*BUCKET_SIZE); -#endif /* OBJC_SPARSE2 */ -} - -static inline sidx -soffset_encode(size_t offset) -{ - union sofftype x; - x.off.eoffset = offset%BUCKET_SIZE; -#ifdef OBJC_SPARSE3 - x.off.boffset = (offset/BUCKET_SIZE)%INDEX_SIZE; - x.off.ioffset = offset/INDEX_CAPACITY; -#else /* OBJC_SPARSE2 */ - x.off.boffset = offset/BUCKET_SIZE; -#endif - return (sidx)x.idx; -} - -#else /* not PRECOMPUTE_SELECTORS */ - -static inline size_t -soffset_decode(sidx indx) -{ - return indx; -} - -static inline sidx -soffset_encode(size_t offset) -{ - return offset; -} -#endif /* not PRECOMPUTE_SELECTORS */ - -/* Get element from the Sparse array `array' at offset `indx' */ - -static inline void* sarray_get(struct sarray* array, sidx indx) -{ -#ifdef PRECOMPUTE_SELECTORS - union sofftype x; - x.idx = indx; -#ifdef OBJC_SPARSE3 - return - array-> - indices[x.off.ioffset]-> - buckets[x.off.boffset]-> - elems[x.off.eoffset]; -#else /* OBJC_SPARSE2 */ - return array->buckets[x.off.boffset]->elems[x.off.eoffset]; -#endif /* OBJC_SPARSE2 */ -#else /* not PRECOMPUTE_SELECTORS */ -#ifdef OBJC_SPARSE3 - return array-> - indices[indx/INDEX_CAPACITY]-> - buckets[(indx/BUCKET_SIZE)%INDEX_SIZE]-> - elems[indx%BUCKET_SIZE]; -#else /* OBJC_SPARSE2 */ - return array->buckets[indx/BUCKET_SIZE]->elems[indx%BUCKET_SIZE]; -#endif /* not OBJC_SPARSE3 */ -#endif /* not PRECOMPUTE_SELECTORS */ -} - -static inline void* sarray_get_safe(struct sarray* array, sidx indx) -{ - if(soffset_decode(indx) < array->capacity) - return sarray_get(array, indx); - else - return (array->empty_bucket->elems[0]); -} - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __sarray_INCLUDE_GNU */ diff --git a/libobjc/objc/deprecated/struct_objc_static_instances.h b/libobjc/objc/deprecated/struct_objc_static_instances.h deleted file mode 100644 index 9d889bfc08c..00000000000 --- a/libobjc/objc/deprecated/struct_objc_static_instances.h +++ /dev/null @@ -1,14 +0,0 @@ -/* For every class which happens to have statically allocated instances in - this module, one OBJC_STATIC_INSTANCES is allocated by the compiler. - INSTANCES is NULL terminated and points to all statically allocated - instances of this class. */ -struct objc_static_instances -{ - char *class_name; -#ifdef __cplusplus - id instances[1]; -#else - id instances[0]; -#endif -}; - diff --git a/libobjc/objc/deprecated/typedstream.h b/libobjc/objc/deprecated/typedstream.h deleted file mode 100644 index 4d948d5fb27..00000000000 --- a/libobjc/objc/deprecated/typedstream.h +++ /dev/null @@ -1,141 +0,0 @@ -/* GNU Objective-C Typed Streams interface. - Copyright (C) 1993, 1995, 2004, 2009 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 3, 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. - -Under Section 7 of GPL version 3, you are granted additional -permissions described in the GCC Runtime Library Exception, version -3.1, as published by the Free Software Foundation. - -You should have received a copy of the GNU General Public License and -a copy of the GCC Runtime Library Exception along with this program; -see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -<http://www.gnu.org/licenses/>. */ - - -#ifndef __typedstream_INCLUDE_GNU -#define __typedstream_INCLUDE_GNU - -/* The API in this file was entirely deprecated in GCC 4.6.0 and will - be removed in the following GCC release. -*/ - -#include <stdio.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -typedef int (*objc_typed_read_func)(void*, char*, int); -typedef int (*objc_typed_write_func)(void*, const char*, int); -typedef int (*objc_typed_flush_func)(void*); -typedef int (*objc_typed_eof_func)(void*); - -#define OBJC_READONLY 0x01 -#define OBJC_WRITEONLY 0x02 - -#define OBJC_MANAGED_STREAM 0x01 -#define OBJC_FILE_STREAM 0x02 -#define OBJC_MEMORY_STREAM 0x04 - -#define OBJC_TYPED_STREAM_VERSION 0x01 - -typedef struct objc_typed_stream { - void* physical; - cache_ptr object_table; /* read/written objects */ - cache_ptr stream_table; /* other read/written but shared things.. */ - cache_ptr class_table; /* class version mapping */ - cache_ptr object_refs; /* forward references */ - int mode; /* OBJC_READONLY or OBJC_WRITEONLY */ - int type; /* MANAGED, FILE, MEMORY etc bit string */ - int version; /* version used when writing */ - int writing_root_p; - objc_typed_read_func read; - objc_typed_write_func write; - objc_typed_eof_func eof; - objc_typed_flush_func flush; -} TypedStream; - -/* opcode masks */ -#define _B_VALUE 0x1fU -#define _B_CODE 0xe0U -#define _B_SIGN 0x10U -#define _B_NUMBER 0x0fU - -/* standard opcodes */ -#define _B_INVALID 0x00U -#define _B_SINT 0x20U -#define _B_NINT 0x40U -#define _B_SSTR 0x60U -#define _B_NSTR 0x80U -#define _B_RCOMM 0xa0U -#define _B_UCOMM 0xc0U -#define _B_EXT 0xe0U - -/* eXtension opcodes */ -#define _BX_OBJECT 0x00U -#define _BX_CLASS 0x01U -#define _BX_SEL 0x02U -#define _BX_OBJREF 0x03U -#define _BX_OBJROOT 0x04U -#define _BX_EXT 0x1fU - -/* -** Read and write objects as specified by TYPE. All the `last' -** arguments are pointers to the objects to read/write. -*/ - -int objc_write_type (TypedStream* stream, const char* type, const void* data) __attribute__ ((deprecated)); -int objc_read_type (TypedStream* stream, const char* type, void* data) __attribute__ ((deprecated)); - -int objc_write_types (TypedStream* stream, const char* type, ...) __attribute__ ((deprecated)); -int objc_read_types (TypedStream* stream, const char* type, ...) __attribute__ ((deprecated)); - -int objc_write_object_reference (TypedStream* stream, id object) __attribute__ ((deprecated)); -int objc_write_root_object (TypedStream* stream, id object) __attribute__ ((deprecated)); - -long objc_get_stream_class_version (TypedStream* stream, Class class_type) __attribute__ ((deprecated)); - - -/* -** Convenience functions -*/ - -int objc_write_array (TypedStream* stream, const char* type, - int count, const void* data) __attribute__ ((deprecated)); -int objc_read_array (TypedStream* stream, const char* type, - int count, void* data) __attribute__ ((deprecated)); - -int objc_write_object (TypedStream* stream, id object) __attribute__ ((deprecated)); -int objc_read_object (TypedStream* stream, id* object) __attribute__ ((deprecated)); - - - -/* -** Open a typed stream for reading or writing. MODE may be either of -** OBJC_READONLY or OBJC_WRITEONLY. -*/ - -TypedStream* objc_open_typed_stream (FILE* physical, int mode) __attribute__ ((deprecated)); -TypedStream* objc_open_typed_stream_for_file (const char* file_name, int mode) __attribute__ ((deprecated)); - -void objc_close_typed_stream (TypedStream* stream) __attribute__ ((deprecated)); - -BOOL objc_end_of_typed_stream (TypedStream* stream) __attribute__ ((deprecated)); -void objc_flush_typed_stream (TypedStream* stream) __attribute__ ((deprecated)); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* not __typedstream_INCLUDE_GNU */ diff --git a/libobjc/objc/hash.h b/libobjc/objc/hash.h deleted file mode 100644 index 8225a0992e4..00000000000 --- a/libobjc/objc/hash.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "objc.h" -#include "deprecated/hash.h" - diff --git a/libobjc/objc/objc-api.h b/libobjc/objc/objc-api.h index 521f79efb37..e6f6e26600d 100644 --- a/libobjc/objc/objc-api.h +++ b/libobjc/objc/objc-api.h @@ -49,9 +49,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* TODO: A deprecation warning any time the file is included ? */ #include "objc.h" -#ifndef GNU_LIBOBJC_COMPILING_LIBOBJC_ITSELF -# include "deprecated/hash.h" -#endif #include "thr.h" #include "objc-decls.h" #include <stdio.h> @@ -61,8 +58,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see extern "C" { #endif /* __cplusplus */ -#include "deprecated/METHOD_NULL.h" - /* Method descriptor returned by introspective Object methods. This is really just the first part of the more complete objc_method structure defined below and used internally by the runtime. */ @@ -109,9 +104,6 @@ struct objc_method_description equivalent to "*". */ #define _C_ATOM '%' -#include "deprecated/objc_error.h" - -#include "deprecated/struct_objc_static_instances.h" #include "deprecated/struct_objc_symtab.h" #include "deprecated/struct_objc_module.h" #include "deprecated/struct_objc_ivar.h" @@ -198,8 +190,6 @@ objc_EXPORT Class (*_objc_lookup_class)(const char *name); */ objc_EXPORT void (*_objc_load_callback)(Class _class, Category* category); -#include "deprecated/objc_object_alloc.h" - /* Standard functions for memory allocation and disposal. Users should use these functions in their ObjC programs so that they work so that @@ -223,11 +213,6 @@ objc_calloc(size_t nelem, size_t size); objc_EXPORT void objc_free(void *mem); -#include "deprecated/objc_valloc.h" -#include "deprecated/objc_malloc.h" - -#include "deprecated/objc_unexpected_exception.h" - objc_EXPORT Method_t class_get_class_method(MetaClass _class, SEL aSel); objc_EXPORT Method_t class_get_instance_method(Class _class, SEL aSel); @@ -399,8 +384,6 @@ object_is_meta_class (id object) && !object_is_class (object)); } -#include "deprecated/objc_get_uninstalled_dtable.h" - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/libobjc/objc/objc-list.h b/libobjc/objc/objc-list.h deleted file mode 100644 index b713a3c0ec9..00000000000 --- a/libobjc/objc/objc-list.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "deprecated/objc-list.h" - diff --git a/libobjc/objc/objc.h b/libobjc/objc/objc.h index ece0f884105..8719269bb35 100644 --- a/libobjc/objc/objc.h +++ b/libobjc/objc/objc.h @@ -125,8 +125,6 @@ typedef id (*IMP)(id, SEL, ...); compiler to do some type-checking. */ #define Nil (Class)0 -#include "deprecated/STR.h" - /* TODO: Move the 'Protocol' declaration into objc/runtime.h. A Protocol is simply an object, not a basic Objective-C type. The Apple runtime defines Protocol in objc/runtime.h too, so it's good diff --git a/libobjc/objc/sarray.h b/libobjc/objc/sarray.h deleted file mode 100644 index ff51e47f918..00000000000 --- a/libobjc/objc/sarray.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "deprecated/sarray.h" - diff --git a/libobjc/objc/typedstream.h b/libobjc/objc/typedstream.h deleted file mode 100644 index a39c51b29dc..00000000000 --- a/libobjc/objc/typedstream.h +++ /dev/null @@ -1,4 +0,0 @@ -#include "objc.h" -#include "deprecated/hash.h" -#include "deprecated/typedstream.h" - diff --git a/libobjc/objects.c b/libobjc/objects.c index 1c69456a630..bcfb25bd604 100644 --- a/libobjc/objects.c +++ b/libobjc/objects.c @@ -123,8 +123,3 @@ object_setClass (id object, Class class_) } } -/* Hook functions for memory allocation and disposal. Deprecated and - currently unused. */ -id (*_objc_object_alloc) (Class) = 0; -id (*_objc_object_dispose) (id) = 0; -id (*_objc_object_copy) (id) = 0; diff --git a/libobjc/sendmsg.c b/libobjc/sendmsg.c index c84e90f5b6e..bb525b155b4 100644 --- a/libobjc/sendmsg.c +++ b/libobjc/sendmsg.c @@ -936,9 +936,12 @@ __objc_block_forward (id rcv, SEL op, ...) } -/* This function is installed in the dispatch table for all methods - which are not implemented. Thus, it is called when a selector is - not recognized. */ +/* This function is called for methods which are not implemented, + unless a custom forwarding routine has been installed. Please note + that most serious users of libobjc (eg, GNUstep base) do install + their own forwarding routines, and hence this is never actually + used. But, if no custom forwarding routine is installed, this is + called when a selector is not recognized. */ static retval_t __objc_forward (id object, SEL sel, arglist_t args) { @@ -977,16 +980,8 @@ __objc_forward (id object, SEL sel, arglist_t args) : "instance" ), object->class_pointer->name, sel_getName (sel)); - /* TODO: support for error: is surely deprecated ? */ - err_sel = sel_get_any_uid ("error:"); - if (__objc_responds_to (object, err_sel)) - { - imp = get_implementation (object, object->class_pointer, err_sel); - return (*imp) (object, sel_get_any_uid ("error:"), msg); - } - - /* The object doesn't respond to doesNotRecognize: or error:; - Therefore, a default action is taken. */ + /* The object doesn't respond to doesNotRecognize:. Therefore, a + default action is taken. */ _objc_abort ("%s\n", msg); return 0; diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index ba7bd9cbc46..0aac5ae28ed 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,124 @@ +2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> + + * include/bits/hashtable.h (_Hashtable<>::_Hashtable(_Hashtable&&)): + Use std::move on the allocator, use noexcept. + (_Hashtable<>::~_Hashtable): Use noexcept. + * include/bits/stl_list.h: Likewise. + * include/bits/forward_list.h: Likewise. + * include/bits/stl_vector.h: Likewise. + * include/bits/stl_bvector.h: Likewise. + * include/bits/stl_map.h (map<>::map(map&&)): Use noexcept. + * include/bits/stl_set.h: Likewise. + * include/bits/stl_multimap.h: Likewise. + * include/bits/stl_multiset.h: Likewise. + * include/bits/stl_tree.h (_Rb_tree<>::_Rb_tree(_Rb_tree&&)): Use + std::move on the allocator. + (_Rb_tree<>::~_Rb_tree): Use noexcept. + * include/bits/stl_deque.h: Likewise. + * include/bits/basic_string.h (basic_string<>::~basic_string): Use + noexcept. + * include/ext/vstring.h (__versa_string<>::~__versa_string): Likewise. + * include/debug/set.h: Adjust. + * include/debug/unordered_map: Likewise. + * include/debug/multiset.h: Likewise. + * include/debug/forward_list: Likewise. + * include/debug/vector: Likewise. + * include/debug/unordered_set: Likewise. + * include/debug/deque: Likewise. + * include/debug/map.h: Likewise. + * include/debug/string: Likewise. + * include/debug/list: Likewise. + * include/debug/multimap.h: Likewise. + * include/profile/set.h: Likewise. + * include/profile/unordered_map: Likewise. + * include/profile/multiset.h: Likewise. + * include/profile/forward_list: Likewise. + * include/profile/unordered_set: Likewise. + * include/profile/vector: Likewise. + * include/profile/deque: Likewise. + * include/profile/map.h: Likewise. + * include/profile/list: Likewise. + * include/profile/multimap.h: Likewise. + * testsuite/21_strings/basic_string/cons/wchar_t/ + noexcept_move_construct.cc: New. + * testsuite/21_strings/basic_string/cons/char/ + noexcept_move_construct.cc: Likewise. + * testsuite/ext/vstring/cons/noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/unordered_map/cons/ + noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/multimap/cons/ + noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/set/cons/ + noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/unordered_multimap/cons/ + noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/forward_list/cons/ + noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/unordered_set/cons/ + noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/vector/bool/cons/ + noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/vector/cons/ + noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/multiset/cons/ + noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/list/cons/ + noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/unordered_multiset/cons/ + noexcept_move_construct.cc: Likewise. + * testsuite/23_containers/map/cons/noexcept_move_construct.cc + * testsuite/23_containers/forward_list/requirements/dr438/ + assign_neg.cc: Adjust dg-error line numbers. + * testsuite/23_containers/forward_list/requirements/dr438/ + insert_neg.cc: Likewise. + * testsuite/23_containers/forward_list/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/forward_list/requirements/dr438/ + constructor_2_neg.cc: Likewise. + * testsuite/23_containers/vector/requirements/dr438/ + assign_neg.cc: Likewise. + * testsuite/23_containers/vector/requirements/dr438/ + insert_neg.cc: Likewise. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/vector/requirements/dr438/ + constructor_2_neg.cc: Likewise. + * testsuite/23_containers/deque/requirements/dr438/ + assign_neg.cc: Likewise. + * testsuite/23_containers/deque/requirements/dr438/ + insert_neg.cc: Likewise. + * testsuite/23_containers/deque/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/deque/requirements/dr438/ + constructor_2_neg.cc: Likewise. + * testsuite/23_containers/list/requirements/dr438/ + assign_neg.cc: Likewise. + * testsuite/23_containers/list/requirements/dr438/ + insert_neg.cc: Likewise. + * testsuite/23_containers/list/requirements/dr438/ + constructor_1_neg.cc: Likewise. + * testsuite/23_containers/list/requirements/dr438/ + constructor_2_neg.cc: Likewise. + + * include/bits/move.h (swap): Use __and_ in the noexcept. + * include/bits/algorithmfwd.h: Adjust. + +2011-05-31 Paolo Carlini <paolo.carlini@oracle.com> + + * include/bits/basic_string.h: Use noexcept per the FDIS (minus + compare(const string&), which uses char_traits::compare, which + isn't noexcept; also no noexcept in the move assignment operator + and move assign, see c++std-lib-30855). + * include/bits/basic_string.tcc: Likewise. + * include/ext/vstring.h: Likewise. + * include/ext/vstring.tcc: Likewise. + * include/debug/string: Likewise. + +2011-05-31 Jonathan Wakely <jwakely.gcc@gmail.com> + + * doc/xml/manual/status_cxx200x.xml: Update. + * doc/html/*: Regenerate. + 2011-05-30 Paolo Carlini <paolo.carlini@oracle.com> * include/std/type_traits (__or_, __and_): Add trivial definitions diff --git a/libstdc++-v3/doc/html/api.html b/libstdc++-v3/doc/html/api.html index f27a65c8a68..c70a8dfe731 100644 --- a/libstdc++-v3/doc/html/api.html +++ b/libstdc++-v3/doc/html/api.html @@ -7,7 +7,7 @@ <a class="link" href="http://www.fsf.org/">FSF </a> - </p></div><div><div class="legalnotice" title="Legal Notice"><a id="id417470"/><p> + </p></div><div><div class="legalnotice" title="Legal Notice"><a id="id373498"/><p> <a class="link" href="manual/license.html" title="License">License </a> </p></div></div></div><hr/></div><p> diff --git a/libstdc++-v3/doc/html/faq.html b/libstdc++-v3/doc/html/faq.html index 2eecd342830..7667530732a 100644 --- a/libstdc++-v3/doc/html/faq.html +++ b/libstdc++-v3/doc/html/faq.html @@ -4,7 +4,7 @@ 2008, 2010 <a class="link" href="http://www.fsf.org">FSF</a> - </p></div></div><hr/></div><div class="qandaset" title="Frequently Asked Questions"><a id="id404266"/><dl><dt/><dd><dl><dt>1.1. <a href="faq.html#faq.what"> + </p></div></div><hr/></div><div class="qandaset" title="Frequently Asked Questions"><a id="id398779"/><dl><dt/><dd><dl><dt>1.1. <a href="faq.html#faq.what"> What is libstdc++? </a></dt><dt>1.2. <a href="faq.html#faq.why"> Why should I use libstdc++? diff --git a/libstdc++-v3/doc/html/manual/abi.html b/libstdc++-v3/doc/html/manual/abi.html index 769b1a61c67..436be2d5e85 100644 --- a/libstdc++-v3/doc/html/manual/abi.html +++ b/libstdc++-v3/doc/html/manual/abi.html @@ -482,38 +482,38 @@ gcc test.c -g -O2 -L. -lone -ltwo /usr/lib/libstdc++.so.5 /usr/lib/libstdc++.so. <a class="link" href="http://gcc.gnu.org/PR24660">24660: versioning weak symbols in libstdc++</a> </p><p> <a class="link" href="http://gcc.gnu.org/PR19664">19664: libstdc++ headers should have pop/push of the visibility around the declarations</a> -</p></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"/>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id519848"/><p><span class="biblioid"> +</p></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="abi.biblio"/>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id491668"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> ABIcheck, a vague idea of checking ABI compatibility - </em>. </span></p></div><div class="biblioentry"><a id="id519865"/><p><span class="biblioid"> + </em>. </span></p></div><div class="biblioentry"><a id="id491685"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> C++ ABI Reference - </em>. </span></p></div><div class="biblioentry"><a id="id519882"/><p><span class="biblioid"> + </em>. </span></p></div><div class="biblioentry"><a id="id491703"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Intel Compilers for Linux Compatibility with the GNU Compilers - </em>. </span></p></div><div class="biblioentry"><a id="id519900"/><p><span class="biblioid"> + </em>. </span></p></div><div class="biblioentry"><a id="id491720"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Linker and Libraries Guide (document 819-0690) - </em>. </span></p></div><div class="biblioentry"><a id="id519918"/><p><span class="biblioid"> + </em>. </span></p></div><div class="biblioentry"><a id="id491738"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Sun Studio 11: C++ Migration Guide (document 819-3689) - </em>. </span></p></div><div class="biblioentry"><a id="id519935"/><p><span class="biblioid"> + </em>. </span></p></div><div class="biblioentry"><a id="id491756"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> How to Write Shared Libraries - </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span></p></div><div class="biblioentry"><a id="id519966"/><p><span class="biblioid"> + </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span></p></div><div class="biblioentry"><a id="id491787"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> C++ ABI for the ARM Architecture - </em>. </span></p></div><div class="biblioentry"><a id="id519984"/><p><span class="biblioid"> + </em>. </span></p></div><div class="biblioentry"><a id="id491804"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Dynamic Shared Objects: Survey and Issues </em>. </span><span class="subtitle"> ISO C++ J16/06-0046 - . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry"><a id="id520014"/><p><span class="biblioid"> + . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry"><a id="id491834"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Versioning With Namespaces </em>. </span><span class="subtitle"> ISO C++ J16/06-0083 - . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry"><a id="id520043"/><p><span class="biblioid"> + . </span><span class="author"><span class="firstname">Benjamin</span> <span class="surname">Kosnik</span>. </span></p></div><div class="biblioentry"><a id="id491863"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Binary Compatibility of Shared Libraries Implemented in C++ on GNU/Linux Systems diff --git a/libstdc++-v3/doc/html/manual/algorithms.html b/libstdc++-v3/doc/html/manual/algorithms.html index a508625a00e..8cf55cf8651 100644 --- a/libstdc++-v3/doc/html/manual/algorithms.html +++ b/libstdc++-v3/doc/html/manual/algorithms.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="numerics.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 11. Algorithms"><div class="titlepage"><div><div><h2 class="title"><a id="std.algorithms"/>Chapter 11. Algorithms - <a id="id498396" class="indexterm"/> + <a id="id470215" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="algorithms.html#std.algorithms.mutating">Mutating</a></span></dt><dd><dl><dt><span class="section"><a href="algorithms.html#algorithms.mutating.swap"><code class="function">swap</code></a></span></dt></dl></dd></dl></div><p> The neatest accomplishment of the algorithms sect1 is that all the work is done via iterators, not containers directly. This means two diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html index 1511ab51874..cd9541d01ba 100644 --- a/libstdc++-v3/doc/html/manual/api.html +++ b/libstdc++-v3/doc/html/manual/api.html @@ -75,11 +75,11 @@ _Alloc_traits</code> have been removed. <span class="type">__alloc</span> to select an underlying allocator that satisfied memory allocation requests. The selection of this underlying allocator was not user-configurable. - </p><div class="table"><a id="id520604"/><p class="title"><strong>Table B.6. Extension Allocators</strong></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Allocator (3.4)</th><th style="text-align: left">Header (3.4)</th><th style="text-align: left">Allocator (3.[0-3])</th><th style="text-align: left">Header (3.[0-3])</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">__gnu_cxx::new_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/new_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__new_alloc</code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::malloc_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/malloc_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__malloc_alloc_template<int></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::debug_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/debug_allocator.h</code></td><td style="text-align: left"><code class="classname">std::debug_alloc<T></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::__pool_alloc<T></code></td><td style="text-align: left"><code class="filename">ext/pool_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__default_alloc_template<bool,int></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::__mt_alloc<T></code></td><td style="text-align: left"><code class="filename">ext/mt_allocator.h</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::bitmap_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/bitmap_allocator.h</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr></tbody></table></div></div><br class="table-break"/><p> Releases after gcc-3.4 have continued to add to the collection + </p><div class="table"><a id="id492424"/><p class="title"><strong>Table B.6. Extension Allocators</strong></p><div class="table-contents"><table summary="Extension Allocators" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Allocator (3.4)</th><th style="text-align: left">Header (3.4)</th><th style="text-align: left">Allocator (3.[0-3])</th><th style="text-align: left">Header (3.[0-3])</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">__gnu_cxx::new_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/new_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__new_alloc</code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::malloc_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/malloc_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__malloc_alloc_template<int></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::debug_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/debug_allocator.h</code></td><td style="text-align: left"><code class="classname">std::debug_alloc<T></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::__pool_alloc<T></code></td><td style="text-align: left"><code class="filename">ext/pool_allocator.h</code></td><td style="text-align: left"><code class="classname">std::__default_alloc_template<bool,int></code></td><td style="text-align: left"><code class="filename">memory</code></td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::__mt_alloc<T></code></td><td style="text-align: left"><code class="filename">ext/mt_allocator.h</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::bitmap_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/bitmap_allocator.h</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr></tbody></table></div></div><br class="table-break"/><p> Releases after gcc-3.4 have continued to add to the collection of available allocators. All of these new allocators are standard-style. The following table includes details, along with the first released version of GCC that included the extension allocator. - </p><div class="table"><a id="id520834"/><p class="title"><strong>Table B.7. Extension Allocators Continued</strong></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/></colgroup><thead><tr><th style="text-align: left">Allocator</th><th style="text-align: left">Include</th><th style="text-align: left">Version</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">__gnu_cxx::array_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/array_allocator.h</code></td><td style="text-align: left">4.0.0</td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::throw_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/throw_allocator.h</code></td><td style="text-align: left">4.2.0</td></tr></tbody></table></div></div><br class="table-break"/><p> + </p><div class="table"><a id="id492654"/><p class="title"><strong>Table B.7. Extension Allocators Continued</strong></p><div class="table-contents"><table summary="Extension Allocators Continued" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/></colgroup><thead><tr><th style="text-align: left">Allocator</th><th style="text-align: left">Include</th><th style="text-align: left">Version</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">__gnu_cxx::array_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/array_allocator.h</code></td><td style="text-align: left">4.0.0</td></tr><tr><td style="text-align: left"><code class="classname">__gnu_cxx::throw_allocator<T></code></td><td style="text-align: left"><code class="filename">ext/throw_allocator.h</code></td><td style="text-align: left">4.2.0</td></tr></tbody></table></div></div><br class="table-break"/><p> Debug mode first appears. </p><p> Precompiled header support <acronym class="acronym">PCH</acronym> support. diff --git a/libstdc++-v3/doc/html/manual/appendix_contributing.html b/libstdc++-v3/doc/html/manual/appendix_contributing.html index e591a5bf834..bbf124164d2 100644 --- a/libstdc++-v3/doc/html/manual/appendix_contributing.html +++ b/libstdc++-v3/doc/html/manual/appendix_contributing.html @@ -7,7 +7,7 @@ Appendices </th><td align="right"> <a accesskey="n" href="source_organization.html">Next</a></td></tr></table><hr/></div><div class="appendix" title="Appendix A. Contributing"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.contrib"/> Contributing - <a id="id511400" class="indexterm"/> + <a id="id483220" class="indexterm"/> </h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="appendix_contributing.html#contrib.list">Contributor Checklist</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_contributing.html#list.reading">Reading</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.copyright">Assignment</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.getting">Getting Sources</a></span></dt><dt><span class="section"><a href="appendix_contributing.html#list.patches">Submitting Patches</a></span></dt></dl></dd><dt><span class="section"><a href="source_organization.html">Directory Layout and Source Conventions</a></span></dt><dt><span class="section"><a href="source_code_style.html">Coding Style</a></span></dt><dd><dl><dt><span class="section"><a href="source_code_style.html#coding_style.bad_identifiers">Bad Identifiers</a></span></dt><dt><span class="section"><a href="source_code_style.html#coding_style.example">By Example</a></span></dt></dl></dd><dt><span class="section"><a href="source_design_notes.html">Design Notes</a></span></dt></dl></div><p> The GNU C++ Library follows an open development model. Active contributors are assigned maintainer-ship responsibility, and given diff --git a/libstdc++-v3/doc/html/manual/appendix_free.html b/libstdc++-v3/doc/html/manual/appendix_free.html index 02af726d1be..8449abb6184 100644 --- a/libstdc++-v3/doc/html/manual/appendix_free.html +++ b/libstdc++-v3/doc/html/manual/appendix_free.html @@ -7,7 +7,7 @@ Appendices </th><td align="right"> <a accesskey="n" href="appendix_gpl.html">Next</a></td></tr></table><hr/></div><div class="appendix" title="Appendix C. Free Software Needs Free Documentation"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.free"/> Free Software Needs Free Documentation - <a id="id523773" class="indexterm"/> + <a id="id495593" class="indexterm"/> </h1></div></div></div><p> The biggest deficiency in free operating systems is not in the software--it is the lack of good free manuals that we can include in diff --git a/libstdc++-v3/doc/html/manual/appendix_gpl.html b/libstdc++-v3/doc/html/manual/appendix_gpl.html index ee1af6c937c..376ac4ebd30 100644 --- a/libstdc++-v3/doc/html/manual/appendix_gpl.html +++ b/libstdc++-v3/doc/html/manual/appendix_gpl.html @@ -78,7 +78,7 @@ </p><p> The precise terms and conditions for copying, distribution and modification follow. - </p><h2><a id="id524112"/> + </p><h2><a id="id495933"/> TERMS AND CONDITIONS </h2><h2><a id="gpl-3-definitions"/> 0. Definitions. @@ -619,7 +619,7 @@ waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. - </p><h2><a id="id524936"/> + </p><h2><a id="id496756"/> END OF TERMS AND CONDITIONS </h2><h2><a id="HowToApply"/> How to Apply These Terms to Your New Programs diff --git a/libstdc++-v3/doc/html/manual/appendix_porting.html b/libstdc++-v3/doc/html/manual/appendix_porting.html index 6a4e9fd97ea..9fc23776388 100644 --- a/libstdc++-v3/doc/html/manual/appendix_porting.html +++ b/libstdc++-v3/doc/html/manual/appendix_porting.html @@ -7,7 +7,7 @@ Appendices </th><td align="right"> <a accesskey="n" href="documentation_hacking.html">Next</a></td></tr></table><hr/></div><div class="appendix" title="Appendix B. Porting and Maintenance"><div class="titlepage"><div><div><h1 class="title"><a id="appendix.porting"/> Porting and Maintenance - <a id="id512518" class="indexterm"/> + <a id="id484338" class="indexterm"/> </h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="appendix_porting.html#appendix.porting.build_hacking">Configure and Build Hacking</a></span></dt><dd><dl><dt><span class="section"><a href="appendix_porting.html#build_hacking.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.map">Overview: What Comes from Where</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.scripts">Storing Information in non-AC files (like configure.host)</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.conventions">Coding and Commenting Conventions</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.acinclude">The acinclude.m4 layout</a></span></dt><dt><span class="section"><a href="appendix_porting.html#build_hacking.enable"><code class="constant">GLIBCXX_ENABLE</code>, the <code class="literal">--enable</code> maker</a></span></dt></dl></dd><dt><span class="section"><a href="documentation_hacking.html">Writing and Generating Documentation</a></span></dt><dd><dl><dt><span class="section"><a href="documentation_hacking.html#doc.intro">Introduction</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doc.generation">Generating Documentation</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doc.doxygen">Doxygen</a></span></dt><dt><span class="section"><a href="documentation_hacking.html#doc.docbook">Docbook</a></span></dt></dl></dd><dt><span class="section"><a href="internals.html">Porting to New Hardware or Operating Systems</a></span></dt><dd><dl><dt><span class="section"><a href="internals.html#internals.os">Operating System</a></span></dt><dt><span class="section"><a href="internals.html#internals.cpu">CPU</a></span></dt><dt><span class="section"><a href="internals.html#internals.char_types">Character Types</a></span></dt><dt><span class="section"><a href="internals.html#internals.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="internals.html#internals.numeric_limits">Numeric Limits</a></span></dt><dt><span class="section"><a href="internals.html#internals.libtool">Libtool</a></span></dt></dl></dd><dt><span class="section"><a href="test.html">Test</a></span></dt><dd><dl><dt><span class="section"><a href="test.html#test.organization">Organization</a></span></dt><dt><span class="section"><a href="test.html#test.run">Running the Testsuite</a></span></dt><dt><span class="section"><a href="test.html#test.new_tests">Writing a new test case</a></span></dt><dt><span class="section"><a href="test.html#test.harness">Test Harness and Utilities</a></span></dt><dt><span class="section"><a href="test.html#test.special">Special Topics</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dt><span class="section"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing">Testing</a></span></dt><dt><span class="section"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="section"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_440"><code class="constant">4.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_450"><code class="constant">4.5</code></a></span></dt></dl></dd><dt><span class="section"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third">Third</a></span></dt></dl></dd></dl></div><div class="section" title="Configure and Build Hacking"><div class="titlepage"><div><div><h2 class="title"><a id="appendix.porting.build_hacking"/>Configure and Build Hacking</h2></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.prereq"/>Prerequisites</h3></div></div></div><p> As noted <a class="link" href="http://gcc.gnu.org/install/prerequisites.html">previously</a>, certain other tools are necessary for hacking on files that @@ -19,7 +19,7 @@ in GCC try to stay in sync with each other in terms of versions of the auto-tools used, so please try to play nicely with the neighbors. - </p></div><div class="section" title="Overview: What Comes from Where"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.map"/>Overview: What Comes from Where</h3></div></div></div><div class="figure"><a id="id512650"/><p class="title"><strong>Figure B.1. Configure and Build File Dependencies</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="/mnt/share/src/gcc.svn-trunk/libstdc++-v3/doc/xml/images/confdeps.png" style="text-align: middle" alt="Dependency Graph for Configure and Build Files"/></div></div></div><br class="figure-break"/><p> + </p></div><div class="section" title="Overview: What Comes from Where"><div class="titlepage"><div><div><h3 class="title"><a id="build_hacking.map"/>Overview: What Comes from Where</h3></div></div></div><div class="figure"><a id="id484470"/><p class="title"><strong>Figure B.1. Configure and Build File Dependencies</strong></p><div class="figure-contents"><div class="mediaobject" style="text-align: center"><img src="/mnt/share/src/gcc.svn-trunk/libstdc++-v3/doc/xml/images/confdeps.png" style="text-align: middle" alt="Dependency Graph for Configure and Build Files"/></div></div></div><br class="figure-break"/><p> Regenerate all generated files by using the command sequence <code class="code">"autoreconf"</code> at the top level of the libstdc++ source directory. The following will also work, but is much more complex: diff --git a/libstdc++-v3/doc/html/manual/atomics.html b/libstdc++-v3/doc/html/manual/atomics.html index 392322d1a3c..1a24059a904 100644 --- a/libstdc++-v3/doc/html/manual/atomics.html +++ b/libstdc++-v3/doc/html/manual/atomics.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="concurrency.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 14. Atomics"><div class="titlepage"><div><div><h2 class="title"><a id="std.atomics"/>Chapter 14. Atomics - <a id="id500047" class="indexterm"/> + <a id="id471867" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="atomics.html#std.atomics.api">API Reference</a></span></dt></dl></div><p> Facilities for atomic operations. </p><div class="section" title="API Reference"><div class="titlepage"><div><div><h2 class="title"><a id="std.atomics.api"/>API Reference</h2></div></div></div><p> diff --git a/libstdc++-v3/doc/html/manual/backwards.html b/libstdc++-v3/doc/html/manual/backwards.html index 8c4695c8789..2497438a1e9 100644 --- a/libstdc++-v3/doc/html/manual/backwards.html +++ b/libstdc++-v3/doc/html/manual/backwards.html @@ -17,8 +17,8 @@ ISO Standard (e.g., statistical analysis). While there are a lot of really useful things that are used by a lot of people, the Standards Committee couldn't include everything, and so a lot of those <span class="quote">“<span class="quote">obvious</span>”</span> classes didn't get included. -</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="section" title="No ios_base"><div class="titlepage"><div><div><h4 class="title"><a id="id522327"/>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>. -</p></div><div class="section" title="No cout in ostream.h, no cin in istream.h"><div class="titlepage"><div><div><h4 class="title"><a id="id522360"/>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p> +</p><p>Known Issues include many of the limitations of its immediate ancestor.</p><p>Portability notes and known implementation limitations are as follows.</p><div class="section" title="No ios_base"><div class="titlepage"><div><div><h4 class="title"><a id="id494148"/>No <code class="code">ios_base</code></h4></div></div></div><p> At least some older implementations don't have <code class="code">std::ios_base</code>, so you should use <code class="code">std::ios::badbit</code>, <code class="code">std::ios::failbit</code> and <code class="code">std::ios::eofbit</code> and <code class="code">std::ios::goodbit</code>. +</p></div><div class="section" title="No cout in ostream.h, no cin in istream.h"><div class="titlepage"><div><div><h4 class="title"><a id="id494180"/>No <code class="code">cout</code> in <code class="code">ostream.h</code>, no <code class="code">cin</code> in <code class="code">istream.h</code></h4></div></div></div><p> In earlier versions of the standard, <code class="filename">fstream.h</code>, <code class="filename">ostream.h</code> @@ -44,7 +44,7 @@ considered replaced and rewritten. archived. The code is considered replaced and rewritten. </p><p> Portability notes and known implementation limitations are as follows. -</p><div class="section" title="Namespace std:: not supported"><div class="titlepage"><div><div><h4 class="title"><a id="id522463"/>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p> +</p><div class="section" title="Namespace std:: not supported"><div class="titlepage"><div><div><h4 class="title"><a id="id494283"/>Namespace <code class="code">std::</code> not supported</h4></div></div></div><p> Some care is required to support C++ compiler and or library implementation that do not have the standard library in <code class="code">namespace std</code>. @@ -108,7 +108,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [ AC_DEFINE(HAVE_NAMESPACE_STD,,[Define if g++ supports namespace std. ]) fi ]) -</pre></div><div class="section" title="Illegal iterator usage"><div class="titlepage"><div><div><h4 class="title"><a id="id522589"/>Illegal iterator usage</h4></div></div></div><p> +</pre></div><div class="section" title="Illegal iterator usage"><div class="titlepage"><div><div><h4 class="title"><a id="id494409"/>Illegal iterator usage</h4></div></div></div><p> The following illustrate implementation-allowed illegal iterator use, and then correct use. </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p> @@ -121,7 +121,7 @@ AC_DEFUN([AC_CXX_NAMESPACE_STD], [ </p></li><li class="listitem"><p> <code class="code">if (iterator)</code> won't work any more => use <code class="code">if (iterator != iterator_type())</code> - </p></li></ul></div></div><div class="section" title="isspace from cctype is a macro"><div class="titlepage"><div><div><h4 class="title"><a id="id522650"/><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro + </p></li></ul></div></div><div class="section" title="isspace from cctype is a macro"><div class="titlepage"><div><div><h4 class="title"><a id="id494471"/><code class="code">isspace</code> from <code class="filename">cctype</code> is a macro </h4></div></div></div><p> Glibc 2.0.x and 2.1.x define <code class="filename">ctype.h</code> functionality as macros (isspace, isalpha etc.). @@ -154,7 +154,7 @@ std:: (__ctype_b[(int) ( ( 'X' ) )] & (unsigned short int) _ISspace ) ; (<code class="filename">ctype.h</code>) and the definitions in namespace <code class="code">std::</code> (<code class="code"><cctype></code>). -</p></div><div class="section" title="No vector::at, deque::at, string::at"><div class="titlepage"><div><div><h4 class="title"><a id="id522746"/>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p> +</p></div><div class="section" title="No vector::at, deque::at, string::at"><div class="titlepage"><div><div><h4 class="title"><a id="id494566"/>No <code class="code">vector::at</code>, <code class="code">deque::at</code>, <code class="code">string::at</code></h4></div></div></div><p> One solution is to add an autoconf-test for this: </p><pre class="programlisting"> AC_MSG_CHECKING(for container::at) @@ -180,7 +180,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)], </pre><p> If you are using other (non-GNU) compilers it might be a good idea to check for <code class="code">string::at</code> separately. -</p></div><div class="section" title="No std::char_traits<char>::eof"><div class="titlepage"><div><div><h4 class="title"><a id="id522785"/>No <code class="code">std::char_traits<char>::eof</code></h4></div></div></div><p> +</p></div><div class="section" title="No std::char_traits<char>::eof"><div class="titlepage"><div><div><h4 class="title"><a id="id494605"/>No <code class="code">std::char_traits<char>::eof</code></h4></div></div></div><p> Use some kind of autoconf test, plus this: </p><pre class="programlisting"> #ifdef HAVE_CHAR_TRAITS @@ -188,7 +188,7 @@ AC_DEFINE(HAVE_CONTAINER_AT)], #else #define CPP_EOF EOF #endif -</pre></div><div class="section" title="No string::clear"><div class="titlepage"><div><div><h4 class="title"><a id="id522803"/>No <code class="code">string::clear</code></h4></div></div></div><p> +</pre></div><div class="section" title="No string::clear"><div class="titlepage"><div><div><h4 class="title"><a id="id494623"/>No <code class="code">string::clear</code></h4></div></div></div><p> There are two functions for deleting the contents of a string: <code class="code">clear</code> and <code class="code">erase</code> (the latter returns the string). @@ -206,12 +206,12 @@ erase(size_type __pos = 0, size_type __n = npos) Unfortunately, <code class="code">clear</code> is not implemented in this version, so you should use <code class="code">erase</code> (which is probably faster than <code class="code">operator=(charT*)</code>). -</p></div><div class="section" title="Removal of ostream::form and istream::scan extensions"><div class="titlepage"><div><div><h4 class="title"><a id="id522849"/> +</p></div><div class="section" title="Removal of ostream::form and istream::scan extensions"><div class="titlepage"><div><div><h4 class="title"><a id="id494669"/> Removal of <code class="code">ostream::form</code> and <code class="code">istream::scan</code> extensions </h4></div></div></div><p> These are no longer supported. Please use stringstreams instead. -</p></div><div class="section" title="No basic_stringbuf, basic_stringstream"><div class="titlepage"><div><div><h4 class="title"><a id="id522868"/>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p> +</p></div><div class="section" title="No basic_stringbuf, basic_stringstream"><div class="titlepage"><div><div><h4 class="title"><a id="id494688"/>No <code class="code">basic_stringbuf</code>, <code class="code">basic_stringstream</code></h4></div></div></div><p> Although the ISO standard <code class="code">i/ostringstream</code>-classes are provided, (<code class="filename">sstream</code>), for compatibility with older implementations the pre-ISO @@ -299,14 +299,14 @@ any = temp; Another example of using stringstreams is in <a class="link" href="strings.html#strings.string.shrink" title="Shrink to Fit">this howto</a>. </p><p> There is additional information in the libstdc++-v2 info files, in particular <span class="quote">“<span class="quote">info iostream</span>”</span>. -</p></div><div class="section" title="Little or no wide character support"><div class="titlepage"><div><div><h4 class="title"><a id="id523024"/>Little or no wide character support</h4></div></div></div><p> +</p></div><div class="section" title="Little or no wide character support"><div class="titlepage"><div><div><h4 class="title"><a id="id494844"/>Little or no wide character support</h4></div></div></div><p> Classes <code class="classname">wstring</code> and <code class="classname">char_traits<wchar_t></code> are not supported. - </p></div><div class="section" title="No templatized iostreams"><div class="titlepage"><div><div><h4 class="title"><a id="id523042"/>No templatized iostreams</h4></div></div></div><p> + </p></div><div class="section" title="No templatized iostreams"><div class="titlepage"><div><div><h4 class="title"><a id="id494863"/>No templatized iostreams</h4></div></div></div><p> Classes <code class="classname">wfilebuf</code> and <code class="classname">wstringstream</code> are not supported. - </p></div><div class="section" title="Thread safety issues"><div class="titlepage"><div><div><h4 class="title"><a id="id523061"/>Thread safety issues</h4></div></div></div><p> + </p></div><div class="section" title="Thread safety issues"><div class="titlepage"><div><div><h4 class="title"><a id="id494881"/>Thread safety issues</h4></div></div></div><p> Earlier GCC releases had a somewhat different approach to threading configuration and proper compilation. Before GCC 3.0, configuration of the threading model was dictated by compiler @@ -364,7 +364,7 @@ libstdc++-v3. of the SGI STL (version 3.3), with extensive changes. </p><p>A more formal description of the V3 goals can be found in the official <a class="link" href="source_design_notes.html" title="Design Notes">design document</a>. - </p><p>Portability notes and known implementation limitations are as follows.</p><div class="section" title="Pre-ISO headers moved to backwards or removed"><div class="titlepage"><div><div><h4 class="title"><a id="id523185"/>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers + </p><p>Portability notes and known implementation limitations are as follows.</p><div class="section" title="Pre-ISO headers moved to backwards or removed"><div class="titlepage"><div><div><h4 class="title"><a id="id495006"/>Pre-ISO headers moved to backwards or removed</h4></div></div></div><p> The pre-ISO C++ headers (<code class="code">iostream.h</code>, <code class="code">defalloc.h</code> etc.) are available, unlike previous libstdc++ versions, but inclusion generates a warning that you are using deprecated headers. @@ -436,7 +436,7 @@ like <code class="filename">vector.h</code> can be replaced with <code class="fi directive <code class="code">using namespace std;</code> can be put at the global scope. This should be enough to get this code compiling, assuming the other usage is correct. -</p></div><div class="section" title="Extension headers hash_map, hash_set moved to ext or backwards"><div class="titlepage"><div><div><h4 class="title"><a id="id523270"/>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been +</p></div><div class="section" title="Extension headers hash_map, hash_set moved to ext or backwards"><div class="titlepage"><div><div><h4 class="title"><a id="id495090"/>Extension headers hash_map, hash_set moved to ext or backwards</h4></div></div></div><p>At this time most of the features of the SGI STL extension have been replaced by standardized libraries. In particular, the unordered_map and unordered_set containers of TR1 are suitable replacement for the non-standard hash_map and hash_set @@ -508,7 +508,7 @@ AC_DEFUN([AC_HEADER_EXT_HASH_SET], [ AC_DEFINE(HAVE_EXT_HASH_SET,,[Define if ext/hash_set is present. ]) fi ]) -</pre></div><div class="section" title="No ios::nocreate/ios::noreplace."><div class="titlepage"><div><div><h4 class="title"><a id="id523373"/>No <code class="code">ios::nocreate/ios::noreplace</code>. +</pre></div><div class="section" title="No ios::nocreate/ios::noreplace."><div class="titlepage"><div><div><h4 class="title"><a id="id495193"/>No <code class="code">ios::nocreate/ios::noreplace</code>. </h4></div></div></div><p> The existence of <code class="code">ios::nocreate</code> being used for input-streams has been confirmed, most probably because the author thought it would be more correct to specify nocreate explicitly. So @@ -519,7 +519,7 @@ open the file for reading, check if it has been opened, and then decide whether you want to create/replace or not. To my knowledge, even older implementations support <code class="code">app</code>, <code class="code">ate</code> and <code class="code">trunc</code> (except for <code class="code">app</code> ?). -</p></div><div class="section" title="No stream::attach(int fd)"><div class="titlepage"><div><div><h4 class="title"><a id="id523421"/> +</p></div><div class="section" title="No stream::attach(int fd)"><div class="titlepage"><div><div><h4 class="title"><a id="id495241"/> No <code class="code">stream::attach(int fd)</code> </h4></div></div></div><p> Phil Edwards writes: It was considered and rejected for the ISO @@ -542,7 +542,7 @@ No <code class="code">stream::attach(int fd)</code> For another example of this, refer to <a class="link" href="http://www.josuttis.com/cppcode/fdstream.html">fdstream example</a> by Nicolai Josuttis. -</p></div><div class="section" title="Support for C++98 dialect."><div class="titlepage"><div><div><h4 class="title"><a id="id523489"/> +</p></div><div class="section" title="Support for C++98 dialect."><div class="titlepage"><div><div><h4 class="title"><a id="id495309"/> Support for C++98 dialect. </h4></div></div></div><p>Check for complete library coverage of the C++1998/2003 standard. </p><pre class="programlisting"> @@ -610,7 +610,7 @@ AC_DEFUN([AC_HEADER_STDCXX_98], [ AC_DEFINE(STDCXX_98_HEADERS,,[Define if ISO C++ 1998 header files are present. ]) fi ]) -</pre></div><div class="section" title="Support for C++TR1 dialect."><div class="titlepage"><div><div><h4 class="title"><a id="id523516"/> +</pre></div><div class="section" title="Support for C++TR1 dialect."><div class="titlepage"><div><div><h4 class="title"><a id="id495337"/> Support for C++TR1 dialect. </h4></div></div></div><p>Check for library coverage of the TR1 standard. </p><pre class="programlisting"> @@ -687,7 +687,7 @@ AC_DEFUN([AC_HEADER_TR1_UNORDERED_SET], [ AC_DEFINE(HAVE_TR1_UNORDERED_SET,,[Define if tr1/unordered_set is present. ]) fi ]) -</pre></div><div class="section" title="Support for C++0x dialect."><div class="titlepage"><div><div><h4 class="title"><a id="id523560"/> +</pre></div><div class="section" title="Support for C++0x dialect."><div class="titlepage"><div><div><h4 class="title"><a id="id495381"/> Support for C++0x dialect. </h4></div></div></div><p>Check for baseline language coverage in the compiler for the C++0xstandard. </p><pre class="programlisting"> @@ -899,19 +899,19 @@ AC_DEFUN([AC_HEADER_UNORDERED_SET], [ AC_DEFINE(HAVE_UNORDERED_SET,,[Define if unordered_set is present. ]) fi ]) -</pre></div><div class="section" title="Container::iterator_type is not necessarily Container::value_type*"><div class="titlepage"><div><div><h4 class="title"><a id="id523639"/> +</pre></div><div class="section" title="Container::iterator_type is not necessarily Container::value_type*"><div class="titlepage"><div><div><h4 class="title"><a id="id495459"/> Container::iterator_type is not necessarily Container::value_type* </h4></div></div></div><p> This is a change in behavior from the previous version. Now, most <span class="type">iterator_type</span> typedefs in container classes are POD objects, not <span class="type">value_type</span> pointers. -</p></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"/>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id523669"/><p><span class="biblioid"> +</p></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="backwards.biblio"/>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id495489"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Migrating to GCC 4.1 - </em>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span></p></div><div class="biblioentry"><a id="id523695"/><p><span class="biblioid"> + </em>. </span><span class="author"><span class="firstname">Dan</span> <span class="surname">Kegel</span>. </span></p></div><div class="biblioentry"><a id="id495515"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Building the Whole Debian Archive with GCC 4.1: A Summary - </em>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span></p></div><div class="biblioentry"><a id="id523721"/><p><span class="biblioid"> + </em>. </span><span class="author"><span class="firstname">Martin</span> <span class="surname">Michlmayr</span>. </span></p></div><div class="biblioentry"><a id="id495541"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Migration guide for GCC-3.2 </em>. </span></p></div></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="api.html">Prev</a> </td><td align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td align="right"> <a accesskey="n" href="appendix_free.html">Next</a></td></tr><tr><td align="left" valign="top">API Evolution and Deprecation History </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Appendix C. diff --git a/libstdc++-v3/doc/html/manual/bitmap_allocator.html b/libstdc++-v3/doc/html/manual/bitmap_allocator.html index ca6326129c9..9f750e9c0dc 100644 --- a/libstdc++-v3/doc/html/manual/bitmap_allocator.html +++ b/libstdc++-v3/doc/html/manual/bitmap_allocator.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"><head><title>bitmap_allocator</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><meta name="keywords" content=" ISO C++ , allocator "/><meta name="keywords" content=" ISO C++ , library "/><link rel="home" href="../spine.html" title="The GNU C++ Library"/><link rel="up" href="ext_allocators.html" title="Chapter 20. Allocators"/><link rel="prev" href="ext_allocators.html" title="Chapter 20. Allocators"/><link rel="next" href="ext_containers.html" title="Chapter 21. Containers"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">bitmap_allocator</th></tr><tr><td align="left"><a accesskey="p" href="ext_allocators.html">Prev</a> </td><th width="60%" align="center">Chapter 20. Allocators</th><td align="right"> <a accesskey="n" href="ext_containers.html">Next</a></td></tr></table><hr/></div><div class="section" title="bitmap_allocator"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.allocator.bitmap"/>bitmap_allocator</h2></div></div></div><p> </p><div class="section" title="Design"><div class="titlepage"><div><div><h3 class="title"><a id="allocator.bitmap.design"/>Design</h3></div></div></div><p> As this name suggests, this allocator uses a bit-map to keep track - of the used and unused memory locations for it's book-keeping + of the used and unused memory locations for its book-keeping purposes. </p><p> This allocator will make use of 1 single bit to keep track of @@ -47,7 +47,7 @@ however, lg(64) == 6 comparisons are enough to locate the correct free list if it exists. </p><p> - Suppose the free list size has reached it's threshold, then the + Suppose the free list size has reached its threshold, then the largest block from among those in the list and the new block will be selected and given back to the OS. This is done because it reduces external fragmentation, and allows the OS to use the @@ -103,7 +103,7 @@ else return false.</p></li></ol></div><p> </p><p> Consider a block of size 64 ints. In memory, it would look like this: (assume a 32-bit system where, size_t is a 32-bit entity). - </p><div class="table"><a id="id509291"/><p class="title"><strong>Table 20.1. Bitmap Allocator Memory Map</strong></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left">268</td><td style="text-align: left">0</td><td style="text-align: left">4294967295</td><td style="text-align: left">4294967295</td><td style="text-align: left">Data -> Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break"/><p> + </p><div class="table"><a id="id481111"/><p class="title"><strong>Table 20.1. Bitmap Allocator Memory Map</strong></p><div class="table-contents"><table summary="Bitmap Allocator Memory Map" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left">268</td><td style="text-align: left">0</td><td style="text-align: left">4294967295</td><td style="text-align: left">4294967295</td><td style="text-align: left">Data -> Space for 64 ints</td></tr></tbody></table></div></div><br class="table-break"/><p> The first Column(268) represents the size of the Block in bytes as seen by the Bitmap Allocator. Internally, a global free list is used to keep track of the free blocks used and given back by the @@ -304,7 +304,7 @@ Block a bitmap as well? testing, I've decided to keep these bitmaps close to the actual blocks. This will help in 2 ways. </p><div class="orderedlist"><ol class="orderedlist"><li class="listitem"><p>Constant time access for the bitmap themselves, since no kind of -look up will be needed to find the correct bitmap list or it's +look up will be needed to find the correct bitmap list or its equivalent.</p></li><li class="listitem"><p>And also this would preserve the cache as far as possible.</p></li></ol></div><p> So in effect, this kind of an allocator might prove beneficial from a purely cache point of view. But this allocator has been made to try and diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch17s03.html b/libstdc++-v3/doc/html/manual/bk01pt03ch17s03.html index fa817e0a805..bff64a3747b 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch17s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch17s03.html @@ -19,6 +19,6 @@ mode or with debug mode. The following table provides the names and headers of the debugging containers: -</p><div class="table"><a id="id500883"/><p class="title"><strong>Table 17.1. Debugging Containers</strong></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Container</th><th style="text-align: left">Header</th><th style="text-align: left">Debug container</th><th style="text-align: left">Debug header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">std::bitset</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="classname">__gnu_debug::bitset</code></td><td style="text-align: left"><code class="filename"><debug/bitset></code></td></tr><tr><td style="text-align: left"><code class="classname">std::deque</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="classname">__gnu_debug::deque</code></td><td style="text-align: left"><code class="filename"><debug/deque></code></td></tr><tr><td style="text-align: left"><code class="classname">std::list</code></td><td style="text-align: left"><code class="filename">list</code></td><td style="text-align: left"><code class="classname">__gnu_debug::list</code></td><td style="text-align: left"><code class="filename"><debug/list></code></td></tr><tr><td style="text-align: left"><code class="classname">std::map</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::map</code></td><td style="text-align: left"><code class="filename"><debug/map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::multimap</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::multimap</code></td><td style="text-align: left"><code class="filename"><debug/map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::multiset</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::multiset</code></td><td style="text-align: left"><code class="filename"><debug/set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::set</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::set</code></td><td style="text-align: left"><code class="filename"><debug/set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::string</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::string</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::wstring</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::wstring</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::basic_string</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::basic_string</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::vector</code></td><td style="text-align: left"><code class="filename">vector</code></td><td style="text-align: left"><code class="classname">__gnu_debug::vector</code></td><td style="text-align: left"><code class="filename"><debug/vector></code></td></tr></tbody></table></div></div><br class="table-break"/><p>In addition, when compiling in C++0x mode, these additional +</p><div class="table"><a id="id472703"/><p class="title"><strong>Table 17.1. Debugging Containers</strong></p><div class="table-contents"><table summary="Debugging Containers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Container</th><th style="text-align: left">Header</th><th style="text-align: left">Debug container</th><th style="text-align: left">Debug header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">std::bitset</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="classname">__gnu_debug::bitset</code></td><td style="text-align: left"><code class="filename"><debug/bitset></code></td></tr><tr><td style="text-align: left"><code class="classname">std::deque</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="classname">__gnu_debug::deque</code></td><td style="text-align: left"><code class="filename"><debug/deque></code></td></tr><tr><td style="text-align: left"><code class="classname">std::list</code></td><td style="text-align: left"><code class="filename">list</code></td><td style="text-align: left"><code class="classname">__gnu_debug::list</code></td><td style="text-align: left"><code class="filename"><debug/list></code></td></tr><tr><td style="text-align: left"><code class="classname">std::map</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::map</code></td><td style="text-align: left"><code class="filename"><debug/map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::multimap</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::multimap</code></td><td style="text-align: left"><code class="filename"><debug/map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::multiset</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::multiset</code></td><td style="text-align: left"><code class="filename"><debug/set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::set</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::set</code></td><td style="text-align: left"><code class="filename"><debug/set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::string</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::string</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::wstring</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::wstring</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::basic_string</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="classname">__gnu_debug::basic_string</code></td><td style="text-align: left"><code class="filename"><debug/string></code></td></tr><tr><td style="text-align: left"><code class="classname">std::vector</code></td><td style="text-align: left"><code class="filename">vector</code></td><td style="text-align: left"><code class="classname">__gnu_debug::vector</code></td><td style="text-align: left"><code class="filename"><debug/vector></code></td></tr></tbody></table></div></div><br class="table-break"/><p>In addition, when compiling in C++0x mode, these additional containers have additional debug capability. -</p><div class="table"><a id="id501257"/><p class="title"><strong>Table 17.2. Debugging Containers C++0x</strong></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Container</th><th style="text-align: left">Header</th><th style="text-align: left">Debug container</th><th style="text-align: left">Debug header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">std::unordered_map</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_map</code></td><td style="text-align: left"><code class="filename"><debug/unordered_map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_multimap</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td style="text-align: left"><code class="filename"><debug/unordered_map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_set</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_set</code></td><td style="text-align: left"><code class="filename"><debug/unordered_set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_multiset</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td style="text-align: left"><code class="filename"><debug/unordered_set></code></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="bk01pt03ch17s02.html">Prev</a> </td><td align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td align="right"> <a accesskey="n" href="bk01pt03ch17s04.html">Next</a></td></tr><tr><td align="left" valign="top">Semantics </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Design</td></tr></table></div></body></html> +</p><div class="table"><a id="id473077"/><p class="title"><strong>Table 17.2. Debugging Containers C++0x</strong></p><div class="table-contents"><table summary="Debugging Containers C++0x" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Container</th><th style="text-align: left">Header</th><th style="text-align: left">Debug container</th><th style="text-align: left">Debug header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="classname">std::unordered_map</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_map</code></td><td style="text-align: left"><code class="filename"><debug/unordered_map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_multimap</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_multimap</code></td><td style="text-align: left"><code class="filename"><debug/unordered_map></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_set</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_set</code></td><td style="text-align: left"><code class="filename"><debug/unordered_set></code></td></tr><tr><td style="text-align: left"><code class="classname">std::unordered_multiset</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td><td style="text-align: left"><code class="classname">__gnu_debug::unordered_multiset</code></td><td style="text-align: left"><code class="filename"><debug/unordered_set></code></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="bk01pt03ch17s02.html">Prev</a> </td><td align="center"><a accesskey="u" href="debug_mode.html">Up</a></td><td align="right"> <a accesskey="n" href="bk01pt03ch17s04.html">Next</a></td></tr><tr><td align="left" valign="top">Semantics </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Design</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.html b/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.html index de1457cfd00..564989e02b6 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch18s03.html @@ -63,4 +63,4 @@ Then compile this code with the prerequisite compiler flags flags for atomic operations.) </p><p> The following table provides the names and headers of all the parallel algorithms that can be used in a similar manner: -</p><div class="table"><a id="id502844"/><p class="title"><strong>Table 18.1. Parallel Algorithms</strong></p><div class="table-contents"><table summary="Parallel Algorithms" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Algorithm</th><th style="text-align: left">Header</th><th style="text-align: left">Parallel algorithm</th><th style="text-align: left">Parallel header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="function">std::accumulate</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::accumulate</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::adjacent_difference</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::adjacent_difference</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::inner_product</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::inner_product</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::partial_sum</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partial_sum</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::adjacent_find</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::adjacent_find</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::count</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::count</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::count_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::count_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::equal</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::equal</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find_first_of</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find_first_of</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::for_each</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::for_each</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::generate</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::generate</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::generate_n</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::generate_n</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::lexicographical_compare</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::lexicographical_compare</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::mismatch</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::mismatch</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::search</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::search</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::search_n</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::search_n</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::transform</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::transform</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::replace</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::replace</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::replace_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::replace_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::max_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::max_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::merge</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::merge</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::min_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::min_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::nth_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::nth_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::partial_sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partial_sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::partition</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partition</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::random_shuffle</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::random_shuffle</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_union</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_union</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_intersection</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_intersection</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_symmetric_difference</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_symmetric_difference</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_difference</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_difference</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::stable_sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::stable_sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::unique_copy</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::unique_copy</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="bk01pt03ch18s02.html">Prev</a> </td><td align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td align="right"> <a accesskey="n" href="bk01pt03ch18s04.html">Next</a></td></tr><tr><td align="left" valign="top">Semantics </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Design</td></tr></table></div></body></html> +</p><div class="table"><a id="id474664"/><p class="title"><strong>Table 18.1. Parallel Algorithms</strong></p><div class="table-contents"><table summary="Parallel Algorithms" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Algorithm</th><th style="text-align: left">Header</th><th style="text-align: left">Parallel algorithm</th><th style="text-align: left">Parallel header</th></tr></thead><tbody><tr><td style="text-align: left"><code class="function">std::accumulate</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::accumulate</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::adjacent_difference</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::adjacent_difference</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::inner_product</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::inner_product</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::partial_sum</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partial_sum</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr><tr><td style="text-align: left"><code class="function">std::adjacent_find</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::adjacent_find</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::count</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::count</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::count_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::count_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::equal</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::equal</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::find_first_of</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::find_first_of</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::for_each</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::for_each</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::generate</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::generate</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::generate_n</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::generate_n</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::lexicographical_compare</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::lexicographical_compare</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::mismatch</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::mismatch</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::search</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::search</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::search_n</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::search_n</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::transform</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::transform</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::replace</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::replace</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::replace_if</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::replace_if</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::max_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::max_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::merge</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::merge</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::min_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::min_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::nth_element</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::nth_element</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::partial_sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partial_sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::partition</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::partition</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::random_shuffle</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::random_shuffle</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_union</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_union</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_intersection</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_intersection</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_symmetric_difference</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_symmetric_difference</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::set_difference</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::set_difference</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::stable_sort</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::stable_sort</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr><tr><td style="text-align: left"><code class="function">std::unique_copy</code></td><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="function">__gnu_parallel::unique_copy</code></td><td style="text-align: left"><code class="filename">parallel/algorithm</code></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="bk01pt03ch18s02.html">Prev</a> </td><td align="center"><a accesskey="u" href="parallel_mode.html">Up</a></td><td align="right"> <a accesskey="n" href="bk01pt03ch18s04.html">Next</a></td></tr><tr><td align="left" valign="top">Semantics </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Design</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch19s02.html b/libstdc++-v3/doc/html/manual/bk01pt03ch19s02.html index 979394407d4..2f640624c8b 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch19s02.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch19s02.html @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Design</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><meta name="keywords" content=" C++ , library , profile "/><meta name="keywords" content=" ISO C++ , library "/><link rel="home" href="../spine.html" title="The GNU C++ Library"/><link rel="up" href="profile_mode.html" title="Chapter 19. Profile Mode"/><link rel="prev" href="profile_mode.html" title="Chapter 19. Profile Mode"/><link rel="next" href="bk01pt03ch19s03.html" title="Extensions for Custom Containers"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Design</th></tr><tr><td align="left"><a accesskey="p" href="profile_mode.html">Prev</a> </td><th width="60%" align="center">Chapter 19. Profile Mode</th><td align="right"> <a accesskey="n" href="bk01pt03ch19s03.html">Next</a></td></tr></table><hr/></div><div class="section" title="Design"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.profile_mode.design"/>Design</h2></div></div></div><p> -</p><div class="table"><a id="id504968"/><p class="title"><strong>Table 19.1. Profile Code Location</strong></p><div class="table-contents"><table summary="Profile Code Location" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Code Location</th><th style="text-align: left">Use</th></tr></thead><tbody><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/std/*</code></td><td style="text-align: left">Preprocessor code to redirect to profile extension headers.</td></tr><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/profile/*</code></td><td style="text-align: left">Profile extension public headers (map, vector, ...).</td></tr><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/profile/impl/*</code></td><td style="text-align: left">Profile extension internals. Implementation files are +</p><div class="table"><a id="id476788"/><p class="title"><strong>Table 19.1. Profile Code Location</strong></p><div class="table-contents"><table summary="Profile Code Location" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Code Location</th><th style="text-align: left">Use</th></tr></thead><tbody><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/std/*</code></td><td style="text-align: left">Preprocessor code to redirect to profile extension headers.</td></tr><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/profile/*</code></td><td style="text-align: left">Profile extension public headers (map, vector, ...).</td></tr><tr><td style="text-align: left"><code class="code">libstdc++-v3/include/profile/impl/*</code></td><td style="text-align: left">Profile extension internals. Implementation files are only included from <code class="code">impl/profiler.h</code>, which is the only file included from the public headers.</td></tr></tbody></table></div></div><br class="table-break"/><p> </p><div class="section" title="Wrapper Model"><div class="titlepage"><div><div><h3 class="title"><a id="manual.ext.profile_mode.design.wrapper"/>Wrapper Model</h3></div></div></div><p> diff --git a/libstdc++-v3/doc/html/manual/bk01pt03ch19s07.html b/libstdc++-v3/doc/html/manual/bk01pt03ch19s07.html index a7c4c72f0b0..33377853d40 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03ch19s07.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03ch19s07.html @@ -18,7 +18,7 @@ A high accuracy means that the diagnostic is unlikely to be wrong. These grades are not perfect. They are just meant to guide users with specific needs or time budgets. - </p><div class="table"><a id="id505850"/><p class="title"><strong>Table 19.2. Profile Diagnostics</strong></p><div class="table-contents"><table summary="Profile Diagnostics" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/><col style="text-align: left" class="c6"/><col style="text-align: left" class="c7"/></colgroup><thead><tr><th style="text-align: left">Group</th><th style="text-align: left">Flag</th><th style="text-align: left">Benefit</th><th style="text-align: left">Cost</th><th style="text-align: left">Freq.</th><th style="text-align: left">Implemented</th><td class="auto-generated"> </td></tr></thead><tbody><tr><td style="text-align: left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.containers" title="Containers"> + </p><div class="table"><a id="id477670"/><p class="title"><strong>Table 19.2. Profile Diagnostics</strong></p><div class="table-contents"><table summary="Profile Diagnostics" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/><col style="text-align: left" class="c6"/><col style="text-align: left" class="c7"/></colgroup><thead><tr><th style="text-align: left">Group</th><th style="text-align: left">Flag</th><th style="text-align: left">Benefit</th><th style="text-align: left">Cost</th><th style="text-align: left">Freq.</th><th style="text-align: left">Implemented</th><td class="auto-generated"> </td></tr></thead><tbody><tr><td style="text-align: left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.containers" title="Containers"> CONTAINERS</a></td><td style="text-align: left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.hashtable_too_small" title="Hashtable Too Small"> HASHTABLE_TOO_SMALL</a></td><td style="text-align: left">10</td><td style="text-align: left">1</td><td style="text-align: left"> </td><td style="text-align: left">10</td><td style="text-align: left">yes</td></tr><tr><td style="text-align: left"> </td><td style="text-align: left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.hashtable_too_large" title="Hashtable Too Large"> HASHTABLE_TOO_LARGE</a></td><td style="text-align: left">5</td><td style="text-align: left">1</td><td style="text-align: left"> </td><td style="text-align: left">10</td><td style="text-align: left">yes</td></tr><tr><td style="text-align: left"> </td><td style="text-align: left"><a class="link" href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.inefficient_hash" title="Inefficient Hash"> diff --git a/libstdc++-v3/doc/html/manual/bk01pt03pr01.html b/libstdc++-v3/doc/html/manual/bk01pt03pr01.html index 9f9098488cc..7ca94896fff 100644 --- a/libstdc++-v3/doc/html/manual/bk01pt03pr01.html +++ b/libstdc++-v3/doc/html/manual/bk01pt03pr01.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"><head><title/><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><meta name="keywords" content=" ISO C++ , library "/><link rel="home" href="../spine.html" title="The GNU C++ Library"/><link rel="up" href="extensions.html" title="Part III. Extensions"/><link rel="prev" href="extensions.html" title="Part III. Extensions"/><link rel="next" href="ext_compile_checks.html" title="Chapter 16. Compile Time Checks"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"/></tr><tr><td align="left"><a accesskey="p" href="extensions.html">Prev</a> </td><th width="60%" align="center">Part III. Extensions -</th><td align="right"> <a accesskey="n" href="ext_compile_checks.html">Next</a></td></tr></table><hr/></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a id="id500350"/></h1></div></div></div><p> +</th><td align="right"> <a accesskey="n" href="ext_compile_checks.html">Next</a></td></tr></table><hr/></div><div class="preface"><div class="titlepage"><div><div><h1 class="title"><a id="id472170"/></h1></div></div></div><p> Here we will make an attempt at describing the non-Standard extensions to the library. Some of these are from SGI's STL, some of these are GNU's, and some just seemed to appear on the doorstep. diff --git a/libstdc++-v3/doc/html/manual/concurrency.html b/libstdc++-v3/doc/html/manual/concurrency.html index c00a62061c7..5031a3299e5 100644 --- a/libstdc++-v3/doc/html/manual/concurrency.html +++ b/libstdc++-v3/doc/html/manual/concurrency.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="extensions.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 15. Concurrency"><div class="titlepage"><div><div><h2 class="title"><a id="std.concurrency"/>Chapter 15. Concurrency - <a id="id500167" class="indexterm"/> + <a id="id471987" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="concurrency.html#std.concurrency.api">API Reference</a></span></dt></dl></div><p> Facilities for concurrent operation, and control thereof. </p><div class="section" title="API Reference"><div class="titlepage"><div><div><h2 class="title"><a id="std.concurrency.api"/>API Reference</h2></div></div></div><p> diff --git a/libstdc++-v3/doc/html/manual/containers.html b/libstdc++-v3/doc/html/manual/containers.html index 22d343c5705..14b37374140 100644 --- a/libstdc++-v3/doc/html/manual/containers.html +++ b/libstdc++-v3/doc/html/manual/containers.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="associative.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 9. Containers"><div class="titlepage"><div><div><h2 class="title"><a id="std.containers"/>Chapter 9. Containers - <a id="id497214" class="indexterm"/> + <a id="id469034" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="containers.html#std.containers.sequences">Sequences</a></span></dt><dd><dl><dt><span class="section"><a href="containers.html#containers.sequences.list">list</a></span></dt><dt><span class="section"><a href="containers.html#containers.sequences.vector">vector</a></span></dt></dl></dd><dt><span class="section"><a href="associative.html">Associative</a></span></dt><dd><dl><dt><span class="section"><a href="associative.html#containers.associative.insert_hints">Insertion Hints</a></span></dt><dt><span class="section"><a href="associative.html#containers.associative.bitset">bitset</a></span></dt></dl></dd><dt><span class="section"><a href="containers_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="containers_and_c.html#containers.c.vs_array">Containers vs. Arrays</a></span></dt></dl></dd></dl></div><div class="section" title="Sequences"><div class="titlepage"><div><div><h2 class="title"><a id="std.containers.sequences"/>Sequences</h2></div></div></div><div class="section" title="list"><div class="titlepage"><div><div><h3 class="title"><a id="containers.sequences.list"/>list</h3></div></div></div><div class="section" title="list::size() is O(n)"><div class="titlepage"><div><div><h4 class="title"><a id="sequences.list.size"/>list::size() is O(n)</h4></div></div></div><p> Yes it is, and that's okay. This is a decision that we preserved when we imported SGI's STL implementation. The following is diff --git a/libstdc++-v3/doc/html/manual/diagnostics.html b/libstdc++-v3/doc/html/manual/diagnostics.html index 1e9511cb7cf..d4fbf34d856 100644 --- a/libstdc++-v3/doc/html/manual/diagnostics.html +++ b/libstdc++-v3/doc/html/manual/diagnostics.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="bk01pt02ch05s02.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 5. Diagnostics"><div class="titlepage"><div><div><h2 class="title"><a id="std.diagnostics"/>Chapter 5. Diagnostics - <a id="id490830" class="indexterm"/> + <a id="id462650" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.api">API Reference</a></span></dt><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.data">Adding Data to <code class="classname">exception</code></a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt02ch05s02.html">Concept Checking</a></span></dt></dl></div><div class="section" title="Exceptions"><div class="titlepage"><div><div><h2 class="title"><a id="std.diagnostics.exceptions"/>Exceptions</h2></div></div></div><div class="section" title="API Reference"><div class="titlepage"><div><div><h3 class="title"><a id="std.diagnostics.exceptions.api"/>API Reference</h3></div></div></div><p> All exception objects are defined in one of the standard header files: <code class="filename">exception</code>, diff --git a/libstdc++-v3/doc/html/manual/documentation_hacking.html b/libstdc++-v3/doc/html/manual/documentation_hacking.html index eebce2f9381..3ad897f1509 100644 --- a/libstdc++-v3/doc/html/manual/documentation_hacking.html +++ b/libstdc++-v3/doc/html/manual/documentation_hacking.html @@ -117,7 +117,7 @@ supported, and are always aliased to dummy rules. These unsupported formats are: <span class="emphasis"><em>info</em></span>, <span class="emphasis"><em>ps</em></span>, and <span class="emphasis"><em>dvi</em></span>. - </p></div><div class="section" title="Doxygen"><div class="titlepage"><div><div><h3 class="title"><a id="doc.doxygen"/>Doxygen</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.prereq"/>Prerequisites</h4></div></div></div><div class="table"><a id="id513551"/><p class="title"><strong>Table B.1. Doxygen Prerequisites</strong></p><div class="table-contents"><table summary="Doxygen Prerequisites" border="1"><colgroup><col style="text-align: center" class="c1"/><col style="text-align: center" class="c2"/><col style="text-align: center" class="c3"/></colgroup><thead><tr><th style="text-align: center">Tool</th><th style="text-align: center">Version</th><th style="text-align: center">Required By</th></tr></thead><tbody><tr><td style="text-align: center">coreutils</td><td style="text-align: center">8.5</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">bash</td><td style="text-align: center">4.1</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">doxygen</td><td style="text-align: center">1.7.0</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">graphviz</td><td style="text-align: center">2.26</td><td style="text-align: center">graphical hierarchies</td></tr><tr><td style="text-align: center">pdflatex</td><td style="text-align: center">2007-59</td><td style="text-align: center">pdf output</td></tr></tbody></table></div></div><br class="table-break"/><p> + </p></div><div class="section" title="Doxygen"><div class="titlepage"><div><div><h3 class="title"><a id="doc.doxygen"/>Doxygen</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="doxygen.prereq"/>Prerequisites</h4></div></div></div><div class="table"><a id="id485371"/><p class="title"><strong>Table B.1. Doxygen Prerequisites</strong></p><div class="table-contents"><table summary="Doxygen Prerequisites" border="1"><colgroup><col style="text-align: center" class="c1"/><col style="text-align: center" class="c2"/><col style="text-align: center" class="c3"/></colgroup><thead><tr><th style="text-align: center">Tool</th><th style="text-align: center">Version</th><th style="text-align: center">Required By</th></tr></thead><tbody><tr><td style="text-align: center">coreutils</td><td style="text-align: center">8.5</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">bash</td><td style="text-align: center">4.1</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">doxygen</td><td style="text-align: center">1.7.0</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">graphviz</td><td style="text-align: center">2.26</td><td style="text-align: center">graphical hierarchies</td></tr><tr><td style="text-align: center">pdflatex</td><td style="text-align: center">2007-59</td><td style="text-align: center">pdf output</td></tr></tbody></table></div></div><br class="table-break"/><p> Prerequisite tools are Bash 2.0 or later, <a class="link" href="http://www.doxygen.org/">Doxygen</a>, and the <a class="link" href="http://www.gnu.org/software/coreutils/">GNU @@ -263,7 +263,7 @@ writing Doxygen comments. Single and double quotes, and separators in filenames are two common trouble spots. When in doubt, consult the following table. - </p><div class="table"><a id="id514053"/><p class="title"><strong>Table B.2. HTML to Doxygen Markup Comparison</strong></p><div class="table-contents"><table summary="HTML to Doxygen Markup Comparison" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">HTML</th><th style="text-align: left">Doxygen</th></tr></thead><tbody><tr><td style="text-align: left">\</td><td style="text-align: left">\\</td></tr><tr><td style="text-align: left">"</td><td style="text-align: left">\"</td></tr><tr><td style="text-align: left">'</td><td style="text-align: left">\'</td></tr><tr><td style="text-align: left"><i></td><td style="text-align: left">@a word</td></tr><tr><td style="text-align: left"><b></td><td style="text-align: left">@b word</td></tr><tr><td style="text-align: left"><code></td><td style="text-align: left">@c word</td></tr><tr><td style="text-align: left"><em></td><td style="text-align: left">@a word</td></tr><tr><td style="text-align: left"><em></td><td style="text-align: left"><em>two words or more</em></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="section" title="Docbook"><div class="titlepage"><div><div><h3 class="title"><a id="doc.docbook"/>Docbook</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.prereq"/>Prerequisites</h4></div></div></div><div class="table"><a id="id514215"/><p class="title"><strong>Table B.3. Docbook Prerequisites</strong></p><div class="table-contents"><table summary="Docbook Prerequisites" border="1"><colgroup><col style="text-align: center" class="c1"/><col style="text-align: center" class="c2"/><col style="text-align: center" class="c3"/></colgroup><thead><tr><th style="text-align: center">Tool</th><th style="text-align: center">Version</th><th style="text-align: center">Required By</th></tr></thead><tbody><tr><td style="text-align: center">docbook5-style-xsl</td><td style="text-align: center">1.76.1</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">xsltproc</td><td style="text-align: center">1.1.26</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">xmllint</td><td style="text-align: center">2.7.7</td><td style="text-align: center">validation</td></tr><tr><td style="text-align: center">dblatex</td><td style="text-align: center">0.3</td><td style="text-align: center">pdf output</td></tr><tr><td style="text-align: center">pdflatex</td><td style="text-align: center">2007-59</td><td style="text-align: center">pdf output</td></tr><tr><td style="text-align: center">docbook2X</td><td style="text-align: center">0.8.8</td><td style="text-align: center">info output</td></tr></tbody></table></div></div><br class="table-break"/><p> + </p><div class="table"><a id="id485873"/><p class="title"><strong>Table B.2. HTML to Doxygen Markup Comparison</strong></p><div class="table-contents"><table summary="HTML to Doxygen Markup Comparison" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">HTML</th><th style="text-align: left">Doxygen</th></tr></thead><tbody><tr><td style="text-align: left">\</td><td style="text-align: left">\\</td></tr><tr><td style="text-align: left">"</td><td style="text-align: left">\"</td></tr><tr><td style="text-align: left">'</td><td style="text-align: left">\'</td></tr><tr><td style="text-align: left"><i></td><td style="text-align: left">@a word</td></tr><tr><td style="text-align: left"><b></td><td style="text-align: left">@b word</td></tr><tr><td style="text-align: left"><code></td><td style="text-align: left">@c word</td></tr><tr><td style="text-align: left"><em></td><td style="text-align: left">@a word</td></tr><tr><td style="text-align: left"><em></td><td style="text-align: left"><em>two words or more</em></td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="section" title="Docbook"><div class="titlepage"><div><div><h3 class="title"><a id="doc.docbook"/>Docbook</h3></div></div></div><div class="section" title="Prerequisites"><div class="titlepage"><div><div><h4 class="title"><a id="docbook.prereq"/>Prerequisites</h4></div></div></div><div class="table"><a id="id486035"/><p class="title"><strong>Table B.3. Docbook Prerequisites</strong></p><div class="table-contents"><table summary="Docbook Prerequisites" border="1"><colgroup><col style="text-align: center" class="c1"/><col style="text-align: center" class="c2"/><col style="text-align: center" class="c3"/></colgroup><thead><tr><th style="text-align: center">Tool</th><th style="text-align: center">Version</th><th style="text-align: center">Required By</th></tr></thead><tbody><tr><td style="text-align: center">docbook5-style-xsl</td><td style="text-align: center">1.76.1</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">xsltproc</td><td style="text-align: center">1.1.26</td><td style="text-align: center">all</td></tr><tr><td style="text-align: center">xmllint</td><td style="text-align: center">2.7.7</td><td style="text-align: center">validation</td></tr><tr><td style="text-align: center">dblatex</td><td style="text-align: center">0.3</td><td style="text-align: center">pdf output</td></tr><tr><td style="text-align: center">pdflatex</td><td style="text-align: center">2007-59</td><td style="text-align: center">pdf output</td></tr><tr><td style="text-align: center">docbook2X</td><td style="text-align: center">0.8.8</td><td style="text-align: center">info output</td></tr></tbody></table></div></div><br class="table-break"/><p> Editing the DocBook sources requires an XML editor. Many exist: some notable options include <span class="command"><strong>emacs</strong></span>, <span class="application">Kate</span>, @@ -288,7 +288,7 @@ in <code class="filename">doc/Makefile.am</code> and defaults to <code class="filename">/usr/share/sgml/docbook/xsl-ns-stylesheets</code>. </p><p> - For processing XML, an XML processor and some style + For processing XML, an XSLT processor and some style sheets are necessary. Defaults are <span class="command"><strong>xsltproc</strong></span> provided by <code class="filename">libxslt</code>. </p><p> @@ -328,7 +328,7 @@ </p><p> If the Docbook stylesheets are installed in a custom location, one can use the variable <code class="literal">XSL_STYLE_DIR</code> to - over-ride the Makefile defaults. As so: + override the Makefile defaults. For example: </p><pre class="screen"> <strong class="userinput"><code> make <code class="literal">XSL_STYLE_DIR="/usr/share/xml/docbook/stylesheet/nwalsh"</code> doc-html-docbook @@ -419,11 +419,11 @@ make <code class="literal">XSL_STYLE_DIR="/usr/share/xml/docbook/stylesheet/nwal <a class="link" href="http://www.docbook.org/tdg/en/html/part2.html">online</a>. An incomplete reference for HTML to Docbook conversion is detailed in the table below. - </p><div class="table"><a id="id514692"/><p class="title"><strong>Table B.4. HTML to Docbook XML Markup Comparison</strong></p><div class="table-contents"><table summary="HTML to Docbook XML Markup Comparison" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">HTML</th><th style="text-align: left">Docbook</th></tr></thead><tbody><tr><td style="text-align: left"><p></td><td style="text-align: left"><para></td></tr><tr><td style="text-align: left"><pre></td><td style="text-align: left"><computeroutput>, <programlisting>, + </p><div class="table"><a id="id486512"/><p class="title"><strong>Table B.4. HTML to Docbook XML Markup Comparison</strong></p><div class="table-contents"><table summary="HTML to Docbook XML Markup Comparison" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">HTML</th><th style="text-align: left">Docbook</th></tr></thead><tbody><tr><td style="text-align: left"><p></td><td style="text-align: left"><para></td></tr><tr><td style="text-align: left"><pre></td><td style="text-align: left"><computeroutput>, <programlisting>, <literallayout></td></tr><tr><td style="text-align: left"><ul></td><td style="text-align: left"><itemizedlist></td></tr><tr><td style="text-align: left"><ol></td><td style="text-align: left"><orderedlist></td></tr><tr><td style="text-align: left"><il></td><td style="text-align: left"><listitem></td></tr><tr><td style="text-align: left"><dl></td><td style="text-align: left"><variablelist></td></tr><tr><td style="text-align: left"><dt></td><td style="text-align: left"><term></td></tr><tr><td style="text-align: left"><dd></td><td style="text-align: left"><listitem></td></tr><tr><td style="text-align: left"><a href=""></td><td style="text-align: left"><ulink url=""></td></tr><tr><td style="text-align: left"><code></td><td style="text-align: left"><literal>, <programlisting></td></tr><tr><td style="text-align: left"><strong></td><td style="text-align: left"><emphasis></td></tr><tr><td style="text-align: left"><em></td><td style="text-align: left"><emphasis></td></tr><tr><td style="text-align: left">"</td><td style="text-align: left"><quote></td></tr></tbody></table></div></div><br class="table-break"/><p> And examples of detailed markup for which there are no real HTML equivalents are listed in the table below. -</p><div class="table"><a id="id514893"/><p class="title"><strong>Table B.5. Docbook XML Element Use</strong></p><div class="table-contents"><table summary="Docbook XML Element Use" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Element</th><th style="text-align: left">Use</th></tr></thead><tbody><tr><td style="text-align: left"><structname></td><td style="text-align: left"><structname>char_traits</structname></td></tr><tr><td style="text-align: left"><classname></td><td style="text-align: left"><classname>string</classname></td></tr><tr><td style="text-align: left"><function></td><td style="text-align: left"> +</p><div class="table"><a id="id486714"/><p class="title"><strong>Table B.5. Docbook XML Element Use</strong></p><div class="table-contents"><table summary="Docbook XML Element Use" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Element</th><th style="text-align: left">Use</th></tr></thead><tbody><tr><td style="text-align: left"><structname></td><td style="text-align: left"><structname>char_traits</structname></td></tr><tr><td style="text-align: left"><classname></td><td style="text-align: left"><classname>string</classname></td></tr><tr><td style="text-align: left"><function></td><td style="text-align: left"> <p><function>clear()</function></p> <p><function>fs.clear()</function></p> </td></tr><tr><td style="text-align: left"><type></td><td style="text-align: left"><type>long long</type></td></tr><tr><td style="text-align: left"><varname></td><td style="text-align: left"><varname>fs</varname></td></tr><tr><td style="text-align: left"><literal></td><td style="text-align: left"> diff --git a/libstdc++-v3/doc/html/manual/extensions.html b/libstdc++-v3/doc/html/manual/extensions.html index bc94c218760..1b59f2f862c 100644 --- a/libstdc++-v3/doc/html/manual/extensions.html +++ b/libstdc++-v3/doc/html/manual/extensions.html @@ -5,5 +5,5 @@ </th></tr><tr><td align="left"><a accesskey="p" href="io_and_c.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library Manual</th><td align="right"> <a accesskey="n" href="bk01pt03pr01.html">Next</a></td></tr></table><hr/></div><div class="part" title="Part III. Extensions"><div class="titlepage"><div><div><h1 class="title"><a id="manual.ext"/>Part III. Extensions - <a id="id500332" class="indexterm"/> + <a id="id472152" class="indexterm"/> </h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="preface"><a href="bk01pt03pr01.html"/></span></dt><dt><span class="chapter"><a href="ext_compile_checks.html">16. Compile Time Checks</a></span></dt><dt><span class="chapter"><a href="debug_mode.html">17. Debug Mode</a></span></dt><dd><dl><dt><span class="section"><a href="debug_mode.html#manual.ext.debug_mode.intro">Intro</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s02.html">Semantics</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s03.html">Using</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s03.html#debug_mode.using.mode">Using the Debug Mode</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s03.html#debug_mode.using.specific">Using a Specific Debug Container</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch17s04.html">Design</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.goals">Goals</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.methods">Methods</a></span></dt><dt><span class="section"><a href="bk01pt03ch17s04.html#debug_mode.design.other">Other Implementations</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="parallel_mode.html">18. Parallel Mode</a></span></dt><dd><dl><dt><span class="section"><a href="parallel_mode.html#manual.ext.parallel_mode.intro">Intro</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s02.html">Semantics</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html">Using</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.prereq_flags">Prerequisite Compiler Flags</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.parallel_mode">Using Parallel Mode</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s03.html#parallel_mode.using.specific">Using Specific Parallel Components</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch18s04.html">Design</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.intro">Interface Basics</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.tuning">Configuration and Tuning</a></span></dt><dt><span class="section"><a href="bk01pt03ch18s04.html#parallel_mode.design.impl">Implementation Namespaces</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch18s05.html">Testing</a></span></dt><dt><span class="bibliography"><a href="parallel_mode.html#parallel_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="profile_mode.html">19. Profile Mode</a></span></dt><dd><dl><dt><span class="section"><a href="profile_mode.html#manual.ext.profile_mode.intro">Intro</a></span></dt><dd><dl><dt><span class="section"><a href="profile_mode.html#manual.ext.profile_mode.using">Using the Profile Mode</a></span></dt><dt><span class="section"><a href="profile_mode.html#manual.ext.profile_mode.tuning">Tuning the Profile Mode</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s02.html">Design</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.wrapper">Wrapper Model</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.instrumentation">Instrumentation</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.rtlib">Run Time Behavior</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.analysis">Analysis and Diagnostics</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.cost-model">Cost Model</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.reports">Reports</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s02.html#manual.ext.profile_mode.design.testing">Testing</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s03.html">Extensions for Custom Containers</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s04.html">Empirical Cost Model</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html">Implementation Issues</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.stack">Stack Traces</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.symbols">Symbolization of Instruction Addresses</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.concurrency">Concurrency</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.stdlib-in-proflib">Using the Standard Library in the Instrumentation Implementation</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.malloc-hooks">Malloc Hooks</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s05.html#manual.ext.profile_mode.implementation.construction-destruction">Construction and Destruction of Global Objects</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s06.html">Developer Information</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s06.html#manual.ext.profile_mode.developer.bigpic">Big Picture</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s06.html#manual.ext.profile_mode.developer.howto">How To Add A Diagnostic</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch19s07.html">Diagnostics</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.template">Diagnostic Template</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.containers">Containers</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.algorithms">Algorithms</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.locality">Data Locality</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.mthread">Multithreaded Data Access</a></span></dt><dt><span class="section"><a href="bk01pt03ch19s07.html#manual.ext.profile_mode.analysis.statistics">Statistics</a></span></dt></dl></dd><dt><span class="bibliography"><a href="profile_mode.html#profile_mode.biblio">Bibliography</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_allocators.html">20. Allocators</a></span></dt><dd><dl><dt><span class="section"><a href="ext_allocators.html#manual.ext.allocator.mt">mt_allocator</a></span></dt><dd><dl><dt><span class="section"><a href="ext_allocators.html#allocator.mt.intro">Intro</a></span></dt><dt><span class="section"><a href="ext_allocators.html#allocator.mt.design_issues">Design Issues</a></span></dt><dt><span class="section"><a href="ext_allocators.html#allocator.mt.impl">Implementation</a></span></dt><dt><span class="section"><a href="ext_allocators.html#allocator.mt.example_single">Single Thread Example</a></span></dt><dt><span class="section"><a href="ext_allocators.html#allocator.mt.example_multi">Multiple Thread Example</a></span></dt></dl></dd><dt><span class="section"><a href="bitmap_allocator.html">bitmap_allocator</a></span></dt><dd><dl><dt><span class="section"><a href="bitmap_allocator.html#allocator.bitmap.design">Design</a></span></dt><dt><span class="section"><a href="bitmap_allocator.html#allocator.bitmap.impl">Implementation</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ext_containers.html">21. Containers</a></span></dt><dd><dl><dt><span class="section"><a href="ext_containers.html#manual.ext.containers.pbds">Policy Based Data Structures</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s02.html">HP/SGI</a></span></dt><dt><span class="section"><a href="bk01pt03ch21s03.html">Deprecated HP/SGI</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_utilities.html">22. Utilities</a></span></dt><dt><span class="chapter"><a href="ext_algorithms.html">23. Algorithms</a></span></dt><dt><span class="chapter"><a href="ext_numerics.html">24. Numerics</a></span></dt><dt><span class="chapter"><a href="ext_iterators.html">25. Iterators</a></span></dt><dt><span class="chapter"><a href="ext_io.html">26. Input and Output</a></span></dt><dd><dl><dt><span class="section"><a href="ext_io.html#manual.ext.io.filebuf_derived">Derived filebufs</a></span></dt></dl></dd><dt><span class="chapter"><a href="ext_demangling.html">27. Demangling</a></span></dt><dt><span class="chapter"><a href="ext_concurrency.html">28. Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design">Design</a></span></dt><dd><dl><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.threads">Interface to Locks and Mutexes</a></span></dt><dt><span class="section"><a href="ext_concurrency.html#manual.ext.concurrency.design.atomics">Interface to Atomic Functions</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch28s02.html">Implementation</a></span></dt><dd><dl><dt><span class="section"><a href="bk01pt03ch28s02.html#manual.ext.concurrency.impl.atomic_fallbacks">Using Builtin Atomic Functions</a></span></dt><dt><span class="section"><a href="bk01pt03ch28s02.html#manual.ext.concurrency.impl.thread">Thread Abstraction</a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt03ch28s03.html">Use</a></span></dt></dl></dd></dl></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="io_and_c.html">Prev</a> </td><td align="center"><a accesskey="u" href="spine.html">Up</a></td><td align="right"> <a accesskey="n" href="bk01pt03pr01.html">Next</a></td></tr><tr><td align="left" valign="top">Interacting with C </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> </td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/facets.html b/libstdc++-v3/doc/html/manual/facets.html index 6a456544660..25f0e142573 100644 --- a/libstdc++-v3/doc/html/manual/facets.html +++ b/libstdc++-v3/doc/html/manual/facets.html @@ -3,7 +3,7 @@ <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Facets</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><meta name="keywords" content=" ISO C++ , library "/><link rel="home" href="../spine.html" title="The GNU C++ Library"/><link rel="up" href="localization.html" title="Chapter 8. Localization"/><link rel="prev" href="localization.html" title="Chapter 8. Localization"/><link rel="next" href="containers.html" title="Chapter 9. Containers"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Facets</th></tr><tr><td align="left"><a accesskey="p" href="localization.html">Prev</a> </td><th width="60%" align="center">Chapter 8. Localization -</th><td align="right"> <a accesskey="n" href="containers.html">Next</a></td></tr></table><hr/></div><div class="section" title="Facets"><div class="titlepage"><div><div><h2 class="title"><a id="std.localization.facet"/>Facets</h2></div></div></div><div class="section" title="ctype"><div class="titlepage"><div><div><h3 class="title"><a id="std.localization.facet.ctype"/>ctype</h3></div></div></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="facet.ctype.impl"/>Implementation</h4></div></div></div><div class="section" title="Specializations"><div class="titlepage"><div><div><h5 class="title"><a id="id495024"/>Specializations</h5></div></div></div><p> +</th><td align="right"> <a accesskey="n" href="containers.html">Next</a></td></tr></table><hr/></div><div class="section" title="Facets"><div class="titlepage"><div><div><h2 class="title"><a id="std.localization.facet"/>Facets</h2></div></div></div><div class="section" title="ctype"><div class="titlepage"><div><div><h3 class="title"><a id="std.localization.facet.ctype"/>ctype</h3></div></div></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="facet.ctype.impl"/>Implementation</h4></div></div></div><div class="section" title="Specializations"><div class="titlepage"><div><div><h5 class="title"><a id="id466844"/>Specializations</h5></div></div></div><p> For the required specialization codecvt<wchar_t, char, mbstate_t> , conversions are made between the internal character set (always UCS4 on GNU/Linux) and whatever the currently selected locale for the @@ -50,23 +50,23 @@ characters. </p></li><li class="listitem"><p> Rename abstract base class. See if just smash-overriding is a better approach. Clarify, add sanity to naming. - </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.ctype.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id495149"/><p><span class="citetitle"><em class="citetitle"> + </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.ctype.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id466969"/><p><span class="citetitle"><em class="citetitle"> The GNU C Library - </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id495188"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling and 7 Locales and Internationalization. </span></p></div><div class="biblioentry"><a id="id467008"/><p><span class="citetitle"><em class="citetitle"> Correspondence - </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id495214"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id467034"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 14882:1998 Programming languages - C++ - </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id495233"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id467053"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 9899:1999 Programming languages - C - </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id495252"/><p><span class="biblioid"> + </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id467072"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> The Open Group Base Specifications, Issue 6 (IEEE Std. 1003.1-2004) </em>. </span><span class="copyright">Copyright © 1999 - The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span></p></div><div class="biblioentry"><a id="id495282"/><p><span class="citetitle"><em class="citetitle"> + The Open Group/The Institute of Electrical and Electronics Engineers, Inc.. </span></p></div><div class="biblioentry"><a id="id467101"/><p><span class="citetitle"><em class="citetitle"> The C++ Programming Language, Special Edition </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id495320"/><p><span class="citetitle"><em class="citetitle"> + . </span></span></p></div><div class="biblioentry"><a id="id467140"/><p><span class="citetitle"><em class="citetitle"> Standard C++ IOStreams and Locales </em>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference @@ -409,39 +409,39 @@ codecvt usage. </p></li><li class="listitem"><p> wchar_t/char internal buffers and conversions between internal/external buffers? - </p></li></ul></div></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.codecvt.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id495970"/><p><span class="citetitle"><em class="citetitle"> + </p></li></ul></div></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.codecvt.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id467790"/><p><span class="citetitle"><em class="citetitle"> The GNU C Library </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums"> Chapters 6 Character Set Handling and 7 Locales and Internationalization - . </span></p></div><div class="biblioentry"><a id="id496010"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id467830"/><p><span class="citetitle"><em class="citetitle"> Correspondence - </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id496036"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id467855"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 14882:1998 Programming languages - C++ - </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id496055"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id467874"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 9899:1999 Programming languages - C - </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id496074"/><p><span class="biblioid"> + </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id467893"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) </em>. </span><span class="copyright">Copyright © 2008 The Open Group/The Institute of Electrical and Electronics Engineers, Inc. - . </span></p></div><div class="biblioentry"><a id="id496103"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id467923"/><p><span class="citetitle"><em class="citetitle"> The C++ Programming Language, Special Edition </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id496141"/><p><span class="citetitle"><em class="citetitle"> + . </span></span></p></div><div class="biblioentry"><a id="id467961"/><p><span class="citetitle"><em class="citetitle"> Standard C++ IOStreams and Locales </em>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference . </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername"> Addison Wesley Longman - . </span></span></p></div><div class="biblioentry"><a id="id496189"/><p><span class="biblioid"> + . </span></span></p></div><div class="biblioentry"><a id="id468008"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> A brief description of Normative Addendum 1 - </em>. </span><span class="author"><span class="firstname">Clive</span> <span class="surname">Feather</span>. </span><span class="pagenums">Extended Character Sets. </span></p></div><div class="biblioentry"><a id="id496218"/><p><span class="biblioid"> + </em>. </span><span class="author"><span class="firstname">Clive</span> <span class="surname">Feather</span>. </span><span class="pagenums">Extended Character Sets. </span></p></div><div class="biblioentry"><a id="id468038"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> The Unicode HOWTO - </em>. </span><span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span>. </span></p></div><div class="biblioentry"><a id="id496243"/><p><span class="biblioid"> + </em>. </span><span class="author"><span class="firstname">Bruno</span> <span class="surname">Haible</span>. </span></p></div><div class="biblioentry"><a id="id468063"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> UTF-8 and Unicode FAQ for Unix/Linux </em>. </span><span class="author"><span class="firstname">Markus</span> <span class="surname">Khun</span>. </span></p></div></div></div><div class="section" title="messages"><div class="titlepage"><div><div><h3 class="title"><a id="manual.localization.facet.messages"/>messages</h3></div></div></div><p> @@ -685,37 +685,37 @@ void test01() model. As of this writing, it is unknown how to query to see if a specified message catalog exists using the gettext package. - </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.messages.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id496918"/><p><span class="citetitle"><em class="citetitle"> + </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="facet.messages.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id468737"/><p><span class="citetitle"><em class="citetitle"> The GNU C Library </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums">Chapters 6 Character Set Handling, and 7 Locales and Internationalization - . </span></p></div><div class="biblioentry"><a id="id496957"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id468777"/><p><span class="citetitle"><em class="citetitle"> Correspondence - </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id496983"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id468803"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 14882:1998 Programming languages - C++ - </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id497002"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id468822"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 9899:1999 Programming languages - C - </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id497021"/><p><span class="biblioid"> + </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id468841"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) </em>. </span><span class="copyright">Copyright © 2008 The Open Group/The Institute of Electrical and Electronics Engineers, Inc. - . </span></p></div><div class="biblioentry"><a id="id497050"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id468870"/><p><span class="citetitle"><em class="citetitle"> The C++ Programming Language, Special Edition </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id497089"/><p><span class="citetitle"><em class="citetitle"> + . </span></span></p></div><div class="biblioentry"><a id="id468909"/><p><span class="citetitle"><em class="citetitle"> Standard C++ IOStreams and Locales </em>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference . </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley Longman, Inc.. </span><span class="publisher"><span class="publishername"> Addison Wesley Longman - . </span></span></p></div><div class="biblioentry"><a id="id497136"/><p><span class="biblioid"> + . </span></span></p></div><div class="biblioentry"><a id="id468956"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> API Specifications, Java Platform </em>. </span><span class="pagenums">java.util.Properties, java.text.MessageFormat, java.util.Locale, java.util.ResourceBundle - . </span></p></div><div class="biblioentry"><a id="id497158"/><p><span class="biblioid"> + . </span></p></div><div class="biblioentry"><a id="id468978"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> GNU gettext tools, version 0.10.38, Native Language Support Library and Tools. diff --git a/libstdc++-v3/doc/html/manual/intro.html b/libstdc++-v3/doc/html/manual/intro.html index 52c96abeb1e..a7c6bd2149a 100644 --- a/libstdc++-v3/doc/html/manual/intro.html +++ b/libstdc++-v3/doc/html/manual/intro.html @@ -5,5 +5,5 @@ </th></tr><tr><td align="left"><a accesskey="p" href="spine.html">Prev</a> </td><th width="60%" align="center">The GNU C++ Library Manual</th><td align="right"> <a accesskey="n" href="status.html">Next</a></td></tr></table><hr/></div><div class="part" title="Part I. Introduction"><div class="titlepage"><div><div><h1 class="title"><a id="manual.intro"/>Part I. Introduction - <a id="id418888" class="indexterm"/> + <a id="id390414" class="indexterm"/> </h1></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="chapter"><a href="status.html">1. Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#manual.intro.status.iso">Implementation Status</a></span></dt><dd><dl><dt><span class="section"><a href="status.html#status.iso.1998">C++ 1998/2003</a></span></dt><dt><span class="section"><a href="status.html#status.iso.200x">C++ 200x</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr1">C++ TR1</a></span></dt><dt><span class="section"><a href="status.html#status.iso.tr24733">C++ TR 24733</a></span></dt></dl></dd><dt><span class="section"><a href="license.html">License</a></span></dt><dd><dl><dt><span class="section"><a href="license.html#manual.intro.status.license.gpl">The Code: GPL</a></span></dt><dt><span class="section"><a href="license.html#manual.intro.status.license.fdl">The Documentation: GPL, FDL</a></span></dt></dl></dd><dt><span class="section"><a href="bugs.html">Bugs</a></span></dt><dd><dl><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.impl">Implementation Bugs</a></span></dt><dt><span class="section"><a href="bugs.html#manual.intro.status.bugs.iso">Standard Bugs</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="setup.html">2. Setup</a></span></dt><dd><dl><dt><span class="section"><a href="setup.html#manual.intro.setup.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="configure.html">Configure</a></span></dt><dt><span class="section"><a href="make.html">Make</a></span></dt></dl></dd><dt><span class="chapter"><a href="using.html">3. Using</a></span></dt><dd><dl><dt><span class="section"><a href="using.html#manual.intro.using.flags">Command Options</a></span></dt><dt><span class="section"><a href="using_headers.html">Headers</a></span></dt><dd><dl><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.all">Header Files</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.mixing">Mixing Headers</a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.cheaders">The C Headers and <code class="code">namespace std</code></a></span></dt><dt><span class="section"><a href="using_headers.html#manual.intro.using.headers.pre">Precompiled Headers</a></span></dt></dl></dd><dt><span class="section"><a href="using_macros.html">Macros</a></span></dt><dt><span class="section"><a href="using_namespaces.html">Namespaces</a></span></dt><dd><dl><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.all">Available Namespaces</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.std">namespace std</a></span></dt><dt><span class="section"><a href="using_namespaces.html#manual.intro.using.namespaces.comp">Using Namespace Composition</a></span></dt></dl></dd><dt><span class="section"><a href="using_dynamic_or_shared.html">Linking</a></span></dt><dd><dl><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.freestanding">Almost Nothing</a></span></dt><dt><span class="section"><a href="using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic">Finding Dynamic or Shared Libraries</a></span></dt></dl></dd><dt><span class="section"><a href="using_concurrency.html">Concurrency</a></span></dt><dd><dl><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.thread_safety">Thread Safety</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.atomics">Atomics</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.io">IO</a></span></dt><dt><span class="section"><a href="using_concurrency.html#manual.intro.using.concurrency.containers">Containers</a></span></dt></dl></dd><dt><span class="section"><a href="using_exceptions.html">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.safety">Exception Safety</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.propagating">Exception Neutrality</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.no">Doing without</a></span></dt><dt><span class="section"><a href="using_exceptions.html#intro.using.exception.compat">Compatibility</a></span></dt></dl></dd><dt><span class="section"><a href="debug.html">Debugging Support</a></span></dt><dd><dl><dt><span class="section"><a href="debug.html#debug.compiler">Using <span class="command"><strong>g++</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.req">Debug Versions of Library Binary Files</a></span></dt><dt><span class="section"><a href="debug.html#debug.memory">Memory Leak Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.races">Data Race Hunting</a></span></dt><dt><span class="section"><a href="debug.html#debug.gdb">Using <span class="command"><strong>gdb</strong></span></a></span></dt><dt><span class="section"><a href="debug.html#debug.exceptions">Tracking uncaught exceptions</a></span></dt><dt><span class="section"><a href="debug.html#debug.debug_mode">Debug Mode</a></span></dt><dt><span class="section"><a href="debug.html#debug.compile_time_checks">Compile Time Checking</a></span></dt><dt><span class="section"><a href="debug.html#debug.profile_mode">Profile-based Performance Analysis</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="spine.html">Prev</a> </td><td align="center"><a accesskey="u" href="spine.html">Up</a></td><td align="right"> <a accesskey="n" href="status.html">Next</a></td></tr><tr><td align="left" valign="top">The GNU C++ Library Manual </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Chapter 1. Status</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/io.html b/libstdc++-v3/doc/html/manual/io.html index e35da576ea4..5591e165d6c 100644 --- a/libstdc++-v3/doc/html/manual/io.html +++ b/libstdc++-v3/doc/html/manual/io.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="streambufs.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 13. Input and Output"><div class="titlepage"><div><div><h2 class="title"><a id="std.io"/>Chapter 13. Input and Output - <a id="id498935" class="indexterm"/> + <a id="id470755" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="io.html#std.io.objects">Iostream Objects</a></span></dt><dt><span class="section"><a href="streambufs.html">Stream Buffers</a></span></dt><dd><dl><dt><span class="section"><a href="streambufs.html#io.streambuf.derived">Derived streambuf Classes</a></span></dt><dt><span class="section"><a href="streambufs.html#io.streambuf.buffering">Buffering</a></span></dt></dl></dd><dt><span class="section"><a href="stringstreams.html">Memory Based Streams</a></span></dt><dd><dl><dt><span class="section"><a href="stringstreams.html#std.io.memstreams.compat">Compatibility With strstream</a></span></dt></dl></dd><dt><span class="section"><a href="fstreams.html">File Based Streams</a></span></dt><dd><dl><dt><span class="section"><a href="fstreams.html#std.io.filestreams.copying_a_file">Copying a File</a></span></dt><dt><span class="section"><a href="fstreams.html#std.io.filestreams.binary">Binary Input and Output</a></span></dt></dl></dd><dt><span class="section"><a href="io_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="io_and_c.html#std.io.c.FILE">Using FILE* and file descriptors</a></span></dt><dt><span class="section"><a href="io_and_c.html#std.io.c.sync">Performance</a></span></dt></dl></dd></dl></div><div class="section" title="Iostream Objects"><div class="titlepage"><div><div><h2 class="title"><a id="std.io.objects"/>Iostream Objects</h2></div></div></div><p>To minimize the time you have to wait on the compiler, it's good to only include the headers you really need. Many people simply include <iostream> when they don't need to -- and that can <span class="emphasis"><em>penalize diff --git a/libstdc++-v3/doc/html/manual/iterators.html b/libstdc++-v3/doc/html/manual/iterators.html index b53e99e1e4d..2ca7cb47360 100644 --- a/libstdc++-v3/doc/html/manual/iterators.html +++ b/libstdc++-v3/doc/html/manual/iterators.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="algorithms.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 10. Iterators"><div class="titlepage"><div><div><h2 class="title"><a id="std.iterators"/>Chapter 10. Iterators - <a id="id498101" class="indexterm"/> + <a id="id469921" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="iterators.html#std.iterators.predefined">Predefined</a></span></dt><dd><dl><dt><span class="section"><a href="iterators.html#iterators.predefined.vs_pointers">Iterators vs. Pointers</a></span></dt><dt><span class="section"><a href="iterators.html#iterators.predefined.end">One Past the End</a></span></dt></dl></dd></dl></div><div class="section" title="Predefined"><div class="titlepage"><div><div><h2 class="title"><a id="std.iterators.predefined"/>Predefined</h2></div></div></div><div class="section" title="Iterators vs. Pointers"><div class="titlepage"><div><div><h3 class="title"><a id="iterators.predefined.vs_pointers"/>Iterators vs. Pointers</h3></div></div></div><p> The following FAQ <a class="link" href="../faq.html#faq.iterator_as_pod" title="7.1.">entry</a> points out that diff --git a/libstdc++-v3/doc/html/manual/localization.html b/libstdc++-v3/doc/html/manual/localization.html index a36a0fdb242..e440c5a10cd 100644 --- a/libstdc++-v3/doc/html/manual/localization.html +++ b/libstdc++-v3/doc/html/manual/localization.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="facets.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 8. Localization"><div class="titlepage"><div><div><h2 class="title"><a id="std.localization"/>Chapter 8. Localization - <a id="id494369" class="indexterm"/> + <a id="id466189" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="localization.html#std.localization.locales">Locales</a></span></dt><dd><dl><dt><span class="section"><a href="localization.html#std.localization.locales.locale">locale</a></span></dt></dl></dd><dt><span class="section"><a href="facets.html">Facets</a></span></dt><dd><dl><dt><span class="section"><a href="facets.html#std.localization.facet.ctype">ctype</a></span></dt><dt><span class="section"><a href="facets.html#std.localization.facet.codecvt">codecvt</a></span></dt><dt><span class="section"><a href="facets.html#manual.localization.facet.messages">messages</a></span></dt></dl></dd></dl></div><div class="section" title="Locales"><div class="titlepage"><div><div><h2 class="title"><a id="std.localization.locales"/>Locales</h2></div></div></div><div class="section" title="locale"><div class="titlepage"><div><div><h3 class="title"><a id="std.localization.locales.locale"/>locale</h3></div></div></div><p> Describes the basic locale object, including nested classes id, facet, and the reference-counted implementation object, @@ -403,28 +403,28 @@ global locale" (emphasis Paolo), that is: What should non-required facet instantiations do? If the generic implementation is provided, then how to end-users provide specializations? - </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="locales.locale.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id494732"/><p><span class="citetitle"><em class="citetitle"> + </p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="locales.locale.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id466552"/><p><span class="citetitle"><em class="citetitle"> The GNU C Library </em>. </span><span class="author"><span class="firstname">Roland</span> <span class="surname">McGrath</span>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2007 FSF. </span><span class="pagenums"> Chapters 6 Character Set Handling and 7 Locales and Internationalization - . </span></p></div><div class="biblioentry"><a id="id494772"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id466591"/><p><span class="citetitle"><em class="citetitle"> Correspondence - </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id494797"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Ulrich</span> <span class="surname">Drepper</span>. </span><span class="copyright">Copyright © 2002 . </span></p></div><div class="biblioentry"><a id="id466617"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 14882:1998 Programming languages - C++ - </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id494816"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="copyright">Copyright © 1998 ISO. </span></p></div><div class="biblioentry"><a id="id466636"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 9899:1999 Programming languages - C - </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id494835"/><p><span class="biblioid"> + </em>. </span><span class="copyright">Copyright © 1999 ISO. </span></p></div><div class="biblioentry"><a id="id466655"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) </em>. </span><span class="copyright">Copyright © 2008 The Open Group/The Institute of Electrical and Electronics Engineers, Inc. - . </span></p></div><div class="biblioentry"><a id="id494865"/><p><span class="citetitle"><em class="citetitle"> + . </span></p></div><div class="biblioentry"><a id="id466684"/><p><span class="citetitle"><em class="citetitle"> The C++ Programming Language, Special Edition </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 Addison Wesley, Inc.. </span><span class="pagenums">Appendix D. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id494903"/><p><span class="citetitle"><em class="citetitle"> + . </span></span></p></div><div class="biblioentry"><a id="id466723"/><p><span class="citetitle"><em class="citetitle"> Standard C++ IOStreams and Locales </em>. </span><span class="subtitle"> Advanced Programmer's Guide and Reference diff --git a/libstdc++-v3/doc/html/manual/memory.html b/libstdc++-v3/doc/html/manual/memory.html index c9bc92abbd4..69de53d3b95 100644 --- a/libstdc++-v3/doc/html/manual/memory.html +++ b/libstdc++-v3/doc/html/manual/memory.html @@ -93,7 +93,7 @@ or loading and unloading shared objects in memory. As such, using caching allocators on systems that do not support <code class="function">abi::__cxa_atexit</code> is not recommended. - </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.impl"/>Implementation</h4></div></div></div><div class="section" title="Interface Design"><div class="titlepage"><div><div><h5 class="title"><a id="id491549"/>Interface Design</h5></div></div></div><p> + </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.impl"/>Implementation</h4></div></div></div><div class="section" title="Interface Design"><div class="titlepage"><div><div><h5 class="title"><a id="id463369"/>Interface Design</h5></div></div></div><p> The only allocator interface that is supported is the standard C++ interface. As such, all STL containers have been adjusted, and all external allocators have @@ -106,7 +106,7 @@ </p><p> The base class that <code class="classname">allocator</code> is derived from may not be user-configurable. -</p></div><div class="section" title="Selecting Default Allocation Policy"><div class="titlepage"><div><div><h5 class="title"><a id="id491579"/>Selecting Default Allocation Policy</h5></div></div></div><p> +</p></div><div class="section" title="Selecting Default Allocation Policy"><div class="titlepage"><div><div><h5 class="title"><a id="id463399"/>Selecting Default Allocation Policy</h5></div></div></div><p> It's difficult to pick an allocation strategy that will provide maximum utility, without excessively penalizing some behavior. In fact, it's difficult just deciding which typical actions to measure @@ -143,7 +143,7 @@ The current default choice for <code class="classname">allocator</code> is <code class="classname">__gnu_cxx::new_allocator</code>. - </p></div><div class="section" title="Disabling Memory Caching"><div class="titlepage"><div><div><h5 class="title"><a id="id491690"/>Disabling Memory Caching</h5></div></div></div><p> + </p></div><div class="section" title="Disabling Memory Caching"><div class="titlepage"><div><div><h5 class="title"><a id="id463510"/>Disabling Memory Caching</h5></div></div></div><p> In use, <code class="classname">allocator</code> may allocate and deallocate using implementation-specified strategies and heuristics. Because of this, every call to an allocator object's @@ -308,29 +308,29 @@ A high-performance allocator that uses a bit-map to keep track of the used and unused memory locations. It has its own documentation, found <a class="link" href="bitmap_allocator.html" title="bitmap_allocator">here</a>. - </p></li></ol></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id492140"/><p><span class="citetitle"><em class="citetitle"> + </p></li></ol></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="allocator.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id463960"/><p><span class="citetitle"><em class="citetitle"> ISO/IEC 14882:1998 Programming languages - C++ </em>. </span> isoc++_1998 - <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id492156"/><p><span class="biblioid"> + <span class="pagenums">20.4 Memory. </span></p></div><div class="biblioentry"><a id="id463975"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> The Standard Librarian: What Are Allocators Good For? </em>. </span><span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername"> C/C++ Users Journal - . </span></span></p></div><div class="biblioentry"><a id="id492189"/><p><span class="biblioid"> + . </span></span></p></div><div class="biblioentry"><a id="id464009"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> The Hoard Memory Allocator - </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span></p></div><div class="biblioentry"><a id="id492214"/><p><span class="biblioid"> + </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span></p></div><div class="biblioentry"><a id="id464034"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Reconsidering Custom Memory Allocation - </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span></p></div><div class="biblioentry"><a id="id492268"/><p><span class="biblioid"> + </em>. </span><span class="author"><span class="firstname">Emery</span> <span class="surname">Berger</span>. </span><span class="author"><span class="firstname">Ben</span> <span class="surname">Zorn</span>. </span><span class="author"><span class="firstname">Kathryn</span> <span class="surname">McKinley</span>. </span><span class="copyright">Copyright © 2002 OOPSLA. </span></p></div><div class="biblioentry"><a id="id464088"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Allocator Types </em>. </span><span class="author"><span class="firstname">Klaus</span> <span class="surname">Kreft</span>. </span><span class="author"><span class="firstname">Angelika</span> <span class="surname">Langer</span>. </span><span class="publisher"><span class="publishername"> C/C++ Users Journal - . </span></span></p></div><div class="biblioentry"><a id="id492310"/><p><span class="citetitle"><em class="citetitle">The C++ Programming Language</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername"> + . </span></span></p></div><div class="biblioentry"><a id="id464130"/><p><span class="citetitle"><em class="citetitle">The C++ Programming Language</em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span><span class="copyright">Copyright © 2000 . </span><span class="pagenums">19.4 Allocators. </span><span class="publisher"><span class="publishername"> Addison Wesley - . </span></span></p></div><div class="biblioentry"><a id="id492347"/><p><span class="citetitle"><em class="citetitle">Yalloc: A Recycling C++ Allocator</em>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span></p></div></div></div><div class="section" title="auto_ptr"><div class="titlepage"><div><div><h3 class="title"><a id="std.util.memory.auto_ptr"/>auto_ptr</h3></div></div></div><div class="section" title="Limitations"><div class="titlepage"><div><div><h4 class="title"><a id="auto_ptr.limitations"/>Limitations</h4></div></div></div><p>Explaining all of the fun and delicious things that can + . </span></span></p></div><div class="biblioentry"><a id="id464166"/><p><span class="citetitle"><em class="citetitle">Yalloc: A Recycling C++ Allocator</em>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Yen</span>. </span></p></div></div></div><div class="section" title="auto_ptr"><div class="titlepage"><div><div><h3 class="title"><a id="std.util.memory.auto_ptr"/>auto_ptr</h3></div></div></div><div class="section" title="Limitations"><div class="titlepage"><div><div><h4 class="title"><a id="auto_ptr.limitations"/>Limitations</h4></div></div></div><p>Explaining all of the fun and delicious things that can happen with misuse of the <code class="classname">auto_ptr</code> class template (called <acronym class="acronym">AP</acronym> here) would take some time. Suffice it to say that the use of <acronym class="acronym">AP</acronym> @@ -446,7 +446,7 @@ drops to zero. Derived classes override those functions to destroy resources in a context where the correct dynamic type is known. This is an application of the technique known as type erasure. - </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.impl"/>Implementation</h4></div></div></div><div class="section" title="Class Hierarchy"><div class="titlepage"><div><div><h5 class="title"><a id="id492707"/>Class Hierarchy</h5></div></div></div><p> + </p></div><div class="section" title="Implementation"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.impl"/>Implementation</h4></div></div></div><div class="section" title="Class Hierarchy"><div class="titlepage"><div><div><h5 class="title"><a id="id464527"/>Class Hierarchy</h5></div></div></div><p> A <code class="classname">shared_ptr<T></code> contains a pointer of type <span class="type">T*</span> and an object of type <code class="classname">__shared_count</code>. The shared_count contains a @@ -488,7 +488,7 @@ be forwarded to <span class="type">Tp</span>'s constructor. Unlike the other <code class="classname">_Sp_counted_*</code> classes, this one is parameterized on the type of object, not the type of pointer; this is purely a convenience that simplifies the implementation slightly. - </p></dd></dl></div></div><div class="section" title="Thread Safety"><div class="titlepage"><div><div><h5 class="title"><a id="id492886"/>Thread Safety</h5></div></div></div><p> + </p></dd></dl></div></div><div class="section" title="Thread Safety"><div class="titlepage"><div><div><h5 class="title"><a id="id464706"/>Thread Safety</h5></div></div></div><p> C++0x-only features are: rvalue-ref/move support, allocator support, aliasing constructor, make_shared & allocate_shared. Additionally, the constructors taking <code class="classname">auto_ptr</code> parameters are @@ -538,7 +538,7 @@ compiler, standard library, platform etc. For the version of shared_ptr in libstdc++ the compiler and library are fixed, which makes things much simpler: we have an atomic CAS or we don't, see Lock Policy below for details. -</p></div><div class="section" title="Selecting Lock Policy"><div class="titlepage"><div><div><h5 class="title"><a id="id492955"/>Selecting Lock Policy</h5></div></div></div><p> +</p></div><div class="section" title="Selecting Lock Policy"><div class="titlepage"><div><div><h5 class="title"><a id="id464775"/>Selecting Lock Policy</h5></div></div></div><p> </p><p> There is a single <code class="classname">_Sp_counted_base</code> class, which is a template parameterized on the enum @@ -579,7 +579,7 @@ used when libstdc++ is built without <code class="literal">--enable-threads</cod <code class="filename">ext/atomicity.h</code>, which detect if the program is multi-threaded. If only one thread of execution exists in the program then less expensive non-atomic operations are used. - </p></div><div class="section" title="Dual C++0x and TR1 Implementation"><div class="titlepage"><div><div><h5 class="title"><a id="id493077"/>Dual C++0x and TR1 Implementation</h5></div></div></div><p> + </p></div><div class="section" title="Dual C++0x and TR1 Implementation"><div class="titlepage"><div><div><h5 class="title"><a id="id464897"/>Dual C++0x and TR1 Implementation</h5></div></div></div><p> The interface of <code class="classname">tr1::shared_ptr</code> was extended for C++0x with support for rvalue-references and the other features from N2351. The <code class="classname">_Sp_counted_base</code> base class is implemented in @@ -596,7 +596,7 @@ change unless bug fixes require it. If the code that is common to both C++0x and TR1 modes needs to diverge further then it might be necessary to duplicate <code class="classname">_Sp_counted_base</code> and only make changes to the C++0x version. -</p></div><div class="section" title="Related functions and classes"><div class="titlepage"><div><div><h5 class="title"><a id="id493133"/>Related functions and classes</h5></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>, +</p></div><div class="section" title="Related functions and classes"><div class="titlepage"><div><div><h5 class="title"><a id="id464953"/>Related functions and classes</h5></div></div></div><div class="variablelist"><dl><dt><span class="term"><code class="code">dynamic_pointer_cast</code>, <code class="code">static_pointer_cast</code>, <code class="code">const_pointer_cast</code></span></dt><dd><p> As noted in N2351, these functions can be implemented non-intrusively using the alias constructor. However the aliasing constructor is only available @@ -629,13 +629,13 @@ is called. Users should not try to use this. As well as the extra constructors, this implementation also needs some members of _Sp_counted_deleter to be protected where they could otherwise be private. - </p></dd></dl></div></div></div><div class="section" title="Use"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.using"/>Use</h4></div></div></div><div class="section" title="Examples"><div class="titlepage"><div><div><h5 class="title"><a id="id493282"/>Examples</h5></div></div></div><p> + </p></dd></dl></div></div></div><div class="section" title="Use"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.using"/>Use</h4></div></div></div><div class="section" title="Examples"><div class="titlepage"><div><div><h5 class="title"><a id="id465102"/>Examples</h5></div></div></div><p> Examples of use can be found in the testsuite, under <code class="filename">testsuite/tr1/2_general_utilities/shared_ptr</code>, <code class="filename">testsuite/20_util/shared_ptr</code> and <code class="filename">testsuite/20_util/weak_ptr</code>. - </p></div><div class="section" title="Unresolved Issues"><div class="titlepage"><div><div><h5 class="title"><a id="id493312"/>Unresolved Issues</h5></div></div></div><p> + </p></div><div class="section" title="Unresolved Issues"><div class="titlepage"><div><div><h5 class="title"><a id="id465132"/>Unresolved Issues</h5></div></div></div><p> The <span class="emphasis"><em><code class="classname">shared_ptr</code> atomic access</em></span> clause in the C++0x working draft is not implemented in GCC. </p><p> @@ -676,22 +676,22 @@ be private. code to work with, Peter Dimov in particular for his help and invaluable advice on thread safety. Phillip Jordan and Paolo Carlini for the lock policy implementation. - </p></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id493406"/><p><span class="biblioid"> + </p></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h4 class="title"><a id="shared_ptr.biblio"/>Bibliography</h4></div></div></div><div class="biblioentry"><a id="id465226"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Improving shared_ptr for C++0x, Revision 2 </em>. </span><span class="subtitle"> N2351 - . </span></p></div><div class="biblioentry"><a id="id493427"/><p><span class="biblioid"> + . </span></p></div><div class="biblioentry"><a id="id465247"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> C++ Standard Library Active Issues List </em>. </span><span class="subtitle"> N2456 - . </span></p></div><div class="biblioentry"><a id="id493448"/><p><span class="biblioid"> + . </span></p></div><div class="biblioentry"><a id="id465268"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Working Draft, Standard for Programming Language C++ </em>. </span><span class="subtitle"> N2461 - . </span></p></div><div class="biblioentry"><a id="id493470"/><p><span class="biblioid">shared_ptr + . </span></p></div><div class="biblioentry"><a id="id465290"/><p><span class="biblioid">shared_ptr . </span><span class="citetitle"><em class="citetitle"> Boost C++ Libraries documentation, shared_ptr </em>. </span><span class="subtitle"> diff --git a/libstdc++-v3/doc/html/manual/numerics.html b/libstdc++-v3/doc/html/manual/numerics.html index 9557d9c0d7a..d5ccecef9c3 100644 --- a/libstdc++-v3/doc/html/manual/numerics.html +++ b/libstdc++-v3/doc/html/manual/numerics.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="generalized_numeric_operations.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 12. Numerics"><div class="titlepage"><div><div><h2 class="title"><a id="std.numerics"/>Chapter 12. Numerics - <a id="id498589" class="indexterm"/> + <a id="id470409" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="numerics.html#std.numerics.complex">Complex</a></span></dt><dd><dl><dt><span class="section"><a href="numerics.html#numerics.complex.processing">complex Processing</a></span></dt></dl></dd><dt><span class="section"><a href="generalized_numeric_operations.html">Generalized Operations</a></span></dt><dt><span class="section"><a href="numerics_and_c.html">Interacting with C</a></span></dt><dd><dl><dt><span class="section"><a href="numerics_and_c.html#numerics.c.array">Numerics vs. Arrays</a></span></dt><dt><span class="section"><a href="numerics_and_c.html#numerics.c.c99">C99</a></span></dt></dl></dd></dl></div><div class="section" title="Complex"><div class="titlepage"><div><div><h2 class="title"><a id="std.numerics.complex"/>Complex</h2></div></div></div><p> </p><div class="section" title="complex Processing"><div class="titlepage"><div><div><h3 class="title"><a id="numerics.complex.processing"/>complex Processing</h3></div></div></div><p> </p><p>Using <code class="code">complex<></code> becomes even more comple- er, sorry, diff --git a/libstdc++-v3/doc/html/manual/parallel_mode.html b/libstdc++-v3/doc/html/manual/parallel_mode.html index 205c0d0ce4a..435f37443c5 100644 --- a/libstdc++-v3/doc/html/manual/parallel_mode.html +++ b/libstdc++-v3/doc/html/manual/parallel_mode.html @@ -13,11 +13,11 @@ explicit source declaration or by compiling existing sources with a specific compiler flag. </p><div class="section" title="Intro"><div class="titlepage"><div><div><h2 class="title"><a id="manual.ext.parallel_mode.intro"/>Intro</h2></div></div></div><p>The following library components in the include <code class="filename">numeric</code> are included in the parallel mode:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p><code class="function">std::accumulate</code></p></li><li class="listitem"><p><code class="function">std::adjacent_difference</code></p></li><li class="listitem"><p><code class="function">std::inner_product</code></p></li><li class="listitem"><p><code class="function">std::partial_sum</code></p></li></ul></div><p>The following library components in the include -<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p><code class="function">std::adjacent_find</code></p></li><li class="listitem"><p><code class="function">std::count</code></p></li><li class="listitem"><p><code class="function">std::count_if</code></p></li><li class="listitem"><p><code class="function">std::equal</code></p></li><li class="listitem"><p><code class="function">std::find</code></p></li><li class="listitem"><p><code class="function">std::find_if</code></p></li><li class="listitem"><p><code class="function">std::find_first_of</code></p></li><li class="listitem"><p><code class="function">std::for_each</code></p></li><li class="listitem"><p><code class="function">std::generate</code></p></li><li class="listitem"><p><code class="function">std::generate_n</code></p></li><li class="listitem"><p><code class="function">std::lexicographical_compare</code></p></li><li class="listitem"><p><code class="function">std::mismatch</code></p></li><li class="listitem"><p><code class="function">std::search</code></p></li><li class="listitem"><p><code class="function">std::search_n</code></p></li><li class="listitem"><p><code class="function">std::transform</code></p></li><li class="listitem"><p><code class="function">std::replace</code></p></li><li class="listitem"><p><code class="function">std::replace_if</code></p></li><li class="listitem"><p><code class="function">std::max_element</code></p></li><li class="listitem"><p><code class="function">std::merge</code></p></li><li class="listitem"><p><code class="function">std::min_element</code></p></li><li class="listitem"><p><code class="function">std::nth_element</code></p></li><li class="listitem"><p><code class="function">std::partial_sort</code></p></li><li class="listitem"><p><code class="function">std::partition</code></p></li><li class="listitem"><p><code class="function">std::random_shuffle</code></p></li><li class="listitem"><p><code class="function">std::set_union</code></p></li><li class="listitem"><p><code class="function">std::set_intersection</code></p></li><li class="listitem"><p><code class="function">std::set_symmetric_difference</code></p></li><li class="listitem"><p><code class="function">std::set_difference</code></p></li><li class="listitem"><p><code class="function">std::sort</code></p></li><li class="listitem"><p><code class="function">std::stable_sort</code></p></li><li class="listitem"><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"/>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id504513"/><p><span class="citetitle"><em class="citetitle"> +<code class="filename">algorithm</code> are included in the parallel mode:</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p><code class="function">std::adjacent_find</code></p></li><li class="listitem"><p><code class="function">std::count</code></p></li><li class="listitem"><p><code class="function">std::count_if</code></p></li><li class="listitem"><p><code class="function">std::equal</code></p></li><li class="listitem"><p><code class="function">std::find</code></p></li><li class="listitem"><p><code class="function">std::find_if</code></p></li><li class="listitem"><p><code class="function">std::find_first_of</code></p></li><li class="listitem"><p><code class="function">std::for_each</code></p></li><li class="listitem"><p><code class="function">std::generate</code></p></li><li class="listitem"><p><code class="function">std::generate_n</code></p></li><li class="listitem"><p><code class="function">std::lexicographical_compare</code></p></li><li class="listitem"><p><code class="function">std::mismatch</code></p></li><li class="listitem"><p><code class="function">std::search</code></p></li><li class="listitem"><p><code class="function">std::search_n</code></p></li><li class="listitem"><p><code class="function">std::transform</code></p></li><li class="listitem"><p><code class="function">std::replace</code></p></li><li class="listitem"><p><code class="function">std::replace_if</code></p></li><li class="listitem"><p><code class="function">std::max_element</code></p></li><li class="listitem"><p><code class="function">std::merge</code></p></li><li class="listitem"><p><code class="function">std::min_element</code></p></li><li class="listitem"><p><code class="function">std::nth_element</code></p></li><li class="listitem"><p><code class="function">std::partial_sort</code></p></li><li class="listitem"><p><code class="function">std::partition</code></p></li><li class="listitem"><p><code class="function">std::random_shuffle</code></p></li><li class="listitem"><p><code class="function">std::set_union</code></p></li><li class="listitem"><p><code class="function">std::set_intersection</code></p></li><li class="listitem"><p><code class="function">std::set_symmetric_difference</code></p></li><li class="listitem"><p><code class="function">std::set_difference</code></p></li><li class="listitem"><p><code class="function">std::sort</code></p></li><li class="listitem"><p><code class="function">std::stable_sort</code></p></li><li class="listitem"><p><code class="function">std::unique_copy</code></p></li></ul></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="parallel_mode.biblio"/>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id476333"/><p><span class="citetitle"><em class="citetitle"> Parallelization of Bulk Operations for STL Dictionaries </em>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Leonor</span> <span class="surname">Frias</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername"> Workshop on Highly Parallel Processing on a Chip (HPPC) 2007. (LNCS) - . </span></span></p></div><div class="biblioentry"><a id="id504555"/><p><span class="citetitle"><em class="citetitle"> + . </span></span></p></div><div class="biblioentry"><a id="id476375"/><p><span class="citetitle"><em class="citetitle"> The Multi-Core Standard Template Library </em>. </span><span class="author"><span class="firstname">Johannes</span> <span class="surname">Singler</span>. </span><span class="author"><span class="firstname">Peter</span> <span class="surname">Sanders</span>. </span><span class="author"><span class="firstname">Felix</span> <span class="surname">Putze</span>. </span><span class="copyright">Copyright © 2007 . </span><span class="publisher"><span class="publishername"> Euro-Par 2007: Parallel Processing. (LNCS 4641) diff --git a/libstdc++-v3/doc/html/manual/profile_mode.html b/libstdc++-v3/doc/html/manual/profile_mode.html index 930420ae0ab..1c1c5990249 100644 --- a/libstdc++-v3/doc/html/manual/profile_mode.html +++ b/libstdc++-v3/doc/html/manual/profile_mode.html @@ -138,7 +138,7 @@ vector-size: improvement = 3: call stack = 0x804842c ... call context. (Environment variable not supported.) </p></li></ul></div><p> - </p></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="profile_mode.biblio"/>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id508404"/><p><span class="citetitle"><em class="citetitle"> + </p></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h2 class="title"><a id="profile_mode.biblio"/>Bibliography</h2></div></div></div><div class="biblioentry"><a id="id480224"/><p><span class="citetitle"><em class="citetitle"> Perflint: A Context Sensitive Performance Advisor for C++ Programs </em>. </span><span class="author"><span class="firstname">Lixia</span> <span class="surname">Liu</span>. </span><span class="author"><span class="firstname">Silvius</span> <span class="surname">Rus</span>. </span><span class="copyright">Copyright © 2009 . </span><span class="publisher"><span class="publishername"> Proceedings of the 2009 International Symposium on Code Generation diff --git a/libstdc++-v3/doc/html/manual/spine.html b/libstdc++-v3/doc/html/manual/spine.html index 5abc3a44e16..688d0625510 100644 --- a/libstdc++-v3/doc/html/manual/spine.html +++ b/libstdc++-v3/doc/html/manual/spine.html @@ -2,7 +2,7 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>The GNU C++ Library Manual</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><link rel="home" href="../spine.html" title="The GNU C++ Library"/><link rel="up" href="../spine.html" title="The GNU C++ Library"/><link rel="prev" href="../spine.html" title="The GNU C++ Library"/><link rel="next" href="intro.html" title="Part I. Introduction"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The GNU C++ Library Manual</th></tr><tr><td align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><th width="60%" align="center"> </th><td align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr></table><hr/></div><div class="book" title="The GNU C++ Library Manual"><div class="titlepage"><div><div><h1 class="title"><a id="manual-index"/>The GNU C++ Library Manual</h1></div><div><p class="copyright">Copyright © 2009, 2010 <a class="link" href="http://www.fsf.org">FSF</a> - </p></div><div><div class="legalnotice" title="Legal Notice"><a id="id430752"/><p> + </p></div><div><div class="legalnotice" title="Legal Notice"><a id="id402308"/><p> <a class="link" href="license.html" title="License">License</a> </p></div></div></div><hr/></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="part"><a href="intro.html">I. Introduction @@ -61,7 +61,7 @@ </a></span></dt><dt><span class="appendix"><a href="appendix_gpl.html">D. <acronym class="acronym">GNU</acronym> General Public License version 3 - </a></span></dt><dt><span class="appendix"><a href="appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></div><div class="list-of-figures"><p><strong>List of Figures</strong></p><dl><dt>B.1. <a href="appendix_porting.html#id512650">Configure and Build File Dependencies</a></dt></dl></div><div class="list-of-tables"><p><strong>List of Tables</strong></p><dl><dt>1.1. <a href="status.html#id428878">C++ 1998/2003 Implementation Status</a></dt><dt>1.2. <a href="status.html#id432538">C++ 200x Implementation Status</a></dt><dt>1.3. <a href="status.html#id474660">C++ TR1 Implementation Status</a></dt><dt>1.4. <a href="status.html#id480230">C++ TR 24733 Implementation Status</a></dt><dt>3.1. <a href="using.html#id484374">C++ Command Options</a></dt><dt>3.2. <a href="using_headers.html#id484603">C++ 1998 Library Headers</a></dt><dt>3.3. <a href="using_headers.html#id484907">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.4. <a href="using_headers.html#id485113">C++ 200x Library Headers</a></dt><dt>3.5. <a href="using_headers.html#id485542">C++ 200x Library Headers for C Library Facilities</a></dt><dt>3.6. <a href="using_headers.html#id485791">C++ TR 1 Library Headers</a></dt><dt>3.7. <a href="using_headers.html#id485932">C++ TR 1 Library Headers for C Library Facilities</a></dt><dt>3.8. <a href="using_headers.html#id486108">C++ TR 24733 Decimal Floating-Point Header</a></dt><dt>3.9. <a href="using_headers.html#id486154">C++ ABI Headers</a></dt><dt>3.10. <a href="using_headers.html#id486207">Extension Headers</a></dt><dt>3.11. <a href="using_headers.html#id486505">Extension Debug Headers</a></dt><dt>3.12. <a href="using_headers.html#id486628">Extension Profile Headers</a></dt><dt>3.13. <a href="using_headers.html#id486739">Extension Parallel Headers</a></dt><dt>17.1. <a href="bk01pt03ch17s03.html#id500883">Debugging Containers</a></dt><dt>17.2. <a href="bk01pt03ch17s03.html#id501257">Debugging Containers C++0x</a></dt><dt>18.1. <a href="bk01pt03ch18s03.html#id502844">Parallel Algorithms</a></dt><dt>19.1. <a href="bk01pt03ch19s02.html#id504968">Profile Code Location</a></dt><dt>19.2. <a href="bk01pt03ch19s07.html#id505850">Profile Diagnostics</a></dt><dt>20.1. <a href="bitmap_allocator.html#id509291">Bitmap Allocator Memory Map</a></dt><dt>B.1. <a href="documentation_hacking.html#id513551">Doxygen Prerequisites</a></dt><dt>B.2. <a href="documentation_hacking.html#id514053">HTML to Doxygen Markup Comparison</a></dt><dt>B.3. <a href="documentation_hacking.html#id514215">Docbook Prerequisites</a></dt><dt>B.4. <a href="documentation_hacking.html#id514692">HTML to Docbook XML Markup Comparison</a></dt><dt>B.5. <a href="documentation_hacking.html#id514893">Docbook XML Element Use</a></dt><dt>B.6. <a href="api.html#id520604">Extension Allocators</a></dt><dt>B.7. <a href="api.html#id520834">Extension Allocators Continued</a></dt></dl></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><td align="center"> </td><td align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td align="left" valign="top">The GNU C++ Library </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Part I. + </a></span></dt><dt><span class="appendix"><a href="appendix_gfdl.html">E. GNU Free Documentation License</a></span></dt></dl></dd></dl></div><div class="list-of-figures"><p><strong>List of Figures</strong></p><dl><dt>B.1. <a href="appendix_porting.html#id484470">Configure and Build File Dependencies</a></dt></dl></div><div class="list-of-tables"><p><strong>List of Tables</strong></p><dl><dt>1.1. <a href="status.html#id390604">C++ 1998/2003 Implementation Status</a></dt><dt>1.2. <a href="status.html#id404363">C++ 200x Implementation Status</a></dt><dt>1.3. <a href="status.html#id446479">C++ TR1 Implementation Status</a></dt><dt>1.4. <a href="status.html#id452050">C++ TR 24733 Implementation Status</a></dt><dt>3.1. <a href="using.html#id456194">C++ Command Options</a></dt><dt>3.2. <a href="using_headers.html#id456423">C++ 1998 Library Headers</a></dt><dt>3.3. <a href="using_headers.html#id456727">C++ 1998 Library Headers for C Library Facilities</a></dt><dt>3.4. <a href="using_headers.html#id456933">C++ 200x Library Headers</a></dt><dt>3.5. <a href="using_headers.html#id457362">C++ 200x Library Headers for C Library Facilities</a></dt><dt>3.6. <a href="using_headers.html#id457611">C++ TR 1 Library Headers</a></dt><dt>3.7. <a href="using_headers.html#id457752">C++ TR 1 Library Headers for C Library Facilities</a></dt><dt>3.8. <a href="using_headers.html#id457928">C++ TR 24733 Decimal Floating-Point Header</a></dt><dt>3.9. <a href="using_headers.html#id457974">C++ ABI Headers</a></dt><dt>3.10. <a href="using_headers.html#id458027">Extension Headers</a></dt><dt>3.11. <a href="using_headers.html#id458325">Extension Debug Headers</a></dt><dt>3.12. <a href="using_headers.html#id458448">Extension Profile Headers</a></dt><dt>3.13. <a href="using_headers.html#id458559">Extension Parallel Headers</a></dt><dt>17.1. <a href="bk01pt03ch17s03.html#id472703">Debugging Containers</a></dt><dt>17.2. <a href="bk01pt03ch17s03.html#id473077">Debugging Containers C++0x</a></dt><dt>18.1. <a href="bk01pt03ch18s03.html#id474664">Parallel Algorithms</a></dt><dt>19.1. <a href="bk01pt03ch19s02.html#id476788">Profile Code Location</a></dt><dt>19.2. <a href="bk01pt03ch19s07.html#id477670">Profile Diagnostics</a></dt><dt>20.1. <a href="bitmap_allocator.html#id481111">Bitmap Allocator Memory Map</a></dt><dt>B.1. <a href="documentation_hacking.html#id485371">Doxygen Prerequisites</a></dt><dt>B.2. <a href="documentation_hacking.html#id485873">HTML to Doxygen Markup Comparison</a></dt><dt>B.3. <a href="documentation_hacking.html#id486035">Docbook Prerequisites</a></dt><dt>B.4. <a href="documentation_hacking.html#id486512">HTML to Docbook XML Markup Comparison</a></dt><dt>B.5. <a href="documentation_hacking.html#id486714">Docbook XML Element Use</a></dt><dt>B.6. <a href="api.html#id492424">Extension Allocators</a></dt><dt>B.7. <a href="api.html#id492654">Extension Allocators Continued</a></dt></dl></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="../spine.html">Prev</a> </td><td align="center"> </td><td align="right"> <a accesskey="n" href="intro.html">Next</a></td></tr><tr><td align="left" valign="top">The GNU C++ Library </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Part I. Introduction </td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html index 7ac4ec0a576..f7fdb486604 100644 --- a/libstdc++-v3/doc/html/manual/status.html +++ b/libstdc++-v3/doc/html/manual/status.html @@ -8,7 +8,7 @@ This status table is based on the table of contents of ISO/IEC 14882:2003. </p><p> This page describes the C++ support in mainline GCC SVN, not in any particular release. -</p><div class="table"><a id="id428878"/><p class="title"><strong>Table 1.1. C++ 1998/2003 Implementation Status</strong></p><div class="table-contents"><table summary="C++ 1998/2003 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> +</p><div class="table"><a id="id390604"/><p class="title"><strong>Table 1.1. C++ 1998/2003 Implementation Status</strong></p><div class="table-contents"><table summary="C++ 1998/2003 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> <span class="emphasis"><em>18</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Language support</em></span> @@ -157,11 +157,11 @@ presence of the required flag. </p><p> This page describes the C++0x support in mainline GCC SVN, not in any particular release. -</p><div class="table"><a id="id432538"/><p class="title"><strong>Table 1.2. C++ 200x Implementation Status</strong></p><div class="table-contents"><table summary="C++ 200x Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> +</p><div class="table"><a id="id404363"/><p class="title"><strong>Table 1.2. C++ 200x Implementation Status</strong></p><div class="table-contents"><table summary="C++ 200x Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> <span class="emphasis"><em>18</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Language support</em></span> - </td></tr><tr><td style="text-align: left">18.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">18.2</td><td style="text-align: left">Types</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing offsetof, max_align_t</td></tr><tr><td style="text-align: left">18.3</td><td style="text-align: left">Implementation properties</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2</td><td style="text-align: left">Numeric Limits</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.3</td><td style="text-align: left">Class template <code class="code">numeric_limits</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.4</td><td style="text-align: left"><code class="code">numeric_limits</code> members</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">18.3.2.5</td><td style="text-align: left"><code class="code">float_round_style</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">18.3.2.6</td><td style="text-align: left"><code class="code">float_denorm_style</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.7</td><td style="text-align: left"><code class="code">numeric_limits</code> specializations</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.3</td><td style="text-align: left">C Library</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.4</td><td style="text-align: left">Integer types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.4.1</td><td style="text-align: left">Header <code class="code"><cstdint></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">18.5</td><td style="text-align: left">Start and termination</td><td style="text-align: left">Partial</td><td style="text-align: left">C library dependency for quick_exit, at_quick_exit</td></tr><tr><td style="text-align: left">18.6</td><td style="text-align: left">Dynamic memory management</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7</td><td style="text-align: left">Type identification</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.1</td><td style="text-align: left">Class type_info</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.2</td><td style="text-align: left">Class bad_cast</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.3</td><td style="text-align: left">Class bad_typeid</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8</td><td style="text-align: left">Exception handling</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.1</td><td style="text-align: left">Class exception</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.2</td><td style="text-align: left">Class bad_exception</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.3</td><td style="text-align: left">Abnormal termination</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.4</td><td style="text-align: left"><code class="code">uncaught_exception</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.5</td><td style="text-align: left">Exception Propagation</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.6</td><td style="text-align: left"><code class="code">nested_exception</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9</td><td style="text-align: left">Initializer lists</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9.1</td><td style="text-align: left">Initializer list constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9.2</td><td style="text-align: left">Initializer list access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">18.9.3</td><td style="text-align: left">Initializer list range access</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.10</td><td style="text-align: left">Other runtime support</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"> + </td></tr><tr><td style="text-align: left">18.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">18.2</td><td style="text-align: left">Types</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing offsetof, max_align_t</td></tr><tr><td style="text-align: left">18.3</td><td style="text-align: left">Implementation properties</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2</td><td style="text-align: left">Numeric Limits</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.3</td><td style="text-align: left">Class template <code class="code">numeric_limits</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.4</td><td style="text-align: left"><code class="code">numeric_limits</code> members</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">18.3.2.5</td><td style="text-align: left"><code class="code">float_round_style</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">18.3.2.6</td><td style="text-align: left"><code class="code">float_denorm_style</code></td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.2.7</td><td style="text-align: left"><code class="code">numeric_limits</code> specializations</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.3.3</td><td style="text-align: left">C Library</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.4</td><td style="text-align: left">Integer types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.4.1</td><td style="text-align: left">Header <code class="code"><cstdint></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">18.5</td><td style="text-align: left">Start and termination</td><td style="text-align: left">Partial</td><td style="text-align: left">C library dependency for quick_exit, at_quick_exit</td></tr><tr><td style="text-align: left">18.6</td><td style="text-align: left">Dynamic memory management</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7</td><td style="text-align: left">Type identification</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.1</td><td style="text-align: left">Class type_info</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.2</td><td style="text-align: left">Class bad_cast</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.7.3</td><td style="text-align: left">Class bad_typeid</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8</td><td style="text-align: left">Exception handling</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.1</td><td style="text-align: left">Class exception</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.2</td><td style="text-align: left">Class bad_exception</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.3</td><td style="text-align: left">Abnormal termination</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.4</td><td style="text-align: left"><code class="code">uncaught_exception</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.5</td><td style="text-align: left">Exception Propagation</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.8.6</td><td style="text-align: left"><code class="code">nested_exception</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9</td><td style="text-align: left">Initializer lists</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9.1</td><td style="text-align: left">Initializer list constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9.2</td><td style="text-align: left">Initializer list access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.9.3</td><td style="text-align: left">Initializer list range access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">18.10</td><td style="text-align: left">Other runtime support</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"> <span class="emphasis"><em>19</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Diagnostics</em></span> @@ -169,7 +169,7 @@ particular release. <span class="emphasis"><em>20</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>General utilities</em></span> - </td></tr><tr><td style="text-align: left">20.1</td><td style="text-align: left">General</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2</td><td style="text-align: left">Utility components</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.1</td><td style="text-align: left">Operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.2</td><td style="text-align: left">Swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.3</td><td style="text-align: left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.4</td><td style="text-align: left">Function template <code class="code">declval</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3</td><td style="text-align: left">Pairs</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.2</td><td style="text-align: left">Class template <code class="code">pair</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.3</td><td style="text-align: left">Specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.4</td><td style="text-align: left">Tuple-like access to <code class="code">pair</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.5</td><td style="text-align: left">Piecewise construction</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4</td><td style="text-align: left">Tuples</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2</td><td style="text-align: left">Class template <code class="code">tuple</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.1</td><td style="text-align: left">Construction</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.2</td><td style="text-align: left">Assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.3</td><td style="text-align: left">Swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.4.2.4</td><td style="text-align: left">Tuple creation functions</td><td style="text-align: left">Partial</td><td style="text-align: left"><code class="code">tuple_cat</code> should be a single variadic signature (DR 1385)</td></tr><tr><td style="text-align: left">20.4.2.5</td><td style="text-align: left">Tuple helper classes</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.6</td><td style="text-align: left">Element access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.7</td><td style="text-align: left">Relational operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">20.4.2.8</td><td style="text-align: left">Tuple traits</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.9</td><td style="text-align: left">Tuple specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5</td><td style="text-align: left">Class template <code class="code">bitset</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.1</td><td style="text-align: left"><code class="code">bitset</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.2</td><td style="text-align: left"><code class="code">bitset</code> members</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.3</td><td style="text-align: left"><code class="code">bitset</code> hash support</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.4</td><td style="text-align: left"><code class="code">bitset</code> operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6</td><td style="text-align: left">Memory</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.2</td><td style="text-align: left">Header <code class="code"><memory></code> synopsis</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">20.6.3</td><td style="text-align: left">Pointer traits</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.6.4</td><td style="text-align: left">Pointer safety</td><td style="text-align: left">Partial</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">20.6.5</td><td style="text-align: left">Align</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.6</td><td style="text-align: left">Allocator argument tag</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.7</td><td style="text-align: left"><code class="code">uses_allocator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">20.6.8</td><td style="text-align: left">Allocator traits</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.9</td><td style="text-align: left">The default allocator</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.10</td><td style="text-align: left">Raw storage iterator</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.11</td><td style="text-align: left">Temporary buffers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12</td><td style="text-align: left">Specialized algorithms</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.1</td><td style="text-align: left"><code class="code">addressof</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.2</td><td style="text-align: left"><code class="code">uninitialized_copy</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.3</td><td style="text-align: left"><code class="code">uninitialized_fill</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.4</td><td style="text-align: left"><code class="code">uninitialized_fill_n</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.13</td><td style="text-align: left">C library</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7</td><td style="text-align: left">Smart pointers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.1</td><td style="text-align: left">Class template <code class="code">unique_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2</td><td style="text-align: left">Shared-ownership pointers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2.1</td><td style="text-align: left">Class <code class="code">bad_weak_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2.2</td><td style="text-align: left">Class template <code class="code">shared_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> + </td></tr><tr><td style="text-align: left">20.1</td><td style="text-align: left">General</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2</td><td style="text-align: left">Utility components</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.1</td><td style="text-align: left">Operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.2</td><td style="text-align: left">Swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.3</td><td style="text-align: left"><code class="code">forward</code> and <code class="code">move</code> helpers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.2.4</td><td style="text-align: left">Function template <code class="code">declval</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3</td><td style="text-align: left">Pairs</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.2</td><td style="text-align: left">Class template <code class="code">pair</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.3</td><td style="text-align: left">Specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.4</td><td style="text-align: left">Tuple-like access to <code class="code">pair</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.3.5</td><td style="text-align: left">Piecewise construction</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4</td><td style="text-align: left">Tuples</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2</td><td style="text-align: left">Class template <code class="code">tuple</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.1</td><td style="text-align: left">Construction</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.2</td><td style="text-align: left">Assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.3</td><td style="text-align: left">Swap</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.4.2.4</td><td style="text-align: left">Tuple creation functions</td><td style="text-align: left">Partial</td><td style="text-align: left"><code class="code">tuple_cat</code> should be a single variadic signature (DR 1385)</td></tr><tr><td style="text-align: left">20.4.2.5</td><td style="text-align: left">Tuple helper classes</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.6</td><td style="text-align: left">Element access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.7</td><td style="text-align: left">Relational operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.8</td><td style="text-align: left">Tuple traits</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.4.2.9</td><td style="text-align: left">Tuple specialized algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5</td><td style="text-align: left">Class template <code class="code">bitset</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.1</td><td style="text-align: left"><code class="code">bitset</code> constructors</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.2</td><td style="text-align: left"><code class="code">bitset</code> members</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.3</td><td style="text-align: left"><code class="code">bitset</code> hash support</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.5.4</td><td style="text-align: left"><code class="code">bitset</code> operators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6</td><td style="text-align: left">Memory</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.2</td><td style="text-align: left">Header <code class="code"><memory></code> synopsis</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.6.3</td><td style="text-align: left">Pointer traits</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing rebind</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.6.4</td><td style="text-align: left">Pointer safety</td><td style="text-align: left">Partial</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">20.6.5</td><td style="text-align: left">Align</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.6</td><td style="text-align: left">Allocator argument tag</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.7</td><td style="text-align: left"><code class="code">uses_allocator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">20.6.8</td><td style="text-align: left">Allocator traits</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing rebind_alloc and rebind_traits</td></tr><tr><td style="text-align: left">20.6.9</td><td style="text-align: left">The default allocator</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.10</td><td style="text-align: left">Raw storage iterator</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.11</td><td style="text-align: left">Temporary buffers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12</td><td style="text-align: left">Specialized algorithms</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.1</td><td style="text-align: left"><code class="code">addressof</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.2</td><td style="text-align: left"><code class="code">uninitialized_copy</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.3</td><td style="text-align: left"><code class="code">uninitialized_fill</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.12.4</td><td style="text-align: left"><code class="code">uninitialized_fill_n</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.6.13</td><td style="text-align: left">C library</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7</td><td style="text-align: left">Smart pointers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.1</td><td style="text-align: left">Class template <code class="code">unique_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2</td><td style="text-align: left">Shared-ownership pointers</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2.1</td><td style="text-align: left">Class <code class="code">bad_weak_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">20.7.2.2</td><td style="text-align: left">Class template <code class="code">shared_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> <p> Uses code from <a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">boost::shared_ptr</a>. @@ -200,7 +200,7 @@ particular release. <span class="emphasis"><em>24</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Iterators</em></span> - </td></tr><tr><td style="text-align: left">24.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.2</td><td style="text-align: left">Iterator requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.3</td><td style="text-align: left">Header <code class="code"><iterator></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.4</td><td style="text-align: left">Iterator primitives</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.5</td><td style="text-align: left">Iterator adaptors</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.5.1</td><td style="text-align: left">Reverse iterators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.5.2</td><td style="text-align: left">Insert iterators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.5.3</td><td style="text-align: left">Move iterators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.6</td><td style="text-align: left">Stream iterators</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.6.1</td><td style="text-align: left">Class template <code class="code">istream_iterator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.6.2</td><td style="text-align: left">Class template <code class="code">ostream_iterator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.6.3</td><td style="text-align: left">Class template <code class="code">istreambuf_iterator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.6.4</td><td style="text-align: left">Class template <code class="code">ostreambuf_iterator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #C8B0B0"><td style="text-align: left">24.6.5</td><td style="text-align: left">range access</td><td style="text-align: left">N</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"> + </td></tr><tr><td style="text-align: left">24.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.2</td><td style="text-align: left">Iterator requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.3</td><td style="text-align: left">Header <code class="code"><iterator></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.4</td><td style="text-align: left">Iterator primitives</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.5</td><td style="text-align: left">Iterator adaptors</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.5.1</td><td style="text-align: left">Reverse iterators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.5.2</td><td style="text-align: left">Insert iterators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.5.3</td><td style="text-align: left">Move iterators</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.6</td><td style="text-align: left">Stream iterators</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.6.1</td><td style="text-align: left">Class template <code class="code">istream_iterator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.6.2</td><td style="text-align: left">Class template <code class="code">ostream_iterator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.6.3</td><td style="text-align: left">Class template <code class="code">istreambuf_iterator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.6.4</td><td style="text-align: left">Class template <code class="code">ostreambuf_iterator</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">24.6.5</td><td style="text-align: left">range access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"> <span class="emphasis"><em>25</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Algorithms</em></span> @@ -208,7 +208,7 @@ particular release. <span class="emphasis"><em>26</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Numerics</em></span> - </td></tr><tr><td style="text-align: left">26.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.2</td><td style="text-align: left">Numeric type requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.3</td><td style="text-align: left">The floating-point environment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.4</td><td style="text-align: left">Complex numbers</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5</td><td style="text-align: left">Random number generation</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.1</td><td style="text-align: left">Requirements</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.2</td><td style="text-align: left">Header <code class="code"><random></code> synopsis</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.3</td><td style="text-align: left">Random number engine class templates</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.3.1</td><td style="text-align: left">Class template <code class="code">linear_congruential_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.3.2</td><td style="text-align: left">Class template <code class="code">mersenne_twister_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.3.3</td><td style="text-align: left">Class template <code class="code">subtract_with_carry_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.4</td><td style="text-align: left">Random number engine adaptor class templates</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.4.2</td><td style="text-align: left">Class template <code class="code">discard_block_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.4.3</td><td style="text-align: left">Class template <code class="code">independent_bits_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.4.4</td><td style="text-align: left">Class template <code class="code">shuffle_order_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.5</td><td style="text-align: left">Engines and engine adaptors with predefined parameters</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.6</td><td style="text-align: left">Class <code class="code">random_device</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.7</td><td style="text-align: left">Utilities</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.7.1</td><td style="text-align: left">Class <code class="code">seed_seq</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.7.2</td><td style="text-align: left">Function template <code class="code">generate_canonical</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8</td><td style="text-align: left">Random number distribution class templates</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.2</td><td style="text-align: left">Uniform distributions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.2.1</td><td style="text-align: left">Class template <code class="code">uniform_int_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.2.2</td><td style="text-align: left">Class template <code class="code">uniform_real_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.3</td><td style="text-align: left">Bernoulli distributions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.3.1</td><td style="text-align: left">Class <code class="code">bernoulli_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.3.2</td><td style="text-align: left">Class template <code class="code">binomial_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.3.3</td><td style="text-align: left">Class template <code class="code">geometric_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.3.4</td><td style="text-align: left">Class template <code class="code">negative_binomial_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4</td><td style="text-align: left">Poisson distributions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4.1</td><td style="text-align: left">Class template <code class="code">poisson_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4.2</td><td style="text-align: left">Class template <code class="code">exponential_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4.3</td><td style="text-align: left">Class template <code class="code">gamma_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4.4</td><td style="text-align: left">Class template <code class="code">weibull_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4.5</td><td style="text-align: left">Class template <code class="code">extreme_value_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5</td><td style="text-align: left">Normal distributions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.1</td><td style="text-align: left">Class template <code class="code">normal_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.2</td><td style="text-align: left">Class template <code class="code">lognormal_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.3</td><td style="text-align: left">Class template <code class="code">chi_squared_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.4</td><td style="text-align: left">Class template <code class="code">cauchy_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.5</td><td style="text-align: left">Class template <code class="code">fisher_f_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.6</td><td style="text-align: left">Class template <code class="code">student_t_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.6</td><td style="text-align: left">Sampling distributions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.6.1</td><td style="text-align: left">Class template <code class="code">discrete_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.6.2</td><td style="text-align: left">Class template <code class="code">piecewise_constant_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.6.3</td><td style="text-align: left">Class template <code class="code">piecewise_linear_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6</td><td style="text-align: left">Numeric arrays</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.1</td><td style="text-align: left">Header <code class="code"><valarray></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">26.6.2</td><td style="text-align: left">Class template <code class="code">valarray</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Missing move and swap operations</td></tr><tr><td style="text-align: left">26.6.3</td><td style="text-align: left"><code class="code">valarray</code> non-member operations</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.4</td><td style="text-align: left">Class <code class="code">slice</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.5</td><td style="text-align: left">Class template <code class="code">slice_array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.6</td><td style="text-align: left">The <code class="code">gslice</code> class</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.7</td><td style="text-align: left">Class template <code class="code">gslice_array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.8</td><td style="text-align: left">Class template <code class="code">mask_array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.9</td><td style="text-align: left">Class template <code class="code">indirect_array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.10</td><td style="text-align: left"><code class="code">valarray</code> range access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7</td><td style="text-align: left">Generalized numeric operations</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.1</td><td style="text-align: left">Header <code class="code"><numeric></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.2</td><td style="text-align: left"><code class="code">accumulate</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.3</td><td style="text-align: left"><code class="code">inner_product</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.4</td><td style="text-align: left"><code class="code">partial_sum</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.5</td><td style="text-align: left"><code class="code">adjacent_difference</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.6</td><td style="text-align: left">iota</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.8</td><td style="text-align: left">C Library</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"> + </td></tr><tr><td style="text-align: left">26.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.2</td><td style="text-align: left">Numeric type requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.3</td><td style="text-align: left">The floating-point environment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.4</td><td style="text-align: left">Complex numbers</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5</td><td style="text-align: left">Random number generation</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.1</td><td style="text-align: left">Requirements</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.2</td><td style="text-align: left">Header <code class="code"><random></code> synopsis</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.3</td><td style="text-align: left">Random number engine class templates</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.3.1</td><td style="text-align: left">Class template <code class="code">linear_congruential_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.3.2</td><td style="text-align: left">Class template <code class="code">mersenne_twister_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.3.3</td><td style="text-align: left">Class template <code class="code">subtract_with_carry_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.4</td><td style="text-align: left">Random number engine adaptor class templates</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.4.2</td><td style="text-align: left">Class template <code class="code">discard_block_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.4.3</td><td style="text-align: left">Class template <code class="code">independent_bits_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.4.4</td><td style="text-align: left">Class template <code class="code">shuffle_order_engine</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.5</td><td style="text-align: left">Engines and engine adaptors with predefined parameters</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.6</td><td style="text-align: left">Class <code class="code">random_device</code></td><td style="text-align: left">Y</td><td style="text-align: left">Missing constexpr</td></tr><tr><td style="text-align: left">26.5.7</td><td style="text-align: left">Utilities</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.7.1</td><td style="text-align: left">Class <code class="code">seed_seq</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.7.2</td><td style="text-align: left">Function template <code class="code">generate_canonical</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8</td><td style="text-align: left">Random number distribution class templates</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.2</td><td style="text-align: left">Uniform distributions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.2.1</td><td style="text-align: left">Class template <code class="code">uniform_int_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.2.2</td><td style="text-align: left">Class template <code class="code">uniform_real_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.3</td><td style="text-align: left">Bernoulli distributions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.3.1</td><td style="text-align: left">Class <code class="code">bernoulli_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.3.2</td><td style="text-align: left">Class template <code class="code">binomial_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.3.3</td><td style="text-align: left">Class template <code class="code">geometric_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.3.4</td><td style="text-align: left">Class template <code class="code">negative_binomial_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4</td><td style="text-align: left">Poisson distributions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4.1</td><td style="text-align: left">Class template <code class="code">poisson_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4.2</td><td style="text-align: left">Class template <code class="code">exponential_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4.3</td><td style="text-align: left">Class template <code class="code">gamma_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4.4</td><td style="text-align: left">Class template <code class="code">weibull_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.4.5</td><td style="text-align: left">Class template <code class="code">extreme_value_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5</td><td style="text-align: left">Normal distributions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.1</td><td style="text-align: left">Class template <code class="code">normal_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.2</td><td style="text-align: left">Class template <code class="code">lognormal_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.3</td><td style="text-align: left">Class template <code class="code">chi_squared_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.4</td><td style="text-align: left">Class template <code class="code">cauchy_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.5</td><td style="text-align: left">Class template <code class="code">fisher_f_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.5.6</td><td style="text-align: left">Class template <code class="code">student_t_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.6</td><td style="text-align: left">Sampling distributions</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.6.1</td><td style="text-align: left">Class template <code class="code">discrete_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.6.2</td><td style="text-align: left">Class template <code class="code">piecewise_constant_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.5.8.6.3</td><td style="text-align: left">Class template <code class="code">piecewise_linear_distribution</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6</td><td style="text-align: left">Numeric arrays</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.1</td><td style="text-align: left">Header <code class="code"><valarray></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.2</td><td style="text-align: left">Class template <code class="code">valarray</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.3</td><td style="text-align: left"><code class="code">valarray</code> non-member operations</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.4</td><td style="text-align: left">Class <code class="code">slice</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.5</td><td style="text-align: left">Class template <code class="code">slice_array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.6</td><td style="text-align: left">The <code class="code">gslice</code> class</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.7</td><td style="text-align: left">Class template <code class="code">gslice_array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.8</td><td style="text-align: left">Class template <code class="code">mask_array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.9</td><td style="text-align: left">Class template <code class="code">indirect_array</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.6.10</td><td style="text-align: left"><code class="code">valarray</code> range access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7</td><td style="text-align: left">Generalized numeric operations</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.1</td><td style="text-align: left">Header <code class="code"><numeric></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.2</td><td style="text-align: left"><code class="code">accumulate</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.3</td><td style="text-align: left"><code class="code">inner_product</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.4</td><td style="text-align: left"><code class="code">partial_sum</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.5</td><td style="text-align: left"><code class="code">adjacent_difference</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.7.6</td><td style="text-align: left">iota</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">26.8</td><td style="text-align: left">C Library</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left"> <span class="emphasis"><em>27</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Input/output library</em></span> @@ -230,7 +230,7 @@ particular release. <span class="emphasis"><em>30</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Thread support</em></span> - </td></tr><tr><td style="text-align: left">30.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.2</td><td style="text-align: left">Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.3</td><td style="text-align: left">Threads</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.3.1</td><td style="text-align: left">Class <code class="code">thread</code></td><td style="text-align: left">Partial</td><td style="text-align: left"><code class="code">thread::id</code> comparisons not well-defined</td></tr><tr><td style="text-align: left">30.3.2</td><td style="text-align: left">Namespace <code class="code">this_thread</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4</td><td style="text-align: left">Mutual exclusion</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1</td><td style="text-align: left">Mutex requirements</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2</td><td style="text-align: left">Mutex types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2.1</td><td style="text-align: left">Class <code class="code">mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2.2</td><td style="text-align: left">Class <code class="code">recursive_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.3</td><td style="text-align: left">Timed mutex types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.3.1</td><td style="text-align: left">Class <code class="code">timed_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.3.2</td><td style="text-align: left">Class <code class="code">recursive_timed_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2</td><td style="text-align: left">Locks</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2.1</td><td style="text-align: left">Class template <code class="code">lock_guard</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2.2</td><td style="text-align: left">Class template <code class="code">unique_lock</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.3</td><td style="text-align: left">Generic locking algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4</td><td style="text-align: left">Call once</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4.1</td><td style="text-align: left">Struct <code class="code">once_flag</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4.2</td><td style="text-align: left">Function <code class="code">call_once</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.5</td><td style="text-align: left">Condition variables</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing notify_all_at_thread_exit</td></tr><tr><td style="text-align: left">30.5.1</td><td style="text-align: left">Class <code class="code">condition_variable</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.5.2</td><td style="text-align: left">Class <code class="code">condition_variable_any</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6</td><td style="text-align: left">Futures</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.1</td><td style="text-align: left">Overview</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.2</td><td style="text-align: left">Error handling</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.3</td><td style="text-align: left">Class <code class="code">future_error</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.4</td><td style="text-align: left">Shared state</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.5</td><td style="text-align: left">Class template <code class="code">promise</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Missing set_*_at_thread_exit</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.6</td><td style="text-align: left">Class template <code class="code">future</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Missing future_status and future::share()</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.7</td><td style="text-align: left">Class template <code class="code">shared_future</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Missing future_status</td></tr><tr><td style="text-align: left">30.6.8</td><td style="text-align: left">Function template <code class="code">async</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.9</td><td style="text-align: left">Class template <code class="code">packaged_task</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Missing make_ready_at_thread_exit</td></tr><tr><td style="text-align: left"> + </td></tr><tr><td style="text-align: left">30.1</td><td style="text-align: left">General</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.2</td><td style="text-align: left">Requirements</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.3</td><td style="text-align: left">Threads</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.3.1</td><td style="text-align: left">Class <code class="code">thread</code></td><td style="text-align: left">Partial</td><td style="text-align: left"><code class="code">thread::id</code> comparisons not well-defined</td></tr><tr><td style="text-align: left">30.3.2</td><td style="text-align: left">Namespace <code class="code">this_thread</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4</td><td style="text-align: left">Mutual exclusion</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1</td><td style="text-align: left">Mutex requirements</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.1</td><td style="text-align: left">In general</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2</td><td style="text-align: left">Mutex types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2.1</td><td style="text-align: left">Class <code class="code">mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.2.2</td><td style="text-align: left">Class <code class="code">recursive_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.3</td><td style="text-align: left">Timed mutex types</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.3.1</td><td style="text-align: left">Class <code class="code">timed_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.1.3.2</td><td style="text-align: left">Class <code class="code">recursive_timed_mutex</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2</td><td style="text-align: left">Locks</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2.1</td><td style="text-align: left">Class template <code class="code">lock_guard</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.2.2</td><td style="text-align: left">Class template <code class="code">unique_lock</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.3</td><td style="text-align: left">Generic locking algorithms</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4</td><td style="text-align: left">Call once</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4.1</td><td style="text-align: left">Struct <code class="code">once_flag</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.4.4.2</td><td style="text-align: left">Function <code class="code">call_once</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.5</td><td style="text-align: left">Condition variables</td><td style="text-align: left">Partial</td><td style="text-align: left">Missing notify_all_at_thread_exit</td></tr><tr><td style="text-align: left">30.5.1</td><td style="text-align: left">Class <code class="code">condition_variable</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.5.2</td><td style="text-align: left">Class <code class="code">condition_variable_any</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6</td><td style="text-align: left">Futures</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.1</td><td style="text-align: left">Overview</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.2</td><td style="text-align: left">Error handling</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.3</td><td style="text-align: left">Class <code class="code">future_error</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">30.6.4</td><td style="text-align: left">Shared state</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.5</td><td style="text-align: left">Class template <code class="code">promise</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Missing set_*_at_thread_exit</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.6</td><td style="text-align: left">Class template <code class="code">future</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Timed waiting functions do not return future_status</td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.7</td><td style="text-align: left">Class template <code class="code">shared_future</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Timed waiting functions do not return future_status</td></tr><tr><td style="text-align: left">30.6.8</td><td style="text-align: left">Function template <code class="code">async</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr style="background-color: #B0B0B0"><td style="text-align: left">30.6.9</td><td style="text-align: left">Class template <code class="code">packaged_task</code></td><td style="text-align: left">Partial</td><td style="text-align: left">Missing make_ready_at_thread_exit</td></tr><tr><td style="text-align: left"> <span class="emphasis"><em>Appendix D</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Compatibility features</em></span> @@ -245,7 +245,7 @@ In this implementation the header names are prefixed by </p><p> This page describes the TR1 support in mainline GCC SVN, not in any particular release. -</p><div class="table"><a id="id474660"/><p class="title"><strong>Table 1.3. C++ TR1 Implementation Status</strong></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"><span class="emphasis"><em>2</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td style="text-align: left">2.1</td><td style="text-align: left">Reference wrappers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.1</td><td style="text-align: left">Additions to header <code class="code"><functional></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2</td><td style="text-align: left">Class template <code class="code">reference_wrapper</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.1</td><td style="text-align: left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.2</td><td style="text-align: left"><code class="code">reference_wrapper</code> assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.3</td><td style="text-align: left"><code class="code">reference_wrapper</code> access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.4</td><td style="text-align: left"><code class="code">reference_wrapper</code> invocation</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.5</td><td style="text-align: left"><code class="code">reference_wrapper</code> helper functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2</td><td style="text-align: left">Smart pointers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.1</td><td style="text-align: left">Additions to header <code class="code"><memory></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.2</td><td style="text-align: left">Class <code class="code">bad_weak_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3</td><td style="text-align: left">Class template <code class="code">shared_ptr</code></td><td style="text-align: left"> </td><td style="text-align: left"> +</p><div class="table"><a id="id446479"/><p class="title"><strong>Table 1.3. C++ TR1 Implementation Status</strong></p><div class="table-contents"><table summary="C++ TR1 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"><span class="emphasis"><em>2</em></span></td><td colspan="3" style="text-align: left"><span class="emphasis"><em>General Utilities</em></span></td></tr><tr><td style="text-align: left">2.1</td><td style="text-align: left">Reference wrappers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.1</td><td style="text-align: left">Additions to header <code class="code"><functional></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2</td><td style="text-align: left">Class template <code class="code">reference_wrapper</code></td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.1</td><td style="text-align: left"><code class="code">reference_wrapper</code> construct/copy/destroy</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.2</td><td style="text-align: left"><code class="code">reference_wrapper</code> assignment</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.3</td><td style="text-align: left"><code class="code">reference_wrapper</code> access</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.4</td><td style="text-align: left"><code class="code">reference_wrapper</code> invocation</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.1.2.5</td><td style="text-align: left"><code class="code">reference_wrapper</code> helper functions</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2</td><td style="text-align: left">Smart pointers</td><td style="text-align: left"> </td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.1</td><td style="text-align: left">Additions to header <code class="code"><memory></code> synopsis</td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.2</td><td style="text-align: left">Class <code class="code">bad_weak_ptr</code></td><td style="text-align: left">Y</td><td style="text-align: left"> </td></tr><tr><td style="text-align: left">2.2.3</td><td style="text-align: left">Class template <code class="code">shared_ptr</code></td><td style="text-align: left"> </td><td style="text-align: left"> <p> Uses code from <a class="link" href="http://www.boost.org/libs/smart_ptr/shared_ptr.htm">boost::shared_ptr</a>. @@ -258,7 +258,7 @@ decimal floating-point arithmetic </p><p> This page describes the TR 24733 support in mainline GCC SVN, not in any particular release. -</p><div class="table"><a id="id480230"/><p class="title"><strong>Table 1.4. C++ TR 24733 Implementation Status</strong></p><div class="table-contents"><table summary="C++ TR 24733 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> +</p><div class="table"><a id="id452050"/><p class="title"><strong>Table 1.4. C++ TR 24733 Implementation Status</strong></p><div class="table-contents"><table summary="C++ TR 24733 Implementation Status" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><thead><tr><th style="text-align: left">Section</th><th style="text-align: left">Description</th><th style="text-align: left">Status</th><th style="text-align: left">Comments</th></tr></thead><tbody><tr><td style="text-align: left"> <span class="emphasis"><em>0</em></span> </td><td colspan="3" style="text-align: left"> <span class="emphasis"><em>Introduction</em></span> diff --git a/libstdc++-v3/doc/html/manual/strings.html b/libstdc++-v3/doc/html/manual/strings.html index f2c448f73f2..fd13422585d 100644 --- a/libstdc++-v3/doc/html/manual/strings.html +++ b/libstdc++-v3/doc/html/manual/strings.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="localization.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 7. Strings"><div class="titlepage"><div><div><h2 class="title"><a id="std.strings"/>Chapter 7. Strings - <a id="id493549" class="indexterm"/> + <a id="id465369" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="strings.html#std.strings.string">String Classes</a></span></dt><dd><dl><dt><span class="section"><a href="strings.html#strings.string.simple">Simple Transformations</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.case">Case Sensitivity</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.character_types">Arbitrary Character Types</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.token">Tokenizing</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.shrink">Shrink to Fit</a></span></dt><dt><span class="section"><a href="strings.html#strings.string.Cstring">CString (MFC)</a></span></dt></dl></dd></dl></div><div class="section" title="String Classes"><div class="titlepage"><div><div><h2 class="title"><a id="std.strings.string"/>String Classes</h2></div></div></div><div class="section" title="Simple Transformations"><div class="titlepage"><div><div><h3 class="title"><a id="strings.string.simple"/>Simple Transformations</h3></div></div></div><p> Here are Standard, simple, and portable ways to perform common transformations on a <code class="code">string</code> instance, such as diff --git a/libstdc++-v3/doc/html/manual/support.html b/libstdc++-v3/doc/html/manual/support.html index 34d836579da..842eb11d924 100644 --- a/libstdc++-v3/doc/html/manual/support.html +++ b/libstdc++-v3/doc/html/manual/support.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="dynamic_memory.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 4. Support"><div class="titlepage"><div><div><h2 class="title"><a id="std.support"/>Chapter 4. Support - <a id="id490082" class="indexterm"/> + <a id="id461901" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="support.html#std.support.types">Types</a></span></dt><dd><dl><dt><span class="section"><a href="support.html#std.support.types.fundamental">Fundamental Types</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.numeric_limits">Numeric Properties</a></span></dt><dt><span class="section"><a href="support.html#std.support.types.null">NULL</a></span></dt></dl></dd><dt><span class="section"><a href="dynamic_memory.html">Dynamic Memory</a></span></dt><dt><span class="section"><a href="termination.html">Termination</a></span></dt><dd><dl><dt><span class="section"><a href="termination.html#support.termination.handlers">Termination Handlers</a></span></dt><dt><span class="section"><a href="termination.html#support.termination.verbose">Verbose Terminate Handler</a></span></dt></dl></dd></dl></div><p> This part deals with the functions called and objects created automatically during the course of a program's existence. diff --git a/libstdc++-v3/doc/html/manual/test.html b/libstdc++-v3/doc/html/manual/test.html index f82cdb5129c..f6523c09359 100644 --- a/libstdc++-v3/doc/html/manual/test.html +++ b/libstdc++-v3/doc/html/manual/test.html @@ -493,7 +493,7 @@ only default variables. reporting functions including: </p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"><p>time_counter</p></li><li class="listitem"><p>resource_counter</p></li><li class="listitem"><p>report_performance</p></li></ul></div></li></ul></div></div></div><div class="section" title="Special Topics"><div class="titlepage"><div><div><h3 class="title"><a id="test.special"/>Special Topics</h3></div></div></div><div class="section" title="Qualifying Exception Safety Guarantees"><div class="titlepage"><div><div><h4 class="title"><a id="test.exception.safety"/> Qualifying Exception Safety Guarantees - <a id="id517149" class="indexterm"/> + <a id="id488969" class="indexterm"/> </h4></div></div></div><div class="section" title="Overview"><div class="titlepage"><div><div><h5 class="title"><a id="test.exception.safety.overview"/>Overview</h5></div></div></div><p> Testing is composed of running a particular test sequence, and looking at what happens to the surrounding code when diff --git a/libstdc++-v3/doc/html/manual/using.html b/libstdc++-v3/doc/html/manual/using.html index 4c48d0eae09..a425e022371 100644 --- a/libstdc++-v3/doc/html/manual/using.html +++ b/libstdc++-v3/doc/html/manual/using.html @@ -11,5 +11,5 @@ enumerated and detailed in the table below. </p><p> By default, <span class="command"><strong>g++</strong></span> is equivalent to <span class="command"><strong>g++ -std=gnu++98</strong></span>. The standard library also defaults to this dialect. - </p><div class="table"><a id="id484374"/><p class="title"><strong>Table 3.1. C++ Command Options</strong></p><div class="table-contents"><table summary="C++ Command Options" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Option Flags</th><th style="text-align: left">Description</th></tr></thead><tbody><tr><td style="text-align: left"><code class="literal">-std=c++98</code></td><td style="text-align: left">Use the 1998 ISO C++ standard plus amendments.</td></tr><tr><td style="text-align: left"><code class="literal">-std=gnu++98</code></td><td style="text-align: left">As directly above, with GNU extensions.</td></tr><tr><td style="text-align: left"><code class="literal">-std=c++0x</code></td><td style="text-align: left">Use the working draft of the upcoming ISO C++0x standard.</td></tr><tr><td style="text-align: left"><code class="literal">-std=gnu++0x</code></td><td style="text-align: left">As directly above, with GNU extensions.</td></tr><tr><td style="text-align: left"><code class="literal">-fexceptions</code></td><td style="text-align: left">See <a class="link" href="using_exceptions.html#intro.using.exception.no" title="Doing without">exception-free dialect</a></td></tr><tr><td style="text-align: left"><code class="literal">-frtti</code></td><td style="text-align: left">As above, but RTTI-free dialect.</td></tr><tr><td style="text-align: left"><code class="literal">-pthread</code> or <code class="literal">-pthreads</code></td><td style="text-align: left">For ISO C++0x <thread>, <future>, + </p><div class="table"><a id="id456194"/><p class="title"><strong>Table 3.1. C++ Command Options</strong></p><div class="table-contents"><table summary="C++ Command Options" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><thead><tr><th style="text-align: left">Option Flags</th><th style="text-align: left">Description</th></tr></thead><tbody><tr><td style="text-align: left"><code class="literal">-std=c++98</code></td><td style="text-align: left">Use the 1998 ISO C++ standard plus amendments.</td></tr><tr><td style="text-align: left"><code class="literal">-std=gnu++98</code></td><td style="text-align: left">As directly above, with GNU extensions.</td></tr><tr><td style="text-align: left"><code class="literal">-std=c++0x</code></td><td style="text-align: left">Use the working draft of the upcoming ISO C++0x standard.</td></tr><tr><td style="text-align: left"><code class="literal">-std=gnu++0x</code></td><td style="text-align: left">As directly above, with GNU extensions.</td></tr><tr><td style="text-align: left"><code class="literal">-fexceptions</code></td><td style="text-align: left">See <a class="link" href="using_exceptions.html#intro.using.exception.no" title="Doing without">exception-free dialect</a></td></tr><tr><td style="text-align: left"><code class="literal">-frtti</code></td><td style="text-align: left">As above, but RTTI-free dialect.</td></tr><tr><td style="text-align: left"><code class="literal">-pthread</code> or <code class="literal">-pthreads</code></td><td style="text-align: left">For ISO C++0x <thread>, <future>, <mutex>, or <condition_variable>.</td></tr><tr><td style="text-align: left"><code class="literal">-fopenmp</code></td><td style="text-align: left">For <a class="link" href="parallel_mode.html" title="Chapter 18. Parallel Mode">parallel</a> mode.</td></tr></tbody></table></div></div><br class="table-break"/></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="make.html">Prev</a> </td><td align="center"><a accesskey="u" href="intro.html">Up</a></td><td align="right"> <a accesskey="n" href="using_headers.html">Next</a></td></tr><tr><td align="left" valign="top">Make </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Headers</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/using_exceptions.html b/libstdc++-v3/doc/html/manual/using_exceptions.html index 2b60c7a8b40..a0adc01d1af 100644 --- a/libstdc++-v3/doc/html/manual/using_exceptions.html +++ b/libstdc++-v3/doc/html/manual/using_exceptions.html @@ -266,7 +266,7 @@ is called. } catch(...) { this->_M_setstate(ios_base::badbit); } -</pre></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="using.exceptions.biblio"/>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id489223"/><p><span class="biblioid"> +</pre></div></div><div class="bibliography" title="Bibliography"><div class="titlepage"><div><div><h3 class="title"><a id="using.exceptions.biblio"/>Bibliography</h3></div></div></div><div class="biblioentry"><a id="id461043"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008) </em>. </span><span class="pagenums"> @@ -274,34 +274,34 @@ is called. . </span><span class="copyright">Copyright © 2008 The Open Group/The Institute of Electrical and Electronics Engineers, Inc. - . </span></p></div><div class="biblioentry"><a id="id489256"/><p><span class="biblioid"> + . </span></p></div><div class="biblioentry"><a id="id461076"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Error and Exception Handling </em>. </span><span class="author"><span class="firstname">David</span> <span class="surname">Abrahams </span>. </span><span class="publisher"><span class="publishername"> Boost - . </span></span></p></div><div class="biblioentry"><a id="id489289"/><p><span class="biblioid"> + . </span></span></p></div><div class="biblioentry"><a id="id461109"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Exception-Safety in Generic Components </em>. </span><span class="author"><span class="firstname">David</span> <span class="surname">Abrahams</span>. </span><span class="publisher"><span class="publishername"> Boost - . </span></span></p></div><div class="biblioentry"><a id="id489322"/><p><span class="biblioid"> + . </span></span></p></div><div class="biblioentry"><a id="id461142"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Standard Library Exception Policy </em>. </span><span class="author"><span class="firstname">Matt</span> <span class="surname">Austern</span>. </span><span class="publisher"><span class="publishername"> WG21 N1077 - . </span></span></p></div><div class="biblioentry"><a id="id489356"/><p><span class="biblioid"> + . </span></span></p></div><div class="biblioentry"><a id="id461175"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> ia64 c++ abi exception handling </em>. </span><span class="author"><span class="firstname">Richard</span> <span class="surname">Henderson</span>. </span><span class="publisher"><span class="publishername"> GNU - . </span></span></p></div><div class="biblioentry"><a id="id489389"/><p><span class="biblioid"> + . </span></span></p></div><div class="biblioentry"><a id="id461209"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> Appendix E: Standard-Library Exception Safety - </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span></p></div><div class="biblioentry"><a id="id489414"/><p><span class="citetitle"><em class="citetitle"> + </em>. </span><span class="author"><span class="firstname">Bjarne</span> <span class="surname">Stroustrup</span>. </span></p></div><div class="biblioentry"><a id="id461234"/><p><span class="citetitle"><em class="citetitle"> Exceptional C++ </em>. </span><span class="pagenums"> Exception-Safety Issues and Techniques - . </span><span class="author"><span class="firstname">Herb</span> <span class="surname">Sutter</span>. </span></p></div><div class="biblioentry"><a id="id489434"/><p><span class="biblioid"> + . </span><span class="author"><span class="firstname">Herb</span> <span class="surname">Sutter</span>. </span></p></div><div class="biblioentry"><a id="id461254"/><p><span class="biblioid"> . </span><span class="citetitle"><em class="citetitle"> GCC Bug 25191: exception_defines.h #defines try/catch </em>. </span></p></div></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="using_concurrency.html">Prev</a> </td><td align="center"><a accesskey="u" href="using.html">Up</a></td><td align="right"> <a accesskey="n" href="debug.html">Next</a></td></tr><tr><td align="left" valign="top">Concurrency </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Debugging Support</td></tr></table></div></body></html> diff --git a/libstdc++-v3/doc/html/manual/using_headers.html b/libstdc++-v3/doc/html/manual/using_headers.html index 9527b4d3432..073070960b8 100644 --- a/libstdc++-v3/doc/html/manual/using_headers.html +++ b/libstdc++-v3/doc/html/manual/using_headers.html @@ -20,19 +20,19 @@ upcoming 200x standard. </p><p> C++98/03 include files. These are available in the default compilation mode, i.e. <code class="code">-std=c++98</code> or <code class="code">-std=gnu++98</code>. - </p><div class="table"><a id="id484603"/><p class="title"><strong>Table 3.2. C++ 1998 Library Headers</strong></p><div class="table-contents"><table summary="C++ 1998 Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="filename">complex</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="filename">exception</code></td></tr><tr><td style="text-align: left"><code class="filename">fstream</code></td><td style="text-align: left"><code class="filename">functional</code></td><td style="text-align: left"><code class="filename">iomanip</code></td><td style="text-align: left"><code class="filename">ios</code></td><td style="text-align: left"><code class="filename">iosfwd</code></td></tr><tr><td style="text-align: left"><code class="filename">iostream</code></td><td style="text-align: left"><code class="filename">istream</code></td><td style="text-align: left"><code class="filename">iterator</code></td><td style="text-align: left"><code class="filename">limits</code></td><td style="text-align: left"><code class="filename">list</code></td></tr><tr><td style="text-align: left"><code class="filename">locale</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="filename">memory</code></td><td style="text-align: left"><code class="filename">new</code></td><td style="text-align: left"><code class="filename">numeric</code></td></tr><tr><td style="text-align: left"><code class="filename">ostream</code></td><td style="text-align: left"><code class="filename">queue</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="filename">sstream</code></td><td style="text-align: left"><code class="filename">stack</code></td></tr><tr><td style="text-align: left"><code class="filename">stdexcept</code></td><td style="text-align: left"><code class="filename">streambuf</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="filename">utility</code></td><td style="text-align: left"><code class="filename">typeinfo</code></td></tr><tr><td style="text-align: left"><code class="filename">valarray</code></td><td style="text-align: left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id484907"/><p class="title"><strong>Table 3.3. C++ 1998 Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ 1998 Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cassert</code></td><td style="text-align: left"><code class="filename">cerrno</code></td><td style="text-align: left"><code class="filename">cctype</code></td><td style="text-align: left"><code class="filename">cfloat</code></td><td style="text-align: left"><code class="filename">ciso646</code></td></tr><tr><td style="text-align: left"><code class="filename">climits</code></td><td style="text-align: left"><code class="filename">clocale</code></td><td style="text-align: left"><code class="filename">cmath</code></td><td style="text-align: left"><code class="filename">csetjmp</code></td><td style="text-align: left"><code class="filename">csignal</code></td></tr><tr><td style="text-align: left"><code class="filename">cstdarg</code></td><td style="text-align: left"><code class="filename">cstddef</code></td><td style="text-align: left"><code class="filename">cstdio</code></td><td style="text-align: left"><code class="filename">cstdlib</code></td><td style="text-align: left"><code class="filename">cstring</code></td></tr><tr><td style="text-align: left"><code class="filename">ctime</code></td><td style="text-align: left"><code class="filename">cwchar</code></td><td style="text-align: left"><code class="filename">cwctype</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p> + </p><div class="table"><a id="id456423"/><p class="title"><strong>Table 3.2. C++ 1998 Library Headers</strong></p><div class="table-contents"><table summary="C++ 1998 Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="filename">complex</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="filename">exception</code></td></tr><tr><td style="text-align: left"><code class="filename">fstream</code></td><td style="text-align: left"><code class="filename">functional</code></td><td style="text-align: left"><code class="filename">iomanip</code></td><td style="text-align: left"><code class="filename">ios</code></td><td style="text-align: left"><code class="filename">iosfwd</code></td></tr><tr><td style="text-align: left"><code class="filename">iostream</code></td><td style="text-align: left"><code class="filename">istream</code></td><td style="text-align: left"><code class="filename">iterator</code></td><td style="text-align: left"><code class="filename">limits</code></td><td style="text-align: left"><code class="filename">list</code></td></tr><tr><td style="text-align: left"><code class="filename">locale</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="filename">memory</code></td><td style="text-align: left"><code class="filename">new</code></td><td style="text-align: left"><code class="filename">numeric</code></td></tr><tr><td style="text-align: left"><code class="filename">ostream</code></td><td style="text-align: left"><code class="filename">queue</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="filename">sstream</code></td><td style="text-align: left"><code class="filename">stack</code></td></tr><tr><td style="text-align: left"><code class="filename">stdexcept</code></td><td style="text-align: left"><code class="filename">streambuf</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="filename">utility</code></td><td style="text-align: left"><code class="filename">typeinfo</code></td></tr><tr><td style="text-align: left"><code class="filename">valarray</code></td><td style="text-align: left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id456727"/><p class="title"><strong>Table 3.3. C++ 1998 Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ 1998 Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cassert</code></td><td style="text-align: left"><code class="filename">cerrno</code></td><td style="text-align: left"><code class="filename">cctype</code></td><td style="text-align: left"><code class="filename">cfloat</code></td><td style="text-align: left"><code class="filename">ciso646</code></td></tr><tr><td style="text-align: left"><code class="filename">climits</code></td><td style="text-align: left"><code class="filename">clocale</code></td><td style="text-align: left"><code class="filename">cmath</code></td><td style="text-align: left"><code class="filename">csetjmp</code></td><td style="text-align: left"><code class="filename">csignal</code></td></tr><tr><td style="text-align: left"><code class="filename">cstdarg</code></td><td style="text-align: left"><code class="filename">cstddef</code></td><td style="text-align: left"><code class="filename">cstdio</code></td><td style="text-align: left"><code class="filename">cstdlib</code></td><td style="text-align: left"><code class="filename">cstring</code></td></tr><tr><td style="text-align: left"><code class="filename">ctime</code></td><td style="text-align: left"><code class="filename">cwchar</code></td><td style="text-align: left"><code class="filename">cwctype</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p> C++0x include files. These are only available in C++0x compilation mode, i.e. <code class="literal">-std=c++0x</code> or <code class="literal">-std=gnu++0x</code>. -</p><p/><div class="table"><a id="id485113"/><p class="title"><strong>Table 3.4. C++ 200x Library Headers</strong></p><div class="table-contents"><table summary="C++ 200x Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="filename">array</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="filename">chrono</code></td><td style="text-align: left"><code class="filename">complex</code></td></tr><tr><td style="text-align: left"><code class="filename">condition_variable</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="filename">exception</code></td><td style="text-align: left"><code class="filename">forward_list</code></td><td style="text-align: left"><code class="filename">fstream</code></td></tr><tr><td style="text-align: left"><code class="filename">functional</code></td><td style="text-align: left"><code class="filename">future</code></td><td style="text-align: left"><code class="filename">initalizer_list</code></td><td style="text-align: left"><code class="filename">iomanip</code></td><td style="text-align: left"><code class="filename">ios</code></td></tr><tr><td style="text-align: left"><code class="filename">iosfwd</code></td><td style="text-align: left"><code class="filename">iostream</code></td><td style="text-align: left"><code class="filename">istream</code></td><td style="text-align: left"><code class="filename">iterator</code></td><td style="text-align: left"><code class="filename">limits</code></td></tr><tr><td style="text-align: left"><code class="filename">list</code></td><td style="text-align: left"><code class="filename">locale</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="filename">memory</code></td><td style="text-align: left"><code class="filename">mutex</code></td></tr><tr><td style="text-align: left"><code class="filename">new</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="filename">ostream</code></td><td style="text-align: left"><code class="filename">queue</code></td><td style="text-align: left"><code class="filename">random</code></td></tr><tr><td style="text-align: left"><code class="filename">ratio</code></td><td style="text-align: left"><code class="filename">regex</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="filename">sstream</code></td><td style="text-align: left"><code class="filename">stack</code></td></tr><tr><td style="text-align: left"><code class="filename">stdexcept</code></td><td style="text-align: left"><code class="filename">streambuf</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="filename">system_error</code></td><td style="text-align: left"><code class="filename">thread</code></td></tr><tr><td style="text-align: left"><code class="filename">tuple</code></td><td style="text-align: left"><code class="filename">type_traits</code></td><td style="text-align: left"><code class="filename">typeinfo</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td></tr><tr><td style="text-align: left"><code class="filename">utility</code></td><td style="text-align: left"><code class="filename">valarray</code></td><td style="text-align: left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id485542"/><p class="title"><strong>Table 3.5. C++ 200x Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ 200x Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cassert</code></td><td style="text-align: left"><code class="filename">ccomplex</code></td><td style="text-align: left"><code class="filename">cctype</code></td><td style="text-align: left"><code class="filename">cerrno</code></td><td style="text-align: left"><code class="filename">cfenv</code></td></tr><tr><td style="text-align: left"><code class="filename">cfloat</code></td><td style="text-align: left"><code class="filename">cinttypes</code></td><td style="text-align: left"><code class="filename">ciso646</code></td><td style="text-align: left"><code class="filename">climits</code></td><td style="text-align: left"><code class="filename">clocale</code></td></tr><tr><td style="text-align: left"><code class="filename">cmath</code></td><td style="text-align: left"><code class="filename">csetjmp</code></td><td style="text-align: left"><code class="filename">csignal</code></td><td style="text-align: left"><code class="filename">cstdarg</code></td><td style="text-align: left"><code class="filename">cstdbool</code></td></tr><tr><td style="text-align: left"><code class="filename">cstddef</code></td><td style="text-align: left"><code class="filename">cstdint</code></td><td style="text-align: left"><code class="filename">cstdlib</code></td><td style="text-align: left"><code class="filename">cstdio</code></td><td style="text-align: left"><code class="filename">cstring</code></td></tr><tr><td style="text-align: left"><code class="filename">ctgmath</code></td><td style="text-align: left"><code class="filename">ctime</code></td><td style="text-align: left"><code class="filename">cuchar</code></td><td style="text-align: left"><code class="filename">cwchar</code></td><td style="text-align: left"><code class="filename">cwctype</code></td></tr></tbody></table></div></div><br class="table-break"/><p> +</p><p/><div class="table"><a id="id456933"/><p class="title"><strong>Table 3.4. C++ 200x Library Headers</strong></p><div class="table-contents"><table summary="C++ 200x Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">algorithm</code></td><td style="text-align: left"><code class="filename">array</code></td><td style="text-align: left"><code class="filename">bitset</code></td><td style="text-align: left"><code class="filename">chrono</code></td><td style="text-align: left"><code class="filename">complex</code></td></tr><tr><td style="text-align: left"><code class="filename">condition_variable</code></td><td style="text-align: left"><code class="filename">deque</code></td><td style="text-align: left"><code class="filename">exception</code></td><td style="text-align: left"><code class="filename">forward_list</code></td><td style="text-align: left"><code class="filename">fstream</code></td></tr><tr><td style="text-align: left"><code class="filename">functional</code></td><td style="text-align: left"><code class="filename">future</code></td><td style="text-align: left"><code class="filename">initalizer_list</code></td><td style="text-align: left"><code class="filename">iomanip</code></td><td style="text-align: left"><code class="filename">ios</code></td></tr><tr><td style="text-align: left"><code class="filename">iosfwd</code></td><td style="text-align: left"><code class="filename">iostream</code></td><td style="text-align: left"><code class="filename">istream</code></td><td style="text-align: left"><code class="filename">iterator</code></td><td style="text-align: left"><code class="filename">limits</code></td></tr><tr><td style="text-align: left"><code class="filename">list</code></td><td style="text-align: left"><code class="filename">locale</code></td><td style="text-align: left"><code class="filename">map</code></td><td style="text-align: left"><code class="filename">memory</code></td><td style="text-align: left"><code class="filename">mutex</code></td></tr><tr><td style="text-align: left"><code class="filename">new</code></td><td style="text-align: left"><code class="filename">numeric</code></td><td style="text-align: left"><code class="filename">ostream</code></td><td style="text-align: left"><code class="filename">queue</code></td><td style="text-align: left"><code class="filename">random</code></td></tr><tr><td style="text-align: left"><code class="filename">ratio</code></td><td style="text-align: left"><code class="filename">regex</code></td><td style="text-align: left"><code class="filename">set</code></td><td style="text-align: left"><code class="filename">sstream</code></td><td style="text-align: left"><code class="filename">stack</code></td></tr><tr><td style="text-align: left"><code class="filename">stdexcept</code></td><td style="text-align: left"><code class="filename">streambuf</code></td><td style="text-align: left"><code class="filename">string</code></td><td style="text-align: left"><code class="filename">system_error</code></td><td style="text-align: left"><code class="filename">thread</code></td></tr><tr><td style="text-align: left"><code class="filename">tuple</code></td><td style="text-align: left"><code class="filename">type_traits</code></td><td style="text-align: left"><code class="filename">typeinfo</code></td><td style="text-align: left"><code class="filename">unordered_map</code></td><td style="text-align: left"><code class="filename">unordered_set</code></td></tr><tr><td style="text-align: left"><code class="filename">utility</code></td><td style="text-align: left"><code class="filename">valarray</code></td><td style="text-align: left"><code class="filename">vector</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id457362"/><p class="title"><strong>Table 3.5. C++ 200x Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ 200x Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cassert</code></td><td style="text-align: left"><code class="filename">ccomplex</code></td><td style="text-align: left"><code class="filename">cctype</code></td><td style="text-align: left"><code class="filename">cerrno</code></td><td style="text-align: left"><code class="filename">cfenv</code></td></tr><tr><td style="text-align: left"><code class="filename">cfloat</code></td><td style="text-align: left"><code class="filename">cinttypes</code></td><td style="text-align: left"><code class="filename">ciso646</code></td><td style="text-align: left"><code class="filename">climits</code></td><td style="text-align: left"><code class="filename">clocale</code></td></tr><tr><td style="text-align: left"><code class="filename">cmath</code></td><td style="text-align: left"><code class="filename">csetjmp</code></td><td style="text-align: left"><code class="filename">csignal</code></td><td style="text-align: left"><code class="filename">cstdarg</code></td><td style="text-align: left"><code class="filename">cstdbool</code></td></tr><tr><td style="text-align: left"><code class="filename">cstddef</code></td><td style="text-align: left"><code class="filename">cstdint</code></td><td style="text-align: left"><code class="filename">cstdlib</code></td><td style="text-align: left"><code class="filename">cstdio</code></td><td style="text-align: left"><code class="filename">cstring</code></td></tr><tr><td style="text-align: left"><code class="filename">ctgmath</code></td><td style="text-align: left"><code class="filename">ctime</code></td><td style="text-align: left"><code class="filename">cuchar</code></td><td style="text-align: left"><code class="filename">cwchar</code></td><td style="text-align: left"><code class="filename">cwctype</code></td></tr></tbody></table></div></div><br class="table-break"/><p> In addition, TR1 includes as: -</p><div class="table"><a id="id485791"/><p class="title"><strong>Table 3.6. C++ TR 1 Library Headers</strong></p><div class="table-contents"><table summary="C++ TR 1 Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">tr1/array</code></td><td style="text-align: left"><code class="filename">tr1/complex</code></td><td style="text-align: left"><code class="filename">tr1/memory</code></td><td style="text-align: left"><code class="filename">tr1/functional</code></td><td style="text-align: left"><code class="filename">tr1/random</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/regex</code></td><td style="text-align: left"><code class="filename">tr1/tuple</code></td><td style="text-align: left"><code class="filename">tr1/type_traits</code></td><td style="text-align: left"><code class="filename">tr1/unordered_map</code></td><td style="text-align: left"><code class="filename">tr1/unordered_set</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/utility</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id485932"/><p class="title"><strong>Table 3.7. C++ TR 1 Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ TR 1 Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">tr1/ccomplex</code></td><td style="text-align: left"><code class="filename">tr1/cfenv</code></td><td style="text-align: left"><code class="filename">tr1/cfloat</code></td><td style="text-align: left"><code class="filename">tr1/cmath</code></td><td style="text-align: left"><code class="filename">tr1/cinttypes</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/climits</code></td><td style="text-align: left"><code class="filename">tr1/cstdarg</code></td><td style="text-align: left"><code class="filename">tr1/cstdbool</code></td><td style="text-align: left"><code class="filename">tr1/cstdint</code></td><td style="text-align: left"><code class="filename">tr1/cstdio</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/cstdlib</code></td><td style="text-align: left"><code class="filename">tr1/ctgmath</code></td><td style="text-align: left"><code class="filename">tr1/ctime</code></td><td style="text-align: left"><code class="filename">tr1/cwchar</code></td><td style="text-align: left"><code class="filename">tr1/cwctype</code></td></tr></tbody></table></div></div><br class="table-break"/><p>Decimal floating-point arithmetic is available if the C++ +</p><div class="table"><a id="id457611"/><p class="title"><strong>Table 3.6. C++ TR 1 Library Headers</strong></p><div class="table-contents"><table summary="C++ TR 1 Library Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">tr1/array</code></td><td style="text-align: left"><code class="filename">tr1/complex</code></td><td style="text-align: left"><code class="filename">tr1/memory</code></td><td style="text-align: left"><code class="filename">tr1/functional</code></td><td style="text-align: left"><code class="filename">tr1/random</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/regex</code></td><td style="text-align: left"><code class="filename">tr1/tuple</code></td><td style="text-align: left"><code class="filename">tr1/type_traits</code></td><td style="text-align: left"><code class="filename">tr1/unordered_map</code></td><td style="text-align: left"><code class="filename">tr1/unordered_set</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/utility</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id457752"/><p class="title"><strong>Table 3.7. C++ TR 1 Library Headers for C Library Facilities</strong></p><div class="table-contents"><table summary="C++ TR 1 Library Headers for C Library Facilities" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">tr1/ccomplex</code></td><td style="text-align: left"><code class="filename">tr1/cfenv</code></td><td style="text-align: left"><code class="filename">tr1/cfloat</code></td><td style="text-align: left"><code class="filename">tr1/cmath</code></td><td style="text-align: left"><code class="filename">tr1/cinttypes</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/climits</code></td><td style="text-align: left"><code class="filename">tr1/cstdarg</code></td><td style="text-align: left"><code class="filename">tr1/cstdbool</code></td><td style="text-align: left"><code class="filename">tr1/cstdint</code></td><td style="text-align: left"><code class="filename">tr1/cstdio</code></td></tr><tr><td style="text-align: left"><code class="filename">tr1/cstdlib</code></td><td style="text-align: left"><code class="filename">tr1/ctgmath</code></td><td style="text-align: left"><code class="filename">tr1/ctime</code></td><td style="text-align: left"><code class="filename">tr1/cwchar</code></td><td style="text-align: left"><code class="filename">tr1/cwctype</code></td></tr></tbody></table></div></div><br class="table-break"/><p>Decimal floating-point arithmetic is available if the C++ compiler supports scalar decimal floating-point types defined via <code class="code">__attribute__((mode(SD|DD|LD)))</code>. -</p><div class="table"><a id="id486108"/><p class="title"><strong>Table 3.8. C++ TR 24733 Decimal Floating-Point Header</strong></p><div class="table-contents"><table summary="C++ TR 24733 Decimal Floating-Point Header" border="1"><colgroup><col style="text-align: left" class="c1"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">decimal/decimal</code></td></tr></tbody></table></div></div><br class="table-break"/><p> +</p><div class="table"><a id="id457928"/><p class="title"><strong>Table 3.8. C++ TR 24733 Decimal Floating-Point Header</strong></p><div class="table-contents"><table summary="C++ TR 24733 Decimal Floating-Point Header" border="1"><colgroup><col style="text-align: left" class="c1"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">decimal/decimal</code></td></tr></tbody></table></div></div><br class="table-break"/><p> Also included are files for the C++ ABI interface: -</p><div class="table"><a id="id486154"/><p class="title"><strong>Table 3.9. C++ ABI Headers</strong></p><div class="table-contents"><table summary="C++ ABI Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cxxabi.h</code></td><td style="text-align: left"><code class="filename">cxxabi_forced.h</code></td></tr></tbody></table></div></div><br class="table-break"/><p> +</p><div class="table"><a id="id457974"/><p class="title"><strong>Table 3.9. C++ ABI Headers</strong></p><div class="table-contents"><table summary="C++ ABI Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">cxxabi.h</code></td><td style="text-align: left"><code class="filename">cxxabi_forced.h</code></td></tr></tbody></table></div></div><br class="table-break"/><p> And a large variety of extensions. -</p><div class="table"><a id="id486207"/><p class="title"><strong>Table 3.10. Extension Headers</strong></p><div class="table-contents"><table summary="Extension Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">ext/algorithm</code></td><td style="text-align: left"><code class="filename">ext/atomicity.h</code></td><td style="text-align: left"><code class="filename">ext/array_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/bitmap_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/cast.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/codecvt_specializations.h</code></td><td style="text-align: left"><code class="filename">ext/concurrence.h</code></td><td style="text-align: left"><code class="filename">ext/debug_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/enc_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/extptr_allocator.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/functional</code></td><td style="text-align: left"><code class="filename">ext/iterator</code></td><td style="text-align: left"><code class="filename">ext/malloc_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/memory</code></td><td style="text-align: left"><code class="filename">ext/mt_allocator.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/new_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/numeric</code></td><td style="text-align: left"><code class="filename">ext/numeric_traits.h</code></td><td style="text-align: left"><code class="filename">ext/pb_ds/assoc_container.h</code></td><td style="text-align: left"><code class="filename">ext/pb_ds/priority_queue.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/pod_char_traits.h</code></td><td style="text-align: left"><code class="filename">ext/pool_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/rb_tree</code></td><td style="text-align: left"><code class="filename">ext/rope</code></td><td style="text-align: left"><code class="filename">ext/slist</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/stdio_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/stdio_sync_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/throw_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/typelist.h</code></td><td style="text-align: left"><code class="filename">ext/type_traits.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/vstring.h</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id486505"/><p class="title"><strong>Table 3.11. Extension Debug Headers</strong></p><div class="table-contents"><table summary="Extension Debug Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">debug/bitset</code></td><td style="text-align: left"><code class="filename">debug/deque</code></td><td style="text-align: left"><code class="filename">debug/list</code></td><td style="text-align: left"><code class="filename">debug/map</code></td><td style="text-align: left"><code class="filename">debug/set</code></td></tr><tr><td style="text-align: left"><code class="filename">debug/string</code></td><td style="text-align: left"><code class="filename">debug/unordered_map</code></td><td style="text-align: left"><code class="filename">debug/unordered_set</code></td><td style="text-align: left"><code class="filename">debug/vector</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id486628"/><p class="title"><strong>Table 3.12. Extension Profile Headers</strong></p><div class="table-contents"><table summary="Extension Profile Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">profile/bitset</code></td><td style="text-align: left"><code class="filename">profile/deque</code></td><td style="text-align: left"><code class="filename">profile/list</code></td><td style="text-align: left"><code class="filename">profile/map</code></td></tr><tr><td style="text-align: left"><code class="filename">profile/set</code></td><td style="text-align: left"><code class="filename">profile/unordered_map</code></td><td style="text-align: left"><code class="filename">profile/unordered_set</code></td><td style="text-align: left"><code class="filename">profile/vector</code></td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id486739"/><p class="title"><strong>Table 3.13. Extension Parallel Headers</strong></p><div class="table-contents"><table summary="Extension Parallel Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">parallel/algorithm</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr></tbody></table></div></div><br class="table-break"/></div><div class="section" title="Mixing Headers"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.mixing"/>Mixing Headers</h3></div></div></div><p> A few simple rules. +</p><div class="table"><a id="id458027"/><p class="title"><strong>Table 3.10. Extension Headers</strong></p><div class="table-contents"><table summary="Extension Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">ext/algorithm</code></td><td style="text-align: left"><code class="filename">ext/atomicity.h</code></td><td style="text-align: left"><code class="filename">ext/array_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/bitmap_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/cast.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/codecvt_specializations.h</code></td><td style="text-align: left"><code class="filename">ext/concurrence.h</code></td><td style="text-align: left"><code class="filename">ext/debug_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/enc_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/extptr_allocator.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/functional</code></td><td style="text-align: left"><code class="filename">ext/iterator</code></td><td style="text-align: left"><code class="filename">ext/malloc_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/memory</code></td><td style="text-align: left"><code class="filename">ext/mt_allocator.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/new_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/numeric</code></td><td style="text-align: left"><code class="filename">ext/numeric_traits.h</code></td><td style="text-align: left"><code class="filename">ext/pb_ds/assoc_container.h</code></td><td style="text-align: left"><code class="filename">ext/pb_ds/priority_queue.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/pod_char_traits.h</code></td><td style="text-align: left"><code class="filename">ext/pool_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/rb_tree</code></td><td style="text-align: left"><code class="filename">ext/rope</code></td><td style="text-align: left"><code class="filename">ext/slist</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/stdio_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/stdio_sync_filebuf.h</code></td><td style="text-align: left"><code class="filename">ext/throw_allocator.h</code></td><td style="text-align: left"><code class="filename">ext/typelist.h</code></td><td style="text-align: left"><code class="filename">ext/type_traits.h</code></td></tr><tr><td style="text-align: left"><code class="filename">ext/vstring.h</code></td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id458325"/><p class="title"><strong>Table 3.11. Extension Debug Headers</strong></p><div class="table-contents"><table summary="Extension Debug Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/><col style="text-align: left" class="c5"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">debug/bitset</code></td><td style="text-align: left"><code class="filename">debug/deque</code></td><td style="text-align: left"><code class="filename">debug/list</code></td><td style="text-align: left"><code class="filename">debug/map</code></td><td style="text-align: left"><code class="filename">debug/set</code></td></tr><tr><td style="text-align: left"><code class="filename">debug/string</code></td><td style="text-align: left"><code class="filename">debug/unordered_map</code></td><td style="text-align: left"><code class="filename">debug/unordered_set</code></td><td style="text-align: left"><code class="filename">debug/vector</code></td><td class="auto-generated"> </td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id458448"/><p class="title"><strong>Table 3.12. Extension Profile Headers</strong></p><div class="table-contents"><table summary="Extension Profile Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/><col style="text-align: left" class="c3"/><col style="text-align: left" class="c4"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">profile/bitset</code></td><td style="text-align: left"><code class="filename">profile/deque</code></td><td style="text-align: left"><code class="filename">profile/list</code></td><td style="text-align: left"><code class="filename">profile/map</code></td></tr><tr><td style="text-align: left"><code class="filename">profile/set</code></td><td style="text-align: left"><code class="filename">profile/unordered_map</code></td><td style="text-align: left"><code class="filename">profile/unordered_set</code></td><td style="text-align: left"><code class="filename">profile/vector</code></td></tr></tbody></table></div></div><br class="table-break"/><p/><div class="table"><a id="id458559"/><p class="title"><strong>Table 3.13. Extension Parallel Headers</strong></p><div class="table-contents"><table summary="Extension Parallel Headers" border="1"><colgroup><col style="text-align: left" class="c1"/><col style="text-align: left" class="c2"/></colgroup><tbody><tr><td style="text-align: left"><code class="filename">parallel/algorithm</code></td><td style="text-align: left"><code class="filename">parallel/numeric</code></td></tr></tbody></table></div></div><br class="table-break"/></div><div class="section" title="Mixing Headers"><div class="titlepage"><div><div><h3 class="title"><a id="manual.intro.using.headers.mixing"/>Mixing Headers</h3></div></div></div><p> A few simple rules. </p><p>First, mixing different dialects of the standard headers is not possible. It's an all-or-nothing affair. Thus, code like </p><pre class="programlisting"> diff --git a/libstdc++-v3/doc/html/manual/utilities.html b/libstdc++-v3/doc/html/manual/utilities.html index 0087bb57858..61dc2c8c862 100644 --- a/libstdc++-v3/doc/html/manual/utilities.html +++ b/libstdc++-v3/doc/html/manual/utilities.html @@ -7,7 +7,7 @@ Standard Contents </th><td align="right"> <a accesskey="n" href="pairs.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 6. Utilities"><div class="titlepage"><div><div><h2 class="title"><a id="std.util"/>Chapter 6. Utilities - <a id="id491058" class="indexterm"/> + <a id="id462878" class="indexterm"/> </h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="utilities.html#std.util.functors">Functors</a></span></dt><dt><span class="section"><a href="pairs.html">Pairs</a></span></dt><dt><span class="section"><a href="memory.html">Memory</a></span></dt><dd><dl><dt><span class="section"><a href="memory.html#std.util.memory.allocator">Allocators</a></span></dt><dt><span class="section"><a href="memory.html#std.util.memory.auto_ptr">auto_ptr</a></span></dt><dt><span class="section"><a href="memory.html#std.util.memory.shared_ptr">shared_ptr</a></span></dt></dl></dd><dt><span class="section"><a href="traits.html">Traits</a></span></dt></dl></div><div class="section" title="Functors"><div class="titlepage"><div><div><h2 class="title"><a id="std.util.functors"/>Functors</h2></div></div></div><p>If you don't know what functors are, you're not alone. Many people get slightly the wrong idea. In the interest of not reinventing the wheel, we will refer you to the introduction to the functor diff --git a/libstdc++-v3/doc/xml/manual/status_cxx200x.xml b/libstdc++-v3/doc/xml/manual/status_cxx200x.xml index d0add6c2e8b..5c4bc5de0bd 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx200x.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx200x.xml @@ -247,10 +247,9 @@ particular release. <entry/> </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> <entry>18.9.3</entry> <entry>Initializer list range access</entry> - <entry>N</entry> + <entry>Y</entry> <entry/> </row> <row> @@ -469,10 +468,9 @@ particular release. <entry/> </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> <entry>20.4.2.8</entry> <entry>Tuple traits</entry> - <entry>N</entry> + <entry>Y</entry> <entry/> </row> <row> @@ -530,11 +528,11 @@ particular release. <entry/> </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> + <?dbhtml bgcolor="#B0B0B0" ?> <entry>20.6.3</entry> <entry>Pointer traits</entry> - <entry>N</entry> - <entry/> + <entry>Partial</entry> + <entry>Missing rebind</entry> </row> <row> <?dbhtml bgcolor="#B0B0B0" ?> @@ -563,11 +561,11 @@ particular release. <entry/> </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> + <?dbhtml bgcolor="#B0B0B0" ?> <entry>20.6.8</entry> <entry>Allocator traits</entry> - <entry>N</entry> - <entry/> + <entry>Partial</entry> + <entry>Missing rebind_alloc and rebind_traits</entry> </row> <row> <entry>20.6.9</entry> @@ -1619,10 +1617,9 @@ particular release. <entry/> </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> <entry>24.6.5</entry> <entry>range access</entry> - <entry>N</entry> + <entry>Y</entry> <entry/> </row> <row> @@ -2523,14 +2520,14 @@ particular release. <entry>30.6.6</entry> <entry>Class template <code>future</code></entry> <entry>Partial</entry> - <entry>Missing future_status and future::share()</entry> + <entry>Timed waiting functions do not return future_status</entry> </row> <row> <?dbhtml bgcolor="#B0B0B0" ?> <entry>30.6.7</entry> <entry>Class template <code>shared_future</code></entry> <entry>Partial</entry> - <entry>Missing future_status</entry> + <entry>Timed waiting functions do not return future_status</entry> </row> <row> <entry>30.6.8</entry> diff --git a/libstdc++-v3/include/bits/algorithmfwd.h b/libstdc++-v3/include/bits/algorithmfwd.h index fe3b68f6a25..bb7ca250333 100644 --- a/libstdc++-v3/include/bits/algorithmfwd.h +++ b/libstdc++-v3/include/bits/algorithmfwd.h @@ -551,8 +551,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void swap(_Tp&, _Tp&) #ifdef __GXX_EXPERIMENTAL_CXX0X__ - noexcept(is_nothrow_move_constructible<_Tp>::value - && is_nothrow_move_assignable<_Tp>::value) + noexcept(__and_<is_nothrow_move_constructible<_Tp>, + is_nothrow_move_assignable<_Tp>>::value) #endif ; diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 102ef77a68d..9279a38cf4c 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -499,7 +499,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * The newly-created string contains the exact contents of @a str. * @a str is a valid, but unspecified string. **/ - basic_string(basic_string&& __str) + basic_string(basic_string&& __str) noexcept : _M_dataplus(__str._M_dataplus) { #ifndef _GLIBCXX_FULLY_DYNAMIC_STRING @@ -530,7 +530,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Destroy the string instance. */ - ~basic_string() + ~basic_string() _GLIBCXX_NOEXCEPT { _M_rep()->_M_dispose(this->get_allocator()); } /** @@ -597,7 +597,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the %string. Unshares the string. */ iterator - begin() + begin() _GLIBCXX_NOEXCEPT { _M_leak(); return iterator(_M_data()); @@ -608,7 +608,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * character in the %string. */ const_iterator - begin() const + begin() const _GLIBCXX_NOEXCEPT { return const_iterator(_M_data()); } /** @@ -616,7 +616,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * character in the %string. Unshares the string. */ iterator - end() + end() _GLIBCXX_NOEXCEPT { _M_leak(); return iterator(_M_data() + this->size()); @@ -627,7 +627,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * last character in the %string. */ const_iterator - end() const + end() const _GLIBCXX_NOEXCEPT { return const_iterator(_M_data() + this->size()); } /** @@ -636,7 +636,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * order. Unshares the string. */ reverse_iterator - rbegin() + rbegin() _GLIBCXX_NOEXCEPT { return reverse_iterator(this->end()); } /** @@ -645,7 +645,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * reverse element order. */ const_reverse_iterator - rbegin() const + rbegin() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(this->end()); } /** @@ -654,7 +654,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * element order. Unshares the string. */ reverse_iterator - rend() + rend() _GLIBCXX_NOEXCEPT { return reverse_iterator(this->begin()); } /** @@ -663,7 +663,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * is done in reverse element order. */ const_reverse_iterator - rend() const + rend() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(this->begin()); } #ifdef __GXX_EXPERIMENTAL_CXX0X__ @@ -672,7 +672,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * character in the %string. */ const_iterator - cbegin() const + cbegin() const noexcept { return const_iterator(this->_M_data()); } /** @@ -680,7 +680,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * last character in the %string. */ const_iterator - cend() const + cend() const noexcept { return const_iterator(this->_M_data() + this->size()); } /** @@ -689,7 +689,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * reverse element order. */ const_reverse_iterator - crbegin() const + crbegin() const noexcept { return const_reverse_iterator(this->end()); } /** @@ -698,7 +698,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * is done in reverse element order. */ const_reverse_iterator - crend() const + crend() const noexcept { return const_reverse_iterator(this->begin()); } #endif @@ -707,18 +707,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Returns the number of characters in the string, not including any /// null-termination. size_type - size() const + size() const _GLIBCXX_NOEXCEPT { return _M_rep()->_M_length; } /// Returns the number of characters in the string, not including any /// null-termination. size_type - length() const + length() const _GLIBCXX_NOEXCEPT { return _M_rep()->_M_length; } /// Returns the size() of the largest possible %string. size_type - max_size() const + max_size() const _GLIBCXX_NOEXCEPT { return _Rep::_S_max_size; } /** @@ -765,7 +765,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * before needing to allocate more memory. */ size_type - capacity() const + capacity() const _GLIBCXX_NOEXCEPT { return _M_rep()->_M_capacity; } /** @@ -792,7 +792,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Erases the string, making it empty. */ void - clear() + clear() _GLIBCXX_NOEXCEPT { _M_mutate(0, this->size(), 0); } /** @@ -800,7 +800,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * <code>*this == ""</code>. */ bool - empty() const + empty() const _GLIBCXX_NOEXCEPT { return this->size() == 0; } // Element access: @@ -1763,7 +1763,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * happen. */ const _CharT* - c_str() const + c_str() const _GLIBCXX_NOEXCEPT { return _M_data(); } /** @@ -1773,14 +1773,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * happen. */ const _CharT* - data() const + data() const _GLIBCXX_NOEXCEPT { return _M_data(); } /** * @brief Return copy of allocator used to construct this string. */ allocator_type - get_allocator() const + get_allocator() const _GLIBCXX_NOEXCEPT { return _M_dataplus; } /** @@ -1809,6 +1809,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type find(const basic_string& __str, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { return this->find(__str.data(), __pos, __str.size()); } /** @@ -1839,7 +1840,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * returns npos. */ size_type - find(_CharT __c, size_type __pos = 0) const; + find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a string. @@ -1853,6 +1854,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type rfind(const basic_string& __str, size_type __pos = npos) const + _GLIBCXX_NOEXCEPT { return this->rfind(__str.data(), __pos, __str.size()); } /** @@ -1897,7 +1899,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * returns npos. */ size_type - rfind(_CharT __c, size_type __pos = npos) const; + rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT; /** * @brief Find position of a character of string. @@ -1911,6 +1913,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type find_first_of(const basic_string& __str, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { return this->find_first_of(__str.data(), __pos, __str.size()); } /** @@ -1957,7 +1960,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Note: equivalent to find(c, pos). */ size_type - find_first_of(_CharT __c, size_type __pos = 0) const + find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return this->find(__c, __pos); } /** @@ -1972,6 +1975,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type find_last_of(const basic_string& __str, size_type __pos = npos) const + _GLIBCXX_NOEXCEPT { return this->find_last_of(__str.data(), __pos, __str.size()); } /** @@ -2018,7 +2022,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Note: equivalent to rfind(c, pos). */ size_type - find_last_of(_CharT __c, size_type __pos = npos) const + find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->rfind(__c, __pos); } /** @@ -2033,6 +2037,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { return this->find_first_not_of(__str.data(), __pos, __str.size()); } /** @@ -2078,7 +2083,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * If not found, returns npos. */ size_type - find_first_not_of(_CharT __c, size_type __pos = 0) const; + find_first_not_of(_CharT __c, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character not in string. @@ -2092,6 +2098,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const + _GLIBCXX_NOEXCEPT { return this->find_last_not_of(__str.data(), __pos, __str.size()); } /** @@ -2137,7 +2144,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * found. If not found, returns npos. */ size_type - find_last_not_of(_CharT __c, size_type __pos = npos) const; + find_last_not_of(_CharT __c, size_type __pos = npos) const + _GLIBCXX_NOEXCEPT; /** * @brief Get a substring. diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index d988334274e..056e2657390 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -759,7 +759,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: - find(_CharT __c, size_type __pos) const + find(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { size_type __ret = npos; const size_type __size = this->size(); @@ -798,7 +798,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: - rfind(_CharT __c, size_type __pos) const + rfind(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { size_type __size = this->size(); if (__size) @@ -863,7 +863,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: - find_first_not_of(_CharT __c, size_type __pos) const + find_first_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { for (; __pos < this->size(); ++__pos) if (!traits_type::eq(_M_data()[__pos], __c)) @@ -895,7 +895,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _CharT, typename _Traits, typename _Alloc> typename basic_string<_CharT, _Traits, _Alloc>::size_type basic_string<_CharT, _Traits, _Alloc>:: - find_last_not_of(_CharT __c, size_type __pos) const + find_last_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { size_type __size = this->size(); if (__size) diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h index 1e242f3f760..df96c88cb99 100644 --- a/libstdc++-v3/include/bits/forward_list.h +++ b/libstdc++-v3/include/bits/forward_list.h @@ -290,6 +290,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _Fwd_list_impl(const _Node_alloc_type& __a) : _Node_alloc_type(__a), _M_head() { } + + _Fwd_list_impl(_Node_alloc_type&& __a) + : _Node_alloc_type(std::move(__a)), _M_head() + { } }; _Fwd_list_impl _M_impl; @@ -323,7 +327,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER } _Fwd_list_base(_Fwd_list_base&& __lst) - : _M_impl(__lst._M_get_Node_allocator()) + : _M_impl(std::move(__lst._M_get_Node_allocator())) { this->_M_impl._M_head._M_next = __lst._M_impl._M_head._M_next; __lst._M_impl._M_head._M_next = 0; @@ -523,7 +527,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * forward_list. The contents of @a list are a valid, but unspecified * %forward_list. */ - forward_list(forward_list&& __list) + forward_list(forward_list&& __list) noexcept : _Base(std::move(__list)) { } /** @@ -542,7 +546,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER /** * @brief The forward_list dtor. */ - ~forward_list() + ~forward_list() noexcept { } /** diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h index fd6bc32b0d8..d72c78bbdf2 100644 --- a/libstdc++-v3/include/bits/hashtable.h +++ b/libstdc++-v3/include/bits/hashtable.h @@ -213,8 +213,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Hashtable(const _Hashtable&); - _Hashtable(_Hashtable&&); - + _Hashtable(_Hashtable&&) + noexcept(__and_<is_nothrow_copy_constructible<_Equal>, + is_nothrow_copy_constructible<_H1>>::value); + _Hashtable& operator=(const _Hashtable& __ht) { @@ -233,7 +235,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return *this; } - ~_Hashtable(); + ~_Hashtable() noexcept; void swap(_Hashtable&); @@ -672,11 +674,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>:: _Hashtable(_Hashtable&& __ht) + noexcept(__and_<is_nothrow_copy_constructible<_Equal>, + is_nothrow_copy_constructible<_H1>>::value) : __detail::_Rehash_base<_RehashPolicy, _Hashtable>(__ht), __detail::_Hash_code_base<_Key, _Value, _ExtractKey, _Equal, _H1, _H2, _Hash, __chc>(__ht), __detail::_Map_base<_Key, _Value, _ExtractKey, __uk, _Hashtable>(__ht), - _M_node_allocator(__ht._M_node_allocator), + _M_node_allocator(std::move(__ht._M_node_allocator)), _M_buckets(__ht._M_buckets), _M_bucket_count(__ht._M_bucket_count), _M_begin_bucket_index(__ht._M_begin_bucket_index), @@ -697,7 +701,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bool __chc, bool __cit, bool __uk> _Hashtable<_Key, _Value, _Allocator, _ExtractKey, _Equal, _H1, _H2, _Hash, _RehashPolicy, __chc, __cit, __uk>:: - ~_Hashtable() + ~_Hashtable() noexcept { clear(); _M_deallocate_buckets(_M_buckets, _M_bucket_count); diff --git a/libstdc++-v3/include/bits/move.h b/libstdc++-v3/include/bits/move.h index 963dd4c655d..ca7686eb162 100644 --- a/libstdc++-v3/include/bits/move.h +++ b/libstdc++-v3/include/bits/move.h @@ -136,8 +136,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION inline void swap(_Tp& __a, _Tp& __b) #ifdef __GXX_EXPERIMENTAL_CXX0X__ - noexcept(is_nothrow_move_constructible<_Tp>::value - && is_nothrow_move_assignable<_Tp>::value) + noexcept(__and_<is_nothrow_move_constructible<_Tp>, + is_nothrow_move_assignable<_Tp>>::value) #endif { // concept requirements diff --git a/libstdc++-v3/include/bits/stl_bvector.h b/libstdc++-v3/include/bits/stl_bvector.h index 47156418509..edf662987cb 100644 --- a/libstdc++-v3/include/bits/stl_bvector.h +++ b/libstdc++-v3/include/bits/stl_bvector.h @@ -392,6 +392,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _Bvector_impl(const _Bit_alloc_type& __a) : _Bit_alloc_type(__a), _M_start(), _M_finish(), _M_end_of_storage(0) { } + +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + _Bvector_impl(_Bit_alloc_type&& __a) + : _Bit_alloc_type(std::move(__a)), _M_start(), _M_finish(), + _M_end_of_storage(0) + { } +#endif }; public: @@ -416,8 +423,8 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER : _M_impl(__a) { } #ifdef __GXX_EXPERIMENTAL_CXX0X__ - _Bvector_base(_Bvector_base&& __x) - : _M_impl(__x._M_get_Bit_allocator()) + _Bvector_base(_Bvector_base&& __x) noexcept + : _M_impl(std::move(__x._M_get_Bit_allocator())) { this->_M_impl._M_start = __x._M_impl._M_start; this->_M_impl._M_finish = __x._M_impl._M_finish; @@ -532,7 +539,7 @@ template<typename _Alloc> } #ifdef __GXX_EXPERIMENTAL_CXX0X__ - vector(vector&& __x) + vector(vector&& __x) noexcept : _Base(std::move(__x)) { } vector(initializer_list<bool> __l, @@ -553,7 +560,7 @@ template<typename _Alloc> _M_initialize_dispatch(__first, __last, _Integral()); } - ~vector() { } + ~vector() _GLIBCXX_NOEXCEPT { } vector& operator=(const vector& __x) diff --git a/libstdc++-v3/include/bits/stl_deque.h b/libstdc++-v3/include/bits/stl_deque.h index 209287b56fc..7ddfbc5ac16 100644 --- a/libstdc++-v3/include/bits/stl_deque.h +++ b/libstdc++-v3/include/bits/stl_deque.h @@ -465,7 +465,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #ifdef __GXX_EXPERIMENTAL_CXX0X__ _Deque_base(_Deque_base&& __x) - : _M_impl(__x._M_get_Tp_allocator()) + : _M_impl(std::move(__x._M_get_Tp_allocator())) { _M_initialize_map(0); if (__x._M_impl._M_map) @@ -505,6 +505,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER : _Tp_alloc_type(__a), _M_map(0), _M_map_size(0), _M_start(), _M_finish() { } + +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + _Deque_impl(_Tp_alloc_type&& __a) + : _Tp_alloc_type(std::move(__a)), _M_map(0), _M_map_size(0), + _M_start(), _M_finish() + { } +#endif }; _Tp_alloc_type& @@ -894,7 +901,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * themselves are pointers, the pointed-to memory is not touched in any * way. Managing the pointer is the user's responsibility. */ - ~deque() + ~deque() _GLIBCXX_NOEXCEPT { _M_destroy_data(begin(), end(), _M_get_Tp_allocator()); } /** diff --git a/libstdc++-v3/include/bits/stl_list.h b/libstdc++-v3/include/bits/stl_list.h index 5144bb67e7b..96995994185 100644 --- a/libstdc++-v3/include/bits/stl_list.h +++ b/libstdc++-v3/include/bits/stl_list.h @@ -318,6 +318,12 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _List_impl(const _Node_alloc_type& __a) : _Node_alloc_type(__a), _M_node() { } + +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + _List_impl(_Node_alloc_type&& __a) + : _Node_alloc_type(std::move(__a)), _M_node() + { } +#endif }; _List_impl _M_impl; @@ -359,7 +365,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #ifdef __GXX_EXPERIMENTAL_CXX0X__ _List_base(_List_base&& __x) - : _M_impl(__x._M_get_Node_allocator()) + : _M_impl(std::move(__x._M_get_Node_allocator())) { _M_init(); __detail::_List_node_base::swap(this->_M_impl._M_node, @@ -368,7 +374,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #endif // This is what actually destroys the list. - ~_List_base() + ~_List_base() _GLIBCXX_NOEXCEPT { _M_clear(); } void @@ -580,7 +586,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * The newly-created %list contains the exact contents of @a x. * The contents of @a x are a valid, but unspecified %list. */ - list(list&& __x) + list(list&& __x) noexcept : _Base(std::move(__x)) { } /** diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index 49341c998de..3ca683791d8 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -181,6 +181,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * The contents of @a x are a valid, but unspecified %map. */ map(map&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _M_t(std::move(__x._M_t)) { } /** diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h index bc677262a32..58811317228 100644 --- a/libstdc++-v3/include/bits/stl_multimap.h +++ b/libstdc++-v3/include/bits/stl_multimap.h @@ -179,6 +179,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * The contents of @a x are a valid, but unspecified %multimap. */ multimap(multimap&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _M_t(std::move(__x._M_t)) { } /** diff --git a/libstdc++-v3/include/bits/stl_multiset.h b/libstdc++-v3/include/bits/stl_multiset.h index c3e686adeb1..d5d94ebe7c9 100644 --- a/libstdc++-v3/include/bits/stl_multiset.h +++ b/libstdc++-v3/include/bits/stl_multiset.h @@ -192,6 +192,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * The contents of @a x are a valid, but unspecified %multiset. */ multiset(multiset&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _M_t(std::move(__x._M_t)) { } /** diff --git a/libstdc++-v3/include/bits/stl_set.h b/libstdc++-v3/include/bits/stl_set.h index aa89a8a21cb..9676d909f69 100644 --- a/libstdc++-v3/include/bits/stl_set.h +++ b/libstdc++-v3/include/bits/stl_set.h @@ -199,6 +199,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * The contents of @a x are a valid, but unspecified %set. */ set(set&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _M_t(std::move(__x._M_t)) { } /** diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h index 7ba6061a674..3b291c5bdb9 100644 --- a/libstdc++-v3/include/bits/stl_tree.h +++ b/libstdc++-v3/include/bits/stl_tree.h @@ -450,6 +450,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _M_node_count(0) { _M_initialize(); } +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + _Rb_tree_impl(const _Key_compare& __comp, _Node_allocator&& __a) + : _Node_allocator(std::move(__a)), _M_key_compare(__comp), + _M_header(), _M_node_count(0) + { _M_initialize(); } +#endif + private: void _M_initialize() @@ -635,7 +642,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _Rb_tree(_Rb_tree&& __x); #endif - ~_Rb_tree() + ~_Rb_tree() _GLIBCXX_NOEXCEPT { _M_erase(_M_begin()); } _Rb_tree& @@ -900,7 +907,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typename _Compare, typename _Alloc> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _Rb_tree(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&& __x) - : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator()) + : _M_impl(__x._M_impl._M_key_compare, + std::move(__x._M_get_Node_allocator())) { if (__x._M_root() != 0) { diff --git a/libstdc++-v3/include/bits/stl_vector.h b/libstdc++-v3/include/bits/stl_vector.h index 40770b1cd5a..5fa5f522e0c 100644 --- a/libstdc++-v3/include/bits/stl_vector.h +++ b/libstdc++-v3/include/bits/stl_vector.h @@ -86,6 +86,13 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER _Vector_impl(_Tp_alloc_type const& __a) : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) { } + +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + _Vector_impl(_Tp_alloc_type&& __a) + : _Tp_alloc_type(std::move(__a)), + _M_start(0), _M_finish(0), _M_end_of_storage(0) + { } +#endif }; public: @@ -127,7 +134,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER #ifdef __GXX_EXPERIMENTAL_CXX0X__ _Vector_base(_Vector_base&& __x) - : _M_impl(__x._M_get_Tp_allocator()) + : _M_impl(std::move(__x._M_get_Tp_allocator())) { this->_M_impl._M_start = __x._M_impl._M_start; this->_M_impl._M_finish = __x._M_impl._M_finish; @@ -291,7 +298,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * The newly-created %vector contains the exact contents of @a x. * The contents of @a x are a valid, but unspecified %vector. */ - vector(vector&& __x) + vector(vector&& __x) noexcept : _Base(std::move(__x)) { } /** @@ -346,7 +353,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER * not touched in any way. Managing the pointer is the user's * responsibility. */ - ~vector() + ~vector() _GLIBCXX_NOEXCEPT { std::_Destroy(this->_M_impl._M_start, this->_M_impl._M_finish, _M_get_Tp_allocator()); } diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque index 1756328e4e0..749fc2e6cab 100644 --- a/libstdc++-v3/include/debug/deque +++ b/libstdc++-v3/include/debug/deque @@ -113,7 +113,7 @@ namespace __debug : _Base(__l, __a), _Safe_base() { } #endif - ~deque() { } + ~deque() _GLIBCXX_NOEXCEPT { } deque& operator=(const deque& __x) diff --git a/libstdc++-v3/include/debug/forward_list b/libstdc++-v3/include/debug/forward_list index 8f8d0eb80a5..9f1da5b679f 100644 --- a/libstdc++-v3/include/debug/forward_list +++ b/libstdc++-v3/include/debug/forward_list @@ -104,7 +104,7 @@ namespace __debug : _Base(__list) { } - forward_list(forward_list&& __list) + forward_list(forward_list&& __list) noexcept : _Base(std::move(__list._M_base())) { this->_M_swap(__list); @@ -115,7 +115,7 @@ namespace __debug : _Base(__il, __al) { } - ~forward_list() + ~forward_list() noexcept { } forward_list& diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list index 45c53ff7515..44a208bfe52 100644 --- a/libstdc++-v3/include/debug/list +++ b/libstdc++-v3/include/debug/list @@ -106,7 +106,7 @@ namespace __debug : _Base(__x), _Safe_base() { } #ifdef __GXX_EXPERIMENTAL_CXX0X__ - list(list&& __x) + list(list&& __x) noexcept : _Base(std::move(__x)), _Safe_base() { this->_M_swap(__x); } @@ -115,7 +115,7 @@ namespace __debug : _Base(__l, __a), _Safe_base() { } #endif - ~list() { } + ~list() _GLIBCXX_NOEXCEPT { } list& operator=(const list& __x) diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h index 04f8b083f79..9f80251e3ae 100644 --- a/libstdc++-v3/include/debug/map.h +++ b/libstdc++-v3/include/debug/map.h @@ -95,6 +95,7 @@ namespace __debug #ifdef __GXX_EXPERIMENTAL_CXX0X__ map(map&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _Base(std::move(__x)), _Safe_base() { this->_M_swap(__x); } @@ -104,7 +105,7 @@ namespace __debug : _Base(__l, __c, __a), _Safe_base() { } #endif - ~map() { } + ~map() _GLIBCXX_NOEXCEPT { } map& operator=(const map& __x) diff --git a/libstdc++-v3/include/debug/multimap.h b/libstdc++-v3/include/debug/multimap.h index 0be2fa38dd2..b3c43b8bfa2 100644 --- a/libstdc++-v3/include/debug/multimap.h +++ b/libstdc++-v3/include/debug/multimap.h @@ -96,6 +96,7 @@ namespace __debug #ifdef __GXX_EXPERIMENTAL_CXX0X__ multimap(multimap&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _Base(std::move(__x)), _Safe_base() { this->_M_swap(__x); } @@ -105,7 +106,7 @@ namespace __debug : _Base(__l, __c, __a), _Safe_base() { } #endif - ~multimap() { } + ~multimap() _GLIBCXX_NOEXCEPT { } multimap& operator=(const multimap& __x) diff --git a/libstdc++-v3/include/debug/multiset.h b/libstdc++-v3/include/debug/multiset.h index a9756f53303..ee4c04735dd 100644 --- a/libstdc++-v3/include/debug/multiset.h +++ b/libstdc++-v3/include/debug/multiset.h @@ -95,6 +95,7 @@ namespace __debug #ifdef __GXX_EXPERIMENTAL_CXX0X__ multiset(multiset&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _Base(std::move(__x)), _Safe_base() { this->_M_swap(__x); } @@ -104,7 +105,7 @@ namespace __debug : _Base(__l, __comp, __a), _Safe_base() { } #endif - ~multiset() { } + ~multiset() _GLIBCXX_NOEXCEPT { } multiset& operator=(const multiset& __x) diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h index fddd1673149..fd6a607d013 100644 --- a/libstdc++-v3/include/debug/set.h +++ b/libstdc++-v3/include/debug/set.h @@ -1,6 +1,6 @@ // Debugging set implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -95,6 +95,7 @@ namespace __debug #ifdef __GXX_EXPERIMENTAL_CXX0X__ set(set&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _Base(std::move(__x)), _Safe_base() { this->_M_swap(__x); } @@ -104,7 +105,7 @@ namespace __debug : _Base(__l, __comp, __a), _Safe_base() { } #endif - ~set() { } + ~set() _GLIBCXX_NOEXCEPT { } set& operator=(const set& __x) diff --git a/libstdc++-v3/include/debug/string b/libstdc++-v3/include/debug/string index fe073f21c7f..b6d2b4b34ea 100644 --- a/libstdc++-v3/include/debug/string +++ b/libstdc++-v3/include/debug/string @@ -1,6 +1,6 @@ // Debugging string implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -114,7 +114,7 @@ namespace __gnu_debug { } #ifdef __GXX_EXPERIMENTAL_CXX0X__ - basic_string(basic_string&& __str) + basic_string(basic_string&& __str) noexcept : _Base(std::move(__str)) { } @@ -124,7 +124,7 @@ namespace __gnu_debug { } #endif // __GXX_EXPERIMENTAL_CXX0X__ - ~basic_string() { } + ~basic_string() _GLIBCXX_NOEXCEPT { } basic_string& operator=(const basic_string& __str) @@ -171,37 +171,55 @@ namespace __gnu_debug // 21.3.2 iterators: iterator - begin() + begin() _GLIBCXX_NOEXCEPT { return iterator(_Base::begin(), this); } const_iterator - begin() const + begin() const _GLIBCXX_NOEXCEPT { return const_iterator(_Base::begin(), this); } iterator - end() + end() _GLIBCXX_NOEXCEPT { return iterator(_Base::end(), this); } const_iterator - end() const + end() const _GLIBCXX_NOEXCEPT { return const_iterator(_Base::end(), this); } reverse_iterator - rbegin() + rbegin() _GLIBCXX_NOEXCEPT { return reverse_iterator(end()); } const_reverse_iterator - rbegin() const + rbegin() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(end()); } reverse_iterator - rend() + rend() _GLIBCXX_NOEXCEPT { return reverse_iterator(begin()); } const_reverse_iterator - rend() const + rend() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(begin()); } +#ifdef __GXX_EXPERIMENTAL_CXX0X__ + const_iterator + cbegin() const noexcept + { return const_iterator(_Base::begin(), this); } + + const_iterator + cend() const noexcept + { return const_iterator(_Base::end(), this); } + + const_reverse_iterator + crbegin() const noexcept + { return const_reverse_iterator(end()); } + + const_reverse_iterator + crend() const noexcept + { return const_reverse_iterator(begin()); } +#endif + // 21.3.3 capacity: using _Base::size; using _Base::length; @@ -226,7 +244,7 @@ namespace __gnu_debug using _Base::reserve; void - clear() + clear() _GLIBCXX_NOEXCEPT { _Base::clear(); this->_M_invalidate_all(); @@ -672,7 +690,7 @@ namespace __gnu_debug // 21.3.6 string operations: const _CharT* - c_str() const + c_str() const _GLIBCXX_NOEXCEPT { const _CharT* __res = _Base::c_str(); this->_M_invalidate_all(); @@ -680,7 +698,7 @@ namespace __gnu_debug } const _CharT* - data() const + data() const _GLIBCXX_NOEXCEPT { const _CharT* __res = _Base::data(); this->_M_invalidate_all(); @@ -691,6 +709,7 @@ namespace __gnu_debug size_type find(const basic_string& __str, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { return _Base::find(__str, __pos); } size_type @@ -708,11 +727,12 @@ namespace __gnu_debug } size_type - find(_CharT __c, size_type __pos = 0) const + find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return _Base::find(__c, __pos); } size_type rfind(const basic_string& __str, size_type __pos = _Base::npos) const + _GLIBCXX_NOEXCEPT { return _Base::rfind(__str, __pos); } size_type @@ -730,11 +750,12 @@ namespace __gnu_debug } size_type - rfind(_CharT __c, size_type __pos = _Base::npos) const + rfind(_CharT __c, size_type __pos = _Base::npos) const _GLIBCXX_NOEXCEPT { return _Base::rfind(__c, __pos); } size_type find_first_of(const basic_string& __str, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { return _Base::find_first_of(__str, __pos); } size_type @@ -752,12 +773,12 @@ namespace __gnu_debug } size_type - find_first_of(_CharT __c, size_type __pos = 0) const + find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return _Base::find_first_of(__c, __pos); } size_type find_last_of(const basic_string& __str, - size_type __pos = _Base::npos) const + size_type __pos = _Base::npos) const _GLIBCXX_NOEXCEPT { return _Base::find_last_of(__str, __pos); } size_type @@ -776,10 +797,12 @@ namespace __gnu_debug size_type find_last_of(_CharT __c, size_type __pos = _Base::npos) const + _GLIBCXX_NOEXCEPT { return _Base::find_last_of(__c, __pos); } size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { return _Base::find_first_not_of(__str, __pos); } size_type @@ -797,12 +820,13 @@ namespace __gnu_debug } size_type - find_first_not_of(_CharT __c, size_type __pos = 0) const + find_first_not_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return _Base::find_first_not_of(__c, __pos); } size_type find_last_not_of(const basic_string& __str, size_type __pos = _Base::npos) const + _GLIBCXX_NOEXCEPT { return _Base::find_last_not_of(__str, __pos); } size_type @@ -821,6 +845,7 @@ namespace __gnu_debug size_type find_last_not_of(_CharT __c, size_type __pos = _Base::npos) const + _GLIBCXX_NOEXCEPT { return _Base::find_last_not_of(__c, __pos); } basic_string @@ -868,10 +893,10 @@ namespace __gnu_debug } _Base& - _M_base() { return *this; } + _M_base() _GLIBCXX_NOEXCEPT { return *this; } const _Base& - _M_base() const { return *this; } + _M_base() const _GLIBCXX_NOEXCEPT { return *this; } using _Safe_base::_M_invalidate_all; }; diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index b3295fba5a6..7a4265c7b0d 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -1,6 +1,6 @@ // Debugging unordered_map/unordered_multimap implementation -*- C++ -*- -// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +// Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free @@ -98,6 +98,8 @@ namespace __debug : _Base(__x), _Safe_base() { } unordered_map(unordered_map&& __x) + noexcept(__and_<is_nothrow_copy_constructible<_Hash>, + is_nothrow_copy_constructible<_Pred>>::value) : _Base(std::move(__x)), _Safe_base() { } unordered_map(initializer_list<value_type> __l, @@ -107,6 +109,8 @@ namespace __debug const allocator_type& __a = allocator_type()) : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { } + ~unordered_map() noexcept { } + unordered_map& operator=(const unordered_map& __x) { @@ -385,7 +389,9 @@ namespace __debug unordered_multimap(const _Base& __x) : _Base(__x), _Safe_base() { } - unordered_multimap(unordered_multimap&& __x) + unordered_multimap(unordered_multimap&& __x) + noexcept(__and_<is_nothrow_copy_constructible<_Hash>, + is_nothrow_copy_constructible<_Pred>>::value) : _Base(std::move(__x)), _Safe_base() { } unordered_multimap(initializer_list<value_type> __l, @@ -395,6 +401,8 @@ namespace __debug const allocator_type& __a = allocator_type()) : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { } + ~unordered_multimap() noexcept { } + unordered_multimap& operator=(const unordered_multimap& __x) { diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index d67e98775ad..46dff272bb2 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -97,7 +97,9 @@ namespace __debug unordered_set(const _Base& __x) : _Base(__x), _Safe_base() { } - unordered_set(unordered_set&& __x) + unordered_set(unordered_set&& __x) + noexcept(__and_<is_nothrow_copy_constructible<_Hash>, + is_nothrow_copy_constructible<_Pred>>::value) : _Base(std::move(__x)), _Safe_base() { } unordered_set(initializer_list<value_type> __l, @@ -107,6 +109,8 @@ namespace __debug const allocator_type& __a = allocator_type()) : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { } + ~unordered_set() noexcept { } + unordered_set& operator=(const unordered_set& __x) { @@ -374,7 +378,9 @@ namespace __debug unordered_multiset(const _Base& __x) : _Base(__x), _Safe_base() { } - unordered_multiset(unordered_multiset&& __x) + unordered_multiset(unordered_multiset&& __x) + noexcept(__and_<is_nothrow_copy_constructible<_Hash>, + is_nothrow_copy_constructible<_Pred>>::value) : _Base(std::move(__x)), _Safe_base() { } unordered_multiset(initializer_list<value_type> __l, @@ -384,6 +390,8 @@ namespace __debug const allocator_type& __a = allocator_type()) : _Base(__l, __n, __hf, __eql, __a), _Safe_base() { } + ~unordered_multiset() noexcept { } + unordered_multiset& operator=(const unordered_multiset& __x) { diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector index f5bdde42bfc..6072515dac3 100644 --- a/libstdc++-v3/include/debug/vector +++ b/libstdc++-v3/include/debug/vector @@ -109,7 +109,7 @@ namespace __debug : _Base(__x), _Safe_base(), _M_guaranteed_capacity(__x.size()) { } #ifdef __GXX_EXPERIMENTAL_CXX0X__ - vector(vector&& __x) + vector(vector&& __x) noexcept : _Base(std::move(__x)), _Safe_base(), _M_guaranteed_capacity(this->size()) { @@ -123,7 +123,7 @@ namespace __debug _M_guaranteed_capacity(__l.size()) { } #endif - ~vector() { } + ~vector() _GLIBCXX_NOEXCEPT { } vector& operator=(const vector& __x) diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 442a3922579..a84336861a7 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -156,7 +156,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * @a str. The contents of @a str are a valid, but unspecified * string. */ - __versa_string(__versa_string&& __str) + __versa_string(__versa_string&& __str) noexcept : __vstring_base(std::move(__str)) { } /** @@ -243,7 +243,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /** * @brief Destroy the string instance. */ - ~__versa_string() { } + ~__versa_string() _GLIBCXX_NOEXCEPT { } /** * @brief Assign the value of @a str to this string. @@ -309,7 +309,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * the %string. Unshares the string. */ iterator - begin() + begin() _GLIBCXX_NOEXCEPT { this->_M_leak(); return iterator(this->_M_data()); @@ -320,7 +320,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * character in the %string. */ const_iterator - begin() const + begin() const _GLIBCXX_NOEXCEPT { return const_iterator(this->_M_data()); } /** @@ -328,7 +328,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * character in the %string. Unshares the string. */ iterator - end() + end() _GLIBCXX_NOEXCEPT { this->_M_leak(); return iterator(this->_M_data() + this->size()); @@ -339,7 +339,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * last character in the %string. */ const_iterator - end() const + end() const _GLIBCXX_NOEXCEPT { return const_iterator(this->_M_data() + this->size()); } /** @@ -348,7 +348,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * order. Unshares the string. */ reverse_iterator - rbegin() + rbegin() _GLIBCXX_NOEXCEPT { return reverse_iterator(this->end()); } /** @@ -357,7 +357,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * reverse element order. */ const_reverse_iterator - rbegin() const + rbegin() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(this->end()); } /** @@ -366,7 +366,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * element order. Unshares the string. */ reverse_iterator - rend() + rend() _GLIBCXX_NOEXCEPT { return reverse_iterator(this->begin()); } /** @@ -375,7 +375,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * is done in reverse element order. */ const_reverse_iterator - rend() const + rend() const _GLIBCXX_NOEXCEPT { return const_reverse_iterator(this->begin()); } #ifdef __GXX_EXPERIMENTAL_CXX0X__ @@ -384,7 +384,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * character in the %string. */ const_iterator - cbegin() const + cbegin() const noexcept { return const_iterator(this->_M_data()); } /** @@ -392,7 +392,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * last character in the %string. */ const_iterator - cend() const + cend() const noexcept { return const_iterator(this->_M_data() + this->size()); } /** @@ -401,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * reverse element order. */ const_reverse_iterator - crbegin() const + crbegin() const noexcept { return const_reverse_iterator(this->end()); } /** @@ -410,7 +410,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * is done in reverse element order. */ const_reverse_iterator - crend() const + crend() const noexcept { return const_reverse_iterator(this->begin()); } #endif @@ -419,18 +419,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Returns the number of characters in the string, not including any /// null-termination. size_type - size() const + size() const _GLIBCXX_NOEXCEPT { return this->_M_length(); } /// Returns the number of characters in the string, not including any /// null-termination. size_type - length() const + length() const _GLIBCXX_NOEXCEPT { return this->_M_length(); } /// Returns the size() of the largest possible %string. size_type - max_size() const + max_size() const _GLIBCXX_NOEXCEPT { return this->_M_max_size(); } /** @@ -477,7 +477,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * hold before needing to allocate more memory. */ size_type - capacity() const + capacity() const _GLIBCXX_NOEXCEPT { return this->_M_capacity(); } /** @@ -505,7 +505,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Erases the string, making it empty. */ void - clear() + clear() _GLIBCXX_NOEXCEPT { this->_M_clear(); } /** @@ -513,7 +513,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * <code>*this == ""</code>. */ bool - empty() const + empty() const _GLIBCXX_NOEXCEPT { return this->size() == 0; } // Element access: @@ -1484,7 +1484,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * happen. */ const _CharT* - c_str() const + c_str() const _GLIBCXX_NOEXCEPT { return this->_M_data(); } /** @@ -1494,14 +1494,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * happen. */ const _CharT* - data() const + data() const _GLIBCXX_NOEXCEPT { return this->_M_data(); } /** * @brief Return copy of allocator used to construct this string. */ allocator_type - get_allocator() const + get_allocator() const _GLIBCXX_NOEXCEPT { return allocator_type(this->_M_get_allocator()); } /** @@ -1531,6 +1531,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type find(const __versa_string& __str, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { return this->find(__str.data(), __pos, __str.size()); } /** @@ -1561,7 +1562,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * found. If not found, returns npos. */ size_type - find(_CharT __c, size_type __pos = 0) const; + find(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a string. @@ -1575,6 +1576,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type rfind(const __versa_string& __str, size_type __pos = npos) const + _GLIBCXX_NOEXCEPT { return this->rfind(__str.data(), __pos, __str.size()); } /** @@ -1620,7 +1622,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * found. If not found, returns npos. */ size_type - rfind(_CharT __c, size_type __pos = npos) const; + rfind(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT; /** * @brief Find position of a character of string. @@ -1634,6 +1636,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type find_first_of(const __versa_string& __str, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { return this->find_first_of(__str.data(), __pos, __str.size()); } /** @@ -1681,7 +1684,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Note: equivalent to find(c, pos). */ size_type - find_first_of(_CharT __c, size_type __pos = 0) const + find_first_of(_CharT __c, size_type __pos = 0) const _GLIBCXX_NOEXCEPT { return this->find(__c, __pos); } /** @@ -1697,6 +1700,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type find_last_of(const __versa_string& __str, size_type __pos = npos) const + _GLIBCXX_NOEXCEPT { return this->find_last_of(__str.data(), __pos, __str.size()); } /** @@ -1744,7 +1748,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * Note: equivalent to rfind(c, pos). */ size_type - find_last_of(_CharT __c, size_type __pos = npos) const + find_last_of(_CharT __c, size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->rfind(__c, __pos); } /** @@ -1759,6 +1763,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type find_first_not_of(const __versa_string& __str, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT { return this->find_first_not_of(__str.data(), __pos, __str.size()); } /** @@ -1805,7 +1810,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * index where it was found. If not found, returns npos. */ size_type - find_first_not_of(_CharT __c, size_type __pos = 0) const; + find_first_not_of(_CharT __c, size_type __pos = 0) const + _GLIBCXX_NOEXCEPT; /** * @brief Find last position of a character not in string. @@ -1820,7 +1826,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION */ size_type find_last_not_of(const __versa_string& __str, - size_type __pos = npos) const + size_type __pos = npos) const _GLIBCXX_NOEXCEPT { return this->find_last_not_of(__str.data(), __pos, __str.size()); } /** @@ -1867,7 +1873,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION * index where it was found. If not found, returns npos. */ size_type - find_last_not_of(_CharT __c, size_type __pos = npos) const; + find_last_not_of(_CharT __c, size_type __pos = npos) const + _GLIBCXX_NOEXCEPT; /** * @brief Get a substring. diff --git a/libstdc++-v3/include/ext/vstring.tcc b/libstdc++-v3/include/ext/vstring.tcc index 588985bbe92..2e059e0764d 100644 --- a/libstdc++-v3/include/ext/vstring.tcc +++ b/libstdc++-v3/include/ext/vstring.tcc @@ -291,7 +291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template <typename, typename, typename> class _Base> typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type __versa_string<_CharT, _Traits, _Alloc, _Base>:: - find(_CharT __c, size_type __pos) const + find(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { size_type __ret = npos; const size_type __size = this->size(); @@ -332,7 +332,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template <typename, typename, typename> class _Base> typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type __versa_string<_CharT, _Traits, _Alloc, _Base>:: - rfind(_CharT __c, size_type __pos) const + rfind(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { size_type __size = this->size(); if (__size) @@ -402,7 +402,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template <typename, typename, typename> class _Base> typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type __versa_string<_CharT, _Traits, _Alloc, _Base>:: - find_first_not_of(_CharT __c, size_type __pos) const + find_first_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { for (; __pos < this->size(); ++__pos) if (!traits_type::eq(this->_M_data()[__pos], __c)) @@ -436,7 +436,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template <typename, typename, typename> class _Base> typename __versa_string<_CharT, _Traits, _Alloc, _Base>::size_type __versa_string<_CharT, _Traits, _Alloc, _Base>:: - find_last_not_of(_CharT __c, size_type __pos) const + find_last_not_of(_CharT __c, size_type __pos) const _GLIBCXX_NOEXCEPT { size_type __size = this->size(); if (__size) diff --git a/libstdc++-v3/include/profile/deque b/libstdc++-v3/include/profile/deque index 564c2dd0fce..48a18c984d9 100644 --- a/libstdc++-v3/include/profile/deque +++ b/libstdc++-v3/include/profile/deque @@ -101,7 +101,7 @@ namespace __profile : _Base(__l, __a) { } #endif - ~deque() { } + ~deque() _GLIBCXX_NOEXCEPT { } deque& operator=(const deque& __x) diff --git a/libstdc++-v3/include/profile/forward_list b/libstdc++-v3/include/profile/forward_list index 75b59f354a2..618b2480caa 100644 --- a/libstdc++-v3/include/profile/forward_list +++ b/libstdc++-v3/include/profile/forward_list @@ -83,7 +83,7 @@ namespace __profile : _Base(__list) { } - forward_list(forward_list&& __list) + forward_list(forward_list&& __list) noexcept : _Base(std::move(__list)) { } forward_list(std::initializer_list<_Tp> __il, @@ -91,7 +91,7 @@ namespace __profile : _Base(__il, __al) { } - ~forward_list() + ~forward_list() noexcept { } forward_list& diff --git a/libstdc++-v3/include/profile/list b/libstdc++-v3/include/profile/list index 589f8f5362b..33b1ae64d87 100644 --- a/libstdc++-v3/include/profile/list +++ b/libstdc++-v3/include/profile/list @@ -67,7 +67,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> > explicit list(const _Allocator& __a = _Allocator()) : _Base(__a) - { + { __profcxx_list_construct(this); // list2slist __profcxx_list_construct2(this); // list2vector } @@ -76,7 +76,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> > explicit list(size_type __n) : _Base(__n) - { + { __profcxx_list_construct(this); __profcxx_list_construct2(this); } @@ -84,7 +84,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> > list(size_type __n, const _Tp& __value, const _Allocator& __a = _Allocator()) : _Base(__n, __value, __a) - { + { __profcxx_list_construct(this); __profcxx_list_construct2(this); } @@ -93,7 +93,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> > list(size_type __n, const _Tp& __value = _Tp(), const _Allocator& __a = _Allocator()) : _Base(__n, __value, __a) - { + { __profcxx_list_construct(this); __profcxx_list_construct2(this); } @@ -103,29 +103,29 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> > list(_InputIterator __first, _InputIterator __last, const _Allocator& __a = _Allocator()) : _Base(__first, __last, __a) - { + { __profcxx_list_construct(this); __profcxx_list_construct2(this); } list(const list& __x) : _Base(__x) - { + { __profcxx_list_construct(this); __profcxx_list_construct2(this); } list(const _Base& __x) : _Base(__x) - { + { __profcxx_list_construct(this); __profcxx_list_construct2(this); } #ifdef __GXX_EXPERIMENTAL_CXX0X__ - list(list&& __x) + list(list&& __x) noexcept : _Base(std::move(__x)) - { + { __profcxx_list_construct(this); __profcxx_list_construct2(this); } @@ -135,7 +135,7 @@ template<typename _Tp, typename _Allocator = std::allocator<_Tp> > : _Base(__l, __a) { } #endif - ~list() + ~list() _GLIBCXX_NOEXCEPT { __profcxx_list_destruct(this); __profcxx_list_destruct2(this); diff --git a/libstdc++-v3/include/profile/map.h b/libstdc++-v3/include/profile/map.h index 30f5f3aa679..622bc575ad2 100644 --- a/libstdc++-v3/include/profile/map.h +++ b/libstdc++-v3/include/profile/map.h @@ -92,6 +92,7 @@ namespace __profile #ifdef __GXX_EXPERIMENTAL_CXX0X__ map(map&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _Base(std::move(__x)) { } @@ -101,7 +102,7 @@ namespace __profile : _Base(__l, __c, __a) { } #endif - ~map() + ~map() _GLIBCXX_NOEXCEPT { __profcxx_map_to_unordered_map_destruct(this); } map& diff --git a/libstdc++-v3/include/profile/multimap.h b/libstdc++-v3/include/profile/multimap.h index 5f1aba82e34..547a221b330 100644 --- a/libstdc++-v3/include/profile/multimap.h +++ b/libstdc++-v3/include/profile/multimap.h @@ -82,6 +82,7 @@ namespace __profile #ifdef __GXX_EXPERIMENTAL_CXX0X__ multimap(multimap&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _Base(std::move(__x)) { } @@ -91,7 +92,7 @@ namespace __profile : _Base(__l, __c, __a) { } #endif - ~multimap() { } + ~multimap() _GLIBCXX_NOEXCEPT { } multimap& operator=(const multimap& __x) diff --git a/libstdc++-v3/include/profile/multiset.h b/libstdc++-v3/include/profile/multiset.h index d1406235845..a5779383a56 100644 --- a/libstdc++-v3/include/profile/multiset.h +++ b/libstdc++-v3/include/profile/multiset.h @@ -82,6 +82,7 @@ namespace __profile #ifdef __GXX_EXPERIMENTAL_CXX0X__ multiset(multiset&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _Base(std::move(__x)) { } @@ -91,7 +92,7 @@ namespace __profile : _Base(__l, __comp, __a) { } #endif - ~multiset() { } + ~multiset() _GLIBCXX_NOEXCEPT { } multiset& operator=(const multiset& __x) diff --git a/libstdc++-v3/include/profile/set.h b/libstdc++-v3/include/profile/set.h index 8533a48c90d..47261e9160f 100644 --- a/libstdc++-v3/include/profile/set.h +++ b/libstdc++-v3/include/profile/set.h @@ -82,6 +82,7 @@ namespace __profile #ifdef __GXX_EXPERIMENTAL_CXX0X__ set(set&& __x) + noexcept(is_nothrow_copy_constructible<_Compare>::value) : _Base(std::move(__x)) { } @@ -91,7 +92,7 @@ namespace __profile : _Base(__l, __comp, __a) { } #endif - ~set() { } + ~set() _GLIBCXX_NOEXCEPT { } set& operator=(const set& __x) diff --git a/libstdc++-v3/include/profile/unordered_map b/libstdc++-v3/include/profile/unordered_map index 058bbd35132..5bbb7aea6d8 100644 --- a/libstdc++-v3/include/profile/unordered_map +++ b/libstdc++-v3/include/profile/unordered_map @@ -104,6 +104,8 @@ namespace __profile } unordered_map(unordered_map&& __x) + noexcept(__and_<is_nothrow_copy_constructible<_Hash>, + is_nothrow_copy_constructible<_Pred>>::value) : _Base(std::move(__x)) { __profcxx_hashtable_construct(this, _Base::bucket_count()); @@ -142,7 +144,7 @@ namespace __profile return *this; } - ~unordered_map() + ~unordered_map() noexcept { __profcxx_hashtable_destruct(this, _Base::bucket_count(), _Base::size()); @@ -372,6 +374,8 @@ namespace __profile } unordered_multimap(unordered_multimap&& __x) + noexcept(__and_<is_nothrow_copy_constructible<_Hash>, + is_nothrow_copy_constructible<_Pred>>::value) : _Base(std::move(__x)) { __profcxx_hashtable_construct(this, _Base::bucket_count()); @@ -409,7 +413,7 @@ namespace __profile return *this; } - ~unordered_multimap() + ~unordered_multimap() noexcept { __profcxx_hashtable_destruct(this, _Base::bucket_count(), _Base::size()); diff --git a/libstdc++-v3/include/profile/unordered_set b/libstdc++-v3/include/profile/unordered_set index 92c54c10f2a..51b42db9633 100644 --- a/libstdc++-v3/include/profile/unordered_set +++ b/libstdc++-v3/include/profile/unordered_set @@ -103,6 +103,8 @@ namespace __profile } unordered_set(unordered_set&& __x) + noexcept(__and_<is_nothrow_copy_constructible<_Hash>, + is_nothrow_copy_constructible<_Pred>>::value) : _Base(std::move(__x)) { __profcxx_hashtable_construct(this, _Base::bucket_count()); @@ -141,7 +143,7 @@ namespace __profile return *this; } - ~unordered_set() + ~unordered_set() noexcept { __profcxx_hashtable_destruct(this, _Base::bucket_count(), _Base::size()); @@ -346,6 +348,8 @@ namespace __profile } unordered_multiset(unordered_multiset&& __x) + noexcept(__and_<is_nothrow_copy_constructible<_Hash>, + is_nothrow_copy_constructible<_Pred>>::value) : _Base(std::move(__x)) { __profcxx_hashtable_construct(this, _Base::bucket_count()); @@ -383,7 +387,7 @@ namespace __profile return *this; } - ~unordered_multiset() + ~unordered_multiset() noexcept { __profcxx_hashtable_destruct(this, _Base::bucket_count(), _Base::size()); diff --git a/libstdc++-v3/include/profile/vector b/libstdc++-v3/include/profile/vector index 83a4a3b4c4a..7a33e88be01 100644 --- a/libstdc++-v3/include/profile/vector +++ b/libstdc++-v3/include/profile/vector @@ -79,7 +79,7 @@ namespace __profile explicit vector(const _Allocator& __a = _Allocator()) : _Base(__a) - { + { __profcxx_vector_construct(this, this->capacity()); __profcxx_vector_construct2(this); } @@ -87,8 +87,8 @@ namespace __profile #ifdef __GXX_EXPERIMENTAL_CXX0X__ explicit vector(size_type __n) - : _Base(__n) - { + : _Base(__n) + { __profcxx_vector_construct(this, this->capacity()); __profcxx_vector_construct2(this); } @@ -96,7 +96,7 @@ namespace __profile vector(size_type __n, const _Tp& __value, const _Allocator& __a = _Allocator()) : _Base(__n, __value, __a) - { + { __profcxx_vector_construct(this, this->capacity()); __profcxx_vector_construct2(this); } @@ -104,8 +104,8 @@ namespace __profile explicit vector(size_type __n, const _Tp& __value = _Tp(), const _Allocator& __a = _Allocator()) - : _Base(__n, __value, __a) - { + : _Base(__n, __value, __a) + { __profcxx_vector_construct(this, this->capacity()); __profcxx_vector_construct2(this); } @@ -115,14 +115,14 @@ namespace __profile vector(_InputIterator __first, _InputIterator __last, const _Allocator& __a = _Allocator()) : _Base(__first, __last, __a) - { - __profcxx_vector_construct(this, this->capacity()); - __profcxx_vector_construct2(this); - } + { + __profcxx_vector_construct(this, this->capacity()); + __profcxx_vector_construct2(this); + } vector(const vector& __x) : _Base(__x) - { + { __profcxx_vector_construct(this, this->capacity()); __profcxx_vector_construct2(this); } @@ -136,7 +136,7 @@ namespace __profile } #ifdef __GXX_EXPERIMENTAL_CXX0X__ - vector(vector&& __x) + vector(vector&& __x) noexcept : _Base(std::move(__x)) { __profcxx_vector_construct(this, this->capacity()); @@ -148,7 +148,7 @@ namespace __profile : _Base(__l, __a) { } #endif - ~vector() + ~vector() _GLIBCXX_NOEXCEPT { __profcxx_vector_destruct(this, this->capacity(), this->size()); __profcxx_vector_destruct2(this); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/noexcept_move_construct.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/noexcept_move_construct.cc new file mode 100644 index 00000000000..9d3d871ba36 --- /dev/null +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <string> + +typedef std::string stype; + +static_assert(std::is_nothrow_move_constructible<stype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/noexcept_move_construct.cc b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/noexcept_move_construct.cc new file mode 100644 index 00000000000..07cc8ce521f --- /dev/null +++ b/libstdc++-v3/testsuite/21_strings/basic_string/cons/wchar_t/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <string> + +typedef std::wstring wstype; + +static_assert(std::is_nothrow_move_constructible<wstype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc index ecd115e3aaf..1b0ececc05f 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1661 } +// { dg-error "no matching" "" { target *-*-* } 1668 } // { dg-excess-errors "" } #include <deque> diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc index 4de01c82609..ebb9c3be348 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1594 } +// { dg-error "no matching" "" { target *-*-* } 1601 } // { dg-excess-errors "" } #include <deque> diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc index 78eeb8dbc6c..943bc637b1e 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1594 } +// { dg-error "no matching" "" { target *-*-* } 1601 } // { dg-excess-errors "" } #include <deque> diff --git a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc index f29152cb7c8..396122f5a89 100644 --- a/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/deque/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1745 } +// { dg-error "no matching" "" { target *-*-* } 1752 } // { dg-excess-errors "" } #include <deque> diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/forward_list/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..36559b7821f --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/forward_list/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <forward_list> + +typedef std::forward_list<int> fltype; + +static_assert(std::is_nothrow_move_constructible<fltype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc index e87fa60c3fa..35ce47edf35 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/assign_neg.cc @@ -1,6 +1,6 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1206 } +// { dg-error "no matching" "" { target *-*-* } 1210 } // { dg-excess-errors "" } // Copyright (C) 2009, 2010 Free Software Foundation diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc index 5da159c1350..9c89fe793cf 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_1_neg.cc @@ -1,6 +1,6 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1206 } +// { dg-error "no matching" "" { target *-*-* } 1210 } // { dg-excess-errors "" } // Copyright (C) 2009, 2010, 2011 Free Software Foundation diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc index 785fe513642..cb22c379a76 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/constructor_2_neg.cc @@ -1,6 +1,6 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1206 } +// { dg-error "no matching" "" { target *-*-* } 1210 } // { dg-excess-errors "" } // Copyright (C) 2009, 2010, 2011 Free Software Foundation diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc index aabc8b8f715..684b5013a91 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/requirements/dr438/insert_neg.cc @@ -1,6 +1,6 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } -// { dg-error "no matching" "" { target *-*-* } 1206 } +// { dg-error "no matching" "" { target *-*-* } 1210 } // { dg-excess-errors "" } // Copyright (C) 2009, 2010, 2011 Free Software Foundation diff --git a/libstdc++-v3/testsuite/23_containers/list/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/list/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..f54d4a1d37f --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/list/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <list> + +typedef std::list<int> ltype; + +static_assert(std::is_nothrow_move_constructible<ltype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc index 96a14e4dade..54473ee4231 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1491 } +// { dg-error "no matching" "" { target *-*-* } 1497 } // { dg-excess-errors "" } #include <list> diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc index cc10877fab4..5f7b07f51dc 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1447 } +// { dg-error "no matching" "" { target *-*-* } 1453 } // { dg-excess-errors "" } #include <list> diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc index acc64e4afd1..1bf19de6e1a 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1447 } +// { dg-error "no matching" "" { target *-*-* } 1453 } // { dg-excess-errors "" } #include <list> diff --git a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc index 8df0ac528c0..05dd2e732cc 100644 --- a/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/list/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1447 } +// { dg-error "no matching" "" { target *-*-* } 1453 } // { dg-excess-errors "" } #include <list> diff --git a/libstdc++-v3/testsuite/23_containers/map/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/map/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..9ff36ef7eba --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/map/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <map> + +typedef std::map<int, int> mtype; + +static_assert(std::is_nothrow_move_constructible<mtype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/multimap/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/multimap/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..96546f51b54 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multimap/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <map> + +typedef std::multimap<int, int> mmtype; + +static_assert(std::is_nothrow_move_constructible<mmtype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/multiset/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/multiset/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..d200367c261 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/multiset/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <set> + +typedef std::multiset<int> mstype; + +static_assert(std::is_nothrow_move_constructible<mstype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/set/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/set/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..ddee8ec6ed0 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/set/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <set> + +typedef std::set<int> stype; + +static_assert(std::is_nothrow_move_constructible<stype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..cb2116873ed --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <unordered_map> + +typedef std::unordered_map<int, int> umtype; + +static_assert(std::is_nothrow_move_constructible<umtype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..45ccee09db3 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <unordered_map> + +typedef std::unordered_multimap<int, int> ummtype; + +static_assert(std::is_nothrow_move_constructible<ummtype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..4a1ada81bec --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <unordered_set> + +typedef std::unordered_multiset<int> umstype; + +static_assert(std::is_nothrow_move_constructible<umstype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..3e3ec73e09f --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <unordered_set> + +typedef std::unordered_set<int> ustype; + +static_assert(std::is_nothrow_move_constructible<ustype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..3fc70759290 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <vector> + +typedef std::vector<bool> vbtype; + +static_assert(std::is_nothrow_move_constructible<vbtype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/vector/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/23_containers/vector/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..b73a575a2b4 --- /dev/null +++ b/libstdc++-v3/testsuite/23_containers/vector/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <vector> + +typedef std::vector<int> vtype; + +static_assert(std::is_nothrow_move_constructible<vtype>::value, "Error"); diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc index f13dd016383..fcead6a4e9b 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1150 } +// { dg-error "no matching" "" { target *-*-* } 1157 } // { dg-excess-errors "" } #include <vector> diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc index 471d4589bf3..acb195392bd 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_1_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1080 } +// { dg-error "no matching" "" { target *-*-* } 1087 } // { dg-excess-errors "" } #include <vector> diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc index 8d1b72c63ee..dd519da8ff3 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/constructor_2_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1080 } +// { dg-error "no matching" "" { target *-*-* } 1087 } // { dg-excess-errors "" } #include <vector> diff --git a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc index 2f10c55036d..5fb20456240 100644 --- a/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc @@ -18,7 +18,7 @@ // <http://www.gnu.org/licenses/>. // { dg-do compile } -// { dg-error "no matching" "" { target *-*-* } 1191 } +// { dg-error "no matching" "" { target *-*-* } 1198 } // { dg-excess-errors "" } #include <vector> diff --git a/libstdc++-v3/testsuite/ext/vstring/cons/noexcept_move_construct.cc b/libstdc++-v3/testsuite/ext/vstring/cons/noexcept_move_construct.cc new file mode 100644 index 00000000000..3e592d7d1a1 --- /dev/null +++ b/libstdc++-v3/testsuite/ext/vstring/cons/noexcept_move_construct.cc @@ -0,0 +1,27 @@ +// { dg-do compile } +// { dg-options "-std=gnu++0x" } + +// 2011-06-01 Paolo Carlini <paolo.carlini@oracle.com> +// +// Copyright (C) 2011 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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 3, or (at your option) +// any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// <http://www.gnu.org/licenses/>. + +#include <ext/vstring.h> + +typedef __gnu_cxx::__sso_string sstype; + +static_assert(std::is_nothrow_move_constructible<sstype>::value, "Error"); |