diff options
171 files changed, 9603 insertions, 1665 deletions
diff --git a/ChangeLog b/ChangeLog index f87b1eaa125..efbe504afc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-02-06 Kai Tietz <kai.tietz@onevision.com> + + PR lto/47225 + * Makefile.def: Add dependency for install-gcc + on install-lto-plugin. + * Makfile.in: Regenerated + 2011-02-01 Sebastien Bourdeauducq <sebastien@milkymist.org> * MAINTAINERS (CPU Port Maintainers): Add myself. diff --git a/ChangeLog.MELT b/ChangeLog.MELT index 3150ee38bf6..e3444908bbd 100644 --- a/ChangeLog.MELT +++ b/ChangeLog.MELT @@ -1,6 +1,11 @@ 2011-02-02 Basile Starynkevitch <basile@starynkevitch.net> + MELT branch merged as suggest by Andread Schwab + http://gcc.gnu.org/ml/gcc/2011-02/msg00099.html + +2011-02-02 Basile Starynkevitch <basile@starynkevitch.net> + MELT branch merged with trunk rev 169522 2011-02-01 Basile Starynkevitch <basile@starynkevitch.net> diff --git a/MAINTAINERS b/MAINTAINERS index 8facbf88474..933e283eeeb 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -164,6 +164,7 @@ libiberty Ian Lance Taylor ian@airs.com libffi testsuite Andreas Tobler andreast@gcc.gnu.org libobjc Nicola Pero nicola.pero@meta-innovation.com libobjc Andrew Pinski pinskia@gmail.com +libquadmath Jakub Jelinek jakub@redhat.com loop discovery Michael Hayes m.hayes@elec.canterbury.ac.nz soft-fp Joseph Myers joseph@codesourcery.com scheduler (+ haifa) Jim Wilson wilson@tuliptree.org diff --git a/Makefile.def b/Makefile.def index 50bf767b533..5a7a0d781e1 100644 --- a/Makefile.def +++ b/Makefile.def @@ -352,6 +352,7 @@ dependencies = { module=dvi-gcc; on=all-build-libiberty; }; dependencies = { module=pdf-gcc; on=all-build-libiberty; }; dependencies = { module=html-gcc; on=all-build-libiberty; }; dependencies = { module=install-gcc ; on=install-fixincludes; }; +dependencies = { module=install-gcc ; on=install-lto-plugin; }; dependencies = { module=install-strip-gcc ; on=install-strip-fixincludes; }; dependencies = { module=configure-libcpp; on=configure-libiberty; hard=true; }; diff --git a/Makefile.in b/Makefile.in index 7869690b219..e547e14c2d4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -60498,6 +60498,7 @@ html-stage4-gcc: maybe-all-build-libiberty html-stageprofile-gcc: maybe-all-build-libiberty html-stagefeedback-gcc: maybe-all-build-libiberty install-gcc: maybe-install-fixincludes +install-gcc: maybe-install-lto-plugin install-strip-gcc: maybe-install-strip-fixincludes configure-libcpp: configure-libiberty diff --git a/config/ChangeLog b/config/ChangeLog index 83eab40cc3e..d7e953f1c3b 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -99,8 +99,8 @@ 2010-06-09 Iain Sandoe <iains@gcc.gnu.org> PR bootstrap/43170 - * tls.m4 (GCC_CHECK_TLS): Add volatile qualifier to the test - references. Move the main () test reference ahead of + * tls.m4 (GCC_CHECK_TLS): Add volatile qualifier to the test + references. Move the main () test reference ahead of pthread_create(). Add a comment to explain the requirements of the test. @@ -382,7 +382,7 @@ PR bootstrap/32009 * mh-ppc-darwin (BOOT_CFLAGS): Reenable. - + 2008-01-08 Jakub Jelinek <jakub@redhat.com> * futex.m4: New file. @@ -456,7 +456,7 @@ * acx.m4 (ACX_CHECK_INSTALLED_TARGET_TOOL): Fixup logic for cross builds. - + 2007-06-20 Mike Stump <mrs@apple.com> * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Fix incremental builds. @@ -481,7 +481,7 @@ 2007-04-11 Kai Tietz <kai.tietz@onevision.com> - * stdint.m4: Make template compatible with older cygwin + * stdint.m4: Make template compatible with older cygwin types.h, wrapping each type in a __XXX_t_defined #ifdef. 2007-03-26 H.J. Lu <hongjiu.lu@intel.com> @@ -585,7 +585,8 @@ 2006-07-25 Paolo Bonzini <bonzini@gnu.org> PR build/26188 - * stdint.m4: Test for uintptr_t even on systems with uint64_t or uint32_t. + * stdint.m4: Test for uintptr_t even on systems with uint64_t + or uint32_t. 2006-07-21 Steve Ellcey <sje@cup.hp.com> diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2af2c32edd6..2c861295eb7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,387 @@ +2011-02-06 Joseph Myers <joseph@codesourcery.com> + + * config/sparc/freebsd.h (ASM_SPEC): Define. + * config/sparc/vxworks.h (ASM_SPEC): Define. + +2011-02-06 Joseph Myers <joseph@codesourcery.com> + + * config/sparc/sol2-bi.h (CC1_SPEC): Remove %{sun4:} %{target:}. + +2011-02-06 Steven Bosscher <steven@gcc.gnu.org> + + * doc/invoke.texi: Remove reference to compiler internals from + user documentation. + + * reg-notes.def: Remove REG_VALUE_PROFILE. + * combine.c (distribute_notes): Do not handle REG_VALUE_PROFILE. + +2011-02-05 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/47610 + * varasm.c (default_section_type_flags): If decl is NULL, + and name is .data.rel.ro or .data.rel.ro.local, set SECTION_RELRO bit. + +2011-02-05 Jie Zhang <jie@codesourcery.com> + + PR debug/42631 + * web.c (entry_register): Don't clobber the number of the + first uninitialized reference in used[]. + +2011-02-04 Sebastian Pop <sebastian.pop@amd.com> + + PR tree-optimization/46194 + * tree-data-ref.c (analyze_miv_subscript): Remove comment. + (build_classic_dist_vector_1): Do not represent classic distance + vectors when the access functions are variating in different loops. + +2011-02-04 Joseph Myers <joseph@codesourcery.com> + + * config/mips/iris6.opt: New. + * config.gcc (mips-sgi-irix6.5*): Use mips/iris6.opt. + +2011-02-04 Richard Henderson <rth@redhat.com> + Steve Ellcey <sje@cup.hp.com> + + PR target/46997 + * config/ia64/predicates.md (mux1_brcst_element): New. + * config/ia64/ia64-protos.h (ia64_unpack_assemble): New. + * config/ia64/ia64.c (ia64_unpack_assemble): New. + (ia64_unpack_sign): New. + (ia64_expand_unpack): Rewrite using new routines. + (ia64_expand_widen_sum): Ditto. + (ia64_expand_dot_prod_v8qi): Ditto. + * config/ia64/vect.md (mulv8qi3): Rewrite to use new + routines, add endian check. + (pmpy2_even): Rename from pmpy2_r, add endian check. + (pmpy2_odd): Rename from pmpy2_l, add endian check. + (vec_widen_smult_lo_v4hi): Rewrite using new routines. + (vec_widen_smult_hi_v4hi): Ditto. + (vec_widen_umult_lo_v4hi): Ditto. + (vec_widen_umult_hi_v4hi): Ditto. + (mulv2si3): Change endian checks. + (sdot_prodv4hi): Rewrite with new calls. + (udot_prodv4hi): New. + (vec_pack_ssat_v4hi): Add endian check. + (vec_pack_usat_v4hi): Ditto. + (vec_pack_ssat_v2si): Ditto. + (max1_even): Rename from max1_r, add endian check. + (max1_odd): Rename from max1_l, add endian check. + (*mux1_rev): Format change. + (*mux1_mix): Ditto. + (*mux1_shuf): Ditto. + (*mux1_alt): Ditto. + (*mux1_brcst_v8qi): Use new predicate. + (vec_extract_evenv8qi): Remove endian check. + (vec_extract_oddv8qi): Ditto. + (vec_interleave_lowv4hi): Format change. + (vec_interleave_highv4hi): Ditto. + (mix2_even): Rename from mix2_r, add endian check. + (mix2_odd): Rename from mux2_l, add endian check. + (*mux2): Fix mask setting for TARGET_BIG_ENDIAN. + (vec_extract_evenodd_helper): Format change. + (vec_extract_evenv4hi): Remove endian check. + (vec_extract_oddv4hi): Remove endian check. + (vec_interleave_lowv2si): Format change. + (vec_interleave_highv2si): Format change. + (vec_initv2si): Remove endian check. + (vecinit_v2si): Add endian check. + (reduc_splus_v2sf): Add endian check. + (reduc_smax_v2sf): Ditto. + (reduc_smin_v2sf): Ditto. + (vec_initv2sf): Remove endian check. + (fpack): Add endian check. + (fswap): Add endian check. + (vec_interleave_highv2sf): Add endian check. + (vec_interleave_lowv2sf): Add endian check. + (fmix_lr): Add endian check. + (vec_setv2sf): Format change. + (*vec_extractv2sf_0_be): Use shift to extract operand. + (*vec_extractv2sf_1_be): New. + (vec_pack_trunc_v4hi): Add endian check. + (vec_pack_trunc_v2si): Format change. + +2011-02-04 Jakub Jelinek <jakub@redhat.com> + + PR inline-asm/23200 + * tree-ssa-ter.c (is_replaceable_p): Add TER argument. Don't + do bb, locus and block comparison and disallow loads if it is not set. + (stmt_is_replaceable_p): New function. + (process_replaceable, find_replaceable_in_bb): Adjust is_replaceable_p + callers. + * expr.c (expand_expr_real_1) <case SSA_NAME>: If + get_gimple_for_ssa_name try for EXPAND_INITIALIZER harder to use + SSA_NAME_DEF_STMT. + * tree-flow.h (stmt_is_replaceable_p): New prototype. + +2011-02-04 Joseph Myers <joseph@codesourcery.com> + + * config/rs6000/xilinx.opt: New. + * config.gcc (powerpc-xilinx-eabi*): Use rs6000/xilinx.opt. + +2011-02-04 Joseph Myers <joseph@codesourcery.com> + + * config/mips/mips.opt (EB, EL, noasmopt): New Driver options. + +2011-02-03 Anatoly Sokolov <aesok@post.ru> + + * config/xtensa/xtensa.h (PREFERRED_RELOAD_CLASS, + PREFERRED_OUTPUT_RELOAD_CLASS): Remove. + * config/xtensa/xtensa-protos.h (xtensa_preferred_reload_class, + secondary_reload_info, xtensa_secondary_reload): Remove. + * config/xtensa/xtensa.c (TARGET_PREFERRED_RELOAD_CLASS, + TARGET_PREFERRED_OUTPUT_RELOAD_CLASS): Define. + (xtensa_preferred_reload_class): Make static. Change return and + 'rclass' argument type to reg_class_t. Remove 'isoutput' argument. + Use CONST_DOUBLE_P predicate. + (xtensa_preferred_output_reload_class): New function. + (xtensa_secondary_reload): Make static. + +2011-02-03 Joseph Myers <joseph@codesourcery.com> + + * config/microblaze/microblaze.opt (Zxl-mode-bootstrap, + Zxl-mode-executable, Zxl-mode-novectors, Zxl-mode-xilkernel, + Zxl-mode-xmdstub, mxl-mode-xilkernel): New Driver options. + +2011-02-03 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/31490 + * output.h (SECTION_RELRO): Define. + (SECTION_MACH_DEP): Adjust. + (get_variable_section): New prototype. + * varpool.c (varpool_finalize_named_section_flags): New function. + (varpool_assemble_pending_decls): Call it. + * cgraph.h (varpool_finalize_named_section_flags): New prototype. + * cgraphunit.c (cgraph_output_in_order): Call + varpool_finalize_named_section_flags. + * varasm.c (get_section): Allow section flags conflicts between + relro and read-only sections if the section hasn't been declared yet. + Set SECTION_OVERRIDE after diagnosing section type conflict. + (get_variable_section): No longer static. + (default_section_type_flags): Use SECTION_WRITE | SECTION_RELRO for + readonly sections that need relocations. + (decl_readonly_section_1): New function. + (decl_readonly_section): Use it. + + Revert: + 2010-11-17 Dinar Temirbulatov <dtemirbulatov@gmail.com> + Steve Ellcey <sje@cup.hp.com> + + PR middle-end/31490 + * varasm.c (categorize_decl_for_section): Ignore reloc_rw_mask + if section attribute used. + +2011-02-03 Jakub Jelinek <jakub@redhat.com> + + * config/darwin.h (SECTION_NO_ANCHOR): Remove. + * config/darwin.c (SECTION_NO_ANCHOR): Define. + (darwin_init_sections): Remove assertion. + +2011-02-03 Nick Clifton <nickc@redhat.com> + + * config/rx/predicates.md (rx_zs_comparison_operator): Remove + lt and ge. + * config/rx/rx.md (abssi2_flags): Use CC_ZSmode rather than CC_ZSOmode. + * config/rx/rx.c (rx_print_operand): Use "lt" and "ge" suffixes + instead of "n" and "pz". + (flags_from_code): LT and GE tests need CC_FLAG_O as well as + CC_FLAG_S. + +2011-02-03 Jakub Jelinek <jakub@redhat.com> + + PR target/47312 + * expr.c (expand_expr_real_2) <case FMA_EXPR>: If target doesn't expand + fma, expand FMA_EXPR as fma{,f,l} call. + + PR lto/47274 + * lto-streamer-out.c (write_symbol): When writing kind and visibility, + copy them into a unsigned char variable and pass address of it to + lto_output_data_stream. + + PR target/47564 + * toplev.c (target_reinit): Save and restore *crtl and regno_reg_rtx + around backend_init_target and lang_dependent_init_target calls. + * cgraphunit.c (cgraph_debug_gimple_stmt): New function. + (verify_cgraph_node): Don't call set_cfun here. Use + cgraph_debug_gimple_stmt instead of debug_gimple_stmt. + Set error_found for incorrectly represented calls to thunks. + +2011-02-03 Alexandre Oliva <aoliva@redhat.com> + + PR debug/43092 + PR rtl-optimization/43494 + * rtl.h (for_each_inc_dec_fn): New type. + (for_each_inc_dec): Declare. + * rtlanal.c (struct for_each_inc_dec_ops): New type. + (for_each_inc_dec_find_inc_dec): New fn. + (for_each_inc_dec_find_mem): New fn. + (for_each_inc_dec): New fn. + * dse.c (struct insn_size): Remove. + (replace_inc_dec, replace_inc_dec_mem): Remove. + (emit_inc_dec_insn_before): New fn. + (check_for_inc_dec): Use it, along with for_each_inc_dec. + (canon_address): Pass mem modes to cselib_lookup. + * cselib.h (cselib_lookup): Add memmode argument. Adjust callers. + (cselib_lookup_from_insn): Likewise. + (cselib_subst_to_values): Likewise. + * cselib.c (find_slot_memmode): New var. + (cselib_find_slot): New fn. Use it instead of + htab_find_slot_with_hash everywhere. + (entry_and_rtx_equal_p): Use find_slot_memmode. + (autoinc_split): New fn. + (rtx_equal_for_cselib_p): Rename and implement in terms of... + (rtx_equal_for_cselib_1): ... this. Take memmode, pass it on. + Deal with autoinc. Special-case recursion into MEMs. + (cselib_hash_rtx): Likewise. + (cselib_lookup_mem): Infer pmode from address mode. Distinguish + address and MEM modes. + (cselib_subst_to_values): Add memmode, pass it on. + Deal with autoinc. + (cselib_lookup): Add memmode argument, pass it on. + (cselib_lookup_from_insn): Add memmode. + (cselib_invalidate_rtx): Discard obsolete push_operand handling. + (struct cselib_record_autoinc_data): New. + (cselib_record_autoinc_cb): New fn. + (cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM + mode to cselib_lookup. Reset autoinced REGs here instead of... + (cselib_process_insn): ... here. + * var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode + to cselib_lookup. + (add_uses): Likewise, also to cselib_subst_to_values. + (add_stores): Likewise. + * sched-deps.c (add_insn_mem_dependence): Pass mode to + cselib_subst_to_values. + (sched_analyze_1, sched_analyze_2): Likewise. Adjusted. + * gcse.c (do_local_cprop): Adjusted. + * postreload.c (reload_cse_simplify_set): Adjusted. + (reload_cse_simplify_operands): Adjusted. + * sel-sched-dump (debug_mem_addr_value): Pass mode. + +2011-02-03 Alexandre Oliva <aoliva@redhat.com> + + PR tree-optimization/45122 + * tree-ssa-loop-niter.c (number_of_iterations_exit): Don't make + unsafe assumptions when there's more than one loop exit. + +2011-02-02 Michael Meissner <meissner@linux.vnet.ibm.com> + + PR target/47272 + * doc/extend.texi (PowerPC AltiVec/VSX Built-in Functions): + Document using vector double with the load/store builtins, and + that the load/store builtins always use Altivec instructions. + + * config/rs6000/vector.md (vector_altivec_load_<mode>): New insns + to use altivec memory instructions, even on VSX. + (vector_altivec_store_<mode>): Ditto. + + * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec): New + function. + + * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add + V2DF, V2DI support to load/store overloaded builtins. + + * config/rs6000/rs6000-builtin.def (ALTIVEC_BUILTIN_*): Add + altivec load/store builtins for V2DF/V2DI types. + + * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't + set avoid indexed addresses on power6 if -maltivec. + (altivec_expand_ld_builtin): Add V2DF, V2DI support, use + vector_altivec_load/vector_altivec_store builtins. + (altivec_expand_st_builtin): Ditto. + (altivec_expand_builtin): Add VSX memory builtins. + (rs6000_init_builtins): Add V2DI types to internal types. + (altivec_init_builtins): Add support for V2DF/V2DI altivec + load/store builtins. + (rs6000_address_for_altivec): Insure memory address is appropriate + for Altivec. + + * config/rs6000/vsx.md (vsx_load_<mode>): New expanders for + vec_vsx_ld and vec_vsx_st. + (vsx_store_<mode>): Ditto. + + * config/rs6000/rs6000.h (RS6000_BTI_long_long): New type + variables to hold long long types for VSX vector memory builtins. + (RS6000_BTI_unsigned_long_long): Ditto. + (long_long_integer_type_internal_node): Ditti. + (long_long_unsigned_type_internal_node): Ditti. + + * config/rs6000/altivec.md (UNSPEC_LVX): New UNSPEC. + (altivec_lvx_<mode>): Make altivec_lvx use a mode iterator. + (altivec_stvx_<mode>): Make altivec_stvx use a mode iterator. + + * config/rs6000/altivec.h (vec_vsx_ld): Define VSX memory builtin + short cuts. + (vec_vsx_st): Ditto. + +2011-02-02 Joseph Myers <joseph@codesourcery.com> + + * config/pa/pa-hpux10.opt: New. + * config/hpux11.opt (pthread): New Driver option. + * config/pa/pa-hpux.opt (nolibdld, rdynamic): New Driver options. + * config.gcc (hppa[12]*-*-hpux10*): Use pa/pa-hpux10.opt. + +2011-02-02 Joseph Myers <joseph@codesourcery.com> + + * config/ia64/vms.opt: New. + * config.gcc (ia64-hp-*vms*): Use ia64/vms.opt. + +2011-02-01 Michael Meissner <meissner@linux.vnet.ibm.com> + + PR target/47580 + * config/rs6000/vsx.md (vsx_float<VSi><mode>2): Use + gpc_reg_operand instead of vsx_register_operand to match rs6000.md + generator functions. + (vsx_floatuns<VSi><mode>2): Ditto. + (vsx_fix_trunc<mode><VSi>2): Ditto. + (vsx_fixuns_trunc<mode><VSi>2): Ditto. + +2011-02-02 Joseph Myers <joseph@codesourcery.com> + + * config/i386/djgpp.opt (posix): New Driver option. + +2011-02-02 Gerald Pfeifer <gerald@pfeifer.com> + + * config.gcc (*-*-freebsd[12], *-*-freebsd[12].*, *-*-freebsd*aout*): + Move to the unsupported targets list. + +2011-02-02 Peter Bergner <bergner@vnet.ibm.com> + + PR rtl-optimization/47525 + * df-scan.c: Update copyright years. + (df_get_call_refs): Do not mark global registers as DF_REF_REG_USE + and non-clobber DF_REF_REG_DEF for calls to const and pure functions. + +2011-02-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * config/i386/sysv4.h (TARGET_VERSION): Remove. + (SUBTARGET_RETURN_IN_MEMORY): Remove. + (ASM_OUTPUT_ASCII): Remove. + * config/i386/sol2.h (SUBTARGET_RETURN_IN_MEMORY): Remove #undef. + +2011-02-02 Jeff Law <law@redhat.com> + + PR middle-end/47543 + * reload.c (find_reloads_address): Handle reg+d address where both + components are invalid by reloading the entire address. + +2011-02-02 Sebastian Pop <sebastian.pop@amd.com> + Richard Guenther <rguenther@suse.de> + + PR tree-optimization/40979 + PR bootstrap/47044 + * passes.c (init_optimization_passes): After LIM call copy_prop + and DCE to clean up. + * tree-ssa-loop.c (pass_graphite_transforms): Add TODO_dump_func. + +2011-02-02 Sebastian Pop <sebastian.pop@amd.com> + + PR tree-optimization/47576 + PR tree-optimization/47555 + * doc/invoke.texi (scev-max-expr-complexity): Documented. + * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100. + (PARAM_SCEV_MAX_EXPR_COMPLEXITY): Declared. + * tree-scalar-evolution.c (follow_ssa_edge): Use + PARAM_SCEV_MAX_EXPR_COMPLEXITY. + 2011-02-02 Richard Guenther <rguenther@suse.de> PR tree-optimization/47566 @@ -36,8 +420,7 @@ debug insns. (no_real_insns_p, schedule_block, set_priorities): Drop special treatment of boundary debug insns. - * sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug - insns. + * sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug insns. * sched-ebb.c (schedule_ebbs): Adjust skipping of debug insns. * sched-int.h (DEBUG_INSN_SCHED_P): Remove. (BOUNDARY_DEBUG_INSN_P): Likewise. @@ -217,8 +600,7 @@ debug insns. (no_real_insns_p, schedule_block, set_priorities): Drop special treatment of boundary debug insns. - * sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug - insns. + * sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug insns. * sched-ebb.c (schedule_ebbs): Don't skip debug insns. * sched-int.h (DEBUG_INSN_SCHED_P): Remove. (BOUNDARY_DEBUG_INSN_P): Likewise. @@ -269,7 +651,7 @@ * ginclude/stddef.h: Check for _X86_64_ANSI_H_ and _I386_ANSI_H_ as used by NetBSD. -2011-01-28 Ahmad Sharif <asharif@google.com> +2011-01-28 Ahmad Sharif <asharif@google.com> * value-prof.c (check_counter): Corrected error message. @@ -278,8 +660,7 @@ * config/arm/arm.c (arm_legitimize_reload_address): New. * config/arm/arm.h (ARM_LEGITIMIZE_RELOAD_ADDRESS): Use arm_legitimize_reload_address. - * config/arm/arm-protos.h (arm_legitimize_reload_address): - Declare. + * config/arm/arm-protos.h (arm_legitimize_reload_address): Declare. 2011-01-28 Ian Lance Taylor <iant@google.com> @@ -437,13 +818,14 @@ that don't allow that. * lto-cgraph.c (lto_output_node): Stream local.can_change_signature. (lto_input_node): Likewise. - * ipa-inline.c (compute_inline_parameters): Compute local.can_change_signature. + * ipa-inline.c (compute_inline_parameters): Compute + local.can_change_signature. * ipa-split.c (visit_bb): Never split away APPLY_ARGS. - * tree-sra.c (ipa_sra_preliminary_function_checks): Give up on functions - that can not change signature. + * tree-sra.c (ipa_sra_preliminary_function_checks): Give up on + functions that can not change signature. * i386.c (ix86_function_regparm, ix86_function_sseregparm, - init_cumulative_args): Do not use local calling conventions for functions - that can not change signature. + init_cumulative_args): Do not use local calling conventions + for functions that can not change signature. 2011-01-22 Jan Hubicka <jh@suse.cz> @@ -524,8 +906,7 @@ debug insns. (no_real_insns_p, schedule_block, set_priorities): Drop special treatment of boundary debug insns. - * sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug - insns. + * sched-deps.c (sd_init_insn, sd_finish_insn): Don't mark debug insns. * sched-ebb.c (schedule_ebbs): Don't skip debug insns. * sched-int.h (DEBUG_INSN_SCHED_P): Remove. (BOUNDARY_DEBUG_INSN_P): Likewise. @@ -644,9 +1025,8 @@ (rx_promote_function_mode): Likewise. (gen_safe_add): Place an outsized immediate value inside an UNSPEC in order to make it legitimate. - * config/rx/rx.md (adddi3_internal): If the second operand is a - MEM make sure that the first operand is the same as the result - register. + * config/rx/rx.md (adddi3_internal): If the second operand is a MEM + make sure that the first operand is the same as the result register. (addsi3_unspec): Delete. (subdi3): Do not accept immediate operands. (subdi3_internal): Likewise. @@ -704,8 +1084,7 @@ 2011-01-25 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (build_poly_scop): Move - rewrite_commutative_reductions_out_of_ssa before - find_scop_parameters. + rewrite_commutative_reductions_out_of_ssa before find_scop_parameters. 2011-01-25 Sebastian Pop <sebastian.pop@amd.com> @@ -734,13 +1113,15 @@ 2011-01-25 Sebastian Pop <sebastian.pop@amd.com> - * graphite-dependences.c (build_lexicographical_constraint): Remove the - gdim parameter. - (build_lexicographical_constraint): Adjust call to ppl_powerset_is_empty. + * graphite-dependences.c (build_lexicographical_constraint): Remove + the gdim parameter. + (build_lexicographical_constraint): Adjust call to + ppl_powerset_is_empty. (dependence_polyhedron): Same. (graphite_legal_transform_dr): Same. (graphite_carried_dependence_level_k): Same. - * graphite-ppl.c (ppl_powerset_is_empty): Remove the nb_params parameter. + * graphite-ppl.c (ppl_powerset_is_empty): Remove the nb_params + parameter. * graphite-ppl.h (ppl_powerset_is_empty): Adjust declaration. 2011-01-25 Sebastian Pop <sebastian.pop@amd.com> @@ -978,8 +1359,7 @@ (mov<>): FAIL if a constant operand is not legitimate. (addsi3_unpsec): New pattern. - * config/rx/rx.c (rx_print_operand_address): Handle UNPSEC - CONSTs. + * config/rx/rx.c (rx_print_operand_address): Handle UNSPEC CONSTs. (ok_for_max_constant): New function. (gen_safe_add): New function. (rx_expand_prologue): Use gen_safe_add. @@ -1492,16 +1872,14 @@ 2011-01-18 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> - * config/arm/cortex-a9.md (cortex-a9-neon.md): Actually - include. + * config/arm/cortex-a9.md (cortex-a9-neon.md): Actually include. (cortex_a9_dp): Handle neon types correctly. 2011-01-18 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/47299 * expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Don't use - subtarget. Use normal multiplication if both operands are - constants. + subtarget. Use normal multiplication if both operands are constants. * expmed.c (expand_widening_mult): Don't try to optimize constant multiplication if op0 has VOIDmode. Convert op1 constant to mode before using it. @@ -1748,8 +2126,7 @@ 2011-01-14 Joseph Myers <joseph@codesourcery.com> - * config/rs6000/vxworks.h (CC1_SPEC): Don't handle -fvec or - -fvec-eabi. + * config/rs6000/vxworks.h (CC1_SPEC): Don't handle -fvec or -fvec-eabi. 2011-01-14 Mike Stump <mikestump@comcast.net> @@ -1774,8 +2151,7 @@ 2011-01-14 Joseph Myers <joseph@codesourcery.com> - * config/microblaze/microblaze.h (ASM_SPEC): Remove - %{microblaze1}. + * config/microblaze/microblaze.h (ASM_SPEC): Remove %{microblaze1}. 2011-01-14 Joseph Myers <joseph@codesourcery.com> diff --git a/gcc/ChangeLog-2010 b/gcc/ChangeLog-2010 index 2462691404b..917704a0746 100644 --- a/gcc/ChangeLog-2010 +++ b/gcc/ChangeLog-2010 @@ -84,9 +84,9 @@ 2010-12-30 Nathan Froyd <froydnj@codesourcery.com> - PR target/44606 - * reload1.c (choose_reload_regs): Don't look for equivalences for - output reloads of constant loads. + PR target/44606 + * reload1.c (choose_reload_regs): Don't look for equivalences for + output reloads of constant loads. 2010-12-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 340ac9ee6f8..ca91e12dc74 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20110202 +20110207 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 56d0030cf76..c520f728562 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,17 @@ +2011-02-03 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of + GNAT_FORMAL. + * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to... + * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE + instead of GNAT_FORMAL. Protect the expression against multiple uses. + Do not generate the check directly, instead instantiate the template + check present in the descriptor. + (make_descriptor_field): Move around. + (build_vms_descriptor32): Build a template check in the POINTER field. + (build_vms_descriptor): Remove useless suffixes. + * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call. + 2011-01-26 Eric Botcazou <ebotcazou@adacore.com> PR bootstrap/47467 diff --git a/gcc/ada/gcc-interface/gigi.h b/gcc/ada/gcc-interface/gigi.h index 67a7a472abd..e45cf138337 100644 --- a/gcc/ada/gcc-interface/gigi.h +++ b/gcc/ada/gcc-interface/gigi.h @@ -6,7 +6,7 @@ * * * C Header File * * * - * Copyright (C) 1992-2010, Free Software Foundation, Inc. * + * Copyright (C) 1992-2011, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -861,10 +861,9 @@ extern tree build_allocator (tree type, tree init, tree result_type, Entity_Id gnat_proc, Entity_Id gnat_pool, Node_Id gnat_node, bool); -/* Fill in a VMS descriptor for EXPR and return a constructor for it. - GNAT_FORMAL is how we find the descriptor record. GNAT_ACTUAL is how - we derive the source location on a C_E */ -extern tree fill_vms_descriptor (tree expr, Entity_Id gnat_formal, +/* Fill in a VMS descriptor of GNU_TYPE for GNU_EXPR and return the result. + GNAT_ACTUAL is the actual parameter for which the descriptor is built. */ +extern tree fill_vms_descriptor (tree gnu_type, tree gnu_expr, Node_Id gnat_actual); /* Indicate that we need to take the address of T and that it therefore diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 30dbf7a969a..e438960ee3b 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -3071,9 +3071,9 @@ call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target) = convert (DECL_ARG_TYPE (gnu_formal), integer_zero_node); else gnu_actual = build_unary_op (ADDR_EXPR, NULL_TREE, - fill_vms_descriptor (gnu_actual, - gnat_formal, - gnat_actual)); + fill_vms_descriptor + (TREE_TYPE (TREE_TYPE (gnu_formal)), + gnu_actual, gnat_actual)); } else { diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index 19a17f9394a..eac87e0bbc9 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2010, Free Software Foundation, Inc. * + * Copyright (C) 1992-2011, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -203,7 +203,6 @@ static tree split_plus (tree, tree *); static tree float_type_for_precision (int, enum machine_mode); static tree convert_to_fat_pointer (tree, tree); static tree convert_to_thin_pointer (tree, tree); -static tree make_descriptor_field (const char *,tree, tree, tree, tree); static bool potential_alignment_gap (tree, tree, tree); static void process_attributes (tree, struct attrib *); @@ -2280,6 +2279,22 @@ build_template (tree template_type, tree array_type, tree expr) return gnat_build_constructor (template_type, template_elts); } +/* Helper routine to make a descriptor field. FIELD_LIST is the list of decls + being built; the new decl is chained on to the front of the list. */ + +static tree +make_descriptor_field (const char *name, tree type, tree rec_type, + tree initial, tree field_list) +{ + tree field + = create_field_decl (get_identifier (name), type, rec_type, NULL_TREE, + NULL_TREE, 0, 0); + + DECL_INITIAL (field) = initial; + DECL_CHAIN (field) = field_list; + return field; +} + /* Build a 32-bit VMS descriptor from a Mechanism_Type, which must specify a descriptor type, and the GCC type of an object. Each FIELD_DECL in the type contains in its DECL_INITIAL the expression to use when a constructor @@ -2291,15 +2306,11 @@ tree build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity) { tree record_type = make_node (RECORD_TYPE); - tree pointer32_type; + tree pointer32_type, pointer64_type; tree field_list = NULL_TREE; - int klass; - int dtype = 0; - tree inner_type; - int ndim; - int i; + int klass, ndim, i, dtype = 0; + tree inner_type, tem; tree *idx_arr; - tree tem; /* If TYPE is an unconstrained array, use the underlying array type. */ if (TREE_CODE (type) == UNCONSTRAINED_ARRAY_TYPE) @@ -2439,15 +2450,22 @@ build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity) = make_descriptor_field ("CLASS", gnat_type_for_size (8, 1), record_type, size_int (klass), field_list); - /* Of course this will crash at run time if the address space is not - within the low 32 bits, but there is nothing else we can do. */ pointer32_type = build_pointer_type_for_mode (type, SImode, false); + pointer64_type = build_pointer_type_for_mode (type, DImode, false); + + /* Ensure that only 32-bit pointers are passed in 32-bit descriptors. Note + that we cannot build a template call to the CE routine as it would get a + wrong source location; instead we use a second placeholder for it. */ + tem = build_unary_op (ADDR_EXPR, pointer64_type, + build0 (PLACEHOLDER_EXPR, type)); + tem = build3 (COND_EXPR, pointer32_type, + build_binary_op (GE_EXPR, boolean_type_node, tem, + build_int_cstu (pointer64_type, 0x80000000)), + build0 (PLACEHOLDER_EXPR, void_type_node), + convert (pointer32_type, tem)); field_list - = make_descriptor_field ("POINTER", pointer32_type, record_type, - build_unary_op (ADDR_EXPR, - pointer32_type, - build0 (PLACEHOLDER_EXPR, type)), + = make_descriptor_field ("POINTER", pointer32_type, record_type, tem, field_list); switch (mech) @@ -2488,7 +2506,6 @@ build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity) = make_descriptor_field ("DIGITS", gnat_type_for_size (8, 1), record_type, size_zero_node, field_list); - field_list = make_descriptor_field ("AFLAGS", gnat_type_for_size (8, 1), record_type, @@ -2587,16 +2604,12 @@ build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity) tree build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) { - tree record64_type = make_node (RECORD_TYPE); + tree record_type = make_node (RECORD_TYPE); tree pointer64_type; - tree field_list64 = NULL_TREE; - int klass; - int dtype = 0; - tree inner_type; - int ndim; - int i; + tree field_list = NULL_TREE; + int klass, ndim, i, dtype = 0; + tree inner_type, tem; tree *idx_arr; - tree tem; /* If TYPE is an unconstrained array, use the underlying array type. */ if (TREE_CODE (type) == UNCONSTRAINED_ARRAY_TYPE) @@ -2718,32 +2731,32 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) /* Make the type for a 64-bit descriptor for VMS. The first six fields are the same for all types. */ - field_list64 + field_list = make_descriptor_field ("MBO", gnat_type_for_size (16, 1), - record64_type, size_int (1), field_list64); - field_list64 + record_type, size_int (1), field_list); + field_list = make_descriptor_field ("DTYPE", gnat_type_for_size (8, 1), - record64_type, size_int (dtype), field_list64); - field_list64 + record_type, size_int (dtype), field_list); + field_list = make_descriptor_field ("CLASS", gnat_type_for_size (8, 1), - record64_type, size_int (klass), field_list64); - field_list64 + record_type, size_int (klass), field_list); + field_list = make_descriptor_field ("MBMO", gnat_type_for_size (32, 1), - record64_type, ssize_int (-1), field_list64); - field_list64 + record_type, ssize_int (-1), field_list); + field_list = make_descriptor_field ("LENGTH", gnat_type_for_size (64, 1), - record64_type, + record_type, size_in_bytes (mech == By_Descriptor_A ? inner_type : type), - field_list64); + field_list); pointer64_type = build_pointer_type_for_mode (type, DImode, false); - field_list64 - = make_descriptor_field ("POINTER", pointer64_type, record64_type, + field_list + = make_descriptor_field ("POINTER", pointer64_type, record_type, build_unary_op (ADDR_EXPR, pointer64_type, build0 (PLACEHOLDER_EXPR, type)), - field_list64); + field_list); switch (mech) { @@ -2752,31 +2765,31 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) break; case By_Descriptor_SB: - field_list64 + field_list = make_descriptor_field ("SB_L1", gnat_type_for_size (64, 1), - record64_type, + record_type, (TREE_CODE (type) == ARRAY_TYPE ? TYPE_MIN_VALUE (TYPE_DOMAIN (type)) : size_zero_node), - field_list64); - field_list64 + field_list); + field_list = make_descriptor_field ("SB_U1", gnat_type_for_size (64, 1), - record64_type, + record_type, (TREE_CODE (type) == ARRAY_TYPE ? TYPE_MAX_VALUE (TYPE_DOMAIN (type)) : size_zero_node), - field_list64); + field_list); break; case By_Descriptor_A: case By_Descriptor_NCA: - field_list64 + field_list = make_descriptor_field ("SCALE", gnat_type_for_size (8, 1), - record64_type, size_zero_node, field_list64); + record_type, size_zero_node, field_list); - field_list64 + field_list = make_descriptor_field ("DIGITS", gnat_type_for_size (8, 1), - record64_type, size_zero_node, field_list64); + record_type, size_zero_node, field_list); dtype = (mech == By_Descriptor_NCA ? 0 @@ -2785,22 +2798,22 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) : (TREE_CODE (type) == ARRAY_TYPE && TYPE_CONVENTION_FORTRAN_P (type) ? 224 : 192)); - field_list64 + field_list = make_descriptor_field ("AFLAGS", gnat_type_for_size (8, 1), - record64_type, size_int (dtype), - field_list64); + record_type, size_int (dtype), + field_list); - field_list64 + field_list = make_descriptor_field ("DIMCT", gnat_type_for_size (8, 1), - record64_type, size_int (ndim), field_list64); + record_type, size_int (ndim), field_list); - field_list64 + field_list = make_descriptor_field ("MBZ", gnat_type_for_size (32, 1), - record64_type, size_int (0), field_list64); - field_list64 + record_type, size_int (0), field_list); + field_list = make_descriptor_field ("ARSIZE", gnat_type_for_size (64, 1), - record64_type, size_in_bytes (type), - field_list64); + record_type, size_in_bytes (type), + field_list); /* Now build a pointer to the 0,0,0... element. */ tem = build0 (PLACEHOLDER_EXPR, type); @@ -2810,10 +2823,10 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) convert (TYPE_DOMAIN (inner_type), size_zero_node), NULL_TREE, NULL_TREE); - field_list64 - = make_descriptor_field ("A0", pointer64_type, record64_type, + field_list + = make_descriptor_field ("A0", pointer64_type, record_type, build1 (ADDR_EXPR, pointer64_type, tem), - field_list64); + field_list); /* Next come the addressing coefficients. */ tem = size_one_node; @@ -2830,9 +2843,9 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) fname[0] = (mech == By_Descriptor_NCA ? 'S' : 'M'); fname[1] = '0' + i, fname[2] = 0; - field_list64 + field_list = make_descriptor_field (fname, gnat_type_for_size (64, 1), - record64_type, idx_length, field_list64); + record_type, idx_length, field_list); if (mech == By_Descriptor_NCA) tem = idx_length; @@ -2844,16 +2857,16 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) char fname[3]; fname[0] = 'L', fname[1] = '0' + i, fname[2] = 0; - field_list64 + field_list = make_descriptor_field (fname, gnat_type_for_size (64, 1), - record64_type, - TYPE_MIN_VALUE (idx_arr[i]), field_list64); + record_type, + TYPE_MIN_VALUE (idx_arr[i]), field_list); fname[0] = 'U'; - field_list64 + field_list = make_descriptor_field (fname, gnat_type_for_size (64, 1), - record64_type, - TYPE_MAX_VALUE (idx_arr[i]), field_list64); + record_type, + TYPE_MAX_VALUE (idx_arr[i]), field_list); } break; @@ -2861,26 +2874,41 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) post_error ("unsupported descriptor type for &", gnat_entity); } - TYPE_NAME (record64_type) = create_concat_name (gnat_entity, "DESC64"); - finish_record_type (record64_type, nreverse (field_list64), 0, false); - return record64_type; + TYPE_NAME (record_type) = create_concat_name (gnat_entity, "DESC64"); + finish_record_type (record_type, nreverse (field_list), 0, false); + return record_type; } -/* Utility routine for above code to make a field. FIELD_LIST is the - list of decls being built; the new decl is chained on to the front of - the list. */ +/* Fill in a VMS descriptor of GNU_TYPE for GNU_EXPR and return the result. + GNAT_ACTUAL is the actual parameter for which the descriptor is built. */ -static tree -make_descriptor_field (const char *name, tree type, - tree rec_type, tree initial, tree field_list) +tree +fill_vms_descriptor (tree gnu_type, tree gnu_expr, Node_Id gnat_actual) { - tree field - = create_field_decl (get_identifier (name), type, rec_type, NULL_TREE, - NULL_TREE, 0, 0); + VEC(constructor_elt,gc) *v = NULL; + tree field; - DECL_INITIAL (field) = initial; - DECL_CHAIN (field) = field_list; - return field; + gnu_expr = maybe_unconstrained_array (gnu_expr); + gnu_expr = gnat_protect_expr (gnu_expr); + gnat_mark_addressable (gnu_expr); + + /* We may need to substitute both GNU_EXPR and a CALL_EXPR to the raise CE + routine in case we have a 32-bit descriptor. */ + gnu_expr = build2 (COMPOUND_EXPR, void_type_node, + build_call_raise (CE_Range_Check_Failed, gnat_actual, + N_Raise_Constraint_Error), + gnu_expr); + + for (field = TYPE_FIELDS (gnu_type); field; field = DECL_CHAIN (field)) + { + tree value + = convert (TREE_TYPE (field), + SUBSTITUTE_PLACEHOLDER_IN_EXPR (DECL_INITIAL (field), + gnu_expr)); + CONSTRUCTOR_APPEND_ELT (v, field, value); + } + + return gnat_build_constructor (gnu_type, v); } /* Convert GNU_EXPR, a pointer to a 64bit VMS descriptor, to GNU_TYPE, a diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 905b9aa481e..07d6b5bd0bf 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -6,7 +6,7 @@ * * * C Implementation File * * * - * Copyright (C) 1992-2010, Free Software Foundation, Inc. * + * Copyright (C) 1992-2011, Free Software Foundation, Inc. * * * * GNAT is free software; you can redistribute it and/or modify it under * * terms of the GNU General Public License as published by the Free Soft- * @@ -2216,58 +2216,6 @@ build_allocator (tree type, tree init, tree result_type, Entity_Id gnat_proc, return convert (result_type, result); } -/* Fill in a VMS descriptor for EXPR and return a constructor for it. - GNAT_FORMAL is how we find the descriptor record. GNAT_ACTUAL is - how we derive the source location to raise C_E on an out of range - pointer. */ - -tree -fill_vms_descriptor (tree expr, Entity_Id gnat_formal, Node_Id gnat_actual) -{ - tree parm_decl = get_gnu_tree (gnat_formal); - tree record_type = TREE_TYPE (TREE_TYPE (parm_decl)); - tree field; - const bool do_range_check - = strcmp ("MBO", - IDENTIFIER_POINTER (DECL_NAME (TYPE_FIELDS (record_type)))); - VEC(constructor_elt,gc) *v = NULL; - - expr = maybe_unconstrained_array (expr); - gnat_mark_addressable (expr); - - for (field = TYPE_FIELDS (record_type); field; field = DECL_CHAIN (field)) - { - tree conexpr = convert (TREE_TYPE (field), - SUBSTITUTE_PLACEHOLDER_IN_EXPR - (DECL_INITIAL (field), expr)); - - /* Check to ensure that only 32-bit pointers are passed in - 32-bit descriptors */ - if (do_range_check - && strcmp (IDENTIFIER_POINTER (DECL_NAME (field)), "POINTER") == 0) - { - tree pointer64type - = build_pointer_type_for_mode (void_type_node, DImode, false); - tree addr64expr = build_unary_op (ADDR_EXPR, pointer64type, expr); - tree malloc64low - = build_int_cstu (long_integer_type_node, 0x80000000); - - add_stmt (build3 (COND_EXPR, void_type_node, - build_binary_op (GE_EXPR, boolean_type_node, - convert (long_integer_type_node, - addr64expr), - malloc64low), - build_call_raise (CE_Range_Check_Failed, - gnat_actual, - N_Raise_Constraint_Error), - NULL_TREE)); - } - CONSTRUCTOR_APPEND_ELT (v, field, conexpr); - } - - return gnat_build_constructor (record_type, v); -} - /* Indicate that we need to take the address of T and that it therefore should not be allocated in a register. Returns true if successful. */ diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index d18ba202bce..ec0acab6ee1 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,10 @@ +2011-02-03 Nathan Froyd <froydnj@codesourcery.com> + + PR c++/46890 + * c-common.h (keyword_is_decl_specifier): Declare. + * c-common.c (keyword_is_decl_specifier): Define. + (keyword_is_function_specifier): New function. + 2011-01-26 Jakub Jelinek <jakub@redhat.com> PR c/47473 diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 2156fa8b0d0..3e460195850 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -9653,4 +9653,42 @@ keyword_is_storage_class_specifier (enum rid keyword) } } +/* Return true if KEYWORD names a function-specifier [dcl.fct.spec]. */ + +static bool +keyword_is_function_specifier (enum rid keyword) +{ + switch (keyword) + { + case RID_INLINE: + case RID_VIRTUAL: + case RID_EXPLICIT: + return true; + default: + return false; + } +} + +/* Return true if KEYWORD names a decl-specifier [dcl.spec] or a + declaration-specifier (C99 6.7). */ + +bool +keyword_is_decl_specifier (enum rid keyword) +{ + if (keyword_is_storage_class_specifier (keyword) + || keyword_is_type_qualifier (keyword) + || keyword_is_function_specifier (keyword)) + return true; + + switch (keyword) + { + case RID_TYPEDEF: + case RID_FRIEND: + case RID_CONSTEXPR: + return true; + default: + return false; + } +} + #include "gt-c-family-c-common.h" diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 05456d33abd..406def96e16 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -741,6 +741,7 @@ extern bool float_const_decimal64_p (void); extern bool keyword_begins_type_specifier (enum rid); extern bool keyword_is_storage_class_specifier (enum rid); extern bool keyword_is_type_qualifier (enum rid); +extern bool keyword_is_decl_specifier (enum rid); #define c_sizeof(LOC, T) c_sizeof_or_alignof_type (LOC, T, true, 1) #define c_alignof(LOC, T) c_sizeof_or_alignof_type (LOC, T, false, 1) diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 2df3fa54d9f..de376ac81b9 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -1,5 +1,5 @@ /* Callgraph handling code. - 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 Jan Hubicka @@ -720,6 +720,7 @@ bool cgraph_node_can_be_local_p (struct cgraph_node *); struct varpool_node * varpool_get_node (const_tree decl); void varpool_remove_node (struct varpool_node *node); +void varpool_finalize_named_section_flags (struct varpool_node *node); bool varpool_assemble_pending_decls (void); bool varpool_assemble_decl (struct varpool_node *node); bool varpool_analyze_pending_decls (void); diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 848eba65304..fdff7e39c1f 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -440,13 +440,22 @@ verify_edge_count_and_frequency (struct cgraph_edge *e) return error_found; } +/* Switch to THIS_CFUN if needed and print STMT to stderr. */ +static void +cgraph_debug_gimple_stmt (struct function *this_cfun, gimple stmt) +{ + /* debug_gimple_stmt needs correct cfun */ + if (cfun != this_cfun) + set_cfun (this_cfun); + debug_gimple_stmt (stmt); +} + /* Verify cgraph nodes of given cgraph node. */ DEBUG_FUNCTION void verify_cgraph_node (struct cgraph_node *node) { struct cgraph_edge *e; struct function *this_cfun = DECL_STRUCT_FUNCTION (node->decl); - struct function *saved_cfun = cfun; basic_block this_block; gimple_stmt_iterator gsi; bool error_found = false; @@ -455,8 +464,6 @@ verify_cgraph_node (struct cgraph_node *node) return; timevar_push (TV_CGRAPH_VERIFY); - /* debug_generic_stmt needs correct cfun */ - set_cfun (this_cfun); for (e = node->callees; e; e = e->next_callee) if (e->aux) { @@ -499,7 +506,7 @@ verify_cgraph_node (struct cgraph_node *node) error ("An indirect edge from %s is not marked as indirect or has " "associated indirect_info, the corresponding statement is: ", identifier_to_locale (cgraph_node_name (e->caller))); - debug_gimple_stmt (e->call_stmt); + cgraph_debug_gimple_stmt (this_cfun, e->call_stmt); error_found = true; } } @@ -642,7 +649,7 @@ verify_cgraph_node (struct cgraph_node *node) if (e->aux) { error ("shared call_stmt:"); - debug_gimple_stmt (stmt); + cgraph_debug_gimple_stmt (this_cfun, stmt); error_found = true; } if (!e->indirect_unknown_callee) @@ -676,7 +683,8 @@ verify_cgraph_node (struct cgraph_node *node) { error ("a call to thunk improperly represented " "in the call graph:"); - debug_gimple_stmt (stmt); + cgraph_debug_gimple_stmt (this_cfun, stmt); + error_found = true; } } else if (decl) @@ -685,14 +693,14 @@ verify_cgraph_node (struct cgraph_node *node) "corresponding to a call_stmt with " "a known declaration:"); error_found = true; - debug_gimple_stmt (e->call_stmt); + cgraph_debug_gimple_stmt (this_cfun, e->call_stmt); } e->aux = (void *)1; } else if (decl) { error ("missing callgraph edge for call stmt:"); - debug_gimple_stmt (stmt); + cgraph_debug_gimple_stmt (this_cfun, stmt); error_found = true; } } @@ -710,7 +718,7 @@ verify_cgraph_node (struct cgraph_node *node) error ("edge %s->%s has no corresponding call_stmt", identifier_to_locale (cgraph_node_name (e->caller)), identifier_to_locale (cgraph_node_name (e->callee))); - debug_gimple_stmt (e->call_stmt); + cgraph_debug_gimple_stmt (this_cfun, e->call_stmt); error_found = true; } e->aux = 0; @@ -721,7 +729,7 @@ verify_cgraph_node (struct cgraph_node *node) { error ("an indirect edge from %s has no corresponding call_stmt", identifier_to_locale (cgraph_node_name (e->caller))); - debug_gimple_stmt (e->call_stmt); + cgraph_debug_gimple_stmt (this_cfun, e->call_stmt); error_found = true; } e->aux = 0; @@ -732,7 +740,6 @@ verify_cgraph_node (struct cgraph_node *node) dump_cgraph_node (stderr, node); internal_error ("verify_cgraph_node failed"); } - set_cfun (saved_cfun); timevar_pop (TV_CGRAPH_VERIFY); } @@ -1708,6 +1715,10 @@ cgraph_output_in_order (void) varpool_empty_needed_queue (); for (i = 0; i < max; ++i) + if (nodes[i].kind == ORDER_VAR) + varpool_finalize_named_section_flags (nodes[i].u.v); + + for (i = 0; i < max; ++i) { switch (nodes[i].kind) { diff --git a/gcc/combine.c b/gcc/combine.c index 4fe71f33417..07ff0d4e9d9 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -13148,10 +13148,6 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2, rtx elim_i2, place = i3; break; - case REG_VALUE_PROFILE: - /* Just get rid of this note, as it is unused later anyway. */ - break; - case REG_NON_LOCAL_GOTO: if (JUMP_P (i3)) place = i3; diff --git a/gcc/config.gcc b/gcc/config.gcc index 6ae7cd28642..d79e73420be 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -246,6 +246,8 @@ case ${target} in | pdp11-*-bsd \ | sparc-hal-solaris2* \ | thumb-*-* \ + | *-*-freebsd[12] | *-*-freebsd[12].* \ + | *-*-freebsd*aout* \ | *-*-linux*aout* \ | *-*-linux*coff* \ | *-*-linux*libc1* \ @@ -480,15 +482,6 @@ case ${target} in "" | yes | posix) thread_file='posix' ;; esac ;; -*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*) - # This is the place-holder for the generic a.out configuration - # of FreeBSD. No actual configuration resides here since - # there was only ever a bare-bones ix86 configuration for - # a.out and it exists solely in the machine-specific section. - # This place-holder must exist to avoid dropping into - # the generic ELF configuration of FreeBSD (i.e. it must be - # ordered before that section). - ;; *-*-freebsd*) # This is the generic ELF configuration of FreeBSD. Later # machine-specific sections may refine and add to this @@ -1044,7 +1037,7 @@ hppa[12]*-*-hpux10*) esac tm_file="${tm_file} pa/pa32-regs.h dbxelf.h pa/som.h \ pa/pa-hpux.h pa/pa-hpux10.h" - extra_options="${extra_options} pa/pa-hpux.opt" + extra_options="${extra_options} pa/pa-hpux.opt pa/pa-hpux10.opt" case ${target} in *-*-hpux10.[1-9]*) tm_file="${tm_file} pa/pa-hpux1010.h" @@ -1616,7 +1609,7 @@ ia64-hp-*vms*) fi exeext=.exe install_headers_dir=install-headers-cp - extra_options="${extra_options} vms/vms.opt" + extra_options="${extra_options} vms/vms.opt ia64/vms.opt" ;; iq2000*-*-elf*) tm_file="elfos.h newlib-stdint.h iq2000/iq2000.h" @@ -1817,7 +1810,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" - extra_options="${extra_options} rpath.opt" + 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" # Only IRIX Development Foundation 1.3 for IRIX 6.5 provides stdint.h. @@ -2092,7 +2085,7 @@ powerpc-*-eabialtivec*) ;; powerpc-xilinx-eabi*) tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/singlefp.h rs6000/xfpu.h rs6000/xilinx.h" - extra_options="${extra_options} rs6000/sysv4.opt" + extra_options="${extra_options} rs6000/sysv4.opt rs6000/xilinx.opt" tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm rs6000/t-xilinx" use_gcc_stdint=wrap ;; diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 5c96cfd53cd..cd6a815a483 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1,6 +1,6 @@ /* Functions for generic Darwin as target machine for GNU C compiler. Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 + 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Apple Computer Inc. @@ -160,6 +160,11 @@ output_objc_section_asm_op (const void *directive) output_section_asm_op (directive); } + +/* Private flag applied to disable section-anchors in a particular section. */ +#define SECTION_NO_ANCHOR SECTION_MACH_DEP + + /* Implement TARGET_ASM_INIT_SECTIONS. */ void @@ -177,10 +182,6 @@ darwin_init_sections (void) readonly_data_section = darwin_sections[const_section]; exception_section = darwin_sections[darwin_exception_section]; eh_frame_section = darwin_sections[darwin_eh_frame_section]; - - /* Make sure that there is no conflict between the 'no anchor' section - flag declared in darwin.h and the section flags declared in output.h. */ - gcc_assert (SECTION_NO_ANCHOR > SECTION_MACH_DEP); } int diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h index 74ced9c31ca..778ff1e3023 100644 --- a/gcc/config/darwin.h +++ b/gcc/config/darwin.h @@ -1,6 +1,6 @@ /* Target definitions for Darwin (Mac OS X) systems. Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003, 2004, - 2005, 2006, 2007, 2008, 2009, 2010 + 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Apple Computer Inc. @@ -651,11 +651,6 @@ int darwin_label_is_anonymous_local_objc_name (const char *name); /* The generic version, archs should over-ride where required. */ #define MACHOPIC_NL_SYMBOL_PTR_SECTION ".non_lazy_symbol_pointer" -/* Private flag applied to disable section-anchors in a particular section. - This needs to be kept in sync with the flags used by varasm.c (defined in - output.h). */ -#define SECTION_NO_ANCHOR 0x2000000 - /* Declare the section variables. */ #ifndef USED_FOR_TARGET enum darwin_section_enum { diff --git a/gcc/config/hpux11.opt b/gcc/config/hpux11.opt index 7b572a44196..507d9b890bd 100644 --- a/gcc/config/hpux11.opt +++ b/gcc/config/hpux11.opt @@ -27,4 +27,7 @@ mt Driver RejectNegative +pthread +Driver + ; This comment is to ensure we retain the blank line above. diff --git a/gcc/config/i386/djgpp.opt b/gcc/config/i386/djgpp.opt index 013bdf0bf51..7e4affca944 100644 --- a/gcc/config/i386/djgpp.opt +++ b/gcc/config/i386/djgpp.opt @@ -1,6 +1,6 @@ ; DJGPP-specific options. -; Copyright (C) 2005, 2007 Free Software Foundation, Inc. +; Copyright (C) 2005, 2007, 2011 Free Software Foundation, Inc. ; ; This file is part of GCC. ; @@ -23,3 +23,6 @@ mbnu210 Target Var(TARGET_BNU210) Ignored (obsolete) + +posix +Driver diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h index 411e02dc8d5..baddbb0b929 100644 --- a/gcc/config/i386/sol2.h +++ b/gcc/config/i386/sol2.h @@ -1,6 +1,6 @@ /* Target definitions for GCC for Intel 80386 running Solaris 2 Copyright (C) 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, - 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + 2004, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Fred Fish (fnf@cygnus.com). This file is part of GCC. @@ -137,9 +137,6 @@ along with GCC; see the file COPYING3. If not see /* Register the Solaris-specific #pragma directives. */ #define REGISTER_SUBTARGET_PRAGMAS() solaris_register_pragmas () -/* Undo i386/sysv4.h version. */ -#undef SUBTARGET_RETURN_IN_MEMORY - /* Augment i386/unix.h version to return 8-byte vectors in memory, matching Sun Studio compilers until version 12, the only ones supported on Solaris 8 and 9. */ diff --git a/gcc/config/i386/sysv4.h b/gcc/config/i386/sysv4.h index 63c0cbc85a7..64026e72b66 100644 --- a/gcc/config/i386/sysv4.h +++ b/gcc/config/i386/sysv4.h @@ -1,5 +1,6 @@ /* Target definitions for GCC for Intel 80386 running System V.4 - Copyright (C) 1991, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 1991, 2001, 2002, 2007, 2008, 2011 + Free Software Foundation, Inc. Written by Ron Guilmette (rfg@netcom.com). @@ -19,16 +20,6 @@ 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/>. */ - -#define TARGET_VERSION fprintf (stderr, " (i386 System V Release 4)"); - -/* The svr4 ABI for the i386 says that records and unions are returned - in memory. */ - -#define SUBTARGET_RETURN_IN_MEMORY(TYPE, FNTYPE) \ - (TYPE_MODE (TYPE) == BLKmode \ - || (VECTOR_MODE_P (TYPE_MODE (TYPE)) && int_size_in_bytes (TYPE) == 8)); - /* Output at beginning of assembler file. */ /* The .file command should always begin the output. */ @@ -39,56 +30,6 @@ along with GCC; see the file COPYING3. If not see #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] -/* The routine used to output sequences of byte values. We use a special - version of this for most svr4 targets because doing so makes the - generated assembly code more compact (and thus faster to assemble) - as well as more readable. Note that if we find subparts of the - character sequence which end with NUL (and which are shorter than - STRING_LIMIT) we output those using ASM_OUTPUT_LIMITED_STRING. */ - -#undef ASM_OUTPUT_ASCII -#define ASM_OUTPUT_ASCII(FILE, STR, LENGTH) \ - do \ - { \ - const unsigned char *_ascii_bytes = \ - (const unsigned char *) (STR); \ - const unsigned char *limit = _ascii_bytes + (LENGTH); \ - unsigned bytes_in_chunk = 0; \ - for (; _ascii_bytes < limit; _ascii_bytes++) \ - { \ - const unsigned char *p; \ - if (bytes_in_chunk >= 64) \ - { \ - fputc ('\n', (FILE)); \ - bytes_in_chunk = 0; \ - } \ - for (p = _ascii_bytes; p < limit && *p != '\0'; p++) \ - continue; \ - if (p < limit && (p - _ascii_bytes) <= (long) STRING_LIMIT) \ - { \ - if (bytes_in_chunk > 0) \ - { \ - fputc ('\n', (FILE)); \ - bytes_in_chunk = 0; \ - } \ - ASM_OUTPUT_LIMITED_STRING ((FILE), _ascii_bytes); \ - _ascii_bytes = p; \ - } \ - else \ - { \ - if (bytes_in_chunk == 0) \ - fputs (ASM_BYTE, (FILE)); \ - else \ - fputc (',', (FILE)); \ - fprintf ((FILE), "0x%02x", *_ascii_bytes); \ - bytes_in_chunk += 5; \ - } \ - } \ - if (bytes_in_chunk > 0) \ - fputc ('\n', (FILE)); \ - } \ - while (0) - /* A C statement (sans semicolon) to output to the stdio stream FILE the assembler definition of uninitialized global DECL named NAME whose size is SIZE bytes and alignment is ALIGN bytes. diff --git a/gcc/config/ia64/ia64-protos.h b/gcc/config/ia64/ia64-protos.h index 87e04a23d76..107a7ccb983 100644 --- a/gcc/config/ia64/ia64-protos.h +++ b/gcc/config/ia64/ia64-protos.h @@ -39,9 +39,9 @@ extern bool ia64_expand_movxf_movrf (enum machine_mode, rtx[]); extern void ia64_expand_compare (rtx *, rtx *, rtx *); extern void ia64_expand_vecint_cmov (rtx[]); extern bool ia64_expand_vecint_minmax (enum rtx_code, enum machine_mode, rtx[]); +extern void ia64_unpack_assemble (rtx, rtx, rtx, bool); extern void ia64_expand_unpack (rtx [], bool, bool); extern void ia64_expand_widen_sum (rtx[], bool); -extern void ia64_expand_widen_mul_v4hi (rtx [], bool, bool); extern void ia64_expand_dot_prod_v8qi (rtx[], bool); extern void ia64_expand_call (rtx, rtx, rtx, int); extern void ia64_split_call (rtx, rtx, rtx, rtx, rtx, int, int); diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 1842555502b..1d3f8b18d34 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -1972,12 +1972,13 @@ ia64_expand_vecint_minmax (enum rtx_code code, enum machine_mode mode, return true; } -/* Emit an integral vector unpack operation. */ +/* The vectors LO and HI each contain N halves of a double-wide vector. + Reassemble either the first N/2 or the second N/2 elements. */ void -ia64_expand_unpack (rtx operands[3], bool unsignedp, bool highp) +ia64_unpack_assemble (rtx out, rtx lo, rtx hi, bool highp) { - enum machine_mode mode = GET_MODE (operands[1]); + enum machine_mode mode = GET_MODE (lo); rtx (*gen) (rtx, rtx, rtx); rtx x; @@ -1993,110 +1994,66 @@ ia64_expand_unpack (rtx operands[3], bool unsignedp, bool highp) gcc_unreachable (); } - /* Fill in x with the sign extension of each element in op1. */ - if (unsignedp) - x = CONST0_RTX (mode); - else - { - bool neg; - - x = gen_reg_rtx (mode); - - neg = ia64_expand_vecint_compare (LT, mode, x, operands[1], - CONST0_RTX (mode)); - gcc_assert (!neg); - } - + x = gen_lowpart (mode, out); if (TARGET_BIG_ENDIAN) - emit_insn (gen (gen_lowpart (mode, operands[0]), x, operands[1])); + x = gen (x, hi, lo); else - emit_insn (gen (gen_lowpart (mode, operands[0]), operands[1], x)); + x = gen (x, lo, hi); + emit_insn (x); } -/* Emit an integral vector widening sum operations. */ +/* Return a vector of the sign-extension of VEC. */ -void -ia64_expand_widen_sum (rtx operands[3], bool unsignedp) +static rtx +ia64_unpack_sign (rtx vec, bool unsignedp) { - rtx l, h, x, s; - enum machine_mode wmode, mode; - rtx (*unpack_l) (rtx, rtx, rtx); - rtx (*unpack_h) (rtx, rtx, rtx); - rtx (*plus) (rtx, rtx, rtx); - - wmode = GET_MODE (operands[0]); - mode = GET_MODE (operands[1]); + enum machine_mode mode = GET_MODE (vec); + rtx zero = CONST0_RTX (mode); - switch (mode) - { - case V8QImode: - unpack_l = gen_vec_interleave_lowv8qi; - unpack_h = gen_vec_interleave_highv8qi; - plus = gen_addv4hi3; - break; - case V4HImode: - unpack_l = gen_vec_interleave_lowv4hi; - unpack_h = gen_vec_interleave_highv4hi; - plus = gen_addv2si3; - break; - default: - gcc_unreachable (); - } - - /* Fill in x with the sign extension of each element in op1. */ if (unsignedp) - x = CONST0_RTX (mode); + return zero; else { + rtx sign = gen_reg_rtx (mode); bool neg; - x = gen_reg_rtx (mode); - - neg = ia64_expand_vecint_compare (LT, mode, x, operands[1], - CONST0_RTX (mode)); + neg = ia64_expand_vecint_compare (LT, mode, sign, vec, zero); gcc_assert (!neg); + + return sign; } +} - l = gen_reg_rtx (wmode); - h = gen_reg_rtx (wmode); - s = gen_reg_rtx (wmode); +/* Emit an integral vector unpack operation. */ - if (TARGET_BIG_ENDIAN) - { - emit_insn (unpack_l (gen_lowpart (mode, l), x, operands[1])); - emit_insn (unpack_h (gen_lowpart (mode, h), x, operands[1])); - } - else - { - emit_insn (unpack_l (gen_lowpart (mode, l), operands[1], x)); - emit_insn (unpack_h (gen_lowpart (mode, h), operands[1], x)); - } - emit_insn (plus (s, l, operands[2])); - emit_insn (plus (operands[0], h, s)); +void +ia64_expand_unpack (rtx operands[3], bool unsignedp, bool highp) +{ + rtx sign = ia64_unpack_sign (operands[1], unsignedp); + ia64_unpack_assemble (operands[0], operands[1], sign, highp); } +/* Emit an integral vector widening sum operations. */ + void -ia64_expand_widen_mul_v4hi (rtx operands[3], bool unsignedp, bool highp) +ia64_expand_widen_sum (rtx operands[3], bool unsignedp) { - rtx l = gen_reg_rtx (V4HImode); - rtx h = gen_reg_rtx (V4HImode); - rtx (*mulhigh)(rtx, rtx, rtx, rtx); - rtx (*interl)(rtx, rtx, rtx); + enum machine_mode wmode; + rtx l, h, t, sign; - emit_insn (gen_mulv4hi3 (l, operands[1], operands[2])); + sign = ia64_unpack_sign (operands[1], unsignedp); + + wmode = GET_MODE (operands[0]); + l = gen_reg_rtx (wmode); + h = gen_reg_rtx (wmode); - /* For signed, pmpy2.r would appear to more closely match this operation. - However, the vectorizer is more likely to use the LO and HI patterns - in pairs. At which point, with this formulation, the first two insns - of each can be CSEd. */ - mulhigh = unsignedp ? gen_pmpyshr2_u : gen_pmpyshr2; - emit_insn (mulhigh (h, operands[1], operands[2], GEN_INT (16))); + ia64_unpack_assemble (l, operands[1], sign, false); + ia64_unpack_assemble (h, operands[1], sign, true); - interl = highp ? gen_vec_interleave_highv4hi : gen_vec_interleave_lowv4hi; - if (TARGET_BIG_ENDIAN) - emit_insn (interl (gen_lowpart (V4HImode, operands[0]), h, l)); - else - emit_insn (interl (gen_lowpart (V4HImode, operands[0]), l, h)); + t = expand_binop (wmode, add_optab, l, operands[2], NULL, 0, OPTAB_DIRECT); + t = expand_binop (wmode, add_optab, h, t, operands[0], 0, OPTAB_DIRECT); + if (t != operands[0]) + emit_move_insn (operands[0], t); } /* Emit a signed or unsigned V8QI dot product operation. */ @@ -2104,62 +2061,31 @@ ia64_expand_widen_mul_v4hi (rtx operands[3], bool unsignedp, bool highp) void ia64_expand_dot_prod_v8qi (rtx operands[4], bool unsignedp) { - rtx l1, l2, h1, h2, x1, x2, p1, p2, p3, p4, s1, s2, s3; + rtx op1, op2, sn1, sn2, l1, l2, h1, h2; + rtx p1, p2, p3, p4, s1, s2, s3; - /* Fill in x1 and x2 with the sign extension of each element. */ - if (unsignedp) - x1 = x2 = CONST0_RTX (V8QImode); - else - { - bool neg; - - x1 = gen_reg_rtx (V8QImode); - x2 = gen_reg_rtx (V8QImode); - - neg = ia64_expand_vecint_compare (LT, V8QImode, x1, operands[1], - CONST0_RTX (V8QImode)); - gcc_assert (!neg); - neg = ia64_expand_vecint_compare (LT, V8QImode, x2, operands[2], - CONST0_RTX (V8QImode)); - gcc_assert (!neg); - } + op1 = operands[1]; + op2 = operands[2]; + sn1 = ia64_unpack_sign (op1, unsignedp); + sn2 = ia64_unpack_sign (op2, unsignedp); l1 = gen_reg_rtx (V4HImode); l2 = gen_reg_rtx (V4HImode); h1 = gen_reg_rtx (V4HImode); h2 = gen_reg_rtx (V4HImode); - - if (TARGET_BIG_ENDIAN) - { - emit_insn (gen_vec_interleave_lowv8qi - (gen_lowpart (V8QImode, l1), x1, operands[1])); - emit_insn (gen_vec_interleave_lowv8qi - (gen_lowpart (V8QImode, l2), x2, operands[2])); - emit_insn (gen_vec_interleave_highv8qi - (gen_lowpart (V8QImode, h1), x1, operands[1])); - emit_insn (gen_vec_interleave_highv8qi - (gen_lowpart (V8QImode, h2), x2, operands[2])); - } - else - { - emit_insn (gen_vec_interleave_lowv8qi - (gen_lowpart (V8QImode, l1), operands[1], x1)); - emit_insn (gen_vec_interleave_lowv8qi - (gen_lowpart (V8QImode, l2), operands[2], x2)); - emit_insn (gen_vec_interleave_highv8qi - (gen_lowpart (V8QImode, h1), operands[1], x1)); - emit_insn (gen_vec_interleave_highv8qi - (gen_lowpart (V8QImode, h2), operands[2], x2)); - } + ia64_unpack_assemble (l1, op1, sn1, false); + ia64_unpack_assemble (l2, op2, sn2, false); + ia64_unpack_assemble (h1, op1, sn1, true); + ia64_unpack_assemble (h2, op2, sn2, true); p1 = gen_reg_rtx (V2SImode); p2 = gen_reg_rtx (V2SImode); p3 = gen_reg_rtx (V2SImode); p4 = gen_reg_rtx (V2SImode); - emit_insn (gen_pmpy2_r (p1, l1, l2)); - emit_insn (gen_pmpy2_l (p2, l1, l2)); - emit_insn (gen_pmpy2_r (p3, h1, h2)); - emit_insn (gen_pmpy2_l (p4, h1, h2)); + emit_insn (gen_pmpy2_even (p1, l1, l2)); + emit_insn (gen_pmpy2_even (p2, h1, h2)); + emit_insn (gen_pmpy2_odd (p3, l1, l2)); + emit_insn (gen_pmpy2_odd (p4, h1, h2)); s1 = gen_reg_rtx (V2SImode); s2 = gen_reg_rtx (V2SImode); diff --git a/gcc/config/ia64/predicates.md b/gcc/config/ia64/predicates.md index e06c521a056..6622b2001f4 100644 --- a/gcc/config/ia64/predicates.md +++ b/gcc/config/ia64/predicates.md @@ -624,3 +624,7 @@ return REG_P (op) && REG_POINTER (op); }) +;; True if this is the right-most vector element; for mux1 @brcst. +(define_predicate "mux1_brcst_element" + (and (match_code "const_int") + (match_test "INTVAL (op) == (TARGET_BIG_ENDIAN ? 7 : 0)"))) diff --git a/gcc/config/ia64/vect.md b/gcc/config/ia64/vect.md index 4e5977c05a2..ad367214d9d 100644 --- a/gcc/config/ia64/vect.md +++ b/gcc/config/ia64/vect.md @@ -172,35 +172,14 @@ (match_operand:V8QI 2 "gr_register_operand" "r")))] "" { - rtx r1, l1, r2, l2, rm, lm; - - r1 = gen_reg_rtx (V4HImode); - l1 = gen_reg_rtx (V4HImode); - r2 = gen_reg_rtx (V4HImode); - l2 = gen_reg_rtx (V4HImode); - - /* Zero-extend the QImode elements into two words of HImode elements - by interleaving them with zero bytes. */ - emit_insn (gen_mix1_r (gen_lowpart (V8QImode, r1), - operands[1], CONST0_RTX (V8QImode))); - emit_insn (gen_mix1_r (gen_lowpart (V8QImode, r2), - operands[2], CONST0_RTX (V8QImode))); - emit_insn (gen_mix1_l (gen_lowpart (V8QImode, l1), - operands[1], CONST0_RTX (V8QImode))); - emit_insn (gen_mix1_l (gen_lowpart (V8QImode, l2), - operands[2], CONST0_RTX (V8QImode))); - - /* Multiply. */ - rm = gen_reg_rtx (V4HImode); - lm = gen_reg_rtx (V4HImode); - emit_insn (gen_mulv4hi3 (rm, r1, r2)); - emit_insn (gen_mulv4hi3 (lm, l1, l2)); - - /* Zap the high order bytes of the HImode elements by overwriting those - in one part with the low order bytes of the other. */ - emit_insn (gen_mix1_r (operands[0], - gen_lowpart (V8QImode, rm), - gen_lowpart (V8QImode, lm))); + rtx l = gen_reg_rtx (V4HImode); + rtx h = gen_reg_rtx (V4HImode); + emit_insn (gen_vec_widen_umult_lo_v8qi (l, operands[1], operands[2])); + emit_insn (gen_vec_widen_umult_hi_v8qi (h, operands[1], operands[2])); + if (TARGET_BIG_ENDIAN) + emit_insn (gen_vec_pack_trunc_v4hi (operands[0], h, l)); + else + emit_insn (gen_vec_pack_trunc_v4hi (operands[0], l, h)); DONE; }) @@ -296,7 +275,7 @@ "pmpyshr2.u %0 = %1, %2, %3" [(set_attr "itanium_class" "mmmul")]) -(define_insn "pmpy2_r" +(define_insn "pmpy2_even" [(set (match_operand:V2SI 0 "gr_register_operand" "=r") (mult:V2SI (vec_select:V2SI @@ -308,10 +287,16 @@ (match_operand:V4HI 2 "gr_register_operand" "r")) (parallel [(const_int 0) (const_int 2)]))))] "" - "pmpy2.r %0 = %1, %2" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,pmpy2.l %0 = %1, %2"; + else + return "%,pmpy2.r %0 = %1, %2"; +} [(set_attr "itanium_class" "mmshf")]) -(define_insn "pmpy2_l" +(define_insn "pmpy2_odd" [(set (match_operand:V2SI 0 "gr_register_operand" "=r") (mult:V2SI (vec_select:V2SI @@ -323,7 +308,13 @@ (match_operand:V4HI 2 "gr_register_operand" "r")) (parallel [(const_int 1) (const_int 3)]))))] "" - "pmpy2.l %0 = %1, %2" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,pmpy2.r %0 = %1, %2"; + else + return "%,pmpy2.l %0 = %1, %2"; +} [(set_attr "itanium_class" "mmshf")]) (define_expand "vec_widen_smult_lo_v4hi" @@ -332,7 +323,11 @@ (match_operand:V4HI 2 "gr_register_operand" "")] "" { - ia64_expand_widen_mul_v4hi (operands, false, false); + rtx l = gen_reg_rtx (V4HImode); + rtx h = gen_reg_rtx (V4HImode); + emit_insn (gen_mulv4hi3 (l, operands[1], operands[2])); + emit_insn (gen_pmpyshr2 (h, operands[1], operands[2], GEN_INT (16))); + ia64_unpack_assemble (operands[0], l, h, false); DONE; }) @@ -342,7 +337,11 @@ (match_operand:V4HI 2 "gr_register_operand" "")] "" { - ia64_expand_widen_mul_v4hi (operands, false, true); + rtx l = gen_reg_rtx (V4HImode); + rtx h = gen_reg_rtx (V4HImode); + emit_insn (gen_mulv4hi3 (l, operands[1], operands[2])); + emit_insn (gen_pmpyshr2 (h, operands[1], operands[2], GEN_INT (16))); + ia64_unpack_assemble (operands[0], l, h, true); DONE; }) @@ -352,7 +351,11 @@ (match_operand:V4HI 2 "gr_register_operand" "")] "" { - ia64_expand_widen_mul_v4hi (operands, true, false); + rtx l = gen_reg_rtx (V4HImode); + rtx h = gen_reg_rtx (V4HImode); + emit_insn (gen_mulv4hi3 (l, operands[1], operands[2])); + emit_insn (gen_pmpyshr2_u (h, operands[1], operands[2], GEN_INT (16))); + ia64_unpack_assemble (operands[0], l, h, false); DONE; }) @@ -362,7 +365,11 @@ (match_operand:V4HI 2 "gr_register_operand" "")] "" { - ia64_expand_widen_mul_v4hi (operands, true, true); + rtx l = gen_reg_rtx (V4HImode); + rtx h = gen_reg_rtx (V4HImode); + emit_insn (gen_mulv4hi3 (l, operands[1], operands[2])); + emit_insn (gen_pmpyshr2_u (h, operands[1], operands[2], GEN_INT (16))); + ia64_unpack_assemble (operands[0], l, h, true); DONE; }) @@ -390,12 +397,8 @@ of the full 32-bit product. */ /* T0 = CDBA. */ - if (TARGET_BIG_ENDIAN) - x = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (4, GEN_INT (3), const2_rtx, - const1_rtx, const0_rtx)); - else - x = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (4, const1_rtx, const0_rtx, - GEN_INT (3), const2_rtx)); + x = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (4, const1_rtx, const0_rtx, + GEN_INT (3), const2_rtx)); x = gen_rtx_VEC_SELECT (V4HImode, op1h, x); emit_insn (gen_rtx_SET (VOIDmode, t0, x)); @@ -409,15 +412,28 @@ emit_insn (gen_mulv4hi3 (t3, t0, op2h)); /* T4 = CY.h, CY.l, AW.h, AW.l = CY, AW. */ - emit_insn (gen_mix2_r (gen_lowpart (V4HImode, t4), t1, t2)); + x = gen_lowpart (V4HImode, t4); + if (TARGET_BIG_ENDIAN) + x = gen_mix2_odd (x, t2, t1); + else + x = gen_mix2_even (x, t1, t2); + emit_insn (x); /* T5 = CZ.l, 0, AX.l, 0 = CZ << 16, AX << 16. */ - emit_insn (gen_mix2_l (gen_lowpart (V4HImode, t5), - CONST0_RTX (V4HImode), t3)); + x = gen_lowpart (V4HImode, t5); + if (TARGET_BIG_ENDIAN) + x = gen_mix2_even (x, t3, CONST0_RTX (V4HImode)); + else + x = gen_mix2_odd (x, CONST0_RTX (V4HImode), t3); + emit_insn (x); /* T6 = DY.l, 0, BW.l, 0 = DY << 16, BW << 16. */ - emit_insn (gen_mix2_r (gen_lowpart (V4HImode, t6), - CONST0_RTX (V4HImode), t3)); + x = gen_lowpart (V4HImode, t6); + if (TARGET_BIG_ENDIAN) + x = gen_mix2_odd (x, t3, CONST0_RTX (V4HImode)); + else + x = gen_mix2_even (x, CONST0_RTX (V4HImode), t3); + emit_insn (x); emit_insn (gen_addv2si3 (t7, t4, t5)); emit_insn (gen_addv2si3 (operands[0], t6, t7)); @@ -612,16 +628,36 @@ (match_operand:V2SI 3 "gr_register_operand" "")] "" { - rtx l, r, t; + rtx e, o, t; + + e = gen_reg_rtx (V2SImode); + o = gen_reg_rtx (V2SImode); + t = gen_reg_rtx (V2SImode); + + emit_insn (gen_pmpy2_even (e, operands[1], operands[2])); + emit_insn (gen_pmpy2_odd (o, operands[1], operands[2])); + emit_insn (gen_addv2si3 (t, e, operands[3])); + emit_insn (gen_addv2si3 (operands[0], t, o)); + DONE; +}) + +(define_expand "udot_prodv4hi" + [(match_operand:V2SI 0 "gr_register_operand" "") + (match_operand:V4HI 1 "gr_register_operand" "") + (match_operand:V4HI 2 "gr_register_operand" "") + (match_operand:V2SI 3 "gr_register_operand" "")] + "" +{ + rtx l, h, t; - r = gen_reg_rtx (V2SImode); l = gen_reg_rtx (V2SImode); + h = gen_reg_rtx (V2SImode); t = gen_reg_rtx (V2SImode); - emit_insn (gen_pmpy2_r (r, operands[1], operands[2])); - emit_insn (gen_pmpy2_l (l, operands[1], operands[2])); - emit_insn (gen_addv2si3 (t, r, operands[3])); - emit_insn (gen_addv2si3 (operands[0], t, l)); + emit_insn (gen_vec_widen_umult_lo_v4hi (l, operands[1], operands[2])); + emit_insn (gen_vec_widen_umult_hi_v4hi (h, operands[1], operands[2])); + emit_insn (gen_addv2si3 (t, l, operands[3])); + emit_insn (gen_addv2si3 (operands[0], t, h)); DONE; }) @@ -677,7 +713,13 @@ (ss_truncate:V4QI (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU"))))] "" - "pack2.sss %0 = %r1, %r2" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,pack2.sss %0 = %r2, %r1"; + else + return "%,pack2.sss %0 = %r1, %r2"; +} [(set_attr "itanium_class" "mmshf")]) (define_insn "vec_pack_usat_v4hi" @@ -688,7 +730,13 @@ (us_truncate:V4QI (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU"))))] "" - "pack2.uss %0 = %r1, %r2" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,pack2.uss %0 = %r2, %r1"; + else + return "%,pack2.uss %0 = %r1, %r2"; +} [(set_attr "itanium_class" "mmshf")]) (define_insn "vec_pack_ssat_v2si" @@ -699,7 +747,13 @@ (ss_truncate:V2HI (match_operand:V2SI 2 "gr_reg_or_0_operand" "rU"))))] "" - "pack4.sss %0 = %r1, %r2" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,pack4.sss %0 = %r2, %r1"; + else + return "%,pack4.sss %0 = %r1, %r2"; +} [(set_attr "itanium_class" "mmshf")]) (define_insn "vec_interleave_lowv8qi" @@ -742,54 +796,54 @@ } [(set_attr "itanium_class" "mmshf")]) -(define_insn "mix1_r" +(define_insn "mix1_even" [(set (match_operand:V8QI 0 "gr_register_operand" "=r") (vec_select:V8QI (vec_concat:V16QI (match_operand:V8QI 1 "gr_reg_or_0_operand" "rU") (match_operand:V8QI 2 "gr_reg_or_0_operand" "rU")) - (parallel [(const_int 0) - (const_int 8) - (const_int 2) - (const_int 10) - (const_int 4) - (const_int 12) - (const_int 6) - (const_int 14)])))] - "" - "mix1.r %0 = %r2, %r1" + (parallel [(const_int 0) (const_int 8) + (const_int 2) (const_int 10) + (const_int 4) (const_int 12) + (const_int 6) (const_int 14)])))] + "" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,mix1.l %0 = %r1, %r2"; + else + return "%,mix1.r %0 = %r2, %r1"; +} [(set_attr "itanium_class" "mmshf")]) -(define_insn "mix1_l" +(define_insn "mix1_odd" [(set (match_operand:V8QI 0 "gr_register_operand" "=r") (vec_select:V8QI (vec_concat:V16QI (match_operand:V8QI 1 "gr_reg_or_0_operand" "rU") (match_operand:V8QI 2 "gr_reg_or_0_operand" "rU")) - (parallel [(const_int 1) - (const_int 9) - (const_int 3) - (const_int 11) - (const_int 5) - (const_int 13) - (const_int 7) - (const_int 15)])))] - "" - "mix1.l %0 = %r2, %r1" + (parallel [(const_int 1) (const_int 9) + (const_int 3) (const_int 11) + (const_int 5) (const_int 13) + (const_int 7) (const_int 15)])))] + "" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,mix1.r %0 = %r1, %r2"; + else + return "%,mix1.l %0 = %r2, %r1"; +} [(set_attr "itanium_class" "mmshf")]) (define_insn "*mux1_rev" [(set (match_operand:V8QI 0 "gr_register_operand" "=r") (vec_select:V8QI (match_operand:V8QI 1 "gr_register_operand" "r") - (parallel [(const_int 7) - (const_int 6) - (const_int 5) - (const_int 4) - (const_int 3) - (const_int 2) - (const_int 1) - (const_int 0)])))] + (parallel [(const_int 7) (const_int 6) + (const_int 5) (const_int 4) + (const_int 3) (const_int 2) + (const_int 1) (const_int 0)])))] "" "mux1 %0 = %1, @rev" [(set_attr "itanium_class" "mmshf")]) @@ -798,14 +852,10 @@ [(set (match_operand:V8QI 0 "gr_register_operand" "=r") (vec_select:V8QI (match_operand:V8QI 1 "gr_register_operand" "r") - (parallel [(const_int 0) - (const_int 4) - (const_int 2) - (const_int 6) - (const_int 1) - (const_int 5) - (const_int 3) - (const_int 7)])))] + (parallel [(const_int 0) (const_int 4) + (const_int 2) (const_int 6) + (const_int 1) (const_int 5) + (const_int 3) (const_int 7)])))] "" "mux1 %0 = %1, @mix" [(set_attr "itanium_class" "mmshf")]) @@ -814,14 +864,10 @@ [(set (match_operand:V8QI 0 "gr_register_operand" "=r") (vec_select:V8QI (match_operand:V8QI 1 "gr_register_operand" "r") - (parallel [(const_int 0) - (const_int 4) - (const_int 1) - (const_int 5) - (const_int 2) - (const_int 6) - (const_int 3) - (const_int 7)])))] + (parallel [(const_int 0) (const_int 4) + (const_int 1) (const_int 5) + (const_int 2) (const_int 6) + (const_int 3) (const_int 7)])))] "" "mux1 %0 = %1, @shuf" [(set_attr "itanium_class" "mmshf")]) @@ -830,14 +876,10 @@ [(set (match_operand:V8QI 0 "gr_register_operand" "=r") (vec_select:V8QI (match_operand:V8QI 1 "gr_register_operand" "r") - (parallel [(const_int 0) - (const_int 2) - (const_int 4) - (const_int 6) - (const_int 1) - (const_int 3) - (const_int 5) - (const_int 7)])))] + (parallel [(const_int 0) (const_int 2) + (const_int 4) (const_int 6) + (const_int 1) (const_int 3) + (const_int 5) (const_int 7)])))] "" "mux1 %0 = %1, @alt" [(set_attr "itanium_class" "mmshf")]) @@ -846,14 +888,14 @@ [(set (match_operand:V8QI 0 "gr_register_operand" "=r") (vec_select:V8QI (match_operand:V8QI 1 "gr_register_operand" "r") - (parallel [(const_int 0) - (const_int 0) - (const_int 0) - (const_int 0) - (const_int 0) - (const_int 0) - (const_int 0) - (const_int 0)])))] + (parallel [(match_operand 2 "mux1_brcst_element" "") + (match_dup 2) + (match_dup 2) + (match_dup 2) + (match_dup 2) + (match_dup 2) + (match_dup 2) + (match_dup 2)])))] "" "mux1 %0 = %1, @brcst" [(set_attr "itanium_class" "mmshf")]) @@ -873,10 +915,7 @@ "" { rtx temp = gen_reg_rtx (V8QImode); - if (TARGET_BIG_ENDIAN) - emit_insn (gen_mix1_l (temp, operands[2], operands[1])); - else - emit_insn (gen_mix1_r (temp, operands[1], operands[2])); + emit_insn (gen_mix1_even (temp, operands[1], operands[2])); emit_insn (gen_mux1_alt (operands[0], temp)); DONE; }) @@ -888,10 +927,7 @@ "" { rtx temp = gen_reg_rtx (V8QImode); - if (TARGET_BIG_ENDIAN) - emit_insn (gen_mix1_r (temp, operands[2], operands[1])); - else - emit_insn (gen_mix1_l (temp, operands[1], operands[2])); + emit_insn (gen_mix1_odd (temp, operands[1], operands[2])); emit_insn (gen_mux1_alt (operands[0], temp)); DONE; }) @@ -902,10 +938,8 @@ (vec_concat:V8HI (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU") (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU")) - (parallel [(const_int 0) - (const_int 4) - (const_int 1) - (const_int 5)])))] + (parallel [(const_int 0) (const_int 4) + (const_int 1) (const_int 5)])))] "" { /* Recall that vector elements are numbered in memory order. */ @@ -922,10 +956,8 @@ (vec_concat:V8HI (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU") (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU")) - (parallel [(const_int 2) - (const_int 6) - (const_int 3) - (const_int 7)])))] + (parallel [(const_int 2) (const_int 6) + (const_int 3) (const_int 7)])))] "" { /* Recall that vector elements are numbered in memory order. */ @@ -936,32 +968,40 @@ } [(set_attr "itanium_class" "mmshf")]) -(define_insn "mix2_r" +(define_insn "mix2_even" [(set (match_operand:V4HI 0 "gr_register_operand" "=r") (vec_select:V4HI (vec_concat:V8HI (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU") (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU")) - (parallel [(const_int 0) - (const_int 4) - (const_int 2) - (const_int 6)])))] + (parallel [(const_int 0) (const_int 4) + (const_int 2) (const_int 6)])))] "" - "mix2.r %0 = %r2, %r1" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,mix2.l %0 = %r1, %r2"; + else + return "%,mix2.r %0 = %r2, %r1"; +} [(set_attr "itanium_class" "mmshf")]) -(define_insn "mix2_l" +(define_insn "mix2_odd" [(set (match_operand:V4HI 0 "gr_register_operand" "=r") (vec_select:V4HI (vec_concat:V8HI (match_operand:V4HI 1 "gr_reg_or_0_operand" "rU") (match_operand:V4HI 2 "gr_reg_or_0_operand" "rU")) - (parallel [(const_int 1) - (const_int 5) - (const_int 3) - (const_int 7)])))] + (parallel [(const_int 1) (const_int 5) + (const_int 3) (const_int 7)])))] "" - "mix2.l %0 = %r2, %r1" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,mix2.r %0 = %r1, %r2"; + else + return "%,mix2.l %0 = %r2, %r1"; +} [(set_attr "itanium_class" "mmshf")]) (define_insn "*mux2" @@ -974,17 +1014,17 @@ (match_operand 5 "const_int_2bit_operand" "")])))] "" { - int mask; + int mask = 0; if (TARGET_BIG_ENDIAN) { - mask = INTVAL (operands[2]) << 4; - mask |= INTVAL (operands[3]) << 6; - mask |= INTVAL (operands[4]); - mask |= INTVAL (operands[5]) << 2; + mask |= (3 - INTVAL (operands[2])) << 6; + mask |= (3 - INTVAL (operands[3])) << 4; + mask |= (3 - INTVAL (operands[4])) << 2; + mask |= 3 - INTVAL (operands[5]); } else { - mask = INTVAL (operands[2]); + mask |= INTVAL (operands[2]); mask |= INTVAL (operands[3]) << 2; mask |= INTVAL (operands[4]) << 4; mask |= INTVAL (operands[5]) << 6; @@ -998,10 +1038,8 @@ [(set (match_operand:V4HI 0 "gr_register_operand" "") (vec_select:V4HI (match_operand:V4HI 1 "gr_register_operand" "") - (parallel [(const_int 0) - (const_int 2) - (const_int 1) - (const_int 3)])))] + (parallel [(const_int 0) (const_int 2) + (const_int 1) (const_int 3)])))] "") (define_expand "vec_extract_evenv4hi" @@ -1011,10 +1049,7 @@ "" { rtx temp = gen_reg_rtx (V4HImode); - if (TARGET_BIG_ENDIAN) - emit_insn (gen_mix2_l (temp, operands[1], operands[2])); - else - emit_insn (gen_mix2_r (temp, operands[1], operands[2])); + emit_insn (gen_mix2_even (temp, operands[1], operands[2])); emit_insn (gen_vec_extract_evenodd_helper (operands[0], temp)); DONE; }) @@ -1026,10 +1061,7 @@ "" { rtx temp = gen_reg_rtx (V4HImode); - if (TARGET_BIG_ENDIAN) - emit_insn (gen_mix2_r (temp, operands[1], operands[2])); - else - emit_insn (gen_mix2_l (temp, operands[1], operands[2])); + emit_insn (gen_mix2_odd (temp, operands[1], operands[2])); emit_insn (gen_vec_extract_evenodd_helper (operands[0], temp)); DONE; }) @@ -1042,15 +1074,13 @@ "mux2 %0 = %1, 0" [(set_attr "itanium_class" "mmshf")]) -;; Note that mix4.r performs the exact same operation. (define_insn "vec_interleave_lowv2si" [(set (match_operand:V2SI 0 "gr_register_operand" "=r") (vec_select:V2SI (vec_concat:V4SI (match_operand:V2SI 1 "gr_reg_or_0_operand" "rU") (match_operand:V2SI 2 "gr_reg_or_0_operand" "rU")) - (parallel [(const_int 0) - (const_int 2)])))] + (parallel [(const_int 0) (const_int 2)])))] "" { /* Recall that vector elements are numbered in memory order. */ @@ -1061,15 +1091,13 @@ } [(set_attr "itanium_class" "mmshf")]) -;; Note that mix4.l performs the exact same operation. (define_insn "vec_interleave_highv2si" [(set (match_operand:V2SI 0 "gr_register_operand" "=r") (vec_select:V2SI (vec_concat:V4SI (match_operand:V2SI 1 "gr_reg_or_0_operand" "rU") (match_operand:V2SI 2 "gr_reg_or_0_operand" "rU")) - (parallel [(const_int 1) - (const_int 3)])))] + (parallel [(const_int 1) (const_int 3)])))] "" { /* Recall that vector elements are numbered in memory order. */ @@ -1088,7 +1116,7 @@ { if (TARGET_BIG_ENDIAN) emit_insn (gen_vec_interleave_highv2si (operands[0], operands[1], - operands[2])); + operands[2])); else emit_insn (gen_vec_interleave_lowv2si (operands[0], operands[1], operands[2])); @@ -1103,7 +1131,7 @@ { if (TARGET_BIG_ENDIAN) emit_insn (gen_vec_interleave_lowv2si (operands[0], operands[1], - operands[2])); + operands[2])); else emit_insn (gen_vec_interleave_highv2si (operands[0], operands[1], operands[2])); @@ -1131,10 +1159,7 @@ if (!gr_reg_or_0_operand (op2, SImode)) op2 = force_reg (SImode, op2); - if (TARGET_BIG_ENDIAN) - x = gen_rtx_VEC_CONCAT (V2SImode, op2, op1); - else - x = gen_rtx_VEC_CONCAT (V2SImode, op1, op2); + x = gen_rtx_VEC_CONCAT (V2SImode, op1, op2); emit_insn (gen_rtx_SET (VOIDmode, operands[0], x)); DONE; }) @@ -1145,7 +1170,13 @@ (match_operand:SI 1 "gr_reg_or_0_operand" "rO") (match_operand:SI 2 "gr_reg_or_0_operand" "rO")))] "" - "unpack4.l %0 = %r2, %r1" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,unpack4.l %0 = %r1, %r2"; + else + return "%,unpack4.l %0 = %r2, %r1"; +} [(set_attr "itanium_class" "mmshf")]) ;; Missing operations @@ -1315,7 +1346,10 @@ "" { rtx tmp = gen_reg_rtx (V2SFmode); - emit_insn (gen_fswap (tmp, operands[1], CONST0_RTX (V2SFmode))); + if (TARGET_BIG_ENDIAN) + emit_insn (gen_fswap (tmp, CONST0_RTX (V2SFmode), operands[1])); + else + emit_insn (gen_fswap (tmp, operands[1], CONST0_RTX (V2SFmode))); emit_insn (gen_addv2sf3 (operands[0], operands[1], tmp)); DONE; }) @@ -1326,7 +1360,10 @@ "" { rtx tmp = gen_reg_rtx (V2SFmode); - emit_insn (gen_fswap (tmp, operands[1], CONST0_RTX (V2SFmode))); + if (TARGET_BIG_ENDIAN) + emit_insn (gen_fswap (tmp, CONST0_RTX (V2SFmode), operands[1])); + else + emit_insn (gen_fswap (tmp, operands[1], CONST0_RTX (V2SFmode))); emit_insn (gen_smaxv2sf3 (operands[0], operands[1], tmp)); DONE; }) @@ -1337,7 +1374,10 @@ "" { rtx tmp = gen_reg_rtx (V2SFmode); - emit_insn (gen_fswap (tmp, operands[1], CONST0_RTX (V2SFmode))); + if (TARGET_BIG_ENDIAN) + emit_insn (gen_fswap (tmp, CONST0_RTX (V2SFmode), operands[1])); + else + emit_insn (gen_fswap (tmp, operands[1], CONST0_RTX (V2SFmode))); emit_insn (gen_sminv2sf3 (operands[0], operands[1], tmp)); DONE; }) @@ -1403,10 +1443,7 @@ if (!fr_reg_or_fp01_operand (op2, SFmode)) op2 = force_reg (SFmode, op2); - if (TARGET_BIG_ENDIAN) - emit_insn (gen_fpack (operands[0], op2, op1)); - else - emit_insn (gen_fpack (operands[0], op1, op2)); + emit_insn (gen_fpack (operands[0], op1, op2)); DONE; }) @@ -1416,7 +1453,13 @@ (match_operand:SF 1 "fr_reg_or_fp01_operand" "fG") (match_operand:SF 2 "fr_reg_or_fp01_operand" "fG")))] "" - "fpack %0 = %F2, %F1" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,fpack %0 = %F1, %F2"; + else + return "%,fpack %0 = %F2, %F1"; +} [(set_attr "itanium_class" "fmisc")]) (define_insn "fswap" @@ -1427,7 +1470,13 @@ (match_operand:V2SF 2 "fr_reg_or_0_operand" "fU")) (parallel [(const_int 1) (const_int 2)])))] "" - "fswap %0 = %F1, %F2" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,fswap %0 = %F2, %F1"; + else + return "%,fswap %0 = %F1, %F2"; +} [(set_attr "itanium_class" "fmisc")]) (define_insn "vec_interleave_highv2sf" @@ -1438,7 +1487,13 @@ (match_operand:V2SF 2 "fr_reg_or_0_operand" "fU")) (parallel [(const_int 1) (const_int 3)])))] "" - "fmix.l %0 = %F2, %F1" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,fmix.r %0 = %F1, %F2"; + else + return "%,fmix.l %0 = %F2, %F1"; +} [(set_attr "itanium_class" "fmisc")]) (define_insn "vec_interleave_lowv2sf" @@ -1449,7 +1504,13 @@ (match_operand:V2SF 2 "fr_reg_or_0_operand" "fU")) (parallel [(const_int 0) (const_int 2)])))] "" - "fmix.r %0 = %F2, %F1" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,fmix.l %0 = %F1, %F2"; + else + return "%,fmix.r %0 = %F2, %F1"; +} [(set_attr "itanium_class" "fmisc")]) (define_insn "fmix_lr" @@ -1460,7 +1521,13 @@ (match_operand:V2SF 2 "fr_reg_or_0_operand" "fU")) (parallel [(const_int 0) (const_int 3)])))] "" - "fmix.lr %0 = %F2, %F1" +{ + /* Recall that vector elements are numbered in memory order. */ + if (TARGET_BIG_ENDIAN) + return "%,fmix.lr %0 = %F1, %F2"; + else + return "%,fmix.lr %0 = %F2, %F1"; +} [(set_attr "itanium_class" "fmisc")]) (define_expand "vec_extract_evenv2sf" @@ -1485,23 +1552,24 @@ DONE; }) - (define_expand "vec_setv2sf" [(match_operand:V2SF 0 "fr_register_operand" "") (match_operand:SF 1 "fr_register_operand" "") (match_operand 2 "const_int_operand" "")] "" { + rtx op0 = operands[0]; rtx tmp = gen_reg_rtx (V2SFmode); + emit_insn (gen_fpack (tmp, operands[1], CONST0_RTX (SFmode))); switch (INTVAL (operands[2])) { case 0: - emit_insn (gen_fmix_lr (operands[0], tmp, operands[0])); + emit_insn (gen_fmix_lr (op0, tmp, op0)); break; case 1: - emit_insn (gen_vec_interleave_lowv2sf (operands[0], operands[0], tmp)); + emit_insn (gen_vec_interleave_lowv2sf (op0, op0, tmp)); break; default: gcc_unreachable (); @@ -1528,8 +1596,8 @@ }) (define_insn_and_split "*vec_extractv2sf_0_be" - [(set (match_operand:SF 0 "register_operand" "=r,f") - (unspec:SF [(match_operand:V2SF 1 "register_operand" "rf,r") + [(set (match_operand:SF 0 "register_operand" "=rf,r") + (unspec:SF [(match_operand:V2SF 1 "nonimmediate_operand" "m,r") (const_int 0)] UNSPEC_VECT_EXTR))] "TARGET_BIG_ENDIAN" @@ -1537,31 +1605,44 @@ "reload_completed" [(set (match_dup 0) (match_dup 1))] { - if (REG_P (operands[1]) && FR_REGNO_P (REGNO (operands[1]))) - operands[0] = gen_rtx_REG (V2SFmode, REGNO (operands[0])); + if (MEM_P (operands[1])) + operands[1] = adjust_address (operands[1], SFmode, 0); else - operands[1] = gen_rtx_REG (SFmode, REGNO (operands[1])); + { + emit_insn (gen_lshrdi3 (operands[0], operands[1], GEN_INT (32))); + DONE; + } }) -(define_insn_and_split "*vec_extractv2sf_1" +(define_insn_and_split "*vec_extractv2sf_1_le" [(set (match_operand:SF 0 "register_operand" "=r") (unspec:SF [(match_operand:V2SF 1 "register_operand" "r") (const_int 1)] UNSPEC_VECT_EXTR))] - "" + "!TARGET_BIG_ENDIAN" "#" - "reload_completed" + "&& reload_completed" [(const_int 0)] { operands[0] = gen_rtx_REG (DImode, REGNO (operands[0])); operands[1] = gen_rtx_REG (DImode, REGNO (operands[1])); - if (TARGET_BIG_ENDIAN) - emit_move_insn (operands[0], operands[1]); - else - emit_insn (gen_lshrdi3 (operands[0], operands[1], GEN_INT (32))); + emit_insn (gen_lshrdi3 (operands[0], operands[1], GEN_INT (32))); DONE; }) +(define_insn_and_split "*vec_extractv2sf_1_be" + [(set (match_operand:SF 0 "register_operand" "=rf") + (unspec:SF [(match_operand:V2SF 1 "register_operand" "r") + (const_int 1)] + UNSPEC_VECT_EXTR))] + "TARGET_BIG_ENDIAN" + "#" + "&& reload_completed" + [(set (match_dup 0) (match_dup 1))] +{ + operands[1] = gen_rtx_REG (SFmode, REGNO (operands[1])); +}) + (define_expand "vec_extractv2sf" [(set (match_operand:SF 0 "register_operand" "") (unspec:SF [(match_operand:V2SF 1 "register_operand" "") @@ -1610,11 +1691,14 @@ [(match_operand:V8QI 0 "gr_register_operand" "") (match_operand:V4HI 1 "gr_register_operand" "") (match_operand:V4HI 2 "gr_register_operand" "")] - "!TARGET_BIG_ENDIAN" + "" { - rtx op1 = gen_lowpart(V8QImode, operands[1]); - rtx op2 = gen_lowpart(V8QImode, operands[2]); - emit_insn (gen_vec_extract_evenv8qi (operands[0], op1, op2)); + rtx op1 = gen_lowpart (V8QImode, operands[1]); + rtx op2 = gen_lowpart (V8QImode, operands[2]); + if (TARGET_BIG_ENDIAN) + emit_insn (gen_vec_extract_oddv8qi (operands[0], op1, op2)); + else + emit_insn (gen_vec_extract_evenv8qi (operands[0], op1, op2)); DONE; }) @@ -1624,8 +1708,8 @@ (match_operand:V2SI 2 "gr_register_operand" "")] "" { - rtx op1 = gen_lowpart(V4HImode, operands[1]); - rtx op2 = gen_lowpart(V4HImode, operands[2]); + rtx op1 = gen_lowpart (V4HImode, operands[1]); + rtx op2 = gen_lowpart (V4HImode, operands[2]); if (TARGET_BIG_ENDIAN) emit_insn (gen_vec_extract_oddv4hi (operands[0], op1, op2)); else diff --git a/gcc/config/microblaze/microblaze.opt b/gcc/config/microblaze/microblaze.opt index 57380999626..488bd9c2bec 100644 --- a/gcc/config/microblaze/microblaze.opt +++ b/gcc/config/microblaze/microblaze.opt @@ -1,6 +1,6 @@ ; Options for the MicroBlaze port of the compiler ; -; Copyright 2009, 2010 Free Software Foundation, Inc. +; Copyright 2009, 2010, 2011 Free Software Foundation, Inc. ; ; Contributed by Michael Eager <eager@eagercon.com>. ; @@ -20,6 +20,21 @@ ; along with GCC; see the file COPYING3. If not see ; <http://www.gnu.org/licenses/>. */ +Zxl-mode-bootstrap +Driver + +Zxl-mode-executable +Driver + +Zxl-mode-novectors +Driver + +Zxl-mode-xilkernel +Driver + +Zxl-mode-xmdstub +Driver + msoft-float Target Report RejectNegative Mask(SOFT_FLOAT) Use software emulation for floating point (default) @@ -95,3 +110,6 @@ Description for mxl-mode-bootstrap mxl-mode-novectors Target Mask(XL_MODE_NOVECTORS) Description for mxl-mode-novectors + +mxl-mode-xilkernel +Driver diff --git a/gcc/config/mips/mips.opt b/gcc/config/mips/mips.opt index 6ec3ddf5ba5..34ff9845655 100644 --- a/gcc/config/mips/mips.opt +++ b/gcc/config/mips/mips.opt @@ -1,6 +1,6 @@ ; Options for the MIPS port of the compiler ; -; Copyright (C) 2005, 2007, 2008, 2010 Free Software Foundation, Inc. +; Copyright (C) 2005, 2007, 2008, 2010, 2011 Free Software Foundation, Inc. ; ; This file is part of GCC. ; @@ -18,6 +18,12 @@ ; along with GCC; see the file COPYING3. If not see ; <http://www.gnu.org/licenses/>. +EB +Driver + +EL +Driver + mabi= Target RejectNegative Joined -mabi=ABI Generate code that conforms to the given ABI @@ -299,3 +305,6 @@ Perform VR4130-specific alignment optimizations mxgot Target Report Var(TARGET_XGOT) Lift restrictions on GOT size + +noasmopt +Driver diff --git a/gcc/config/pa/pa-hpux.opt b/gcc/config/pa/pa-hpux.opt index 4a656268166..eaed8be2d97 100644 --- a/gcc/config/pa/pa-hpux.opt +++ b/gcc/config/pa/pa-hpux.opt @@ -1,6 +1,6 @@ ; Options for the HP PA-RISC port of the compiler. -; Copyright (C) 2005, 2007 Free Software Foundation, Inc. +; Copyright (C) 2005, 2007, 2011 Free Software Foundation, Inc. ; ; This file is part of GCC. ; @@ -29,3 +29,9 @@ Specify UNIX standard for predefines and linking mwsio Target RejectNegative InverseMask(SIO) Generate cpp defines for workstation IO + +nolibdld +Driver + +rdynamic +Driver diff --git a/gcc/config/rs6000/altivec.h b/gcc/config/rs6000/altivec.h index 93dd4f9a282..583731b9668 100644 --- a/gcc/config/rs6000/altivec.h +++ b/gcc/config/rs6000/altivec.h @@ -1,5 +1,5 @@ /* PowerPC AltiVec include file. - Copyright (C) 2002, 2003, 2004, 2005, 2008, 2009, 2010 + Copyright (C) 2002, 2003, 2004, 2005, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Aldy Hernandez (aldyh@redhat.com). Rewritten by Paolo Bonzini (bonzini@gnu.org). @@ -318,6 +318,8 @@ #define vec_nearbyint __builtin_vec_nearbyint #define vec_rint __builtin_vec_rint #define vec_sqrt __builtin_vec_sqrt +#define vec_vsx_ld __builtin_vec_vsx_ld +#define vec_vsx_st __builtin_vec_vsx_st #endif /* Predicates. diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md index d21d5762ce5..d7357ee3262 100644 --- a/gcc/config/rs6000/altivec.md +++ b/gcc/config/rs6000/altivec.md @@ -1,5 +1,5 @@ ;; AltiVec patterns. -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; Free Software Foundation, Inc. ;; Contributed by Aldy Hernandez (aldy@quesejoda.com) @@ -96,7 +96,7 @@ (UNSPEC_STVE 203) (UNSPEC_SET_VSCR 213) (UNSPEC_GET_VRSAVE 214) - ;; 215 deleted + (UNSPEC_LVX 215) (UNSPEC_REDUC_PLUS 217) (UNSPEC_VECSH 219) (UNSPEC_EXTEVEN_V4SI 220) @@ -1750,17 +1750,19 @@ "lvxl %0,%y1" [(set_attr "type" "vecload")]) -(define_insn "altivec_lvx" - [(set (match_operand:V4SI 0 "register_operand" "=v") - (match_operand:V4SI 1 "memory_operand" "Z"))] +(define_insn "altivec_lvx_<mode>" + [(parallel + [(set (match_operand:VM2 0 "register_operand" "=v") + (match_operand:VM2 1 "memory_operand" "Z")) + (unspec [(const_int 0)] UNSPEC_LVX)])] "TARGET_ALTIVEC" "lvx %0,%y1" [(set_attr "type" "vecload")]) -(define_insn "altivec_stvx" +(define_insn "altivec_stvx_<mode>" [(parallel - [(set (match_operand:V4SI 0 "memory_operand" "=Z") - (match_operand:V4SI 1 "register_operand" "v")) + [(set (match_operand:VM2 0 "memory_operand" "=Z") + (match_operand:VM2 1 "register_operand" "v")) (unspec [(const_int 0)] UNSPEC_STVX)])] "TARGET_ALTIVEC" "stvx %1,%y0" diff --git a/gcc/config/rs6000/rs6000-builtin.def b/gcc/config/rs6000/rs6000-builtin.def index 9f45a72e2c0..fd6321dcf96 100644 --- a/gcc/config/rs6000/rs6000-builtin.def +++ b/gcc/config/rs6000/rs6000-builtin.def @@ -1,5 +1,5 @@ /* Builtin functions for rs6000/powerpc. - Copyright (C) 2009, 2010 + Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Michael Meissner (meissner@linux.vnet.ibm.com) @@ -37,6 +37,10 @@ RS6000_BUILTIN(ALTIVEC_BUILTIN_ST_INTERNAL_16qi, RS6000_BTC_MEM) RS6000_BUILTIN(ALTIVEC_BUILTIN_LD_INTERNAL_16qi, RS6000_BTC_MEM) RS6000_BUILTIN(ALTIVEC_BUILTIN_ST_INTERNAL_4sf, RS6000_BTC_MEM) RS6000_BUILTIN(ALTIVEC_BUILTIN_LD_INTERNAL_4sf, RS6000_BTC_MEM) +RS6000_BUILTIN(ALTIVEC_BUILTIN_ST_INTERNAL_2df, RS6000_BTC_MEM) +RS6000_BUILTIN(ALTIVEC_BUILTIN_LD_INTERNAL_2df, RS6000_BTC_MEM) +RS6000_BUILTIN(ALTIVEC_BUILTIN_ST_INTERNAL_2di, RS6000_BTC_MEM) +RS6000_BUILTIN(ALTIVEC_BUILTIN_LD_INTERNAL_2di, RS6000_BTC_MEM) RS6000_BUILTIN(ALTIVEC_BUILTIN_VADDUBM, RS6000_BTC_CONST) RS6000_BUILTIN(ALTIVEC_BUILTIN_VADDUHM, RS6000_BTC_CONST) RS6000_BUILTIN(ALTIVEC_BUILTIN_VADDUWM, RS6000_BTC_CONST) @@ -778,12 +782,20 @@ RS6000_BUILTIN(PAIRED_BUILTIN_CMPU1, RS6000_BTC_MISC) /* VSX builtins. */ RS6000_BUILTIN(VSX_BUILTIN_LXSDX, RS6000_BTC_MEM) -RS6000_BUILTIN(VSX_BUILTIN_LXVD2X, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_LXVD2X_V2DF, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_LXVD2X_V2DI, RS6000_BTC_MEM) RS6000_BUILTIN(VSX_BUILTIN_LXVDSX, RS6000_BTC_MEM) -RS6000_BUILTIN(VSX_BUILTIN_LXVW4X, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_LXVW4X_V4SF, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_LXVW4X_V4SI, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_LXVW4X_V8HI, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_LXVW4X_V16QI, RS6000_BTC_MEM) RS6000_BUILTIN(VSX_BUILTIN_STXSDX, RS6000_BTC_MEM) -RS6000_BUILTIN(VSX_BUILTIN_STXVD2X, RS6000_BTC_MEM) -RS6000_BUILTIN(VSX_BUILTIN_STXVW4X, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_STXVD2X_V2DF, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_STXVD2X_V2DI, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_STXVW4X_V4SF, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_STXVW4X_V4SI, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_STXVW4X_V8HI, RS6000_BTC_MEM) +RS6000_BUILTIN(VSX_BUILTIN_STXVW4X_V16QI, RS6000_BTC_MEM) RS6000_BUILTIN(VSX_BUILTIN_XSABSDP, RS6000_BTC_CONST) RS6000_BUILTIN(VSX_BUILTIN_XSADDDP, RS6000_BTC_FP_PURE) RS6000_BUILTIN(VSX_BUILTIN_XSCMPODP, RS6000_BTC_FP_PURE) @@ -983,8 +995,10 @@ RS6000_BUILTIN(VSX_BUILTIN_VEC_XXPERMDI, RS6000_BTC_MISC) RS6000_BUILTIN(VSX_BUILTIN_VEC_XXSLDWI, RS6000_BTC_MISC) RS6000_BUILTIN(VSX_BUILTIN_VEC_XXSPLTD, RS6000_BTC_MISC) RS6000_BUILTIN(VSX_BUILTIN_VEC_XXSPLTW, RS6000_BTC_MISC) +RS6000_BUILTIN(VSX_BUILTIN_VEC_LD, RS6000_BTC_MISC) +RS6000_BUILTIN(VSX_BUILTIN_VEC_ST, RS6000_BTC_MISC) RS6000_BUILTIN_EQUATE(VSX_BUILTIN_OVERLOADED_LAST, - VSX_BUILTIN_VEC_XXSPLTW) + VSX_BUILTIN_VEC_ST) /* Combined VSX/Altivec builtins. */ RS6000_BUILTIN(VECTOR_BUILTIN_FLOAT_V4SI_V4SF, RS6000_BTC_FP_PURE) diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index f29373df867..3f4f90b236c 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -1000,6 +1000,15 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = { { VSX_BUILTIN_VEC_DIV, VSX_BUILTIN_XVDIVDP, RS6000_BTI_V2DF, RS6000_BTI_V2DF, RS6000_BTI_V2DF, 0 }, { ALTIVEC_BUILTIN_VEC_LD, ALTIVEC_BUILTIN_LVX, + RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 }, + { ALTIVEC_BUILTIN_VEC_LD, ALTIVEC_BUILTIN_LVX, + RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 }, + { ALTIVEC_BUILTIN_VEC_LD, ALTIVEC_BUILTIN_LVX, + RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V2DI, 0 }, + { ALTIVEC_BUILTIN_VEC_LD, ALTIVEC_BUILTIN_LVX, + RS6000_BTI_bool_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V2DI, 0 }, + { ALTIVEC_BUILTIN_VEC_LD, ALTIVEC_BUILTIN_LVX, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_LD, ALTIVEC_BUILTIN_LVX, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, @@ -1112,9 +1121,19 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = { { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL, - RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_unsigned_V16QI, 0 }, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V16QI, 0 }, { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, + { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL, + RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 }, + { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL, + RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 }, + { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL, + RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V2DI, 0 }, + { ALTIVEC_BUILTIN_VEC_LDL, ALTIVEC_BUILTIN_LVXL, + RS6000_BTI_bool_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V2DI, 0 }, { ALTIVEC_BUILTIN_VEC_LVSL, ALTIVEC_BUILTIN_LVSL, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, { ALTIVEC_BUILTIN_VEC_LVSL, ALTIVEC_BUILTIN_LVSL, @@ -1133,6 +1152,17 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = { RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_long, 0 }, { ALTIVEC_BUILTIN_VEC_LVSL, ALTIVEC_BUILTIN_LVSL, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, + { ALTIVEC_BUILTIN_VEC_LVSL, ALTIVEC_BUILTIN_LVSL, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_double, 0 }, + { ALTIVEC_BUILTIN_VEC_LVSL, ALTIVEC_BUILTIN_LVSL, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTDI, 0 }, + { ALTIVEC_BUILTIN_VEC_LVSL, ALTIVEC_BUILTIN_LVSL, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTDI, 0 }, + { ALTIVEC_BUILTIN_VEC_LVSL, ALTIVEC_BUILTIN_LVSL, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_long_long, 0 }, + { ALTIVEC_BUILTIN_VEC_LVSL, ALTIVEC_BUILTIN_LVSL, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_long_long, 0 }, { ALTIVEC_BUILTIN_VEC_LVSR, ALTIVEC_BUILTIN_LVSR, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, { ALTIVEC_BUILTIN_VEC_LVSR, ALTIVEC_BUILTIN_LVSR, @@ -1151,6 +1181,17 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = { RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_long, 0 }, { ALTIVEC_BUILTIN_VEC_LVSR, ALTIVEC_BUILTIN_LVSR, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, + { ALTIVEC_BUILTIN_VEC_LVSR, ALTIVEC_BUILTIN_LVSR, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_double, 0 }, + { ALTIVEC_BUILTIN_VEC_LVSR, ALTIVEC_BUILTIN_LVSR, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTDI, 0 }, + { ALTIVEC_BUILTIN_VEC_LVSR, ALTIVEC_BUILTIN_LVSR, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTDI, 0 }, + { ALTIVEC_BUILTIN_VEC_LVSR, ALTIVEC_BUILTIN_LVSR, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_long_long, 0 }, + { ALTIVEC_BUILTIN_VEC_LVSR, ALTIVEC_BUILTIN_LVSR, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_long_long, 0 }, { ALTIVEC_BUILTIN_VEC_LVLX, ALTIVEC_BUILTIN_LVLX, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, { ALTIVEC_BUILTIN_VEC_LVLX, ALTIVEC_BUILTIN_LVLX, @@ -2644,6 +2685,16 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = { { ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VSLDOI_16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_bool_V16QI, RS6000_BTI_NOT_OPAQUE }, { ALTIVEC_BUILTIN_VEC_ST, ALTIVEC_BUILTIN_STVX, + RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF }, + { ALTIVEC_BUILTIN_VEC_ST, ALTIVEC_BUILTIN_STVX, + RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI }, + { ALTIVEC_BUILTIN_VEC_ST, ALTIVEC_BUILTIN_STVX, + RS6000_BTI_void, RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V2DI }, + { ALTIVEC_BUILTIN_VEC_ST, ALTIVEC_BUILTIN_STVX, + RS6000_BTI_void, RS6000_BTI_bool_V2DI, RS6000_BTI_INTSI, + ~RS6000_BTI_bool_V2DI }, + { ALTIVEC_BUILTIN_VEC_ST, ALTIVEC_BUILTIN_STVX, RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, { ALTIVEC_BUILTIN_VEC_ST, ALTIVEC_BUILTIN_STVX, RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, @@ -2809,6 +2860,18 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = { RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL, RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI }, + { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL, + RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF }, + { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL, + RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_double }, + { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL, + RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI }, + { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL, + RS6000_BTI_void, RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V2DI }, + { ALTIVEC_BUILTIN_VEC_STL, ALTIVEC_BUILTIN_STVXL, + RS6000_BTI_void, RS6000_BTI_bool_V2DI, RS6000_BTI_INTSI, + ~RS6000_BTI_bool_V2DI }, { ALTIVEC_BUILTIN_VEC_STVLX, ALTIVEC_BUILTIN_STVLX, RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, { ALTIVEC_BUILTIN_VEC_STVLX, ALTIVEC_BUILTIN_STVLX, @@ -3002,6 +3065,135 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = { RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, RS6000_BTI_NOT_OPAQUE }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DF, + RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI, + RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI, + RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V2DI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVD2X_V2DI, + RS6000_BTI_bool_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V2DI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V4SF, + RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V4SF, + RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V4SI, + RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V4SI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V4SI, + RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V4SI, + RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V4SI, + RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_long, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V4SI, + RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V4SI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V4SI, + RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTSI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V4SI, + RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_long, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V8HI, + RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V8HI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V8HI, + RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_pixel_V8HI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V8HI, + RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V8HI, + RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V8HI, + RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V8HI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V8HI, + RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTHI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V16QI, + RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_bool_V16QI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V16QI, + RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V16QI, + RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V16QI, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V16QI, 0 }, + { VSX_BUILTIN_VEC_LD, VSX_BUILTIN_LXVW4X_V16QI, + RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_UINTQI, 0 }, + + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DF, + RS6000_BTI_void, RS6000_BTI_V2DF, RS6000_BTI_INTSI, ~RS6000_BTI_V2DF }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI, + RS6000_BTI_void, RS6000_BTI_V2DI, RS6000_BTI_INTSI, ~RS6000_BTI_V2DI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI, + RS6000_BTI_void, RS6000_BTI_unsigned_V2DI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V2DI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVD2X_V2DI, + RS6000_BTI_void, RS6000_BTI_bool_V2DI, RS6000_BTI_INTSI, + ~RS6000_BTI_bool_V2DI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V4SF, + RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_V4SF }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V4SF, + RS6000_BTI_void, RS6000_BTI_V4SF, RS6000_BTI_INTSI, ~RS6000_BTI_float }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V4SI, + RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_V4SI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V4SI, + RS6000_BTI_void, RS6000_BTI_V4SI, RS6000_BTI_INTSI, ~RS6000_BTI_INTSI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V4SI, + RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V4SI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V4SI, + RS6000_BTI_void, RS6000_BTI_unsigned_V4SI, RS6000_BTI_INTSI, + ~RS6000_BTI_UINTSI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V4SI, + RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, + ~RS6000_BTI_bool_V4SI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V4SI, + RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, + ~RS6000_BTI_UINTSI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V4SI, + RS6000_BTI_void, RS6000_BTI_bool_V4SI, RS6000_BTI_INTSI, + ~RS6000_BTI_INTSI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V8HI, + RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_V8HI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V8HI, + RS6000_BTI_void, RS6000_BTI_V8HI, RS6000_BTI_INTSI, ~RS6000_BTI_INTHI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V8HI, + RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V8HI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V8HI, + RS6000_BTI_void, RS6000_BTI_unsigned_V8HI, RS6000_BTI_INTSI, + ~RS6000_BTI_UINTHI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V8HI, + RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, + ~RS6000_BTI_bool_V8HI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V8HI, + RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, + ~RS6000_BTI_UINTHI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V8HI, + RS6000_BTI_void, RS6000_BTI_bool_V8HI, RS6000_BTI_INTSI, + ~RS6000_BTI_INTHI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V16QI, + RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_V16QI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V16QI, + RS6000_BTI_void, RS6000_BTI_V16QI, RS6000_BTI_INTSI, ~RS6000_BTI_INTQI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V16QI, + RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, + ~RS6000_BTI_unsigned_V16QI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V16QI, + RS6000_BTI_void, RS6000_BTI_unsigned_V16QI, RS6000_BTI_INTSI, + ~RS6000_BTI_UINTQI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V16QI, + RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, + ~RS6000_BTI_bool_V16QI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V16QI, + RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, + ~RS6000_BTI_UINTQI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V16QI, + RS6000_BTI_void, RS6000_BTI_bool_V16QI, RS6000_BTI_INTSI, + ~RS6000_BTI_INTQI }, + { VSX_BUILTIN_VEC_ST, VSX_BUILTIN_STXVW4X_V16QI, + RS6000_BTI_void, RS6000_BTI_pixel_V8HI, RS6000_BTI_INTSI, + ~RS6000_BTI_pixel_V8HI }, + /* Predicates. */ { ALTIVEC_BUILTIN_VCMPGT_P, ALTIVEC_BUILTIN_VCMPGTUB_P, RS6000_BTI_INTSI, RS6000_BTI_INTSI, RS6000_BTI_bool_V16QI, RS6000_BTI_unsigned_V16QI }, diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index 3eafc166cb8..d9b6bd70cad 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -1,5 +1,6 @@ /* Definitions of target machine for GNU compiler, for IBM RS/6000. - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, + 2010, 2011 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) @@ -129,6 +130,7 @@ extern void rs6000_emit_parity (rtx, rtx); extern rtx rs6000_machopic_legitimize_pic_address (rtx, enum machine_mode, rtx); extern rtx rs6000_address_for_fpconvert (rtx); +extern rtx rs6000_address_for_altivec (rtx); extern rtx rs6000_allocate_stack_temp (enum machine_mode, bool, bool); extern int rs6000_loop_align (rtx); #endif /* RTX_CODE */ diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index c5e45fb70be..df02bef54df 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3316,9 +3316,12 @@ rs6000_option_override_internal (bool global_init_p) /* If not explicitly specified via option, decide whether to generate indexed load/store instructions. */ if (TARGET_AVOID_XFORM == -1) - /* Avoid indexed addressing when targeting Power6 in order to avoid - the DERAT mispredict penalty. */ - TARGET_AVOID_XFORM = (rs6000_cpu == PROCESSOR_POWER6 && TARGET_CMPB); + /* Avoid indexed addressing when targeting Power6 in order to avoid the + DERAT mispredict penalty. However the LVE and STVE altivec instructions + need indexed accesses and the type used is the scalar type of the element + being loaded or stored. */ + TARGET_AVOID_XFORM = (rs6000_cpu == PROCESSOR_POWER6 && TARGET_CMPB + && !TARGET_ALTIVEC); /* Set the -mrecip options. */ if (rs6000_recip_name) @@ -11263,16 +11266,22 @@ altivec_expand_ld_builtin (tree exp, rtx target, bool *expandedp) switch (fcode) { case ALTIVEC_BUILTIN_LD_INTERNAL_16qi: - icode = CODE_FOR_vector_load_v16qi; + icode = CODE_FOR_vector_altivec_load_v16qi; break; case ALTIVEC_BUILTIN_LD_INTERNAL_8hi: - icode = CODE_FOR_vector_load_v8hi; + icode = CODE_FOR_vector_altivec_load_v8hi; break; case ALTIVEC_BUILTIN_LD_INTERNAL_4si: - icode = CODE_FOR_vector_load_v4si; + icode = CODE_FOR_vector_altivec_load_v4si; break; case ALTIVEC_BUILTIN_LD_INTERNAL_4sf: - icode = CODE_FOR_vector_load_v4sf; + icode = CODE_FOR_vector_altivec_load_v4sf; + break; + case ALTIVEC_BUILTIN_LD_INTERNAL_2df: + icode = CODE_FOR_vector_altivec_load_v2df; + break; + case ALTIVEC_BUILTIN_LD_INTERNAL_2di: + icode = CODE_FOR_vector_altivec_load_v2di; break; default: *expandedp = false; @@ -11316,16 +11325,22 @@ altivec_expand_st_builtin (tree exp, rtx target ATTRIBUTE_UNUSED, switch (fcode) { case ALTIVEC_BUILTIN_ST_INTERNAL_16qi: - icode = CODE_FOR_vector_store_v16qi; + icode = CODE_FOR_vector_altivec_store_v16qi; break; case ALTIVEC_BUILTIN_ST_INTERNAL_8hi: - icode = CODE_FOR_vector_store_v8hi; + icode = CODE_FOR_vector_altivec_store_v8hi; break; case ALTIVEC_BUILTIN_ST_INTERNAL_4si: - icode = CODE_FOR_vector_store_v4si; + icode = CODE_FOR_vector_altivec_store_v4si; break; case ALTIVEC_BUILTIN_ST_INTERNAL_4sf: - icode = CODE_FOR_vector_store_v4sf; + icode = CODE_FOR_vector_altivec_store_v4sf; + break; + case ALTIVEC_BUILTIN_ST_INTERNAL_2df: + icode = CODE_FOR_vector_altivec_store_v2df; + break; + case ALTIVEC_BUILTIN_ST_INTERNAL_2di: + icode = CODE_FOR_vector_altivec_store_v2di; break; default: *expandedp = false; @@ -11557,7 +11572,7 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp) switch (fcode) { case ALTIVEC_BUILTIN_STVX: - return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx, exp); + return altivec_expand_stv_builtin (CODE_FOR_altivec_stvx_v4si, exp); case ALTIVEC_BUILTIN_STVEBX: return altivec_expand_stv_builtin (CODE_FOR_altivec_stvebx, exp); case ALTIVEC_BUILTIN_STVEHX: @@ -11576,6 +11591,19 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp) case ALTIVEC_BUILTIN_STVRXL: return altivec_expand_stv_builtin (CODE_FOR_altivec_stvrxl, exp); + case VSX_BUILTIN_STXVD2X_V2DF: + return altivec_expand_stv_builtin (CODE_FOR_vsx_store_v2df, exp); + case VSX_BUILTIN_STXVD2X_V2DI: + return altivec_expand_stv_builtin (CODE_FOR_vsx_store_v2di, exp); + case VSX_BUILTIN_STXVW4X_V4SF: + return altivec_expand_stv_builtin (CODE_FOR_vsx_store_v4sf, exp); + case VSX_BUILTIN_STXVW4X_V4SI: + return altivec_expand_stv_builtin (CODE_FOR_vsx_store_v4si, exp); + case VSX_BUILTIN_STXVW4X_V8HI: + return altivec_expand_stv_builtin (CODE_FOR_vsx_store_v8hi, exp); + case VSX_BUILTIN_STXVW4X_V16QI: + return altivec_expand_stv_builtin (CODE_FOR_vsx_store_v16qi, exp); + case ALTIVEC_BUILTIN_MFVSCR: icode = CODE_FOR_altivec_mfvscr; tmode = insn_data[icode].operand[0].mode; @@ -11700,7 +11728,7 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp) return altivec_expand_lv_builtin (CODE_FOR_altivec_lvxl, exp, target, false); case ALTIVEC_BUILTIN_LVX: - return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx, + return altivec_expand_lv_builtin (CODE_FOR_altivec_lvx_v4si, exp, target, false); case ALTIVEC_BUILTIN_LVLX: return altivec_expand_lv_builtin (CODE_FOR_altivec_lvlx, @@ -11714,6 +11742,25 @@ altivec_expand_builtin (tree exp, rtx target, bool *expandedp) case ALTIVEC_BUILTIN_LVRXL: return altivec_expand_lv_builtin (CODE_FOR_altivec_lvrxl, exp, target, true); + case VSX_BUILTIN_LXVD2X_V2DF: + return altivec_expand_lv_builtin (CODE_FOR_vsx_load_v2df, + exp, target, false); + case VSX_BUILTIN_LXVD2X_V2DI: + return altivec_expand_lv_builtin (CODE_FOR_vsx_load_v2di, + exp, target, false); + case VSX_BUILTIN_LXVW4X_V4SF: + return altivec_expand_lv_builtin (CODE_FOR_vsx_load_v4sf, + exp, target, false); + case VSX_BUILTIN_LXVW4X_V4SI: + return altivec_expand_lv_builtin (CODE_FOR_vsx_load_v4si, + exp, target, false); + case VSX_BUILTIN_LXVW4X_V8HI: + return altivec_expand_lv_builtin (CODE_FOR_vsx_load_v8hi, + exp, target, false); + case VSX_BUILTIN_LXVW4X_V16QI: + return altivec_expand_lv_builtin (CODE_FOR_vsx_load_v16qi, + exp, target, false); + break; default: break; /* Fall through. */ @@ -12331,6 +12378,8 @@ rs6000_init_builtins (void) long_integer_type_internal_node = long_integer_type_node; long_unsigned_type_internal_node = long_unsigned_type_node; + long_long_integer_type_internal_node = long_long_integer_type_node; + long_long_unsigned_type_internal_node = long_long_unsigned_type_node; intQI_type_internal_node = intQI_type_node; uintQI_type_internal_node = unsigned_intQI_type_node; intHI_type_internal_node = intHI_type_node; @@ -12340,7 +12389,7 @@ rs6000_init_builtins (void) intDI_type_internal_node = intDI_type_node; uintDI_type_internal_node = unsigned_intDI_type_node; float_type_internal_node = float_type_node; - double_type_internal_node = float_type_node; + double_type_internal_node = double_type_node; void_type_internal_node = void_type_node; /* Initialize the modes for builtin_function_type, mapping a machine mode to @@ -12872,19 +12921,11 @@ altivec_init_builtins (void) size_t i; tree ftype; - tree pfloat_type_node = build_pointer_type (float_type_node); - tree pint_type_node = build_pointer_type (integer_type_node); - tree pshort_type_node = build_pointer_type (short_integer_type_node); - tree pchar_type_node = build_pointer_type (char_type_node); - tree pvoid_type_node = build_pointer_type (void_type_node); - tree pcfloat_type_node = build_pointer_type (build_qualified_type (float_type_node, TYPE_QUAL_CONST)); - tree pcint_type_node = build_pointer_type (build_qualified_type (integer_type_node, TYPE_QUAL_CONST)); - tree pcshort_type_node = build_pointer_type (build_qualified_type (short_integer_type_node, TYPE_QUAL_CONST)); - tree pcchar_type_node = build_pointer_type (build_qualified_type (char_type_node, TYPE_QUAL_CONST)); - - tree pcvoid_type_node = build_pointer_type (build_qualified_type (void_type_node, TYPE_QUAL_CONST)); + tree pcvoid_type_node + = build_pointer_type (build_qualified_type (void_type_node, + TYPE_QUAL_CONST)); tree int_ftype_opaque = build_function_type_list (integer_type_node, @@ -12907,26 +12948,6 @@ altivec_init_builtins (void) = build_function_type_list (integer_type_node, integer_type_node, V4SI_type_node, V4SI_type_node, NULL_TREE); - tree v4sf_ftype_pcfloat - = build_function_type_list (V4SF_type_node, pcfloat_type_node, NULL_TREE); - tree void_ftype_pfloat_v4sf - = build_function_type_list (void_type_node, - pfloat_type_node, V4SF_type_node, NULL_TREE); - tree v4si_ftype_pcint - = build_function_type_list (V4SI_type_node, pcint_type_node, NULL_TREE); - tree void_ftype_pint_v4si - = build_function_type_list (void_type_node, - pint_type_node, V4SI_type_node, NULL_TREE); - tree v8hi_ftype_pcshort - = build_function_type_list (V8HI_type_node, pcshort_type_node, NULL_TREE); - tree void_ftype_pshort_v8hi - = build_function_type_list (void_type_node, - pshort_type_node, V8HI_type_node, NULL_TREE); - tree v16qi_ftype_pcchar - = build_function_type_list (V16QI_type_node, pcchar_type_node, NULL_TREE); - tree void_ftype_pchar_v16qi - = build_function_type_list (void_type_node, - pchar_type_node, V16QI_type_node, NULL_TREE); tree void_ftype_v4si = build_function_type_list (void_type_node, V4SI_type_node, NULL_TREE); tree v8hi_ftype_void @@ -12938,16 +12959,32 @@ altivec_init_builtins (void) tree opaque_ftype_long_pcvoid = build_function_type_list (opaque_V4SI_type_node, - long_integer_type_node, pcvoid_type_node, NULL_TREE); + long_integer_type_node, pcvoid_type_node, + NULL_TREE); tree v16qi_ftype_long_pcvoid = build_function_type_list (V16QI_type_node, - long_integer_type_node, pcvoid_type_node, NULL_TREE); + long_integer_type_node, pcvoid_type_node, + NULL_TREE); tree v8hi_ftype_long_pcvoid = build_function_type_list (V8HI_type_node, - long_integer_type_node, pcvoid_type_node, NULL_TREE); + long_integer_type_node, pcvoid_type_node, + NULL_TREE); tree v4si_ftype_long_pcvoid = build_function_type_list (V4SI_type_node, - long_integer_type_node, pcvoid_type_node, NULL_TREE); + long_integer_type_node, pcvoid_type_node, + NULL_TREE); + tree v4sf_ftype_long_pcvoid + = build_function_type_list (V4SF_type_node, + long_integer_type_node, pcvoid_type_node, + NULL_TREE); + tree v2df_ftype_long_pcvoid + = build_function_type_list (V2DF_type_node, + long_integer_type_node, pcvoid_type_node, + NULL_TREE); + tree v2di_ftype_long_pcvoid + = build_function_type_list (V2DI_type_node, + long_integer_type_node, pcvoid_type_node, + NULL_TREE); tree void_ftype_opaque_long_pvoid = build_function_type_list (void_type_node, @@ -12965,6 +13002,18 @@ altivec_init_builtins (void) = build_function_type_list (void_type_node, V8HI_type_node, long_integer_type_node, pvoid_type_node, NULL_TREE); + tree void_ftype_v4sf_long_pvoid + = build_function_type_list (void_type_node, + V4SF_type_node, long_integer_type_node, + pvoid_type_node, NULL_TREE); + tree void_ftype_v2df_long_pvoid + = build_function_type_list (void_type_node, + V2DF_type_node, long_integer_type_node, + pvoid_type_node, NULL_TREE); + tree void_ftype_v2di_long_pvoid + = build_function_type_list (void_type_node, + V2DI_type_node, long_integer_type_node, + pvoid_type_node, NULL_TREE); tree int_ftype_int_v8hi_v8hi = build_function_type_list (integer_type_node, integer_type_node, V8HI_type_node, @@ -12996,22 +13045,6 @@ altivec_init_builtins (void) pcvoid_type_node, integer_type_node, integer_type_node, NULL_TREE); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_4sf", v4sf_ftype_pcfloat, - ALTIVEC_BUILTIN_LD_INTERNAL_4sf); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_4sf", void_ftype_pfloat_v4sf, - ALTIVEC_BUILTIN_ST_INTERNAL_4sf); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_4si", v4si_ftype_pcint, - ALTIVEC_BUILTIN_LD_INTERNAL_4si); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_4si", void_ftype_pint_v4si, - ALTIVEC_BUILTIN_ST_INTERNAL_4si); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_8hi", v8hi_ftype_pcshort, - ALTIVEC_BUILTIN_LD_INTERNAL_8hi); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_8hi", void_ftype_pshort_v8hi, - ALTIVEC_BUILTIN_ST_INTERNAL_8hi); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_ld_internal_16qi", v16qi_ftype_pcchar, - ALTIVEC_BUILTIN_LD_INTERNAL_16qi); - def_builtin (MASK_ALTIVEC, "__builtin_altivec_st_internal_16qi", void_ftype_pchar_v16qi, - ALTIVEC_BUILTIN_ST_INTERNAL_16qi); def_builtin (MASK_ALTIVEC, "__builtin_altivec_mtvscr", void_ftype_v4si, ALTIVEC_BUILTIN_MTVSCR); def_builtin (MASK_ALTIVEC, "__builtin_altivec_mfvscr", v8hi_ftype_void, ALTIVEC_BUILTIN_MFVSCR); def_builtin (MASK_ALTIVEC, "__builtin_altivec_dssall", void_ftype_void, ALTIVEC_BUILTIN_DSSALL); @@ -13043,6 +13076,35 @@ altivec_init_builtins (void) def_builtin (MASK_ALTIVEC, "__builtin_vec_stvebx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEBX); def_builtin (MASK_ALTIVEC, "__builtin_vec_stvehx", void_ftype_opaque_long_pvoid, ALTIVEC_BUILTIN_VEC_STVEHX); + def_builtin (MASK_VSX, "__builtin_vsx_lxvd2x_v2df", v2df_ftype_long_pcvoid, + VSX_BUILTIN_LXVD2X_V2DF); + def_builtin (MASK_VSX, "__builtin_vsx_lxvd2x_v2di", v2di_ftype_long_pcvoid, + VSX_BUILTIN_LXVD2X_V2DI); + def_builtin (MASK_VSX, "__builtin_vsx_lxvw4x_v4sf", v4sf_ftype_long_pcvoid, + VSX_BUILTIN_LXVW4X_V4SF); + def_builtin (MASK_VSX, "__builtin_vsx_lxvw4x_v4si", v4si_ftype_long_pcvoid, + VSX_BUILTIN_LXVW4X_V4SI); + def_builtin (MASK_VSX, "__builtin_vsx_lxvw4x_v8hi", + v8hi_ftype_long_pcvoid, VSX_BUILTIN_LXVW4X_V8HI); + def_builtin (MASK_VSX, "__builtin_vsx_lxvw4x_v16qi", + v16qi_ftype_long_pcvoid, VSX_BUILTIN_LXVW4X_V16QI); + def_builtin (MASK_VSX, "__builtin_vsx_stxvd2x_v2df", + void_ftype_v2df_long_pvoid, VSX_BUILTIN_STXVD2X_V2DF); + def_builtin (MASK_VSX, "__builtin_vsx_stxvd2x_v2di", + void_ftype_v2di_long_pvoid, VSX_BUILTIN_STXVD2X_V2DI); + def_builtin (MASK_VSX, "__builtin_vsx_stxvw4x_v4sf", + void_ftype_v4sf_long_pvoid, VSX_BUILTIN_STXVW4X_V4SF); + def_builtin (MASK_VSX, "__builtin_vsx_stxvw4x_v4si", + void_ftype_v4si_long_pvoid, VSX_BUILTIN_STXVW4X_V4SI); + def_builtin (MASK_VSX, "__builtin_vsx_stxvw4x_v8hi", + void_ftype_v8hi_long_pvoid, VSX_BUILTIN_STXVW4X_V8HI); + def_builtin (MASK_VSX, "__builtin_vsx_stxvw4x_v16qi", + void_ftype_v16qi_long_pvoid, VSX_BUILTIN_STXVW4X_V16QI); + def_builtin (MASK_VSX, "__builtin_vec_vsx_ld", opaque_ftype_long_pcvoid, + VSX_BUILTIN_VEC_LD); + def_builtin (MASK_VSX, "__builtin_vec_vsx_st", void_ftype_opaque_long_pvoid, + VSX_BUILTIN_VEC_ST); + if (rs6000_cpu == PROCESSOR_CELL) { def_builtin (MASK_ALTIVEC, "__builtin_altivec_lvlx", v16qi_ftype_long_pcvoid, ALTIVEC_BUILTIN_LVLX); @@ -27925,4 +27987,29 @@ rs6000_address_for_fpconvert (rtx x) return x; } +/* Given a memory reference, if it is not in the form for altivec memory + reference instructions (i.e. reg or reg+reg addressing with AND of -16), + convert to the altivec format. */ + +rtx +rs6000_address_for_altivec (rtx x) +{ + gcc_assert (MEM_P (x)); + if (!altivec_indexed_or_indirect_operand (x, GET_MODE (x))) + { + rtx addr = XEXP (x, 0); + int strict_p = (reload_in_progress || reload_completed); + + if (!legitimate_indexed_address_p (addr, strict_p) + && !legitimate_indirect_address_p (addr, strict_p)) + addr = copy_to_mode_reg (Pmode, addr); + + addr = gen_rtx_AND (Pmode, addr, GEN_INT (-16)); + x = change_address (x, GET_MODE (x), addr); + } + + return x; +} + + #include "gt-rs6000.h" diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index fb6130ffcdb..8c76d7ce101 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -1,7 +1,7 @@ /* Definitions of target machine for GNU compiler, for IBM RS/6000. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, - 2010 + 2010, 2011 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) @@ -2368,6 +2368,8 @@ enum rs6000_builtin_type_index RS6000_BTI_pixel_V8HI, /* __vector __pixel */ RS6000_BTI_long, /* long_integer_type_node */ RS6000_BTI_unsigned_long, /* long_unsigned_type_node */ + RS6000_BTI_long_long, /* long_long_integer_type_node */ + RS6000_BTI_unsigned_long_long, /* long_long_unsigned_type_node */ RS6000_BTI_INTQI, /* intQI_type_node */ RS6000_BTI_UINTQI, /* unsigned_intQI_type_node */ RS6000_BTI_INTHI, /* intHI_type_node */ @@ -2411,6 +2413,8 @@ enum rs6000_builtin_type_index #define bool_V2DI_type_node (rs6000_builtin_types[RS6000_BTI_bool_V2DI]) #define pixel_V8HI_type_node (rs6000_builtin_types[RS6000_BTI_pixel_V8HI]) +#define long_long_integer_type_internal_node (rs6000_builtin_types[RS6000_BTI_long_long]) +#define long_long_unsigned_type_internal_node (rs6000_builtin_types[RS6000_BTI_unsigned_long_long]) #define long_integer_type_internal_node (rs6000_builtin_types[RS6000_BTI_long]) #define long_unsigned_type_internal_node (rs6000_builtin_types[RS6000_BTI_unsigned_long]) #define intQI_type_internal_node (rs6000_builtin_types[RS6000_BTI_INTQI]) diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md index 71961fbc57c..5335d9d4301 100644 --- a/gcc/config/rs6000/vector.md +++ b/gcc/config/rs6000/vector.md @@ -3,7 +3,7 @@ ;; expander, and the actual vector instructions will be in altivec.md and ;; vsx.md -;; Copyright (C) 2009, 2010 +;; Copyright (C) 2009, 2010, 2011 ;; Free Software Foundation, Inc. ;; Contributed by Michael Meissner <meissner@linux.vnet.ibm.com> @@ -123,6 +123,43 @@ DONE; }) +;; Vector floating point load/store instructions that uses the Altivec +;; instructions even if we are compiling for VSX, since the Altivec +;; instructions silently ignore the bottom 3 bits of the address, and VSX does +;; not. +(define_expand "vector_altivec_load_<mode>" + [(set (match_operand:VEC_M 0 "vfloat_operand" "") + (match_operand:VEC_M 1 "memory_operand" ""))] + "VECTOR_MEM_ALTIVEC_OR_VSX_P (<MODE>mode)" + " +{ + gcc_assert (VECTOR_MEM_ALTIVEC_OR_VSX_P (<MODE>mode)); + + if (VECTOR_MEM_VSX_P (<MODE>mode)) + { + operands[1] = rs6000_address_for_altivec (operands[1]); + emit_insn (gen_altivec_lvx_<mode> (operands[0], operands[1])); + DONE; + } +}") + +(define_expand "vector_altivec_store_<mode>" + [(set (match_operand:VEC_M 0 "memory_operand" "") + (match_operand:VEC_M 1 "vfloat_operand" ""))] + "VECTOR_MEM_ALTIVEC_OR_VSX_P (<MODE>mode)" + " +{ + gcc_assert (VECTOR_MEM_ALTIVEC_OR_VSX_P (<MODE>mode)); + + if (VECTOR_MEM_VSX_P (<MODE>mode)) + { + operands[0] = rs6000_address_for_altivec (operands[0]); + emit_insn (gen_altivec_stvx_<mode> (operands[0], operands[1])); + DONE; + } +}") + + ;; Reload patterns for vector operations. We may need an addtional base ;; register to convert the reg+offset addressing to reg+reg for vector diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index e241e26db89..3f6da4c0b40 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -1,5 +1,5 @@ ;; VSX patterns. -;; Copyright (C) 2009, 2010 +;; Copyright (C) 2009, 2010, 2011 ;; Free Software Foundation, Inc. ;; Contributed by Michael Meissner <meissner@linux.vnet.ibm.com> @@ -308,6 +308,19 @@ } [(set_attr "type" "vecstore,vecload,vecsimple,*,*,*,vecsimple,*,vecstore,vecload")]) +;; Explicit load/store expanders for the builtin functions +(define_expand "vsx_load_<mode>" + [(set (match_operand:VSX_M 0 "vsx_register_operand" "") + (match_operand:VSX_M 1 "memory_operand" ""))] + "VECTOR_MEM_VSX_P (<MODE>mode)" + "") + +(define_expand "vsx_store_<mode>" + [(set (match_operand:VEC_M 0 "memory_operand" "") + (match_operand:VEC_M 1 "vsx_register_operand" ""))] + "VECTOR_MEM_VSX_P (<MODE>mode)" + "") + ;; VSX scalar and vector floating point arithmetic instructions (define_insn "*vsx_add<mode>3" @@ -695,33 +708,34 @@ ;; the fprs because we don't want to add the altivec registers to movdi/movsi. ;; For the unsigned tests, there isn't a generic double -> unsigned conversion ;; in rs6000.md so don't test VECTOR_UNIT_VSX_P, just test against VSX. +;; Don't use vsx_register_operand here, use gpc_reg_operand to match rs6000.md. (define_insn "vsx_float<VSi><mode>2" - [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa") - (float:VSX_B (match_operand:<VSI> 1 "vsx_register_operand" "<VSr2>,<VSr3>")))] + [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa") + (float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))] "VECTOR_UNIT_VSX_P (<MODE>mode)" "x<VSv>cvsx<VSc><VSs> %x0,%x1" [(set_attr "type" "<VStype_simple>") (set_attr "fp_type" "<VSfptype_simple>")]) (define_insn "vsx_floatuns<VSi><mode>2" - [(set (match_operand:VSX_B 0 "vsx_register_operand" "=<VSr>,?wa") - (unsigned_float:VSX_B (match_operand:<VSI> 1 "vsx_register_operand" "<VSr2>,<VSr3>")))] + [(set (match_operand:VSX_B 0 "gpc_reg_operand" "=<VSr>,?wa") + (unsigned_float:VSX_B (match_operand:<VSI> 1 "gpc_reg_operand" "<VSr2>,<VSr3>")))] "VECTOR_UNIT_VSX_P (<MODE>mode)" "x<VSv>cvux<VSc><VSs> %x0,%x1" [(set_attr "type" "<VStype_simple>") (set_attr "fp_type" "<VSfptype_simple>")]) (define_insn "vsx_fix_trunc<mode><VSi>2" - [(set (match_operand:<VSI> 0 "vsx_register_operand" "=<VSr2>,?<VSr3>") - (fix:<VSI> (match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")))] + [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>") + (fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))] "VECTOR_UNIT_VSX_P (<MODE>mode)" "x<VSv>cv<VSs>sx<VSc>s %x0,%x1" [(set_attr "type" "<VStype_simple>") (set_attr "fp_type" "<VSfptype_simple>")]) (define_insn "vsx_fixuns_trunc<mode><VSi>2" - [(set (match_operand:<VSI> 0 "vsx_register_operand" "=<VSr2>,?<VSr3>") - (unsigned_fix:<VSI> (match_operand:VSX_B 1 "vsx_register_operand" "<VSr>,wa")))] + [(set (match_operand:<VSI> 0 "gpc_reg_operand" "=<VSr2>,?<VSr3>") + (unsigned_fix:<VSI> (match_operand:VSX_B 1 "gpc_reg_operand" "<VSr>,wa")))] "VECTOR_UNIT_VSX_P (<MODE>mode)" "x<VSv>cv<VSs>ux<VSc>s %x0,%x1" [(set_attr "type" "<VStype_simple>") diff --git a/gcc/config/rx/predicates.md b/gcc/config/rx/predicates.md index 77b3353ac3e..82cac42dadf 100644 --- a/gcc/config/rx/predicates.md +++ b/gcc/config/rx/predicates.md @@ -284,7 +284,7 @@ ) (define_predicate "rx_zs_comparison_operator" - (match_code "eq,ne,lt,ge") + (match_code "eq,ne") ) ;; GT and LE omitted due to operand swap required. diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index 81991067b83..839523fc873 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -450,10 +450,10 @@ rx_print_operand (FILE * file, rtx op, int letter) switch (code) { case LT: - ret = "n"; + ret = "lt"; break; case GE: - ret = "pz"; + ret = "ge"; break; case GT: ret = "gt"; @@ -2625,7 +2625,7 @@ flags_from_code (enum rtx_code code) { case LT: case GE: - return CC_FLAG_S; + return CC_FLAG_S | CC_FLAG_O; case GT: case LE: return CC_FLAG_S | CC_FLAG_O | CC_FLAG_Z; diff --git a/gcc/config/rx/rx.md b/gcc/config/rx/rx.md index 99b46b5b2e2..7629a886e5c 100644 --- a/gcc/config/rx/rx.md +++ b/gcc/config/rx/rx.md @@ -797,7 +797,10 @@ (set (reg CC_REG) (compare (abs:SI (match_dup 1)) (const_int 0)))] - "reload_completed && rx_match_ccmode (insn, CC_ZSOmode)" + ;; Note - although the ABS instruction does set the O bit in the processor + ;; status word, it does not do so in a way that is comparable with the CMP + ;; instruction. Hence we use CC_ZSmode rather than CC_ZSOmode. + "reload_completed && rx_match_ccmode (insn, CC_ZSmode)" "@ abs\t%0 abs\t%1, %0" diff --git a/gcc/config/sparc/freebsd.h b/gcc/config/sparc/freebsd.h index 417357f13fa..f2fb65e33fb 100644 --- a/gcc/config/sparc/freebsd.h +++ b/gcc/config/sparc/freebsd.h @@ -1,5 +1,5 @@ /* Definitions for Sun SPARC64 running FreeBSD using the ELF format - Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2010 + Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2010, 2011 Free Software Foundation, Inc. Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi. @@ -30,6 +30,9 @@ along with GCC; see the file COPYING3. If not see #define CPP_CPU64_DEFAULT_SPEC \ "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__" +#undef ASM_SPEC +#define ASM_SPEC "%{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)" + #define LINK_SPEC "%(link_arch) \ %{!mno-relax:%{!r:-relax}} \ %{p:%nconsider using '-pg' instead of '-p' with gprof(1)} \ diff --git a/gcc/config/sparc/sol2-bi.h b/gcc/config/sparc/sol2-bi.h index 48c9a0d11d0..bd9cd70487c 100644 --- a/gcc/config/sparc/sol2-bi.h +++ b/gcc/config/sparc/sol2-bi.h @@ -229,14 +229,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #undef CC1_SPEC #if DEFAULT_ARCH32_P #define CC1_SPEC "\ -%{sun4:} %{target:} \ %{m64:%{m32:%emay not use both -m32 and -m64}} \ %{m64:-mptr64 -mstack-bias -mno-v8plus \ %{!mcpu*:-%{!mv8plus:mcpu=v9}}} \ " #else #define CC1_SPEC "\ -%{sun4:} %{target:} \ %{m32:%{m64:%emay not use both -m32 and -m64}} \ %{m32:-mptr32 -mno-stack-bias \ %{!mcpu*:%{!mv8plus:-mcpu=v9}}} \ diff --git a/gcc/config/sparc/vxworks.h b/gcc/config/sparc/vxworks.h index 4d971a4bbc8..e1b596e7f79 100644 --- a/gcc/config/sparc/vxworks.h +++ b/gcc/config/sparc/vxworks.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for SPARC targeting the VxWorks run time environment. - Copyright (C) 2007, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -33,6 +33,9 @@ along with GCC; see the file COPYING3. If not see #undef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC VXWORKS_ADDITIONAL_CPP_SPEC +#undef ASM_SPEC +#define ASM_SPEC "%{fpic|fPIC|fpie|fPIE:-K PIC} %(asm_cpu)" + #undef LIB_SPEC #define LIB_SPEC VXWORKS_LIB_SPEC #undef LINK_SPEC diff --git a/gcc/config/xtensa/xtensa-protos.h b/gcc/config/xtensa/xtensa-protos.h index 5db4e4ef42f..0d1738f4e8b 100644 --- a/gcc/config/xtensa/xtensa-protos.h +++ b/gcc/config/xtensa/xtensa-protos.h @@ -1,5 +1,5 @@ /* Prototypes of target machine for GNU compiler for Xtensa. - Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 + Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Bob Wilson (bwilson@tensilica.com) at Tensilica. @@ -63,11 +63,6 @@ extern void print_operand (FILE *, rtx, int); extern void print_operand_address (FILE *, rtx); extern void xtensa_output_literal (FILE *, rtx, enum machine_mode, int); extern rtx xtensa_return_addr (int, rtx); -extern enum reg_class xtensa_preferred_reload_class (rtx, enum reg_class, int); -struct secondary_reload_info; -extern reg_class_t xtensa_secondary_reload (bool, rtx, reg_class_t, - enum machine_mode, - struct secondary_reload_info *); #endif /* RTX_CODE */ extern void xtensa_setup_frame_addresses (void); diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c index 85dac151c3d..b1ea5bd7872 100644 --- a/gcc/config/xtensa/xtensa.c +++ b/gcc/config/xtensa/xtensa.c @@ -162,6 +162,12 @@ static void xtensa_asm_trampoline_template (FILE *); static void xtensa_trampoline_init (rtx, tree, rtx); static bool xtensa_output_addr_const_extra (FILE *, rtx); +static reg_class_t xtensa_preferred_reload_class (rtx, reg_class_t); +static reg_class_t xtensa_preferred_output_reload_class (rtx, reg_class_t); +static reg_class_t xtensa_secondary_reload (bool, rtx, reg_class_t, + enum machine_mode, + struct secondary_reload_info *); + static bool constantpool_address_p (const_rtx addr); static const int reg_nonleaf_alloc_order[FIRST_PSEUDO_REGISTER] = @@ -260,6 +266,11 @@ static const struct default_options xtensa_option_optimization_table[] = #undef TARGET_EXPAND_BUILTIN #define TARGET_EXPAND_BUILTIN xtensa_expand_builtin +#undef TARGET_PREFERRED_RELOAD_CLASS +#define TARGET_PREFERRED_RELOAD_CLASS xtensa_preferred_reload_class +#undef TARGET_PREFERRED_OUTPUT_RELOAD_CLASS +#define TARGET_PREFERRED_OUTPUT_RELOAD_CLASS xtensa_preferred_output_reload_class + #undef TARGET_SECONDARY_RELOAD #define TARGET_SECONDARY_RELOAD xtensa_secondary_reload @@ -3153,11 +3164,12 @@ xtensa_expand_builtin (tree exp, rtx target, return NULL_RTX; } +/* Worker function for TARGET_PREFERRED_RELOAD_CLASS. */ -enum reg_class -xtensa_preferred_reload_class (rtx x, enum reg_class rclass, int isoutput) +static reg_class_t +xtensa_preferred_reload_class (rtx x, reg_class_t rclass) { - if (!isoutput && CONSTANT_P (x) && GET_CODE (x) == CONST_DOUBLE) + if (CONSTANT_P (x) && CONST_DOUBLE_P (x)) return NO_REGS; /* Don't use the stack pointer or hard frame pointer for reloads! @@ -3172,8 +3184,27 @@ xtensa_preferred_reload_class (rtx x, enum reg_class rclass, int isoutput) return rclass; } +/* Worker function for TARGET_PREFERRED_OUTPUT_RELOAD_CLASS. */ + +static reg_class_t +xtensa_preferred_output_reload_class (rtx x ATTRIBUTE_UNUSED, + reg_class_t rclass) +{ + /* Don't use the stack pointer or hard frame pointer for reloads! + The hard frame pointer would normally be OK except that it may + briefly hold an incoming argument in the prologue, and reload + won't know that it is live because the hard frame pointer is + treated specially. */ + + if (rclass == AR_REGS || rclass == GR_REGS) + return RL_REGS; + + return rclass; +} + +/* Worker function for TARGET_SECONDARY_RELOAD. */ -reg_class_t +static reg_class_t xtensa_secondary_reload (bool in_p, rtx x, reg_class_t rclass, enum machine_mode mode, secondary_reload_info *sri) { diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h index 3d498e1910a..098855b3c42 100644 --- a/gcc/config/xtensa/xtensa.h +++ b/gcc/config/xtensa/xtensa.h @@ -455,12 +455,6 @@ extern const enum reg_class xtensa_regno_to_class[FIRST_PSEUDO_REGISTER]; the RTL, as either incoming or outgoing arguments. */ #define TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P hook_bool_mode_true -#define PREFERRED_RELOAD_CLASS(X, CLASS) \ - xtensa_preferred_reload_class (X, CLASS, 0) - -#define PREFERRED_OUTPUT_RELOAD_CLASS(X, CLASS) \ - xtensa_preferred_reload_class (X, CLASS, 1) - /* Return the maximum number of consecutive registers needed to represent mode MODE in a register of class CLASS. */ #define CLASS_UNITS(mode, size) \ diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 673ec6c2b58..6dd6137ee5d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,15 @@ +2011-02-03 Dodji Seketeli <dodji@redhat.com> + + PR c++/47398 + * tree.c (cp_tree_equal)<TEMPLATE_PARM_INDEX>: Take the number of + template parameters in account. + +2011-02-03 Nathan Froyd <froydnj@codesourcery.com> + + PR c++/46890 + * parser.c (cp_parser_class_specifier): Fix setting of + want_semicolon. + 2011-01-31 Jakub Jelinek <jakub@redhat.com> PR c++/47416 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 2b6a752629c..11039b899cc 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -16998,18 +16998,15 @@ cp_parser_class_specifier (cp_parser* parser) class Z { } static const <type> var = ...; */ case CPP_KEYWORD: - if (keyword_is_storage_class_specifier (token->keyword) - || keyword_is_type_qualifier (token->keyword)) + if (keyword_is_decl_specifier (token->keyword)) { cp_token *lookahead = cp_lexer_peek_nth_token (parser->lexer, 2); - if (lookahead->type == CPP_KEYWORD - && !keyword_begins_type_specifier (lookahead->keyword)) - want_semicolon = false; - else if (lookahead->type == CPP_NAME) - /* Handling user-defined types here would be nice, but - very tricky. */ - want_semicolon = false; + /* Handling user-defined types here would be nice, but very + tricky. */ + want_semicolon + = (lookahead->type == CPP_KEYWORD + && keyword_begins_type_specifier (lookahead->keyword)); } break; default: diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 1a1f150e1ce..d62d2427f1e 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2176,6 +2176,9 @@ cp_tree_equal (tree t1, tree t2) BASELINK_FUNCTIONS (t2))); case TEMPLATE_PARM_INDEX: + if (TEMPLATE_PARM_NUM_SIBLINGS (t1) + != TEMPLATE_PARM_NUM_SIBLINGS (t2)) + return false; return (TEMPLATE_PARM_IDX (t1) == TEMPLATE_PARM_IDX (t2) && TEMPLATE_PARM_LEVEL (t1) == TEMPLATE_PARM_LEVEL (t2) && (TEMPLATE_PARM_PARAMETER_PACK (t1) diff --git a/gcc/cselib.c b/gcc/cselib.c index d2980150c7e..c142d679b7a 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -62,7 +62,8 @@ static void unchain_one_elt_loc_list (struct elt_loc_list **); static int discard_useless_locs (void **, void *); static int discard_useless_values (void **, void *); static void remove_useless_values (void); -static unsigned int cselib_hash_rtx (rtx, int); +static int rtx_equal_for_cselib_1 (rtx, rtx, enum machine_mode); +static unsigned int cselib_hash_rtx (rtx, int, enum machine_mode); static cselib_val *new_cselib_val (unsigned int, enum machine_mode, rtx); static void add_mem_for_addr (cselib_val *, cselib_val *, rtx); static cselib_val *cselib_lookup_mem (rtx, int); @@ -390,6 +391,26 @@ cselib_get_next_uid (void) return next_uid; } +/* See the documentation of cselib_find_slot below. */ +static enum machine_mode find_slot_memmode; + +/* Search for X, whose hashcode is HASH, in CSELIB_HASH_TABLE, + INSERTing if requested. When X is part of the address of a MEM, + MEMMODE should specify the mode of the MEM. While searching the + table, MEMMODE is held in FIND_SLOT_MEMMODE, so that autoinc RTXs + in X can be resolved. */ + +static void ** +cselib_find_slot (rtx x, hashval_t hash, enum insert_option insert, + enum machine_mode memmode) +{ + void **slot; + find_slot_memmode = memmode; + slot = htab_find_slot_with_hash (cselib_hash_table, x, hash, insert); + find_slot_memmode = VOIDmode; + return slot; +} + /* The equality test for our hash table. The first argument ENTRY is a table element (i.e. a cselib_val), while the second arg X is an rtx. We know that all callers of htab_find_slot_with_hash will wrap CONST_INTs into a @@ -419,7 +440,7 @@ entry_and_rtx_equal_p (const void *entry, const void *x_arg) /* We don't guarantee that distinct rtx's have different hash values, so we need to do a comparison. */ for (l = v->locs; l; l = l->next) - if (rtx_equal_for_cselib_p (l->loc, x)) + if (rtx_equal_for_cselib_1 (l->loc, x, find_slot_memmode)) { promote_debug_loc (l); return 1; @@ -631,13 +652,65 @@ cselib_reg_set_mode (const_rtx x) int rtx_equal_for_cselib_p (rtx x, rtx y) { + return rtx_equal_for_cselib_1 (x, y, VOIDmode); +} + +/* If x is a PLUS or an autoinc operation, expand the operation, + storing the offset, if any, in *OFF. */ + +static rtx +autoinc_split (rtx x, rtx *off, enum machine_mode memmode) +{ + switch (GET_CODE (x)) + { + case PLUS: + *off = XEXP (x, 1); + return XEXP (x, 0); + + case PRE_DEC: + if (memmode == VOIDmode) + return x; + + *off = GEN_INT (-GET_MODE_SIZE (memmode)); + return XEXP (x, 0); + break; + + case PRE_INC: + if (memmode == VOIDmode) + return x; + + *off = GEN_INT (GET_MODE_SIZE (memmode)); + return XEXP (x, 0); + + case PRE_MODIFY: + return XEXP (x, 1); + + case POST_DEC: + case POST_INC: + case POST_MODIFY: + return XEXP (x, 0); + + default: + return x; + } +} + +/* Return nonzero if we can prove that X and Y contain the same value, + taking our gathered information into account. MEMMODE holds the + mode of the enclosing MEM, if any, as required to deal with autoinc + addressing modes. If X and Y are not (known to be) part of + addresses, MEMMODE should be VOIDmode. */ + +static int +rtx_equal_for_cselib_1 (rtx x, rtx y, enum machine_mode memmode) +{ enum rtx_code code; const char *fmt; int i; if (REG_P (x) || MEM_P (x)) { - cselib_val *e = cselib_lookup (x, GET_MODE (x), 0); + cselib_val *e = cselib_lookup (x, GET_MODE (x), 0, memmode); if (e) x = e->val_rtx; @@ -645,7 +718,7 @@ rtx_equal_for_cselib_p (rtx x, rtx y) if (REG_P (y) || MEM_P (y)) { - cselib_val *e = cselib_lookup (y, GET_MODE (y), 0); + cselib_val *e = cselib_lookup (y, GET_MODE (y), 0, memmode); if (e) y = e->val_rtx; @@ -669,7 +742,7 @@ rtx_equal_for_cselib_p (rtx x, rtx y) /* Avoid infinite recursion. */ if (REG_P (t) || MEM_P (t)) continue; - else if (rtx_equal_for_cselib_p (t, y)) + else if (rtx_equal_for_cselib_1 (t, y, memmode)) return 1; } @@ -687,16 +760,37 @@ rtx_equal_for_cselib_p (rtx x, rtx y) if (REG_P (t) || MEM_P (t)) continue; - else if (rtx_equal_for_cselib_p (x, t)) + else if (rtx_equal_for_cselib_1 (x, t, memmode)) return 1; } return 0; } - if (GET_CODE (x) != GET_CODE (y) || GET_MODE (x) != GET_MODE (y)) + if (GET_MODE (x) != GET_MODE (y)) return 0; + if (GET_CODE (x) != GET_CODE (y)) + { + rtx xorig = x, yorig = y; + rtx xoff = NULL, yoff = NULL; + + x = autoinc_split (x, &xoff, memmode); + y = autoinc_split (y, &yoff, memmode); + + if (!xoff != !yoff) + return 0; + + if (xoff && !rtx_equal_for_cselib_1 (xoff, yoff, memmode)) + return 0; + + /* Don't recurse if nothing changed. */ + if (x != xorig || y != yorig) + return rtx_equal_for_cselib_1 (x, y, memmode); + + return 0; + } + /* These won't be handled correctly by the code below. */ switch (GET_CODE (x)) { @@ -712,6 +806,11 @@ rtx_equal_for_cselib_p (rtx x, rtx y) case LABEL_REF: return XEXP (x, 0) == XEXP (y, 0); + case MEM: + /* We have to compare any autoinc operations in the addresses + using this MEM's mode. */ + return rtx_equal_for_cselib_1 (XEXP (x, 0), XEXP (y, 0), GET_MODE (x)); + default: break; } @@ -744,18 +843,18 @@ rtx_equal_for_cselib_p (rtx x, rtx y) /* And the corresponding elements must match. */ for (j = 0; j < XVECLEN (x, i); j++) - if (! rtx_equal_for_cselib_p (XVECEXP (x, i, j), - XVECEXP (y, i, j))) + if (! rtx_equal_for_cselib_1 (XVECEXP (x, i, j), + XVECEXP (y, i, j), memmode)) return 0; break; case 'e': if (i == 1 && targetm.commutative_p (x, UNKNOWN) - && rtx_equal_for_cselib_p (XEXP (x, 1), XEXP (y, 0)) - && rtx_equal_for_cselib_p (XEXP (x, 0), XEXP (y, 1))) + && rtx_equal_for_cselib_1 (XEXP (x, 1), XEXP (y, 0), memmode) + && rtx_equal_for_cselib_1 (XEXP (x, 0), XEXP (y, 1), memmode)) return 1; - if (! rtx_equal_for_cselib_p (XEXP (x, i), XEXP (y, i))) + if (! rtx_equal_for_cselib_1 (XEXP (x, i), XEXP (y, i), memmode)) return 0; break; @@ -807,6 +906,8 @@ wrap_constant (enum machine_mode mode, rtx x) that take commutativity into account. If we wanted to also support associative rules, we'd have to use a different strategy to avoid returning spurious 0, e.g. return ~(~0U >> 1) . + MEMMODE indicates the mode of an enclosing MEM, and it's only + used to compute autoinc values. We used to have a MODE argument for hashing for CONST_INTs, but that didn't make sense, since it caused spurious hash differences between (set (reg:SI 1) (const_int)) @@ -817,7 +918,7 @@ wrap_constant (enum machine_mode mode, rtx x) in a comparison anyway, since relying on hash differences is unsafe. */ static unsigned int -cselib_hash_rtx (rtx x, int create) +cselib_hash_rtx (rtx x, int create, enum machine_mode memmode) { cselib_val *e; int i, j; @@ -832,7 +933,7 @@ cselib_hash_rtx (rtx x, int create) { case MEM: case REG: - e = cselib_lookup (x, GET_MODE (x), create); + e = cselib_lookup (x, GET_MODE (x), create, memmode); if (! e) return 0; @@ -878,7 +979,7 @@ cselib_hash_rtx (rtx x, int create) for (i = 0; i < units; ++i) { elt = CONST_VECTOR_ELT (x, i); - hash += cselib_hash_rtx (elt, 0); + hash += cselib_hash_rtx (elt, 0, memmode); } return hash; @@ -911,10 +1012,28 @@ cselib_hash_rtx (rtx x, int create) case PRE_DEC: case PRE_INC: + /* We can't compute these without knowing the MEM mode. */ + gcc_assert (memmode != VOIDmode); + i = GET_MODE_SIZE (memmode); + if (code == PRE_DEC) + i = -i; + /* Adjust the hash so that (mem:MEMMODE (pre_* (reg))) hashes + like (mem:MEMMODE (plus (reg) (const_int I))). */ + hash += (unsigned) PLUS - (unsigned)code + + cselib_hash_rtx (XEXP (x, 0), create, memmode) + + cselib_hash_rtx (GEN_INT (i), create, memmode); + return hash ? hash : 1 + (unsigned) PLUS; + + case PRE_MODIFY: + gcc_assert (memmode != VOIDmode); + return cselib_hash_rtx (XEXP (x, 1), create, memmode); + case POST_DEC: case POST_INC: case POST_MODIFY: - case PRE_MODIFY: + gcc_assert (memmode != VOIDmode); + return cselib_hash_rtx (XEXP (x, 0), create, memmode); + case PC: case CC0: case CALL: @@ -940,7 +1059,7 @@ cselib_hash_rtx (rtx x, int create) case 'e': { rtx tem = XEXP (x, i); - unsigned int tem_hash = cselib_hash_rtx (tem, create); + unsigned int tem_hash = cselib_hash_rtx (tem, create, memmode); if (tem_hash == 0) return 0; @@ -952,7 +1071,7 @@ cselib_hash_rtx (rtx x, int create) for (j = 0; j < XVECLEN (x, i); j++) { unsigned int tem_hash - = cselib_hash_rtx (XVECEXP (x, i, j), create); + = cselib_hash_rtx (XVECEXP (x, i, j), create, memmode); if (tem_hash == 0) return 0; @@ -1065,6 +1184,7 @@ static cselib_val * cselib_lookup_mem (rtx x, int create) { enum machine_mode mode = GET_MODE (x); + enum machine_mode addr_mode; void **slot; cselib_val *addr; cselib_val *mem_elt; @@ -1075,8 +1195,12 @@ cselib_lookup_mem (rtx x, int create) || (FLOAT_MODE_P (mode) && flag_float_store)) return 0; + addr_mode = GET_MODE (XEXP (x, 0)); + if (addr_mode == VOIDmode) + addr_mode = Pmode; + /* Look up the value for the address. */ - addr = cselib_lookup (XEXP (x, 0), mode, create); + addr = cselib_lookup (XEXP (x, 0), addr_mode, create, mode); if (! addr) return 0; @@ -1093,8 +1217,8 @@ cselib_lookup_mem (rtx x, int create) mem_elt = new_cselib_val (next_uid, mode, x); add_mem_for_addr (addr, mem_elt, x); - slot = htab_find_slot_with_hash (cselib_hash_table, wrap_constant (mode, x), - mem_elt->hash, INSERT); + slot = cselib_find_slot (wrap_constant (mode, x), mem_elt->hash, + INSERT, mode); *slot = mem_elt; return mem_elt; } @@ -1526,10 +1650,11 @@ cselib_expand_value_rtx_1 (rtx orig, struct expand_value_data *evd, with VALUE expressions. This way, it becomes independent of changes to registers and memory. X isn't actually modified; if modifications are needed, new rtl is - allocated. However, the return value can share rtl with X. */ + allocated. However, the return value can share rtl with X. + If X is within a MEM, MEMMODE must be the mode of the MEM. */ rtx -cselib_subst_to_values (rtx x) +cselib_subst_to_values (rtx x, enum machine_mode memmode) { enum rtx_code code = GET_CODE (x); const char *fmt = GET_RTX_FORMAT (code); @@ -1552,10 +1677,11 @@ cselib_subst_to_values (rtx x) case MEM: e = cselib_lookup_mem (x, 0); + /* This used to happen for autoincrements, but we deal with them + properly now. Remove the if stmt for the next release. */ if (! e) { - /* This happens for autoincrements. Assign a value that doesn't - match any other. */ + /* Assign a value that doesn't match any other. */ e = new_cselib_val (next_uid, GET_MODE (x), x); } return e->val_rtx; @@ -1566,14 +1692,24 @@ cselib_subst_to_values (rtx x) case CONST_FIXED: return x; - case POST_INC: + case PRE_DEC: case PRE_INC: + gcc_assert (memmode != VOIDmode); + i = GET_MODE_SIZE (memmode); + if (code == PRE_DEC) + i = -i; + return cselib_subst_to_values (plus_constant (XEXP (x, 0), i), + memmode); + + case PRE_MODIFY: + gcc_assert (memmode != VOIDmode); + return cselib_subst_to_values (XEXP (x, 1), memmode); + case POST_DEC: - case PRE_DEC: + case POST_INC: case POST_MODIFY: - case PRE_MODIFY: - e = new_cselib_val (next_uid, GET_MODE (x), x); - return e->val_rtx; + gcc_assert (memmode != VOIDmode); + return cselib_subst_to_values (XEXP (x, 0), memmode); default: break; @@ -1583,7 +1719,7 @@ cselib_subst_to_values (rtx x) { if (fmt[i] == 'e') { - rtx t = cselib_subst_to_values (XEXP (x, i)); + rtx t = cselib_subst_to_values (XEXP (x, i), memmode); if (t != XEXP (x, i)) { @@ -1598,7 +1734,7 @@ cselib_subst_to_values (rtx x) for (j = 0; j < XVECLEN (x, i); j++) { - rtx t = cselib_subst_to_values (XVECEXP (x, i, j)); + rtx t = cselib_subst_to_values (XVECEXP (x, i, j), memmode); if (t != XVECEXP (x, i, j)) { @@ -1617,13 +1753,16 @@ cselib_subst_to_values (rtx x) return copy; } -/* Look up the rtl expression X in our tables and return the value it has. - If CREATE is zero, we return NULL if we don't know the value. Otherwise, - we create a new one if possible, using mode MODE if X doesn't have a mode - (i.e. because it's a constant). */ +/* Look up the rtl expression X in our tables and return the value it + has. If CREATE is zero, we return NULL if we don't know the value. + Otherwise, we create a new one if possible, using mode MODE if X + doesn't have a mode (i.e. because it's a constant). When X is part + of an address, MEMMODE should be the mode of the enclosing MEM if + we're tracking autoinc expressions. */ static cselib_val * -cselib_lookup_1 (rtx x, enum machine_mode mode, int create) +cselib_lookup_1 (rtx x, enum machine_mode mode, + int create, enum machine_mode memmode) { void **slot; cselib_val *e; @@ -1672,7 +1811,7 @@ cselib_lookup_1 (rtx x, enum machine_mode mode, int create) REG_VALUES (i) = new_elt_list (REG_VALUES (i), NULL); } REG_VALUES (i)->next = new_elt_list (REG_VALUES (i)->next, e); - slot = htab_find_slot_with_hash (cselib_hash_table, x, e->hash, INSERT); + slot = cselib_find_slot (x, e->hash, INSERT, memmode); *slot = e; return e; } @@ -1680,13 +1819,13 @@ cselib_lookup_1 (rtx x, enum machine_mode mode, int create) if (MEM_P (x)) return cselib_lookup_mem (x, create); - hashval = cselib_hash_rtx (x, create); + hashval = cselib_hash_rtx (x, create, memmode); /* Can't even create if hashing is not possible. */ if (! hashval) return 0; - slot = htab_find_slot_with_hash (cselib_hash_table, wrap_constant (mode, x), - hashval, create ? INSERT : NO_INSERT); + slot = cselib_find_slot (wrap_constant (mode, x), hashval, + create ? INSERT : NO_INSERT, memmode); if (slot == 0) return 0; @@ -1700,7 +1839,8 @@ cselib_lookup_1 (rtx x, enum machine_mode mode, int create) the hash table is inconsistent until we do so, and cselib_subst_to_values will need to do lookups. */ *slot = (void *) e; - e->locs = new_elt_loc_list (e->locs, cselib_subst_to_values (x)); + e->locs = new_elt_loc_list (e->locs, + cselib_subst_to_values (x, memmode)); return e; } @@ -1708,14 +1848,14 @@ cselib_lookup_1 (rtx x, enum machine_mode mode, int create) cselib_val * cselib_lookup_from_insn (rtx x, enum machine_mode mode, - int create, rtx insn) + int create, enum machine_mode memmode, rtx insn) { cselib_val *ret; gcc_assert (!cselib_current_insn); cselib_current_insn = insn; - ret = cselib_lookup (x, mode, create); + ret = cselib_lookup (x, mode, create, memmode); cselib_current_insn = NULL; @@ -1726,9 +1866,10 @@ cselib_lookup_from_insn (rtx x, enum machine_mode mode, maintains invariants related with debug insns. */ cselib_val * -cselib_lookup (rtx x, enum machine_mode mode, int create) +cselib_lookup (rtx x, enum machine_mode mode, + int create, enum machine_mode memmode) { - cselib_val *ret = cselib_lookup_1 (x, mode, create); + cselib_val *ret = cselib_lookup_1 (x, mode, create, memmode); /* ??? Should we return NULL if we're not to create an entry, the found loc is a debug loc and cselib_current_insn is not DEBUG? @@ -1913,7 +2054,7 @@ cselib_invalidate_mem (rtx mem_rtx) /* This one overlaps. */ /* We must have a mapping from this MEM's address to the value (E). Remove that, too. */ - addr = cselib_lookup (XEXP (x, 0), VOIDmode, 0); + addr = cselib_lookup (XEXP (x, 0), VOIDmode, 0, GET_MODE (x)); mem_chain = &addr->addr_list; for (;;) { @@ -1963,13 +2104,6 @@ cselib_invalidate_rtx (rtx dest) cselib_invalidate_regno (REGNO (dest), GET_MODE (dest)); else if (MEM_P (dest)) cselib_invalidate_mem (dest); - - /* Some machines don't define AUTO_INC_DEC, but they still use push - instructions. We need to catch that case here in order to - invalidate the stack pointer correctly. Note that invalidating - the stack pointer is different from invalidating DEST. */ - if (push_operand (dest, GET_MODE (dest))) - cselib_invalidate_rtx (stack_pointer_rtx); } /* A wrapper for cselib_invalidate_rtx to be called via note_stores. */ @@ -2032,7 +2166,35 @@ cselib_record_set (rtx dest, cselib_val *src_elt, cselib_val *dest_addr_elt) in a PARALLEL. Since it's fairly cheap, use a really large number. */ #define MAX_SETS (FIRST_PSEUDO_REGISTER * 2) -/* Record the effects of any sets in INSN. */ +struct cselib_record_autoinc_data +{ + struct cselib_set *sets; + int n_sets; +}; + +/* Callback for for_each_inc_dec. Records in ARG the SETs implied by + autoinc RTXs: SRC plus SRCOFF if non-NULL is stored in DEST. */ + +static int +cselib_record_autoinc_cb (rtx mem ATTRIBUTE_UNUSED, rtx op ATTRIBUTE_UNUSED, + rtx dest, rtx src, rtx srcoff, void *arg) +{ + struct cselib_record_autoinc_data *data; + data = (struct cselib_record_autoinc_data *)arg; + + data->sets[data->n_sets].dest = dest; + + if (srcoff) + data->sets[data->n_sets].src = gen_rtx_PLUS (GET_MODE (src), src, srcoff); + else + data->sets[data->n_sets].src = src; + + data->n_sets++; + + return -1; +} + +/* Record the effects of any sets and autoincs in INSN. */ static void cselib_record_sets (rtx insn) { @@ -2041,6 +2203,8 @@ cselib_record_sets (rtx insn) struct cselib_set sets[MAX_SETS]; rtx body = PATTERN (insn); rtx cond = 0; + int n_sets_before_autoinc; + struct cselib_record_autoinc_data data; body = PATTERN (insn); if (GET_CODE (body) == COND_EXEC) @@ -2084,6 +2248,11 @@ cselib_record_sets (rtx insn) sets[0].src = XEXP (note, 0); } + data.sets = sets; + data.n_sets = n_sets_before_autoinc = n_sets; + for_each_inc_dec (&insn, cselib_record_autoinc_cb, &data); + n_sets = data.n_sets; + /* Look up the values that are read. Do this before invalidating the locations that are written. */ for (i = 0; i < n_sets; i++) @@ -2102,14 +2271,15 @@ cselib_record_sets (rtx insn) rtx src = sets[i].src; if (cond) src = gen_rtx_IF_THEN_ELSE (GET_MODE (dest), cond, src, dest); - sets[i].src_elt = cselib_lookup (src, GET_MODE (dest), 1); + sets[i].src_elt = cselib_lookup (src, GET_MODE (dest), 1, VOIDmode); if (MEM_P (dest)) { enum machine_mode address_mode = targetm.addr_space.address_mode (MEM_ADDR_SPACE (dest)); sets[i].dest_addr_elt = cselib_lookup (XEXP (dest, 0), - address_mode, 1); + address_mode, 1, + GET_MODE (dest)); } else sets[i].dest_addr_elt = 0; @@ -2124,6 +2294,9 @@ cselib_record_sets (rtx insn) locations may go away. */ note_stores (body, cselib_invalidate_rtx_note_stores, NULL); + for (i = n_sets_before_autoinc; i < n_sets; i++) + cselib_invalidate_rtx (sets[i].dest); + /* If this is an asm, look for duplicate sets. This can happen when the user uses the same value as an output multiple times. This is valid if the outputs are not actually used thereafter. Treat this case as @@ -2208,15 +2381,6 @@ cselib_process_insn (rtx insn) cselib_record_sets (insn); -#ifdef AUTO_INC_DEC - /* Clobber any registers which appear in REG_INC notes. We - could keep track of the changes to their values, but it is - unlikely to help. */ - for (x = REG_NOTES (insn); x; x = XEXP (x, 1)) - if (REG_NOTE_KIND (x) == REG_INC) - cselib_invalidate_rtx (XEXP (x, 0)); -#endif - /* Look for any CLOBBERs in CALL_INSN_FUNCTION_USAGE, but only after we have processed the insn. */ if (CALL_P (insn)) diff --git a/gcc/cselib.h b/gcc/cselib.h index d07c8330d47..3590f980e43 100644 --- a/gcc/cselib.h +++ b/gcc/cselib.h @@ -70,8 +70,10 @@ extern void (*cselib_discard_hook) (cselib_val *); extern void (*cselib_record_sets_hook) (rtx insn, struct cselib_set *sets, int n_sets); -extern cselib_val *cselib_lookup (rtx, enum machine_mode, int); -extern cselib_val *cselib_lookup_from_insn (rtx, enum machine_mode, int, rtx); +extern cselib_val *cselib_lookup (rtx, enum machine_mode, + int, enum machine_mode); +extern cselib_val *cselib_lookup_from_insn (rtx, enum machine_mode, + int, enum machine_mode, rtx); extern void cselib_init (int); extern void cselib_clear_table (void); extern void cselib_finish (void); @@ -85,7 +87,7 @@ extern rtx cselib_expand_value_rtx_cb (rtx, bitmap, int, cselib_expand_callback, void *); extern bool cselib_dummy_expand_value_rtx_cb (rtx, bitmap, int, cselib_expand_callback, void *); -extern rtx cselib_subst_to_values (rtx); +extern rtx cselib_subst_to_values (rtx, enum machine_mode); extern void cselib_invalidate_rtx (rtx); extern void cselib_reset_table (unsigned int); diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 1400d2569b0..42b4b145c02 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -1,6 +1,6 @@ /* Scanning of rtl for dataflow analysis. Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008, 2009, 2010 Free Software Foundation, Inc. + 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Originally contributed by Michael P. Hayes (m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com) Major rewrite contributed by Danny Berlin (dberlin@dberlin.org) @@ -3360,16 +3360,19 @@ df_get_call_refs (struct df_collection_rec * collection_rec, NULL, bb, insn_info, DF_REF_REG_USE, DF_REF_CALL_STACK_USAGE | flags); - /* Calls may also reference any of the global registers, - so they are recorded as used. */ - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - if (global_regs[i]) - { - df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i], - NULL, bb, insn_info, DF_REF_REG_USE, flags); - df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i], - NULL, bb, insn_info, DF_REF_REG_DEF, flags); - } + /* Calls to const functions cannot access any global registers and calls to + pure functions cannot set them. All other calls may reference any of the + global registers, so they are recorded as used. */ + if (!RTL_CONST_CALL_P (insn_info->insn)) + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) + if (global_regs[i]) + { + df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i], + NULL, bb, insn_info, DF_REF_REG_USE, flags); + if (!RTL_PURE_CALL_P (insn_info->insn)) + df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i], + NULL, bb, insn_info, DF_REF_REG_DEF, flags); + } is_sibling_call = SIBLING_CALL_P (insn_info->insn); EXECUTE_IF_SET_IN_BITMAP (regs_invalidated_by_call_regset, 0, ui, bi) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index cf025bdf05e..67513608e3d 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -12359,6 +12359,12 @@ vector bool long vec_cmplt (vector double, vector double); vector float vec_div (vector float, vector float); vector double vec_div (vector double, vector double); vector double vec_floor (vector double); +vector double vec_ld (int, const vector double *); +vector double vec_ld (int, const double *); +vector double vec_ldl (int, const vector double *); +vector double vec_ldl (int, const double *); +vector unsigned char vec_lvsl (int, const volatile double *); +vector unsigned char vec_lvsr (int, const volatile double *); vector double vec_madd (vector double, vector double, vector double); vector double vec_max (vector double, vector double); vector double vec_min (vector double, vector double); @@ -12387,6 +12393,8 @@ vector double vec_sel (vector double, vector double, vector unsigned long); vector double vec_sub (vector double, vector double); vector float vec_sqrt (vector float); vector double vec_sqrt (vector double); +void vec_st (vector double, int, vector double *); +void vec_st (vector double, int, double *); vector double vec_trunc (vector double); vector double vec_xor (vector double, vector double); vector double vec_xor (vector double, vector bool long); @@ -12415,7 +12423,65 @@ int vec_any_ngt (vector double, vector double); int vec_any_nle (vector double, vector double); int vec_any_nlt (vector double, vector double); int vec_any_numeric (vector double); -@end smallexample + +vector double vec_vsx_ld (int, const vector double *); +vector double vec_vsx_ld (int, const double *); +vector float vec_vsx_ld (int, const vector float *); +vector float vec_vsx_ld (int, const float *); +vector bool int vec_vsx_ld (int, const vector bool int *); +vector signed int vec_vsx_ld (int, const vector signed int *); +vector signed int vec_vsx_ld (int, const int *); +vector signed int vec_vsx_ld (int, const long *); +vector unsigned int vec_vsx_ld (int, const vector unsigned int *); +vector unsigned int vec_vsx_ld (int, const unsigned int *); +vector unsigned int vec_vsx_ld (int, const unsigned long *); +vector bool short vec_vsx_ld (int, const vector bool short *); +vector pixel vec_vsx_ld (int, const vector pixel *); +vector signed short vec_vsx_ld (int, const vector signed short *); +vector signed short vec_vsx_ld (int, const short *); +vector unsigned short vec_vsx_ld (int, const vector unsigned short *); +vector unsigned short vec_vsx_ld (int, const unsigned short *); +vector bool char vec_vsx_ld (int, const vector bool char *); +vector signed char vec_vsx_ld (int, const vector signed char *); +vector signed char vec_vsx_ld (int, const signed char *); +vector unsigned char vec_vsx_ld (int, const vector unsigned char *); +vector unsigned char vec_vsx_ld (int, const unsigned char *); + +void vec_vsx_st (vector double, int, vector double *); +void vec_vsx_st (vector double, int, double *); +void vec_vsx_st (vector float, int, vector float *); +void vec_vsx_st (vector float, int, float *); +void vec_vsx_st (vector signed int, int, vector signed int *); +void vec_vsx_st (vector signed int, int, int *); +void vec_vsx_st (vector unsigned int, int, vector unsigned int *); +void vec_vsx_st (vector unsigned int, int, unsigned int *); +void vec_vsx_st (vector bool int, int, vector bool int *); +void vec_vsx_st (vector bool int, int, unsigned int *); +void vec_vsx_st (vector bool int, int, int *); +void vec_vsx_st (vector signed short, int, vector signed short *); +void vec_vsx_st (vector signed short, int, short *); +void vec_vsx_st (vector unsigned short, int, vector unsigned short *); +void vec_vsx_st (vector unsigned short, int, unsigned short *); +void vec_vsx_st (vector bool short, int, vector bool short *); +void vec_vsx_st (vector bool short, int, unsigned short *); +void vec_vsx_st (vector pixel, int, vector pixel *); +void vec_vsx_st (vector pixel, int, unsigned short *); +void vec_vsx_st (vector pixel, int, short *); +void vec_vsx_st (vector bool short, int, short *); +void vec_vsx_st (vector signed char, int, vector signed char *); +void vec_vsx_st (vector signed char, int, signed char *); +void vec_vsx_st (vector unsigned char, int, vector unsigned char *); +void vec_vsx_st (vector unsigned char, int, unsigned char *); +void vec_vsx_st (vector bool char, int, vector bool char *); +void vec_vsx_st (vector bool char, int, unsigned char *); +void vec_vsx_st (vector bool char, int, signed char *); +@end smallexample + +Note that the @samp{vec_ld} and @samp{vec_st} builtins will always +generate the Altivec @samp{LVX} and @samp{STVX} instructions even +if the VSX instruction set is available. The @samp{vec_vsx_ld} and +@samp{vec_vsx_st} builtins will always generate the VSX @samp{LXVD2X}, +@samp{LXVW4X}, @samp{STXVD2X}, and @samp{STXVW4X} instructions. GCC provides a few other builtins on Powerpc to access certain instructions: @smallexample diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b562f8761c5..e888c410b3a 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -8034,8 +8034,7 @@ If combined with @option{-fprofile-arcs}, it adds code so that some data about values of expressions in the program is gathered. With @option{-fbranch-probabilities}, it reads back the data gathered -from profiling values of expressions and adds @samp{REG_VALUE_PROFILE} -notes to instructions for their later usage in optimizations. +from profiling values of expressions for usage in optimizations. Enabled with @option{-fprofile-generate} and @option{-fprofile-use}. @@ -8468,6 +8467,10 @@ optimization when a new iv is added to the set. Bound on size of expressions used in the scalar evolutions analyzer. Large expressions slow the analyzer. +@item scev-max-expr-complexity +Bound on the complexity of the expressions in the scalar evolutions analyzer. +Complex expressions slow the analyzer. + @item omega-max-vars The maximum number of variables in an Omega constraint system. The default value is 128. diff --git a/gcc/dse.c b/gcc/dse.c index 1debafc385a..11639816bca 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -806,82 +806,25 @@ free_store_info (insn_info_t insn_info) insn_info->store_rec = NULL; } - -struct insn_size { - int size; - rtx insn; -}; - - -/* Add an insn to do the add inside a x if it is a - PRE/POST-INC/DEC/MODIFY. D is an structure containing the insn and - the size of the mode of the MEM that this is inside of. */ +/* Callback for for_each_inc_dec that emits an INSN that sets DEST to + SRC + SRCOFF before insn ARG. */ static int -replace_inc_dec (rtx *r, void *d) +emit_inc_dec_insn_before (rtx mem ATTRIBUTE_UNUSED, + rtx op ATTRIBUTE_UNUSED, + rtx dest, rtx src, rtx srcoff, void *arg) { - rtx x = *r; - struct insn_size *data = (struct insn_size *)d; - switch (GET_CODE (x)) - { - case PRE_INC: - case POST_INC: - { - rtx r1 = XEXP (x, 0); - rtx c = gen_int_mode (data->size, GET_MODE (r1)); - emit_insn_before (gen_rtx_SET (VOIDmode, r1, - gen_rtx_PLUS (GET_MODE (r1), r1, c)), - data->insn); - return -1; - } + rtx insn = (rtx)arg; - case PRE_DEC: - case POST_DEC: - { - rtx r1 = XEXP (x, 0); - rtx c = gen_int_mode (-data->size, GET_MODE (r1)); - emit_insn_before (gen_rtx_SET (VOIDmode, r1, - gen_rtx_PLUS (GET_MODE (r1), r1, c)), - data->insn); - return -1; - } + if (srcoff) + src = gen_rtx_PLUS (GET_MODE (src), src, srcoff); - case PRE_MODIFY: - case POST_MODIFY: - { - /* We can reuse the add because we are about to delete the - insn that contained it. */ - rtx add = XEXP (x, 0); - rtx r1 = XEXP (add, 0); - emit_insn_before (gen_rtx_SET (VOIDmode, r1, add), data->insn); - return -1; - } - - default: - return 0; - } -} + /* We can reuse all operands without copying, because we are about + to delete the insn that contained it. */ + emit_insn_before (gen_rtx_SET (VOIDmode, dest, src), insn); -/* If X is a MEM, check the address to see if it is PRE/POST-INC/DEC/MODIFY - and generate an add to replace that. */ - -static int -replace_inc_dec_mem (rtx *r, void *d) -{ - rtx x = *r; - if (x != NULL_RTX && MEM_P (x)) - { - struct insn_size data; - - data.size = GET_MODE_SIZE (GET_MODE (x)); - data.insn = (rtx) d; - - for_each_rtx (&XEXP (x, 0), replace_inc_dec, &data); - - return -1; - } - return 0; + return -1; } /* Before we delete INSN, make sure that the auto inc/dec, if it is @@ -892,7 +835,7 @@ check_for_inc_dec (rtx insn) { rtx note = find_reg_note (insn, REG_INC, NULL_RTX); if (note) - for_each_rtx (&insn, replace_inc_dec_mem, insn); + for_each_inc_dec (&insn, emit_inc_dec_insn_before, insn); } @@ -1107,7 +1050,7 @@ canon_address (rtx mem, *alias_set_out = 0; - cselib_lookup (mem_address, address_mode, 1); + cselib_lookup (mem_address, address_mode, 1, GET_MODE (mem)); if (dump_file) { @@ -1187,7 +1130,7 @@ canon_address (rtx mem, } } - *base = cselib_lookup (address, address_mode, true); + *base = cselib_lookup (address, address_mode, true, GET_MODE (mem)); *group_id = -1; if (*base == NULL) diff --git a/gcc/expr.c b/gcc/expr.c index e6b42795b3a..b09b1ac07c2 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -7695,6 +7695,18 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, optab opt = fma_optab; gimple def0, def2; + /* If there is no insn for FMA, emit it as __builtin_fma{,f,l} + call. */ + if (optab_handler (fma_optab, mode) == CODE_FOR_nothing) + { + tree fn = mathfn_built_in (TREE_TYPE (treeop0), BUILT_IN_FMA); + tree call_expr; + + gcc_assert (fn != NULL_TREE); + call_expr = build_call_expr (fn, 3, treeop0, treeop1, treeop2); + return expand_builtin (call_expr, target, subtarget, mode, false); + } + def0 = get_def_for_expr (treeop0, NEGATE_EXPR); def2 = get_def_for_expr (treeop2, NEGATE_EXPR); @@ -8375,6 +8387,13 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, NULL); g = get_gimple_for_ssa_name (exp); + /* For EXPAND_INITIALIZER try harder to get something simpler. */ + if (g == NULL + && modifier == EXPAND_INITIALIZER + && !SSA_NAME_IS_DEFAULT_DEF (exp) + && (optimize || DECL_IGNORED_P (SSA_NAME_VAR (exp))) + && stmt_is_replaceable_p (SSA_NAME_DEF_STMT (exp))) + g = SSA_NAME_DEF_STMT (exp); if (g) return expand_expr_real (gimple_assign_rhs_to_tree (g), target, tmode, modifier, NULL); diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2331b973e00..e514dce078e 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,40 @@ +2011-02-06 Janne Blomqvist <jb@gcc.gnu.org> + + * gfortran.texi (Compiler Characteristics): Add reference to + thread-safety section. + +2011-02-06 Janne Blomqvist <jb@gcc.gnu.org> + + * gfortran.texi (Thread-safety): New section. + * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety. + (GETENV): Likewise. + (GET_ENVIRONMENT_VARIABLE): Likewise. + (SYSTEM): Likewise. + +2011-02-06 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/47592 + * trans-stmt.c (gfc_trans_allocate): For deferred character + length allocations with SOURCE, store to the values and string + length to avoid calculating twice. Replace gfc_start_block + with gfc_init_block to avoid unnecessary contexts and to keep + declarations of temporaries where they should be. Tidy up the + code a bit. + +2011-02-05 Janne Blomqvist <jb@gcc.gnu.org> + + PR fortran/42434 + * intrinsic.texi (SYSTEM_CLOCK): Update documentation. + +2011-02-02 Janus Weil <janus@gcc.gnu.org> + Paul Thomas <pault@gcc.gnu.org> + + PR fortran/47082 + * trans-expr.c (gfc_trans_class_init_assign): Add call to + gfc_get_derived_type. + * module.c (read_cleanup): Do not use unique_symtrees for vtabs + or vtypes. + 2011-02-02 Janus Weil <janus@gcc.gnu.org> PR fortran/47572 diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index a34d82e529d..035dbd74879 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -1083,6 +1083,7 @@ might in some way or another become visible to the programmer. @menu * KIND Type Parameters:: * Internal representation of LOGICAL variables:: +* Thread-safety of the runtime library:: @end menu @@ -1157,6 +1158,36 @@ representation of @code{LOGICAL} variables in GNU Fortran is identical to C99 _Bool, except for a possible difference in storage size depending on the kind. + +@node Thread-safety of the runtime library +@section Thread-safety of the runtime library +@cindex thread-safety, threads + +GNU Fortran can be used in programs with multiple threads, e.g. by +using OpenMP, by calling OS thread handling functions via the +@code{ISO_C_BINDING} facility, or by GNU Fortran compiled library code +being called from a multi-threaded program. + +The GNU Fortran runtime library, (@var{libgfortran}), supports being +called concurrently from multiple threads with the following +exceptions. + +During library initialization, the C @code{getenv()} function is used, +which need not be thread-safe. Similarly, the @code{getenv()} +function is used to implement the @code{GET_ENVIRONMENT_VARIABLE} and +@code{GETENV} intrinsics. It is the responsibility of the user to +ensure that the environment is not being updated concurrently when any +of these actions are taking place. + +The @code{EXECUTE_COMMAND_LINE} and @code{SYSTEM} intrinsics are +implemented with the @code{system()} function, which need not be +thread-safe. It is the responsibility of the user to ensure that +@code{system()} is not called concurrently. + +Finally, for platforms not supporting thread-safe @code{POSIX} +functions, further functionality might not be thread-safe. For +details, please consult the documentation for your operating system. + @c --------------------------------------------------------------------- @c Extensions @c --------------------------------------------------------------------- diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index d8a97c55971..ea5528fe111 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -4162,6 +4162,9 @@ the command, as returned by @code{system}. @code{CMDSTAT} is set to zero if the command line was executed (whatever its exit status was). @code{CMDMSG} is assigned an error message if an error has occurred. +Note that the @code{system()} call need not be thread-safe. It is the +responsibility of the user to ensure that @code{system()} is not +called concurrently. @item @emph{Standard}: Fortran 2008 and later @@ -5452,11 +5455,15 @@ END PROGRAM @item @emph{Description}: Get the @var{VALUE} of the environmental variable @var{NAME}. -This intrinsic routine is provided for backwards compatibility with -GNU Fortran 77. In new code, programmers should consider the use of +This intrinsic routine is provided for backwards compatibility with +GNU Fortran 77. In new code, programmers should consider the use of the @ref{GET_ENVIRONMENT_VARIABLE} intrinsic defined by the Fortran 2003 standard. +Note that @code{GETENV} need not be thread-safe. It is the +responsibility of the user to ensure that the environment is not being +updated concurrently with a call to the @code{GETENV} intrinsic. + @item @emph{Standard}: GNU extension @@ -5501,6 +5508,11 @@ END PROGRAM @item @emph{Description}: Get the @var{VALUE} of the environmental variable @var{NAME}. +Note that @code{GET_ENVIRONMENT_VARIABLE} need not be thread-safe. It +is the responsibility of the user to ensure that the environment is +not being updated concurrently with a call to the +@code{GET_ENVIRONMENT_VARIABLE} intrinsic. + @item @emph{Standard}: Fortran 2003 and later @@ -11779,6 +11791,10 @@ and environment-dependent. This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit. +Note that the @code{system()} call need not be thread-safe. It is the +responsibility of the user to ensure that @code{system()} is not +called concurrently. + @item @emph{Standard}: GNU extension @@ -11812,14 +11828,29 @@ and should considered in new code for future portability. @table @asis @item @emph{Description}: -Determines the @var{COUNT} of milliseconds of wall clock time since -the Epoch (00:00:00 UTC, January 1, 1970) modulo @var{COUNT_MAX}, -@var{COUNT_RATE} determines the number of clock ticks per second. -@var{COUNT_RATE} and @var{COUNT_MAX} are constant and specific to -@command{gfortran}. +Determines the @var{COUNT} of a processor clock since an unspecified +time in the past modulo @var{COUNT_MAX}, @var{COUNT_RATE} determines +the number of clock ticks per second. If the platform supports a high +resolution monotonic clock, that clock is used and can provide up to +nanosecond resolution. If a high resolution monotonic clock is not +available, the implementation falls back to a potentially lower +resolution realtime clock. + +@var{COUNT_RATE} and @var{COUNT_MAX} vary depending on the kind of the +arguments. For @var{kind=8} arguments, @var{COUNT} represents +nanoseconds, and for @var{kind=4} arguments, @var{COUNT} represents +milliseconds. Other than the kind dependency, @var{COUNT_RATE} and +@var{COUNT_MAX} are constant, however the particular values are +specific to @command{gfortran}. If there is no clock, @var{COUNT} is set to @code{-HUGE(COUNT)}, and -@var{COUNT_RATE} and @var{COUNT_MAX} are set to zero +@var{COUNT_RATE} and @var{COUNT_MAX} are set to zero. + +When running on a platform using the GNU C library (glibc), or a +derivative thereof, the high resolution monotonic clock is available +only when linking with the @var{rt} library. This can be done +explicitly by adding the @code{-lrt} flag when linking the +application, but is also done implicitly when using OpenMP. @item @emph{Standard}: Fortran 95 and later @@ -11832,11 +11863,11 @@ Subroutine @item @emph{Arguments}: @multitable @columnfractions .15 .70 -@item @var{COUNT} @tab (Optional) shall be a scalar of type default +@item @var{COUNT} @tab (Optional) shall be a scalar of type @code{INTEGER} with @code{INTENT(OUT)}. -@item @var{COUNT_RATE} @tab (Optional) shall be a scalar of type default +@item @var{COUNT_RATE} @tab (Optional) shall be a scalar of type @code{INTEGER} with @code{INTENT(OUT)}. -@item @var{COUNT_MAX} @tab (Optional) shall be a scalar of type default +@item @var{COUNT_MAX} @tab (Optional) shall be a scalar of type @code{INTEGER} with @code{INTENT(OUT)}. @end multitable diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 6c3455b22c8..267809c4d77 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -4219,9 +4219,23 @@ read_cleanup (pointer_info *p) if (p->type == P_SYMBOL && p->u.rsym.state == USED && !p->u.rsym.referenced) { + gfc_namespace *ns; /* Add hidden symbols to the symtree. */ q = get_integer (p->u.rsym.ns); - st = gfc_get_unique_symtree ((gfc_namespace *) q->u.pointer); + ns = (gfc_namespace *) q->u.pointer; + + if (!p->u.rsym.sym->attr.vtype + && !p->u.rsym.sym->attr.vtab) + st = gfc_get_unique_symtree (ns); + else + { + /* There is no reason to use 'unique_symtrees' for vtabs or + vtypes - their name is fine for a symtree and reduces the + namespace pollution. */ + st = gfc_find_symtree (ns->sym_root, p->u.rsym.sym->name); + if (!st) + st = gfc_new_symtree (&ns->sym_root, p->u.rsym.sym->name); + } st->n.sym = p->u.rsym.sym; st->n.sym->refs++; diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 57bdb5d2318..f19c0152598 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -6300,6 +6300,11 @@ gfc_trans_class_init_assign (gfc_code *code) rhs = gfc_copy_expr (code->expr1); gfc_add_vptr_component (rhs); + + /* Make sure that the component backend_decls have been built, which + will not have happened if the derived types concerned have not + been referenced. */ + gfc_get_derived_type (rhs->ts.u.derived); gfc_add_def_init_component (rhs); sz = gfc_copy_expr (code->expr1); diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 2ac6989a2e6..6ddb2cab3ed 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -4451,14 +4451,20 @@ gfc_trans_allocate (gfc_code * code) tree pstat; tree error_label; tree memsz; + tree expr3; + tree slen3; stmtblock_t block; + stmtblock_t post; + gfc_expr *sz; + gfc_se se_sz; if (!code->ext.alloc.list) return NULL_TREE; pstat = stat = error_label = tmp = memsz = NULL_TREE; - gfc_start_block (&block); + gfc_init_block (&block); + gfc_init_block (&post); /* Either STAT= and/or ERRMSG is present. */ if (code->expr1 || code->expr2) @@ -4472,6 +4478,9 @@ gfc_trans_allocate (gfc_code * code) TREE_USED (error_label) = 1; } + expr3 = NULL_TREE; + slen3 = NULL_TREE; + for (al = code->ext.alloc.list; al != NULL; al = al->next) { expr = gfc_copy_expr (al->expr); @@ -4480,7 +4489,6 @@ gfc_trans_allocate (gfc_code * code) gfc_add_data_component (expr); gfc_init_se (&se, NULL); - gfc_start_block (&se.pre); se.want_pointer = 1; se.descriptor_only = 1; @@ -4495,8 +4503,6 @@ gfc_trans_allocate (gfc_code * code) { if (code->expr3->ts.type == BT_CLASS) { - gfc_expr *sz; - gfc_se se_sz; sz = gfc_copy_expr (code->expr3); gfc_add_vptr_component (sz); gfc_add_size_component (sz); @@ -4514,7 +4520,6 @@ gfc_trans_allocate (gfc_code * code) if (!code->expr3->ts.u.cl->backend_decl) { /* Convert and use the length expression. */ - gfc_se se_sz; gfc_init_se (&se_sz, NULL); if (code->expr3->expr_type == EXPR_VARIABLE || code->expr3->expr_type == EXPR_CONSTANT) @@ -4522,7 +4527,8 @@ gfc_trans_allocate (gfc_code * code) gfc_conv_expr (&se_sz, code->expr3); memsz = se_sz.string_length; } - else if (code->expr3->ts.u.cl + else if (code->expr3->mold + && code->expr3->ts.u.cl && code->expr3->ts.u.cl->length) { gfc_conv_expr (&se_sz, code->expr3->ts.u.cl->length); @@ -4531,20 +4537,21 @@ gfc_trans_allocate (gfc_code * code) gfc_add_block_to_block (&se.pre, &se_sz.post); memsz = se_sz.expr; } - else if (code->ext.alloc.ts.u.cl - && code->ext.alloc.ts.u.cl->length) - { - gfc_conv_expr (&se_sz, code->ext.alloc.ts.u.cl->length); - memsz = se_sz.expr; - } else { - /* This is likely to be inefficient. */ - gfc_conv_expr (&se_sz, code->expr3); - gfc_add_block_to_block (&se.pre, &se_sz.pre); - se_sz.expr = gfc_evaluate_now (se_sz.expr, &se.pre); - gfc_add_block_to_block (&se.pre, &se_sz.post); - memsz = se_sz.string_length; + /* This is would be inefficient and possibly could + generate wrong code if the result were not stored + in expr3/slen3. */ + if (slen3 == NULL_TREE) + { + gfc_conv_expr (&se_sz, code->expr3); + gfc_add_block_to_block (&se.pre, &se_sz.pre); + expr3 = gfc_evaluate_now (se_sz.expr, &se.pre); + gfc_add_block_to_block (&post, &se_sz.post); + slen3 = gfc_evaluate_now (se_sz.string_length, + &se.pre); + } + memsz = slen3; } } else @@ -4580,31 +4587,13 @@ gfc_trans_allocate (gfc_code * code) TREE_TYPE (tmp), tmp, fold_convert (TREE_TYPE (tmp), memsz)); } + /* Allocate - for non-pointers with re-alloc checking. */ - { - gfc_ref *ref; - bool allocatable; - - ref = expr->ref; - - /* Find the last reference in the chain. */ - while (ref && ref->next != NULL) - { - gcc_assert (ref->type != REF_ARRAY || ref->u.ar.type == AR_ELEMENT); - ref = ref->next; - } - - if (!ref) - allocatable = expr->symtree->n.sym->attr.allocatable; - else - allocatable = ref->u.c.component->attr.allocatable; - - if (allocatable) - tmp = gfc_allocate_array_with_status (&se.pre, se.expr, memsz, - pstat, expr); - else - tmp = gfc_allocate_with_status (&se.pre, memsz, pstat); - } + if (gfc_expr_attr (expr).allocatable) + tmp = gfc_allocate_array_with_status (&se.pre, se.expr, memsz, + pstat, expr); + else + tmp = gfc_allocate_with_status (&se.pre, memsz, pstat); tmp = fold_build2_loc (input_location, MODIFY_EXPR, void_type_node, se.expr, @@ -4629,11 +4618,9 @@ gfc_trans_allocate (gfc_code * code) tmp = gfc_nullify_alloc_comp (expr->ts.u.derived, tmp, 0); gfc_add_expr_to_block (&se.pre, tmp); } - } - tmp = gfc_finish_block (&se.pre); - gfc_add_expr_to_block (&block, tmp); + gfc_add_block_to_block (&block, &se.pre); if (code->expr3 && !code->expr3->mold) { @@ -4668,6 +4655,13 @@ gfc_trans_allocate (gfc_code * code) gfc_add_block_to_block (&call.pre, &call.post); tmp = gfc_finish_block (&call.pre); } + else if (expr3 != NULL_TREE) + { + tmp = build_fold_indirect_ref_loc (input_location, se.expr); + gfc_trans_string_copy (&block, slen3, tmp, code->expr3->ts.kind, + slen3, expr3, code->expr3->ts.kind); + tmp = NULL_TREE; + } else { /* Switch off automatic reallocation since we have just done @@ -4799,6 +4793,9 @@ gfc_trans_allocate (gfc_code * code) gfc_add_expr_to_block (&block, tmp); } + gfc_add_block_to_block (&block, &se.post); + gfc_add_block_to_block (&block, &post); + return gfc_finish_block (&block); } diff --git a/gcc/gcse.c b/gcc/gcse.c index a0f51aa09b4..27f7e8fe034 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -2738,7 +2738,7 @@ do_local_cprop (rtx x, rtx insn) || (GET_CODE (PATTERN (insn)) != USE && asm_noperands (PATTERN (insn)) < 0))) { - cselib_val *val = cselib_lookup (x, GET_MODE (x), 0); + cselib_val *val = cselib_lookup (x, GET_MODE (x), 0, VOIDmode); struct elt_loc_list *l; if (!val) diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index e471d70bbcd..d1aac239f77 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -2410,6 +2410,7 @@ write_symbol (struct lto_streamer_cache_d *cache, int slot_num; uint64_t size; const char *comdat; + unsigned char c; /* None of the following kinds of symbols are needed in the symbol table. */ @@ -2505,8 +2506,10 @@ write_symbol (struct lto_streamer_cache_d *cache, lto_output_data_stream (stream, name, strlen (name) + 1); lto_output_data_stream (stream, comdat, strlen (comdat) + 1); - lto_output_data_stream (stream, &kind, 1); - lto_output_data_stream (stream, &visibility, 1); + c = (unsigned char) kind; + lto_output_data_stream (stream, &c, 1); + c = (unsigned char) visibility; + lto_output_data_stream (stream, &c, 1); lto_output_data_stream (stream, &size, 8); lto_output_data_stream (stream, &slot_num, 4); } diff --git a/gcc/output.h b/gcc/output.h index 39225a3a6cc..c668d352112 100644 --- a/gcc/output.h +++ b/gcc/output.h @@ -1,7 +1,7 @@ /* Declarations for insn-output.c. These functions are defined in recog.c, final.c, and varasm.c. Copyright (C) 1987, 1991, 1994, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -441,7 +441,8 @@ extern void no_asm_to_stream (FILE *); #define SECTION_DECLARED 0x100000 /* section has been used */ #define SECTION_STYLE_MASK 0x600000 /* bits used for SECTION_STYLE */ #define SECTION_COMMON 0x800000 /* contains common data */ -#define SECTION_MACH_DEP 0x1000000 /* subsequent bits reserved for target */ +#define SECTION_RELRO 0x1000000 /* data is readonly after relocation processing */ +#define SECTION_MACH_DEP 0x2000000 /* subsequent bits reserved for target */ /* This SECTION_STYLE is used for unnamed sections that we can switch to using a special assembler directive. */ @@ -585,6 +586,7 @@ extern section *get_unnamed_section (unsigned int, void (*) (const void *), const void *); extern section *get_section (const char *, unsigned int, tree); extern section *get_named_section (tree, const char *, int); +extern section *get_variable_section (tree, bool); extern void place_block_symbol (rtx); extern rtx get_section_anchor (struct object_block *, HOST_WIDE_INT, enum tls_model); diff --git a/gcc/params.def b/gcc/params.def index 60d9f08422a..fdb8fcbca58 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -481,7 +481,12 @@ DEFPARAM(PARAM_IV_ALWAYS_PRUNE_CAND_SET_BOUND, DEFPARAM(PARAM_SCEV_MAX_EXPR_SIZE, "scev-max-expr-size", "Bound on size of expressions used in the scalar evolutions analyzer", - 20, 0, 0) + 100, 0, 0) + +DEFPARAM(PARAM_SCEV_MAX_EXPR_COMPLEXITY, + "scev-max-expr-complexity", + "Bound on the complexity of the expressions in the scalar evolutions analyzer", + 10, 0, 0) DEFPARAM(PARAM_OMEGA_MAX_VARS, "omega-max-vars", diff --git a/gcc/passes.c b/gcc/passes.c index 8f78108894a..ed3f8ee6ce2 100644 --- a/gcc/passes.c +++ b/gcc/passes.c @@ -892,9 +892,9 @@ init_optimization_passes (void) { struct opt_pass **p = &pass_graphite.pass.sub; NEXT_PASS (pass_graphite_transforms); + NEXT_PASS (pass_lim); NEXT_PASS (pass_copy_prop); NEXT_PASS (pass_dce_loop); - NEXT_PASS (pass_lim); } NEXT_PASS (pass_iv_canon); NEXT_PASS (pass_if_conversion); diff --git a/gcc/postreload.c b/gcc/postreload.c index 1ca8ab4d0bd..5cd26a79ddf 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -262,7 +262,7 @@ reload_cse_simplify_set (rtx set, rtx insn) return 0; #endif - val = cselib_lookup (src, GET_MODE (SET_DEST (set)), 0); + val = cselib_lookup (src, GET_MODE (SET_DEST (set)), 0, VOIDmode); if (! val) return 0; @@ -476,7 +476,7 @@ reload_cse_simplify_operands (rtx insn, rtx testreg) continue; } #endif /* LOAD_EXTEND_OP */ - v = cselib_lookup (op, recog_data.operand_mode[i], 0); + v = cselib_lookup (op, recog_data.operand_mode[i], 0, VOIDmode); if (! v) continue; diff --git a/gcc/reg-notes.def b/gcc/reg-notes.def index f82e7b741a0..329cd6799d5 100644 --- a/gcc/reg-notes.def +++ b/gcc/reg-notes.def @@ -99,11 +99,6 @@ REG_NOTE (DEP_ANTI) won't return. */ REG_NOTE (BR_PROB) -/* REG_VALUE_PROFILE is attached when the profile is read in to an - insn before that the code to profile the value is inserted. It - contains the results of profiling. */ -REG_NOTE (VALUE_PROFILE) - /* Attached to a call insn; indicates that the call is malloc-like and that the pointer returned cannot alias anything else. */ REG_NOTE (NOALIAS) diff --git a/gcc/reload.c b/gcc/reload.c index aa9e68e59b6..714355c3201 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -5066,8 +5066,13 @@ find_reloads_address (enum machine_mode mode, rtx *memrefloc, rtx ad, && REG_P (XEXP (ad, 0)) && REGNO (XEXP (ad, 0)) < FIRST_PSEUDO_REGISTER && CONST_INT_P (XEXP (ad, 1)) - && regno_ok_for_base_p (REGNO (XEXP (ad, 0)), mode, PLUS, - CONST_INT)) + && (regno_ok_for_base_p (REGNO (XEXP (ad, 0)), mode, PLUS, + CONST_INT) + /* Similarly, if we were to reload the base register and the + mem+offset address is still invalid, then we want to reload + the whole address, not just the base register. */ + || ! maybe_memory_address_addr_space_p + (mode, ad, as, &(XEXP (ad, 0))))) { /* Unshare the MEM rtx so we can safely alter it. */ @@ -5079,7 +5084,9 @@ find_reloads_address (enum machine_mode mode, rtx *memrefloc, rtx ad, loc = &XEXP (*loc, 0); } - if (double_reg_address_ok) + if (double_reg_address_ok + && regno_ok_for_base_p (REGNO (XEXP (ad, 0)), mode, + PLUS, CONST_INT)) { /* Unshare the sum as well. */ *loc = ad = copy_rtx (ad); diff --git a/gcc/rtl.h b/gcc/rtl.h index bb482baf5f6..268613b6f1c 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1916,6 +1916,17 @@ extern int computed_jump_p (const_rtx); typedef int (*rtx_function) (rtx *, void *); extern int for_each_rtx (rtx *, rtx_function, void *); +/* Callback for for_each_inc_dec, to process the autoinc operation OP + within MEM that sets DEST to SRC + SRCOFF, or SRC if SRCOFF is + NULL. The callback is passed the same opaque ARG passed to + for_each_inc_dec. Return zero to continue looking for other + autoinc operations, -1 to skip OP's operands, and any other value + to interrupt the traversal and return that value to the caller of + for_each_inc_dec. */ +typedef int (*for_each_inc_dec_fn) (rtx mem, rtx op, rtx dest, rtx src, + rtx srcoff, void *arg); +extern int for_each_inc_dec (rtx *, for_each_inc_dec_fn, void *arg); + typedef int (*rtx_equal_p_callback_function) (const_rtx *, const_rtx *, rtx *, rtx *); extern int rtx_equal_p_cb (const_rtx, const_rtx, diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 3c0167ec6ef..d9710bdac13 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -2886,7 +2886,124 @@ for_each_rtx (rtx *x, rtx_function f, void *data) return for_each_rtx_1 (*x, i, f, data); } + + +/* Data structure that holds the internal state communicated between + for_each_inc_dec, for_each_inc_dec_find_mem and + for_each_inc_dec_find_inc_dec. */ + +struct for_each_inc_dec_ops { + /* The function to be called for each autoinc operation found. */ + for_each_inc_dec_fn fn; + /* The opaque argument to be passed to it. */ + void *arg; + /* The MEM we're visiting, if any. */ + rtx mem; +}; + +static int for_each_inc_dec_find_mem (rtx *r, void *d); + +/* Find PRE/POST-INC/DEC/MODIFY operations within *R, extract the + operands of the equivalent add insn and pass the result to the + operator specified by *D. */ + +static int +for_each_inc_dec_find_inc_dec (rtx *r, void *d) +{ + rtx x = *r; + struct for_each_inc_dec_ops *data = (struct for_each_inc_dec_ops *)d; + switch (GET_CODE (x)) + { + case PRE_INC: + case POST_INC: + { + int size = GET_MODE_SIZE (GET_MODE (data->mem)); + rtx r1 = XEXP (x, 0); + rtx c = gen_int_mode (size, GET_MODE (r1)); + return data->fn (data->mem, x, r1, r1, c, data->arg); + } + + case PRE_DEC: + case POST_DEC: + { + int size = GET_MODE_SIZE (GET_MODE (data->mem)); + rtx r1 = XEXP (x, 0); + rtx c = gen_int_mode (-size, GET_MODE (r1)); + return data->fn (data->mem, x, r1, r1, c, data->arg); + } + + case PRE_MODIFY: + case POST_MODIFY: + { + rtx r1 = XEXP (x, 0); + rtx add = XEXP (x, 1); + return data->fn (data->mem, x, r1, add, NULL, data->arg); + } + + case MEM: + { + rtx save = data->mem; + int ret = for_each_inc_dec_find_mem (r, d); + data->mem = save; + return ret; + } + + default: + return 0; + } +} + +/* If *R is a MEM, find PRE/POST-INC/DEC/MODIFY operations within its + address, extract the operands of the equivalent add insn and pass + the result to the operator specified by *D. */ + +static int +for_each_inc_dec_find_mem (rtx *r, void *d) +{ + rtx x = *r; + if (x != NULL_RTX && MEM_P (x)) + { + struct for_each_inc_dec_ops *data = (struct for_each_inc_dec_ops *) d; + int result; + + data->mem = x; + + result = for_each_rtx (&XEXP (x, 0), for_each_inc_dec_find_inc_dec, + data); + if (result) + return result; + + return -1; + } + return 0; +} + +/* Traverse *X looking for MEMs, and for autoinc operations within + them. For each such autoinc operation found, call FN, passing it + the innermost enclosing MEM, the operation itself, the RTX modified + by the operation, two RTXs (the second may be NULL) that, once + added, represent the value to be held by the modified RTX + afterwards, and ARG. FN is to return -1 to skip looking for other + autoinc operations within the visited operation, 0 to continue the + traversal, or any other value to have it returned to the caller of + for_each_inc_dec. */ + +int +for_each_inc_dec (rtx *x, + for_each_inc_dec_fn fn, + void *arg) +{ + struct for_each_inc_dec_ops data; + + data.fn = fn; + data.arg = arg; + data.mem = NULL; + + return for_each_rtx (x, for_each_inc_dec_find_mem, &data); +} + + /* Searches X for any reference to REGNO, returning the rtx of the reference found if any. Otherwise, returns NULL_RTX. */ diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 590f4deb483..7293fc3c972 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -1566,7 +1566,7 @@ add_insn_mem_dependence (struct deps_desc *deps, bool read_p, if (sched_deps_info->use_cselib) { mem = shallow_copy_rtx (mem); - XEXP (mem, 0) = cselib_subst_to_values (XEXP (mem, 0)); + XEXP (mem, 0) = cselib_subst_to_values (XEXP (mem, 0), GET_MODE (mem)); } link = alloc_EXPR_LIST (VOIDmode, canon_rtx (mem), *mem_list); *mem_list = link; @@ -2283,8 +2283,9 @@ sched_analyze_1 (struct deps_desc *deps, rtx x, rtx insn) = targetm.addr_space.address_mode (MEM_ADDR_SPACE (dest)); t = shallow_copy_rtx (dest); - cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1, insn); - XEXP (t, 0) = cselib_subst_to_values (XEXP (t, 0)); + cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1, + GET_MODE (t), insn); + XEXP (t, 0) = cselib_subst_to_values (XEXP (t, 0), GET_MODE (t)); } t = canon_rtx (t); @@ -2440,8 +2441,9 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn) = targetm.addr_space.address_mode (MEM_ADDR_SPACE (t)); t = shallow_copy_rtx (t); - cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1, insn); - XEXP (t, 0) = cselib_subst_to_values (XEXP (t, 0)); + cselib_lookup_from_insn (XEXP (t, 0), address_mode, 1, + GET_MODE (t), insn); + XEXP (t, 0) = cselib_subst_to_values (XEXP (t, 0), GET_MODE (t)); } if (!DEBUG_INSN_P (insn)) diff --git a/gcc/sel-sched-dump.c b/gcc/sel-sched-dump.c index 782dcaac3c2..27b06ad1695 100644 --- a/gcc/sel-sched-dump.c +++ b/gcc/sel-sched-dump.c @@ -960,8 +960,8 @@ debug_mem_addr_value (rtx x) address_mode = targetm.addr_space.address_mode (MEM_ADDR_SPACE (x)); t = shallow_copy_rtx (x); - if (cselib_lookup (XEXP (t, 0), address_mode, 0)) - XEXP (t, 0) = cselib_subst_to_values (XEXP (t, 0)); + if (cselib_lookup (XEXP (t, 0), address_mode, 0, GET_MODE (t))) + XEXP (t, 0) = cselib_subst_to_values (XEXP (t, 0), GET_MODE (t)); t = canon_rtx (t); addr = get_addr (XEXP (t, 0)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6b460a10efe..fe9a2f716b1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,125 @@ +2011-02-07 Uros Bizjak <ubizjak@gmail.com> + + * gfortran.dg/transpose_optimization_2.f90: Cleanup original dump. + +2011-02-06 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/47592 + * gfortran.dg/allocate_with_source_1 : New test. + +2011-02-05 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/47610 + * gcc.dg/pr47610.c: New test. + +2011-02-05 Jie Zhang <jie@codesourcery.com> + + PR debug/42631 + * gcc.dg/pr42631.c: Update test. + * gcc.dg/pr42631-2.c: New test. + +2001-02-05 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/47574 + * gfortran.dg/pr47574.f90: New test. + +2011-02-04 Sebastian Pop <sebastian.pop@amd.com> + + PR tree-optimization/46194 + * gcc.dg/autopar/pr46194.c: New. + +2011-02-04 H.J. Lu <hongjiu.lu@intel.com> + + PR tree-optimization/43695 + * g++.dg/ipa/pr43695.C: New. + +2011-02-04 Jakub Jelinek <jakub@redhat.com> + + PR inline-asm/23200 + * gcc.dg/pr23200.c: New test. + +2011-02-03 Jonathan Wakely <jwakely.gcc@gmail.com> + + PR c++/47589 + * g++.dg/pr47589.C: New test. + +2011-02-03 Dodji Seketeli <dodji@redhat.com> + + PR c++/47398 + * g++.dg/template/typedef37.C: New test. + * g++.dg/template/param1.C: Adjust expected error message. + +2011-02-03 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/31490 + * gcc.dg/pr31490-2.c: New test. + * gcc.dg/pr31490-3.c: New test. + * gcc.dg/pr31490-4.c: New test. + +2011-02-03 Nathan Froyd <froydnj@codesourcery.com> + Jakub Jelinek <jakub@redhat.com> + + PR c++/46890 + * g++.dg/parser/semicolon3.C: Adjust. + * g++.dg/parser/semicolon4.C: New testcase. + * g++.dg/pr46890.C: New testcase. + +2011-02-03 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/29571 + * g++.dg/init/pr29571.C: New. + +2011-02-03 H.J. Lu <hongjiu.lu@intel.com> + + * gfortran.dg/graphite/vect-pr40979.f90: Require vect_double + instead of vect_int. + +2011-02-03 Jakub Jelinek <jakub@redhat.com> + + PR target/47312 + * gcc.target/i386/pr47312.c: New test. + + PR target/47564 + * gcc.target/i386/pr47564.c: New test. + +2011-02-03 Alexandre Oliva <aoliva@redhat.com> + + PR tree-optimization/45122 + * gcc.dg/tree-ssa/pr45122.c: New. + +2011-02-02 Michael Meissner <meissner@linux.vnet.ibm.com> + + PR target/47272 + * gcc.target/powerpc/vsx-builtin-8.c: New file, test vec_vsx_ld + and vec_vsx_st. + + * gcc.target/powerpc/avoid-indexed-addresses.c: Disable altivec + and vsx so a default --with-cpu=power7 doesn't give an error + when -mavoid-indexed-addresses is used. + + * gcc.target/powerpc/ppc32-abi-dfp-1.c: Rewrite to use an asm + wrapper function to save the arguments and then jump to the real + function, rather than depending on the compiler not to move stuff + before an asm. + * gcc.target/powerpc/ppc64-abi-dfp-2.c: Ditto. + +2011-02-02 Janus Weil <janus@gcc.gnu.org> + Paul Thomas <pault@gcc.gnu.org> + + PR fortran/47082 + * gfortran.dg/class_37.f03 : New test. + +2011-02-02 Sebastian Pop <sebastian.pop@amd.com> + Richard Guenther <rguenther@suse.de> + + PR tree-optimization/40979 + PR bootstrap/47044 + * gcc.dg/graphite/graphite.exp (DEFAULT_VECTCFLAGS): Add -ffast-math. + * gcc.dg/graphite/pr35356-2.c: Adjust pattern. + * gfortran.dg/graphite/graphite.exp: Run vect_files conditionally to + check_vect_support_and_set_flags. + * gfortran.dg/graphite/vect-pr40979.f90: New. + 2011-02-02 Janus Weil <janus@gcc.gnu.org> PR fortran/47572 @@ -335,9 +457,9 @@ 2011-01-25 Yao Qi <yao@codesourcery.com> - PR target/45701 - * gcc.target/arm/pr45701-1.c: New test. - * gcc.target/arm/pr45701-2.c: New test. + PR target/45701 + * gcc.target/arm/pr45701-1.c: New test. + * gcc.target/arm/pr45701-2.c: New test. * gcc.target/arm/pr45701-3.c: New test. 2011-01-25 Sebastian Pop <sebastian.pop@amd.com> @@ -585,7 +707,7 @@ 2011-01-19 Dodji Seketeli <dodji@redhat.com> PR c++/47291 - * g++.dg/debug/dwarf2/template-params-10.C: New test. + * g++.dg/debug/dwarf2/template-params-10.C: New test. 2011-01-19 Alexandre Oliva <aoliva@redhat.com> @@ -689,7 +811,7 @@ 2011-01-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> PR testsuite/47325 - g++.dg/ext/pr47213.C: Require visibility. + * g++.dg/ext/pr47213.C: Require visibility. 2011-01-16 Richard Sandiford <rdsandiford@googlemail.com> @@ -736,9 +858,9 @@ PR objc/45989 * objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c - (switchfiles): XFAIL - objc.dg-struct-layout-encoding-1/t02[57-9]_main.m execution tests - on i?86-*-*, x86_64-*-*, and powerpc*-apple-darwin* && ilp32. + (switchfiles): XFAIL objc.dg-struct-layout-encoding-1/t02[57-9]_main.m + execution tests on i?86-*-*, x86_64-*-* and + powerpc*-apple-darwin* && ilp32. XFAIL objc.dg-struct-layout-encoding-1/t03[01]_main.m execution tests on i?86-*-* and x86_64-*-*. @@ -788,8 +910,7 @@ 2011-01-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> - * gcc.dg/guality/pr36728-1.c: Disable arg1/2 checks for s390 and - s390x. + * gcc.dg/guality/pr36728-1.c: Disable arg1/2 checks for s390 and s390x. * gcc.dg/guality/pr36728-2.c: Likewise. 2011-01-13 Dodji Seketeli <dodji@redhat.com> @@ -827,8 +948,8 @@ Amend NeXT version to declare a TEST_SUITE_ADDITIONS carrying the methods missing from the OBJC2 Object. * objc-obj-c++-shared/Object1-implementation.h: Add copyright header. - Amend implementation to use a TEST_SUITE_ADDITIONS category for both GNU - and NeXT runtimes. + Amend implementation to use a TEST_SUITE_ADDITIONS category for both + GNU and NeXT runtimes. * objc-obj-c++-shared/Object1.mm: Remove redundant header, update comments. * objc-obj-c++-shared/Object1.m: Likewise. @@ -846,14 +967,14 @@ Fixed the Objective-C++ testsuite and updated all tests. * lib/obj-c++.exp (obj-c++_init): Declare and set - gcc_warning_prefix and gcc_error_prefix. + gcc_warning_prefix and gcc_error_prefix. * obj-c++.dg/attributes/categ-attribute-2.mm: Fixed usage of 'dg-warning', 'dg-message' and 'dg-error'. * obj-c++.dg/class-extension-3.mm: Likewise. * obj-c++.dg/class-protocol-1.mm: Likewise. * obj-c++.dg/encode-7.mm: Likewise. * obj-c++.dg/exceptions-3.mm: Likewise. - * obj-c++.dg/exceptions-5.mm: Likewise. + * obj-c++.dg/exceptions-5.mm: Likewise. * obj-c++.dg/method-12.mm: Likewise. * obj-c++.dg/method-13.mm: Likewise. * obj-c++.dg/method-15.mm: Likewise. @@ -868,13 +989,13 @@ * obj-c++.dg/method-conflict-4.mm: Likewise. Also, removed FIXME and uncommented second part of the testcase now that the testsuite works correctly. - * obj-c++.dg/private-1.mm: Likewise. + * obj-c++.dg/private-1.mm: Likewise. * obj-c++.dg/proto-lossage-4.mm: Likewise. * obj-c++.dg/syntax-error-7.mm: Likewise. * obj-c++.dg/warn5.mm: Likewise. * obj-c++.dg/property/at-property-14.mm: Likewise. * obj-c++.dg/property/at-property-16.mm: Likewise, and removed - FIXME. + FIXME. * obj-c++.dg/property/at-property-18.mm: Likewise. * obj-c++.dg/property/at-property-20.mm: Likewise, and removed FIXME. @@ -890,12 +1011,12 @@ * obj-c++.dg/tls/diag-5.mm: Likewise. * obj-c++.dg/ivar-invalid-type-1.mm: Removed FIXME and uncommented dg-error, now matched correctly. - + 2011-01-12 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/property/at-property-29.m: New. - * obj-c++.dg/property/at-property-29.mm: New. - + * obj-c++.dg/property/at-property-29.mm: New. + 2011-01-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * go.test/go-test.exp (go-set-goarch): New proc. @@ -1037,7 +1158,7 @@ PR objc/47232 * objc.dg/attributes/invalid-attribute-1.m: New. - * obj-c++.dg/attributes/invalid-attribute-1.mm: New. + * obj-c++.dg/attributes/invalid-attribute-1.mm: New. 2011-01-09 Janus Weil <janus@gcc.gnu.org> @@ -1143,11 +1264,13 @@ Get builtins tests ready for linker plugin. * gcc.c-torture/execute/builtins/memcpy-chk.c (s2,s3,l1): Mark volatile. - * gcc.c-torture/execute/builtins/memops-asm-lib.c (my_memcpy, my_bcopy, my_memset, - my_bzero): Mark used. + * gcc.c-torture/execute/builtins/memops-asm-lib.c (my_memcpy, my_bcopy, + my_memset, my_bzero): Mark used. * gcc.c-torture/execute/builtins/memset-chk.c (l1, l3): Mark volatile. - * gcc.c-torture/execute/builtins/memmove-chk.c (s1,s2,s3,l1): Mark volatile. - * gcc.c-torture/execute/builtins/mempcpy-chk.c (s2,s3,l1): Mark volatile + * gcc.c-torture/execute/builtins/memmove-chk.c (s1,s2,s3,l1): Mark + volatile. + * gcc.c-torture/execute/builtins/mempcpy-chk.c (s2,s3,l1): Mark + volatile. 2011-01-07 Jan Hubicka <jh@suse.cz> diff --git a/gcc/testsuite/ChangeLog-2010 b/gcc/testsuite/ChangeLog-2010 index 86b582ad9be..b8d94644a47 100644 --- a/gcc/testsuite/ChangeLog-2010 +++ b/gcc/testsuite/ChangeLog-2010 @@ -3,14 +3,13 @@ * gcc.c-torture/compile/pr46534.c: Skip if pdp11. * gcc.c-torture/compile/920520-1.c: Ditto. * gcc.c-torture/compile/pr35318.c: Ditto. - + 2010-12-31 Paul Koning <ni1d@arrl.net> * gcc.c-torture/execute/ieee/ieee.exp: Skip if pdp11. * gcc.c-torture/compile/20000804-1.c: Skip if pdp11 -O0. * gcc.c-torture/compile/20020312-1.c: Ditto. - * gcc.c-torture/compile/20040101-1.c: Skip if pdp11 -O1, -O2, or - -Os. + * gcc.c-torture/compile/20040101-1.c: Skip if pdp11 -O1, -O2, or -Os. 2010-12-31 Thomas Koenig <tkoenig@gcc.gnu.org> @@ -44,8 +43,8 @@ * obj-c++.dg/class-extension-3.mm: Updated. * obj-c++.dg/method-8.mm: Updated. * obj-c++.dg/method-conflict-1.mm: New. - * obj-c++.dg/method-conflict-2.mm: New. - + * obj-c++.dg/method-conflict-2.mm: New. + 2010-12-30 Joseph Myers <joseph@codesourcery.com> PR c/46889 @@ -53,8 +52,8 @@ 2010-12-30 Nathan Froyd <froydnj@codesourcery.com> - PR target/44606 - * gcc.dg/pr44606.c: New test. + PR target/44606 + * gcc.dg/pr44606.c: New test. 2010-12-30 H.J. Lu <hongjiu.lu@intel.com> @@ -77,8 +76,8 @@ * objc.dg/attributes/class-attribute-3.m: New. * objc.dg/attributes/proto-attribute-4.m: New. * obj-c++.dg/attributes/class-attribute-3.mm: New. - * obj-c++.dg/attributes/proto-attribute-4.mm: New. - + * obj-c++.dg/attributes/proto-attribute-4.mm: New. + 2010-12-30 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/47060 @@ -128,7 +127,7 @@ * objc.dg/class-protocol-1.m: Updated. * obj-c++.dg/attributes/proto-attribute-2.mm: Updated. * obj-c++.dg/class-protocol-1.mm: Updated. - + 2010-12-28 Janus Weil <janus@gcc.gnu.org> PR fortran/45827 @@ -169,7 +168,7 @@ * obj-c++.dg/gnu-api-2-objc.mm: Same. * obj-c++.dg/gnu-api-2-object.mm: Same. * obj-c++.dg/gnu-api-2-protocol.mm: Same. - + 2010-12-26 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/pr44509.m: New. @@ -197,7 +196,7 @@ name as an existing class, and to test that the class pair is created correctly. * obj-c++.dg/gnu-api-2-objc.mm: Same change. - + 2010-12-26 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/special/special.exp: Added load-category-2 and diff --git a/gcc/testsuite/g++.dg/parse/semicolon3.C b/gcc/testsuite/g++.dg/parse/semicolon3.C index a119ef4e0b3..bc43b48cff7 100644 --- a/gcc/testsuite/g++.dg/parse/semicolon3.C +++ b/gcc/testsuite/g++.dg/parse/semicolon3.C @@ -62,6 +62,48 @@ autotest (void) return ok10.a; } +struct OK11 +{ + int a; +} // no complaints + const *ok11_var; + +struct OK12 +{ + int a; +} // no complaints + const &ok12_var = *(new OK12()); + +struct OK13 +{ + int a; +} // no complaints + static *ok13_var; + +class OK14 +{ + struct OK14sub + { + int a; + } // no complaints + static &ok14_var; +}; + +class OK15 +{ + int a; +} typedef tOK15; + +class OK16 +{ + int a; +} typedef *pOK16; + +class OK17 +{ + int a; +} typedef &rOK16; + struct E1 { int a; @@ -196,6 +238,13 @@ class E17 mutable int i; } // { dg-error "after class definition" } +class E18 +{ + int a; +} // { dg-error "after class definition" } + +typedef int E18int; + /* This was the original test from the PR. */ class C0 diff --git a/gcc/testsuite/g++.dg/template/param1.C b/gcc/testsuite/g++.dg/template/param1.C index ad7fc8cde0e..a8c3791254f 100644 --- a/gcc/testsuite/g++.dg/template/param1.C +++ b/gcc/testsuite/g++.dg/template/param1.C @@ -2,11 +2,11 @@ // Origin: Volker Reichelt <reichelt@igpm.rwth-aachen.de> // { dg-do compile } -template<int> struct A +template<int> struct A // { dg-error "declaration" } { A(); }; -template<int N, char> A<N>::A() {} // { dg-error "got 2|but 1 required" } +template<int N, char> A<N>::A() {} // { dg-error "invalid use of incomplete type" } A<0> a; diff --git a/gcc/testsuite/gcc.dg/graphite/graphite.exp b/gcc/testsuite/gcc.dg/graphite/graphite.exp index 74e1ed8172d..cdf35ebab8a 100644 --- a/gcc/testsuite/gcc.dg/graphite/graphite.exp +++ b/gcc/testsuite/gcc.dg/graphite/graphite.exp @@ -58,7 +58,7 @@ dg-runtest $block_files "" "-O2 -floop-block -fno-loop-strip-mine -fno-loo # Vectorizer tests, to be run or compiled, depending on target capabilities. global DEFAULT_VECTCFLAGS -set DEFAULT_VECTCFLAGS "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" +set DEFAULT_VECTCFLAGS "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math" if [check_vect_support_and_set_flags] { dg-runtest $vect_files "" $DEFAULT_VECTCFLAGS diff --git a/gcc/testsuite/gcc.dg/graphite/pr35356-2.c b/gcc/testsuite/gcc.dg/graphite/pr35356-2.c index e5b0213768c..66cfdea5aef 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr35356-2.c +++ b/gcc/testsuite/gcc.dg/graphite/pr35356-2.c @@ -39,6 +39,6 @@ foo (int bar, int n, int k) */ -/* { dg-final { scan-tree-dump-times "MIN_EXPR" 2 "graphite" } } */ -/* { dg-final { scan-tree-dump-times "MAX_EXPR" 2 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "MIN_EXPR" 4 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "MAX_EXPR" 4 "graphite" } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/pr42631.c b/gcc/testsuite/gcc.dg/pr42631.c index f5ac5a53a10..3d6c229a016 100644 --- a/gcc/testsuite/gcc.dg/pr42631.c +++ b/gcc/testsuite/gcc.dg/pr42631.c @@ -14,10 +14,13 @@ combine uninitialized uses into a single web. */ /* { dg-do compile } */ -/* { dg-options "-g -O1 -funroll-loops -fcompare-debug" } */ +/* { dg-options "-g -O1 -funroll-loops -fcompare-debug -fdump-rtl-web" } */ void foo() { unsigned k; while (--k > 0); } + +/* { dg-final { scan-rtl-dump-not "Web oldreg" "web" } } */ +/* { dg-final { cleanup-rtl-dump "web" } } */ diff --git a/gcc/testsuite/gcc.target/powerpc/avoid-indexed-addresses.c b/gcc/testsuite/gcc.target/powerpc/avoid-indexed-addresses.c index b1b067283f7..e86aa8a5d2f 100644 --- a/gcc/testsuite/gcc.target/powerpc/avoid-indexed-addresses.c +++ b/gcc/testsuite/gcc.target/powerpc/avoid-indexed-addresses.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { powerpc*-*-* } } } */ -/* { dg-options "-O2 -mavoid-indexed-addresses" } */ +/* { dg-options "-O2 -mavoid-indexed-addresses -mno-altivec -mno-vsx" } */ /* { dg-final { scan-assembler-not "lbzx" } } diff --git a/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c b/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c index 1b836d72795..14908dba690 100644 --- a/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c +++ b/gcc/testsuite/gcc.target/powerpc/ppc32-abi-dfp-1.c @@ -30,31 +30,6 @@ typedef struct reg_parms_t gparms; - -/* Testcase could break on future gcc's, if parameter regs - are changed before this asm. */ - -#define save_parms(lparms) \ - asm volatile ("lis 11,gparms@ha\n\t" \ - "la 11,gparms@l(11)\n\t" \ - "st 3,0(11)\n\t" \ - "st 4,4(11)\n\t" \ - "st 5,8(11)\n\t" \ - "st 6,12(11)\n\t" \ - "st 7,16(11)\n\t" \ - "st 8,20(11)\n\t" \ - "st 9,24(11)\n\t" \ - "st 10,28(11)\n\t" \ - "stfd 1,32(11)\n\t" \ - "stfd 2,40(11)\n\t" \ - "stfd 3,48(11)\n\t" \ - "stfd 4,56(11)\n\t" \ - "stfd 5,64(11)\n\t" \ - "stfd 6,72(11)\n\t" \ - "stfd 7,80(11)\n\t" \ - "stfd 8,88(11)\n\t":::"11", "memory"); \ - lparms = gparms; - typedef struct sf { struct sf *backchain; @@ -62,115 +37,159 @@ typedef struct sf unsigned int slot[200]; } stack_frame_t; +/* Wrapper to save the GPRs and FPRs and then jump to the real function. */ +#define WRAPPER(NAME) \ +__asm__ ("\t.globl\t" #NAME "_asm\n\t" \ + ".text\n\t" \ + ".type " #NAME "_asm, @function\n" \ + #NAME "_asm:\n\t" \ + "lis 11,gparms@ha\n\t" \ + "la 11,gparms@l(11)\n\t" \ + "st 3,0(11)\n\t" \ + "st 4,4(11)\n\t" \ + "st 5,8(11)\n\t" \ + "st 6,12(11)\n\t" \ + "st 7,16(11)\n\t" \ + "st 8,20(11)\n\t" \ + "st 9,24(11)\n\t" \ + "st 10,28(11)\n\t" \ + "stfd 1,32(11)\n\t" \ + "stfd 2,40(11)\n\t" \ + "stfd 3,48(11)\n\t" \ + "stfd 4,56(11)\n\t" \ + "stfd 5,64(11)\n\t" \ + "stfd 6,72(11)\n\t" \ + "stfd 7,80(11)\n\t" \ + "stfd 8,88(11)\n\t" \ + "b " #NAME "\n\t" \ + ".size " #NAME ",.-" #NAME "\n") + /* Fill up floating point registers with double arguments, forcing decimal float arguments into the parameter save area. */ +extern void func0_asm (double, double, double, double, double, + double, double, double, _Decimal64, _Decimal128); + +WRAPPER(func0); + void __attribute__ ((noinline)) func0 (double a1, double a2, double a3, double a4, double a5, double a6, double a7, double a8, _Decimal64 a9, _Decimal128 a10) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; - if (a1 != lparms.fprs[0]) FAILURE - if (a2 != lparms.fprs[1]) FAILURE - if (a3 != lparms.fprs[2]) FAILURE - if (a4 != lparms.fprs[3]) FAILURE - if (a5 != lparms.fprs[4]) FAILURE - if (a6 != lparms.fprs[5]) FAILURE - if (a7 != lparms.fprs[6]) FAILURE - if (a8 != lparms.fprs[7]) FAILURE + if (a1 != gparms.fprs[0]) FAILURE + if (a2 != gparms.fprs[1]) FAILURE + if (a3 != gparms.fprs[2]) FAILURE + if (a4 != gparms.fprs[3]) FAILURE + if (a5 != gparms.fprs[4]) FAILURE + if (a6 != gparms.fprs[5]) FAILURE + if (a7 != gparms.fprs[6]) FAILURE + if (a8 != gparms.fprs[7]) FAILURE if (a9 != *(_Decimal64 *)&sp->slot[0]) FAILURE if (a10 != *(_Decimal128 *)&sp->slot[2]) FAILURE } /* Alternate 64-bit and 128-bit decimal float arguments, checking that _Decimal128 is always passed in even/odd register pairs. */ +extern void func1_asm (_Decimal64, _Decimal128, _Decimal64, _Decimal128, + _Decimal64, _Decimal128, _Decimal64, _Decimal128); + +WRAPPER(func1); + void __attribute__ ((noinline)) func1 (_Decimal64 a1, _Decimal128 a2, _Decimal64 a3, _Decimal128 a4, _Decimal64 a5, _Decimal128 a6, _Decimal64 a7, _Decimal128 a8) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; - if (a1 != *(_Decimal64 *)&lparms.fprs[0]) FAILURE /* f1 */ - if (a2 != *(_Decimal128 *)&lparms.fprs[1]) FAILURE /* f2 & f3 */ - if (a3 != *(_Decimal64 *)&lparms.fprs[3]) FAILURE /* f4 */ - if (a4 != *(_Decimal128 *)&lparms.fprs[5]) FAILURE /* f6 & f7 */ - if (a5 != *(_Decimal64 *)&lparms.fprs[7]) FAILURE /* f8 */ + if (a1 != *(_Decimal64 *)&gparms.fprs[0]) FAILURE /* f1 */ + if (a2 != *(_Decimal128 *)&gparms.fprs[1]) FAILURE /* f2 & f3 */ + if (a3 != *(_Decimal64 *)&gparms.fprs[3]) FAILURE /* f4 */ + if (a4 != *(_Decimal128 *)&gparms.fprs[5]) FAILURE /* f6 & f7 */ + if (a5 != *(_Decimal64 *)&gparms.fprs[7]) FAILURE /* f8 */ if (a6 != *(_Decimal128 *)&sp->slot[0]) FAILURE if (a7 != *(_Decimal64 *)&sp->slot[4]) FAILURE if (a8 != *(_Decimal128 *)&sp->slot[6]) FAILURE } +extern void func2_asm (_Decimal128, _Decimal64, _Decimal128, _Decimal64, + _Decimal128, _Decimal64, _Decimal128, _Decimal64); + +WRAPPER(func2); + void __attribute__ ((noinline)) func2 (_Decimal128 a1, _Decimal64 a2, _Decimal128 a3, _Decimal64 a4, _Decimal128 a5, _Decimal64 a6, _Decimal128 a7, _Decimal64 a8) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; - if (a1 != *(_Decimal128 *)&lparms.fprs[1]) FAILURE /* f2 & f3 */ - if (a2 != *(_Decimal64 *)&lparms.fprs[3]) FAILURE /* f4 */ - if (a3 != *(_Decimal128 *)&lparms.fprs[5]) FAILURE /* f6 & f7 */ - if (a4 != *(_Decimal64 *)&lparms.fprs[7]) FAILURE /* f8 */ + if (a1 != *(_Decimal128 *)&gparms.fprs[1]) FAILURE /* f2 & f3 */ + if (a2 != *(_Decimal64 *)&gparms.fprs[3]) FAILURE /* f4 */ + if (a3 != *(_Decimal128 *)&gparms.fprs[5]) FAILURE /* f6 & f7 */ + if (a4 != *(_Decimal64 *)&gparms.fprs[7]) FAILURE /* f8 */ if (a5 != *(_Decimal128 *)&sp->slot[0]) FAILURE if (a6 != *(_Decimal64 *)&sp->slot[4]) FAILURE if (a7 != *(_Decimal128 *)&sp->slot[6]) FAILURE if (a8 != *(_Decimal64 *)&sp->slot[10]) FAILURE } +extern void func3_asm (_Decimal64, _Decimal128, _Decimal64, _Decimal128, + _Decimal64); + +WRAPPER(func3); + void __attribute__ ((noinline)) func3 (_Decimal64 a1, _Decimal128 a2, _Decimal64 a3, _Decimal128 a4, _Decimal64 a5) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; - if (a1 != *(_Decimal64 *)&lparms.fprs[0]) FAILURE /* f1 */ - if (a2 != *(_Decimal128 *)&lparms.fprs[1]) FAILURE /* f2 & f3 */ - if (a3 != *(_Decimal64 *)&lparms.fprs[3]) FAILURE /* f4 */ - if (a4 != *(_Decimal128 *)&lparms.fprs[5]) FAILURE /* f6 & f7 */ + if (a1 != *(_Decimal64 *)&gparms.fprs[0]) FAILURE /* f1 */ + if (a2 != *(_Decimal128 *)&gparms.fprs[1]) FAILURE /* f2 & f3 */ + if (a3 != *(_Decimal64 *)&gparms.fprs[3]) FAILURE /* f4 */ + if (a4 != *(_Decimal128 *)&gparms.fprs[5]) FAILURE /* f6 & f7 */ if (a5 != *(_Decimal128 *)&sp->slot[0]) FAILURE } +extern void func4_asm (_Decimal32, _Decimal32, _Decimal32, _Decimal32, + _Decimal32, _Decimal32, _Decimal32, _Decimal32, + _Decimal32, _Decimal32, _Decimal32, _Decimal32, + _Decimal32, _Decimal32, _Decimal32, _Decimal32); + +WRAPPER(func4); + void __attribute__ ((noinline)) func4 (_Decimal32 a1, _Decimal32 a2, _Decimal32 a3, _Decimal32 a4, _Decimal32 a5, _Decimal32 a6, _Decimal32 a7, _Decimal32 a8, _Decimal32 a9, _Decimal32 a10, _Decimal32 a11, _Decimal32 a12, _Decimal32 a13, _Decimal32 a14, _Decimal32 a15, _Decimal32 a16) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; /* _Decimal32 is passed in the lower half of an FPR, or in parameter slot. */ - if (a1 != ((d32parm_t *)&lparms.fprs[0])->d) FAILURE /* f1 */ - if (a2 != ((d32parm_t *)&lparms.fprs[1])->d) FAILURE /* f2 */ - if (a3 != ((d32parm_t *)&lparms.fprs[2])->d) FAILURE /* f3 */ - if (a4 != ((d32parm_t *)&lparms.fprs[3])->d) FAILURE /* f4 */ - if (a5 != ((d32parm_t *)&lparms.fprs[4])->d) FAILURE /* f5 */ - if (a6 != ((d32parm_t *)&lparms.fprs[5])->d) FAILURE /* f6 */ - if (a7 != ((d32parm_t *)&lparms.fprs[6])->d) FAILURE /* f7 */ - if (a8 != ((d32parm_t *)&lparms.fprs[7])->d) FAILURE /* f8 */ + if (a1 != ((d32parm_t *)&gparms.fprs[0])->d) FAILURE /* f1 */ + if (a2 != ((d32parm_t *)&gparms.fprs[1])->d) FAILURE /* f2 */ + if (a3 != ((d32parm_t *)&gparms.fprs[2])->d) FAILURE /* f3 */ + if (a4 != ((d32parm_t *)&gparms.fprs[3])->d) FAILURE /* f4 */ + if (a5 != ((d32parm_t *)&gparms.fprs[4])->d) FAILURE /* f5 */ + if (a6 != ((d32parm_t *)&gparms.fprs[5])->d) FAILURE /* f6 */ + if (a7 != ((d32parm_t *)&gparms.fprs[6])->d) FAILURE /* f7 */ + if (a8 != ((d32parm_t *)&gparms.fprs[7])->d) FAILURE /* f8 */ if (a9 != *(_Decimal32 *)&sp->slot[0]) FAILURE if (a10 != *(_Decimal32 *)&sp->slot[1]) FAILURE if (a11 != *(_Decimal32 *)&sp->slot[2]) FAILURE @@ -181,24 +200,29 @@ func4 (_Decimal32 a1, _Decimal32 a2, _Decimal32 a3, _Decimal32 a4, if (a16 != *(_Decimal32 *)&sp->slot[7]) FAILURE } +extern void func5_asm (_Decimal32, _Decimal64, _Decimal128, + _Decimal32, _Decimal64, _Decimal128, + _Decimal32, _Decimal64, _Decimal128, + _Decimal32, _Decimal64, _Decimal128); + +WRAPPER(func5); + void __attribute__ ((noinline)) func5 (_Decimal32 a1, _Decimal64 a2, _Decimal128 a3, _Decimal32 a4, _Decimal64 a5, _Decimal128 a6, _Decimal32 a7, _Decimal64 a8, _Decimal128 a9, _Decimal32 a10, _Decimal64 a11, _Decimal128 a12) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; - if (a1 != ((d32parm_t *)&lparms.fprs[0])->d) FAILURE /* f1 */ - if (a2 != *(_Decimal64 *)&lparms.fprs[1]) FAILURE /* f2 */ - if (a3 != *(_Decimal128 *)&lparms.fprs[3]) FAILURE /* f4 & f5 */ - if (a4 != ((d32parm_t *)&lparms.fprs[5])->d) FAILURE /* f6 */ - if (a5 != *(_Decimal64 *)&lparms.fprs[6]) FAILURE /* f7 */ + if (a1 != ((d32parm_t *)&gparms.fprs[0])->d) FAILURE /* f1 */ + if (a2 != *(_Decimal64 *)&gparms.fprs[1]) FAILURE /* f2 */ + if (a3 != *(_Decimal128 *)&gparms.fprs[3]) FAILURE /* f4 & f5 */ + if (a4 != ((d32parm_t *)&gparms.fprs[5])->d) FAILURE /* f6 */ + if (a5 != *(_Decimal64 *)&gparms.fprs[6]) FAILURE /* f7 */ if (a6 != *(_Decimal128 *)&sp->slot[0]) FAILURE if (a7 != *(_Decimal32 *)&sp->slot[4]) FAILURE @@ -212,15 +236,15 @@ func5 (_Decimal32 a1, _Decimal64 a2, _Decimal128 a3, int main () { - func0 (1., 2., 3., 4., 5., 6., 7., 8., 9.dd, 10.dl); - func1 (1.dd, 2.dl, 3.dd, 4.dl, 5.dd, 6.dl, 7.dd, 8.dl); - func2 (1.dl, 2.dd, 3.dl, 4.dd, 5.dl, 6.dd, 7.dl, 8.dd); - func3 (1.dd, 2.dl, 3.dd, 4.dl, 5.dl); - func4 (501.2df, 502.2df, 503.2df, 504.2df, 505.2df, 506.2df, 507.2df, - 508.2df, 509.2df, 510.2df, 511.2df, 512.2df, 513.2df, 514.2df, - 515.2df, 516.2df); - func5 (601.2df, 602.2dd, 603.2dl, 604.2df, 605.2dd, 606.2dl, - 607.2df, 608.2dd, 609.2dl, 610.2df, 611.2dd, 612.2dl); + func0_asm (1., 2., 3., 4., 5., 6., 7., 8., 9.dd, 10.dl); + func1_asm (1.dd, 2.dl, 3.dd, 4.dl, 5.dd, 6.dl, 7.dd, 8.dl); + func2_asm (1.dl, 2.dd, 3.dl, 4.dd, 5.dl, 6.dd, 7.dl, 8.dd); + func3_asm (1.dd, 2.dl, 3.dd, 4.dl, 5.dl); + func4_asm (501.2df, 502.2df, 503.2df, 504.2df, 505.2df, 506.2df, 507.2df, + 508.2df, 509.2df, 510.2df, 511.2df, 512.2df, 513.2df, 514.2df, + 515.2df, 516.2df); + func5_asm (601.2df, 602.2dd, 603.2dl, 604.2df, 605.2dd, 606.2dl, + 607.2df, 608.2dd, 609.2dl, 610.2df, 611.2dd, 612.2dl); if (failcnt != 0) abort (); diff --git a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c index 3badf7f9848..eb54a653bf7 100644 --- a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c +++ b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c @@ -1,4 +1,5 @@ /* { dg-do run { target { powerpc64-*-* && { lp64 && dfprt } } } } */ +/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */ /* { dg-options "-std=gnu99 -O2 -fno-strict-aliasing" } */ /* Testcase to check for ABI compliance of parameter passing @@ -31,60 +32,42 @@ typedef struct reg_parms_t gparms; -/* Testcase could break on future gcc's, if parameter regs - are changed before this asm. */ - -#ifndef __MACH__ -#define save_parms(lparms) \ - asm volatile ("ld 11,gparms@got(2)\n\t" \ - "std 3,0(11)\n\t" \ - "std 4,8(11)\n\t" \ - "std 5,16(11)\n\t" \ - "std 6,24(11)\n\t" \ - "std 7,32(11)\n\t" \ - "std 8,40(11)\n\t" \ - "std 9,48(11)\n\t" \ - "std 10,56(11)\n\t" \ - "stfd 1,64(11)\n\t" \ - "stfd 2,72(11)\n\t" \ - "stfd 3,80(11)\n\t" \ - "stfd 4,88(11)\n\t" \ - "stfd 5,96(11)\n\t" \ - "stfd 6,104(11)\n\t" \ - "stfd 7,112(11)\n\t" \ - "stfd 8,120(11)\n\t" \ - "stfd 9,128(11)\n\t" \ - "stfd 10,136(11)\n\t" \ - "stfd 11,144(11)\n\t" \ - "stfd 12,152(11)\n\t" \ - "stfd 13,160(11)\n\t":::"11", "memory"); \ - lparms = gparms; -#else -#define save_parms(lparms) \ - asm volatile ("ld r11,gparms@got(r2)\n\t" \ - "std r3,0(r11)\n\t" \ - "std r4,8(r11)\n\t" \ - "std r5,16(r11)\n\t" \ - "std r6,24(r11)\n\t" \ - "std r7,32(r11)\n\t" \ - "std r8,40(r11)\n\t" \ - "std r9,48(r11)\n\t" \ - "std r10,56(r11)\n\t" \ - "stfd f1,64(r11)\n\t" \ - "stfd f2,72(r11)\n\t" \ - "stfd f3,80(r11)\n\t" \ - "stfd f4,88(r11)\n\t" \ - "stfd f5,96(r11)\n\t" \ - "stfd f6,104(r11)\n\t" \ - "stfd f7,112(r11)\n\t" \ - "stfd f8,120(r11)\n\t" \ - "stfd f9,128(r11)\n\t" \ - "stfd f10,136(r11)\n\t" \ - "stfd f11,144(r11)\n\t" \ - "stfd f12,152(r11)\n\t" \ - "stfd f13,160(r11)\n\t":::"r11", "memory"); \ - lparms = gparms; -#endif +/* Wrapper to save the GPRs and FPRs and then jump to the real function. */ +#define WRAPPER(NAME) \ +__asm__ ("\t.globl\t" #NAME "_asm\n\t" \ + ".section \".opd\",\"aw\"\n\t" \ + ".align 3\n" \ + #NAME "_asm:\n\t" \ + ".quad .L." #NAME "_asm,.TOC.@tocbase,0\n\t" \ + ".text\n\t" \ + ".type " #NAME "_asm, @function\n" \ + ".L." #NAME "_asm:\n\t" \ + "ld 11,gparms@got(2)\n\t" \ + "std 3,0(11)\n\t" \ + "std 4,8(11)\n\t" \ + "std 5,16(11)\n\t" \ + "std 6,24(11)\n\t" \ + "std 7,32(11)\n\t" \ + "std 8,40(11)\n\t" \ + "std 9,48(11)\n\t" \ + "std 10,56(11)\n\t" \ + "stfd 1,64(11)\n\t" \ + "stfd 2,72(11)\n\t" \ + "stfd 3,80(11)\n\t" \ + "stfd 4,88(11)\n\t" \ + "stfd 5,96(11)\n\t" \ + "stfd 6,104(11)\n\t" \ + "stfd 7,112(11)\n\t" \ + "stfd 8,120(11)\n\t" \ + "stfd 9,128(11)\n\t" \ + "stfd 10,136(11)\n\t" \ + "stfd 11,144(11)\n\t" \ + "stfd 12,152(11)\n\t" \ + "stfd 13,160(11)\n\t" \ + "b " #NAME "\n\t" \ + ".long 0\n\t" \ + ".byte 0,0,0,0,0,0,0,0\n\t" \ + ".size " #NAME ",.-" #NAME "\n") typedef struct sf { @@ -97,6 +80,13 @@ typedef struct sf unsigned long slot[100]; } stack_frame_t; +extern void func0_asm (double, double, double, double, double, double, + double, double, double, double, double, double, + double, double, + _Decimal64, _Decimal128, _Decimal64); + +WRAPPER(func0); + /* Fill up floating point registers with double arguments, forcing decimal float arguments into the parameter save area. */ void __attribute__ ((noinline)) @@ -105,186 +95,209 @@ func0 (double a1, double a2, double a3, double a4, double a5, double a6, double a13, double a14, _Decimal64 a15, _Decimal128 a16, _Decimal64 a17) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; - if (a1 != lparms.fprs[0]) FAILURE - if (a2 != lparms.fprs[1]) FAILURE - if (a3 != lparms.fprs[2]) FAILURE - if (a4 != lparms.fprs[3]) FAILURE - if (a5 != lparms.fprs[4]) FAILURE - if (a6 != lparms.fprs[5]) FAILURE - if (a7 != lparms.fprs[6]) FAILURE - if (a8 != lparms.fprs[7]) FAILURE - if (a9 != lparms.fprs[8]) FAILURE - if (a10 != lparms.fprs[9]) FAILURE - if (a11 != lparms.fprs[10]) FAILURE - if (a12 != lparms.fprs[11]) FAILURE - if (a13 != lparms.fprs[12]) FAILURE + if (a1 != gparms.fprs[0]) FAILURE + if (a2 != gparms.fprs[1]) FAILURE + if (a3 != gparms.fprs[2]) FAILURE + if (a4 != gparms.fprs[3]) FAILURE + if (a5 != gparms.fprs[4]) FAILURE + if (a6 != gparms.fprs[5]) FAILURE + if (a7 != gparms.fprs[6]) FAILURE + if (a8 != gparms.fprs[7]) FAILURE + if (a9 != gparms.fprs[8]) FAILURE + if (a10 != gparms.fprs[9]) FAILURE + if (a11 != gparms.fprs[10]) FAILURE + if (a12 != gparms.fprs[11]) FAILURE + if (a13 != gparms.fprs[12]) FAILURE if (a14 != *(double *)&sp->slot[13]) FAILURE if (a15 != *(_Decimal64 *)&sp->slot[14]) FAILURE if (a16 != *(_Decimal128 *)&sp->slot[15]) FAILURE if (a17 != *(_Decimal64 *)&sp->slot[17]) FAILURE } +extern void func1_asm (double, double, double, double, double, double, + double, double, double, double, double, double, + double, _Decimal128 ); + +WRAPPER(func1); + void __attribute__ ((noinline)) func1 (double a1, double a2, double a3, double a4, double a5, double a6, double a7, double a8, double a9, double a10, double a11, double a12, double a13, _Decimal128 a14) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; - if (a1 != lparms.fprs[0]) FAILURE - if (a2 != lparms.fprs[1]) FAILURE - if (a3 != lparms.fprs[2]) FAILURE - if (a4 != lparms.fprs[3]) FAILURE - if (a5 != lparms.fprs[4]) FAILURE - if (a6 != lparms.fprs[5]) FAILURE - if (a7 != lparms.fprs[6]) FAILURE - if (a8 != lparms.fprs[7]) FAILURE - if (a9 != lparms.fprs[8]) FAILURE - if (a10 != lparms.fprs[9]) FAILURE - if (a11 != lparms.fprs[10]) FAILURE - if (a12 != lparms.fprs[11]) FAILURE - if (a13 != lparms.fprs[12]) FAILURE + if (a1 != gparms.fprs[0]) FAILURE + if (a2 != gparms.fprs[1]) FAILURE + if (a3 != gparms.fprs[2]) FAILURE + if (a4 != gparms.fprs[3]) FAILURE + if (a5 != gparms.fprs[4]) FAILURE + if (a6 != gparms.fprs[5]) FAILURE + if (a7 != gparms.fprs[6]) FAILURE + if (a8 != gparms.fprs[7]) FAILURE + if (a9 != gparms.fprs[8]) FAILURE + if (a10 != gparms.fprs[9]) FAILURE + if (a11 != gparms.fprs[10]) FAILURE + if (a12 != gparms.fprs[11]) FAILURE + if (a13 != gparms.fprs[12]) FAILURE if (a14 != *(_Decimal128 *)&sp->slot[13]) FAILURE } +extern void func2_asm (double, double, double, double, double, double, + double, double, double, double, double, double, + _Decimal128); + +WRAPPER(func2); + void __attribute__ ((noinline)) func2 (double a1, double a2, double a3, double a4, double a5, double a6, double a7, double a8, double a9, double a10, double a11, double a12, _Decimal128 a13) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; - if (a1 != lparms.fprs[0]) FAILURE - if (a2 != lparms.fprs[1]) FAILURE - if (a3 != lparms.fprs[2]) FAILURE - if (a4 != lparms.fprs[3]) FAILURE - if (a5 != lparms.fprs[4]) FAILURE - if (a6 != lparms.fprs[5]) FAILURE - if (a7 != lparms.fprs[6]) FAILURE - if (a8 != lparms.fprs[7]) FAILURE - if (a9 != lparms.fprs[8]) FAILURE - if (a10 != lparms.fprs[9]) FAILURE - if (a11 != lparms.fprs[10]) FAILURE - if (a12 != lparms.fprs[11]) FAILURE + if (a1 != gparms.fprs[0]) FAILURE + if (a2 != gparms.fprs[1]) FAILURE + if (a3 != gparms.fprs[2]) FAILURE + if (a4 != gparms.fprs[3]) FAILURE + if (a5 != gparms.fprs[4]) FAILURE + if (a6 != gparms.fprs[5]) FAILURE + if (a7 != gparms.fprs[6]) FAILURE + if (a8 != gparms.fprs[7]) FAILURE + if (a9 != gparms.fprs[8]) FAILURE + if (a10 != gparms.fprs[9]) FAILURE + if (a11 != gparms.fprs[10]) FAILURE + if (a12 != gparms.fprs[11]) FAILURE if (a13 != *(_Decimal128 *)&sp->slot[12]) FAILURE } +extern void func3_asm (_Decimal64, _Decimal128, _Decimal64, _Decimal128, + _Decimal64, _Decimal128, _Decimal64, _Decimal128, + _Decimal64, _Decimal128); + +WRAPPER(func3); + void __attribute__ ((noinline)) func3 (_Decimal64 a1, _Decimal128 a2, _Decimal64 a3, _Decimal128 a4, _Decimal64 a5, _Decimal128 a6, _Decimal64 a7, _Decimal128 a8, _Decimal64 a9, _Decimal128 a10) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; - if (a1 != *(_Decimal64 *)&lparms.fprs[0]) FAILURE /* f1 */ - if (a2 != *(_Decimal128 *)&lparms.fprs[1]) FAILURE /* f2 & f3 */ - if (a3 != *(_Decimal64 *)&lparms.fprs[3]) FAILURE /* f4 */ - if (a4 != *(_Decimal128 *)&lparms.fprs[5]) FAILURE /* f6 & f7 */ - if (a5 != *(_Decimal64 *)&lparms.fprs[7]) FAILURE /* f8 */ - if (a6 != *(_Decimal128 *)&lparms.fprs[9]) FAILURE /* f10 & f11 */ - if (a7 != *(_Decimal64 *)&lparms.fprs[11]) FAILURE /* f12 */ + if (a1 != *(_Decimal64 *)&gparms.fprs[0]) FAILURE /* f1 */ + if (a2 != *(_Decimal128 *)&gparms.fprs[1]) FAILURE /* f2 & f3 */ + if (a3 != *(_Decimal64 *)&gparms.fprs[3]) FAILURE /* f4 */ + if (a4 != *(_Decimal128 *)&gparms.fprs[5]) FAILURE /* f6 & f7 */ + if (a5 != *(_Decimal64 *)&gparms.fprs[7]) FAILURE /* f8 */ + if (a6 != *(_Decimal128 *)&gparms.fprs[9]) FAILURE /* f10 & f11 */ + if (a7 != *(_Decimal64 *)&gparms.fprs[11]) FAILURE /* f12 */ if (a8 != *(_Decimal128 *)&sp->slot[10]) FAILURE if (a9 != *(_Decimal64 *)&sp->slot[12]) FAILURE if (a10 != *(_Decimal128 *)&sp->slot[13]) FAILURE } +extern void func4_asm (_Decimal128, _Decimal64, _Decimal128, _Decimal64, + _Decimal128, _Decimal64, _Decimal128, _Decimal64); + +WRAPPER(func4); + void __attribute__ ((noinline)) func4 (_Decimal128 a1, _Decimal64 a2, _Decimal128 a3, _Decimal64 a4, _Decimal128 a5, _Decimal64 a6, _Decimal128 a7, _Decimal64 a8) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; - if (a1 != *(_Decimal128 *)&lparms.fprs[1]) FAILURE /* f2 & f3 */ - if (a2 != *(_Decimal64 *)&lparms.fprs[3]) FAILURE /* f4 */ - if (a3 != *(_Decimal128 *)&lparms.fprs[5]) FAILURE /* f6 & f7 */ - if (a4 != *(_Decimal64 *)&lparms.fprs[7]) FAILURE /* f8 */ - if (a5 != *(_Decimal128 *)&lparms.fprs[9]) FAILURE /* f10 & f11 */ - if (a6 != *(_Decimal64 *)&lparms.fprs[11]) FAILURE /* f12 */ + if (a1 != *(_Decimal128 *)&gparms.fprs[1]) FAILURE /* f2 & f3 */ + if (a2 != *(_Decimal64 *)&gparms.fprs[3]) FAILURE /* f4 */ + if (a3 != *(_Decimal128 *)&gparms.fprs[5]) FAILURE /* f6 & f7 */ + if (a4 != *(_Decimal64 *)&gparms.fprs[7]) FAILURE /* f8 */ + if (a5 != *(_Decimal128 *)&gparms.fprs[9]) FAILURE /* f10 & f11 */ + if (a6 != *(_Decimal64 *)&gparms.fprs[11]) FAILURE /* f12 */ if (a7 != *(_Decimal128 *)&sp->slot[9]) FAILURE if (a8 != *(_Decimal64 *)&sp->slot[11]) FAILURE } +extern void func5_asm (_Decimal32, _Decimal32, _Decimal32, _Decimal32, + _Decimal32, _Decimal32, _Decimal32, _Decimal32, + _Decimal32, _Decimal32, _Decimal32, _Decimal32, + _Decimal32, _Decimal32, _Decimal32, _Decimal32); + +WRAPPER(func5); + void __attribute__ ((noinline)) func5 (_Decimal32 a1, _Decimal32 a2, _Decimal32 a3, _Decimal32 a4, _Decimal32 a5, _Decimal32 a6, _Decimal32 a7, _Decimal32 a8, _Decimal32 a9, _Decimal32 a10, _Decimal32 a11, _Decimal32 a12, _Decimal32 a13, _Decimal32 a14, _Decimal32 a15, _Decimal32 a16) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; /* _Decimal32 is passed in the lower half of an FPR or parameter slot. */ - if (a1 != ((d32parm_t *)&lparms.fprs[0])->d) FAILURE /* f1 */ - if (a2 != ((d32parm_t *)&lparms.fprs[1])->d) FAILURE /* f2 */ - if (a3 != ((d32parm_t *)&lparms.fprs[2])->d) FAILURE /* f3 */ - if (a4 != ((d32parm_t *)&lparms.fprs[3])->d) FAILURE /* f4 */ - if (a5 != ((d32parm_t *)&lparms.fprs[4])->d) FAILURE /* f5 */ - if (a6 != ((d32parm_t *)&lparms.fprs[5])->d) FAILURE /* f6 */ - if (a7 != ((d32parm_t *)&lparms.fprs[6])->d) FAILURE /* f7 */ - if (a8 != ((d32parm_t *)&lparms.fprs[7])->d) FAILURE /* f8 */ - if (a9 != ((d32parm_t *)&lparms.fprs[8])->d) FAILURE /* f9 */ - if (a10 != ((d32parm_t *)&lparms.fprs[9])->d) FAILURE /* f10 */ - if (a11 != ((d32parm_t *)&lparms.fprs[10])->d) FAILURE /* f11 */ - if (a12 != ((d32parm_t *)&lparms.fprs[11])->d) FAILURE /* f12 */ - if (a13 != ((d32parm_t *)&lparms.fprs[12])->d) FAILURE /* f13 */ + if (a1 != ((d32parm_t *)&gparms.fprs[0])->d) FAILURE /* f1 */ + if (a2 != ((d32parm_t *)&gparms.fprs[1])->d) FAILURE /* f2 */ + if (a3 != ((d32parm_t *)&gparms.fprs[2])->d) FAILURE /* f3 */ + if (a4 != ((d32parm_t *)&gparms.fprs[3])->d) FAILURE /* f4 */ + if (a5 != ((d32parm_t *)&gparms.fprs[4])->d) FAILURE /* f5 */ + if (a6 != ((d32parm_t *)&gparms.fprs[5])->d) FAILURE /* f6 */ + if (a7 != ((d32parm_t *)&gparms.fprs[6])->d) FAILURE /* f7 */ + if (a8 != ((d32parm_t *)&gparms.fprs[7])->d) FAILURE /* f8 */ + if (a9 != ((d32parm_t *)&gparms.fprs[8])->d) FAILURE /* f9 */ + if (a10 != ((d32parm_t *)&gparms.fprs[9])->d) FAILURE /* f10 */ + if (a11 != ((d32parm_t *)&gparms.fprs[10])->d) FAILURE /* f11 */ + if (a12 != ((d32parm_t *)&gparms.fprs[11])->d) FAILURE /* f12 */ + if (a13 != ((d32parm_t *)&gparms.fprs[12])->d) FAILURE /* f13 */ if (a14 != ((d32parm_t *)&sp->slot[13])->d) FAILURE if (a15 != ((d32parm_t *)&sp->slot[14])->d) FAILURE if (a16 != ((d32parm_t *)&sp->slot[15])->d) FAILURE } +extern void func6_asm (_Decimal32, _Decimal64, _Decimal128, + _Decimal32, _Decimal64, _Decimal128, + _Decimal32, _Decimal64, _Decimal128, + _Decimal32, _Decimal64, _Decimal128); + +WRAPPER(func6); + void __attribute__ ((noinline)) func6 (_Decimal32 a1, _Decimal64 a2, _Decimal128 a3, _Decimal32 a4, _Decimal64 a5, _Decimal128 a6, _Decimal32 a7, _Decimal64 a8, _Decimal128 a9, _Decimal32 a10, _Decimal64 a11, _Decimal128 a12) { - reg_parms_t lparms; stack_frame_t *sp; - save_parms (lparms); sp = __builtin_frame_address (0); sp = sp->backchain; - if (a1 != ((d32parm_t *)&lparms.fprs[0])->d) FAILURE /* f1 */ - if (a2 != *(_Decimal64 *)&lparms.fprs[1]) FAILURE /* f2 */ - if (a3 != *(_Decimal128 *)&lparms.fprs[3]) FAILURE /* f4 & f5 */ - if (a4 != ((d32parm_t *)&lparms.fprs[5])->d) FAILURE /* f6 */ - if (a5 != *(_Decimal64 *)&lparms.fprs[6]) FAILURE /* f7 */ - if (a6 != *(_Decimal128 *)&lparms.fprs[7]) FAILURE /* f8 & f9 */ - if (a7 != ((d32parm_t *)&lparms.fprs[9])->d) FAILURE /* f10 */ - if (a8 != *(_Decimal64 *)&lparms.fprs[10]) FAILURE /* f11 */ - if (a9 != *(_Decimal128 *)&lparms.fprs[11]) FAILURE /* f12 & f13 */ + if (a1 != ((d32parm_t *)&gparms.fprs[0])->d) FAILURE /* f1 */ + if (a2 != *(_Decimal64 *)&gparms.fprs[1]) FAILURE /* f2 */ + if (a3 != *(_Decimal128 *)&gparms.fprs[3]) FAILURE /* f4 & f5 */ + if (a4 != ((d32parm_t *)&gparms.fprs[5])->d) FAILURE /* f6 */ + if (a5 != *(_Decimal64 *)&gparms.fprs[6]) FAILURE /* f7 */ + if (a6 != *(_Decimal128 *)&gparms.fprs[7]) FAILURE /* f8 & f9 */ + if (a7 != ((d32parm_t *)&gparms.fprs[9])->d) FAILURE /* f10 */ + if (a8 != *(_Decimal64 *)&gparms.fprs[10]) FAILURE /* f11 */ + if (a9 != *(_Decimal128 *)&gparms.fprs[11]) FAILURE /* f12 & f13 */ if (a10 != ((d32parm_t *)&sp->slot[12])->d) FAILURE if (a11 != *(_Decimal64 *)&sp->slot[13]) FAILURE } @@ -292,23 +305,23 @@ func6 (_Decimal32 a1, _Decimal64 a2, _Decimal128 a3, int main (void) { - func0 (1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, - 14.5, 15.2dd, 16.2dl, 17.2dd); - func1 (101.5, 102.5, 103.5, 104.5, 105.5, 106.5, 107.5, 108.5, 109.5, - 110.5, 111.5, 112.5, 113.5, 114.2dd); - func2 (201.5, 202.5, 203.5, 204.5, 205.5, 206.5, 207.5, 208.5, 209.5, - 210.5, 211.5, 212.5, 213.2dd); - func3 (301.2dd, 302.2dl, 303.2dd, 304.2dl, 305.2dd, 306.2dl, 307.2dd, - 308.2dl, 309.2dd, 310.2dl); - func4 (401.2dl, 402.2dd, 403.2dl, 404.2dd, 405.2dl, 406.2dd, 407.2dl, - 408.2dd); + func0_asm (1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, + 14.5, 15.2dd, 16.2dl, 17.2dd); + func1_asm (101.5, 102.5, 103.5, 104.5, 105.5, 106.5, 107.5, 108.5, 109.5, + 110.5, 111.5, 112.5, 113.5, 114.2dd); + func2_asm (201.5, 202.5, 203.5, 204.5, 205.5, 206.5, 207.5, 208.5, 209.5, + 210.5, 211.5, 212.5, 213.2dd); + func3_asm (301.2dd, 302.2dl, 303.2dd, 304.2dl, 305.2dd, 306.2dl, 307.2dd, + 308.2dl, 309.2dd, 310.2dl); + func4_asm (401.2dl, 402.2dd, 403.2dl, 404.2dd, 405.2dl, 406.2dd, 407.2dl, + 408.2dd); #if 0 /* _Decimal32 doesn't yet follow the ABI; enable this when it does. */ - func5 (501.2df, 502.2df, 503.2df, 504.2df, 505.2df, 506.2df, 507.2df, - 508.2df, 509.2df, 510.2df, 511.2df, 512.2df, 513.2df, 514.2df, - 515.2df, 516.2df); - func6 (601.2df, 602.2dd, 603.2dl, 604.2df, 605.2dd, 606.2dl, - 607.2df, 608.2dd, 609.2dl, 610.2df, 611.2dd, 612.2dl); + func5_asm (501.2df, 502.2df, 503.2df, 504.2df, 505.2df, 506.2df, 507.2df, + 508.2df, 509.2df, 510.2df, 511.2df, 512.2df, 513.2df, 514.2df, + 515.2df, 516.2df); + func6_asm (601.2df, 602.2dd, 603.2dl, 604.2df, 605.2dd, 606.2dl, + 607.2df, 608.2dd, 609.2dl, 610.2df, 611.2dd, 612.2dl); #endif if (failcnt != 0) diff --git a/gcc/testsuite/gfortran.dg/graphite/graphite.exp b/gcc/testsuite/gfortran.dg/graphite/graphite.exp index 3d43b55d0c3..73c2aeed42f 100644 --- a/gcc/testsuite/gfortran.dg/graphite/graphite.exp +++ b/gcc/testsuite/gfortran.dg/graphite/graphite.exp @@ -51,7 +51,11 @@ gfortran-dg-runtest $scop_files "-O2 -fgraphite -fdump-tree-graphite-all" gfortran-dg-runtest $id_files "-O2 -fgraphite-identity -ffast-math" gfortran-dg-runtest $interchange_files "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all" gfortran-dg-runtest $block_files "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all" -gfortran-dg-runtest $vect_files "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details" + +# Vectorizer tests, to be run or compiled, depending on target capabilities. +if [check_vect_support_and_set_flags] { + gfortran-dg-runtest $vect_files "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details -ffast-math" +} # Tests to be run. set dg-do-what-default run diff --git a/gcc/testsuite/gfortran.dg/transpose_optimization_2.f90 b/gcc/testsuite/gfortran.dg/transpose_optimization_2.f90 index 08923329ff4..ba03374078b 100644 --- a/gcc/testsuite/gfortran.dg/transpose_optimization_2.f90 +++ b/gcc/testsuite/gfortran.dg/transpose_optimization_2.f90 @@ -62,4 +62,5 @@ end ! ! { dg-final { scan-tree-dump-times "parm" 66 "original" } } ! { dg-final { scan-tree-dump-times "atmp" 12 "original" } } +! { dg-final { cleanup-tree-dump "original" } } ! { dg-final { cleanup-modules "mod" } } diff --git a/gcc/toplev.c b/gcc/toplev.c index 4669aa43ecb..c4c72963b4d 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1,7 +1,7 @@ /* Top level of GCC compilers (cc1, cc1plus, etc.) 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. @@ -1814,11 +1814,33 @@ lang_dependent_init (const char *name) void target_reinit (void) { + struct rtl_data saved_x_rtl; + rtx *saved_regno_reg_rtx; + + /* Save *crtl and regno_reg_rtx around the reinitialization + to allow target_reinit being called even after prepare_function_start. */ + saved_regno_reg_rtx = regno_reg_rtx; + if (saved_regno_reg_rtx) + { + saved_x_rtl = *crtl; + memset (crtl, '\0', sizeof (*crtl)); + regno_reg_rtx = NULL; + } + /* Reinitialize RTL backend. */ backend_init_target (); /* Reinitialize lang-dependent parts. */ lang_dependent_init_target (); + + /* And restore it at the end, as free_after_compilation from + expand_dummy_function_end clears it. */ + if (saved_regno_reg_rtx) + { + *crtl = saved_x_rtl; + regno_reg_rtx = saved_regno_reg_rtx; + saved_regno_reg_rtx = NULL; + } } void diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 9e5df7d2c75..54cb46c9464 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -2681,14 +2681,6 @@ analyze_miv_subscript (tree chrec_a, tree *last_conflicts, struct loop *loop_nest) { - /* FIXME: This is a MIV subscript, not yet handled. - Example: (A[{1, +, 1}_1] vs. A[{1, +, 1}_2]) that comes from - (A[i] vs. A[j]). - - In the SIV test we had to solve a Diophantine equation with two - variables. In the MIV case we have to solve a Diophantine - equation with 2*n variables (if the subscript uses n IVs). - */ tree type, difference; dependence_stats.num_miv++; @@ -2960,29 +2952,19 @@ build_classic_dist_vector_1 (struct data_dependence_relation *ddr, && TREE_CODE (access_fn_b) == POLYNOMIAL_CHREC) { int dist, index; - int index_a = index_in_loop_nest (CHREC_VARIABLE (access_fn_a), - DDR_LOOP_NEST (ddr)); - int index_b = index_in_loop_nest (CHREC_VARIABLE (access_fn_b), - DDR_LOOP_NEST (ddr)); - - /* The dependence is carried by the outermost loop. Example: - | loop_1 - | A[{4, +, 1}_1] - | loop_2 - | A[{5, +, 1}_2] - | endloop_2 - | endloop_1 - In this case, the dependence is carried by loop_1. */ - index = index_a < index_b ? index_a : index_b; - *index_carry = MIN (index, *index_carry); + int var_a = CHREC_VARIABLE (access_fn_a); + int var_b = CHREC_VARIABLE (access_fn_b); - if (chrec_contains_undetermined (SUB_DISTANCE (subscript))) + if (var_a != var_b + || chrec_contains_undetermined (SUB_DISTANCE (subscript))) { non_affine_dependence_relation (ddr); return false; } dist = int_cst_value (SUB_DISTANCE (subscript)); + index = index_in_loop_nest (var_a, DDR_LOOP_NEST (ddr)); + *index_carry = MIN (index, *index_carry); /* This is the subscript coupling test. If we have already recorded a distance for this loop (a distance coming from diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h index 17208590897..e5642a0fbe3 100644 --- a/gcc/tree-flow.h +++ b/gcc/tree-flow.h @@ -1,5 +1,5 @@ /* Data and Control Flow Analysis for Trees. - Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Diego Novillo <dnovillo@redhat.com> @@ -852,6 +852,9 @@ bool fixup_noreturn_call (gimple stmt); /* In ipa-pure-const.c */ void warn_function_noreturn (tree); +/* In tree-ssa-ter.c */ +bool stmt_is_replaceable_p (gimple); + #include "tree-flow-inline.h" void swap_tree_operands (gimple, tree *, tree *); diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c index d60e56915c3..1b68b36b30b 100644 --- a/gcc/tree-scalar-evolution.c +++ b/gcc/tree-scalar-evolution.c @@ -1399,7 +1399,7 @@ follow_ssa_edge (struct loop *loop, gimple def, gimple halting_phi, return t_false; /* Give up if the path is longer than the MAX that we allow. */ - if (limit > PARAM_VALUE (PARAM_SCEV_MAX_EXPR_SIZE)) + if (limit > PARAM_VALUE (PARAM_SCEV_MAX_EXPR_COMPLEXITY)) return t_dont_know; def_loop = loop_containing_stmt (def); diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index ee85f6fe006..c14e13c7248 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -1890,7 +1890,7 @@ number_of_iterations_exit (struct loop *loop, edge exit, /* With -funsafe-loop-optimizations we assume that nothing bad can happen. But if we can prove that there is overflow or some other source of weird behavior, ignore the loop even with -funsafe-loop-optimizations. */ - if (integer_zerop (niter->assumptions)) + if (integer_zerop (niter->assumptions) || !single_exit (loop)) return false; if (flag_unsafe_loop_optimizations) diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c index 656d2b6a8e0..43693eaeae7 100644 --- a/gcc/tree-ssa-loop.c +++ b/gcc/tree-ssa-loop.c @@ -309,7 +309,7 @@ struct gimple_opt_pass pass_graphite_transforms = 0, /* properties_provided */ 0, /* properties_destroyed */ 0, /* todo_flags_start */ - 0 /* todo_flags_finish */ + TODO_dump_func /* todo_flags_finish */ } }; diff --git a/gcc/tree-ssa-ter.c b/gcc/tree-ssa-ter.c index 47954cfa348..af8aae04a74 100644 --- a/gcc/tree-ssa-ter.c +++ b/gcc/tree-ssa-ter.c @@ -1,5 +1,5 @@ /* Routines for performing Temporary Expression Replacement (TER) in SSA trees. - 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 Andrew MacLeod <amacleod@redhat.com> @@ -357,10 +357,17 @@ add_dependence (temp_expr_table_p tab, int version, tree var) } -/* Return TRUE if expression STMT is suitable for replacement. */ +/* Return TRUE if expression STMT is suitable for replacement. + TER is true if is_replaceable_p is called from within TER, false + when used from within stmt_is_replaceable_p, i.e. EXPAND_INITIALIZER + expansion. The differences are that with !TER some tests are skipped + to make it more aggressive (doesn't require the same bb, or for -O0 + same locus and same BLOCK), on the other side never considers memory + loads as replaceable, because those don't ever lead into constant + expressions. */ static inline bool -is_replaceable_p (gimple stmt) +is_replaceable_p (gimple stmt, bool ter) { use_operand_p use_p; tree def; @@ -386,7 +393,7 @@ is_replaceable_p (gimple stmt) return false; /* If the use isn't in this block, it wont be replaced either. */ - if (gimple_bb (use_stmt) != gimple_bb (stmt)) + if (ter && gimple_bb (use_stmt) != gimple_bb (stmt)) return false; locus1 = gimple_location (stmt); @@ -404,6 +411,7 @@ is_replaceable_p (gimple stmt) } if (!optimize + && ter && ((locus1 && locus1 != locus2) || (block1 && block1 != block2))) return false; @@ -416,7 +424,7 @@ is_replaceable_p (gimple stmt) return false; /* Without alias info we can't move around loads. */ - if (!optimize + if ((!optimize || !ter) && gimple_assign_single_p (stmt) && !is_gimple_val (gimple_assign_rhs1 (stmt))) return false; @@ -444,6 +452,16 @@ is_replaceable_p (gimple stmt) } +/* Variant of is_replaceable_p test for use in EXPAND_INITIALIZER + expansion. */ + +bool +stmt_is_replaceable_p (gimple stmt) +{ + return is_replaceable_p (stmt, false); +} + + /* This function will remove the expression for VERSION from replacement consideration in table TAB. If FREE_EXPR is true, then remove the expression from consideration as well by freeing the decl uid bitmap. */ @@ -477,7 +495,7 @@ process_replaceable (temp_expr_table_p tab, gimple stmt, int call_cnt) ssa_op_iter iter; bitmap def_vars, use_vars; - gcc_checking_assert (is_replaceable_p (stmt)); + gcc_checking_assert (is_replaceable_p (stmt, true)); def = SINGLE_SSA_TREE_OPERAND (stmt, SSA_OP_DEF); version = SSA_NAME_VERSION (def); @@ -589,7 +607,7 @@ find_replaceable_in_bb (temp_expr_table_p tab, basic_block bb) if (is_gimple_debug (stmt)) continue; - stmt_replaceable = is_replaceable_p (stmt); + stmt_replaceable = is_replaceable_p (stmt, true); /* Determine if this stmt finishes an existing expression. */ FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_USE) diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index e0477d40bcb..7543a5a0b86 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -737,7 +737,7 @@ use_narrower_mode_test (rtx *loc, void *data) switch (GET_CODE (*loc)) { case REG: - if (cselib_lookup (*loc, GET_MODE (SUBREG_REG (subreg)), 0)) + if (cselib_lookup (*loc, GET_MODE (SUBREG_REG (subreg)), 0, VOIDmode)) return 1; return -1; case PLUS: @@ -3954,8 +3954,10 @@ variable_post_merge_new_vals (void **slot, void *info) subsequent rounds. */ cselib_val *v; gcc_assert (!cselib_lookup (node->loc, - GET_MODE (node->loc), 0)); - v = cselib_lookup (node->loc, GET_MODE (node->loc), 1); + GET_MODE (node->loc), 0, + VOIDmode)); + v = cselib_lookup (node->loc, GET_MODE (node->loc), 1, + VOIDmode); cselib_preserve_value (v); cselib_invalidate_rtx (node->loc); cval = v->val_rtx; @@ -4793,7 +4795,7 @@ find_use_val (rtx x, enum machine_mode mode, struct count_use_info *cui) return cui->sets[i].src_elt; } else - return cselib_lookup (x, mode, 0); + return cselib_lookup (x, mode, 0, VOIDmode); } return NULL; @@ -4822,14 +4824,15 @@ replace_expr_with_values (rtx loc) else if (MEM_P (loc)) { cselib_val *addr = cselib_lookup (XEXP (loc, 0), - get_address_mode (loc), 0); + get_address_mode (loc), 0, + GET_MODE (loc)); if (addr) return replace_equiv_address_nv (loc, addr->val_rtx); else return NULL; } else - return cselib_subst_to_values (loc); + return cselib_subst_to_values (loc, VOIDmode); } /* Determine what kind of micro operation to choose for a USE. Return @@ -4849,7 +4852,8 @@ use_type (rtx loc, struct count_use_info *cui, enum machine_mode *modep) rtx ploc = PAT_VAR_LOCATION_LOC (loc); if (! VAR_LOC_UNKNOWN_P (ploc)) { - cselib_val *val = cselib_lookup (ploc, GET_MODE (loc), 1); + cselib_val *val = cselib_lookup (ploc, GET_MODE (loc), 1, + VOIDmode); /* ??? flag_float_store and volatile mems are never given values, but we could in theory use them for @@ -4871,7 +4875,8 @@ use_type (rtx loc, struct count_use_info *cui, enum machine_mode *modep) if (REG_P (loc) || (find_use_val (loc, GET_MODE (loc), cui) && cselib_lookup (XEXP (loc, 0), - get_address_mode (loc), 0))) + get_address_mode (loc), 0, + GET_MODE (loc)))) return MO_VAL_SET; } else @@ -5033,13 +5038,15 @@ add_uses (rtx *ploc, void *data) rtx mloc = vloc; enum machine_mode address_mode = get_address_mode (mloc); cselib_val *val - = cselib_lookup (XEXP (mloc, 0), address_mode, 0); + = cselib_lookup (XEXP (mloc, 0), address_mode, 0, + GET_MODE (mloc)); if (val && !cselib_preserved_value_p (val)) { micro_operation moa; preserve_value (val); - mloc = cselib_subst_to_values (XEXP (mloc, 0)); + mloc = cselib_subst_to_values (XEXP (mloc, 0), + GET_MODE (mloc)); moa.type = MO_VAL_USE; moa.insn = cui->insn; moa.u.loc = gen_rtx_CONCAT (address_mode, @@ -5109,13 +5116,15 @@ add_uses (rtx *ploc, void *data) rtx mloc = oloc; enum machine_mode address_mode = get_address_mode (mloc); cselib_val *val - = cselib_lookup (XEXP (mloc, 0), address_mode, 0); + = cselib_lookup (XEXP (mloc, 0), address_mode, 0, + GET_MODE (mloc)); if (val && !cselib_preserved_value_p (val)) { micro_operation moa; preserve_value (val); - mloc = cselib_subst_to_values (XEXP (mloc, 0)); + mloc = cselib_subst_to_values (XEXP (mloc, 0), + GET_MODE (mloc)); moa.type = MO_VAL_USE; moa.insn = cui->insn; moa.u.loc = gen_rtx_CONCAT (address_mode, @@ -5225,7 +5234,7 @@ reverse_op (rtx val, const_rtx expr) if (!SCALAR_INT_MODE_P (GET_MODE (src)) || XEXP (src, 0) == cfa_base_rtx) return NULL_RTX; - v = cselib_lookup (XEXP (src, 0), GET_MODE (XEXP (src, 0)), 0); + v = cselib_lookup (XEXP (src, 0), GET_MODE (XEXP (src, 0)), 0, VOIDmode); if (!v || !cselib_preserved_value_p (v)) return NULL_RTX; @@ -5346,13 +5355,15 @@ add_stores (rtx loc, const_rtx expr, void *cuip) rtx mloc = loc; enum machine_mode address_mode = get_address_mode (mloc); cselib_val *val = cselib_lookup (XEXP (mloc, 0), - address_mode, 0); + address_mode, 0, + GET_MODE (mloc)); if (val && !cselib_preserved_value_p (val)) { preserve_value (val); mo.type = MO_VAL_USE; - mloc = cselib_subst_to_values (XEXP (mloc, 0)); + mloc = cselib_subst_to_values (XEXP (mloc, 0), + GET_MODE (mloc)); mo.u.loc = gen_rtx_CONCAT (address_mode, val->val_rtx, mloc); mo.insn = cui->insn; if (dump_file && (dump_flags & TDF_DETAILS)) @@ -5411,7 +5422,7 @@ add_stores (rtx loc, const_rtx expr, void *cuip) if (GET_CODE (PATTERN (cui->insn)) == COND_EXEC) { - cselib_val *oval = cselib_lookup (oloc, GET_MODE (oloc), 0); + cselib_val *oval = cselib_lookup (oloc, GET_MODE (oloc), 0, VOIDmode); gcc_assert (oval != v); gcc_assert (REG_P (oloc) || MEM_P (oloc)); @@ -8077,7 +8088,8 @@ vt_add_function_parameter (tree parm) if (offset) return; - val = cselib_lookup (var_lowpart (mode, incoming), mode, true); + val = cselib_lookup (var_lowpart (mode, incoming), mode, true, + VOIDmode); /* ??? Float-typed values in memory are not handled by cselib. */ @@ -8197,7 +8209,7 @@ vt_init_cfa_base (void) frame_pointer_needed ? hard_frame_pointer_rtx : stack_pointer_rtx); val = cselib_lookup_from_insn (cfa_base_rtx, GET_MODE (cfa_base_rtx), 1, - get_insns ()); + VOIDmode, get_insns ()); preserve_value (val); cselib_preserve_cfa_base_value (val, REGNO (cfa_base_rtx)); var_reg_decl_set (&VTI (ENTRY_BLOCK_PTR)->out, cfa_base_rtx, diff --git a/gcc/varasm.c b/gcc/varasm.c index a1cddac16c1..76675cdeb0d 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -119,6 +119,7 @@ static void output_addressed_constants (tree); static unsigned HOST_WIDE_INT array_size_for_constructor (tree); static unsigned min_align (unsigned, unsigned); static void globalize_decl (tree); +static bool decl_readonly_section_1 (enum section_category); #ifdef BSS_SECTION_ASM_OP #ifdef ASM_OUTPUT_BSS static void asm_output_bss (FILE *, tree, const char *, @@ -294,11 +295,31 @@ get_section (const char *name, unsigned int flags, tree decl) if ((sect->common.flags & ~SECTION_DECLARED) != flags && ((sect->common.flags | flags) & SECTION_OVERRIDE) == 0) { + /* It is fine if one of the section flags is + SECTION_WRITE | SECTION_RELRO and the other has none of these + flags (i.e. read-only) in named sections and either the + section hasn't been declared yet or has been declared as writable. + In that case just make sure the resulting flags are + SECTION_WRITE | SECTION_RELRO, ie. writable only because of + relocations. */ + if (((sect->common.flags ^ flags) & (SECTION_WRITE | SECTION_RELRO)) + == (SECTION_WRITE | SECTION_RELRO) + && (sect->common.flags + & ~(SECTION_DECLARED | SECTION_WRITE | SECTION_RELRO)) + == (flags & ~(SECTION_WRITE | SECTION_RELRO)) + && ((sect->common.flags & SECTION_DECLARED) == 0 + || (sect->common.flags & SECTION_WRITE))) + { + sect->common.flags |= (SECTION_WRITE | SECTION_RELRO); + return sect; + } /* Sanity check user variables for flag changes. */ if (decl == 0) decl = sect->named.decl; gcc_assert (decl); error ("%+D causes a section type conflict", decl); + /* Make sure we don't error about one section multiple times. */ + sect->common.flags |= SECTION_OVERRIDE; } } return sect; @@ -985,7 +1006,7 @@ align_variable (tree decl, bool dont_output_data) should be placed. PREFER_NOSWITCH_P is true if a noswitch section should be used wherever possible. */ -static section * +section * get_variable_section (tree decl, bool prefer_noswitch_p) { addr_space_t as = ADDR_SPACE_GENERIC; @@ -6026,10 +6047,25 @@ default_section_type_flags (tree decl, const char *name, int reloc) if (decl && TREE_CODE (decl) == FUNCTION_DECL) flags = SECTION_CODE; - else if (decl && decl_readonly_section (decl, reloc)) - flags = 0; + else if (decl) + { + enum section_category category + = categorize_decl_for_section (decl, reloc); + if (decl_readonly_section_1 (category)) + flags = 0; + else if (category == SECCAT_DATA_REL_RO + || category == SECCAT_DATA_REL_RO_LOCAL) + flags = SECTION_WRITE | SECTION_RELRO; + else + flags = SECTION_WRITE; + } else - flags = SECTION_WRITE; + { + flags = SECTION_WRITE; + if (strcmp (name, ".data.rel.ro") == 0 + || strcmp (name, ".data.rel.ro.local") == 0) + flags |= SECTION_RELRO; + } if (decl && DECL_ONE_ONLY (decl)) flags |= SECTION_LINKONCE; @@ -6250,17 +6286,13 @@ categorize_decl_for_section (const_tree decl, int reloc) /* Here the reloc_rw_mask is not testing whether the section should be read-only or not, but whether the dynamic link will have to do something. If so, we wish to segregate the data in order to - minimize cache misses inside the dynamic linker. If the data - has a section attribute, ignore reloc_rw_mask() so that all data - in a given named section is catagorized in the same way. */ - if (reloc & targetm.asm_out.reloc_rw_mask () - && !lookup_attribute ("section", DECL_ATTRIBUTES (decl))) + minimize cache misses inside the dynamic linker. */ + if (reloc & targetm.asm_out.reloc_rw_mask ()) ret = reloc == 1 ? SECCAT_DATA_REL_LOCAL : SECCAT_DATA_REL; else ret = SECCAT_DATA; } - else if (reloc & targetm.asm_out.reloc_rw_mask () - && !lookup_attribute ("section", DECL_ATTRIBUTES (decl))) + else if (reloc & targetm.asm_out.reloc_rw_mask ()) ret = reloc == 1 ? SECCAT_DATA_REL_RO_LOCAL : SECCAT_DATA_REL_RO; else if (reloc || flag_merge_constants < 2) /* C and C++ don't allow different variables to share the same @@ -6311,10 +6343,10 @@ categorize_decl_for_section (const_tree decl, int reloc) return ret; } -bool -decl_readonly_section (const_tree decl, int reloc) +static bool +decl_readonly_section_1 (enum section_category category) { - switch (categorize_decl_for_section (decl, reloc)) + switch (category) { case SECCAT_RODATA: case SECCAT_RODATA_MERGE_STR: @@ -6322,13 +6354,17 @@ decl_readonly_section (const_tree decl, int reloc) case SECCAT_RODATA_MERGE_CONST: case SECCAT_SRODATA: return true; - break; default: return false; - break; } } +bool +decl_readonly_section (const_tree decl, int reloc) +{ + return decl_readonly_section_1 (categorize_decl_for_section (decl, reloc)); +} + /* Select a section based on the above categorization. */ section * diff --git a/gcc/varpool.c b/gcc/varpool.c index 2e37255636c..5d0eb6893ff 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -565,11 +565,29 @@ varpool_remove_unreferenced_decls (void) varpool_analyze_pending_decls (); } +/* For variables in named sections make sure get_variable_section + is called before we switch to those sections. Then section + conflicts between read-only and read-only requiring relocations + sections can be resolved. */ +void +varpool_finalize_named_section_flags (struct varpool_node *node) +{ + if (!TREE_ASM_WRITTEN (node->decl) + && !node->alias + && !node->in_other_partition + && !DECL_EXTERNAL (node->decl) + && TREE_CODE (node->decl) == VAR_DECL + && !DECL_HAS_VALUE_EXPR_P (node->decl) + && DECL_SECTION_NAME (node->decl)) + get_variable_section (node->decl, false); +} + /* Output all variables enqueued to be assembled. */ bool varpool_assemble_pending_decls (void) { bool changed = false; + struct varpool_node *node; if (seen_error ()) return false; @@ -580,6 +598,9 @@ varpool_assemble_pending_decls (void) elsewhere. */ varpool_analyze_pending_decls (); + for (node = varpool_nodes_queue; node; node = node->next_needed) + varpool_finalize_named_section_flags (node); + while (varpool_nodes_queue) { struct varpool_node *node = varpool_nodes_queue; diff --git a/gcc/web.c b/gcc/web.c index 9b849249b0d..7014aa55dc7 100644 --- a/gcc/web.c +++ b/gcc/web.c @@ -260,7 +260,11 @@ entry_register (struct web_entry *entry, df_ref ref, unsigned int *used) and there won't be any use for the other values when we get to this point. */ if (used[REGNO (reg)] != 1) - newreg = reg, used[REGNO (reg)] = 1; + { + newreg = reg; + if (!used[REGNO (reg)]) + used[REGNO (reg)] = 1; + } else { newreg = gen_reg_rtx (GET_MODE (reg)); diff --git a/libffi/ChangeLog b/libffi/ChangeLog index f5db1e4792f..53990f48fad 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -15,7 +15,7 @@ * src/powerpc/darwin.S: Provide Darwin64 implementation, update comments. * src/powerpc/ffi_darwin.c: Likewise. - + 2010-12-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * configure.ac (libffi_cv_as_ascii_pseudo_op): Use double @@ -224,7 +224,7 @@ 2010-01-15 Oliver Kiddle <okiddle@yahoo.co.uk> * src/x86/ffitarget.h (ffi_abi): Check for __i386 and __amd64 for - Sun Studio compiler compatibility. + Sun Studio compiler compatibility. 2010-01-12 Conrad Irwin <conrad.irwin@gmail.com> diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 47ab730be5b..82f933874d5 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,24 @@ +2011-02-05 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libgfortran/47567 + * io/write_float.def (output_float): Eliminate some redundant code. + Adjust width for case of F0.X for values of zero and all other values. + Expand cases where '*' is set to give cleaner results. + +2011-02-05 Janne Blomqvist <jb@gcc.gnu.org> + + PR libfortran/47571 + * intrinsics/time_1.h (GF_CLOCK_MONOTONIC): Move to system_clock.c. + (weak_gettime): Likewise. + (gf_gettime): Change API, move weak_gettime() usage to + system_clock.c + * intrinsics/system_clock.c (GTHREAD_USE_WEAK): Define. + (gf_gettime_mono): New function. + (system_clock_4): Use gf_gettime_mono(). + (system_clock_8): Likewise. + * intrinsics/date_and_time.c (date_and_time): Update gf_gettime() + usage. + 2011-02-02 Janne Blomqvist <jb@gcc.gnu.org> PR libfortran/47571 diff --git a/libgfortran/intrinsics/date_and_time.c b/libgfortran/intrinsics/date_and_time.c index 714df14c8f1..c58d11437b3 100644 --- a/libgfortran/intrinsics/date_and_time.c +++ b/libgfortran/intrinsics/date_and_time.c @@ -162,11 +162,11 @@ date_and_time (char *__date, char *__time, char *__zone, struct tm local_time; struct tm UTC_time; - long nanosecs; + long usecs; - if (!gf_gettime(GF_CLOCK_REALTIME, <, &nanosecs)) + if (!gf_gettime (<, &usecs)) { - values[7] = nanosecs / 1000000; + values[7] = usecs / 1000; localtime_r (<, &local_time); gmtime_r (<, &UTC_time); diff --git a/libgfortran/intrinsics/system_clock.c b/libgfortran/intrinsics/system_clock.c index 37155628d53..3a44dd9666b 100644 --- a/libgfortran/intrinsics/system_clock.c +++ b/libgfortran/intrinsics/system_clock.c @@ -29,6 +29,75 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "time_1.h" +#ifdef HAVE_CLOCK_GETTIME +/* POSIX states that CLOCK_REALTIME must be present if clock_gettime + is available, others are optional. */ +#ifdef CLOCK_MONOTONIC +#define GF_CLOCK_MONOTONIC CLOCK_MONOTONIC +#else +#define GF_CLOCK_MONOTONIC CLOCK_REALTIME +#endif + +/* Weakref trickery for clock_gettime(). On Glibc, clock_gettime() + requires us to link in librt, which also pulls in libpthread. In + order to avoid this by default, only call clock_gettime() through a + weak reference. + + Some targets don't support weak undefined references; on these + GTHREAD_USE_WEAK is 0. So we need to define it to 1 on other + targets. */ +#ifndef GTHREAD_USE_WEAK +#define GTHREAD_USE_WEAK 1 +#endif + +#if SUPPORTS_WEAK && GTHREAD_USE_WEAK +static int weak_gettime (clockid_t, struct timespec *) + __attribute__((__weakref__("clock_gettime"))); +#else +static inline int weak_gettime (clockid_t clk_id, struct timespec *res) +{ + return clock_gettime (clk_id, res); +} +#endif +#endif + + +/* High resolution monotonic clock, falling back to the realtime clock + if the target does not support such a clock. + + Arguments: + secs - OUTPUT, seconds + nanosecs - OUTPUT, nanoseconds + + If the target supports a monotonic clock, the OUTPUT arguments + represent a monotonically incrementing clock starting from some + unspecified time in the past. + + If a monotonic clock is not available, falls back to the realtime + clock which is not monotonic. + + Return value: 0 for success, -1 for error. In case of error, errno + is set. +*/ +static inline int +gf_gettime_mono (time_t * secs, long * nanosecs) +{ + int err; +#ifdef HAVE_CLOCK_GETTIME + if (weak_gettime) + { + struct timespec ts; + err = weak_gettime (GF_CLOCK_MONOTONIC, &ts); + *secs = ts.tv_sec; + *nanosecs = ts.tv_nsec; + return err; + } +#endif + err = gf_gettime (secs, nanosecs); + *nanosecs *= 1000; + return err; +} + extern void system_clock_4 (GFC_INTEGER_4 *, GFC_INTEGER_4 *, GFC_INTEGER_4 *); export_proto(system_clock_4); @@ -56,7 +125,7 @@ system_clock_4(GFC_INTEGER_4 *count, GFC_INTEGER_4 *count_rate, if (sizeof (secs) < sizeof (GFC_INTEGER_4)) internal_error (NULL, "secs too small"); - if (gf_gettime (GF_CLOCK_MONOTONIC, &secs, &nanosecs) == 0) + if (gf_gettime_mono (&secs, &nanosecs) == 0) { GFC_UINTEGER_4 ucnt = (GFC_UINTEGER_4) secs * TCK; ucnt += (nanosecs + 500000000 / TCK) / (1000000000 / TCK); @@ -103,7 +172,7 @@ system_clock_8 (GFC_INTEGER_8 *count, GFC_INTEGER_8 *count_rate, if (sizeof (secs) < sizeof (GFC_INTEGER_4)) internal_error (NULL, "secs too small"); - if (gf_gettime (GF_CLOCK_MONOTONIC, &secs, &nanosecs) == 0) + if (gf_gettime_mono (&secs, &nanosecs) == 0) { GFC_UINTEGER_8 ucnt = (GFC_UINTEGER_8) secs * TCK; ucnt += (nanosecs + 500000000 / TCK) / (1000000000 / TCK); diff --git a/libgfortran/intrinsics/time_1.h b/libgfortran/intrinsics/time_1.h index 86e4331e889..073595a1442 100644 --- a/libgfortran/intrinsics/time_1.h +++ b/libgfortran/intrinsics/time_1.h @@ -175,87 +175,40 @@ gf_cputime (long *user_sec, long *user_usec, long *system_sec, long *system_usec #endif -/* POSIX states that CLOCK_REALTIME must be present if clock_gettime - is available, others are optional. */ -#ifdef CLOCK_REALTIME -#define GF_CLOCK_REALTIME CLOCK_REALTIME -#else -#define GF_CLOCK_REALTIME 0 -#endif - -#ifdef CLOCK_MONOTONIC -#define GF_CLOCK_MONOTONIC CLOCK_MONOTONIC -#else -#define GF_CLOCK_MONOTONIC GF_CLOCK_REALTIME -#endif - -/* Weakref trickery for clock_gettime(). On Glibc, clock_gettime() - requires us to link in librt, which also pulls in libpthread. In - order to avoid this by default, only call clock_gettime() through a - weak reference. */ -#ifdef HAVE_CLOCK_GETTIME -#ifdef SUPPORTS_WEAK -static int weak_gettime (clockid_t, struct timespec *) - __attribute__((__weakref__("clock_gettime"))); -#else -static inline int weak_gettime (clockid_t clk_id, struct timespec *res) -{ - return clock_gettime (clk_id, res); -} -#endif -#endif +/* Realtime clock with microsecond resolution, falling back to less + precise functions if the target does not support gettimeofday(). -/* Arguments: - clock_id - INPUT, must be either GF_CLOCK_REALTIME or GF_CLOCK_MONOTONIC + Arguments: secs - OUTPUT, seconds - nanosecs - OUTPUT, OPTIONAL, nanoseconds + usecs - OUTPUT, microseconds - If clock_id equals GF_CLOCK_REALTIME, the OUTPUT arguments shall be - the number of seconds and nanoseconds since the Epoch. If clock_id - equals GF_CLOCK_MONOTONIC, and if the target supports it, the - OUTPUT arguments represent a monotonically incrementing clock - starting from some unspecified time in the past. + The OUTPUT arguments shall represent the number of seconds and + nanoseconds since the Epoch. Return value: 0 for success, -1 for error. In case of error, errno is set. */ static inline int -gf_gettime (int clock_id __attribute__((unused)), time_t * secs, - long * nanosecs) +gf_gettime (time_t * secs, long * usecs) { -#ifdef HAVE_CLOCK_GETTIME - if (weak_gettime) - { - struct timespec ts; - int err; - err = weak_gettime (clock_id, &ts); - *secs = ts.tv_sec; - if (nanosecs) - *nanosecs = ts.tv_nsec; - return err; - } -#endif #ifdef HAVE_GETTIMEOFDAY struct timeval tv; int err; err = gettimeofday (&tv, NULL); *secs = tv.tv_sec; - if (nanosecs) - *nanosecs = tv.tv_usec * 1000; + *usecs = tv.tv_usec; return err; #elif HAVE_TIME time_t t, t2; t = time (&t2); *secs = t2; - if (nanosecs) - *nanosecs = 0; + *usecs = 0; if (t == ((time_t)-1)) return -1; return 0; #else *secs = 0; - if (nanosecs) - *nanosecs = 0; + *usecs = 0; errno = ENOSYS; return -1; #endif diff --git a/libgfortran/io/write_float.def b/libgfortran/io/write_float.def index a77b3042768..21bbfbbf04e 100644 --- a/libgfortran/io/write_float.def +++ b/libgfortran/io/write_float.def @@ -111,14 +111,12 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size, if (zero_flag) { e = 0; - if (compile_options.sign_zero == 1) - sign = calculate_sign (dtp, sign_bit); - else + if (compile_options.sign_zero != 1) sign = calculate_sign (dtp, 0); /* Handle special cases. */ if (w == 0) - w = d + 2; + w = d + 1; /* For this one we choose to not output a decimal point. F95 10.5.1.2.1 */ @@ -138,7 +136,6 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size, *out = '0'; return SUCCESS; } - } /* Normalize the fractional component. */ @@ -417,7 +414,10 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size, /* Pick a field size if none was specified. */ if (w <= 0) - w = nbefore + nzero + nafter + (sign != S_NONE ? 2 : 1); + { + w = nbefore + nzero + nafter + (sign != S_NONE ? 2 : 1); + w = w == 1 ? 2 : w; + } /* Work out how much padding is needed. */ nblanks = w - (nbefore + nzero + nafter + edigits + 1); @@ -436,7 +436,7 @@ output_float (st_parameter_dt *dtp, const fnode *f, char *buffer, size_t size, return FAILURE; /* Check the value fits in the specified field width. */ - if (nblanks < 0 || edigits == -1) + if (nblanks < 0 || edigits == -1 || w == 1 || (w == 2 && sign != S_NONE)) { if (unlikely (is_char4_unit (dtp))) { diff --git a/libgo/Makefile.am b/libgo/Makefile.am index b6beb1e2fb3..05fa5db8509 100644 --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -2608,7 +2608,7 @@ testing/script/check: $(CHECK_DEPS) sysinfo.go: s-sysinfo; @true s-sysinfo: $(srcdir)/mksysinfo.sh config.h - CC="$(CC)" $(SHELL) $(srcdir)/mksysinfo.sh + CC="$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)" $(SHELL) $(srcdir)/mksysinfo.sh $(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go $(STAMP) $@ diff --git a/libgo/Makefile.in b/libgo/Makefile.in index 729c6e2c723..e0e12a63db1 100644 --- a/libgo/Makefile.in +++ b/libgo/Makefile.in @@ -4992,7 +4992,7 @@ testing/script/check: $(CHECK_DEPS) sysinfo.go: s-sysinfo; @true s-sysinfo: $(srcdir)/mksysinfo.sh config.h - CC="$(CC)" $(SHELL) $(srcdir)/mksysinfo.sh + CC="$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)" $(SHELL) $(srcdir)/mksysinfo.sh $(SHELL) $(srcdir)/../move-if-change tmp-sysinfo.go sysinfo.go $(STAMP) $@ diff --git a/libgo/config.h.in b/libgo/config.h.in index 382362beb40..18a51cc8f02 100644 --- a/libgo/config.h.in +++ b/libgo/config.h.in @@ -43,6 +43,10 @@ function for uint32 */ #undef HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4 +/* Define to 1 if the compiler provides the __sync_fetch_and_add function for + uint32 */ +#undef HAVE_SYNC_FETCH_AND_ADD_4 + /* Define to 1 if you have the <syscall.h> header file. */ #undef HAVE_SYSCALL_H @@ -70,6 +74,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define if the C++ compiler is configured for setjmp/longjmp exceptions. */ +#undef LIBGO_SJLJ_EXCEPTIONS + /* Define if the linker support split stack adjustments */ #undef LINKER_SUPPORTS_SPLIT_STACK diff --git a/libgo/config/libtool.m4 b/libgo/config/libtool.m4 index c4c9d188ea2..d7b689e3e1b 100644 --- a/libgo/config/libtool.m4 +++ b/libgo/config/libtool.m4 @@ -1287,14 +1287,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" diff --git a/libgo/configure b/libgo/configure index ad4cc25810a..fbaac8e3d61 100644 --- a/libgo/configure +++ b/libgo/configure @@ -786,6 +786,7 @@ enable_libtool_lock enable_version_specific_runtime_libs with_libffi with_system_libunwind +enable_sjlj_exceptions ' ac_precious_vars='build_alias host_alias @@ -1425,6 +1426,8 @@ Optional Features: --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory + --enable-sjlj-exceptions + force use of builtin_setjmp for exceptions Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -6391,7 +6394,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -6402,7 +6405,20 @@ sparc*-*solaris*) case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -10890,7 +10906,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10893 "configure" +#line 10909 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10996,7 +11012,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 10999 "configure" +#line 11015 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14063,6 +14079,68 @@ $as_echo "#define HAVE_GETIPINFO 1" >>confdefs.h fi +# Check whether --enable-sjlj-exceptions was given. +if test "${enable_sjlj_exceptions+set}" = set; then : + enableval=$enable_sjlj_exceptions; case "$enableval" in + yes|no|auto) ;; + *) as_fn_error "unknown argument to --enable-sjlj-exceptions" "$LINENO" 5 ;; + esac +else + enable_sjlj_exceptions=auto +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use setjmp/longjmp exceptions" >&5 +$as_echo_n "checking whether to use setjmp/longjmp exceptions... " >&6; } +if test "${libgo_cv_lib_sjlj_exceptions+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +void bar (); +void clean (int *); +void foo () +{ + int i __attribute__ ((cleanup (clean))); + bar(); +} + +_ACEOF +CFLAGS_hold=$CFLAGS +CFLAGS="--save-temps -fexceptions" +libgo_cv_lib_sjlj_exceptions=unknown +if ac_fn_c_try_compile; then : + if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then + libgo_cv_lib_sjlj_exceptions=yes + elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then + libgo_cv_lib_sjlj_exceptions=no + fi +fi +CFLAGS=$CFLAGS_hold +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_lib_sjlj_exceptions" >&5 +$as_echo "$libgo_cv_lib_sjlj_exceptions" >&6; } + +if test "$enable_sjlj_exceptions" = "auto"; then + enable_sjlj_exceptions=$libgo_cv_lib_sjlj_exceptions +fi + +case $enable_sjlj_exceptions in +yes) + +$as_echo "#define LIBGO_SJLJ_EXCEPTIONS 1" >>confdefs.h + + ;; +no) + ;; +*) + as_fn_error "unable to detect exception model" "$LINENO" 5 + ;; +esac + for ac_header in sys/mman.h syscall.h sys/epoll.h sys/ptrace.h sys/user.h sys/utsname.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -14123,7 +14201,37 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_func___sync_bool_compare_and_swap_4" >&5 $as_echo "$libgo_cv_func___sync_bool_compare_and_swap_4" >&6; } if test "$libgo_cv_func___sync_bool_compare_and_swap_4" = "yes"; then - $as_echo "#define HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4 1" >>confdefs.h + +$as_echo "#define HAVE_SYNC_BOOL_COMPARE_AND_SWAP_4 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_fetch_and_add_4" >&5 +$as_echo_n "checking for __sync_fetch_and_add_4... " >&6; } +if test "${libgo_cv_func___sync_fetch_and_add_4+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +typedef unsigned int uint32 __attribute__ ((mode (SI))); +uint32 i; +int main() { return __sync_fetch_and_add (&i, 1); } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libgo_cv_func___sync_fetch_and_add_4=yes +else + libgo_cv_func___sync_fetch_and_add_4=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgo_cv_func___sync_fetch_and_add_4" >&5 +$as_echo "$libgo_cv_func___sync_fetch_and_add_4" >&6; } +if test "$libgo_cv_func___sync_fetch_and_add_4" = "yes"; then + +$as_echo "#define HAVE_SYNC_FETCH_AND_ADD_4 1" >>confdefs.h fi diff --git a/libgo/configure.ac b/libgo/configure.ac index 6cd04d2609c..da56610b579 100644 --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -328,6 +328,56 @@ AC_C_BIGENDIAN GCC_CHECK_UNWIND_GETIPINFO +AC_ARG_ENABLE(sjlj-exceptions, + AC_HELP_STRING([--enable-sjlj-exceptions], + [force use of builtin_setjmp for exceptions]), + [case "$enableval" in + yes|no|auto) ;; + *) AC_MSG_ERROR([unknown argument to --enable-sjlj-exceptions]) ;; + esac], + [enable_sjlj_exceptions=auto]) + +AC_CACHE_CHECK([whether to use setjmp/longjmp exceptions], +[libgo_cv_lib_sjlj_exceptions], +[AC_LANG_CONFTEST( + [AC_LANG_SOURCE([ +void bar (); +void clean (int *); +void foo () +{ + int i __attribute__ ((cleanup (clean))); + bar(); +} +])]) +CFLAGS_hold=$CFLAGS +CFLAGS="--save-temps -fexceptions" +libgo_cv_lib_sjlj_exceptions=unknown +AS_IF([ac_fn_c_try_compile], + [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then + libgo_cv_lib_sjlj_exceptions=yes + elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then + libgo_cv_lib_sjlj_exceptions=no + fi]) +CFLAGS=$CFLAGS_hold +rm -f conftest* +]) + +if test "$enable_sjlj_exceptions" = "auto"; then + enable_sjlj_exceptions=$libgo_cv_lib_sjlj_exceptions +fi + +case $enable_sjlj_exceptions in +yes) + AC_DEFINE(LIBGO_SJLJ_EXCEPTIONS, 1, + [Define if the C++ compiler is configured for setjmp/longjmp exceptions.]) + ;; +no) + ;; +*) + AC_MSG_ERROR([unable to detect exception model]) + ;; +esac + AC_CHECK_HEADERS(sys/mman.h syscall.h sys/epoll.h sys/ptrace.h sys/user.h sys/utsname.h) AM_CONDITIONAL(HAVE_SYS_MMAN_H, test "$ac_cv_header_sys_mman_h" = yes) AC_CHECK_FUNCS(srandom random strsignal) @@ -346,6 +396,20 @@ if test "$libgo_cv_func___sync_bool_compare_and_swap_4" = "yes"; then [Define to 1 if the compiler provides the __sync_bool_compare_and_swap function for uint32]) fi +AC_CACHE_CHECK([for __sync_fetch_and_add_4], +[libgo_cv_func___sync_fetch_and_add_4], +[AC_LINK_IFELSE([ +typedef unsigned int uint32 __attribute__ ((mode (SI))); +uint32 i; +int main() { return __sync_fetch_and_add (&i, 1); } +], +[libgo_cv_func___sync_fetch_and_add_4=yes], +[libgo_cv_func___sync_fetch_and_add_4=no])]) +if test "$libgo_cv_func___sync_fetch_and_add_4" = "yes"; then + AC_DEFINE(HAVE_SYNC_FETCH_AND_ADD_4, 1, + [Define to 1 if the compiler provides the __sync_fetch_and_add function for uint32]) +fi + dnl For x86 we want to use the -minline-all-stringops option to avoid dnl forcing a stack split when calling memcpy and friends. AC_CACHE_CHECK([whether compiler supports -minline-all-stringops], diff --git a/libgo/runtime/go-semacquire.c b/libgo/runtime/go-semacquire.c index 67a86ef695f..24c6a7388f6 100644 --- a/libgo/runtime/go-semacquire.c +++ b/libgo/runtime/go-semacquire.c @@ -117,3 +117,35 @@ semrelease (uint32 *addr) __go_assert (i == 0); } } + + +#ifndef HAVE_SYNC_FETCH_AND_ADD_4 + +/* For targets which don't have the required sync support. Really + this should be provided by gcc itself. FIXME. */ + +static pthread_mutex_t sync_lock = PTHREAD_MUTEX_INITIALIZER; + +uint32 +__sync_fetch_and_add_4(uint32*, uint32) + __attribute__((visibility("hidden"))); + +uint32 +__sync_fetch_and_add_4(uint32* ptr, uint32 add) +{ + int i; + uint32 ret; + + i = pthread_mutex_lock(&sync_lock); + __go_assert(i == 0); + + ret = *ptr; + *ptr += add; + + i = pthread_mutex_unlock(&sync_lock); + __go_assert(i == 0); + + return ret; +} + +#endif diff --git a/libgo/runtime/go-unwind.c b/libgo/runtime/go-unwind.c index cf586bbdbde..c0fc59cef84 100644 --- a/libgo/runtime/go-unwind.c +++ b/libgo/runtime/go-unwind.c @@ -126,7 +126,7 @@ __go_check_defer (void *frame) hdr = (struct _Unwind_Exception *) __go_panic_defer->__exception; -#ifdef _GLIBCXX_SJLJ_EXCEPTIONS +#ifdef LIBGO_SJLJ_EXCEPTIONS _Unwind_SjLj_Resume_or_Rethrow (hdr); #else #if defined(_LIBUNWIND_STD_ABI) diff --git a/libgo/testsuite/lib/libgo.exp b/libgo/testsuite/lib/libgo.exp index 29764d92446..a6d44323d3e 100644 --- a/libgo/testsuite/lib/libgo.exp +++ b/libgo/testsuite/lib/libgo.exp @@ -21,6 +21,10 @@ if {$gccdir != ""} { set GOC_UNDER_TEST "$gccdir/gccgo -B$gccdir/" set TESTING_IN_BUILD_TREE 1 +if [info exists GOTEST_TMPDIR] { + set tmpdir $GOTEST_TMPDIR +} + proc go_maybe_build_wrapper { args } { libgo_maybe_build_wrapper $args } diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 87a68ee502e..da4b2be6b9d 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,18 @@ +2011-02-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + * splay-tree.c: Escape wrapping newlines in texinfo markup + with '@', to fix function declaration output rendering. + * gather-docs: Relax and improve macro name matching to actually + match all current names and to allow input line wrapping. + * bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c, + hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c, + memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c, + pexecute.txh, random.c, setenv.c, setproctitle.c, + simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c, + strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c: + Wrap long texinfo input lines. + * functions.texi: Regenerate. + 2011-01-18 Mike Frysinger <vapier@gentoo.org> * .gitignore: New file. diff --git a/libiberty/bsearch.c b/libiberty/bsearch.c index 771d5de7b12..35fad19977c 100644 --- a/libiberty/bsearch.c +++ b/libiberty/bsearch.c @@ -30,7 +30,9 @@ /* -@deftypefn Supplemental void* bsearch (const void *@var{key}, const void *@var{base}, size_t @var{nmemb}, size_t @var{size}, int (*@var{compar})(const void *, const void *)) +@deftypefn Supplemental void* bsearch (const void *@var{key}, @ + const void *@var{base}, size_t @var{nmemb}, size_t @var{size}, @ + int (*@var{compar})(const void *, const void *)) Performs a search over an array of @var{nmemb} elements pointed to by @var{base} for a member that matches the object pointed to by @var{key}. diff --git a/libiberty/concat.c b/libiberty/concat.c index 1f329ea0e15..9779d5663b6 100644 --- a/libiberty/concat.c +++ b/libiberty/concat.c @@ -1,5 +1,5 @@ /* Concatenate variable number of strings. - Copyright (C) 1991, 1994, 2001 Free Software Foundation, Inc. + Copyright (C) 1991, 1994, 2001, 2011 Free Software Foundation, Inc. Written by Fred Fish @ Cygnus Support This file is part of the libiberty library. @@ -21,7 +21,8 @@ Boston, MA 02110-1301, USA. */ /* -@deftypefn Extension char* concat (const char *@var{s1}, const char *@var{s2}, @dots{}, @code{NULL}) +@deftypefn Extension char* concat (const char *@var{s1}, const char *@var{s2}, @ + @dots{}, @code{NULL}) Concatenate zero or more of strings and return the result in freshly @code{xmalloc}ed memory. Returns @code{NULL} if insufficient memory is @@ -170,7 +171,8 @@ concat (const char *first, ...) /* -@deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @dots{}, @code{NULL}) +@deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @ + @dots{}, @code{NULL}) Same as @code{concat}, except that if @var{optr} is not @code{NULL} it is freed after the string is created. This is intended to be useful diff --git a/libiberty/crc32.c b/libiberty/crc32.c index c12916b5216..12d9be07cfd 100644 --- a/libiberty/crc32.c +++ b/libiberty/crc32.c @@ -1,5 +1,5 @@ /* crc32.c - Copyright (C) 2009 Free Software Foundation, Inc. + Copyright (C) 2009, 2011 Free Software Foundation, Inc. This file is part of the libiberty library. @@ -138,7 +138,8 @@ static const unsigned int crc32_table[] = /* -@deftypefn Extension unsigned int crc32 (const unsigned char *@var{buf}, int @var{len}, unsigned int @var{init}) +@deftypefn Extension {unsigned int} crc32 (const unsigned char *@var{buf}, @ + int @var{len}, unsigned int @var{init}) Compute the 32-bit CRC of @var{buf} which has length @var{len}. The starting value is @var{init}; this may be used to compute the CRC of diff --git a/libiberty/fnmatch.txh b/libiberty/fnmatch.txh index 92e11bcb388..b5a93734bf2 100644 --- a/libiberty/fnmatch.txh +++ b/libiberty/fnmatch.txh @@ -1,4 +1,5 @@ -@deftypefn Replacement int fnmatch (const char *@var{pattern}, const char *@var{string}, int @var{flags}) +@deftypefn Replacement int fnmatch (const char *@var{pattern}, @ + const char *@var{string}, int @var{flags}) Matches @var{string} against @var{pattern}, returning zero if it matches, @code{FNM_NOMATCH} if not. @var{pattern} may contain the diff --git a/libiberty/fopen_unlocked.c b/libiberty/fopen_unlocked.c index 3c3cefed76b..d1f78c46244 100644 --- a/libiberty/fopen_unlocked.c +++ b/libiberty/fopen_unlocked.c @@ -1,5 +1,5 @@ /* Implement fopen_unlocked and related functions. - Copyright (C) 2005 Free Software Foundation, Inc. + Copyright (C) 2005, 2011 Free Software Foundation, Inc. Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. This file is part of the libiberty library. @@ -36,7 +36,8 @@ multi-threaded locking. Otherwise do nothing. @end deftypefn -@deftypefn Extension {FILE *} fopen_unlocked (const char *@var{path}, const char * @var{mode}) +@deftypefn Extension {FILE *} fopen_unlocked (const char *@var{path}, @ + const char * @var{mode}) Opens and returns a @code{FILE} pointer via @code{fopen}. If the operating system supports it, ensure that the stream is setup to avoid @@ -45,7 +46,8 @@ unchanged. @end deftypefn -@deftypefn Extension {FILE *} fdopen_unlocked (int @var{fildes}, const char * @var{mode}) +@deftypefn Extension {FILE *} fdopen_unlocked (int @var{fildes}, @ + const char * @var{mode}) Opens and returns a @code{FILE} pointer via @code{fdopen}. If the operating system supports it, ensure that the stream is setup to avoid @@ -54,7 +56,8 @@ unchanged. @end deftypefn -@deftypefn Extension {FILE *} freopen_unlocked (const char * @var{path}, const char * @var{mode}, FILE * @var{stream}) +@deftypefn Extension {FILE *} freopen_unlocked (const char * @var{path}, @ + const char * @var{mode}, FILE * @var{stream}) Opens and returns a @code{FILE} pointer via @code{freopen}. If the operating system supports it, ensure that the stream is setup to avoid diff --git a/libiberty/functions.texi b/libiberty/functions.texi index b3543cbfc6d..f6d0a23f1e6 100644 --- a/libiberty/functions.texi +++ b/libiberty/functions.texi @@ -3,47 +3,6 @@ @c Edit the *.c files, configure with --enable-maintainer-mode, @c run 'make stamp-functions' and gather-docs will build a new copy. -@c splay-tree.c:277 -@defvr Extension HOST_CHARSET -This macro indicates the basic character set and encoding used by the -host: more precisely, the encoding used for character constants in -preprocessor @samp{#if} statements (the C "execution character set"). -It is defined by @file{safe-ctype.h}, and will be an integer constant -with one of the following values: - -@ftable @code -@item HOST_CHARSET_UNKNOWN -The host character set is unknown - that is, not one of the next two -possibilities. - -@item HOST_CHARSET_ASCII -The host character set is ASCII. - -@item HOST_CHARSET_EBCDIC -The host character set is some variant of EBCDIC. (Only one of the -nineteen EBCDIC varying characters is tested; exercise caution.) -@end ftable -@end defvr -@deftypefn Supplemental splay_tree splay_tree_new_with_typed_alloc -(splay_tree_compare_fn @var{compare_fn}, -splay_tree_delete_key_fn @var{delete_key_fn}, -splay_tree_delete_value_fn @var{delete_value_fn}, -splay_tree_allocate_fn @var{tree_allocate_fn}, -splay_tree_allocate_fn @var{node_allocate_fn}, -splay_tree_deallocate_fn @var{deallocate_fn}, -void * @var{allocate_data}) - -This function creates a splay tree that uses two different allocators -@var{tree_allocate_fn} and @var{node_allocate_fn} to use for allocating the -tree itself and its nodes respectively. This is useful when variables of -different types need to be allocated with different allocators. - -The splay tree will use @var{compare_fn} to compare nodes, -@var{delete_key_fn} to deallocate keys, and @var{delete_value_fn} to -deallocate values. - -@end deftypefn - @c alloca.c:26 @deftypefn Replacement void* alloca (size_t @var{size}) @@ -110,7 +69,9 @@ Copies @var{length} bytes from memory region @var{in} to region @end deftypefn @c bsearch.c:33 -@deftypefn Supplemental void* bsearch (const void *@var{key}, const void *@var{base}, size_t @var{nmemb}, size_t @var{size}, int (*@var{compar})(const void *, const void *)) +@deftypefn Supplemental void* bsearch (const void *@var{key}, @ + const void *@var{base}, size_t @var{nmemb}, size_t @var{size}, @ + int (*@var{compar})(const void *, const void *)) Performs a search over an array of @var{nmemb} elements pointed to by @var{base} for a member that matches the object pointed to by @var{key}. @@ -177,7 +138,7 @@ not recommended. @end deftypefn -@c make-temp-file.c:95 +@c make-temp-file.c:96 @deftypefn Replacement char* choose_tmpdir () Returns a pointer to a directory path suitable for creating temporary @@ -195,7 +156,8 @@ number of seconds used. @end deftypefn @c concat.c:24 -@deftypefn Extension char* concat (const char *@var{s1}, const char *@var{s2}, @dots{}, @code{NULL}) +@deftypefn Extension char* concat (const char *@var{s1}, const char *@var{s2}, @ + @dots{}, @code{NULL}) Concatenate zero or more of strings and return the result in freshly @code{xmalloc}ed memory. Returns @code{NULL} if insufficient memory is @@ -205,7 +167,8 @@ pointer encountered. Pointers to empty strings are ignored. @end deftypefn @c crc32.c:141 -@deftypefn Extension unsigned int crc32 (const unsigned char *@var{buf}, int @var{len}, unsigned int @var{init}) +@deftypefn Extension {unsigned int} crc32 (const unsigned char *@var{buf}, @ + int @var{len}, unsigned int @var{init}) Compute the 32-bit CRC of @var{buf} which has length @var{len}. The starting value is @var{init}; this may be used to compute the CRC of @@ -296,8 +259,9 @@ and inode numbers. @end deftypefn -@c fopen_unlocked.c:48 -@deftypefn Extension {FILE *} fdopen_unlocked (int @var{fildes}, const char * @var{mode}) +@c fopen_unlocked.c:49 +@deftypefn Extension {FILE *} fdopen_unlocked (int @var{fildes}, @ + const char * @var{mode}) Opens and returns a @code{FILE} pointer via @code{fdopen}. If the operating system supports it, ensure that the stream is setup to avoid @@ -333,7 +297,8 @@ and backward slashes are equal. @end deftypefn @c fnmatch.txh:1 -@deftypefn Replacement int fnmatch (const char *@var{pattern}, const char *@var{string}, int @var{flags}) +@deftypefn Replacement int fnmatch (const char *@var{pattern}, @ + const char *@var{string}, int @var{flags}) Matches @var{string} against @var{pattern}, returning zero if it matches, @code{FNM_NOMATCH} if not. @var{pattern} may contain the @@ -383,7 +348,8 @@ Ignores case when performing the comparison. @end deftypefn @c fopen_unlocked.c:39 -@deftypefn Extension {FILE *} fopen_unlocked (const char *@var{path}, const char * @var{mode}) +@deftypefn Extension {FILE *} fopen_unlocked (const char *@var{path}, @ + const char * @var{mode}) Opens and returns a @code{FILE} pointer via @code{fopen}. If the operating system supports it, ensure that the stream is setup to avoid @@ -402,8 +368,9 @@ itself. @end deftypefn -@c fopen_unlocked.c:57 -@deftypefn Extension {FILE *} freopen_unlocked (const char * @var{path}, const char * @var{mode}, FILE * @var{stream}) +@c fopen_unlocked.c:59 +@deftypefn Extension {FILE *} freopen_unlocked (const char * @var{path}, @ + const char * @var{mode}, FILE * @var{stream}) Opens and returns a @code{FILE} pointer via @code{freopen}. If the operating system supports it, ensure that the stream is setup to avoid @@ -496,10 +463,32 @@ systems. @end deftypefn +@c safe-ctype.c:25 +@defvr Extension HOST_CHARSET +This macro indicates the basic character set and encoding used by the +host: more precisely, the encoding used for character constants in +preprocessor @samp{#if} statements (the C "execution character set"). +It is defined by @file{safe-ctype.h}, and will be an integer constant +with one of the following values: + +@ftable @code +@item HOST_CHARSET_UNKNOWN +The host character set is unknown - that is, not one of the next two +possibilities. + +@item HOST_CHARSET_ASCII +The host character set is ASCII. + +@item HOST_CHARSET_EBCDIC +The host character set is some variant of EBCDIC. (Only one of the +nineteen EBCDIC varying characters is tested; exercise caution.) +@end ftable +@end defvr + @c hashtab.c:336 -@deftypefn Supplemental htab_t htab_create_typed_alloc (size_t @var{size}, -htab_hash @var{hash_f}, htab_eq @var{eq_f}, htab_del @var{del_f}, -htab_alloc @var{alloc_tab_f}, htab_alloc @var{alloc_f}, +@deftypefn Supplemental htab_t htab_create_typed_alloc (size_t @var{size}, @ +htab_hash @var{hash_f}, htab_eq @var{eq_f}, htab_del @var{del_f}, @ +htab_alloc @var{alloc_tab_f}, htab_alloc @var{alloc_f}, @ htab_free @var{free_f}) This function creates a hash table that uses two different allocators @@ -524,7 +513,8 @@ deprecated in new programs in favor of @code{strchr}. @end deftypefn @c insque.c:6 -@deftypefn Supplemental void insque (struct qelem *@var{elem}, struct qelem *@var{pred}) +@deftypefn Supplemental void insque (struct qelem *@var{elem}, @ + struct qelem *@var{pred}) @deftypefnx Supplemental void remque (struct qelem *@var{elem}) Routines to manipulate queues built from doubly linked lists. The @@ -643,7 +633,8 @@ components will be simplified. The returned value will be allocated using @end deftypefn @c make-relative-prefix.c:24 -@deftypefn Extension {const char*} make_relative_prefix (const char *@var{progname}, const char *@var{bin_prefix}, const char *@var{prefix}) +@deftypefn Extension {const char*} make_relative_prefix (const char *@var{progname}, @ + const char *@var{bin_prefix}, const char *@var{prefix}) Given three paths @var{progname}, @var{bin_prefix}, @var{prefix}, return the path that is in the same position relative to @@ -667,7 +658,7 @@ relative prefix can be found, return @code{NULL}. @end deftypefn -@c make-temp-file.c:173 +@c make-temp-file.c:174 @deftypefn Replacement char* make_temp_file (const char *@var{suffix}) Return a temporary file name (as a string) or @code{NULL} if unable to @@ -677,7 +668,8 @@ string is @code{malloc}ed, and the temporary file has been created. @end deftypefn @c memchr.c:3 -@deftypefn Supplemental void* memchr (const void *@var{s}, int @var{c}, size_t @var{n}) +@deftypefn Supplemental void* memchr (const void *@var{s}, int @var{c}, @ + size_t @var{n}) This function searches memory starting at @code{*@var{s}} for the character @var{c}. The search only ends with the first occurrence of @@ -690,7 +682,8 @@ returned. @end deftypefn @c memcmp.c:6 -@deftypefn Supplemental int memcmp (const void *@var{x}, const void *@var{y}, size_t @var{count}) +@deftypefn Supplemental int memcmp (const void *@var{x}, const void *@var{y}, @ + size_t @var{count}) Compares the first @var{count} bytes of two areas of memory. Returns zero if they are the same, a value less than zero if @var{x} is @@ -701,7 +694,8 @@ as if comparing unsigned char arrays. @end deftypefn @c memcpy.c:6 -@deftypefn Supplemental void* memcpy (void *@var{out}, const void *@var{in}, size_t @var{length}) +@deftypefn Supplemental void* memcpy (void *@var{out}, const void *@var{in}, @ + size_t @var{length}) Copies @var{length} bytes from memory region @var{in} to region @var{out}. Returns a pointer to @var{out}. @@ -709,7 +703,8 @@ Copies @var{length} bytes from memory region @var{in} to region @end deftypefn @c memmem.c:20 -@deftypefn Supplemental void* memmem (const void *@var{haystack}, size_t @var{haystack_len} const void *@var{needle}, size_t @var{needle_len}) +@deftypefn Supplemental void* memmem (const void *@var{haystack}, @ + size_t @var{haystack_len} const void *@var{needle}, size_t @var{needle_len}) Returns a pointer to the first occurrence of @var{needle} (length @var{needle_len}) in @var{haystack} (length @var{haystack_len}). @@ -718,7 +713,8 @@ Returns @code{NULL} if not found. @end deftypefn @c memmove.c:6 -@deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, size_t @var{count}) +@deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, @ + size_t @var{count}) Copies @var{count} bytes from memory area @var{from} to memory area @var{to}, returning a pointer to @var{to}. @@ -726,7 +722,8 @@ Copies @var{count} bytes from memory area @var{from} to memory area @end deftypefn @c mempcpy.c:23 -@deftypefn Supplemental void* mempcpy (void *@var{out}, const void *@var{in}, size_t @var{length}) +@deftypefn Supplemental void* mempcpy (void *@var{out}, const void *@var{in}, @ + size_t @var{length}) Copies @var{length} bytes from memory region @var{in} to region @var{out}. Returns a pointer to @var{out} + @var{length}. @@ -734,7 +731,8 @@ Copies @var{length} bytes from memory region @var{in} to region @end deftypefn @c memset.c:6 -@deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, size_t @var{count}) +@deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, @ + size_t @var{count}) Sets the first @var{count} bytes of @var{s} to the constant byte @var{c}, returning a pointer to @var{s}. @@ -759,7 +757,7 @@ reading and writing. @end deftypefn -@c pexecute.txh:266 +@c pexecute.txh:278 @deftypefn Extension void pex_free (struct pex_obj @var{obj}) Clean up and free all data associated with @var{obj}. If you have not @@ -768,8 +766,9 @@ try to kill the subprocesses. @end deftypefn -@c pexecute.txh:241 -@deftypefn Extension int pex_get_status (struct pex_obj *@var{obj}, int @var{count}, int *@var{vector}) +@c pexecute.txh:251 +@deftypefn Extension int pex_get_status (struct pex_obj *@var{obj}, @ + int @var{count}, int *@var{vector}) Returns the exit status of all programs run using @var{obj}. @var{count} is the number of results expected. The results will be @@ -778,8 +777,9 @@ to @code{pex_run}. Returns 0 on error, 1 on success. @end deftypefn -@c pexecute.txh:250 -@deftypefn Extension int pex_get_times (struct pex_obj *@var{obj}, int @var{count}, struct pex_time *@var{vector}) +@c pexecute.txh:261 +@deftypefn Extension int pex_get_times (struct pex_obj *@var{obj}, @ + int @var{count}, struct pex_time *@var{vector}) Returns the process execution times of all programs run using @var{obj}. @var{count} is the number of results expected. The @@ -796,7 +796,8 @@ process times, all the fields will be set to @code{0}. @end deftypefn @c pexecute.txh:2 -@deftypefn Extension {struct pex_obj *} pex_init (int @var{flags}, const char *@var{pname}, const char *@var{tempbase}) +@deftypefn Extension {struct pex_obj *} pex_init (int @var{flags}, @ + const char *@var{pname}, const char *@var{tempbase}) Prepare to execute one or more programs, with standard output of each program fed to standard input of the next. This is a system @@ -827,8 +828,9 @@ temporary files; it may be @code{NULL} to use a randomly chosen name. @end deftypefn -@c pexecute.txh:155 -@deftypefn Extension {FILE *} pex_input_file (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{in_name}) +@c pexecute.txh:161 +@deftypefn Extension {FILE *} pex_input_file (struct pex_obj *@var{obj}, @ + int @var{flags}, const char *@var{in_name}) Return a stream for a temporary file to pass to the first program in the pipeline as input. @@ -845,8 +847,9 @@ binary mode; otherwise, open it in the default mode. Including @code{PEX_BINARY_OUTPUT} in @var{flags} has no effect on Unix. @end deftypefn -@c pexecute.txh:172 -@deftypefn Extension {FILE *} pex_input_pipe (struct pex_obj *@var{obj}, int @var{binary}) +@c pexecute.txh:179 +@deftypefn Extension {FILE *} pex_input_pipe (struct pex_obj *@var{obj}, @ + int @var{binary}) Return a stream @var{fp} for a pipe connected to the standard input of the first program in the pipeline; @var{fp} is opened for writing. @@ -890,8 +893,11 @@ the output pipe is you, but you are blocked on the input pipe. @end deftypefn -@c pexecute.txh:274 -@deftypefn Extension {const char *} pex_one (int @var{flags}, const char *@var{executable}, char * const *@var{argv}, const char *@var{pname}, const char *@var{outname}, const char *@var{errname}, int *@var{status}, int *@var{err}) +@c pexecute.txh:286 +@deftypefn Extension {const char *} pex_one (int @var{flags}, @ + const char *@var{executable}, char * const *@var{argv}, @ + const char *@var{pname}, const char *@var{outname}, const char *@var{errname}, @ + int *@var{status}, int *@var{err}) An interface to permit the easy execution of a single program. The return value and most of the parameters are as @@ -903,8 +909,9 @@ be set to the exit status of the program. @end deftypefn -@c pexecute.txh:228 -@deftypefn Extension {FILE *} pex_read_err (struct pex_obj *@var{obj}, int @var{binary}) +@c pexecute.txh:237 +@deftypefn Extension {FILE *} pex_read_err (struct pex_obj *@var{obj}, @ + int @var{binary}) Returns a @code{FILE} pointer which may be used to read the standard error of the last program in the pipeline. When this is used, @@ -916,8 +923,9 @@ it will be closed by @code{pex_free}. @end deftypefn -@c pexecute.txh:216 -@deftypefn Extension {FILE *} pex_read_output (struct pex_obj *@var{obj}, int @var{binary}) +@c pexecute.txh:224 +@deftypefn Extension {FILE *} pex_read_output (struct pex_obj *@var{obj}, @ + int @var{binary}) Returns a @code{FILE} pointer which may be used to read the standard output of the last program in the pipeline. When this is used, @@ -929,8 +937,10 @@ it will be closed by @code{pex_free}. @end deftypefn -@c pexecute.txh:33 -@deftypefn Extension {const char *} pex_run (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{executable}, char * const *@var{argv}, const char *@var{outname}, const char *@var{errname}, int *@var{err}) +@c pexecute.txh:34 +@deftypefn Extension {const char *} pex_run (struct pex_obj *@var{obj}, @ + int @var{flags}, const char *@var{executable}, char * const *@var{argv}, @ + const char *@var{outname}, const char *@var{errname}, int *@var{err}) Execute one program in a pipeline. On success this returns @code{NULL}. On failure it returns an error message, a statically @@ -1039,8 +1049,11 @@ value, or to 0 if there is no relevant @code{errno}. @end deftypefn -@c pexecute.txh:142 -@deftypefn Extension {const char *} pex_run_in_environment (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{executable}, char * const *@var{argv}, char * const *@var{env}, int @var{env_size}, const char *@var{outname}, const char *@var{errname}, int *@var{err}) +@c pexecute.txh:145 +@deftypefn Extension {const char *} pex_run_in_environment (struct pex_obj *@var{obj}, @ + int @var{flags}, const char *@var{executable}, char * const *@var{argv}, @ + char * const *@var{env}, int @var{env_size}, const char *@var{outname}, @ + const char *@var{errname}, int *@var{err}) Execute one program in a pipeline, permitting the environment for the program to be specified. Behaviour and parameters not listed below are @@ -1053,8 +1066,11 @@ form @code{VAR=VALUE}, with the exception of the last element that must be @end deftypefn -@c pexecute.txh:286 -@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int @var{flags}) +@c pexecute.txh:301 +@deftypefn Extension int pexecute (const char *@var{program}, @ + char * const *@var{argv}, const char *@var{this_pname}, @ + const char *@var{temp_base}, char **@var{errmsg_fmt}, @ + char **@var{errmsg_arg}, int @var{flags}) This is the old interface to execute one or more programs. It is still supported for compatibility purposes, but is no longer @@ -1081,7 +1097,7 @@ name is unset/removed. @end deftypefn -@c pexecute.txh:294 +@c pexecute.txh:312 @deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags}) Another part of the old execution interface. @@ -1091,7 +1107,8 @@ Another part of the old execution interface. @c random.c:39 @deftypefn Supplement {long int} random (void) @deftypefnx Supplement void srandom (unsigned int @var{seed}) -@deftypefnx Supplement void* initstate (unsigned int @var{seed}, void *@var{arg_state}, unsigned long @var{n}) +@deftypefnx Supplement void* initstate (unsigned int @var{seed}, @ + void *@var{arg_state}, unsigned long @var{n}) @deftypefnx Supplement void* setstate (void *@var{arg_state}) Random number functions. @code{random} returns a random number in the @@ -1103,8 +1120,9 @@ control over the state of the random number generator. @end deftypefn -@c concat.c:173 -@deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @dots{}, @code{NULL}) +@c concat.c:174 +@deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @ + @dots{}, @code{NULL}) Same as @code{concat}, except that if @var{optr} is not @code{NULL} it is freed after the string is created. This is intended to be useful @@ -1134,8 +1152,9 @@ deprecated in new programs in favor of @code{strrchr}. @end deftypefn -@c setenv.c:22 -@deftypefn Supplemental int setenv (const char *@var{name}, const char *@var{value}, int @var{overwrite}) +@c setenv.c:23 +@deftypefn Supplemental int setenv (const char *@var{name}, @ + const char *@var{value}, int @var{overwrite}) @deftypefnx Supplemental void unsetenv (const char *@var{name}) @code{setenv} adds @var{name} to the environment with value @@ -1146,8 +1165,8 @@ environment. This implementation is not safe for multithreaded code. @end deftypefn -@c setproctitle.c:30 -@deftypefn Supplemental void setproctitle (const char *@var{fmt} ...) +@c setproctitle.c:31 +@deftypefn Supplemental void setproctitle (const char *@var{fmt}, ...) Set the title of a process to @var{fmt}. va args not supported for now, but defined for compatibility with BSD. @@ -1181,8 +1200,10 @@ be the value @code{1}). @end deftypefn -@c simple-object.txh:87 -@deftypefn Extension {const char *} simple_object_attributes_compare (simple_object_attributes *@var{attrs1}, simple_object_attributes *@var{attrs2}, int *@var{err}) +@c simple-object.txh:96 +@deftypefn Extension {const char *} simple_object_attributes_compare @ + (simple_object_attributes *@var{attrs1}, simple_object_attributes *@var{attrs2}, @ + int *@var{err}) Compare @var{attrs1} and @var{attrs2}. If they could be linked together without error, return @code{NULL}. Otherwise, return an @@ -1191,8 +1212,9 @@ if there is no relevant errno. @end deftypefn -@c simple-object.txh:73 -@deftypefn Extension {simple_object_attributes *} simple_object_fetch_attributes (simple_object_read *@var{simple_object}, const char **@var{errmsg}, int *@var{err}) +@c simple-object.txh:81 +@deftypefn Extension {simple_object_attributes *} simple_object_fetch_attributes @ + (simple_object_read *@var{simple_object}, const char **@var{errmsg}, int *@var{err}) Fetch the attributes of @var{simple_object}. The attributes are internal information such as the format of the object file, or the @@ -1206,8 +1228,10 @@ error message, and sets @code{*@var{err}} to an errno value or @end deftypefn -@c simple-object.txh:44 -@deftypefn Extension {int} simple_object_find_section (simple_object_read *@var{simple_object} off_t *@var{offset}, off_t *@var{length}, const char **@var{errmsg}, int *@var{err}) +@c simple-object.txh:49 +@deftypefn Extension {int} simple_object_find_section @ + (simple_object_read *@var{simple_object} off_t *@var{offset}, @ + off_t *@var{length}, const char **@var{errmsg}, int *@var{err}) Look for the section @var{name} in @var{simple_object}. This returns information for the first section with that name. @@ -1229,8 +1253,11 @@ relevant errno. @end deftypefn -@c simple-object.txh:25 -@deftypefn Extension {const char *} simple_object_find_sections (simple_object_read *@var{simple_object}, int (*@var{pfn}) (void *@var{data}, const char *@var{name}, off_t @var{offset}, off_t @var{length}), void *@var{data}, int *@var{err}) +@c simple-object.txh:27 +@deftypefn Extension {const char *} simple_object_find_sections @ + (simple_object_read *@var{simple_object}, int (*@var{pfn}) (void *@var{data}, @ + const char *@var{name}, off_t @var{offset}, off_t @var{length}), @ + void *@var{data}, int *@var{err}) This function calls @var{pfn} for each section in @var{simple_object}. It calls @var{pfn} with the section name, the offset within the file @@ -1250,7 +1277,9 @@ or @code{0} if there is no relevant errno. @end deftypefn @c simple-object.txh:2 -@deftypefn Extension {simple_object_read *} simple_object_open_read (int @var{descriptor}, off_t @var{offset}, const char *{segment_name}, const char **@var{errmsg}, int *@var{err}) +@deftypefn Extension {simple_object_read *} simple_object_open_read @ + (int @var{descriptor}, off_t @var{offset}, const char *{segment_name}, @ + const char **@var{errmsg}, int *@var{err}) Opens an object file for reading. Creates and returns an @code{simple_object_read} pointer which may be passed to other @@ -1273,30 +1302,35 @@ an errno value or @code{0} if there is no relevant errno. @end deftypefn -@c simple-object.txh:96 -@deftypefn Extension {void} simple_object_release_attributes (simple_object_attributes *@var{attrs}) +@c simple-object.txh:107 +@deftypefn Extension {void} simple_object_release_attributes @ + (simple_object_attributes *@var{attrs}) Release all resources associated with @var{attrs}. @end deftypefn -@c simple-object.txh:66 -@deftypefn Extension {void} simple_object_release_read (simple_object_read *@var{simple_object}) +@c simple-object.txh:73 +@deftypefn Extension {void} simple_object_release_read @ + (simple_object_read *@var{simple_object}) Release all resources associated with @var{simple_object}. This does not close the file descriptor. @end deftypefn -@c simple-object.txh:164 -@deftypefn Extension {void} simple_object_release_write (simple_object_write *@var{simple_object}) +@c simple-object.txh:184 +@deftypefn Extension {void} simple_object_release_write @ + (simple_object_write *@var{simple_object}) Release all resources associated with @var{simple_object}. @end deftypefn -@c simple-object.txh:102 -@deftypefn Extension {simple_object_write *} simple_object_start_write (simple_object_attributes @var{attrs}, const char *@var{segment_name}, const char **@var{errmsg}, int *@var{err}) +@c simple-object.txh:114 +@deftypefn Extension {simple_object_write *} simple_object_start_write @ + (simple_object_attributes @var{attrs}, const char *@var{segment_name}, @ + const char **@var{errmsg}, int *@var{err}) Start creating a new object file using the object file format described in @var{attrs}. You must fetch attribute information from @@ -1314,8 +1348,11 @@ to an errno value or @code{0} if there is no relevant errno. @end deftypefn -@c simple-object.txh:137 -@deftypefn Extension {const char *} simple_object_write_add_data (simple_object_write *@var{simple_object}, simple_object_write_section *@var{section}, const void *@var{buffer}, size_t @var{size}, int @var{copy}, int *@var{err}) +@c simple-object.txh:153 +@deftypefn Extension {const char *} simple_object_write_add_data @ + (simple_object_write *@var{simple_object}, @ + simple_object_write_section *@var{section}, const void *@var{buffer}, @ + size_t @var{size}, int @var{copy}, int *@var{err}) Add data @var{buffer}/@var{size} to @var{section} in @var{simple_object}. If @var{copy} is non-zero, the data will be @@ -1329,8 +1366,10 @@ no relevant erro. @end deftypefn -@c simple-object.txh:120 -@deftypefn Extension {simple_object_write_section *} simple_object_write_create_section (simple_object_write *@var{simple_object}, const char *@var{name}, unsigned int @var{align}, const char **@var{errmsg}, int *@var{err}) +@c simple-object.txh:134 +@deftypefn Extension {simple_object_write_section *} simple_object_write_create_section @ + (simple_object_write *@var{simple_object}, const char *@var{name}, @ + unsigned int @var{align}, const char **@var{errmsg}, int *@var{err}) Add a section to @var{simple_object}. @var{name} is the name of the new section. @var{align} is the required alignment expressed as the @@ -1347,8 +1386,9 @@ error message, and sets @code{*@var{err}} to an errno value or @end deftypefn -@c simple-object.txh:151 -@deftypefn Extension {const char *} simple_object_write_to_file (simple_object_write *@var{simple_object}, int @var{descriptor}, int *@var{err}) +@c simple-object.txh:170 +@deftypefn Extension {const char *} simple_object_write_to_file @ + (simple_object_write *@var{simple_object}, int @var{descriptor}, int *@var{err}) Write the complete object file to @var{descriptor}, an open file descriptor. This writes out all the data accumulated by calls to @@ -1362,7 +1402,8 @@ there is no relevant errno. @end deftypefn @c snprintf.c:28 -@deftypefn Supplemental int snprintf (char *@var{buf}, size_t @var{n}, const char *@var{format}, ...) +@deftypefn Supplemental int snprintf (char *@var{buf}, size_t @var{n}, @ + const char *@var{format}, ...) This function is similar to @code{sprintf}, but it will write to @var{buf} at most @code{@var{n}-1} bytes of text, followed by a @@ -1385,6 +1426,27 @@ valid until at least the next call. @end deftypefn +@c splay-tree.c:303 +@deftypefn Supplemental splay_tree splay_tree_new_with_typed_alloc @ +(splay_tree_compare_fn @var{compare_fn}, @ +splay_tree_delete_key_fn @var{delete_key_fn}, @ +splay_tree_delete_value_fn @var{delete_value_fn}, @ +splay_tree_allocate_fn @var{tree_allocate_fn}, @ +splay_tree_allocate_fn @var{node_allocate_fn}, @ +splay_tree_deallocate_fn @var{deallocate_fn}, @ +void * @var{allocate_data}) + +This function creates a splay tree that uses two different allocators +@var{tree_allocate_fn} and @var{node_allocate_fn} to use for allocating the +tree itself and its nodes respectively. This is useful when variables of +different types need to be allocated with different allocators. + +The splay tree will use @var{compare_fn} to compare nodes, +@var{delete_key_fn} to deallocate keys, and @var{delete_value_fn} to +deallocate values. + +@end deftypefn + @c stpcpy.c:23 @deftypefn Supplemental char* stpcpy (char *@var{dst}, const char *@var{src}) @@ -1394,7 +1456,8 @@ Copies the string @var{src} into @var{dst}. Returns a pointer to @end deftypefn @c stpncpy.c:23 -@deftypefn Supplemental char* stpncpy (char *@var{dst}, const char *@var{src}, size_t @var{len}) +@deftypefn Supplemental char* stpncpy (char *@var{dst}, const char *@var{src}, @ + size_t @var{len}) Copies the string @var{src} into @var{dst}, copying exactly @var{len} and padding with zeros if necessary. If @var{len} < strlen(@var{src}) @@ -1476,7 +1539,8 @@ A case-insensitive @code{strncmp}. @end deftypefn @c strncmp.c:6 -@deftypefn Supplemental int strncmp (const char *@var{s1}, const char *@var{s2}, size_t @var{n}) +@deftypefn Supplemental int strncmp (const char *@var{s1}, @ + const char *@var{s2}, size_t @var{n}) Compares the first @var{n} bytes of two strings, returning a value as @code{strcmp}. @@ -1553,7 +1617,8 @@ length, the function returns @var{string}. @end deftypefn @c strtod.c:27 -@deftypefn Supplemental double strtod (const char *@var{string}, char **@var{endptr}) +@deftypefn Supplemental double strtod (const char *@var{string}, @ + char **@var{endptr}) This ISO C function converts the initial portion of @var{string} to a @code{double}. If @var{endptr} is not @code{NULL}, a pointer to the @@ -1573,8 +1638,10 @@ to an errno value. If no translation is found, returns 0. @end deftypefn @c strtol.c:33 -@deftypefn Supplemental {long int} strtol (const char *@var{string}, char **@var{endptr}, int @var{base}) -@deftypefnx Supplemental {unsigned long int} strtoul (const char *@var{string}, char **@var{endptr}, int @var{base}) +@deftypefn Supplemental {long int} strtol (const char *@var{string}, @ + char **@var{endptr}, int @var{base}) +@deftypefnx Supplemental {unsigned long int} strtoul (const char *@var{string}, @ + char **@var{endptr}, int @var{base}) The @code{strtol} function converts the string in @var{string} to a long integer value according to the given @var{base}, which must be @@ -1683,7 +1750,8 @@ pointer unchanged. If the @var{stream} is @code{NULL} do nothing. @end deftypefn @c vasprintf.c:47 -@deftypefn Extension int vasprintf (char **@var{resptr}, const char *@var{format}, va_list @var{args}) +@deftypefn Extension int vasprintf (char **@var{resptr}, @ + const char *@var{format}, va_list @var{args}) Like @code{vsprintf}, but instead of passing a pointer to a buffer, you pass a pointer to a pointer. This function will compute the size @@ -1704,8 +1772,10 @@ Emulates @code{vfork} by calling @code{fork} and returning its value. @c vprintf.c:3 @deftypefn Supplemental int vprintf (const char *@var{format}, va_list @var{ap}) -@deftypefnx Supplemental int vfprintf (FILE *@var{stream}, const char *@var{format}, va_list @var{ap}) -@deftypefnx Supplemental int vsprintf (char *@var{str}, const char *@var{format}, va_list @var{ap}) +@deftypefnx Supplemental int vfprintf (FILE *@var{stream}, @ + const char *@var{format}, va_list @var{ap}) +@deftypefnx Supplemental int vsprintf (char *@var{str}, @ + const char *@var{format}, va_list @var{ap}) These functions are the same as @code{printf}, @code{fprintf}, and @code{sprintf}, respectively, except that they are called with a @@ -1717,7 +1787,8 @@ nonstandard but common function @code{_doprnt}. @end deftypefn @c vsnprintf.c:28 -@deftypefn Supplemental int vsnprintf (char *@var{buf}, size_t @var{n}, const char *@var{format}, va_list @var{ap}) +@deftypefn Supplemental int vsnprintf (char *@var{buf}, size_t @var{n}, @ + const char *@var{format}, va_list @var{ap}) This function is similar to @code{vsprintf}, but it will write to @var{buf} at most @code{@var{n}-1} bytes of text, followed by a @@ -1806,7 +1877,8 @@ You can use this to set the name of the program used by @end deftypefn @c xmemdup.c:7 -@deftypefn Replacement void* xmemdup (void *@var{input}, size_t @var{copy_size}, size_t @var{alloc_size}) +@deftypefn Replacement void* xmemdup (void *@var{input}, @ + size_t @var{copy_size}, size_t @var{alloc_size}) Duplicates a region of memory without fail. First, @var{alloc_size} bytes are allocated, then @var{copy_size} bytes from @var{input} are copied into diff --git a/libiberty/gather-docs b/libiberty/gather-docs index 94d3fcf8f3a..2f1f3b1f699 100644 --- a/libiberty/gather-docs +++ b/libiberty/gather-docs @@ -1,7 +1,7 @@ #!/usr/bin/perl # -*- perl -*- -# Copyright (C) 2001 +# Copyright (C) 2001, 2009, 2011 # Free Software Foundation # # This file is part of the libiberty library. @@ -73,8 +73,8 @@ for $in (@ARGV) { if (/^\@def[a-z]*[a-wyz] /) { - ($name) = m/[^\(]* ([^\( \t\r\n]+) *\(/; - $name =~ s/[ ]*$//; + ($name) = m/[^\(]* ([^\( \t\r\n\@]+) *(\(|\@?$)/; + $name =~ s/[ ]*\@?$//; $key = $name; $key =~ tr/A-Z/a-z/; $key =~ s/[^a-z0-9]+/ /g; diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index 359e3ea569e..dfaec0f31ae 100644 --- a/libiberty/hashtab.c +++ b/libiberty/hashtab.c @@ -333,9 +333,9 @@ htab_create_alloc_ex (size_t size, htab_hash hash_f, htab_eq eq_f, /* -@deftypefn Supplemental htab_t htab_create_typed_alloc (size_t @var{size}, -htab_hash @var{hash_f}, htab_eq @var{eq_f}, htab_del @var{del_f}, -htab_alloc @var{alloc_tab_f}, htab_alloc @var{alloc_f}, +@deftypefn Supplemental htab_t htab_create_typed_alloc (size_t @var{size}, @ +htab_hash @var{hash_f}, htab_eq @var{eq_f}, htab_del @var{del_f}, @ +htab_alloc @var{alloc_tab_f}, htab_alloc @var{alloc_f}, @ htab_free @var{free_f}) This function creates a hash table that uses two different allocators diff --git a/libiberty/insque.c b/libiberty/insque.c index 3473bb92b31..fd02357bb23 100644 --- a/libiberty/insque.c +++ b/libiberty/insque.c @@ -3,7 +3,8 @@ /* -@deftypefn Supplemental void insque (struct qelem *@var{elem}, struct qelem *@var{pred}) +@deftypefn Supplemental void insque (struct qelem *@var{elem}, @ + struct qelem *@var{pred}) @deftypefnx Supplemental void remque (struct qelem *@var{elem}) Routines to manipulate queues built from doubly linked lists. The diff --git a/libiberty/make-relative-prefix.c b/libiberty/make-relative-prefix.c index c98d287d7c0..4553a7109d8 100644 --- a/libiberty/make-relative-prefix.c +++ b/libiberty/make-relative-prefix.c @@ -21,7 +21,8 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA /* -@deftypefn Extension {const char*} make_relative_prefix (const char *@var{progname}, const char *@var{bin_prefix}, const char *@var{prefix}) +@deftypefn Extension {const char*} make_relative_prefix (const char *@var{progname}, @ + const char *@var{bin_prefix}, const char *@var{prefix}) Given three paths @var{progname}, @var{bin_prefix}, @var{prefix}, return the path that is in the same position relative to diff --git a/libiberty/memchr.c b/libiberty/memchr.c index 451f817d320..7448ab9e71c 100644 --- a/libiberty/memchr.c +++ b/libiberty/memchr.c @@ -1,6 +1,7 @@ /* -@deftypefn Supplemental void* memchr (const void *@var{s}, int @var{c}, size_t @var{n}) +@deftypefn Supplemental void* memchr (const void *@var{s}, int @var{c}, @ + size_t @var{n}) This function searches memory starting at @code{*@var{s}} for the character @var{c}. The search only ends with the first occurrence of diff --git a/libiberty/memcmp.c b/libiberty/memcmp.c index 39edfca98a6..37db60f3826 100644 --- a/libiberty/memcmp.c +++ b/libiberty/memcmp.c @@ -3,7 +3,8 @@ /* -@deftypefn Supplemental int memcmp (const void *@var{x}, const void *@var{y}, size_t @var{count}) +@deftypefn Supplemental int memcmp (const void *@var{x}, const void *@var{y}, @ + size_t @var{count}) Compares the first @var{count} bytes of two areas of memory. Returns zero if they are the same, a value less than zero if @var{x} is diff --git a/libiberty/memcpy.c b/libiberty/memcpy.c index 9b5b24295df..7f67d0bd1f2 100644 --- a/libiberty/memcpy.c +++ b/libiberty/memcpy.c @@ -3,7 +3,8 @@ /* -@deftypefn Supplemental void* memcpy (void *@var{out}, const void *@var{in}, size_t @var{length}) +@deftypefn Supplemental void* memcpy (void *@var{out}, const void *@var{in}, @ + size_t @var{length}) Copies @var{length} bytes from memory region @var{in} to region @var{out}. Returns a pointer to @var{out}. diff --git a/libiberty/memmem.c b/libiberty/memmem.c index 5d755992b76..147253f5bad 100644 --- a/libiberty/memmem.c +++ b/libiberty/memmem.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004,2007 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004,2007,2011 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software; you can redistribute it and/or modify @@ -17,7 +17,8 @@ /* -@deftypefn Supplemental void* memmem (const void *@var{haystack}, size_t @var{haystack_len} const void *@var{needle}, size_t @var{needle_len}) +@deftypefn Supplemental void* memmem (const void *@var{haystack}, @ + size_t @var{haystack_len} const void *@var{needle}, size_t @var{needle_len}) Returns a pointer to the first occurrence of @var{needle} (length @var{needle_len}) in @var{haystack} (length @var{haystack_len}). diff --git a/libiberty/memmove.c b/libiberty/memmove.c index 06a24fc2688..ebda7cbb41c 100644 --- a/libiberty/memmove.c +++ b/libiberty/memmove.c @@ -3,7 +3,8 @@ /* -@deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, size_t @var{count}) +@deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, @ + size_t @var{count}) Copies @var{count} bytes from memory area @var{from} to memory area @var{to}, returning a pointer to @var{to}. diff --git a/libiberty/mempcpy.c b/libiberty/mempcpy.c index beda7dfc982..f85a07f2910 100644 --- a/libiberty/mempcpy.c +++ b/libiberty/mempcpy.c @@ -1,5 +1,5 @@ /* Implement the mempcpy function. - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2011 Free Software Foundation, Inc. Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. This file is part of the libiberty library. @@ -20,7 +20,8 @@ Boston, MA 02110-1301, USA. */ /* -@deftypefn Supplemental void* mempcpy (void *@var{out}, const void *@var{in}, size_t @var{length}) +@deftypefn Supplemental void* mempcpy (void *@var{out}, const void *@var{in}, @ + size_t @var{length}) Copies @var{length} bytes from memory region @var{in} to region @var{out}. Returns a pointer to @var{out} + @var{length}. diff --git a/libiberty/memset.c b/libiberty/memset.c index 1951ad6bd61..47666896127 100644 --- a/libiberty/memset.c +++ b/libiberty/memset.c @@ -3,7 +3,8 @@ /* -@deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, size_t @var{count}) +@deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, @ + size_t @var{count}) Sets the first @var{count} bytes of @var{s} to the constant byte @var{c}, returning a pointer to @var{s}. diff --git a/libiberty/pexecute.txh b/libiberty/pexecute.txh index 8baf9a0d01b..c3e40385631 100644 --- a/libiberty/pexecute.txh +++ b/libiberty/pexecute.txh @@ -1,5 +1,6 @@ @c -*- mode: texinfo -*- -@deftypefn Extension {struct pex_obj *} pex_init (int @var{flags}, const char *@var{pname}, const char *@var{tempbase}) +@deftypefn Extension {struct pex_obj *} pex_init (int @var{flags}, @ + const char *@var{pname}, const char *@var{tempbase}) Prepare to execute one or more programs, with standard output of each program fed to standard input of the next. This is a system @@ -30,7 +31,9 @@ temporary files; it may be @code{NULL} to use a randomly chosen name. @end deftypefn -@deftypefn Extension {const char *} pex_run (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{executable}, char * const *@var{argv}, const char *@var{outname}, const char *@var{errname}, int *@var{err}) +@deftypefn Extension {const char *} pex_run (struct pex_obj *@var{obj}, @ + int @var{flags}, const char *@var{executable}, char * const *@var{argv}, @ + const char *@var{outname}, const char *@var{errname}, int *@var{err}) Execute one program in a pipeline. On success this returns @code{NULL}. On failure it returns an error message, a statically @@ -139,7 +142,10 @@ value, or to 0 if there is no relevant @code{errno}. @end deftypefn -@deftypefn Extension {const char *} pex_run_in_environment (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{executable}, char * const *@var{argv}, char * const *@var{env}, int @var{env_size}, const char *@var{outname}, const char *@var{errname}, int *@var{err}) +@deftypefn Extension {const char *} pex_run_in_environment (struct pex_obj *@var{obj}, @ + int @var{flags}, const char *@var{executable}, char * const *@var{argv}, @ + char * const *@var{env}, int @var{env_size}, const char *@var{outname}, @ + const char *@var{errname}, int *@var{err}) Execute one program in a pipeline, permitting the environment for the program to be specified. Behaviour and parameters not listed below are @@ -152,7 +158,8 @@ form @code{VAR=VALUE}, with the exception of the last element that must be @end deftypefn -@deftypefn Extension {FILE *} pex_input_file (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{in_name}) +@deftypefn Extension {FILE *} pex_input_file (struct pex_obj *@var{obj}, @ + int @var{flags}, const char *@var{in_name}) Return a stream for a temporary file to pass to the first program in the pipeline as input. @@ -169,7 +176,8 @@ binary mode; otherwise, open it in the default mode. Including @code{PEX_BINARY_OUTPUT} in @var{flags} has no effect on Unix. @end deftypefn -@deftypefn Extension {FILE *} pex_input_pipe (struct pex_obj *@var{obj}, int @var{binary}) +@deftypefn Extension {FILE *} pex_input_pipe (struct pex_obj *@var{obj}, @ + int @var{binary}) Return a stream @var{fp} for a pipe connected to the standard input of the first program in the pipeline; @var{fp} is opened for writing. @@ -213,7 +221,8 @@ the output pipe is you, but you are blocked on the input pipe. @end deftypefn -@deftypefn Extension {FILE *} pex_read_output (struct pex_obj *@var{obj}, int @var{binary}) +@deftypefn Extension {FILE *} pex_read_output (struct pex_obj *@var{obj}, @ + int @var{binary}) Returns a @code{FILE} pointer which may be used to read the standard output of the last program in the pipeline. When this is used, @@ -225,7 +234,8 @@ it will be closed by @code{pex_free}. @end deftypefn -@deftypefn Extension {FILE *} pex_read_err (struct pex_obj *@var{obj}, int @var{binary}) +@deftypefn Extension {FILE *} pex_read_err (struct pex_obj *@var{obj}, @ + int @var{binary}) Returns a @code{FILE} pointer which may be used to read the standard error of the last program in the pipeline. When this is used, @@ -238,7 +248,8 @@ it will be closed by @code{pex_free}. @end deftypefn -@deftypefn Extension int pex_get_status (struct pex_obj *@var{obj}, int @var{count}, int *@var{vector}) +@deftypefn Extension int pex_get_status (struct pex_obj *@var{obj}, @ + int @var{count}, int *@var{vector}) Returns the exit status of all programs run using @var{obj}. @var{count} is the number of results expected. The results will be @@ -247,7 +258,8 @@ to @code{pex_run}. Returns 0 on error, 1 on success. @end deftypefn -@deftypefn Extension int pex_get_times (struct pex_obj *@var{obj}, int @var{count}, struct pex_time *@var{vector}) +@deftypefn Extension int pex_get_times (struct pex_obj *@var{obj}, @ + int @var{count}, struct pex_time *@var{vector}) Returns the process execution times of all programs run using @var{obj}. @var{count} is the number of results expected. The @@ -271,7 +283,10 @@ try to kill the subprocesses. @end deftypefn -@deftypefn Extension {const char *} pex_one (int @var{flags}, const char *@var{executable}, char * const *@var{argv}, const char *@var{pname}, const char *@var{outname}, const char *@var{errname}, int *@var{status}, int *@var{err}) +@deftypefn Extension {const char *} pex_one (int @var{flags}, @ + const char *@var{executable}, char * const *@var{argv}, @ + const char *@var{pname}, const char *@var{outname}, const char *@var{errname}, @ + int *@var{status}, int *@var{err}) An interface to permit the easy execution of a single program. The return value and most of the parameters are as @@ -283,7 +298,10 @@ be set to the exit status of the program. @end deftypefn -@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int @var{flags}) +@deftypefn Extension int pexecute (const char *@var{program}, @ + char * const *@var{argv}, const char *@var{this_pname}, @ + const char *@var{temp_base}, char **@var{errmsg_fmt}, @ + char **@var{errmsg_arg}, int @var{flags}) This is the old interface to execute one or more programs. It is still supported for compatibility purposes, but is no longer diff --git a/libiberty/random.c b/libiberty/random.c index c306698a538..b1d3c6c6ae4 100644 --- a/libiberty/random.c +++ b/libiberty/random.c @@ -38,7 +38,8 @@ @deftypefn Supplement {long int} random (void) @deftypefnx Supplement void srandom (unsigned int @var{seed}) -@deftypefnx Supplement void* initstate (unsigned int @var{seed}, void *@var{arg_state}, unsigned long @var{n}) +@deftypefnx Supplement void* initstate (unsigned int @var{seed}, @ + void *@var{arg_state}, unsigned long @var{n}) @deftypefnx Supplement void* setstate (void *@var{arg_state}) Random number functions. @code{random} returns a random number in the diff --git a/libiberty/setenv.c b/libiberty/setenv.c index 355af5a9dd6..96917d5769f 100644 --- a/libiberty/setenv.c +++ b/libiberty/setenv.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1992, 1995, 1996, 1997, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995, 1996, 1997, 2002, 2011 Free Software Foundation, + Inc. This file based on setenv.c in the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -19,7 +20,8 @@ /* -@deftypefn Supplemental int setenv (const char *@var{name}, const char *@var{value}, int @var{overwrite}) +@deftypefn Supplemental int setenv (const char *@var{name}, @ + const char *@var{value}, int @var{overwrite}) @deftypefnx Supplemental void unsetenv (const char *@var{name}) @code{setenv} adds @var{name} to the environment with value diff --git a/libiberty/setproctitle.c b/libiberty/setproctitle.c index a22fb1f1b56..3b3f377b67b 100644 --- a/libiberty/setproctitle.c +++ b/libiberty/setproctitle.c @@ -1,5 +1,5 @@ /* Set the title of a process. - Copyright (C) 2010 Free Software Foundation, Inc. + Copyright (C) 2010, 2011 Free Software Foundation, Inc. This file is part of the libiberty library. Libiberty is free software; you can redistribute it and/or @@ -28,7 +28,7 @@ Boston, MA 02110-1301, USA. */ /* -@deftypefn Supplemental void setproctitle (const char *@var{fmt} ...) +@deftypefn Supplemental void setproctitle (const char *@var{fmt}, ...) Set the title of a process to @var{fmt}. va args not supported for now, but defined for compatibility with BSD. diff --git a/libiberty/simple-object.txh b/libiberty/simple-object.txh index 907233a9393..34639f10a62 100644 --- a/libiberty/simple-object.txh +++ b/libiberty/simple-object.txh @@ -1,5 +1,7 @@ @c -*- mode: texinfo -*- -@deftypefn Extension {simple_object_read *} simple_object_open_read (int @var{descriptor}, off_t @var{offset}, const char *{segment_name}, const char **@var{errmsg}, int *@var{err}) +@deftypefn Extension {simple_object_read *} simple_object_open_read @ + (int @var{descriptor}, off_t @var{offset}, const char *{segment_name}, @ + const char **@var{errmsg}, int *@var{err}) Opens an object file for reading. Creates and returns an @code{simple_object_read} pointer which may be passed to other @@ -22,7 +24,10 @@ an errno value or @code{0} if there is no relevant errno. @end deftypefn -@deftypefn Extension {const char *} simple_object_find_sections (simple_object_read *@var{simple_object}, int (*@var{pfn}) (void *@var{data}, const char *@var{name}, off_t @var{offset}, off_t @var{length}), void *@var{data}, int *@var{err}) +@deftypefn Extension {const char *} simple_object_find_sections @ + (simple_object_read *@var{simple_object}, int (*@var{pfn}) (void *@var{data}, @ + const char *@var{name}, off_t @var{offset}, off_t @var{length}), @ + void *@var{data}, int *@var{err}) This function calls @var{pfn} for each section in @var{simple_object}. It calls @var{pfn} with the section name, the offset within the file @@ -41,7 +46,9 @@ or @code{0} if there is no relevant errno. @end deftypefn -@deftypefn Extension {int} simple_object_find_section (simple_object_read *@var{simple_object} off_t *@var{offset}, off_t *@var{length}, const char **@var{errmsg}, int *@var{err}) +@deftypefn Extension {int} simple_object_find_section @ + (simple_object_read *@var{simple_object} off_t *@var{offset}, @ + off_t *@var{length}, const char **@var{errmsg}, int *@var{err}) Look for the section @var{name} in @var{simple_object}. This returns information for the first section with that name. @@ -63,14 +70,16 @@ relevant errno. @end deftypefn -@deftypefn Extension {void} simple_object_release_read (simple_object_read *@var{simple_object}) +@deftypefn Extension {void} simple_object_release_read @ + (simple_object_read *@var{simple_object}) Release all resources associated with @var{simple_object}. This does not close the file descriptor. @end deftypefn -@deftypefn Extension {simple_object_attributes *} simple_object_fetch_attributes (simple_object_read *@var{simple_object}, const char **@var{errmsg}, int *@var{err}) +@deftypefn Extension {simple_object_attributes *} simple_object_fetch_attributes @ + (simple_object_read *@var{simple_object}, const char **@var{errmsg}, int *@var{err}) Fetch the attributes of @var{simple_object}. The attributes are internal information such as the format of the object file, or the @@ -84,7 +93,9 @@ error message, and sets @code{*@var{err}} to an errno value or @end deftypefn -@deftypefn Extension {const char *} simple_object_attributes_compare (simple_object_attributes *@var{attrs1}, simple_object_attributes *@var{attrs2}, int *@var{err}) +@deftypefn Extension {const char *} simple_object_attributes_compare @ + (simple_object_attributes *@var{attrs1}, simple_object_attributes *@var{attrs2}, @ + int *@var{err}) Compare @var{attrs1} and @var{attrs2}. If they could be linked together without error, return @code{NULL}. Otherwise, return an @@ -93,13 +104,16 @@ if there is no relevant errno. @end deftypefn -@deftypefn Extension {void} simple_object_release_attributes (simple_object_attributes *@var{attrs}) +@deftypefn Extension {void} simple_object_release_attributes @ + (simple_object_attributes *@var{attrs}) Release all resources associated with @var{attrs}. @end deftypefn -@deftypefn Extension {simple_object_write *} simple_object_start_write (simple_object_attributes @var{attrs}, const char *@var{segment_name}, const char **@var{errmsg}, int *@var{err}) +@deftypefn Extension {simple_object_write *} simple_object_start_write @ + (simple_object_attributes @var{attrs}, const char *@var{segment_name}, @ + const char **@var{errmsg}, int *@var{err}) Start creating a new object file using the object file format described in @var{attrs}. You must fetch attribute information from @@ -117,7 +131,9 @@ to an errno value or @code{0} if there is no relevant errno. @end deftypefn -@deftypefn Extension {simple_object_write_section *} simple_object_write_create_section (simple_object_write *@var{simple_object}, const char *@var{name}, unsigned int @var{align}, const char **@var{errmsg}, int *@var{err}) +@deftypefn Extension {simple_object_write_section *} simple_object_write_create_section @ + (simple_object_write *@var{simple_object}, const char *@var{name}, @ + unsigned int @var{align}, const char **@var{errmsg}, int *@var{err}) Add a section to @var{simple_object}. @var{name} is the name of the new section. @var{align} is the required alignment expressed as the @@ -134,7 +150,10 @@ error message, and sets @code{*@var{err}} to an errno value or @end deftypefn -@deftypefn Extension {const char *} simple_object_write_add_data (simple_object_write *@var{simple_object}, simple_object_write_section *@var{section}, const void *@var{buffer}, size_t @var{size}, int @var{copy}, int *@var{err}) +@deftypefn Extension {const char *} simple_object_write_add_data @ + (simple_object_write *@var{simple_object}, @ + simple_object_write_section *@var{section}, const void *@var{buffer}, @ + size_t @var{size}, int @var{copy}, int *@var{err}) Add data @var{buffer}/@var{size} to @var{section} in @var{simple_object}. If @var{copy} is non-zero, the data will be @@ -148,7 +167,8 @@ no relevant erro. @end deftypefn -@deftypefn Extension {const char *} simple_object_write_to_file (simple_object_write *@var{simple_object}, int @var{descriptor}, int *@var{err}) +@deftypefn Extension {const char *} simple_object_write_to_file @ + (simple_object_write *@var{simple_object}, int @var{descriptor}, int *@var{err}) Write the complete object file to @var{descriptor}, an open file descriptor. This writes out all the data accumulated by calls to @@ -161,7 +181,8 @@ there is no relevant errno. @end deftypefn -@deftypefn Extension {void} simple_object_release_write (simple_object_write *@var{simple_object}) +@deftypefn Extension {void} simple_object_release_write @ + (simple_object_write *@var{simple_object}) Release all resources associated with @var{simple_object}. diff --git a/libiberty/snprintf.c b/libiberty/snprintf.c index 36c8e9b3430..1e3b03888e6 100644 --- a/libiberty/snprintf.c +++ b/libiberty/snprintf.c @@ -1,5 +1,5 @@ /* Implement the snprintf function. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2011 Free Software Foundation, Inc. Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. This file is part of the libiberty library. This library is free @@ -25,7 +25,8 @@ the executable file might be covered by the GNU General Public License. */ /* -@deftypefn Supplemental int snprintf (char *@var{buf}, size_t @var{n}, const char *@var{format}, ...) +@deftypefn Supplemental int snprintf (char *@var{buf}, size_t @var{n}, @ + const char *@var{format}, ...) This function is similar to @code{sprintf}, but it will write to @var{buf} at most @code{@var{n}-1} bytes of text, followed by a diff --git a/libiberty/splay-tree.c b/libiberty/splay-tree.c index 27ae4660189..12bfa8bbdcc 100644 --- a/libiberty/splay-tree.c +++ b/libiberty/splay-tree.c @@ -1,6 +1,6 @@ /* A splay-tree datatype. Copyright (C) 1998, 1999, 2000, 2001, 2009, - 2010 Free Software Foundation, Inc. + 2010, 2011 Free Software Foundation, Inc. Contributed by Mark Mitchell (mark@markmitchell.com). This file is part of GNU CC. @@ -300,13 +300,13 @@ splay_tree_new_with_allocator (splay_tree_compare_fn compare_fn, /* -@deftypefn Supplemental splay_tree splay_tree_new_with_typed_alloc -(splay_tree_compare_fn @var{compare_fn}, -splay_tree_delete_key_fn @var{delete_key_fn}, -splay_tree_delete_value_fn @var{delete_value_fn}, -splay_tree_allocate_fn @var{tree_allocate_fn}, -splay_tree_allocate_fn @var{node_allocate_fn}, -splay_tree_deallocate_fn @var{deallocate_fn}, +@deftypefn Supplemental splay_tree splay_tree_new_with_typed_alloc @ +(splay_tree_compare_fn @var{compare_fn}, @ +splay_tree_delete_key_fn @var{delete_key_fn}, @ +splay_tree_delete_value_fn @var{delete_value_fn}, @ +splay_tree_allocate_fn @var{tree_allocate_fn}, @ +splay_tree_allocate_fn @var{node_allocate_fn}, @ +splay_tree_deallocate_fn @var{deallocate_fn}, @ void * @var{allocate_data}) This function creates a splay tree that uses two different allocators diff --git a/libiberty/stpncpy.c b/libiberty/stpncpy.c index f97206a09e6..83d54e60cb8 100644 --- a/libiberty/stpncpy.c +++ b/libiberty/stpncpy.c @@ -1,5 +1,5 @@ /* Implement the stpncpy function. - Copyright (C) 2003 Free Software Foundation, Inc. + Copyright (C) 2003, 2011 Free Software Foundation, Inc. Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. This file is part of the libiberty library. @@ -20,7 +20,8 @@ Boston, MA 02110-1301, USA. */ /* -@deftypefn Supplemental char* stpncpy (char *@var{dst}, const char *@var{src}, size_t @var{len}) +@deftypefn Supplemental char* stpncpy (char *@var{dst}, const char *@var{src}, @ + size_t @var{len}) Copies the string @var{src} into @var{dst}, copying exactly @var{len} and padding with zeros if necessary. If @var{len} < strlen(@var{src}) diff --git a/libiberty/strncmp.c b/libiberty/strncmp.c index 916c2f07a8a..23f6df61756 100644 --- a/libiberty/strncmp.c +++ b/libiberty/strncmp.c @@ -3,7 +3,8 @@ /* -@deftypefn Supplemental int strncmp (const char *@var{s1}, const char *@var{s2}, size_t @var{n}) +@deftypefn Supplemental int strncmp (const char *@var{s1}, @ + const char *@var{s2}, size_t @var{n}) Compares the first @var{n} bytes of two strings, returning a value as @code{strcmp}. diff --git a/libiberty/strtod.c b/libiberty/strtod.c index adbc33b0da0..e4da2113f5b 100644 --- a/libiberty/strtod.c +++ b/libiberty/strtod.c @@ -1,5 +1,5 @@ /* Implementation of strtod for systems with atof. - Copyright (C) 1991, 1995, 2002 Free Software Foundation, Inc. + Copyright (C) 1991, 1995, 2002, 2011 Free Software Foundation, Inc. This file is part of the libiberty library. This library is free software; you can redistribute it and/or modify it under the @@ -24,7 +24,8 @@ the executable file might be covered by the GNU General Public License. */ /* -@deftypefn Supplemental double strtod (const char *@var{string}, char **@var{endptr}) +@deftypefn Supplemental double strtod (const char *@var{string}, @ + char **@var{endptr}) This ISO C function converts the initial portion of @var{string} to a @code{double}. If @var{endptr} is not @code{NULL}, a pointer to the diff --git a/libiberty/strtol.c b/libiberty/strtol.c index acc7882192b..bde5647c9a6 100644 --- a/libiberty/strtol.c +++ b/libiberty/strtol.c @@ -30,8 +30,10 @@ /* -@deftypefn Supplemental {long int} strtol (const char *@var{string}, char **@var{endptr}, int @var{base}) -@deftypefnx Supplemental {unsigned long int} strtoul (const char *@var{string}, char **@var{endptr}, int @var{base}) +@deftypefn Supplemental {long int} strtol (const char *@var{string}, @ + char **@var{endptr}, int @var{base}) +@deftypefnx Supplemental {unsigned long int} strtoul (const char *@var{string}, @ + char **@var{endptr}, int @var{base}) The @code{strtol} function converts the string in @var{string} to a long integer value according to the given @var{base}, which must be diff --git a/libiberty/vasprintf.c b/libiberty/vasprintf.c index b6cb94e7a22..85de5429fce 100644 --- a/libiberty/vasprintf.c +++ b/libiberty/vasprintf.c @@ -1,6 +1,6 @@ /* Like vsprintf but provides a pointer to malloc'd storage, which must be freed by the caller. - Copyright (C) 1994, 2003 Free Software Foundation, Inc. + Copyright (C) 1994, 2003, 2011 Free Software Foundation, Inc. This file is part of the libiberty library. Libiberty is free software; you can redistribute it and/or @@ -44,7 +44,8 @@ int global_total_width; /* -@deftypefn Extension int vasprintf (char **@var{resptr}, const char *@var{format}, va_list @var{args}) +@deftypefn Extension int vasprintf (char **@var{resptr}, @ + const char *@var{format}, va_list @var{args}) Like @code{vsprintf}, but instead of passing a pointer to a buffer, you pass a pointer to a pointer. This function will compute the size diff --git a/libiberty/vprintf.c b/libiberty/vprintf.c index c2553167bab..c3193ac8196 100644 --- a/libiberty/vprintf.c +++ b/libiberty/vprintf.c @@ -1,8 +1,10 @@ /* @deftypefn Supplemental int vprintf (const char *@var{format}, va_list @var{ap}) -@deftypefnx Supplemental int vfprintf (FILE *@var{stream}, const char *@var{format}, va_list @var{ap}) -@deftypefnx Supplemental int vsprintf (char *@var{str}, const char *@var{format}, va_list @var{ap}) +@deftypefnx Supplemental int vfprintf (FILE *@var{stream}, @ + const char *@var{format}, va_list @var{ap}) +@deftypefnx Supplemental int vsprintf (char *@var{str}, @ + const char *@var{format}, va_list @var{ap}) These functions are the same as @code{printf}, @code{fprintf}, and @code{sprintf}, respectively, except that they are called with a diff --git a/libiberty/vsnprintf.c b/libiberty/vsnprintf.c index 5470df2223b..6c0afa6726c 100644 --- a/libiberty/vsnprintf.c +++ b/libiberty/vsnprintf.c @@ -1,5 +1,5 @@ /* Implement the vsnprintf function. - Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2003, 2004, 2005, 2011 Free Software Foundation, Inc. Written by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>. This file is part of the libiberty library. This library is free @@ -25,7 +25,8 @@ the executable file might be covered by the GNU General Public License. */ /* -@deftypefn Supplemental int vsnprintf (char *@var{buf}, size_t @var{n}, const char *@var{format}, va_list @var{ap}) +@deftypefn Supplemental int vsnprintf (char *@var{buf}, size_t @var{n}, @ + const char *@var{format}, va_list @var{ap}) This function is similar to @code{vsprintf}, but it will write to @var{buf} at most @code{@var{n}-1} bytes of text, followed by a diff --git a/libiberty/xmemdup.c b/libiberty/xmemdup.c index d4831163a20..aa56f0bf572 100644 --- a/libiberty/xmemdup.c +++ b/libiberty/xmemdup.c @@ -4,7 +4,8 @@ /* -@deftypefn Replacement void* xmemdup (void *@var{input}, size_t @var{copy_size}, size_t @var{alloc_size}) +@deftypefn Replacement void* xmemdup (void *@var{input}, @ + size_t @var{copy_size}, size_t @var{alloc_size}) Duplicates a region of memory without fail. First, @var{alloc_size} bytes are allocated, then @var{copy_size} bytes from @var{input} are copied into diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 0b6ba9681cf..fd297fd4b9b 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,15 @@ +2011-02-04 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> + + PR java/21206 + * configure.ac (LDLIBICONV): New substituted variable, with + instances of '-Wl,' removed from LIBICONV. + * configure: Regenerate. + * libgcj.spec.in: Use @LDLIBICONV@ not @LIBICONV@. + * Makefile.in: Regenerate. + * gcj/Makefile.in: Likewise. + * include/Makefile.in: Likewise. + * testsuite/Makefile.in: Likewise. + 2011-02-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * configure.ac: Don't use libdl on mips-sgi-irix6*. diff --git a/libjava/Makefile.in b/libjava/Makefile.in index f60b9e3b3fc..bf5ab9dcda6 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -592,6 +592,7 @@ JVM_JAR_ROOT_DIR = @JVM_JAR_ROOT_DIR@ JVM_ROOT_DIR = @JVM_ROOT_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LDLIBICONV = @LDLIBICONV@ LD_FINISH_STATIC_SPEC = @LD_FINISH_STATIC_SPEC@ LD_START_STATIC_SPEC = @LD_START_STATIC_SPEC@ LIBART_CFLAGS = @LIBART_CFLAGS@ diff --git a/libjava/configure b/libjava/configure index 2fd20a4964e..481210d380a 100755 --- a/libjava/configure +++ b/libjava/configure @@ -674,6 +674,7 @@ GLIB_CFLAGS GTK_LIBS GTK_CFLAGS PKG_CONFIG +LDLIBICONV LTLIBICONV LIBICONV USING_GCC_FALSE @@ -13355,7 +13356,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13358 "configure" +#line 13359 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13461,7 +13462,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13464 "configure" +#line 13465 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19462,7 +19463,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then : enableval=$enable_sjlj_exceptions; : else cat > conftest.$ac_ext << EOF -#line 19465 "configure" +#line 19466 "configure" struct S { ~S(); }; void bar(); void foo() @@ -21993,6 +21994,8 @@ $as_echo "#define HAVE_TZNAME 1" >>confdefs.h fi fi + LDLIBICONV=`echo " $LIBICONV " | sed "s/${acl_cv_wl--Wl,}/ /g; s/,/ /g"` + for ac_func in gethostbyname_r do : diff --git a/libjava/configure.ac b/libjava/configure.ac index e5310c1c955..a45cfc967d4 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -1240,6 +1240,8 @@ else AM_ICONV AM_LC_MESSAGES AC_STRUCT_TIMEZONE + LDLIBICONV=`echo " $LIBICONV " | sed "s/${acl_cv_wl--Wl,}/ /g; s/,/ /g"` + AC_SUBST([LDLIBICONV]) AC_CHECK_FUNCS(gethostbyname_r, [ AC_DEFINE(HAVE_GETHOSTBYNAME_R, 1, diff --git a/libjava/gcj/Makefile.in b/libjava/gcj/Makefile.in index 3273f4e331c..626bfb3af62 100644 --- a/libjava/gcj/Makefile.in +++ b/libjava/gcj/Makefile.in @@ -175,6 +175,7 @@ JVM_JAR_ROOT_DIR = @JVM_JAR_ROOT_DIR@ JVM_ROOT_DIR = @JVM_ROOT_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LDLIBICONV = @LDLIBICONV@ LD_FINISH_STATIC_SPEC = @LD_FINISH_STATIC_SPEC@ LD_START_STATIC_SPEC = @LD_START_STATIC_SPEC@ LIBART_CFLAGS = @LIBART_CFLAGS@ diff --git a/libjava/include/Makefile.in b/libjava/include/Makefile.in index edda77aa8de..1796971d146 100644 --- a/libjava/include/Makefile.in +++ b/libjava/include/Makefile.in @@ -176,6 +176,7 @@ JVM_JAR_ROOT_DIR = @JVM_JAR_ROOT_DIR@ JVM_ROOT_DIR = @JVM_ROOT_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LDLIBICONV = @LDLIBICONV@ LD_FINISH_STATIC_SPEC = @LD_FINISH_STATIC_SPEC@ LD_START_STATIC_SPEC = @LD_START_STATIC_SPEC@ LIBART_CFLAGS = @LIBART_CFLAGS@ diff --git a/libjava/libgcj.spec.in b/libjava/libgcj.spec.in index 8d39532a4b8..22eec3dbc79 100644 --- a/libjava/libgcj.spec.in +++ b/libjava/libgcj.spec.in @@ -7,6 +7,6 @@ *startfile: @THREADSTARTFILESPEC@ %(startfileorig) %rename lib liborig -*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ @LIBMATHSPEC@ @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig) +*lib: @LD_START_STATIC_SPEC@ @LIBGCJ_SPEC@ @LD_FINISH_STATIC_SPEC@ @LIBMATHSPEC@ @LDLIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) @LIBSTDCXXSPEC@ %(liborig) *jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @CHECKREFSPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @BACKTRACESPEC@ @IEEESPEC@ @ATOMICSPEC@ @LIBGCJ_BC_SPEC@ -fkeep-inline-functions diff --git a/libjava/testsuite/Makefile.in b/libjava/testsuite/Makefile.in index 56e390a003a..4af89562341 100644 --- a/libjava/testsuite/Makefile.in +++ b/libjava/testsuite/Makefile.in @@ -151,6 +151,7 @@ JVM_JAR_ROOT_DIR = @JVM_JAR_ROOT_DIR@ JVM_ROOT_DIR = @JVM_ROOT_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LDLIBICONV = @LDLIBICONV@ LD_FINISH_STATIC_SPEC = @LD_FINISH_STATIC_SPEC@ LD_START_STATIC_SPEC = @LD_START_STATIC_SPEC@ LIBART_CFLAGS = @LIBART_CFLAGS@ diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d6eac2072ee..fd96457b975 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,19 @@ +2011-02-07 Gerald Pfeifer <gerald@pfeifer.com> + + * doc/xml/faq.xml: Adjust link to bug database. + Remove old item on broken header files. + +2011-02-04 Benjamin Kosnik <bkoz@redhat.com> + + * include/bits/regex_error.h (__throw_regex_error): Not inline. + * src/functexcept.cc: Add definition. + * config/abi/pre/gnu.ver: Export. + +2011-02-04 Ralf Corsépius <ralf.corsepius@rtems.org> + + * crossconfig.m4 (GLIBCXX_CROSSCONFIG): Add *-rtems*. + * configure: Regenerate. + 2011-02-01 Paolo Carlini <paolo.carlini@oracle.com> PR libstdc++/46914 diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver index 67571395cc5..b5acc5da130 100644 --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -1,6 +1,6 @@ ## Linker script for GNU versioning (GNU ld 2.13.91+ only.) ## -## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +## Copyright (C) 2002, 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 @@ -1205,6 +1205,13 @@ GLIBCXX_3.4.15 { _ZNSt8__detail15_List_node_base11_M_transfer*; _ZNSt8__detail15_List_node_base4swapERS0_S1_; + _ZNSt11regex_errorD*; + _ZNKSt11regex_error4whatEv; + _ZTSSt11regex_error; + _ZTVSt11regex_error; + _ZTISt11regex_error; + _ZSt19__throw_regex_errorNSt15regex_constants10error_typeE; + } GLIBCXX_3.4.14; # Symbols in the support library (libsupc++) have their own tag. diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 53c3af6a2d8..8433a1a300c 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -57140,6 +57140,5867 @@ $as_echo "$ac_ld_relro" >&6; } $as_echo "#define HAVE_SINHL 1" >>confdefs.h ;; + *-rtems*) + + # All these tests are for C++; save the language and the compiler flags. + # The CXXFLAGS thing is suspicious, but based on similar bits previously + # found in GLIBCXX_CONFIGURE. + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + ac_test_CXXFLAGS="${CXXFLAGS+set}" + ac_save_CXXFLAGS="$CXXFLAGS" + + # Check for maintainer-mode bits. + if test x"$USE_MAINTAINER_MODE" = xno; then + WERROR='' + else + WERROR='-Werror' + fi + + # Check for -ffunction-sections -fdata-sections + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for g++ that supports -ffunction-sections -fdata-sections" >&5 +$as_echo_n "checking for g++ that supports -ffunction-sections -fdata-sections... " >&6; } + CXXFLAGS='-g -Werror -ffunction-sections -fdata-sections' + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo; void bar() { }; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_fdsections=yes +else + ac_fdsections=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" + else + # this is the suspicious part + CXXFLAGS='' + fi + if test x"$ac_fdsections" = x"yes"; then + SECTION_FLAGS='-ffunction-sections -fdata-sections' + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_fdsections" >&5 +$as_echo "$ac_fdsections" >&6; } + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + # If we're not using GNU ld, then there's no point in even trying these + # tests. Check for that first. We should have already tested for gld + # by now (in libtool), but require it now just to be safe... + test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS='' + test -z "$OPT_LDFLAGS" && OPT_LDFLAGS='' + + + + # The name set by libtool depends on the version of libtool. Shame on us + # for depending on an impl detail, but c'est la vie. Older versions used + # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on + # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually + # makes sense). We'll test with_gnu_ld everywhere else, so if that isn't + # set (hence we're using an older libtool), then set it. + if test x${with_gnu_ld+set} != xset; then + if test x${ac_cv_prog_gnu_ld+set} != xset; then + # We got through "ac_require(ac_prog_ld)" and still not set? Huh? + with_gnu_ld=no + else + with_gnu_ld=$ac_cv_prog_gnu_ld + fi + fi + + # Start by getting the version number. I think the libtool test already + # does some of this, but throws away the result. + glibcxx_ld_is_gold=no + if test x"$with_gnu_ld" = x"yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld version" >&5 +$as_echo_n "checking for ld version... " >&6; } + + if $LD --version 2>/dev/null | grep 'GNU gold' >/dev/null 2>&1; then + glibcxx_ld_is_gold=yes + fi + ldver=`$LD --version 2>/dev/null | + sed -e 's/GNU gold /GNU ld /;s/GNU ld version /GNU ld /;s/GNU ld ([^)]*) /GNU ld /;s/GNU ld \([0-9.][0-9.]*\).*/\1/; q'` + + glibcxx_gnu_ld_version=`echo $ldver | \ + $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'` + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_gnu_ld_version" >&5 +$as_echo "$glibcxx_gnu_ld_version" >&6; } + fi + + # Set --gc-sections. + glibcxx_have_gc_sections=no + if test "$glibcxx_ld_is_gold" = "yes"; then + if $LD --help 2>/dev/null | grep gc-sections >/dev/null 2>&1; then + glibcxx_have_gc_sections=yes + fi + else + glibcxx_gcsections_min_ld=21602 + if test x"$with_gnu_ld" = x"yes" && + test $glibcxx_gnu_ld_version -gt $glibcxx_gcsections_min_ld ; then + glibcxx_have_gc_sections=yes + fi + fi + if test "$glibcxx_have_gc_sections" = "yes"; then + # Sufficiently young GNU ld it is! Joy and bunny rabbits! + # NB: This flag only works reliably after 2.16.1. Configure tests + # for this are difficult, so hard wire a value that should work. + + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS='-Wl,--gc-sections' + + # Check for -Wl,--gc-sections + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,--gc-sections" >&5 +$as_echo_n "checking for ld that supports -Wl,--gc-sections... " >&6; } + if test x$gcc_no_link = xyes; then + as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 +fi +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + int one(void) { return 1; } + int two(void) { return 2; } + +int +main () +{ + two(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_gcsections=yes +else + ac_gcsections=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + if test "$ac_gcsections" = "yes"; then + rm -f conftest.c + touch conftest.c + if $CC -c conftest.c; then + if $LD --gc-sections -o conftest conftest.o 2>&1 | \ + grep "Warning: gc-sections option ignored" > /dev/null; then + ac_gcsections=no + fi + fi + rm -f conftest.c conftest.o conftest + fi + if test "$ac_gcsections" = "yes"; then + SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS" + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_gcsections" >&5 +$as_echo "$ac_gcsections" >&6; } + + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + else + # this is the suspicious part + CFLAGS='' + fi + fi + + # Set -z,relro. + # Note this is only for shared objects. + ac_ld_relro=no + if test x"$with_gnu_ld" = x"yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld that supports -Wl,-z,relro" >&5 +$as_echo_n "checking for ld that supports -Wl,-z,relro... " >&6; } + cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"` + if test -n "$cxx_z_relo"; then + OPT_LDFLAGS="-Wl,-z,relro" + ac_ld_relro=yes + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ld_relro" >&5 +$as_echo "$ac_ld_relro" >&6; } + fi + + # Set linker optimization flags. + if test x"$with_gnu_ld" = x"yes"; then + OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS" + fi + + + + + + ac_test_CXXFLAGS="${CXXFLAGS+set}" + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS='-fno-builtin -D_GNU_SOURCE' + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 +$as_echo_n "checking for sin in -lm... " >&6; } +if test "${ac_cv_lib_m_sin+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $LIBS" +if test x$gcc_no_link = xyes; then + as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 +fi +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sin (); +int +main () +{ +return sin (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_sin=yes +else + ac_cv_lib_m_sin=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 +$as_echo "$ac_cv_lib_m_sin" >&6; } +if test "x$ac_cv_lib_m_sin" = x""yes; then : + libm="-lm" +fi + + ac_save_LIBS="$LIBS" + LIBS="$LIBS $libm" + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinf declaration" >&5 +$as_echo_n "checking for isinf declaration... " >&6; } + if test x${glibcxx_cv_func_isinf_use+set} != xset; then + if test "${glibcxx_cv_func_isinf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + isinf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_isinf_use=yes +else + glibcxx_cv_func_isinf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_isinf_use" >&5 +$as_echo "$glibcxx_cv_func_isinf_use" >&6; } + + if test x$glibcxx_cv_func_isinf_use = x"yes"; then + for ac_func in isinf +do : + ac_fn_c_check_func "$LINENO" "isinf" "ac_cv_func_isinf" +if test "x$ac_cv_func_isinf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ISINF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _isinf declaration" >&5 +$as_echo_n "checking for _isinf declaration... " >&6; } + if test x${glibcxx_cv_func__isinf_use+set} != xset; then + if test "${glibcxx_cv_func__isinf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _isinf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__isinf_use=yes +else + glibcxx_cv_func__isinf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__isinf_use" >&5 +$as_echo "$glibcxx_cv_func__isinf_use" >&6; } + + if test x$glibcxx_cv_func__isinf_use = x"yes"; then + for ac_func in _isinf +do : + ac_fn_c_check_func "$LINENO" "_isinf" "ac_cv_func__isinf" +if test "x$ac_cv_func__isinf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__ISINF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnan declaration" >&5 +$as_echo_n "checking for isnan declaration... " >&6; } + if test x${glibcxx_cv_func_isnan_use+set} != xset; then + if test "${glibcxx_cv_func_isnan_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + isnan(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_isnan_use=yes +else + glibcxx_cv_func_isnan_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_isnan_use" >&5 +$as_echo "$glibcxx_cv_func_isnan_use" >&6; } + + if test x$glibcxx_cv_func_isnan_use = x"yes"; then + for ac_func in isnan +do : + ac_fn_c_check_func "$LINENO" "isnan" "ac_cv_func_isnan" +if test "x$ac_cv_func_isnan" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ISNAN 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _isnan declaration" >&5 +$as_echo_n "checking for _isnan declaration... " >&6; } + if test x${glibcxx_cv_func__isnan_use+set} != xset; then + if test "${glibcxx_cv_func__isnan_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _isnan(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__isnan_use=yes +else + glibcxx_cv_func__isnan_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__isnan_use" >&5 +$as_echo "$glibcxx_cv_func__isnan_use" >&6; } + + if test x$glibcxx_cv_func__isnan_use = x"yes"; then + for ac_func in _isnan +do : + ac_fn_c_check_func "$LINENO" "_isnan" "ac_cv_func__isnan" +if test "x$ac_cv_func__isnan" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__ISNAN 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for finite declaration" >&5 +$as_echo_n "checking for finite declaration... " >&6; } + if test x${glibcxx_cv_func_finite_use+set} != xset; then + if test "${glibcxx_cv_func_finite_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + finite(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_finite_use=yes +else + glibcxx_cv_func_finite_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_finite_use" >&5 +$as_echo "$glibcxx_cv_func_finite_use" >&6; } + + if test x$glibcxx_cv_func_finite_use = x"yes"; then + for ac_func in finite +do : + ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite" +if test "x$ac_cv_func_finite" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FINITE 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _finite declaration" >&5 +$as_echo_n "checking for _finite declaration... " >&6; } + if test x${glibcxx_cv_func__finite_use+set} != xset; then + if test "${glibcxx_cv_func__finite_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _finite(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__finite_use=yes +else + glibcxx_cv_func__finite_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__finite_use" >&5 +$as_echo "$glibcxx_cv_func__finite_use" >&6; } + + if test x$glibcxx_cv_func__finite_use = x"yes"; then + for ac_func in _finite +do : + ac_fn_c_check_func "$LINENO" "_finite" "ac_cv_func__finite" +if test "x$ac_cv_func__finite" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FINITE 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sincos declaration" >&5 +$as_echo_n "checking for sincos declaration... " >&6; } + if test x${glibcxx_cv_func_sincos_use+set} != xset; then + if test "${glibcxx_cv_func_sincos_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + sincos(0, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_sincos_use=yes +else + glibcxx_cv_func_sincos_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sincos_use" >&5 +$as_echo "$glibcxx_cv_func_sincos_use" >&6; } + + if test x$glibcxx_cv_func_sincos_use = x"yes"; then + for ac_func in sincos +do : + ac_fn_c_check_func "$LINENO" "sincos" "ac_cv_func_sincos" +if test "x$ac_cv_func_sincos" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SINCOS 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sincos declaration" >&5 +$as_echo_n "checking for _sincos declaration... " >&6; } + if test x${glibcxx_cv_func__sincos_use+set} != xset; then + if test "${glibcxx_cv_func__sincos_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _sincos(0, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__sincos_use=yes +else + glibcxx_cv_func__sincos_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__sincos_use" >&5 +$as_echo "$glibcxx_cv_func__sincos_use" >&6; } + + if test x$glibcxx_cv_func__sincos_use = x"yes"; then + for ac_func in _sincos +do : + ac_fn_c_check_func "$LINENO" "_sincos" "ac_cv_func__sincos" +if test "x$ac_cv_func__sincos" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__SINCOS 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpclass declaration" >&5 +$as_echo_n "checking for fpclass declaration... " >&6; } + if test x${glibcxx_cv_func_fpclass_use+set} != xset; then + if test "${glibcxx_cv_func_fpclass_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + fpclass(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_fpclass_use=yes +else + glibcxx_cv_func_fpclass_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fpclass_use" >&5 +$as_echo "$glibcxx_cv_func_fpclass_use" >&6; } + + if test x$glibcxx_cv_func_fpclass_use = x"yes"; then + for ac_func in fpclass +do : + ac_fn_c_check_func "$LINENO" "fpclass" "ac_cv_func_fpclass" +if test "x$ac_cv_func_fpclass" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FPCLASS 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _fpclass declaration" >&5 +$as_echo_n "checking for _fpclass declaration... " >&6; } + if test x${glibcxx_cv_func__fpclass_use+set} != xset; then + if test "${glibcxx_cv_func__fpclass_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _fpclass(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__fpclass_use=yes +else + glibcxx_cv_func__fpclass_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__fpclass_use" >&5 +$as_echo "$glibcxx_cv_func__fpclass_use" >&6; } + + if test x$glibcxx_cv_func__fpclass_use = x"yes"; then + for ac_func in _fpclass +do : + ac_fn_c_check_func "$LINENO" "_fpclass" "ac_cv_func__fpclass" +if test "x$ac_cv_func__fpclass" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FPCLASS 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for qfpclass declaration" >&5 +$as_echo_n "checking for qfpclass declaration... " >&6; } + if test x${glibcxx_cv_func_qfpclass_use+set} != xset; then + if test "${glibcxx_cv_func_qfpclass_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + qfpclass(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_qfpclass_use=yes +else + glibcxx_cv_func_qfpclass_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_qfpclass_use" >&5 +$as_echo "$glibcxx_cv_func_qfpclass_use" >&6; } + + if test x$glibcxx_cv_func_qfpclass_use = x"yes"; then + for ac_func in qfpclass +do : + ac_fn_c_check_func "$LINENO" "qfpclass" "ac_cv_func_qfpclass" +if test "x$ac_cv_func_qfpclass" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_QFPCLASS 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _qfpclass declaration" >&5 +$as_echo_n "checking for _qfpclass declaration... " >&6; } + if test x${glibcxx_cv_func__qfpclass_use+set} != xset; then + if test "${glibcxx_cv_func__qfpclass_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _qfpclass(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__qfpclass_use=yes +else + glibcxx_cv_func__qfpclass_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__qfpclass_use" >&5 +$as_echo "$glibcxx_cv_func__qfpclass_use" >&6; } + + if test x$glibcxx_cv_func__qfpclass_use = x"yes"; then + for ac_func in _qfpclass +do : + ac_fn_c_check_func "$LINENO" "_qfpclass" "ac_cv_func__qfpclass" +if test "x$ac_cv_func__qfpclass" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__QFPCLASS 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hypot declaration" >&5 +$as_echo_n "checking for hypot declaration... " >&6; } + if test x${glibcxx_cv_func_hypot_use+set} != xset; then + if test "${glibcxx_cv_func_hypot_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + hypot(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_hypot_use=yes +else + glibcxx_cv_func_hypot_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_hypot_use" >&5 +$as_echo "$glibcxx_cv_func_hypot_use" >&6; } + + if test x$glibcxx_cv_func_hypot_use = x"yes"; then + for ac_func in hypot +do : + ac_fn_c_check_func "$LINENO" "hypot" "ac_cv_func_hypot" +if test "x$ac_cv_func_hypot" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_HYPOT 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _hypot declaration" >&5 +$as_echo_n "checking for _hypot declaration... " >&6; } + if test x${glibcxx_cv_func__hypot_use+set} != xset; then + if test "${glibcxx_cv_func__hypot_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _hypot(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__hypot_use=yes +else + glibcxx_cv_func__hypot_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__hypot_use" >&5 +$as_echo "$glibcxx_cv_func__hypot_use" >&6; } + + if test x$glibcxx_cv_func__hypot_use = x"yes"; then + for ac_func in _hypot +do : + ac_fn_c_check_func "$LINENO" "_hypot" "ac_cv_func__hypot" +if test "x$ac_cv_func__hypot" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__HYPOT 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for float trig functions" >&5 +$as_echo_n "checking for float trig functions... " >&6; } + if test "${glibcxx_cv_func_float_trig_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ +acosf (0); asinf (0); atanf (0); cosf (0); sinf (0); tanf (0); coshf (0); sinhf (0); tanhf (0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_float_trig_use=yes +else + glibcxx_cv_func_float_trig_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_float_trig_use" >&5 +$as_echo "$glibcxx_cv_func_float_trig_use" >&6; } + if test x$glibcxx_cv_func_float_trig_use = x"yes"; then + for ac_func in acosf asinf atanf cosf sinf tanf coshf sinhf tanhf +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _float trig functions" >&5 +$as_echo_n "checking for _float trig functions... " >&6; } + if test "${glibcxx_cv_func__float_trig_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ +_acosf (0); _asinf (0); _atanf (0); _cosf (0); _sinf (0); _tanf (0); _coshf (0); _sinhf (0); _tanhf (0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__float_trig_use=yes +else + glibcxx_cv_func__float_trig_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__float_trig_use" >&5 +$as_echo "$glibcxx_cv_func__float_trig_use" >&6; } + if test x$glibcxx_cv_func__float_trig_use = x"yes"; then + for ac_func in _acosf _asinf _atanf _cosf _sinf _tanf _coshf _sinhf _tanhf +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for float round functions" >&5 +$as_echo_n "checking for float round functions... " >&6; } + if test "${glibcxx_cv_func_float_round_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ +ceilf (0); floorf (0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_float_round_use=yes +else + glibcxx_cv_func_float_round_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_float_round_use" >&5 +$as_echo "$glibcxx_cv_func_float_round_use" >&6; } + if test x$glibcxx_cv_func_float_round_use = x"yes"; then + for ac_func in ceilf floorf +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _float round functions" >&5 +$as_echo_n "checking for _float round functions... " >&6; } + if test "${glibcxx_cv_func__float_round_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ +_ceilf (0); _floorf (0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__float_round_use=yes +else + glibcxx_cv_func__float_round_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__float_round_use" >&5 +$as_echo "$glibcxx_cv_func__float_round_use" >&6; } + if test x$glibcxx_cv_func__float_round_use = x"yes"; then + for ac_func in _ceilf _floorf +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + fi + fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for expf declaration" >&5 +$as_echo_n "checking for expf declaration... " >&6; } + if test x${glibcxx_cv_func_expf_use+set} != xset; then + if test "${glibcxx_cv_func_expf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + expf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_expf_use=yes +else + glibcxx_cv_func_expf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_expf_use" >&5 +$as_echo "$glibcxx_cv_func_expf_use" >&6; } + + if test x$glibcxx_cv_func_expf_use = x"yes"; then + for ac_func in expf +do : + ac_fn_c_check_func "$LINENO" "expf" "ac_cv_func_expf" +if test "x$ac_cv_func_expf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_EXPF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _expf declaration" >&5 +$as_echo_n "checking for _expf declaration... " >&6; } + if test x${glibcxx_cv_func__expf_use+set} != xset; then + if test "${glibcxx_cv_func__expf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _expf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__expf_use=yes +else + glibcxx_cv_func__expf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__expf_use" >&5 +$as_echo "$glibcxx_cv_func__expf_use" >&6; } + + if test x$glibcxx_cv_func__expf_use = x"yes"; then + for ac_func in _expf +do : + ac_fn_c_check_func "$LINENO" "_expf" "ac_cv_func__expf" +if test "x$ac_cv_func__expf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__EXPF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnanf declaration" >&5 +$as_echo_n "checking for isnanf declaration... " >&6; } + if test x${glibcxx_cv_func_isnanf_use+set} != xset; then + if test "${glibcxx_cv_func_isnanf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + isnanf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_isnanf_use=yes +else + glibcxx_cv_func_isnanf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_isnanf_use" >&5 +$as_echo "$glibcxx_cv_func_isnanf_use" >&6; } + + if test x$glibcxx_cv_func_isnanf_use = x"yes"; then + for ac_func in isnanf +do : + ac_fn_c_check_func "$LINENO" "isnanf" "ac_cv_func_isnanf" +if test "x$ac_cv_func_isnanf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ISNANF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _isnanf declaration" >&5 +$as_echo_n "checking for _isnanf declaration... " >&6; } + if test x${glibcxx_cv_func__isnanf_use+set} != xset; then + if test "${glibcxx_cv_func__isnanf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _isnanf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__isnanf_use=yes +else + glibcxx_cv_func__isnanf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__isnanf_use" >&5 +$as_echo "$glibcxx_cv_func__isnanf_use" >&6; } + + if test x$glibcxx_cv_func__isnanf_use = x"yes"; then + for ac_func in _isnanf +do : + ac_fn_c_check_func "$LINENO" "_isnanf" "ac_cv_func__isnanf" +if test "x$ac_cv_func__isnanf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__ISNANF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinff declaration" >&5 +$as_echo_n "checking for isinff declaration... " >&6; } + if test x${glibcxx_cv_func_isinff_use+set} != xset; then + if test "${glibcxx_cv_func_isinff_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + isinff(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_isinff_use=yes +else + glibcxx_cv_func_isinff_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_isinff_use" >&5 +$as_echo "$glibcxx_cv_func_isinff_use" >&6; } + + if test x$glibcxx_cv_func_isinff_use = x"yes"; then + for ac_func in isinff +do : + ac_fn_c_check_func "$LINENO" "isinff" "ac_cv_func_isinff" +if test "x$ac_cv_func_isinff" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ISINFF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _isinff declaration" >&5 +$as_echo_n "checking for _isinff declaration... " >&6; } + if test x${glibcxx_cv_func__isinff_use+set} != xset; then + if test "${glibcxx_cv_func__isinff_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _isinff(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__isinff_use=yes +else + glibcxx_cv_func__isinff_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__isinff_use" >&5 +$as_echo "$glibcxx_cv_func__isinff_use" >&6; } + + if test x$glibcxx_cv_func__isinff_use = x"yes"; then + for ac_func in _isinff +do : + ac_fn_c_check_func "$LINENO" "_isinff" "ac_cv_func__isinff" +if test "x$ac_cv_func__isinff" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__ISINFF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atan2f declaration" >&5 +$as_echo_n "checking for atan2f declaration... " >&6; } + if test x${glibcxx_cv_func_atan2f_use+set} != xset; then + if test "${glibcxx_cv_func_atan2f_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + atan2f(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_atan2f_use=yes +else + glibcxx_cv_func_atan2f_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_atan2f_use" >&5 +$as_echo "$glibcxx_cv_func_atan2f_use" >&6; } + + if test x$glibcxx_cv_func_atan2f_use = x"yes"; then + for ac_func in atan2f +do : + ac_fn_c_check_func "$LINENO" "atan2f" "ac_cv_func_atan2f" +if test "x$ac_cv_func_atan2f" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ATAN2F 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _atan2f declaration" >&5 +$as_echo_n "checking for _atan2f declaration... " >&6; } + if test x${glibcxx_cv_func__atan2f_use+set} != xset; then + if test "${glibcxx_cv_func__atan2f_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _atan2f(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__atan2f_use=yes +else + glibcxx_cv_func__atan2f_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__atan2f_use" >&5 +$as_echo "$glibcxx_cv_func__atan2f_use" >&6; } + + if test x$glibcxx_cv_func__atan2f_use = x"yes"; then + for ac_func in _atan2f +do : + ac_fn_c_check_func "$LINENO" "_atan2f" "ac_cv_func__atan2f" +if test "x$ac_cv_func__atan2f" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__ATAN2F 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabsf declaration" >&5 +$as_echo_n "checking for fabsf declaration... " >&6; } + if test x${glibcxx_cv_func_fabsf_use+set} != xset; then + if test "${glibcxx_cv_func_fabsf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + fabsf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_fabsf_use=yes +else + glibcxx_cv_func_fabsf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fabsf_use" >&5 +$as_echo "$glibcxx_cv_func_fabsf_use" >&6; } + + if test x$glibcxx_cv_func_fabsf_use = x"yes"; then + for ac_func in fabsf +do : + ac_fn_c_check_func "$LINENO" "fabsf" "ac_cv_func_fabsf" +if test "x$ac_cv_func_fabsf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FABSF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _fabsf declaration" >&5 +$as_echo_n "checking for _fabsf declaration... " >&6; } + if test x${glibcxx_cv_func__fabsf_use+set} != xset; then + if test "${glibcxx_cv_func__fabsf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _fabsf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__fabsf_use=yes +else + glibcxx_cv_func__fabsf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__fabsf_use" >&5 +$as_echo "$glibcxx_cv_func__fabsf_use" >&6; } + + if test x$glibcxx_cv_func__fabsf_use = x"yes"; then + for ac_func in _fabsf +do : + ac_fn_c_check_func "$LINENO" "_fabsf" "ac_cv_func__fabsf" +if test "x$ac_cv_func__fabsf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FABSF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmodf declaration" >&5 +$as_echo_n "checking for fmodf declaration... " >&6; } + if test x${glibcxx_cv_func_fmodf_use+set} != xset; then + if test "${glibcxx_cv_func_fmodf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + fmodf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_fmodf_use=yes +else + glibcxx_cv_func_fmodf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fmodf_use" >&5 +$as_echo "$glibcxx_cv_func_fmodf_use" >&6; } + + if test x$glibcxx_cv_func_fmodf_use = x"yes"; then + for ac_func in fmodf +do : + ac_fn_c_check_func "$LINENO" "fmodf" "ac_cv_func_fmodf" +if test "x$ac_cv_func_fmodf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FMODF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _fmodf declaration" >&5 +$as_echo_n "checking for _fmodf declaration... " >&6; } + if test x${glibcxx_cv_func__fmodf_use+set} != xset; then + if test "${glibcxx_cv_func__fmodf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _fmodf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__fmodf_use=yes +else + glibcxx_cv_func__fmodf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__fmodf_use" >&5 +$as_echo "$glibcxx_cv_func__fmodf_use" >&6; } + + if test x$glibcxx_cv_func__fmodf_use = x"yes"; then + for ac_func in _fmodf +do : + ac_fn_c_check_func "$LINENO" "_fmodf" "ac_cv_func__fmodf" +if test "x$ac_cv_func__fmodf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FMODF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for frexpf declaration" >&5 +$as_echo_n "checking for frexpf declaration... " >&6; } + if test x${glibcxx_cv_func_frexpf_use+set} != xset; then + if test "${glibcxx_cv_func_frexpf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + frexpf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_frexpf_use=yes +else + glibcxx_cv_func_frexpf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_frexpf_use" >&5 +$as_echo "$glibcxx_cv_func_frexpf_use" >&6; } + + if test x$glibcxx_cv_func_frexpf_use = x"yes"; then + for ac_func in frexpf +do : + ac_fn_c_check_func "$LINENO" "frexpf" "ac_cv_func_frexpf" +if test "x$ac_cv_func_frexpf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FREXPF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _frexpf declaration" >&5 +$as_echo_n "checking for _frexpf declaration... " >&6; } + if test x${glibcxx_cv_func__frexpf_use+set} != xset; then + if test "${glibcxx_cv_func__frexpf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _frexpf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__frexpf_use=yes +else + glibcxx_cv_func__frexpf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__frexpf_use" >&5 +$as_echo "$glibcxx_cv_func__frexpf_use" >&6; } + + if test x$glibcxx_cv_func__frexpf_use = x"yes"; then + for ac_func in _frexpf +do : + ac_fn_c_check_func "$LINENO" "_frexpf" "ac_cv_func__frexpf" +if test "x$ac_cv_func__frexpf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FREXPF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hypotf declaration" >&5 +$as_echo_n "checking for hypotf declaration... " >&6; } + if test x${glibcxx_cv_func_hypotf_use+set} != xset; then + if test "${glibcxx_cv_func_hypotf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + hypotf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_hypotf_use=yes +else + glibcxx_cv_func_hypotf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_hypotf_use" >&5 +$as_echo "$glibcxx_cv_func_hypotf_use" >&6; } + + if test x$glibcxx_cv_func_hypotf_use = x"yes"; then + for ac_func in hypotf +do : + ac_fn_c_check_func "$LINENO" "hypotf" "ac_cv_func_hypotf" +if test "x$ac_cv_func_hypotf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_HYPOTF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _hypotf declaration" >&5 +$as_echo_n "checking for _hypotf declaration... " >&6; } + if test x${glibcxx_cv_func__hypotf_use+set} != xset; then + if test "${glibcxx_cv_func__hypotf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _hypotf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__hypotf_use=yes +else + glibcxx_cv_func__hypotf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__hypotf_use" >&5 +$as_echo "$glibcxx_cv_func__hypotf_use" >&6; } + + if test x$glibcxx_cv_func__hypotf_use = x"yes"; then + for ac_func in _hypotf +do : + ac_fn_c_check_func "$LINENO" "_hypotf" "ac_cv_func__hypotf" +if test "x$ac_cv_func__hypotf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__HYPOTF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldexpf declaration" >&5 +$as_echo_n "checking for ldexpf declaration... " >&6; } + if test x${glibcxx_cv_func_ldexpf_use+set} != xset; then + if test "${glibcxx_cv_func_ldexpf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + ldexpf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_ldexpf_use=yes +else + glibcxx_cv_func_ldexpf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_ldexpf_use" >&5 +$as_echo "$glibcxx_cv_func_ldexpf_use" >&6; } + + if test x$glibcxx_cv_func_ldexpf_use = x"yes"; then + for ac_func in ldexpf +do : + ac_fn_c_check_func "$LINENO" "ldexpf" "ac_cv_func_ldexpf" +if test "x$ac_cv_func_ldexpf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LDEXPF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _ldexpf declaration" >&5 +$as_echo_n "checking for _ldexpf declaration... " >&6; } + if test x${glibcxx_cv_func__ldexpf_use+set} != xset; then + if test "${glibcxx_cv_func__ldexpf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _ldexpf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__ldexpf_use=yes +else + glibcxx_cv_func__ldexpf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__ldexpf_use" >&5 +$as_echo "$glibcxx_cv_func__ldexpf_use" >&6; } + + if test x$glibcxx_cv_func__ldexpf_use = x"yes"; then + for ac_func in _ldexpf +do : + ac_fn_c_check_func "$LINENO" "_ldexpf" "ac_cv_func__ldexpf" +if test "x$ac_cv_func__ldexpf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__LDEXPF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for logf declaration" >&5 +$as_echo_n "checking for logf declaration... " >&6; } + if test x${glibcxx_cv_func_logf_use+set} != xset; then + if test "${glibcxx_cv_func_logf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + logf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_logf_use=yes +else + glibcxx_cv_func_logf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_logf_use" >&5 +$as_echo "$glibcxx_cv_func_logf_use" >&6; } + + if test x$glibcxx_cv_func_logf_use = x"yes"; then + for ac_func in logf +do : + ac_fn_c_check_func "$LINENO" "logf" "ac_cv_func_logf" +if test "x$ac_cv_func_logf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LOGF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _logf declaration" >&5 +$as_echo_n "checking for _logf declaration... " >&6; } + if test x${glibcxx_cv_func__logf_use+set} != xset; then + if test "${glibcxx_cv_func__logf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _logf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__logf_use=yes +else + glibcxx_cv_func__logf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__logf_use" >&5 +$as_echo "$glibcxx_cv_func__logf_use" >&6; } + + if test x$glibcxx_cv_func__logf_use = x"yes"; then + for ac_func in _logf +do : + ac_fn_c_check_func "$LINENO" "_logf" "ac_cv_func__logf" +if test "x$ac_cv_func__logf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__LOGF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log10f declaration" >&5 +$as_echo_n "checking for log10f declaration... " >&6; } + if test x${glibcxx_cv_func_log10f_use+set} != xset; then + if test "${glibcxx_cv_func_log10f_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + log10f(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_log10f_use=yes +else + glibcxx_cv_func_log10f_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_log10f_use" >&5 +$as_echo "$glibcxx_cv_func_log10f_use" >&6; } + + if test x$glibcxx_cv_func_log10f_use = x"yes"; then + for ac_func in log10f +do : + ac_fn_c_check_func "$LINENO" "log10f" "ac_cv_func_log10f" +if test "x$ac_cv_func_log10f" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LOG10F 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _log10f declaration" >&5 +$as_echo_n "checking for _log10f declaration... " >&6; } + if test x${glibcxx_cv_func__log10f_use+set} != xset; then + if test "${glibcxx_cv_func__log10f_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _log10f(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__log10f_use=yes +else + glibcxx_cv_func__log10f_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__log10f_use" >&5 +$as_echo "$glibcxx_cv_func__log10f_use" >&6; } + + if test x$glibcxx_cv_func__log10f_use = x"yes"; then + for ac_func in _log10f +do : + ac_fn_c_check_func "$LINENO" "_log10f" "ac_cv_func__log10f" +if test "x$ac_cv_func__log10f" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__LOG10F 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modff declaration" >&5 +$as_echo_n "checking for modff declaration... " >&6; } + if test x${glibcxx_cv_func_modff_use+set} != xset; then + if test "${glibcxx_cv_func_modff_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + modff(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_modff_use=yes +else + glibcxx_cv_func_modff_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_modff_use" >&5 +$as_echo "$glibcxx_cv_func_modff_use" >&6; } + + if test x$glibcxx_cv_func_modff_use = x"yes"; then + for ac_func in modff +do : + ac_fn_c_check_func "$LINENO" "modff" "ac_cv_func_modff" +if test "x$ac_cv_func_modff" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MODFF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _modff declaration" >&5 +$as_echo_n "checking for _modff declaration... " >&6; } + if test x${glibcxx_cv_func__modff_use+set} != xset; then + if test "${glibcxx_cv_func__modff_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _modff(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__modff_use=yes +else + glibcxx_cv_func__modff_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__modff_use" >&5 +$as_echo "$glibcxx_cv_func__modff_use" >&6; } + + if test x$glibcxx_cv_func__modff_use = x"yes"; then + for ac_func in _modff +do : + ac_fn_c_check_func "$LINENO" "_modff" "ac_cv_func__modff" +if test "x$ac_cv_func__modff" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__MODFF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modf declaration" >&5 +$as_echo_n "checking for modf declaration... " >&6; } + if test x${glibcxx_cv_func_modf_use+set} != xset; then + if test "${glibcxx_cv_func_modf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + modf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_modf_use=yes +else + glibcxx_cv_func_modf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_modf_use" >&5 +$as_echo "$glibcxx_cv_func_modf_use" >&6; } + + if test x$glibcxx_cv_func_modf_use = x"yes"; then + for ac_func in modf +do : + ac_fn_c_check_func "$LINENO" "modf" "ac_cv_func_modf" +if test "x$ac_cv_func_modf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MODF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _modf declaration" >&5 +$as_echo_n "checking for _modf declaration... " >&6; } + if test x${glibcxx_cv_func__modf_use+set} != xset; then + if test "${glibcxx_cv_func__modf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _modf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__modf_use=yes +else + glibcxx_cv_func__modf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__modf_use" >&5 +$as_echo "$glibcxx_cv_func__modf_use" >&6; } + + if test x$glibcxx_cv_func__modf_use = x"yes"; then + for ac_func in _modf +do : + ac_fn_c_check_func "$LINENO" "_modf" "ac_cv_func__modf" +if test "x$ac_cv_func__modf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__MODF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for powf declaration" >&5 +$as_echo_n "checking for powf declaration... " >&6; } + if test x${glibcxx_cv_func_powf_use+set} != xset; then + if test "${glibcxx_cv_func_powf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + powf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_powf_use=yes +else + glibcxx_cv_func_powf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_powf_use" >&5 +$as_echo "$glibcxx_cv_func_powf_use" >&6; } + + if test x$glibcxx_cv_func_powf_use = x"yes"; then + for ac_func in powf +do : + ac_fn_c_check_func "$LINENO" "powf" "ac_cv_func_powf" +if test "x$ac_cv_func_powf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POWF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _powf declaration" >&5 +$as_echo_n "checking for _powf declaration... " >&6; } + if test x${glibcxx_cv_func__powf_use+set} != xset; then + if test "${glibcxx_cv_func__powf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _powf(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__powf_use=yes +else + glibcxx_cv_func__powf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__powf_use" >&5 +$as_echo "$glibcxx_cv_func__powf_use" >&6; } + + if test x$glibcxx_cv_func__powf_use = x"yes"; then + for ac_func in _powf +do : + ac_fn_c_check_func "$LINENO" "_powf" "ac_cv_func__powf" +if test "x$ac_cv_func__powf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__POWF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrtf declaration" >&5 +$as_echo_n "checking for sqrtf declaration... " >&6; } + if test x${glibcxx_cv_func_sqrtf_use+set} != xset; then + if test "${glibcxx_cv_func_sqrtf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + sqrtf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_sqrtf_use=yes +else + glibcxx_cv_func_sqrtf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sqrtf_use" >&5 +$as_echo "$glibcxx_cv_func_sqrtf_use" >&6; } + + if test x$glibcxx_cv_func_sqrtf_use = x"yes"; then + for ac_func in sqrtf +do : + ac_fn_c_check_func "$LINENO" "sqrtf" "ac_cv_func_sqrtf" +if test "x$ac_cv_func_sqrtf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SQRTF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sqrtf declaration" >&5 +$as_echo_n "checking for _sqrtf declaration... " >&6; } + if test x${glibcxx_cv_func__sqrtf_use+set} != xset; then + if test "${glibcxx_cv_func__sqrtf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _sqrtf(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__sqrtf_use=yes +else + glibcxx_cv_func__sqrtf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__sqrtf_use" >&5 +$as_echo "$glibcxx_cv_func__sqrtf_use" >&6; } + + if test x$glibcxx_cv_func__sqrtf_use = x"yes"; then + for ac_func in _sqrtf +do : + ac_fn_c_check_func "$LINENO" "_sqrtf" "ac_cv_func__sqrtf" +if test "x$ac_cv_func__sqrtf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__SQRTF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sincosf declaration" >&5 +$as_echo_n "checking for sincosf declaration... " >&6; } + if test x${glibcxx_cv_func_sincosf_use+set} != xset; then + if test "${glibcxx_cv_func_sincosf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + sincosf(0, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_sincosf_use=yes +else + glibcxx_cv_func_sincosf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sincosf_use" >&5 +$as_echo "$glibcxx_cv_func_sincosf_use" >&6; } + + if test x$glibcxx_cv_func_sincosf_use = x"yes"; then + for ac_func in sincosf +do : + ac_fn_c_check_func "$LINENO" "sincosf" "ac_cv_func_sincosf" +if test "x$ac_cv_func_sincosf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SINCOSF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sincosf declaration" >&5 +$as_echo_n "checking for _sincosf declaration... " >&6; } + if test x${glibcxx_cv_func__sincosf_use+set} != xset; then + if test "${glibcxx_cv_func__sincosf_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _sincosf(0, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__sincosf_use=yes +else + glibcxx_cv_func__sincosf_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__sincosf_use" >&5 +$as_echo "$glibcxx_cv_func__sincosf_use" >&6; } + + if test x$glibcxx_cv_func__sincosf_use = x"yes"; then + for ac_func in _sincosf +do : + ac_fn_c_check_func "$LINENO" "_sincosf" "ac_cv_func__sincosf" +if test "x$ac_cv_func__sincosf" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__SINCOSF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for finitef declaration" >&5 +$as_echo_n "checking for finitef declaration... " >&6; } + if test x${glibcxx_cv_func_finitef_use+set} != xset; then + if test "${glibcxx_cv_func_finitef_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + finitef(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_finitef_use=yes +else + glibcxx_cv_func_finitef_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_finitef_use" >&5 +$as_echo "$glibcxx_cv_func_finitef_use" >&6; } + + if test x$glibcxx_cv_func_finitef_use = x"yes"; then + for ac_func in finitef +do : + ac_fn_c_check_func "$LINENO" "finitef" "ac_cv_func_finitef" +if test "x$ac_cv_func_finitef" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FINITEF 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _finitef declaration" >&5 +$as_echo_n "checking for _finitef declaration... " >&6; } + if test x${glibcxx_cv_func__finitef_use+set} != xset; then + if test "${glibcxx_cv_func__finitef_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _finitef(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__finitef_use=yes +else + glibcxx_cv_func__finitef_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__finitef_use" >&5 +$as_echo "$glibcxx_cv_func__finitef_use" >&6; } + + if test x$glibcxx_cv_func__finitef_use = x"yes"; then + for ac_func in _finitef +do : + ac_fn_c_check_func "$LINENO" "_finitef" "ac_cv_func__finitef" +if test "x$ac_cv_func__finitef" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FINITEF 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double trig functions" >&5 +$as_echo_n "checking for long double trig functions... " >&6; } + if test "${glibcxx_cv_func_long_double_trig_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ +acosl (0); asinl (0); atanl (0); cosl (0); sinl (0); tanl (0); coshl (0); sinhl (0); tanhl (0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_long_double_trig_use=yes +else + glibcxx_cv_func_long_double_trig_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_long_double_trig_use" >&5 +$as_echo "$glibcxx_cv_func_long_double_trig_use" >&6; } + if test x$glibcxx_cv_func_long_double_trig_use = x"yes"; then + for ac_func in acosl asinl atanl cosl sinl tanl coshl sinhl tanhl +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _long double trig functions" >&5 +$as_echo_n "checking for _long double trig functions... " >&6; } + if test "${glibcxx_cv_func__long_double_trig_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ +_acosl (0); _asinl (0); _atanl (0); _cosl (0); _sinl (0); _tanl (0); _coshl (0); _sinhl (0); _tanhl (0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__long_double_trig_use=yes +else + glibcxx_cv_func__long_double_trig_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__long_double_trig_use" >&5 +$as_echo "$glibcxx_cv_func__long_double_trig_use" >&6; } + if test x$glibcxx_cv_func__long_double_trig_use = x"yes"; then + for ac_func in _acosl _asinl _atanl _cosl _sinl _tanl _coshl _sinhl _tanhl +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double round functions" >&5 +$as_echo_n "checking for long double round functions... " >&6; } + if test "${glibcxx_cv_func_long_double_round_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ +ceill (0); floorl (0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_long_double_round_use=yes +else + glibcxx_cv_func_long_double_round_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_long_double_round_use" >&5 +$as_echo "$glibcxx_cv_func_long_double_round_use" >&6; } + if test x$glibcxx_cv_func_long_double_round_use = x"yes"; then + for ac_func in ceill floorl +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _long double round functions" >&5 +$as_echo_n "checking for _long double round functions... " >&6; } + if test "${glibcxx_cv_func__long_double_round_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ +_ceill (0); _floorl (0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__long_double_round_use=yes +else + glibcxx_cv_func__long_double_round_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__long_double_round_use" >&5 +$as_echo "$glibcxx_cv_func__long_double_round_use" >&6; } + if test x$glibcxx_cv_func__long_double_round_use = x"yes"; then + for ac_func in _ceill _floorl +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +eval as_val=\$$as_ac_var + if test "x$as_val" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + fi + fi + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isnanl declaration" >&5 +$as_echo_n "checking for isnanl declaration... " >&6; } + if test x${glibcxx_cv_func_isnanl_use+set} != xset; then + if test "${glibcxx_cv_func_isnanl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + isnanl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_isnanl_use=yes +else + glibcxx_cv_func_isnanl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_isnanl_use" >&5 +$as_echo "$glibcxx_cv_func_isnanl_use" >&6; } + + if test x$glibcxx_cv_func_isnanl_use = x"yes"; then + for ac_func in isnanl +do : + ac_fn_c_check_func "$LINENO" "isnanl" "ac_cv_func_isnanl" +if test "x$ac_cv_func_isnanl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ISNANL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _isnanl declaration" >&5 +$as_echo_n "checking for _isnanl declaration... " >&6; } + if test x${glibcxx_cv_func__isnanl_use+set} != xset; then + if test "${glibcxx_cv_func__isnanl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _isnanl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__isnanl_use=yes +else + glibcxx_cv_func__isnanl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__isnanl_use" >&5 +$as_echo "$glibcxx_cv_func__isnanl_use" >&6; } + + if test x$glibcxx_cv_func__isnanl_use = x"yes"; then + for ac_func in _isnanl +do : + ac_fn_c_check_func "$LINENO" "_isnanl" "ac_cv_func__isnanl" +if test "x$ac_cv_func__isnanl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__ISNANL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isinfl declaration" >&5 +$as_echo_n "checking for isinfl declaration... " >&6; } + if test x${glibcxx_cv_func_isinfl_use+set} != xset; then + if test "${glibcxx_cv_func_isinfl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + isinfl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_isinfl_use=yes +else + glibcxx_cv_func_isinfl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_isinfl_use" >&5 +$as_echo "$glibcxx_cv_func_isinfl_use" >&6; } + + if test x$glibcxx_cv_func_isinfl_use = x"yes"; then + for ac_func in isinfl +do : + ac_fn_c_check_func "$LINENO" "isinfl" "ac_cv_func_isinfl" +if test "x$ac_cv_func_isinfl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ISINFL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _isinfl declaration" >&5 +$as_echo_n "checking for _isinfl declaration... " >&6; } + if test x${glibcxx_cv_func__isinfl_use+set} != xset; then + if test "${glibcxx_cv_func__isinfl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _isinfl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__isinfl_use=yes +else + glibcxx_cv_func__isinfl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__isinfl_use" >&5 +$as_echo "$glibcxx_cv_func__isinfl_use" >&6; } + + if test x$glibcxx_cv_func__isinfl_use = x"yes"; then + for ac_func in _isinfl +do : + ac_fn_c_check_func "$LINENO" "_isinfl" "ac_cv_func__isinfl" +if test "x$ac_cv_func__isinfl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__ISINFL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atan2l declaration" >&5 +$as_echo_n "checking for atan2l declaration... " >&6; } + if test x${glibcxx_cv_func_atan2l_use+set} != xset; then + if test "${glibcxx_cv_func_atan2l_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + atan2l(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_atan2l_use=yes +else + glibcxx_cv_func_atan2l_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_atan2l_use" >&5 +$as_echo "$glibcxx_cv_func_atan2l_use" >&6; } + + if test x$glibcxx_cv_func_atan2l_use = x"yes"; then + for ac_func in atan2l +do : + ac_fn_c_check_func "$LINENO" "atan2l" "ac_cv_func_atan2l" +if test "x$ac_cv_func_atan2l" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ATAN2L 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _atan2l declaration" >&5 +$as_echo_n "checking for _atan2l declaration... " >&6; } + if test x${glibcxx_cv_func__atan2l_use+set} != xset; then + if test "${glibcxx_cv_func__atan2l_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _atan2l(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__atan2l_use=yes +else + glibcxx_cv_func__atan2l_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__atan2l_use" >&5 +$as_echo "$glibcxx_cv_func__atan2l_use" >&6; } + + if test x$glibcxx_cv_func__atan2l_use = x"yes"; then + for ac_func in _atan2l +do : + ac_fn_c_check_func "$LINENO" "_atan2l" "ac_cv_func__atan2l" +if test "x$ac_cv_func__atan2l" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__ATAN2L 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for expl declaration" >&5 +$as_echo_n "checking for expl declaration... " >&6; } + if test x${glibcxx_cv_func_expl_use+set} != xset; then + if test "${glibcxx_cv_func_expl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + expl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_expl_use=yes +else + glibcxx_cv_func_expl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_expl_use" >&5 +$as_echo "$glibcxx_cv_func_expl_use" >&6; } + + if test x$glibcxx_cv_func_expl_use = x"yes"; then + for ac_func in expl +do : + ac_fn_c_check_func "$LINENO" "expl" "ac_cv_func_expl" +if test "x$ac_cv_func_expl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_EXPL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _expl declaration" >&5 +$as_echo_n "checking for _expl declaration... " >&6; } + if test x${glibcxx_cv_func__expl_use+set} != xset; then + if test "${glibcxx_cv_func__expl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _expl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__expl_use=yes +else + glibcxx_cv_func__expl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__expl_use" >&5 +$as_echo "$glibcxx_cv_func__expl_use" >&6; } + + if test x$glibcxx_cv_func__expl_use = x"yes"; then + for ac_func in _expl +do : + ac_fn_c_check_func "$LINENO" "_expl" "ac_cv_func__expl" +if test "x$ac_cv_func__expl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__EXPL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabsl declaration" >&5 +$as_echo_n "checking for fabsl declaration... " >&6; } + if test x${glibcxx_cv_func_fabsl_use+set} != xset; then + if test "${glibcxx_cv_func_fabsl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + fabsl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_fabsl_use=yes +else + glibcxx_cv_func_fabsl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fabsl_use" >&5 +$as_echo "$glibcxx_cv_func_fabsl_use" >&6; } + + if test x$glibcxx_cv_func_fabsl_use = x"yes"; then + for ac_func in fabsl +do : + ac_fn_c_check_func "$LINENO" "fabsl" "ac_cv_func_fabsl" +if test "x$ac_cv_func_fabsl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FABSL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _fabsl declaration" >&5 +$as_echo_n "checking for _fabsl declaration... " >&6; } + if test x${glibcxx_cv_func__fabsl_use+set} != xset; then + if test "${glibcxx_cv_func__fabsl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _fabsl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__fabsl_use=yes +else + glibcxx_cv_func__fabsl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__fabsl_use" >&5 +$as_echo "$glibcxx_cv_func__fabsl_use" >&6; } + + if test x$glibcxx_cv_func__fabsl_use = x"yes"; then + for ac_func in _fabsl +do : + ac_fn_c_check_func "$LINENO" "_fabsl" "ac_cv_func__fabsl" +if test "x$ac_cv_func__fabsl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FABSL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmodl declaration" >&5 +$as_echo_n "checking for fmodl declaration... " >&6; } + if test x${glibcxx_cv_func_fmodl_use+set} != xset; then + if test "${glibcxx_cv_func_fmodl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + fmodl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_fmodl_use=yes +else + glibcxx_cv_func_fmodl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fmodl_use" >&5 +$as_echo "$glibcxx_cv_func_fmodl_use" >&6; } + + if test x$glibcxx_cv_func_fmodl_use = x"yes"; then + for ac_func in fmodl +do : + ac_fn_c_check_func "$LINENO" "fmodl" "ac_cv_func_fmodl" +if test "x$ac_cv_func_fmodl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FMODL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _fmodl declaration" >&5 +$as_echo_n "checking for _fmodl declaration... " >&6; } + if test x${glibcxx_cv_func__fmodl_use+set} != xset; then + if test "${glibcxx_cv_func__fmodl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _fmodl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__fmodl_use=yes +else + glibcxx_cv_func__fmodl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__fmodl_use" >&5 +$as_echo "$glibcxx_cv_func__fmodl_use" >&6; } + + if test x$glibcxx_cv_func__fmodl_use = x"yes"; then + for ac_func in _fmodl +do : + ac_fn_c_check_func "$LINENO" "_fmodl" "ac_cv_func__fmodl" +if test "x$ac_cv_func__fmodl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FMODL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for frexpl declaration" >&5 +$as_echo_n "checking for frexpl declaration... " >&6; } + if test x${glibcxx_cv_func_frexpl_use+set} != xset; then + if test "${glibcxx_cv_func_frexpl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + frexpl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_frexpl_use=yes +else + glibcxx_cv_func_frexpl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_frexpl_use" >&5 +$as_echo "$glibcxx_cv_func_frexpl_use" >&6; } + + if test x$glibcxx_cv_func_frexpl_use = x"yes"; then + for ac_func in frexpl +do : + ac_fn_c_check_func "$LINENO" "frexpl" "ac_cv_func_frexpl" +if test "x$ac_cv_func_frexpl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FREXPL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _frexpl declaration" >&5 +$as_echo_n "checking for _frexpl declaration... " >&6; } + if test x${glibcxx_cv_func__frexpl_use+set} != xset; then + if test "${glibcxx_cv_func__frexpl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _frexpl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__frexpl_use=yes +else + glibcxx_cv_func__frexpl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__frexpl_use" >&5 +$as_echo "$glibcxx_cv_func__frexpl_use" >&6; } + + if test x$glibcxx_cv_func__frexpl_use = x"yes"; then + for ac_func in _frexpl +do : + ac_fn_c_check_func "$LINENO" "_frexpl" "ac_cv_func__frexpl" +if test "x$ac_cv_func__frexpl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FREXPL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hypotl declaration" >&5 +$as_echo_n "checking for hypotl declaration... " >&6; } + if test x${glibcxx_cv_func_hypotl_use+set} != xset; then + if test "${glibcxx_cv_func_hypotl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + hypotl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_hypotl_use=yes +else + glibcxx_cv_func_hypotl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_hypotl_use" >&5 +$as_echo "$glibcxx_cv_func_hypotl_use" >&6; } + + if test x$glibcxx_cv_func_hypotl_use = x"yes"; then + for ac_func in hypotl +do : + ac_fn_c_check_func "$LINENO" "hypotl" "ac_cv_func_hypotl" +if test "x$ac_cv_func_hypotl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_HYPOTL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _hypotl declaration" >&5 +$as_echo_n "checking for _hypotl declaration... " >&6; } + if test x${glibcxx_cv_func__hypotl_use+set} != xset; then + if test "${glibcxx_cv_func__hypotl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _hypotl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__hypotl_use=yes +else + glibcxx_cv_func__hypotl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__hypotl_use" >&5 +$as_echo "$glibcxx_cv_func__hypotl_use" >&6; } + + if test x$glibcxx_cv_func__hypotl_use = x"yes"; then + for ac_func in _hypotl +do : + ac_fn_c_check_func "$LINENO" "_hypotl" "ac_cv_func__hypotl" +if test "x$ac_cv_func__hypotl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__HYPOTL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldexpl declaration" >&5 +$as_echo_n "checking for ldexpl declaration... " >&6; } + if test x${glibcxx_cv_func_ldexpl_use+set} != xset; then + if test "${glibcxx_cv_func_ldexpl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + ldexpl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_ldexpl_use=yes +else + glibcxx_cv_func_ldexpl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_ldexpl_use" >&5 +$as_echo "$glibcxx_cv_func_ldexpl_use" >&6; } + + if test x$glibcxx_cv_func_ldexpl_use = x"yes"; then + for ac_func in ldexpl +do : + ac_fn_c_check_func "$LINENO" "ldexpl" "ac_cv_func_ldexpl" +if test "x$ac_cv_func_ldexpl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LDEXPL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _ldexpl declaration" >&5 +$as_echo_n "checking for _ldexpl declaration... " >&6; } + if test x${glibcxx_cv_func__ldexpl_use+set} != xset; then + if test "${glibcxx_cv_func__ldexpl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _ldexpl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__ldexpl_use=yes +else + glibcxx_cv_func__ldexpl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__ldexpl_use" >&5 +$as_echo "$glibcxx_cv_func__ldexpl_use" >&6; } + + if test x$glibcxx_cv_func__ldexpl_use = x"yes"; then + for ac_func in _ldexpl +do : + ac_fn_c_check_func "$LINENO" "_ldexpl" "ac_cv_func__ldexpl" +if test "x$ac_cv_func__ldexpl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__LDEXPL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for logl declaration" >&5 +$as_echo_n "checking for logl declaration... " >&6; } + if test x${glibcxx_cv_func_logl_use+set} != xset; then + if test "${glibcxx_cv_func_logl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + logl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_logl_use=yes +else + glibcxx_cv_func_logl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_logl_use" >&5 +$as_echo "$glibcxx_cv_func_logl_use" >&6; } + + if test x$glibcxx_cv_func_logl_use = x"yes"; then + for ac_func in logl +do : + ac_fn_c_check_func "$LINENO" "logl" "ac_cv_func_logl" +if test "x$ac_cv_func_logl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LOGL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _logl declaration" >&5 +$as_echo_n "checking for _logl declaration... " >&6; } + if test x${glibcxx_cv_func__logl_use+set} != xset; then + if test "${glibcxx_cv_func__logl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _logl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__logl_use=yes +else + glibcxx_cv_func__logl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__logl_use" >&5 +$as_echo "$glibcxx_cv_func__logl_use" >&6; } + + if test x$glibcxx_cv_func__logl_use = x"yes"; then + for ac_func in _logl +do : + ac_fn_c_check_func "$LINENO" "_logl" "ac_cv_func__logl" +if test "x$ac_cv_func__logl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__LOGL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log10l declaration" >&5 +$as_echo_n "checking for log10l declaration... " >&6; } + if test x${glibcxx_cv_func_log10l_use+set} != xset; then + if test "${glibcxx_cv_func_log10l_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + log10l(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_log10l_use=yes +else + glibcxx_cv_func_log10l_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_log10l_use" >&5 +$as_echo "$glibcxx_cv_func_log10l_use" >&6; } + + if test x$glibcxx_cv_func_log10l_use = x"yes"; then + for ac_func in log10l +do : + ac_fn_c_check_func "$LINENO" "log10l" "ac_cv_func_log10l" +if test "x$ac_cv_func_log10l" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LOG10L 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _log10l declaration" >&5 +$as_echo_n "checking for _log10l declaration... " >&6; } + if test x${glibcxx_cv_func__log10l_use+set} != xset; then + if test "${glibcxx_cv_func__log10l_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _log10l(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__log10l_use=yes +else + glibcxx_cv_func__log10l_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__log10l_use" >&5 +$as_echo "$glibcxx_cv_func__log10l_use" >&6; } + + if test x$glibcxx_cv_func__log10l_use = x"yes"; then + for ac_func in _log10l +do : + ac_fn_c_check_func "$LINENO" "_log10l" "ac_cv_func__log10l" +if test "x$ac_cv_func__log10l" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__LOG10L 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modfl declaration" >&5 +$as_echo_n "checking for modfl declaration... " >&6; } + if test x${glibcxx_cv_func_modfl_use+set} != xset; then + if test "${glibcxx_cv_func_modfl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + modfl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_modfl_use=yes +else + glibcxx_cv_func_modfl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_modfl_use" >&5 +$as_echo "$glibcxx_cv_func_modfl_use" >&6; } + + if test x$glibcxx_cv_func_modfl_use = x"yes"; then + for ac_func in modfl +do : + ac_fn_c_check_func "$LINENO" "modfl" "ac_cv_func_modfl" +if test "x$ac_cv_func_modfl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_MODFL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _modfl declaration" >&5 +$as_echo_n "checking for _modfl declaration... " >&6; } + if test x${glibcxx_cv_func__modfl_use+set} != xset; then + if test "${glibcxx_cv_func__modfl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _modfl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__modfl_use=yes +else + glibcxx_cv_func__modfl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__modfl_use" >&5 +$as_echo "$glibcxx_cv_func__modfl_use" >&6; } + + if test x$glibcxx_cv_func__modfl_use = x"yes"; then + for ac_func in _modfl +do : + ac_fn_c_check_func "$LINENO" "_modfl" "ac_cv_func__modfl" +if test "x$ac_cv_func__modfl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__MODFL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for powl declaration" >&5 +$as_echo_n "checking for powl declaration... " >&6; } + if test x${glibcxx_cv_func_powl_use+set} != xset; then + if test "${glibcxx_cv_func_powl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + powl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_powl_use=yes +else + glibcxx_cv_func_powl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_powl_use" >&5 +$as_echo "$glibcxx_cv_func_powl_use" >&6; } + + if test x$glibcxx_cv_func_powl_use = x"yes"; then + for ac_func in powl +do : + ac_fn_c_check_func "$LINENO" "powl" "ac_cv_func_powl" +if test "x$ac_cv_func_powl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_POWL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _powl declaration" >&5 +$as_echo_n "checking for _powl declaration... " >&6; } + if test x${glibcxx_cv_func__powl_use+set} != xset; then + if test "${glibcxx_cv_func__powl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _powl(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__powl_use=yes +else + glibcxx_cv_func__powl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__powl_use" >&5 +$as_echo "$glibcxx_cv_func__powl_use" >&6; } + + if test x$glibcxx_cv_func__powl_use = x"yes"; then + for ac_func in _powl +do : + ac_fn_c_check_func "$LINENO" "_powl" "ac_cv_func__powl" +if test "x$ac_cv_func__powl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__POWL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrtl declaration" >&5 +$as_echo_n "checking for sqrtl declaration... " >&6; } + if test x${glibcxx_cv_func_sqrtl_use+set} != xset; then + if test "${glibcxx_cv_func_sqrtl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + sqrtl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_sqrtl_use=yes +else + glibcxx_cv_func_sqrtl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sqrtl_use" >&5 +$as_echo "$glibcxx_cv_func_sqrtl_use" >&6; } + + if test x$glibcxx_cv_func_sqrtl_use = x"yes"; then + for ac_func in sqrtl +do : + ac_fn_c_check_func "$LINENO" "sqrtl" "ac_cv_func_sqrtl" +if test "x$ac_cv_func_sqrtl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SQRTL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sqrtl declaration" >&5 +$as_echo_n "checking for _sqrtl declaration... " >&6; } + if test x${glibcxx_cv_func__sqrtl_use+set} != xset; then + if test "${glibcxx_cv_func__sqrtl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _sqrtl(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__sqrtl_use=yes +else + glibcxx_cv_func__sqrtl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__sqrtl_use" >&5 +$as_echo "$glibcxx_cv_func__sqrtl_use" >&6; } + + if test x$glibcxx_cv_func__sqrtl_use = x"yes"; then + for ac_func in _sqrtl +do : + ac_fn_c_check_func "$LINENO" "_sqrtl" "ac_cv_func__sqrtl" +if test "x$ac_cv_func__sqrtl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__SQRTL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sincosl declaration" >&5 +$as_echo_n "checking for sincosl declaration... " >&6; } + if test x${glibcxx_cv_func_sincosl_use+set} != xset; then + if test "${glibcxx_cv_func_sincosl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + sincosl(0, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_sincosl_use=yes +else + glibcxx_cv_func_sincosl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sincosl_use" >&5 +$as_echo "$glibcxx_cv_func_sincosl_use" >&6; } + + if test x$glibcxx_cv_func_sincosl_use = x"yes"; then + for ac_func in sincosl +do : + ac_fn_c_check_func "$LINENO" "sincosl" "ac_cv_func_sincosl" +if test "x$ac_cv_func_sincosl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SINCOSL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _sincosl declaration" >&5 +$as_echo_n "checking for _sincosl declaration... " >&6; } + if test x${glibcxx_cv_func__sincosl_use+set} != xset; then + if test "${glibcxx_cv_func__sincosl_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> +int +main () +{ + _sincosl(0, 0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__sincosl_use=yes +else + glibcxx_cv_func__sincosl_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__sincosl_use" >&5 +$as_echo "$glibcxx_cv_func__sincosl_use" >&6; } + + if test x$glibcxx_cv_func__sincosl_use = x"yes"; then + for ac_func in _sincosl +do : + ac_fn_c_check_func "$LINENO" "_sincosl" "ac_cv_func__sincosl" +if test "x$ac_cv_func__sincosl" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__SINCOSL 1 +_ACEOF + +fi +done + + fi + fi + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for finitel declaration" >&5 +$as_echo_n "checking for finitel declaration... " >&6; } + if test x${glibcxx_cv_func_finitel_use+set} != xset; then + if test "${glibcxx_cv_func_finitel_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + finitel(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_finitel_use=yes +else + glibcxx_cv_func_finitel_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_finitel_use" >&5 +$as_echo "$glibcxx_cv_func_finitel_use" >&6; } + + if test x$glibcxx_cv_func_finitel_use = x"yes"; then + for ac_func in finitel +do : + ac_fn_c_check_func "$LINENO" "finitel" "ac_cv_func_finitel" +if test "x$ac_cv_func_finitel" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_FINITEL 1 +_ACEOF + +fi +done + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _finitel declaration" >&5 +$as_echo_n "checking for _finitel declaration... " >&6; } + if test x${glibcxx_cv_func__finitel_use+set} != xset; then + if test "${glibcxx_cv_func__finitel_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <math.h> + #ifdef HAVE_IEEEFP_H + #include <ieeefp.h> + #endif + +int +main () +{ + _finitel(0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func__finitel_use=yes +else + glibcxx_cv_func__finitel_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func__finitel_use" >&5 +$as_echo "$glibcxx_cv_func__finitel_use" >&6; } + + if test x$glibcxx_cv_func__finitel_use = x"yes"; then + for ac_func in _finitel +do : + ac_fn_c_check_func "$LINENO" "_finitel" "ac_cv_func__finitel" +if test "x$ac_cv_func__finitel" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FINITEL 1 +_ACEOF + +fi +done + + fi + fi + + + + + LIBS="$ac_save_LIBS" + CXXFLAGS="$ac_save_CXXFLAGS" + + + ac_test_CXXFLAGS="${CXXFLAGS+set}" + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS='-fno-builtin -D_GNU_SOURCE' + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtold declaration" >&5 +$as_echo_n "checking for strtold declaration... " >&6; } + if test x${glibcxx_cv_func_strtold_use+set} != xset; then + if test "${glibcxx_cv_func_strtold_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +int +main () +{ + strtold(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_strtold_use=yes +else + glibcxx_cv_func_strtold_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_strtold_use" >&5 +$as_echo "$glibcxx_cv_func_strtold_use" >&6; } + if test x$glibcxx_cv_func_strtold_use = x"yes"; then + for ac_func in strtold +do : + ac_fn_c_check_func "$LINENO" "strtold" "ac_cv_func_strtold" +if test "x$ac_cv_func_strtold" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOLD 1 +_ACEOF + +fi +done + + fi + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strtof declaration" >&5 +$as_echo_n "checking for strtof declaration... " >&6; } + if test x${glibcxx_cv_func_strtof_use+set} != xset; then + if test "${glibcxx_cv_func_strtof_use+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +int +main () +{ + strtof(0, 0); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + glibcxx_cv_func_strtof_use=yes +else + glibcxx_cv_func_strtof_use=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_strtof_use" >&5 +$as_echo "$glibcxx_cv_func_strtof_use" >&6; } + if test x$glibcxx_cv_func_strtof_use = x"yes"; then + for ac_func in strtof +do : + ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof" +if test "x$ac_cv_func_strtof" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRTOF 1 +_ACEOF + +fi +done + + fi + + + + + CXXFLAGS="$ac_save_CXXFLAGS" + + ;; *-solaris*) case "$target" in *-solaris2.8 | *-solaris2.9 | *-solaris2.10) diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 index 3a266963819..2d0a4a83ded 100644 --- a/libstdc++-v3/crossconfig.m4 +++ b/libstdc++-v3/crossconfig.m4 @@ -198,6 +198,12 @@ case "${host}" in AC_DEFINE(HAVE_SINHF) AC_DEFINE(HAVE_SINHL) ;; + *-rtems*) + GLIBCXX_CHECK_COMPILER_FEATURES + GLIBCXX_CHECK_LINKER_FEATURES + GLIBCXX_CHECK_MATH_SUPPORT + GLIBCXX_CHECK_STDLIB_SUPPORT + ;; *-solaris*) case "$target" in *-solaris2.8 | *-solaris2.9 | *-solaris2.10) diff --git a/libstdc++-v3/doc/xml/faq.xml b/libstdc++-v3/doc/xml/faq.xml index f8e6312386a..05e805e90a5 100644 --- a/libstdc++-v3/doc/xml/faq.xml +++ b/libstdc++-v3/doc/xml/faq.xml @@ -745,7 +745,7 @@ </para> <para> Before reporting a bug, please examine the - <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/bugs.html">bugs database</link> with the + <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/bugs/">bugs database</link> with the category set to <quote>g++</quote>. </para> </answer> @@ -848,17 +848,9 @@ </question> <answer xml:id="a-v2_headers"> <para> - If you have found an extremely broken header file which is - causing problems for you, look carefully before submitting a - "high" priority bug report (which you probably - shouldn't do anyhow; see the last paragraph of the page - describing <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/bugs.html">the GCC - bug database</link>). - </para> - <para> - If the headers are in <filename>${prefix}/include/g++-3</filename>, or - if the installed library's name looks like - <filename>libstdc++-2.10.a</filename> or + If you are using headers in + <filename>${prefix}/include/g++-3</filename>, or if the installed + library's name looks like <filename>libstdc++-2.10.a</filename> or <filename>libstdc++-libc6-2.10.so</filename>, then you are using the old libstdc++-v2 library, which is nonstandard and unmaintained. Do not report problems with -v2 to the -v3 diff --git a/libstdc++-v3/include/bits/regex_error.h b/libstdc++-v3/include/bits/regex_error.h index ffbedd51fae..cfcf4798f3b 100644 --- a/libstdc++-v3/include/bits/regex_error.h +++ b/libstdc++-v3/include/bits/regex_error.h @@ -156,9 +156,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION }; - inline void - __throw_regex_error(regex_constants::error_type __ecode) - { throw regex_error(__ecode); } + void + __throw_regex_error(regex_constants::error_type __ecode); _GLIBCXX_END_NAMESPACE_VERSION } // namespace std diff --git a/libstdc++-v3/src/functexcept.cc b/libstdc++-v3/src/functexcept.cc index 5cd5ea3b194..2fe14d532e0 100644 --- a/libstdc++-v3/src/functexcept.cc +++ b/libstdc++-v3/src/functexcept.cc @@ -31,6 +31,7 @@ #include <system_error> #include <future> #include <functional> +#include <regex> #ifdef _GLIBCXX_USE_NLS # include <libintl.h> @@ -111,6 +112,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION void __throw_bad_function_call() { throw bad_function_call(); } + + void + __throw_regex_error(regex_constants::error_type __ecode) + { throw regex_error(__ecode); } #else void __throw_bad_exception(void) @@ -180,6 +185,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __throw_bad_function_call() { std::abort(); } + void + __throw_regex_error(regex_constants::error_type __ecode) + { std::abort(); } #endif //__EXCEPTIONS _GLIBCXX_END_NAMESPACE_VERSION diff --git a/lto-plugin/ChangeLog b/lto-plugin/ChangeLog index bda47ec471f..1fae1365787 100644 --- a/lto-plugin/ChangeLog +++ b/lto-plugin/ChangeLog @@ -1,3 +1,10 @@ +2011-02-07 Kai Tietz <kai.tietz@onevision.com> + + PR lto/47225 + * Makefile.am (Wl): New helper for encoding -Wl,. + (liblto_plugin_la_LIBADD): Use -Wl for libiberty library. + * Makefile.in: Regenerated. + 2011-01-25 Ian Lance Taylor <iant@google.com> * lto-plugin.c (gold_version): New static variable. diff --git a/lto-plugin/Makefile.am b/lto-plugin/Makefile.am index a51bc4a9739..1e4405389cf 100644 --- a/lto-plugin/Makefile.am +++ b/lto-plugin/Makefile.am @@ -11,11 +11,13 @@ AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS) AM_CFLAGS = -Wall -Werror AM_LIBTOOLFLAGS = --tag=disable-static +# This can go away when libiberty becomes a normal convenience library +Wl=-Wl, libexecsub_LTLIBRARIES = liblto_plugin.la liblto_plugin_la_SOURCES = lto-plugin.c liblto_plugin_la_LIBADD = \ - $(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,) + $(if $(wildcard ../libiberty/pic/libiberty.a),$(Wl)../libiberty/pic/libiberty.a,) # Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS liblto_plugin_la_LDFLAGS = $(lt_host_flags) -bindir $(libexecsubdir) \ $(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a) diff --git a/lto-plugin/Makefile.in b/lto-plugin/Makefile.in index ab38205a6fa..f559322f758 100644 --- a/lto-plugin/Makefile.in +++ b/lto-plugin/Makefile.in @@ -82,7 +82,7 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(libexecsubdir)" LTLIBRARIES = $(libexecsub_LTLIBRARIES) liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \ - ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,) + ../libiberty/pic/libiberty.a),$(Wl)../libiberty/pic/libiberty.a,) am_liblto_plugin_la_OBJECTS = lto-plugin.lo liblto_plugin_la_OBJECTS = $(am_liblto_plugin_la_OBJECTS) liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -231,10 +231,13 @@ libexecsubdir := $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version) AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS) AM_CFLAGS = -Wall -Werror AM_LIBTOOLFLAGS = --tag=disable-static + +# This can go away when libiberty becomes a normal convenience library +Wl = -Wl, libexecsub_LTLIBRARIES = liblto_plugin.la liblto_plugin_la_SOURCES = lto-plugin.c liblto_plugin_la_LIBADD = \ - $(if $(wildcard ../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,) + $(if $(wildcard ../libiberty/pic/libiberty.a),$(Wl)../libiberty/pic/libiberty.a,) # Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS liblto_plugin_la_LDFLAGS = $(lt_host_flags) -bindir $(libexecsubdir) \ diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog index efec2a1b825..a95d3d655d6 100644 --- a/maintainer-scripts/ChangeLog +++ b/maintainer-scripts/ChangeLog @@ -1,3 +1,7 @@ +2011-02-07 Joseph Myers <joseph@codesourcery.com> + + * update_web_docs_svn: Generate libquadmath-vers.texi. + 2011-01-31 Gerald Pfeifer <gerald@pfeifer.com> * update_version_svn (FILES): Merge with datestamp_FILES. diff --git a/maintainer-scripts/update_web_docs_svn b/maintainer-scripts/update_web_docs_svn index 1f823a65f08..a0551615d7d 100755 --- a/maintainer-scripts/update_web_docs_svn +++ b/maintainer-scripts/update_web_docs_svn @@ -151,6 +151,10 @@ fi echo "@set BUGURL @uref{http://gcc.gnu.org/bugs/}" ) > $includedir/gcc-vers.texi +# Generate libquadmath-vers.texi. +echo "@set BUGURL @uref{http://gcc.gnu.org/bugs/}" \ + > $includedir/libquadmath-vers.texi + # Now convert the relevant files from texi to HTML, PDF and PostScript. for file in $MANUALS; do filename=`find . -name ${file}.texi` |