diff options
334 files changed, 13082 insertions, 11057 deletions
@@ -1,3 +1,7 @@ +2025-05-14 Richard Earnshaw <rearnsha@arm.com> + + * MAINTAINERS: Marcus Shawcroft has resigned from the project. + 2025-04-28 Kwok Cheung Yeung <kcyeung@baylibre.com> * MAINTAINERS (kcy): Add gcc.gnu.org username. diff --git a/MAINTAINERS b/MAINTAINERS index b1e7fad..a3e3f25 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -57,7 +57,6 @@ docs, and the testsuite related to that. aarch64 ldp/stp Alex Coplan <alex.coplan@arm.com> aarch64 port Richard Earnshaw <richard.earnshaw@arm.com> aarch64 port Richard Sandiford <richard.sandiford@arm.com> -aarch64 port Marcus Shawcroft <marcus.shawcroft@arm.com> aarch64 port Kyrylo Tkachov <ktkachov@nvidia.com> alpha port Richard Henderson <rth@gcc.gnu.org> amdgcn port Julian Brown <julian@codesourcery.com> @@ -792,7 +791,6 @@ Senthil Kumar Selvaraj saaadhu <saaadhu@gcc.gnu.org> Kostya Serebryany kcc <kcc@google.com> Thiemo Seufer - <ths@networkno.de> Bill Seurer seurer <seurer@linux.vnet.ibm.com> -Marcus Shawcroft mshawcroft <marcus.shawcroft@arm.com> Nathaniel Shead nshead <nathanieloshead@gmail.com> Tim Shen timshen <timshen@google.com> Joel Sherrill joel <joel@oarcorp.com> diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 33d10ef..9539184 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,599 @@ +2025-05-14 Richard Biener <rguenther@suse.de> + + * tree-vectorizer.h (record_stmt_cost): Remove mixed + stmt_vec_info/SLP node inline overload. + * tree-vect-stmts.cc (vectorizable_store): For costing + vector stmts only pass SLP node to record_stmt_cost. + (vectorizable_load): Likewise. + +2025-05-14 Richard Biener <rguenther@suse.de> + + * tree-vect-stmts.cc (vect_get_store_cost): Compute vectype based + on whether we got SLP node or stmt_vec_info and use the full + record_stmt_cost API. + (vect_get_load_cost): Likewise. + +2025-05-14 Kito Cheng <kito.cheng@sifive.com> + + * common/config/riscv/riscv-common.cc + (riscv_subset_list::riscv_subset_list): Init m_allow_adding_dup. + +2025-05-14 Jiawei <jiawei@iscas.ac.cn> + + * config/riscv/riscv-ext.def: New extension defs. + * config/riscv/riscv-ext.opt: Ditto. + * doc/riscv-ext.texi: Ditto. + +2025-05-14 Kito Cheng <kito.cheng@sifive.com> + + * config/riscv/t-riscv: Drop duplicate build rule for + riscv-ext.opt. + +2025-05-14 Kito Cheng <kito.cheng@sifive.com> + + * config/riscv/riscv-ext.opt.urls: Regenerate. + +2025-05-14 Andrew Pinski <quic_apinski@quicinc.com> + + * tree-cfgcleanup.cc (canonicalize_bool_cond): New function. + (cleanup_control_expr_graph): Call canonicalize_bool_cond for GIMPLE_COND. + * tree-cfgcleanup.h (canonicalize_bool_cond): New declaration. + * tree-ssa-forwprop.cc (forward_propagate_into_gimple_cond): + Call canonicalize_bool_cond. + +2025-05-14 Andrew Pinski <quic_apinski@quicinc.com> + + * gimple.h (gimple_cond_set_code): Add assert of the code + being a comparison. + +2025-05-14 Andrew Pinski <quic_apinski@quicinc.com> + + * tree-ssa-forwprop.cc (forward_propagate_into_gimple_cond): Assert + that gimple_cond_code is always a comparison. + +2025-05-14 Andrew Pinski <quic_apinski@quicinc.com> + + * gimple-fold.cc (replace_stmt_with_simplification): Check cfun before + accessing cfun. + +2025-05-14 Andrew Pinski <quic_apinski@quicinc.com> + + * tree-ssa-forwprop.cc (pass_forwprop::execute): Move marking of to_purge bb + and marking of fixup statements to after the local optimizations. + +2025-05-14 Andrew Pinski <quic_apinski@quicinc.com> + + * tree-ssa-forwprop.cc (pass_forwprop::execute): Use `|=` for + changed on the local folding. + +2025-05-14 Richard Biener <rguenther@suse.de> + + * tree-vectorizer.h (record_stmt_cost): Add overload with + only SLP node and no vector type. + * tree-vect-stmts.cc (record_stmt_cost): Use + SLP_TREE_REPRESENTATIVE for stmt_vec_info. + (vect_model_simple_cost): Do not get stmt_vec_info argument + and adjust. + (vectorizable_call): Adjust. + (vectorizable_simd_clone_call): Likewise. + (vectorizable_conversion): Likewise. + (vectorizable_assignment): Likewise. + (vectorizable_shift): Likewise. + (vectorizable_operation): Likewise. + (vectorizable_condition): Likewise. + (vectorizable_comparison_1): Likewise. + * tree-vect-slp.cc (vect_prologue_cost_for_slp): Use + full-blown record_stmt_cost. + +2025-05-14 liuhongt <hongtao.liu@intel.com> + + PR target/120215 + * config/i386/i386-features.cc + (scalar_chain::mark_dual_mode_def): Weight + cost of integer<->sse move with bb frequency when it's + optimized_for_speed_p. + (general_scalar_chain::compute_convert_gain): Ditto, and + adjust function prototype to return true/false when cost model + is profitable or not. + (timode_scalar_chain::compute_convert_gain): Ditto. + (convert_scalars_to_vector): Adjust after the upper two + function prototype are changed. + * config/i386/i386-features.h (class scalar_chain): Change + n_integer_to_sse/n_sse_to_integer to cost_sse_integer, and add + weighted_cost_sse_integer. + (class general_scalar_chain): Adjust prototype to return bool + intead of int. + (class timode_scalar_chain): Ditto. + +2025-05-14 Martin Jambor <mjambor@suse.cz> + + PR tree-optimization/111873 + * tree-sra.cc (sra_modify_expr): When processing a load which has + a type-incompatible replacement, do not store the contents of the + replacement into the original aggregate when that aggregate is + const. + +2025-05-14 Stefan Schulze Frielinghaus <stefansf@gcc.gnu.org> + + * config/s390/vector.md: Fix tf_to_fprx2 by using vlr instead of + ldr. + +2025-05-14 liuhongt <hongtao.liu@intel.com> + + PR tree-optimization/103771 + * match.pd (cond_expr_convert_p): Extend the match to handle + scalar floating point type. + * tree-vect-patterns.cc + (vect_recog_cond_expr_convert_pattern): Handle floating point + type. + +2025-05-13 Andrew Pinski <quic_apinski@quicinc.com> + + PR tree-optimization/119903 + * gimple-fold.cc (replace_stmt_with_simplification): Reject for + noncall exceptions replacing comparison with itself. + +2025-05-13 Andrew Pinski <quic_apinski@quicinc.com> + + PR middle-end/118868 + * tree-cfg.cc (verify_gimple_assign_unary): Allow pointers + but disallow aggregate types for PAREN_EXPR. + +2025-05-13 Andrew Pinski <quic_apinski@quicinc.com> + + * cfgexpand.cc (vars_ssa_cache::operator()): Update the cache if the use is already + has a cache. + +2025-05-13 Andrew Pinski <quic_apinski@quicinc.com> + + * cfgexpand.cc (vars_ssa_cache::operator()): Reverse the order of the going + through the update list. + +2025-05-13 Richard Biener <rguenther@suse.de> + + * tree-vect-loop.cc (vectorizable_nonlinear_induction): + Remove non-SLP path, use SLP_TREE_VECTYPE. + (vectorizable_induction): Likewise. Drop ncopies variable + which is always 1. + +2025-05-13 Kito Cheng <kito.cheng@sifive.com> + + * common/config/riscv/riscv-common.cc (riscv_extra_ext_flag_table_t): + New. + (riscv_ext_flag_table): Rename to ... + (riscv_extra_ext_flag_table): this, and drop most of definitions + that can obtained from the flags field of the riscv_ext_info_t + structures. + (apply_extra_extension_flags): Use riscv_ext_info_t. + (riscv_ext_is_subset): Ditto. + +2025-05-13 Kito Cheng <kito.cheng@sifive.com> + + * common/config/riscv/riscv-common.cc (riscv_ext_version_table): + Remove. + (standard_extensions_p): Use riscv_ext_info_t. + (get_default_version): Use riscv_ext_info_t. + (riscv_arch_help): Ditto. + +2025-05-13 Kito Cheng <kito.cheng@sifive.com> + + * common/config/riscv/riscv-common.cc + (riscv_implied_info::riscv_implied_info_t): Remove unused + variant. + (struct riscv_implied_info_t): Remove unsued field. + (riscv_implied_info::match): Remove unused variant, and adjust + the logic. + (get_riscv_ext_info): New. + (riscv_implied_info): Remove. + (riscv_ext_info_t::apply_implied_ext): New. + (riscv_combine_info). Remove. + (riscv_subset_list::handle_implied_ext): Use riscv_ext_info_t + rather than riscv_implied_info. + (riscv_subset_list::check_implied_ext): Ditto. + (riscv_subset_list::handle_combine_ext): Use riscv_ext_info_t + rather than riscv_combine_info. + (riscv_minimal_hwprobe_feature_bits): Use riscv_ext_info_t + rather than riscv_implied_info. + +2025-05-13 Kito Cheng <kito.cheng@sifive.com> + + * common/config/riscv/riscv-common.cc (riscv_ext_info_t): New + struct. + (opt_var_ref_t): Adjust order. + (cl_opt_var_ref_t): Ditto. + (riscv_ext_flag_table_t): Adjust order, and add a new construct + that not hold the extension name. + (riscv_version_t): New struct. + (riscv_implied_info_t): Adjust order, and add a new construct that not + hold the extension name. + (apply_extra_extension_flags): New function. + (riscv_ext_infos): New. + (riscv_implied_info): Adjust. + * config/riscv/riscv-opts.h (EXT_FLAG_MACRO): New macro. + (BITMASK_NOT_YET_ALLOCATED): New macro. + +2025-05-13 Kito Cheng <kito.cheng@sifive.com> + + * common/config/riscv/riscv-common.cc (riscv_can_inline_p): Drop + extension flags check from `target_flags`. + * config/riscv/riscv-subset.h (riscv_x_target_flags_isa_mask): + Remove. + * config/riscv/riscv.cc (riscv_x_target_flags_isa_mask): Remove. + +2025-05-13 Kito Cheng <kito.cheng@sifive.com> + + * doc/invoke.texi: Replace hand‑written extension table with + `@include riscv-ext.texi` to pull in auto‑generated entries. + * doc/riscv-ext.texi: New generated definition file + containing formatted documentation entries for each extension. + * Makefile.in: Add riscv-ext.texi to the list of files to be + processed by the Texinfo generator. + * config/riscv/gen-riscv-ext-texi.cc: New. + * config/riscv/t-riscv: Add rule for generating riscv-ext.texi. + +2025-05-13 Kito Cheng <kito.cheng@sifive.com> + + * config/riscv/gen-riscv-ext-opt.cc: New. + * config/riscv/riscv.opt: Drop manual entries for target + options, and include riscv-ext.opt. + * config/riscv/riscv-ext.opt: New. + * config/riscv/riscv-ext.opt.urls: New. + * config.gcc: Add riscv-ext.opt to the list of target options files. + * common/config/riscv/riscv-common.cc (riscv_ext_flag_table): Adjsut target + option variable entry. + (riscv_set_arch_by_subset_list): Adjust target option variable. + * config/riscv/riscv-c.cc (riscv_ext_flag_table): Adjust target + option variable entry. + * config/riscv/riscv-vector-builtins.cc (pragma_intrinsic_flags): + Adjust variable name. + (riscv_pragma_intrinsic_flags_pollute): Adjust variable name. + (riscv_pragma_intrinsic_flags_restore): Ditto. + * config/riscv/t-riscv: Add the rule for generating + riscv-ext.opt. + * config/riscv/riscv-opts.h (TARGET_MIN_VLEN): Update. + (TARGET_MIN_VLEN_OPTS): Update. + +2025-05-13 Kito Cheng <kito.cheng@sifive.com> + + * config/riscv/riscv-ext.def: New file; define extension metadata table. + * config/riscv/riscv-ext-corev.def: New. + * config/riscv/riscv-ext-sifive.def: New. + * config/riscv/riscv-ext-thead.def: New. + * config/riscv/riscv-ext-ventana.def: New. + +2025-05-13 David Malcolm <dmalcolm@redhat.com> + + PR other/116792 + * diagnostic-format-html.cc: Include "diagnostic-format-text.h", + "pretty-print-urlifier.h" and "edit-context.h". + (html_builder::html_builder): Fix indentation in decl. + (html_builder::make_element_for_diagnostic): Split out metadata + code into make_element_for_metadata. Call + make_element_for_source, make_element_for_path, and + make_element_for_patch. + (html_builder::make_element_for_source): New. + (html_builder::make_element_for_path): New. + (html_builder::make_element_for_patch): New. + (html_builder::make_metadata_element): New. + (html_builder::make_element_for_metadata): New. + (html_output_format::get_builder): New. + (selftest::test_html_diagnostic_context::get_builder): New. + (selftest::test_simple_log): Update test to print a quoted string, + and verify that it uses a "gcc-quoted-text" span. + (selftest::test_metadata): New. + (selftest::diagnostic_format_html_cc_tests): Call it. + +2025-05-13 Andrew MacLeod <amacleod@redhat.com> + + * tree-ssanames.cc (set_bitmask): Use int_range_max for temps. + * value-range.cc (irange::set_range_from_bitmask): Handle all + trailing zero values. + +2025-05-12 Pan Li <pan2.li@intel.com> + + * match.pd: Add form 7 matching pattern for unsigned integer + SAT_ADD. + +2025-05-12 Andrew Pinski <quic_apinski@quicinc.com> + + * config/aarch64/aarch64.md (cmov<mode>6): Remove. + +2025-05-12 Andrew Pinski <quic_apinski@quicinc.com> + + PR middle-end/120230 + * optabs.cc (can_compare_p): Remove support for ccp_cmov. + * optabs.def (cmov_optab): Remove. + * optabs.h (can_compare_purpose): Remove ccp_cmov. + +2025-05-12 Andrew MacLeod <amacleod@redhat.com> + + PR tree-optimization/120231 + * range-op-float.cc (operator_cast::fold_range): New variants. + (operator_cast::op1_range): Likewise. + * range-op-mixed.h (operator_cast::fold_range): Likewise. + (operator_cast::op1_range): Likewise + * range-op.cc (range_op_handler::fold_range): Add RO_FIF dispatch. + (range_op_handler::op1_range): Add RO_IFF and RO_FII patterns. + (range_operator::fold_range): Provide new variant default. + (range_operator::op1_range): Likewise. + * range-op.h (range_operator): Add new variant methods. + +2025-05-12 Gaius Mulley <gaiusmod2@gmail.com> + + PR modula2/120188 + * doc/gm2.texi (Semantic checking): Add -fm2-plugin command line option. + +2025-05-12 Thomas Schwinge <tschwinge@baylibre.com> + + * config/nvptx/nvptx-sm.def: Add '61'. + * config/nvptx/nvptx-gen.h: Regenerate. + * config/nvptx/nvptx-gen.opt: Likewise. + * config/nvptx/nvptx.cc (first_ptx_version_supporting_sm): Adjust. + * config/nvptx/nvptx.opt (-march-map=sm_61, -march-map=sm_62): + Likewise. + * config.gcc: Likewise. + * doc/invoke.texi (Nvidia PTX Options): Document '-march=sm_61'. + * config/nvptx/gen-multilib-matches-tests: Extend. + +2025-05-12 Thomas Schwinge <tschwinge@baylibre.com> + + * config/nvptx/nvptx-opts.h (enum ptx_version): Add + 'PTX_VERSION_5_0'. + * config/nvptx/nvptx.cc (ptx_version_to_string) + (ptx_version_to_number): Adjust. + * config/nvptx/nvptx.h (TARGET_PTX_5_0): New. + * config/nvptx/nvptx.opt (Enum(ptx_version)): Add 'EnumValue' + '5.0' for 'PTX_VERSION_5_0'. + * doc/invoke.texi (Nvidia PTX Options): Document '-mptx=5.0'. + +2025-05-12 Dongyan Chen <chendongyan@isrc.iscas.ac.cn> + + * common/config/riscv/riscv-common.cc + (riscv_subset_list::check_conflict_ext): New extension. + * config/riscv/riscv.opt: Ditto. + +2025-05-12 Dongyan Chen <chendongyan@isrc.iscas.ac.cn> + + * common/config/riscv/riscv-common.cc + (riscv_subset_list::check_conflict_ext): New extension. + * config/riscv/riscv.opt: Ditto. + +2025-05-12 Richard Biener <rguenther@suse.de> + + * lto-streamer-out.cc (hash_tree): Hash TYPE_MODE_RAW. + When offloading hash modes as VOIDmode for aggregates + and vectors. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * doc/extend.texi: Remove the iwmmxt intrinsics. + * doc/md.texi: Remove the iwmmxt-related constraints. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/aout.h (REGISTER_NAMES): Remove iwmmxt registers. + * config/arm/arm.h (FIRST_IWMMXT_REGNUM): Delete. + (LAST_IWMMXT_REGNUM): Delete. + (FIRST_IWMMXT_GR_REGNUM): Delete. + (LAST_IWMMXT_GR_REGNUM): Delete. + (IS_IWMMXT_REGNUM): Delete. + (IS_IWMMXT_GR_REGNUM): Delete. + (FRAME_POINTER_REGNUM): Define relative to CC_REGNUM. + (ARG_POINTER_REGNUM): Define relative to FRAME_POINTER_REGNUM. + (FIRST_PSEUDO_REGISTER): Adjust. + (WREG): Delete. + (WGREG): Delete. + (REG_ALLOC_ORDER): Remove iWMMX registers. + (enum reg_class): Remove iWMMX register classes. + (REG_CLASS_NAMES): Likewise. + (REG_CLASS_CONTENTS): Remove iWMMX registers. + * config/arm/arm.md (CC_REGNUM): Adjust value. + (VFPCC_RENGUM): Likewise. + (APSRQ_REGNUM): Likewise. + (APSRGE_REGNUM): Likewise. + (VPR_REGNUM): Likewise. + (RA_AUTH_CODE): Likewise. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/arm-cpus.in (feature iwmmxt, feature iwmmxt2): Delete. + * config/arm/arm-protos.h (arm_output_iwmmxt_shift_immediate): Delete. + (arm_output_iwmmxt_tinsr): Delete. + (arm_arch_iwmmxt): Delete. + (arm_arch_iwmmxt2): Delete. + * config/arm/arm.h (TARGET_IWMMXT): Delete. + (TARGET_IWMMXT2): Delete. + (TARGET_REALLY_IWMMXT): Delete. + (TARGET_REALLY_IWMMXT2): Delete. + (VALID_IWMMXT_REG_MODE): Delete. + (ARM_HAVE_V8QI_ARITH): Remove iWMMXT. + (ARM_HAVE_V4HI_ARITH): Likewise. + (ARM_HAVE_V2SI_ARITH): Likewise. + (ARM_HAVE_V8QI_LDST): Likewise. + (ARM_HAVE_V4HI_LDST): Likewise. + (ARM_HAVE_V2SI_LDST): Likewise. + (SECONDARY_OUTPUT_RELOAD_CLASS): Remove iWMMXT cases. + (SECONDARY_INPUT_RELOAD_CLASS): Likewise. + * config/arm/arm.cc (arm_arch_iwmmxt): Delete. + (arm_arch_iwmmxt2): Delete. + (arm_option_reconfigure_globals): Don't initialize them. + (arm_register_move_cost): Remove costs for iwmmxt. + (struct minipool_node): Update comment. + (output_move_double): Likewise + (output_return_instruction): Likewise. + (arm_print_operand, cases 'U' and 'w'): Report an error if + used. + (arm_regno_class): Remove iWMMXT cases. + (arm_debugger_regno): Remove iWMMXT cases. + (arm_output_iwmmxt_shift_immediate): Delete. + (arm_output_iwmmxt_tinsr): Delete. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/arm-c.cc (arm_cpu_builtins): Remove predefines + for __IWWMXT__, __IWMMXT2__ and __ARM_WMMX. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/iterators.md (VMMX, VMMX2): Remove mode iterators. + (MMX_char): Remove mode iterator attribute. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/arm.md (core_cycles): Remove iwmmxt attributes. + * config/arm/types.md (autodetect_type): Likewise. + * config/arm/marvell-f-iwmmxt.md: Removed. + * config/arm/t-arm: Remove marvell-f-iwmmxt.md + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/arm.cc (arm_option_check_internal): Remove + IWMMXT check. + (arm_options_perform_arch_sanity_checks): Likewise. + (use_return_insn): Likewise. + (arm_init_cumulative_args): Likewise. + (arm_legitimate_index_p): Likewise. + (thumb2_legitimate_index_p): Likewise. + (arm_compute_save_core_reg_mask): Likewise. + (output_return_instruction): Likewise. + (arm_compute_frame_layout): Likewise. + (arm_save_coproc_regs): Likewise. + (arm_hard_regno_mode_ok): Likewise. + (arm_expand_epilogue_apcs_frame): Likewise. + (arm_expand_epilogue): Likewise. + (arm_vector_mode_supported_p): Likewise. + (arm_preferred_simd_mode): Likewise. + (arm_conditional_register_usage): Likewise. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config.gcc (arm, --with-abi): Remove iwmmxt abi option. + * config/arm/arm.opt (enum ARM_ABI_IWMMXT): Remove. + * config/arm/arm.h (TARGET_IWMMXT_ABI): Delete. + (enum arm_pcs): Remove ARM_PCS_AAPCS_IWMMXT. + (FUNCTION_ARG_REGNO_P): Remove IWMMXT ABI support. + (CUMULATIVE_ARGS): Remove iwmmxt_nregs. + * config/arm/arm.cc (arm_options_perform_arch_sanity_checks): + Remove IWMMXT ABI checks. + (arm_libcall_value_1): Likewise. + (arm_function_value_regno_p): Likewise. + (arm_apply_result_size): Remove adjustment for IWMMXT ABI. + (arm_function_arg): Remove IWMMXT ABI support. + (arm_arg_partial_bytes): Likewise. + (arm_function_arg_advance): Likewise. + (arm_init_cumulative_args): Don't initialize iwmmxt_nregs. + * doc/invoke.texi (arm -mabi): Remove mention of the iwmmxt + ABI option. + * config/arm/arm-opts.h (enum arm_abi_type): Remove ARM_ABI_IWMMXT. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/arm.md(attr arch): Remove iwmmxt and iwmmxt2. + Remove checks based on TARGET_REALLY_IWMMXT2 from all split + patterns. + (arm_movdi): Likewise. + (*arm_movt): Likewise. + (arch_enabled): Remove test for iwmmxt2. + * config/arm/constraints.md (y, z): Remove register constraints. + (Uy): Remove memory constraint. + * config/arm/thumb2.md (thumb2_pop_single): Remove check for + IWMMXT. + * config/arm/vec-common.md (mov<mode>): Remove check for IWMMXT. + (mul<mode>3): Likewise. + (xor<mode>3): Likewise. + (<absneg_str><mode>2): Likewise. + (@movmisalign<mode>): Likewise. + (@mve_<mve_insn>q_<supf><mode>): Likewise. + (vashl<mode>3): Likewise. + (vashr<mode>3): Likewise. + (vlshr<mode>3): Likewise. + (uavg<mode>3_ceil): Likewise. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/arm.md: Don't include iwmmxt.md. + * config/arm/t-arm (MD_INCLUDES): Remove iwmmxt*.md. + * config/arm/iwmmxt.md: Removed. + * config/arm/iwmmxt2.md: Removed. + * config/arm/unspecs.md: Remove comment referring to + iwmmxt2.md. + (enum unspec): Remove iWMMXt unspec values. + (enum unspecv): Likewise. + * config/arm/predicates.md (imm_or_reg_operand): Delete. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/arm-builtins.cc (enum arm_builtins): Delete iWMMX + builtin values. + (bdesc_2arg): Likewise. + (bdesc_1arg): Likewise. + (arm_init_iwmmxt_builtins): Delete. + (arm_init_builtins): Don't call arm_init_iwmmxt_builtins. + (safe_vector_operand): Use __builtin_unreachable instead of emitting + an iwmmxt builtin. + (arm_general_expand_builtin): Remove iWMMX builtins support. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/arm-cpus.in (arch iwmmxt): treat in the same + way as we would treat XScale. + (arch iwmmxt2): Likewise. + (cpu xscale): Add aliases for iwmmxt and iwmmxt2. + (cpu iwmmxt): Delete. + (cpu iwmmxt2): Delete. + * config/arm/arm-generic.md (load_ldsched_xscale): Remove references + to iwmmxt. + (load_ldsched): Likewise. + * config/arm/arm-tables.opt: Regenerated. + * config/arm/arm-tune.md: Regenerated. + * doc/sourcebuild.texi (arm_iwmmxt_ok): Delete. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * config/arm/arm.h (SECONDARY_OUTPUT_RELOAD_CLASS): Add parentheis + and re-indent. + (SECONDARY_INPUT_RELOAD_CLASS): Likewise. + +2025-05-12 H.J. Lu <hjl.tools@gmail.com> + + PR target/120228 + * config/i386/i386-features.cc (ix86_place_single_vector_set): + Remove df_insn_rescan after emit_insn_*. + (remove_partial_avx_dependency): Likewise. + (replace_vector_const): Likewise. + +2025-05-11 Jan Hubicka <hubicka@ucw.cz> + + * config/i386/i386.cc (ix86_widen_mult_cost): Use sse_op to cost + SSE integer addition. + (ix86_multiplication_cost): Use COSTS_N_INSNS (...)/2 to cost sse + loads. + (ix86_shift_rotate_cost): Likewise. + (ix86_vector_costs::add_stmt_cost): Likewise. + +2025-05-11 Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp> + + * config/xtensa/xtensa.cc (xtensa_register_move_cost): + Add appropriate move costs between AR_REGS and FP_REGS. + +2025-05-11 Richard Biener <rguenther@suse.de> + + PR tree-optimization/120211 + * tree-vect-stmts.cc (vect_stmt_relevant_p): Only add PHIs + from the loop header to LOOP_VINFO_EARLY_BREAKS_LIVE_IVS. + +2025-05-11 Jiawei <jiawei@iscas.ac.cn> + + * common/config/riscv/riscv-common.cc: New profile. + +2025-05-11 Jiawei <jiawei@iscas.ac.cn> + + * common/config/riscv/riscv-common.cc (struct riscv_profiles): New struct. + (riscv_subset_list::parse_profiles): New parser. + (riscv_subset_list::parse_base_ext): Ditto. + * config/riscv/riscv-subset.h: New def. + * doc/invoke.texi: New option descriptions. + 2025-05-10 H.J. Lu <hjl.tools@gmail.com> PR target/92080 diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index b11e7ca..63e8d5b 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20250511 +20250515 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index e3af923..72d1322 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3703,7 +3703,7 @@ TEXI_GCC_FILES = gcc.texi gcc-common.texi gcc-vers.texi frontends.texi \ contribute.texi compat.texi funding.texi gnu.texi gpl_v3.texi \ fdl.texi contrib.texi cppenv.texi cppopts.texi avr-mmcu.texi \ implement-c.texi implement-cxx.texi gcov-tool.texi gcov-dump.texi \ - lto-dump.texi + lto-dump.texi riscv-ext.texi # we explicitly use $(srcdir)/doc/tm.texi here to avoid confusion with # the generated tm.texi; the latter might have a more recent timestamp, diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 128ea05..f0046a0 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2025-05-13 Nicolas Boulenguez <nicolas@debian.org> + + PR ada/87778 + * Make-generated.in: Remove -q gnatmake option. + * gcc-interface/Makefile.in: Likewise. + 2025-05-05 Eric Botcazou <ebotcazou@adacore.com> PR ada/120104 diff --git a/gcc/ada/Make-generated.in b/gcc/ada/Make-generated.in index 95c2a1d..5cb1b32 100644 --- a/gcc/ada/Make-generated.in +++ b/gcc/ada/Make-generated.in @@ -18,7 +18,7 @@ GEN_IL_FLAGS = -gnata -gnat2012 -gnatw.g -gnatyg -gnatU $(GEN_IL_INCLUDES) ada/seinfo_tables.ads ada/seinfo_tables.adb ada/sinfo.h ada/einfo.h ada/nmake.ads ada/nmake.adb ada/seinfo.ads ada/sinfo-nodes.ads ada/sinfo-nodes.adb ada/einfo-entities.ads ada/einfo-entities.adb: ada/stamp-gen_il ; @true ada/stamp-gen_il: $(fsrcdir)/ada/gen_il* $(MKDIR) ada/gen_il - cd ada/gen_il; gnatmake -q -g $(GEN_IL_FLAGS) gen_il-main + cd ada/gen_il; gnatmake -g $(GEN_IL_FLAGS) gen_il-main # Ignore errors to work around finalization issues in older compilers - cd ada/gen_il; ./gen_il-main $(fsrcdir)/../move-if-change ada/gen_il/seinfo_tables.ads ada/seinfo_tables.ads @@ -46,7 +46,7 @@ ada/stamp-snames : ada/snames.ads-tmpl ada/snames.adb-tmpl ada/snames.h-tmpl ada -$(MKDIR) ada/bldtools/snamest $(RM) $(addprefix ada/bldtools/snamest/,$(notdir $^)) $(CP) $^ ada/bldtools/snamest - cd ada/bldtools/snamest && gnatmake -q xsnamest && ./xsnamest + cd ada/bldtools/snamest && gnatmake xsnamest && ./xsnamest $(fsrcdir)/../move-if-change ada/bldtools/snamest/snames.ns ada/snames.ads $(fsrcdir)/../move-if-change ada/bldtools/snamest/snames.nb ada/snames.adb $(fsrcdir)/../move-if-change ada/bldtools/snamest/snames.nh ada/snames.h diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 4ffdc1e..2c42cb1 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -634,7 +634,7 @@ OSCONS_EXTRACT=$(GCC_FOR_ADA_RTS) $(GNATLIBCFLAGS_FOR_C) -S s-oscons-tmplt.i -$(MKDIR) ./bldtools/oscons $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^)) $(CP) $^ ./bldtools/oscons - (cd ./bldtools/oscons ; gnatmake -q xoscons) + (cd ./bldtools/oscons ; gnatmake xoscons) $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h ./bldtools/oscons/xoscons $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc index 2b27076..277ef65 100644 --- a/gcc/cfgexpand.cc +++ b/gcc/cfgexpand.cc @@ -766,7 +766,12 @@ vars_ssa_cache::operator() (tree name) /* If the cache exists for the use, don't try to recreate it. */ if (exists (use)) - continue; + { + /* Update the cache here, this can reduce the number of + times through the update loop below. */ + update (old_name, use); + continue; + } /* Create the cache bitmap for the use and also so we don't go into an infinite loop for some phi nodes with loops. */ @@ -804,9 +809,11 @@ vars_ssa_cache::operator() (tree name) bool changed; do { changed = false; - for (auto &e : update_cache_list) + unsigned int i; + std::pair<tree,tree> *e; + FOR_EACH_VEC_ELT_REVERSE (update_cache_list, i, e) { - if (update (e.second, e.first)) + if (update (e->second, e->first)) changed = true; } } while (changed); diff --git a/gcc/common/config/riscv/riscv-common.cc b/gcc/common/config/riscv/riscv-common.cc index e06cd5f..53ca039 100644 --- a/gcc/common/config/riscv/riscv-common.cc +++ b/gcc/common/config/riscv/riscv-common.cc @@ -19,6 +19,7 @@ along with GCC; see the file COPYING3. If not see #include <sstream> #include <vector> +#include <unordered_map> #include <queue> #define INCLUDE_STRING @@ -41,229 +42,216 @@ along with GCC; see the file COPYING3. If not see #define TARGET_DEFAULT_TARGET_FLAGS (MASK_BIG_ENDIAN) #endif +/* Type for pointer to member of gcc_options and cl_target_option. */ +typedef int (gcc_options::*opt_var_ref_t); +typedef int (cl_target_option::*cl_opt_var_ref_t); + +/* Types for recording extension to internal flag. */ +struct riscv_extra_ext_flag_table_t +{ + const char *ext; + opt_var_ref_t var_ref; + cl_opt_var_ref_t cl_var_ref; + int mask; +}; + +/* Types for recording extension to internal flag. */ +struct riscv_ext_flag_table_t +{ + opt_var_ref_t var_ref; + cl_opt_var_ref_t cl_var_ref; + int mask; + + void clean (gcc_options *opts) const { opts->*var_ref &= ~mask; } + + void set (gcc_options *opts) const { opts->*var_ref |= mask; } + + bool check (cl_target_option *opts) const + { + return (opts->*cl_var_ref & mask); + } +}; + +/* Type for hold RISC-V extension version. */ +struct riscv_version_t +{ + riscv_version_t (int major_version, int minor_version, + enum riscv_isa_spec_class isa_spec_class + = ISA_SPEC_CLASS_NONE) + : major_version (major_version), minor_version (minor_version), + isa_spec_class (isa_spec_class) + {} + int major_version; + int minor_version; + enum riscv_isa_spec_class isa_spec_class; +}; + typedef bool (*riscv_implied_predicator_t) (const riscv_subset_list *); /* Type for implied ISA info. */ struct riscv_implied_info_t { - constexpr riscv_implied_info_t (const char *ext, const char *implied_ext, + constexpr riscv_implied_info_t (const char *implied_ext, riscv_implied_predicator_t predicator = nullptr) - : ext (ext), implied_ext (implied_ext), predicator (predicator){}; + : implied_ext (implied_ext), predicator (predicator) + {} - bool match (const riscv_subset_list *subset_list, const char *ext_name) const + bool match (const riscv_subset_list *subset_list) const { - if (strcmp (ext_name, ext) != 0) - return false; - if (predicator && !predicator (subset_list)) return false; return true; } - bool match (const riscv_subset_list *subset_list, - const riscv_subset_t *subset) const - { - return match (subset_list, subset->name.c_str()); - } - - const char *ext; const char *implied_ext; riscv_implied_predicator_t predicator; }; -/* Implied ISA info, must end with NULL sentinel. */ -static const riscv_implied_info_t riscv_implied_info[] = -{ - {"m", "zmmul"}, - - {"d", "f"}, - {"f", "zicsr"}, - {"d", "zicsr"}, - - {"a", "zaamo"}, - {"a", "zalrsc"}, - - {"c", "zca"}, - {"c", "zcf", - [] (const riscv_subset_list *subset_list) -> bool - { - return subset_list->xlen () == 32 && subset_list->lookup ("f"); - }}, - {"c", "zcd", - [] (const riscv_subset_list *subset_list) -> bool - { - return subset_list->lookup ("d"); - }}, - - {"zabha", "zaamo"}, - {"zacas", "zaamo"}, - {"zawrs", "zalrsc"}, - - {"zcmop", "zca"}, - - {"b", "zba"}, - {"b", "zbb"}, - {"b", "zbs"}, - - {"zdinx", "zfinx"}, - {"zfinx", "zicsr"}, - {"zdinx", "zicsr"}, - - {"zicfiss", "zicsr"}, - {"zicfiss", "zimop"}, - {"zicfilp", "zicsr"}, - - {"zk", "zkn"}, - {"zk", "zkr"}, - {"zk", "zkt"}, - {"zkn", "zbkb"}, - {"zkn", "zbkc"}, - {"zkn", "zbkx"}, - {"zkn", "zkne"}, - {"zkn", "zknd"}, - {"zkn", "zknh"}, - {"zks", "zbkb"}, - {"zks", "zbkc"}, - {"zks", "zbkx"}, - {"zks", "zksed"}, - {"zks", "zksh"}, - - {"v", "zvl128b"}, - {"v", "zve64d"}, - - {"zve32f", "f"}, - {"zve64f", "f"}, - {"zve64d", "d"}, - - {"zve32x", "zicsr"}, - {"zve32x", "zvl32b"}, - {"zve32f", "zve32x"}, - {"zve32f", "zvl32b"}, - - {"zve64x", "zve32x"}, - {"zve64x", "zvl64b"}, - {"zve64f", "zve32f"}, - {"zve64f", "zve64x"}, - {"zve64f", "zvl64b"}, - {"zve64d", "zve64f"}, - {"zve64d", "zvl64b"}, - - {"zvl64b", "zvl32b"}, - {"zvl128b", "zvl64b"}, - {"zvl256b", "zvl128b"}, - {"zvl512b", "zvl256b"}, - {"zvl1024b", "zvl512b"}, - {"zvl2048b", "zvl1024b"}, - {"zvl4096b", "zvl2048b"}, - {"zvl8192b", "zvl4096b"}, - {"zvl16384b", "zvl8192b"}, - {"zvl32768b", "zvl16384b"}, - {"zvl65536b", "zvl32768b"}, - - {"zvkn", "zvkned"}, - {"zvkn", "zvknhb"}, - {"zvkn", "zvkb"}, - {"zvkn", "zvkt"}, - {"zvknc", "zvkn"}, - {"zvknc", "zvbc"}, - {"zvkng", "zvkn"}, - {"zvkng", "zvkg"}, - {"zvks", "zvksed"}, - {"zvks", "zvksh"}, - {"zvks", "zvkb"}, - {"zvks", "zvkt"}, - {"zvksc", "zvks"}, - {"zvksc", "zvbc"}, - {"zvksg", "zvks"}, - {"zvksg", "zvkg"}, - {"zvbb", "zvkb"}, - {"zvbc", "zve64x"}, - {"zvkb", "zve32x"}, - {"zvkg", "zve32x"}, - {"zvkned", "zve32x"}, - {"zvknha", "zve32x"}, - {"zvknhb", "zve64x"}, - {"zvksed", "zve32x"}, - {"zvksh", "zve32x"}, - - {"zfbfmin", "zfhmin"}, - {"zfh", "zfhmin"}, - {"zfhmin", "f"}, - - {"zfa", "f"}, - - {"zvfbfmin", "zve32f"}, - {"zvfbfwma", "zvfbfmin"}, - {"zvfbfwma", "zfbfmin"}, - {"zvfhmin", "zve32f"}, - {"zvfh", "zve32f"}, - {"zvfh", "zfhmin"}, - - {"zhinx", "zhinxmin"}, - {"zhinxmin", "zfinx"}, - - {"zce", "zca"}, - {"zce", "zcb"}, - {"zce", "zcmp"}, - {"zce", "zcmt"}, - {"zcf", "zca"}, - {"zcd", "zca"}, - {"zcb", "zca"}, - {"zcmp", "zca"}, - {"zcmt", "zca"}, - {"zcmt", "zicsr"}, - {"zce", "zcf", - [] (const riscv_subset_list *subset_list) -> bool - { - return subset_list->xlen () == 32 && subset_list->lookup ("f"); - }}, - {"zca", "c", - [] (const riscv_subset_list *subset_list) -> bool - { - /* For RV32 Zca implies C for one of these combinations of - extensions: Zca, F_Zca_Zcf and FD_Zca_Zcf_Zcd. */ - if (subset_list->xlen () == 32) - { - if (subset_list->lookup ("d")) - return subset_list->lookup ("zcf") && subset_list->lookup ("zcd"); - - if (subset_list->lookup ("f")) - return subset_list->lookup ("zcf"); - - return true; - } - - /* For RV64 Zca implies C for one of these combinations of - extensions: Zca and FD_Zca_Zcd (Zcf is not available - for RV64). */ - if (subset_list->xlen () == 64) - { - if (subset_list->lookup ("d")) - return subset_list->lookup ("zcd"); - - return true; - } - - /* Do nothing for future RV128 specification. Behaviour - for this case is not yet well defined. */ - return false; - }}, - - {"smaia", "ssaia"}, - {"smstateen", "ssstateen"}, - {"smepmp", "zicsr"}, - {"ssaia", "zicsr"}, - {"sscofpmf", "zicsr"}, - {"ssstateen", "zicsr"}, - {"sstc", "zicsr"}, - - {"xsfvcp", "zve32x"}, +static void +apply_extra_extension_flags (const char *ext, + std::vector<riscv_ext_flag_table_t> &flag_table); - {NULL, NULL} +/* Class for hold the extension info. */ +class riscv_ext_info_t +{ +public: + riscv_ext_info_t (const char *ext, + const std::vector<riscv_implied_info_t> &implied_exts, + const std::vector<riscv_version_t> &supported_versions, + const std::vector<riscv_ext_flag_table_t> &flag_table, + int bitmask_group_id, int bitmask_group_bit_pos, + unsigned extra_extension_flags) + : m_ext (ext), m_implied_exts (implied_exts), + m_supported_versions (supported_versions), m_flag_table (flag_table), + m_bitmask_group_id (bitmask_group_id), + m_bitmask_group_bit_pos (bitmask_group_bit_pos), + m_extra_extension_flags (extra_extension_flags) + { + apply_extra_extension_flags (ext, m_flag_table); + } + + /* Return true if any change. */ + bool apply_implied_ext (riscv_subset_list *subset_list) const; + + const std::vector<riscv_implied_info_t> implied_exts () const + { + return m_implied_exts; + } + + bool need_combine_p () const + { + return m_extra_extension_flags & EXT_FLAG_MACRO; + } + + riscv_version_t default_version () const + { + if (m_supported_versions.size () == 1) + { + return *m_supported_versions.begin (); + } + + for (const riscv_version_t &ver : m_supported_versions) + { + if (ver.isa_spec_class == riscv_isa_spec + || ver.isa_spec_class == ISA_SPEC_CLASS_NONE) + return ver; + } + gcc_unreachable (); + } + + void clean_opts (gcc_options *opts) const + { + for (auto &flag : m_flag_table) + flag.clean (opts); + } + + void set_opts (gcc_options *opts) const + { + for (auto &flag : m_flag_table) + flag.set (opts); + } + + bool check_opts (cl_target_option *opts) const + { + bool result = true; + for (auto &flag : m_flag_table) + result = result && flag.check (opts); + return result; + } + + const std::vector<riscv_version_t> &supported_versions () const + { + return m_supported_versions; + } + +private: + const char *m_ext; + std::vector<riscv_implied_info_t> m_implied_exts; + std::vector<riscv_version_t> m_supported_versions; + std::vector<riscv_ext_flag_table_t> m_flag_table; + int m_bitmask_group_id; + int m_bitmask_group_bit_pos; + unsigned m_extra_extension_flags; +}; + +static const std::unordered_map<std::string, riscv_ext_info_t> riscv_ext_infos + = { +#define DEFINE_RISCV_EXT(NAME, UPPERCAE_NAME, FULL_NAME, DESC, URL, DEP_EXTS, \ + SUPPORTED_VERSIONS, FLAG_GROUP, BITMASK_GROUP_ID, \ + BITMASK_BIT_POSITION, EXTRA_EXTENSION_FLAGS) \ + {std::string (#NAME), \ + riscv_ext_info_t (#NAME, std::vector<riscv_implied_info_t> DEP_EXTS, \ + std::vector<riscv_version_t> SUPPORTED_VERSIONS, \ + std::vector<riscv_ext_flag_table_t> ( \ + {{&gcc_options::x_riscv_##FLAG_GROUP##_subext, \ + &cl_target_option::x_riscv_##FLAG_GROUP##_subext, \ + MASK_##UPPERCAE_NAME}}), \ + BITMASK_GROUP_ID, BITMASK_BIT_POSITION, \ + EXTRA_EXTENSION_FLAGS)}, +#include "../../../config/riscv/riscv-ext.def" +#undef DEFINE_RISCV_EXT }; +static const riscv_ext_info_t & +get_riscv_ext_info (const std::string &ext) +{ + auto itr = riscv_ext_infos.find (ext); + if (itr == riscv_ext_infos.end ()) + { + gcc_unreachable (); + } + return itr->second; +} + +/* Return true if any change. */ +bool +riscv_ext_info_t::apply_implied_ext (riscv_subset_list *subset_list) const +{ + bool any_change = false; + for (const riscv_implied_info_t &implied_info : m_implied_exts) + { + /* Skip if implied extension already present. */ + if (subset_list->lookup (implied_info.implied_ext)) + continue; + + any_change = true; + if (!implied_info.match (subset_list)) + continue; + + /* Version of implied extension will get from current ISA spec + version. */ + subset_list->add (implied_info.implied_ext, true); + + /* Recursively add implied extension by implied_info->implied_ext. */ + const riscv_ext_info_t &implied_ext_info + = get_riscv_ext_info (implied_info.implied_ext); + implied_ext_info.apply_implied_ext (subset_list); + } + return any_change; +} + /* This structure holds version information for specific ISA version. */ struct riscv_ext_version @@ -280,234 +268,6 @@ struct riscv_profiles const char *profile_string; }; -/* All standard extensions defined in all supported ISA spec. */ -static const struct riscv_ext_version riscv_ext_version_table[] = -{ - /* name, ISA spec, major version, minor_version. */ - {"e", ISA_SPEC_CLASS_20191213, 2, 0}, - {"e", ISA_SPEC_CLASS_20190608, 2, 0}, - {"e", ISA_SPEC_CLASS_2P2, 2, 0}, - - {"i", ISA_SPEC_CLASS_20191213, 2, 1}, - {"i", ISA_SPEC_CLASS_20190608, 2, 1}, - {"i", ISA_SPEC_CLASS_2P2, 2, 0}, - - {"m", ISA_SPEC_CLASS_20191213, 2, 0}, - {"m", ISA_SPEC_CLASS_20190608, 2, 0}, - {"m", ISA_SPEC_CLASS_2P2, 2, 0}, - - {"a", ISA_SPEC_CLASS_20191213, 2, 1}, - {"a", ISA_SPEC_CLASS_20190608, 2, 0}, - {"a", ISA_SPEC_CLASS_2P2, 2, 0}, - - {"f", ISA_SPEC_CLASS_20191213, 2, 2}, - {"f", ISA_SPEC_CLASS_20190608, 2, 2}, - {"f", ISA_SPEC_CLASS_2P2, 2, 0}, - - {"d", ISA_SPEC_CLASS_20191213, 2, 2}, - {"d", ISA_SPEC_CLASS_20190608, 2, 2}, - {"d", ISA_SPEC_CLASS_2P2, 2, 0}, - - {"c", ISA_SPEC_CLASS_20191213, 2, 0}, - {"c", ISA_SPEC_CLASS_20190608, 2, 0}, - {"c", ISA_SPEC_CLASS_2P2, 2, 0}, - - {"b", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"h", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"v", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zicsr", ISA_SPEC_CLASS_20191213, 2, 0}, - {"zicsr", ISA_SPEC_CLASS_20190608, 2, 0}, - - {"zifencei", ISA_SPEC_CLASS_20191213, 2, 0}, - {"zifencei", ISA_SPEC_CLASS_20190608, 2, 0}, - - {"zicond", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"za64rs", ISA_SPEC_CLASS_NONE, 1, 0}, - {"za128rs", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zawrs", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zaamo", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zalrsc", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zabha", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zacas", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zama16b", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zba", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zbb", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zbc", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zbs", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zfinx", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zdinx", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zhinx", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zhinxmin", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zbkb", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zbkc", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zbkx", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zkne", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zknd", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zknh", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zkr", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zksed", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zksh", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zkt", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zihintntl", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zihintpause", ISA_SPEC_CLASS_NONE, 2, 0}, - - {"zicboz",ISA_SPEC_CLASS_NONE, 1, 0}, - {"zicbom",ISA_SPEC_CLASS_NONE, 1, 0}, - {"zicbop",ISA_SPEC_CLASS_NONE, 1, 0}, - {"zic64b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"ziccamoa", ISA_SPEC_CLASS_NONE, 1, 0}, - {"ziccif", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zicclsm", ISA_SPEC_CLASS_NONE, 1, 0}, - {"ziccrse", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zicfiss", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zicfilp", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zimop", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zcmop", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zicntr", ISA_SPEC_CLASS_NONE, 2, 0}, - {"zihpm", ISA_SPEC_CLASS_NONE, 2, 0}, - - {"zk", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zkn", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zks", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"ztso", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zve32x", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zve32f", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zve64x", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zve64f", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zve64d", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zvbb", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvbc", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvkb", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvkg", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvkned", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvknha", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvknhb", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvksed", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvksh", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvkn", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvknc", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvkng", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvks", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvksc", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvksg", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvkt", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zvl32b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvl64b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvl128b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvl256b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvl512b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvl1024b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvl2048b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvl4096b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvl8192b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvl16384b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvl32768b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvl65536b", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zfbfmin", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zfh", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zfhmin", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvfbfmin", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvfbfwma", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvfhmin", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvfh", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zfa", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zmmul", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"zca", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zcb", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zce", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zcf", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zcd", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zcmp", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zcmt", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"sdtrig", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"smaia", ISA_SPEC_CLASS_NONE, 1, 0}, - {"smepmp", ISA_SPEC_CLASS_NONE, 1, 0}, - {"smstateen", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"ssaia", ISA_SPEC_CLASS_NONE, 1, 0}, - {"sscofpmf", ISA_SPEC_CLASS_NONE, 1, 0}, - {"ssstateen", ISA_SPEC_CLASS_NONE, 1, 0}, - {"sstc", ISA_SPEC_CLASS_NONE, 1, 0}, - {"ssstrict", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"svade", ISA_SPEC_CLASS_NONE, 1, 0}, - {"svadu", ISA_SPEC_CLASS_NONE, 1, 0}, - {"svinval", ISA_SPEC_CLASS_NONE, 1, 0}, - {"svnapot", ISA_SPEC_CLASS_NONE, 1, 0}, - {"svpbmt", ISA_SPEC_CLASS_NONE, 1, 0}, - {"svvptc", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"xcvmac", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xcvalu", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xcvelw", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xcvsimd", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xcvbi", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"xtheadba", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadbb", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadbs", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadcmo", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadcondmov", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadfmemidx", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadfmv", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadint", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadmac", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadmemidx", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadmempair", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadsync", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xtheadvector", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"xventanacondops", ISA_SPEC_CLASS_NONE, 1, 0}, - - {"xsfvcp", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xsfcease", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xsfvqmaccqoq", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xsfvqmaccdod", ISA_SPEC_CLASS_NONE, 1, 0}, - {"xsfvfnrclipxfqf", ISA_SPEC_CLASS_NONE, 1, 0}, - - /* Terminate the list. */ - {NULL, ISA_SPEC_CLASS_NONE, 0, 0} -}; - -/* Combine extensions defined in this table */ -static const struct riscv_ext_version riscv_combine_info[] = -{ - {"a", ISA_SPEC_CLASS_20191213, 2, 1}, - {"b", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zk", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zkn", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zks", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvkn", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvknc", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvkng", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvks", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvksc", ISA_SPEC_CLASS_NONE, 1, 0}, - {"zvksg", ISA_SPEC_CLASS_NONE, 1, 0}, - /* Terminate the list. */ - {NULL, ISA_SPEC_CLASS_NONE, 0, 0} -}; - /* This table records the mapping form RISC-V Profiles into march string. */ static const riscv_profiles riscv_profiles_table[] = { @@ -604,7 +364,7 @@ riscv_subset_t::riscv_subset_t () riscv_subset_list::riscv_subset_list (const char *arch, location_t loc) : m_arch (arch), m_loc (loc), m_head (NULL), m_tail (NULL), m_xlen (0), - m_subset_num (0) + m_subset_num (0), m_allow_adding_dup (false) { } @@ -782,11 +542,8 @@ subset_cmp (const std::string &a, const std::string &b) static bool standard_extensions_p (const char *ext) { - const riscv_ext_version *ext_ver; - for (ext_ver = &riscv_ext_version_table[0]; ext_ver->name != NULL; ++ext_ver) - if (strcmp (ext, ext_ver->name) == 0) - return true; - return false; + auto itr = riscv_ext_infos.find (ext); + return itr != riscv_ext_infos.end (); } /* Add new subset to list. */ @@ -916,24 +673,19 @@ get_default_version (const char *ext, unsigned int *major_version, unsigned int *minor_version) { - const riscv_ext_version *ext_ver; - for (ext_ver = &riscv_ext_version_table[0]; - ext_ver->name != NULL; - ++ext_ver) - if (strcmp (ext, ext_ver->name) == 0) - { - if ((ext_ver->isa_spec_class == riscv_isa_spec) || - (ext_ver->isa_spec_class == ISA_SPEC_CLASS_NONE)) - { - *major_version = ext_ver->major_version; - *minor_version = ext_ver->minor_version; - return; - } - } + auto itr = riscv_ext_infos.find (ext); + if (itr == riscv_ext_infos.end ()) + { + /* Not found version info. */ + *major_version = 0; + *minor_version = 0; + return; + } - /* Not found version info. */ - *major_version = 0; - *minor_version = 0; + riscv_version_t ver = itr->second.default_version (); + /* Get the version info from riscv_ext_infos. */ + *major_version = ver.major_version; + *minor_version = ver.minor_version; } /* Add new subset to list, but using default version from ISA spec version. */ @@ -1337,25 +1089,8 @@ riscv_subset_list::parse_single_std_ext (const char *p, bool exact_single_p) void riscv_subset_list::handle_implied_ext (const char *ext) { - const riscv_implied_info_t *implied_info; - for (implied_info = &riscv_implied_info[0]; - implied_info->ext; - ++implied_info) - { - if (!implied_info->match (this, ext)) - continue; - - /* Skip if implied extension already present. */ - if (lookup (implied_info->implied_ext)) - continue; - - /* Version of implied extension will get from current ISA spec - version. */ - add (implied_info->implied_ext, true); - - /* Recursively add implied extension by implied_info->implied_ext. */ - handle_implied_ext (implied_info->implied_ext); - } + const riscv_ext_info_t &ext_info = get_riscv_ext_info (ext); + ext_info.apply_implied_ext (this); /* For RISC-V ISA version 2.2 or earlier version, zicsr and zifence is included in the base ISA. */ @@ -1376,14 +1111,13 @@ riscv_subset_list::check_implied_ext () riscv_subset_t *itr; for (itr = m_head; itr != NULL; itr = itr->next) { - const riscv_implied_info_t *implied_info; - for (implied_info = &riscv_implied_info[0]; implied_info->ext; - ++implied_info) + auto &ext = *itr; + auto &ext_info = get_riscv_ext_info (ext.name); + for (auto &implied_ext : ext_info.implied_exts ()) { - if (!implied_info->match (this, itr)) + if (!implied_ext.match (this)) continue; - - if (!lookup (implied_info->implied_ext)) + if (lookup (implied_ext.implied_ext) == NULL) return false; } } @@ -1394,27 +1128,23 @@ riscv_subset_list::check_implied_ext () void riscv_subset_list::handle_combine_ext () { - const riscv_ext_version *combine_info; - const riscv_implied_info_t *implied_info; - bool is_combined = false; - - for (combine_info = &riscv_combine_info[0]; combine_info->name; - ++combine_info) + for (const auto &[ext_name, ext_info] : riscv_ext_infos) { - /* Skip if combine extensions are present */ - if (lookup (combine_info->name)) + bool is_combined = true; + /* Skip if this extension don't need to combine. */ + if (!ext_info.need_combine_p ()) + continue; + /* Skip if combine extensions are present. */ + if (lookup (ext_name.c_str ())) continue; - /* Find all extensions of the combine extension */ - for (implied_info = &riscv_implied_info[0]; implied_info->ext; - ++implied_info) + /* Check all implied extensions is present. */ + for (const auto &implied_ext : ext_info.implied_exts ()) { - if (!implied_info->match (this, combine_info->name)) + if (!implied_ext.match (this)) continue; - if (lookup (implied_info->implied_ext)) - is_combined = true; - else + if (!lookup (implied_ext.implied_ext)) { is_combined = false; break; @@ -1424,11 +1154,9 @@ riscv_subset_list::handle_combine_ext () /* Add combine extensions */ if (is_combined) { - if (lookup (combine_info->name) == NULL) - { - add (combine_info->name, combine_info->major_version, - combine_info->minor_version, false, true); - } + riscv_version_t ver = ext_info.default_version(); + add (ext_name.c_str (), ver.major_version, + ver.minor_version, false, true); } } } @@ -1439,6 +1167,34 @@ riscv_subset_list::check_conflict_ext () if (lookup ("zcf") && m_xlen == 64) error_at (m_loc, "%<-march=%s%>: zcf extension supports in rv32 only", m_arch); + + if (lookup ("zilsd") && m_xlen == 64) + error_at (m_loc, "%<-march=%s%>: zilsd extension supports in rv32 only", + m_arch); + + if (lookup ("zclsd") && m_xlen == 64) + error_at (m_loc, "%<-march=%s%>: zclsd extension supports in rv32 only", + m_arch); + + if (lookup ("ssnpm") && m_xlen == 32) + error_at (m_loc, "%<-march=%s%>: ssnpm extension supports in rv64 only", + m_arch); + + if (lookup ("smnpm") && m_xlen == 32) + error_at (m_loc, "%<-march=%s%>: smnpm extension supports in rv64 only", + m_arch); + + if (lookup ("smmpm") && m_xlen == 32) + error_at (m_loc, "%<-march=%s%>: smmpm extension supports in rv64 only", + m_arch); + + if (lookup ("sspm") && m_xlen == 32) + error_at (m_loc, "%<-march=%s%>: sspm extension supports in rv64 only", + m_arch); + + if (lookup ("supm") && m_xlen == 32) + error_at (m_loc, "%<-march=%s%>: supm extension supports in rv64 only", + m_arch); if (lookup ("zfinx") && lookup ("f")) error_at (m_loc, @@ -1715,90 +1471,15 @@ riscv_arch_str (bool version_p) return std::string(); } -/* Type for pointer to member of gcc_options and cl_target_option. */ -typedef int (gcc_options::*opt_var_ref_t); -typedef int (cl_target_option::*cl_opt_var_ref_t); - -/* Types for recording extension to internal flag. */ -struct riscv_ext_flag_table_t { - const char *ext; - opt_var_ref_t var_ref; - cl_opt_var_ref_t cl_var_ref; - int mask; -}; - #define RISCV_EXT_FLAG_ENTRY(NAME, VAR, MASK) \ {NAME, &gcc_options::VAR, &cl_target_option::VAR, MASK} -/* Mapping table between extension to internal flag. */ -static const riscv_ext_flag_table_t riscv_ext_flag_table[] = -{ - RISCV_EXT_FLAG_ENTRY ("e", x_target_flags, MASK_RVE), - RISCV_EXT_FLAG_ENTRY ("m", x_target_flags, MASK_MUL), - RISCV_EXT_FLAG_ENTRY ("a", x_target_flags, MASK_ATOMIC), - RISCV_EXT_FLAG_ENTRY ("f", x_target_flags, MASK_HARD_FLOAT), - RISCV_EXT_FLAG_ENTRY ("d", x_target_flags, MASK_DOUBLE_FLOAT), - RISCV_EXT_FLAG_ENTRY ("c", x_target_flags, MASK_RVC), - RISCV_EXT_FLAG_ENTRY ("v", x_target_flags, MASK_FULL_V), - RISCV_EXT_FLAG_ENTRY ("v", x_target_flags, MASK_VECTOR), - - RISCV_EXT_FLAG_ENTRY ("zicsr", x_riscv_zi_subext, MASK_ZICSR), - RISCV_EXT_FLAG_ENTRY ("zifencei", x_riscv_zi_subext, MASK_ZIFENCEI), - RISCV_EXT_FLAG_ENTRY ("zicond", x_riscv_zi_subext, MASK_ZICOND), - - RISCV_EXT_FLAG_ENTRY ("za64rs", x_riscv_za_subext, MASK_ZA64RS), - RISCV_EXT_FLAG_ENTRY ("za128rs", x_riscv_za_subext, MASK_ZA128RS), - RISCV_EXT_FLAG_ENTRY ("zawrs", x_riscv_za_subext, MASK_ZAWRS), - RISCV_EXT_FLAG_ENTRY ("zaamo", x_riscv_za_subext, MASK_ZAAMO), - RISCV_EXT_FLAG_ENTRY ("zalrsc", x_riscv_za_subext, MASK_ZALRSC), - RISCV_EXT_FLAG_ENTRY ("zabha", x_riscv_za_subext, MASK_ZABHA), - RISCV_EXT_FLAG_ENTRY ("zacas", x_riscv_za_subext, MASK_ZACAS), - RISCV_EXT_FLAG_ENTRY ("zama16b", x_riscv_za_subext, MASK_ZAMA16B), - - RISCV_EXT_FLAG_ENTRY ("zba", x_riscv_zb_subext, MASK_ZBA), - RISCV_EXT_FLAG_ENTRY ("zbb", x_riscv_zb_subext, MASK_ZBB), - RISCV_EXT_FLAG_ENTRY ("zbc", x_riscv_zb_subext, MASK_ZBC), - RISCV_EXT_FLAG_ENTRY ("zbs", x_riscv_zb_subext, MASK_ZBS), - - RISCV_EXT_FLAG_ENTRY ("zfinx", x_riscv_zinx_subext, MASK_ZFINX), - RISCV_EXT_FLAG_ENTRY ("zdinx", x_riscv_zinx_subext, MASK_ZDINX), - RISCV_EXT_FLAG_ENTRY ("zhinx", x_riscv_zinx_subext, MASK_ZHINX), - RISCV_EXT_FLAG_ENTRY ("zhinxmin", x_riscv_zinx_subext, MASK_ZHINXMIN), - - RISCV_EXT_FLAG_ENTRY ("zbkb", x_riscv_zk_subext, MASK_ZBKB), - RISCV_EXT_FLAG_ENTRY ("zbkc", x_riscv_zk_subext, MASK_ZBKC), - RISCV_EXT_FLAG_ENTRY ("zbkx", x_riscv_zk_subext, MASK_ZBKX), - RISCV_EXT_FLAG_ENTRY ("zknd", x_riscv_zk_subext, MASK_ZKND), - RISCV_EXT_FLAG_ENTRY ("zkne", x_riscv_zk_subext, MASK_ZKNE), - RISCV_EXT_FLAG_ENTRY ("zknh", x_riscv_zk_subext, MASK_ZKNH), - RISCV_EXT_FLAG_ENTRY ("zkr", x_riscv_zk_subext, MASK_ZKR), - RISCV_EXT_FLAG_ENTRY ("zksed", x_riscv_zk_subext, MASK_ZKSED), - RISCV_EXT_FLAG_ENTRY ("zksh", x_riscv_zk_subext, MASK_ZKSH), - RISCV_EXT_FLAG_ENTRY ("zkt", x_riscv_zk_subext, MASK_ZKT), - - RISCV_EXT_FLAG_ENTRY ("zihintntl", x_riscv_zi_subext, MASK_ZIHINTNTL), - RISCV_EXT_FLAG_ENTRY ("zihintpause", x_riscv_zi_subext, MASK_ZIHINTPAUSE), - RISCV_EXT_FLAG_ENTRY ("ziccamoa", x_riscv_zi_subext, MASK_ZICCAMOA), - RISCV_EXT_FLAG_ENTRY ("ziccif", x_riscv_zi_subext, MASK_ZICCIF), - RISCV_EXT_FLAG_ENTRY ("zicclsm", x_riscv_zi_subext, MASK_ZICCLSM), - RISCV_EXT_FLAG_ENTRY ("ziccrse", x_riscv_zi_subext, MASK_ZICCRSE), - - RISCV_EXT_FLAG_ENTRY ("zicboz", x_riscv_zicmo_subext, MASK_ZICBOZ), - RISCV_EXT_FLAG_ENTRY ("zicbom", x_riscv_zicmo_subext, MASK_ZICBOM), - RISCV_EXT_FLAG_ENTRY ("zicbop", x_riscv_zicmo_subext, MASK_ZICBOP), - RISCV_EXT_FLAG_ENTRY ("zic64b", x_riscv_zicmo_subext, MASK_ZIC64B), - - RISCV_EXT_FLAG_ENTRY ("zicfiss", x_riscv_zi_subext, MASK_ZICFISS), - RISCV_EXT_FLAG_ENTRY ("zicfilp", x_riscv_zi_subext, MASK_ZICFILP), - - RISCV_EXT_FLAG_ENTRY ("zimop", x_riscv_mop_subext, MASK_ZIMOP), - RISCV_EXT_FLAG_ENTRY ("zcmop", x_riscv_mop_subext, MASK_ZCMOP), - - RISCV_EXT_FLAG_ENTRY ("zve32x", x_target_flags, MASK_VECTOR), - RISCV_EXT_FLAG_ENTRY ("zve32f", x_target_flags, MASK_VECTOR), - RISCV_EXT_FLAG_ENTRY ("zve64x", x_target_flags, MASK_VECTOR), - RISCV_EXT_FLAG_ENTRY ("zve64f", x_target_flags, MASK_VECTOR), - RISCV_EXT_FLAG_ENTRY ("zve64d", x_target_flags, MASK_VECTOR), +/* Mapping table between extension to internal flag, + this table is not needed to add manually unless there is speical rule. */ +static const riscv_extra_ext_flag_table_t riscv_extra_ext_flag_table[] = +{ + RISCV_EXT_FLAG_ENTRY ("zve32x", x_riscv_isa_flags, MASK_VECTOR), + RISCV_EXT_FLAG_ENTRY ("v", x_riscv_isa_flags, MASK_FULL_V), /* We don't need to put complete ELEN/ELEN_FP info here, due to the implication relation of vector extension. @@ -1815,108 +1496,40 @@ static const riscv_ext_flag_table_t riscv_ext_flag_table[] = RISCV_EXT_FLAG_ENTRY ("zvfhmin", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_FP_16), RISCV_EXT_FLAG_ENTRY ("zvfh", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_FP_16), - RISCV_EXT_FLAG_ENTRY ("zvbb", x_riscv_zvb_subext, MASK_ZVBB), - RISCV_EXT_FLAG_ENTRY ("zvbc", x_riscv_zvb_subext, MASK_ZVBC), - RISCV_EXT_FLAG_ENTRY ("zvkb", x_riscv_zvb_subext, MASK_ZVKB), - RISCV_EXT_FLAG_ENTRY ("zvkg", x_riscv_zvk_subext, MASK_ZVKG), - RISCV_EXT_FLAG_ENTRY ("zvkned", x_riscv_zvk_subext, MASK_ZVKNED), - RISCV_EXT_FLAG_ENTRY ("zvknha", x_riscv_zvk_subext, MASK_ZVKNHA), - RISCV_EXT_FLAG_ENTRY ("zvknhb", x_riscv_zvk_subext, MASK_ZVKNHB), - RISCV_EXT_FLAG_ENTRY ("zvksed", x_riscv_zvk_subext, MASK_ZVKSED), - RISCV_EXT_FLAG_ENTRY ("zvksh", x_riscv_zvk_subext, MASK_ZVKSH), - RISCV_EXT_FLAG_ENTRY ("zvkn", x_riscv_zvk_subext, MASK_ZVKN), - RISCV_EXT_FLAG_ENTRY ("zvknc", x_riscv_zvk_subext, MASK_ZVKNC), - RISCV_EXT_FLAG_ENTRY ("zvkng", x_riscv_zvk_subext, MASK_ZVKNG), - RISCV_EXT_FLAG_ENTRY ("zvks", x_riscv_zvk_subext, MASK_ZVKS), - RISCV_EXT_FLAG_ENTRY ("zvksc", x_riscv_zvk_subext, MASK_ZVKSC), - RISCV_EXT_FLAG_ENTRY ("zvksg", x_riscv_zvk_subext, MASK_ZVKSG), - RISCV_EXT_FLAG_ENTRY ("zvkt", x_riscv_zvk_subext, MASK_ZVKT), - - RISCV_EXT_FLAG_ENTRY ("zvl32b", x_riscv_zvl_flags, MASK_ZVL32B), - RISCV_EXT_FLAG_ENTRY ("zvl64b", x_riscv_zvl_flags, MASK_ZVL64B), - RISCV_EXT_FLAG_ENTRY ("zvl128b", x_riscv_zvl_flags, MASK_ZVL128B), - RISCV_EXT_FLAG_ENTRY ("zvl256b", x_riscv_zvl_flags, MASK_ZVL256B), - RISCV_EXT_FLAG_ENTRY ("zvl512b", x_riscv_zvl_flags, MASK_ZVL512B), - RISCV_EXT_FLAG_ENTRY ("zvl1024b", x_riscv_zvl_flags, MASK_ZVL1024B), - RISCV_EXT_FLAG_ENTRY ("zvl2048b", x_riscv_zvl_flags, MASK_ZVL2048B), - RISCV_EXT_FLAG_ENTRY ("zvl4096b", x_riscv_zvl_flags, MASK_ZVL4096B), - RISCV_EXT_FLAG_ENTRY ("zvl8192b", x_riscv_zvl_flags, MASK_ZVL8192B), - RISCV_EXT_FLAG_ENTRY ("zvl16384b", x_riscv_zvl_flags, MASK_ZVL16384B), - RISCV_EXT_FLAG_ENTRY ("zvl32768b", x_riscv_zvl_flags, MASK_ZVL32768B), - RISCV_EXT_FLAG_ENTRY ("zvl65536b", x_riscv_zvl_flags, MASK_ZVL65536B), - - RISCV_EXT_FLAG_ENTRY ("zfbfmin", x_riscv_zf_subext, MASK_ZFBFMIN), - RISCV_EXT_FLAG_ENTRY ("zfhmin", x_riscv_zf_subext, MASK_ZFHMIN), - RISCV_EXT_FLAG_ENTRY ("zfh", x_riscv_zf_subext, MASK_ZFH), - RISCV_EXT_FLAG_ENTRY ("zvfbfmin", x_riscv_zf_subext, MASK_ZVFBFMIN), - RISCV_EXT_FLAG_ENTRY ("zvfbfwma", x_riscv_zf_subext, MASK_ZVFBFWMA), - RISCV_EXT_FLAG_ENTRY ("zvfhmin", x_riscv_zf_subext, MASK_ZVFHMIN), - RISCV_EXT_FLAG_ENTRY ("zvfh", x_riscv_zf_subext, MASK_ZVFH), - - RISCV_EXT_FLAG_ENTRY ("zfa", x_riscv_zfa_subext, MASK_ZFA), - - RISCV_EXT_FLAG_ENTRY ("zmmul", x_riscv_zm_subext, MASK_ZMMUL), - - /* Code-size reduction extensions. */ - RISCV_EXT_FLAG_ENTRY ("zca", x_riscv_zc_subext, MASK_ZCA), - RISCV_EXT_FLAG_ENTRY ("zcb", x_riscv_zc_subext, MASK_ZCB), - RISCV_EXT_FLAG_ENTRY ("zce", x_riscv_zc_subext, MASK_ZCE), - RISCV_EXT_FLAG_ENTRY ("zcf", x_riscv_zc_subext, MASK_ZCF), - RISCV_EXT_FLAG_ENTRY ("zcd", x_riscv_zc_subext, MASK_ZCD), - RISCV_EXT_FLAG_ENTRY ("zcmp", x_riscv_zc_subext, MASK_ZCMP), - RISCV_EXT_FLAG_ENTRY ("zcmt", x_riscv_zc_subext, MASK_ZCMT), - - RISCV_EXT_FLAG_ENTRY ("svade", x_riscv_sv_subext, MASK_SVADE), - RISCV_EXT_FLAG_ENTRY ("svadu", x_riscv_sv_subext, MASK_SVADU), - RISCV_EXT_FLAG_ENTRY ("svinval", x_riscv_sv_subext, MASK_SVINVAL), - RISCV_EXT_FLAG_ENTRY ("svnapot", x_riscv_sv_subext, MASK_SVNAPOT), - RISCV_EXT_FLAG_ENTRY ("svvptc", x_riscv_sv_subext, MASK_SVVPTC), - - RISCV_EXT_FLAG_ENTRY ("ztso", x_riscv_ztso_subext, MASK_ZTSO), - - RISCV_EXT_FLAG_ENTRY ("xcvmac", x_riscv_xcv_subext, MASK_XCVMAC), - RISCV_EXT_FLAG_ENTRY ("xcvalu", x_riscv_xcv_subext, MASK_XCVALU), - RISCV_EXT_FLAG_ENTRY ("xcvelw", x_riscv_xcv_subext, MASK_XCVELW), - RISCV_EXT_FLAG_ENTRY ("xcvsimd", x_riscv_xcv_subext, MASK_XCVSIMD), - RISCV_EXT_FLAG_ENTRY ("xcvbi", x_riscv_xcv_subext, MASK_XCVBI), - - RISCV_EXT_FLAG_ENTRY ("xtheadba", x_riscv_xthead_subext, MASK_XTHEADBA), - RISCV_EXT_FLAG_ENTRY ("xtheadbb", x_riscv_xthead_subext, MASK_XTHEADBB), - RISCV_EXT_FLAG_ENTRY ("xtheadbs", x_riscv_xthead_subext, MASK_XTHEADBS), - RISCV_EXT_FLAG_ENTRY ("xtheadcmo", x_riscv_xthead_subext, MASK_XTHEADCMO), - RISCV_EXT_FLAG_ENTRY ("xtheadcondmov", x_riscv_xthead_subext, MASK_XTHEADCONDMOV), - RISCV_EXT_FLAG_ENTRY ("xtheadfmemidx", x_riscv_xthead_subext, MASK_XTHEADFMEMIDX), - RISCV_EXT_FLAG_ENTRY ("xtheadfmv", x_riscv_xthead_subext, MASK_XTHEADFMV), - RISCV_EXT_FLAG_ENTRY ("xtheadint", x_riscv_xthead_subext, MASK_XTHEADINT), - RISCV_EXT_FLAG_ENTRY ("xtheadmac", x_riscv_xthead_subext, MASK_XTHEADMAC), - RISCV_EXT_FLAG_ENTRY ("xtheadmemidx", x_riscv_xthead_subext, MASK_XTHEADMEMIDX), - RISCV_EXT_FLAG_ENTRY ("xtheadmempair", x_riscv_xthead_subext, MASK_XTHEADMEMPAIR), - RISCV_EXT_FLAG_ENTRY ("xtheadsync", x_riscv_xthead_subext, MASK_XTHEADSYNC), - RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_xthead_subext, MASK_XTHEADVECTOR), RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_32), RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_64), RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_FP_32), RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_FP_64), RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_vector_elen_flags, MASK_VECTOR_ELEN_FP_16), - RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_flags, MASK_ZVL32B), - RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_flags, MASK_ZVL64B), - RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_flags, MASK_ZVL128B), - RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zf_subext, MASK_ZVFHMIN), - RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zf_subext, MASK_ZVFH), - RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_target_flags, MASK_FULL_V), - RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_target_flags, MASK_VECTOR), - - RISCV_EXT_FLAG_ENTRY ("xventanacondops", x_riscv_xventana_subext, MASK_XVENTANACONDOPS), - - RISCV_EXT_FLAG_ENTRY ("xsfvcp", x_riscv_sifive_subext, MASK_XSFVCP), - RISCV_EXT_FLAG_ENTRY ("xsfcease", x_riscv_sifive_subext, MASK_XSFCEASE), - RISCV_EXT_FLAG_ENTRY ("xsfvqmaccqoq", x_riscv_sifive_subext, MASK_XSFVQMACCQOQ), - RISCV_EXT_FLAG_ENTRY ("xsfvqmaccdod", x_riscv_sifive_subext, MASK_XSFVQMACCDOD), - RISCV_EXT_FLAG_ENTRY ("xsfvfnrclipxfqf", x_riscv_sifive_subext, MASK_XSFVFNRCLIPXFQF), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_subext, MASK_ZVL32B), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_subext, MASK_ZVL64B), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvl_subext, MASK_ZVL128B), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvf_subext, MASK_ZVFHMIN), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_zvf_subext, MASK_ZVFH), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_isa_flags, MASK_FULL_V), + RISCV_EXT_FLAG_ENTRY ("xtheadvector", x_riscv_isa_flags, MASK_VECTOR), {NULL, NULL, NULL, 0} }; +/* Add extra extension flags into FLAG_TABLE for EXT. */ +static void +apply_extra_extension_flags (const char *ext, + std::vector<riscv_ext_flag_table_t> &flag_table) +{ + const riscv_extra_ext_flag_table_t *arch_ext_flag_tab; + for (arch_ext_flag_tab = &riscv_extra_ext_flag_table[0]; + arch_ext_flag_tab->ext; ++arch_ext_flag_tab) + { + if (strcmp (arch_ext_flag_tab->ext, ext) == 0) + { + flag_table.push_back ({arch_ext_flag_tab->var_ref, + arch_ext_flag_tab->cl_var_ref, + arch_ext_flag_tab->mask}); + } + } +} + /* Types for recording extension to RISC-V C-API bitmask. */ struct riscv_ext_bitmask_table_t { const char *ext; @@ -1943,24 +1556,21 @@ riscv_set_arch_by_subset_list (riscv_subset_list *subset_list, { if (opts) { - const riscv_ext_flag_table_t *arch_ext_flag_tab; /* Clean up target flags before we set. */ - for (arch_ext_flag_tab = &riscv_ext_flag_table[0]; arch_ext_flag_tab->ext; - ++arch_ext_flag_tab) - opts->*arch_ext_flag_tab->var_ref &= ~arch_ext_flag_tab->mask; + for (const auto &[ext_name, ext_info] : riscv_ext_infos) + ext_info.clean_opts (opts); if (subset_list->xlen () == 32) - opts->x_target_flags &= ~MASK_64BIT; + opts->x_riscv_isa_flags &= ~MASK_64BIT; else if (subset_list->xlen () == 64) - opts->x_target_flags |= MASK_64BIT; + opts->x_riscv_isa_flags |= MASK_64BIT; - for (arch_ext_flag_tab = &riscv_ext_flag_table[0]; - arch_ext_flag_tab->ext; - ++arch_ext_flag_tab) - { - if (subset_list->lookup (arch_ext_flag_tab->ext)) - opts->*arch_ext_flag_tab->var_ref |= arch_ext_flag_tab->mask; - } + for (const auto &[ext_name, ext_info] : riscv_ext_infos) + if (subset_list->lookup (ext_name.c_str ())) + { + /* Set the extension flag. */ + ext_info.set_opts (opts); + } } } @@ -1970,37 +1580,14 @@ bool riscv_ext_is_subset (struct cl_target_option *opts, struct cl_target_option *subset) { - const riscv_ext_flag_table_t *arch_ext_flag_tab; - for (arch_ext_flag_tab = &riscv_ext_flag_table[0]; - arch_ext_flag_tab->ext; - ++arch_ext_flag_tab) + for (const auto &[ext_name, ext_info] : riscv_ext_infos) { - if (subset->*arch_ext_flag_tab->cl_var_ref & arch_ext_flag_tab->mask) - { - if (!(opts->*arch_ext_flag_tab->cl_var_ref & arch_ext_flag_tab->mask)) - return false; - } + if (ext_info.check_opts (opts) && !ext_info.check_opts (subset)) + return false; } return true; } -/* Return the mask of ISA extension in x_target_flags of gcc_options. */ - -int -riscv_x_target_flags_isa_mask (void) -{ - int mask = 0; - const riscv_ext_flag_table_t *arch_ext_flag_tab; - for (arch_ext_flag_tab = &riscv_ext_flag_table[0]; - arch_ext_flag_tab->ext; - ++arch_ext_flag_tab) - { - if (arch_ext_flag_tab->var_ref == &gcc_options::x_target_flags) - mask |= arch_ext_flag_tab->mask; - } - return mask; -} - /* Get the minimal feature bits in Linux hwprobe of the given ISA string. Used for generating Function Multi-Versioning (FMV) dispatcher for RISC-V. @@ -2055,20 +1642,18 @@ riscv_minimal_hwprobe_feature_bits (const char *isa, search_q.pop (); /* Iterate through the implied extension table. */ - const riscv_implied_info_t *implied_info; - for (implied_info = &riscv_implied_info[0]; - implied_info->ext; - ++implied_info) + auto &ext_info = get_riscv_ext_info (search_ext); + for (const auto &implied_ext : ext_info.implied_exts ()) { /* When the search extension matches the implied extension and the implied extension has not been visited, mark the implied extension in the implied_exts set and push it into the queue. */ - if (implied_info->match (subset_list, search_ext) - && implied_exts.count (implied_info->implied_ext) == 0) + if (implied_ext.match (subset_list) + && implied_exts.count (implied_ext.implied_ext) == 0) { - implied_exts.insert (implied_info->implied_ext); - search_q.push (implied_info->implied_ext); + implied_exts.insert (implied_ext.implied_ext); + search_q.push (implied_ext.implied_ext); } } } @@ -2622,16 +2207,15 @@ riscv_arch_help (int, const char **) } }; std::map<std::string, std::set<unsigned>, extension_comparator> all_exts; - for (const riscv_ext_version &ext : riscv_ext_version_table) + for (const auto &[ext_name, ext_info] : riscv_ext_infos) { - if (!ext.name) - break; - if (ext.name[0] == 'g') - continue; - unsigned version_value = (ext.major_version * RISCV_MAJOR_VERSION_BASE) - + (ext.minor_version - * RISCV_MINOR_VERSION_BASE); - all_exts[ext.name].insert(version_value); + for (auto &supported_version : ext_info.supported_versions ()) + { + unsigned version_value + = (supported_version.major_version * RISCV_MAJOR_VERSION_BASE) + + (supported_version.minor_version * RISCV_MINOR_VERSION_BASE); + all_exts[ext_name].insert (version_value); + } } printf("All available -march extensions for RISC-V:\n"); diff --git a/gcc/config.gcc b/gcc/config.gcc index afbf82f..e552f469 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -558,6 +558,7 @@ riscv*) extra_headers="riscv_vector.h riscv_crypto.h riscv_bitmanip.h riscv_th_vector.h sifive_vector.h" target_gtfiles="$target_gtfiles \$(srcdir)/config/riscv/riscv-vector-builtins.cc" target_gtfiles="$target_gtfiles \$(srcdir)/config/riscv/riscv-vector-builtins.h" + extra_options="${extra_options} riscv/riscv-ext.opt" ;; rs6000*-*-*) extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt" @@ -4459,7 +4460,7 @@ case "${target}" in case "$with_abi" in "" \ - | apcs-gnu | atpcs | aapcs | iwmmxt | aapcs-linux ) + | apcs-gnu | atpcs | aapcs | aapcs-linux ) #OK ;; *) @@ -5658,6 +5659,7 @@ case "${target}" in #TODO 'sm_[...]' list per 'nvptx-sm.def'. sm_30 | sm_35 | sm_37 \ | sm_52 | sm_53 \ + | sm_61 \ | sm_70 | sm_75 \ | sm_80 | sm_89 ) TM_MULTILIB_CONFIG="$TM_MULTILIB_CONFIG $nvptx_multilib" diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 5c30484..6dbc9fa 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -4555,38 +4555,6 @@ [(set_attr "type" "csel")] ) -(define_expand "cmov<mode>6" - [(set (match_operand:GPI 0 "register_operand") - (if_then_else:GPI - (match_operator 1 "aarch64_comparison_operator" - [(match_operand:GPI 2 "register_operand") - (match_operand:GPI 3 "aarch64_plus_operand")]) - (match_operand:GPI 4 "register_operand") - (match_operand:GPI 5 "register_operand")))] - "" - " - operands[2] = aarch64_gen_compare_reg (GET_CODE (operands[1]), operands[2], - operands[3]); - operands[3] = const0_rtx; - " -) - -(define_expand "cmov<mode>6" - [(set (match_operand:GPF 0 "register_operand") - (if_then_else:GPF - (match_operator 1 "aarch64_comparison_operator" - [(match_operand:GPF 2 "register_operand") - (match_operand:GPF 3 "aarch64_fp_compare_operand")]) - (match_operand:GPF 4 "register_operand") - (match_operand:GPF 5 "register_operand")))] - "" - " - operands[2] = aarch64_gen_compare_reg (GET_CODE (operands[1]), operands[2], - operands[3]); - operands[3] = const0_rtx; - " -) - (define_insn "*cmov<mode>_insn" [(set (match_operand:ALLI 0 "register_operand") (if_then_else:ALLI diff --git a/gcc/config/arm/aout.h b/gcc/config/arm/aout.h index cdce361..a9b0dfa 100644 --- a/gcc/config/arm/aout.h +++ b/gcc/config/arm/aout.h @@ -69,11 +69,6 @@ "d20", "?20", "d21", "?21", "d22", "?22", "d23", "?23", \ "d24", "?24", "d25", "?25", "d26", "?26", "d27", "?27", \ "d28", "?28", "d29", "?29", "d30", "?30", "d31", "?31", \ - "wr0", "wr1", "wr2", "wr3", \ - "wr4", "wr5", "wr6", "wr7", \ - "wr8", "wr9", "wr10", "wr11", \ - "wr12", "wr13", "wr14", "wr15", \ - "wcgr0", "wcgr1", "wcgr2", "wcgr3", \ "cc", "vfpcc", "sfp", "afp", "apsrq", "apsrge", "p0", \ "ra_auth_code" \ } diff --git a/gcc/config/arm/arm-builtins.cc b/gcc/config/arm/arm-builtins.cc index c56ab5d..0ddc666 100644 --- a/gcc/config/arm/arm-builtins.cc +++ b/gcc/config/arm/arm-builtins.cc @@ -816,252 +816,6 @@ static arm_builtin_cde_datum cde_builtin_data[] = enum arm_builtins { - ARM_BUILTIN_GETWCGR0, - ARM_BUILTIN_GETWCGR1, - ARM_BUILTIN_GETWCGR2, - ARM_BUILTIN_GETWCGR3, - - ARM_BUILTIN_SETWCGR0, - ARM_BUILTIN_SETWCGR1, - ARM_BUILTIN_SETWCGR2, - ARM_BUILTIN_SETWCGR3, - - ARM_BUILTIN_WZERO, - - ARM_BUILTIN_WAVG2BR, - ARM_BUILTIN_WAVG2HR, - ARM_BUILTIN_WAVG2B, - ARM_BUILTIN_WAVG2H, - - ARM_BUILTIN_WACCB, - ARM_BUILTIN_WACCH, - ARM_BUILTIN_WACCW, - - ARM_BUILTIN_WMACS, - ARM_BUILTIN_WMACSZ, - ARM_BUILTIN_WMACU, - ARM_BUILTIN_WMACUZ, - - ARM_BUILTIN_WSADB, - ARM_BUILTIN_WSADBZ, - ARM_BUILTIN_WSADH, - ARM_BUILTIN_WSADHZ, - - ARM_BUILTIN_WALIGNI, - ARM_BUILTIN_WALIGNR0, - ARM_BUILTIN_WALIGNR1, - ARM_BUILTIN_WALIGNR2, - ARM_BUILTIN_WALIGNR3, - - ARM_BUILTIN_TMIA, - ARM_BUILTIN_TMIAPH, - ARM_BUILTIN_TMIABB, - ARM_BUILTIN_TMIABT, - ARM_BUILTIN_TMIATB, - ARM_BUILTIN_TMIATT, - - ARM_BUILTIN_TMOVMSKB, - ARM_BUILTIN_TMOVMSKH, - ARM_BUILTIN_TMOVMSKW, - - ARM_BUILTIN_TBCSTB, - ARM_BUILTIN_TBCSTH, - ARM_BUILTIN_TBCSTW, - - ARM_BUILTIN_WMADDS, - ARM_BUILTIN_WMADDU, - - ARM_BUILTIN_WPACKHSS, - ARM_BUILTIN_WPACKWSS, - ARM_BUILTIN_WPACKDSS, - ARM_BUILTIN_WPACKHUS, - ARM_BUILTIN_WPACKWUS, - ARM_BUILTIN_WPACKDUS, - - ARM_BUILTIN_WADDB, - ARM_BUILTIN_WADDH, - ARM_BUILTIN_WADDW, - ARM_BUILTIN_WADDSSB, - ARM_BUILTIN_WADDSSH, - ARM_BUILTIN_WADDSSW, - ARM_BUILTIN_WADDUSB, - ARM_BUILTIN_WADDUSH, - ARM_BUILTIN_WADDUSW, - ARM_BUILTIN_WSUBB, - ARM_BUILTIN_WSUBH, - ARM_BUILTIN_WSUBW, - ARM_BUILTIN_WSUBSSB, - ARM_BUILTIN_WSUBSSH, - ARM_BUILTIN_WSUBSSW, - ARM_BUILTIN_WSUBUSB, - ARM_BUILTIN_WSUBUSH, - ARM_BUILTIN_WSUBUSW, - - ARM_BUILTIN_WAND, - ARM_BUILTIN_WANDN, - ARM_BUILTIN_WOR, - ARM_BUILTIN_WXOR, - - ARM_BUILTIN_WCMPEQB, - ARM_BUILTIN_WCMPEQH, - ARM_BUILTIN_WCMPEQW, - ARM_BUILTIN_WCMPGTUB, - ARM_BUILTIN_WCMPGTUH, - ARM_BUILTIN_WCMPGTUW, - ARM_BUILTIN_WCMPGTSB, - ARM_BUILTIN_WCMPGTSH, - ARM_BUILTIN_WCMPGTSW, - - ARM_BUILTIN_TEXTRMSB, - ARM_BUILTIN_TEXTRMSH, - ARM_BUILTIN_TEXTRMSW, - ARM_BUILTIN_TEXTRMUB, - ARM_BUILTIN_TEXTRMUH, - ARM_BUILTIN_TEXTRMUW, - ARM_BUILTIN_TINSRB, - ARM_BUILTIN_TINSRH, - ARM_BUILTIN_TINSRW, - - ARM_BUILTIN_WMAXSW, - ARM_BUILTIN_WMAXSH, - ARM_BUILTIN_WMAXSB, - ARM_BUILTIN_WMAXUW, - ARM_BUILTIN_WMAXUH, - ARM_BUILTIN_WMAXUB, - ARM_BUILTIN_WMINSW, - ARM_BUILTIN_WMINSH, - ARM_BUILTIN_WMINSB, - ARM_BUILTIN_WMINUW, - ARM_BUILTIN_WMINUH, - ARM_BUILTIN_WMINUB, - - ARM_BUILTIN_WMULUM, - ARM_BUILTIN_WMULSM, - ARM_BUILTIN_WMULUL, - - ARM_BUILTIN_PSADBH, - ARM_BUILTIN_WSHUFH, - - ARM_BUILTIN_WSLLH, - ARM_BUILTIN_WSLLW, - ARM_BUILTIN_WSLLD, - ARM_BUILTIN_WSRAH, - ARM_BUILTIN_WSRAW, - ARM_BUILTIN_WSRAD, - ARM_BUILTIN_WSRLH, - ARM_BUILTIN_WSRLW, - ARM_BUILTIN_WSRLD, - ARM_BUILTIN_WRORH, - ARM_BUILTIN_WRORW, - ARM_BUILTIN_WRORD, - ARM_BUILTIN_WSLLHI, - ARM_BUILTIN_WSLLWI, - ARM_BUILTIN_WSLLDI, - ARM_BUILTIN_WSRAHI, - ARM_BUILTIN_WSRAWI, - ARM_BUILTIN_WSRADI, - ARM_BUILTIN_WSRLHI, - ARM_BUILTIN_WSRLWI, - ARM_BUILTIN_WSRLDI, - ARM_BUILTIN_WRORHI, - ARM_BUILTIN_WRORWI, - ARM_BUILTIN_WRORDI, - - ARM_BUILTIN_WUNPCKIHB, - ARM_BUILTIN_WUNPCKIHH, - ARM_BUILTIN_WUNPCKIHW, - ARM_BUILTIN_WUNPCKILB, - ARM_BUILTIN_WUNPCKILH, - ARM_BUILTIN_WUNPCKILW, - - ARM_BUILTIN_WUNPCKEHSB, - ARM_BUILTIN_WUNPCKEHSH, - ARM_BUILTIN_WUNPCKEHSW, - ARM_BUILTIN_WUNPCKEHUB, - ARM_BUILTIN_WUNPCKEHUH, - ARM_BUILTIN_WUNPCKEHUW, - ARM_BUILTIN_WUNPCKELSB, - ARM_BUILTIN_WUNPCKELSH, - ARM_BUILTIN_WUNPCKELSW, - ARM_BUILTIN_WUNPCKELUB, - ARM_BUILTIN_WUNPCKELUH, - ARM_BUILTIN_WUNPCKELUW, - - ARM_BUILTIN_WABSB, - ARM_BUILTIN_WABSH, - ARM_BUILTIN_WABSW, - - ARM_BUILTIN_WADDSUBHX, - ARM_BUILTIN_WSUBADDHX, - - ARM_BUILTIN_WABSDIFFB, - ARM_BUILTIN_WABSDIFFH, - ARM_BUILTIN_WABSDIFFW, - - ARM_BUILTIN_WADDCH, - ARM_BUILTIN_WADDCW, - - ARM_BUILTIN_WAVG4, - ARM_BUILTIN_WAVG4R, - - ARM_BUILTIN_WMADDSX, - ARM_BUILTIN_WMADDUX, - - ARM_BUILTIN_WMADDSN, - ARM_BUILTIN_WMADDUN, - - ARM_BUILTIN_WMULWSM, - ARM_BUILTIN_WMULWUM, - - ARM_BUILTIN_WMULWSMR, - ARM_BUILTIN_WMULWUMR, - - ARM_BUILTIN_WMULWL, - - ARM_BUILTIN_WMULSMR, - ARM_BUILTIN_WMULUMR, - - ARM_BUILTIN_WQMULM, - ARM_BUILTIN_WQMULMR, - - ARM_BUILTIN_WQMULWM, - ARM_BUILTIN_WQMULWMR, - - ARM_BUILTIN_WADDBHUSM, - ARM_BUILTIN_WADDBHUSL, - - ARM_BUILTIN_WQMIABB, - ARM_BUILTIN_WQMIABT, - ARM_BUILTIN_WQMIATB, - ARM_BUILTIN_WQMIATT, - - ARM_BUILTIN_WQMIABBN, - ARM_BUILTIN_WQMIABTN, - ARM_BUILTIN_WQMIATBN, - ARM_BUILTIN_WQMIATTN, - - ARM_BUILTIN_WMIABB, - ARM_BUILTIN_WMIABT, - ARM_BUILTIN_WMIATB, - ARM_BUILTIN_WMIATT, - - ARM_BUILTIN_WMIABBN, - ARM_BUILTIN_WMIABTN, - ARM_BUILTIN_WMIATBN, - ARM_BUILTIN_WMIATTN, - - ARM_BUILTIN_WMIAWBB, - ARM_BUILTIN_WMIAWBT, - ARM_BUILTIN_WMIAWTB, - ARM_BUILTIN_WMIAWTT, - - ARM_BUILTIN_WMIAWBBN, - ARM_BUILTIN_WMIAWBTN, - ARM_BUILTIN_WMIAWTBN, - ARM_BUILTIN_WMIAWTTN, - - ARM_BUILTIN_WMERGE, - ARM_BUILTIN_GET_FPSCR, ARM_BUILTIN_SET_FPSCR, ARM_BUILTIN_GET_FPSCR_NZCVQC, @@ -1878,115 +1632,6 @@ struct builtin_description static const struct builtin_description bdesc_2arg[] = { -#define IWMMXT_BUILTIN(code, string, builtin) \ - { isa_bit_iwmmxt, CODE_FOR_##code, \ - "__builtin_arm_" string, \ - ARM_BUILTIN_##builtin, UNKNOWN, 0 }, - -#define IWMMXT2_BUILTIN(code, string, builtin) \ - { isa_bit_iwmmxt2, CODE_FOR_##code, \ - "__builtin_arm_" string, \ - ARM_BUILTIN_##builtin, UNKNOWN, 0 }, - - IWMMXT_BUILTIN (addv8qi3, "waddb", WADDB) - IWMMXT_BUILTIN (addv4hi3, "waddh", WADDH) - IWMMXT_BUILTIN (addv2si3, "waddw", WADDW) - IWMMXT_BUILTIN (subv8qi3, "wsubb", WSUBB) - IWMMXT_BUILTIN (subv4hi3, "wsubh", WSUBH) - IWMMXT_BUILTIN (subv2si3, "wsubw", WSUBW) - IWMMXT_BUILTIN (ssaddv8qi3, "waddbss", WADDSSB) - IWMMXT_BUILTIN (ssaddv4hi3, "waddhss", WADDSSH) - IWMMXT_BUILTIN (ssaddv2si3, "waddwss", WADDSSW) - IWMMXT_BUILTIN (sssubv8qi3, "wsubbss", WSUBSSB) - IWMMXT_BUILTIN (sssubv4hi3, "wsubhss", WSUBSSH) - IWMMXT_BUILTIN (sssubv2si3, "wsubwss", WSUBSSW) - IWMMXT_BUILTIN (usaddv8qi3, "waddbus", WADDUSB) - IWMMXT_BUILTIN (usaddv4hi3, "waddhus", WADDUSH) - IWMMXT_BUILTIN (usaddv2si3, "waddwus", WADDUSW) - IWMMXT_BUILTIN (ussubv8qi3, "wsubbus", WSUBUSB) - IWMMXT_BUILTIN (ussubv4hi3, "wsubhus", WSUBUSH) - IWMMXT_BUILTIN (ussubv2si3, "wsubwus", WSUBUSW) - IWMMXT_BUILTIN (mulv4hi3, "wmulul", WMULUL) - IWMMXT_BUILTIN (smulv4hi3_highpart, "wmulsm", WMULSM) - IWMMXT_BUILTIN (umulv4hi3_highpart, "wmulum", WMULUM) - IWMMXT_BUILTIN (eqv8qi3, "wcmpeqb", WCMPEQB) - IWMMXT_BUILTIN (eqv4hi3, "wcmpeqh", WCMPEQH) - IWMMXT_BUILTIN (eqv2si3, "wcmpeqw", WCMPEQW) - IWMMXT_BUILTIN (gtuv8qi3, "wcmpgtub", WCMPGTUB) - IWMMXT_BUILTIN (gtuv4hi3, "wcmpgtuh", WCMPGTUH) - IWMMXT_BUILTIN (gtuv2si3, "wcmpgtuw", WCMPGTUW) - IWMMXT_BUILTIN (gtv8qi3, "wcmpgtsb", WCMPGTSB) - IWMMXT_BUILTIN (gtv4hi3, "wcmpgtsh", WCMPGTSH) - IWMMXT_BUILTIN (gtv2si3, "wcmpgtsw", WCMPGTSW) - IWMMXT_BUILTIN (umaxv8qi3, "wmaxub", WMAXUB) - IWMMXT_BUILTIN (smaxv8qi3, "wmaxsb", WMAXSB) - IWMMXT_BUILTIN (umaxv4hi3, "wmaxuh", WMAXUH) - IWMMXT_BUILTIN (smaxv4hi3, "wmaxsh", WMAXSH) - IWMMXT_BUILTIN (umaxv2si3, "wmaxuw", WMAXUW) - IWMMXT_BUILTIN (smaxv2si3, "wmaxsw", WMAXSW) - IWMMXT_BUILTIN (uminv8qi3, "wminub", WMINUB) - IWMMXT_BUILTIN (sminv8qi3, "wminsb", WMINSB) - IWMMXT_BUILTIN (uminv4hi3, "wminuh", WMINUH) - IWMMXT_BUILTIN (sminv4hi3, "wminsh", WMINSH) - IWMMXT_BUILTIN (uminv2si3, "wminuw", WMINUW) - IWMMXT_BUILTIN (sminv2si3, "wminsw", WMINSW) - IWMMXT_BUILTIN (iwmmxt_anddi3, "wand", WAND) - IWMMXT_BUILTIN (iwmmxt_nanddi3, "wandn", WANDN) - IWMMXT_BUILTIN (iwmmxt_iordi3, "wor", WOR) - IWMMXT_BUILTIN (iwmmxt_xordi3, "wxor", WXOR) - IWMMXT_BUILTIN (iwmmxt_uavgv8qi3, "wavg2b", WAVG2B) - IWMMXT_BUILTIN (iwmmxt_uavgv4hi3, "wavg2h", WAVG2H) - IWMMXT_BUILTIN (iwmmxt_uavgrndv8qi3, "wavg2br", WAVG2BR) - IWMMXT_BUILTIN (iwmmxt_uavgrndv4hi3, "wavg2hr", WAVG2HR) - IWMMXT_BUILTIN (iwmmxt_wunpckilb, "wunpckilb", WUNPCKILB) - IWMMXT_BUILTIN (iwmmxt_wunpckilh, "wunpckilh", WUNPCKILH) - IWMMXT_BUILTIN (iwmmxt_wunpckilw, "wunpckilw", WUNPCKILW) - IWMMXT_BUILTIN (iwmmxt_wunpckihb, "wunpckihb", WUNPCKIHB) - IWMMXT_BUILTIN (iwmmxt_wunpckihh, "wunpckihh", WUNPCKIHH) - IWMMXT_BUILTIN (iwmmxt_wunpckihw, "wunpckihw", WUNPCKIHW) - IWMMXT2_BUILTIN (iwmmxt_waddsubhx, "waddsubhx", WADDSUBHX) - IWMMXT2_BUILTIN (iwmmxt_wsubaddhx, "wsubaddhx", WSUBADDHX) - IWMMXT2_BUILTIN (iwmmxt_wabsdiffb, "wabsdiffb", WABSDIFFB) - IWMMXT2_BUILTIN (iwmmxt_wabsdiffh, "wabsdiffh", WABSDIFFH) - IWMMXT2_BUILTIN (iwmmxt_wabsdiffw, "wabsdiffw", WABSDIFFW) - IWMMXT2_BUILTIN (iwmmxt_avg4, "wavg4", WAVG4) - IWMMXT2_BUILTIN (iwmmxt_avg4r, "wavg4r", WAVG4R) - IWMMXT2_BUILTIN (iwmmxt_wmulwsm, "wmulwsm", WMULWSM) - IWMMXT2_BUILTIN (iwmmxt_wmulwum, "wmulwum", WMULWUM) - IWMMXT2_BUILTIN (iwmmxt_wmulwsmr, "wmulwsmr", WMULWSMR) - IWMMXT2_BUILTIN (iwmmxt_wmulwumr, "wmulwumr", WMULWUMR) - IWMMXT2_BUILTIN (iwmmxt_wmulwl, "wmulwl", WMULWL) - IWMMXT2_BUILTIN (iwmmxt_wmulsmr, "wmulsmr", WMULSMR) - IWMMXT2_BUILTIN (iwmmxt_wmulumr, "wmulumr", WMULUMR) - IWMMXT2_BUILTIN (iwmmxt_wqmulm, "wqmulm", WQMULM) - IWMMXT2_BUILTIN (iwmmxt_wqmulmr, "wqmulmr", WQMULMR) - IWMMXT2_BUILTIN (iwmmxt_wqmulwm, "wqmulwm", WQMULWM) - IWMMXT2_BUILTIN (iwmmxt_wqmulwmr, "wqmulwmr", WQMULWMR) - IWMMXT_BUILTIN (iwmmxt_walignr0, "walignr0", WALIGNR0) - IWMMXT_BUILTIN (iwmmxt_walignr1, "walignr1", WALIGNR1) - IWMMXT_BUILTIN (iwmmxt_walignr2, "walignr2", WALIGNR2) - IWMMXT_BUILTIN (iwmmxt_walignr3, "walignr3", WALIGNR3) - -#define IWMMXT_BUILTIN2(code, builtin) \ - { isa_bit_iwmmxt, CODE_FOR_##code, NULL, \ - ARM_BUILTIN_##builtin, UNKNOWN, 0 }, - -#define IWMMXT2_BUILTIN2(code, builtin) \ - { isa_bit_iwmmxt2, CODE_FOR_##code, NULL, \ - ARM_BUILTIN_##builtin, UNKNOWN, 0 }, - - IWMMXT2_BUILTIN2 (iwmmxt_waddbhusm, WADDBHUSM) - IWMMXT2_BUILTIN2 (iwmmxt_waddbhusl, WADDBHUSL) - IWMMXT_BUILTIN2 (iwmmxt_wpackhss, WPACKHSS) - IWMMXT_BUILTIN2 (iwmmxt_wpackwss, WPACKWSS) - IWMMXT_BUILTIN2 (iwmmxt_wpackdss, WPACKDSS) - IWMMXT_BUILTIN2 (iwmmxt_wpackhus, WPACKHUS) - IWMMXT_BUILTIN2 (iwmmxt_wpackwus, WPACKWUS) - IWMMXT_BUILTIN2 (iwmmxt_wpackdus, WPACKDUS) - IWMMXT_BUILTIN2 (iwmmxt_wmacuz, WMACUZ) - IWMMXT_BUILTIN2 (iwmmxt_wmacsz, WMACSZ) - - #define FP_BUILTIN(L, U) \ {isa_nobit, CODE_FOR_##L, "__builtin_arm_"#L, ARM_BUILTIN_##U, \ UNKNOWN, 0}, @@ -2013,31 +1658,6 @@ static const struct builtin_description bdesc_2arg[] = static const struct builtin_description bdesc_1arg[] = { - IWMMXT_BUILTIN (iwmmxt_tmovmskb, "tmovmskb", TMOVMSKB) - IWMMXT_BUILTIN (iwmmxt_tmovmskh, "tmovmskh", TMOVMSKH) - IWMMXT_BUILTIN (iwmmxt_tmovmskw, "tmovmskw", TMOVMSKW) - IWMMXT_BUILTIN (iwmmxt_waccb, "waccb", WACCB) - IWMMXT_BUILTIN (iwmmxt_wacch, "wacch", WACCH) - IWMMXT_BUILTIN (iwmmxt_waccw, "waccw", WACCW) - IWMMXT_BUILTIN (iwmmxt_wunpckehub, "wunpckehub", WUNPCKEHUB) - IWMMXT_BUILTIN (iwmmxt_wunpckehuh, "wunpckehuh", WUNPCKEHUH) - IWMMXT_BUILTIN (iwmmxt_wunpckehuw, "wunpckehuw", WUNPCKEHUW) - IWMMXT_BUILTIN (iwmmxt_wunpckehsb, "wunpckehsb", WUNPCKEHSB) - IWMMXT_BUILTIN (iwmmxt_wunpckehsh, "wunpckehsh", WUNPCKEHSH) - IWMMXT_BUILTIN (iwmmxt_wunpckehsw, "wunpckehsw", WUNPCKEHSW) - IWMMXT_BUILTIN (iwmmxt_wunpckelub, "wunpckelub", WUNPCKELUB) - IWMMXT_BUILTIN (iwmmxt_wunpckeluh, "wunpckeluh", WUNPCKELUH) - IWMMXT_BUILTIN (iwmmxt_wunpckeluw, "wunpckeluw", WUNPCKELUW) - IWMMXT_BUILTIN (iwmmxt_wunpckelsb, "wunpckelsb", WUNPCKELSB) - IWMMXT_BUILTIN (iwmmxt_wunpckelsh, "wunpckelsh", WUNPCKELSH) - IWMMXT_BUILTIN (iwmmxt_wunpckelsw, "wunpckelsw", WUNPCKELSW) - IWMMXT2_BUILTIN (iwmmxt_wabsv8qi3, "wabsb", WABSB) - IWMMXT2_BUILTIN (iwmmxt_wabsv4hi3, "wabsh", WABSH) - IWMMXT2_BUILTIN (iwmmxt_wabsv2si3, "wabsw", WABSW) - IWMMXT_BUILTIN (tbcstv8qi, "tbcstb", TBCSTB) - IWMMXT_BUILTIN (tbcstv4hi, "tbcsth", TBCSTH) - IWMMXT_BUILTIN (tbcstv2si, "tbcstw", TBCSTW) - #define CRYPTO1(L, U, R, A) CRYPTO_BUILTIN (L, U) #define CRYPTO2(L, U, R, A1, A2) #define CRYPTO3(L, U, R, A1, A2, A3) @@ -2059,387 +1679,6 @@ static const struct builtin_description bdesc_3arg[] = }; #undef CRYPTO_BUILTIN -/* Set up all the iWMMXt builtins. This is not called if - TARGET_IWMMXT is zero. */ - -static void -arm_init_iwmmxt_builtins (void) -{ - const struct builtin_description * d; - size_t i; - - tree V2SI_type_node = build_vector_type_for_mode (intSI_type_node, V2SImode); - tree V4HI_type_node = build_vector_type_for_mode (intHI_type_node, V4HImode); - tree V8QI_type_node = build_vector_type_for_mode (intQI_type_node, V8QImode); - - tree v8qi_ftype_v8qi_v8qi_int - = build_function_type_list (V8QI_type_node, - V8QI_type_node, V8QI_type_node, - integer_type_node, NULL_TREE); - tree v4hi_ftype_v4hi_int - = build_function_type_list (V4HI_type_node, - V4HI_type_node, integer_type_node, NULL_TREE); - tree v2si_ftype_v2si_int - = build_function_type_list (V2SI_type_node, - V2SI_type_node, integer_type_node, NULL_TREE); - tree v2si_ftype_di_di - = build_function_type_list (V2SI_type_node, - long_long_integer_type_node, - long_long_integer_type_node, - NULL_TREE); - tree di_ftype_di_int - = build_function_type_list (long_long_integer_type_node, - long_long_integer_type_node, - integer_type_node, NULL_TREE); - tree di_ftype_di_int_int - = build_function_type_list (long_long_integer_type_node, - long_long_integer_type_node, - integer_type_node, - integer_type_node, NULL_TREE); - tree int_ftype_v8qi - = build_function_type_list (integer_type_node, - V8QI_type_node, NULL_TREE); - tree int_ftype_v4hi - = build_function_type_list (integer_type_node, - V4HI_type_node, NULL_TREE); - tree int_ftype_v2si - = build_function_type_list (integer_type_node, - V2SI_type_node, NULL_TREE); - tree int_ftype_v8qi_int - = build_function_type_list (integer_type_node, - V8QI_type_node, integer_type_node, NULL_TREE); - tree int_ftype_v4hi_int - = build_function_type_list (integer_type_node, - V4HI_type_node, integer_type_node, NULL_TREE); - tree int_ftype_v2si_int - = build_function_type_list (integer_type_node, - V2SI_type_node, integer_type_node, NULL_TREE); - tree v8qi_ftype_v8qi_int_int - = build_function_type_list (V8QI_type_node, - V8QI_type_node, integer_type_node, - integer_type_node, NULL_TREE); - tree v4hi_ftype_v4hi_int_int - = build_function_type_list (V4HI_type_node, - V4HI_type_node, integer_type_node, - integer_type_node, NULL_TREE); - tree v2si_ftype_v2si_int_int - = build_function_type_list (V2SI_type_node, - V2SI_type_node, integer_type_node, - integer_type_node, NULL_TREE); - /* Miscellaneous. */ - tree v8qi_ftype_v4hi_v4hi - = build_function_type_list (V8QI_type_node, - V4HI_type_node, V4HI_type_node, NULL_TREE); - tree v4hi_ftype_v2si_v2si - = build_function_type_list (V4HI_type_node, - V2SI_type_node, V2SI_type_node, NULL_TREE); - tree v8qi_ftype_v4hi_v8qi - = build_function_type_list (V8QI_type_node, - V4HI_type_node, V8QI_type_node, NULL_TREE); - tree v2si_ftype_v4hi_v4hi - = build_function_type_list (V2SI_type_node, - V4HI_type_node, V4HI_type_node, NULL_TREE); - tree v2si_ftype_v8qi_v8qi - = build_function_type_list (V2SI_type_node, - V8QI_type_node, V8QI_type_node, NULL_TREE); - tree v4hi_ftype_v4hi_di - = build_function_type_list (V4HI_type_node, - V4HI_type_node, long_long_integer_type_node, - NULL_TREE); - tree v2si_ftype_v2si_di - = build_function_type_list (V2SI_type_node, - V2SI_type_node, long_long_integer_type_node, - NULL_TREE); - tree di_ftype_void - = build_function_type_list (long_long_unsigned_type_node, NULL_TREE); - tree int_ftype_void - = build_function_type_list (integer_type_node, NULL_TREE); - tree di_ftype_v8qi - = build_function_type_list (long_long_integer_type_node, - V8QI_type_node, NULL_TREE); - tree di_ftype_v4hi - = build_function_type_list (long_long_integer_type_node, - V4HI_type_node, NULL_TREE); - tree di_ftype_v2si - = build_function_type_list (long_long_integer_type_node, - V2SI_type_node, NULL_TREE); - tree v2si_ftype_v4hi - = build_function_type_list (V2SI_type_node, - V4HI_type_node, NULL_TREE); - tree v4hi_ftype_v8qi - = build_function_type_list (V4HI_type_node, - V8QI_type_node, NULL_TREE); - tree v8qi_ftype_v8qi - = build_function_type_list (V8QI_type_node, - V8QI_type_node, NULL_TREE); - tree v4hi_ftype_v4hi - = build_function_type_list (V4HI_type_node, - V4HI_type_node, NULL_TREE); - tree v2si_ftype_v2si - = build_function_type_list (V2SI_type_node, - V2SI_type_node, NULL_TREE); - - tree di_ftype_di_v4hi_v4hi - = build_function_type_list (long_long_unsigned_type_node, - long_long_unsigned_type_node, - V4HI_type_node, V4HI_type_node, - NULL_TREE); - - tree di_ftype_v4hi_v4hi - = build_function_type_list (long_long_unsigned_type_node, - V4HI_type_node,V4HI_type_node, - NULL_TREE); - - tree v2si_ftype_v2si_v4hi_v4hi - = build_function_type_list (V2SI_type_node, - V2SI_type_node, V4HI_type_node, - V4HI_type_node, NULL_TREE); - - tree v2si_ftype_v2si_v8qi_v8qi - = build_function_type_list (V2SI_type_node, - V2SI_type_node, V8QI_type_node, - V8QI_type_node, NULL_TREE); - - tree di_ftype_di_v2si_v2si - = build_function_type_list (long_long_unsigned_type_node, - long_long_unsigned_type_node, - V2SI_type_node, V2SI_type_node, - NULL_TREE); - - tree di_ftype_di_di_int - = build_function_type_list (long_long_unsigned_type_node, - long_long_unsigned_type_node, - long_long_unsigned_type_node, - integer_type_node, NULL_TREE); - - tree void_ftype_int - = build_function_type_list (void_type_node, - integer_type_node, NULL_TREE); - - tree v8qi_ftype_char - = build_function_type_list (V8QI_type_node, - signed_char_type_node, NULL_TREE); - - tree v4hi_ftype_short - = build_function_type_list (V4HI_type_node, - short_integer_type_node, NULL_TREE); - - tree v2si_ftype_int - = build_function_type_list (V2SI_type_node, - integer_type_node, NULL_TREE); - - /* Normal vector binops. */ - tree v8qi_ftype_v8qi_v8qi - = build_function_type_list (V8QI_type_node, - V8QI_type_node, V8QI_type_node, NULL_TREE); - tree v4hi_ftype_v4hi_v4hi - = build_function_type_list (V4HI_type_node, - V4HI_type_node,V4HI_type_node, NULL_TREE); - tree v2si_ftype_v2si_v2si - = build_function_type_list (V2SI_type_node, - V2SI_type_node, V2SI_type_node, NULL_TREE); - tree di_ftype_di_di - = build_function_type_list (long_long_unsigned_type_node, - long_long_unsigned_type_node, - long_long_unsigned_type_node, - NULL_TREE); - - /* Add all builtins that are more or less simple operations on two - operands. */ - for (i = 0, d = bdesc_2arg; i < ARRAY_SIZE (bdesc_2arg); i++, d++) - { - /* Use one of the operands; the target can have a different mode for - mask-generating compares. */ - machine_mode mode; - tree type; - - if (d->name == 0 - || !(d->feature == isa_bit_iwmmxt - || d->feature == isa_bit_iwmmxt2)) - continue; - - mode = insn_data[d->icode].operand[1].mode; - - switch (mode) - { - case E_V8QImode: - type = v8qi_ftype_v8qi_v8qi; - break; - case E_V4HImode: - type = v4hi_ftype_v4hi_v4hi; - break; - case E_V2SImode: - type = v2si_ftype_v2si_v2si; - break; - case E_DImode: - type = di_ftype_di_di; - break; - - default: - gcc_unreachable (); - } - - def_mbuiltin (d->feature, d->name, type, d->code); - } - - /* Add the remaining MMX insns with somewhat more complicated types. */ -#define iwmmx_mbuiltin(NAME, TYPE, CODE) \ - def_mbuiltin (isa_bit_iwmmxt, "__builtin_arm_" NAME, \ - (TYPE), ARM_BUILTIN_ ## CODE) - -#define iwmmx2_mbuiltin(NAME, TYPE, CODE) \ - def_mbuiltin (isa_bit_iwmmxt2, "__builtin_arm_" NAME, \ - (TYPE), ARM_BUILTIN_ ## CODE) - - iwmmx_mbuiltin ("wzero", di_ftype_void, WZERO); - iwmmx_mbuiltin ("setwcgr0", void_ftype_int, SETWCGR0); - iwmmx_mbuiltin ("setwcgr1", void_ftype_int, SETWCGR1); - iwmmx_mbuiltin ("setwcgr2", void_ftype_int, SETWCGR2); - iwmmx_mbuiltin ("setwcgr3", void_ftype_int, SETWCGR3); - iwmmx_mbuiltin ("getwcgr0", int_ftype_void, GETWCGR0); - iwmmx_mbuiltin ("getwcgr1", int_ftype_void, GETWCGR1); - iwmmx_mbuiltin ("getwcgr2", int_ftype_void, GETWCGR2); - iwmmx_mbuiltin ("getwcgr3", int_ftype_void, GETWCGR3); - - iwmmx_mbuiltin ("wsllh", v4hi_ftype_v4hi_di, WSLLH); - iwmmx_mbuiltin ("wsllw", v2si_ftype_v2si_di, WSLLW); - iwmmx_mbuiltin ("wslld", di_ftype_di_di, WSLLD); - iwmmx_mbuiltin ("wsllhi", v4hi_ftype_v4hi_int, WSLLHI); - iwmmx_mbuiltin ("wsllwi", v2si_ftype_v2si_int, WSLLWI); - iwmmx_mbuiltin ("wslldi", di_ftype_di_int, WSLLDI); - - iwmmx_mbuiltin ("wsrlh", v4hi_ftype_v4hi_di, WSRLH); - iwmmx_mbuiltin ("wsrlw", v2si_ftype_v2si_di, WSRLW); - iwmmx_mbuiltin ("wsrld", di_ftype_di_di, WSRLD); - iwmmx_mbuiltin ("wsrlhi", v4hi_ftype_v4hi_int, WSRLHI); - iwmmx_mbuiltin ("wsrlwi", v2si_ftype_v2si_int, WSRLWI); - iwmmx_mbuiltin ("wsrldi", di_ftype_di_int, WSRLDI); - - iwmmx_mbuiltin ("wsrah", v4hi_ftype_v4hi_di, WSRAH); - iwmmx_mbuiltin ("wsraw", v2si_ftype_v2si_di, WSRAW); - iwmmx_mbuiltin ("wsrad", di_ftype_di_di, WSRAD); - iwmmx_mbuiltin ("wsrahi", v4hi_ftype_v4hi_int, WSRAHI); - iwmmx_mbuiltin ("wsrawi", v2si_ftype_v2si_int, WSRAWI); - iwmmx_mbuiltin ("wsradi", di_ftype_di_int, WSRADI); - - iwmmx_mbuiltin ("wrorh", v4hi_ftype_v4hi_di, WRORH); - iwmmx_mbuiltin ("wrorw", v2si_ftype_v2si_di, WRORW); - iwmmx_mbuiltin ("wrord", di_ftype_di_di, WRORD); - iwmmx_mbuiltin ("wrorhi", v4hi_ftype_v4hi_int, WRORHI); - iwmmx_mbuiltin ("wrorwi", v2si_ftype_v2si_int, WRORWI); - iwmmx_mbuiltin ("wrordi", di_ftype_di_int, WRORDI); - - iwmmx_mbuiltin ("wshufh", v4hi_ftype_v4hi_int, WSHUFH); - - iwmmx_mbuiltin ("wsadb", v2si_ftype_v2si_v8qi_v8qi, WSADB); - iwmmx_mbuiltin ("wsadh", v2si_ftype_v2si_v4hi_v4hi, WSADH); - iwmmx_mbuiltin ("wmadds", v2si_ftype_v4hi_v4hi, WMADDS); - iwmmx2_mbuiltin ("wmaddsx", v2si_ftype_v4hi_v4hi, WMADDSX); - iwmmx2_mbuiltin ("wmaddsn", v2si_ftype_v4hi_v4hi, WMADDSN); - iwmmx_mbuiltin ("wmaddu", v2si_ftype_v4hi_v4hi, WMADDU); - iwmmx2_mbuiltin ("wmaddux", v2si_ftype_v4hi_v4hi, WMADDUX); - iwmmx2_mbuiltin ("wmaddun", v2si_ftype_v4hi_v4hi, WMADDUN); - iwmmx_mbuiltin ("wsadbz", v2si_ftype_v8qi_v8qi, WSADBZ); - iwmmx_mbuiltin ("wsadhz", v2si_ftype_v4hi_v4hi, WSADHZ); - - iwmmx_mbuiltin ("textrmsb", int_ftype_v8qi_int, TEXTRMSB); - iwmmx_mbuiltin ("textrmsh", int_ftype_v4hi_int, TEXTRMSH); - iwmmx_mbuiltin ("textrmsw", int_ftype_v2si_int, TEXTRMSW); - iwmmx_mbuiltin ("textrmub", int_ftype_v8qi_int, TEXTRMUB); - iwmmx_mbuiltin ("textrmuh", int_ftype_v4hi_int, TEXTRMUH); - iwmmx_mbuiltin ("textrmuw", int_ftype_v2si_int, TEXTRMUW); - iwmmx_mbuiltin ("tinsrb", v8qi_ftype_v8qi_int_int, TINSRB); - iwmmx_mbuiltin ("tinsrh", v4hi_ftype_v4hi_int_int, TINSRH); - iwmmx_mbuiltin ("tinsrw", v2si_ftype_v2si_int_int, TINSRW); - - iwmmx_mbuiltin ("waccb", di_ftype_v8qi, WACCB); - iwmmx_mbuiltin ("wacch", di_ftype_v4hi, WACCH); - iwmmx_mbuiltin ("waccw", di_ftype_v2si, WACCW); - - iwmmx_mbuiltin ("tmovmskb", int_ftype_v8qi, TMOVMSKB); - iwmmx_mbuiltin ("tmovmskh", int_ftype_v4hi, TMOVMSKH); - iwmmx_mbuiltin ("tmovmskw", int_ftype_v2si, TMOVMSKW); - - iwmmx2_mbuiltin ("waddbhusm", v8qi_ftype_v4hi_v8qi, WADDBHUSM); - iwmmx2_mbuiltin ("waddbhusl", v8qi_ftype_v4hi_v8qi, WADDBHUSL); - - iwmmx_mbuiltin ("wpackhss", v8qi_ftype_v4hi_v4hi, WPACKHSS); - iwmmx_mbuiltin ("wpackhus", v8qi_ftype_v4hi_v4hi, WPACKHUS); - iwmmx_mbuiltin ("wpackwus", v4hi_ftype_v2si_v2si, WPACKWUS); - iwmmx_mbuiltin ("wpackwss", v4hi_ftype_v2si_v2si, WPACKWSS); - iwmmx_mbuiltin ("wpackdus", v2si_ftype_di_di, WPACKDUS); - iwmmx_mbuiltin ("wpackdss", v2si_ftype_di_di, WPACKDSS); - - iwmmx_mbuiltin ("wunpckehub", v4hi_ftype_v8qi, WUNPCKEHUB); - iwmmx_mbuiltin ("wunpckehuh", v2si_ftype_v4hi, WUNPCKEHUH); - iwmmx_mbuiltin ("wunpckehuw", di_ftype_v2si, WUNPCKEHUW); - iwmmx_mbuiltin ("wunpckehsb", v4hi_ftype_v8qi, WUNPCKEHSB); - iwmmx_mbuiltin ("wunpckehsh", v2si_ftype_v4hi, WUNPCKEHSH); - iwmmx_mbuiltin ("wunpckehsw", di_ftype_v2si, WUNPCKEHSW); - iwmmx_mbuiltin ("wunpckelub", v4hi_ftype_v8qi, WUNPCKELUB); - iwmmx_mbuiltin ("wunpckeluh", v2si_ftype_v4hi, WUNPCKELUH); - iwmmx_mbuiltin ("wunpckeluw", di_ftype_v2si, WUNPCKELUW); - iwmmx_mbuiltin ("wunpckelsb", v4hi_ftype_v8qi, WUNPCKELSB); - iwmmx_mbuiltin ("wunpckelsh", v2si_ftype_v4hi, WUNPCKELSH); - iwmmx_mbuiltin ("wunpckelsw", di_ftype_v2si, WUNPCKELSW); - - iwmmx_mbuiltin ("wmacs", di_ftype_di_v4hi_v4hi, WMACS); - iwmmx_mbuiltin ("wmacsz", di_ftype_v4hi_v4hi, WMACSZ); - iwmmx_mbuiltin ("wmacu", di_ftype_di_v4hi_v4hi, WMACU); - iwmmx_mbuiltin ("wmacuz", di_ftype_v4hi_v4hi, WMACUZ); - - iwmmx_mbuiltin ("walign", v8qi_ftype_v8qi_v8qi_int, WALIGNI); - iwmmx_mbuiltin ("tmia", di_ftype_di_int_int, TMIA); - iwmmx_mbuiltin ("tmiaph", di_ftype_di_int_int, TMIAPH); - iwmmx_mbuiltin ("tmiabb", di_ftype_di_int_int, TMIABB); - iwmmx_mbuiltin ("tmiabt", di_ftype_di_int_int, TMIABT); - iwmmx_mbuiltin ("tmiatb", di_ftype_di_int_int, TMIATB); - iwmmx_mbuiltin ("tmiatt", di_ftype_di_int_int, TMIATT); - - iwmmx2_mbuiltin ("wabsb", v8qi_ftype_v8qi, WABSB); - iwmmx2_mbuiltin ("wabsh", v4hi_ftype_v4hi, WABSH); - iwmmx2_mbuiltin ("wabsw", v2si_ftype_v2si, WABSW); - - iwmmx2_mbuiltin ("wqmiabb", v2si_ftype_v2si_v4hi_v4hi, WQMIABB); - iwmmx2_mbuiltin ("wqmiabt", v2si_ftype_v2si_v4hi_v4hi, WQMIABT); - iwmmx2_mbuiltin ("wqmiatb", v2si_ftype_v2si_v4hi_v4hi, WQMIATB); - iwmmx2_mbuiltin ("wqmiatt", v2si_ftype_v2si_v4hi_v4hi, WQMIATT); - - iwmmx2_mbuiltin ("wqmiabbn", v2si_ftype_v2si_v4hi_v4hi, WQMIABBN); - iwmmx2_mbuiltin ("wqmiabtn", v2si_ftype_v2si_v4hi_v4hi, WQMIABTN); - iwmmx2_mbuiltin ("wqmiatbn", v2si_ftype_v2si_v4hi_v4hi, WQMIATBN); - iwmmx2_mbuiltin ("wqmiattn", v2si_ftype_v2si_v4hi_v4hi, WQMIATTN); - - iwmmx2_mbuiltin ("wmiabb", di_ftype_di_v4hi_v4hi, WMIABB); - iwmmx2_mbuiltin ("wmiabt", di_ftype_di_v4hi_v4hi, WMIABT); - iwmmx2_mbuiltin ("wmiatb", di_ftype_di_v4hi_v4hi, WMIATB); - iwmmx2_mbuiltin ("wmiatt", di_ftype_di_v4hi_v4hi, WMIATT); - - iwmmx2_mbuiltin ("wmiabbn", di_ftype_di_v4hi_v4hi, WMIABBN); - iwmmx2_mbuiltin ("wmiabtn", di_ftype_di_v4hi_v4hi, WMIABTN); - iwmmx2_mbuiltin ("wmiatbn", di_ftype_di_v4hi_v4hi, WMIATBN); - iwmmx2_mbuiltin ("wmiattn", di_ftype_di_v4hi_v4hi, WMIATTN); - - iwmmx2_mbuiltin ("wmiawbb", di_ftype_di_v2si_v2si, WMIAWBB); - iwmmx2_mbuiltin ("wmiawbt", di_ftype_di_v2si_v2si, WMIAWBT); - iwmmx2_mbuiltin ("wmiawtb", di_ftype_di_v2si_v2si, WMIAWTB); - iwmmx2_mbuiltin ("wmiawtt", di_ftype_di_v2si_v2si, WMIAWTT); - - iwmmx2_mbuiltin ("wmiawbbn", di_ftype_di_v2si_v2si, WMIAWBBN); - iwmmx2_mbuiltin ("wmiawbtn", di_ftype_di_v2si_v2si, WMIAWBTN); - iwmmx2_mbuiltin ("wmiawtbn", di_ftype_di_v2si_v2si, WMIAWTBN); - iwmmx2_mbuiltin ("wmiawttn", di_ftype_di_v2si_v2si, WMIAWTTN); - - iwmmx2_mbuiltin ("wmerge", di_ftype_di_di_int, WMERGE); - - iwmmx_mbuiltin ("tbcstb", v8qi_ftype_char, TBCSTB); - iwmmx_mbuiltin ("tbcsth", v4hi_ftype_short, TBCSTH); - iwmmx_mbuiltin ("tbcstw", v2si_ftype_int, TBCSTW); - -#undef iwmmx_mbuiltin -#undef iwmmx2_mbuiltin -} - static void arm_init_fp16_builtins (void) { @@ -2454,9 +1693,6 @@ arm_init_fp16_builtins (void) void arm_init_builtins (void) { - if (TARGET_REALLY_IWMMXT) - arm_init_iwmmxt_builtins (); - /* This creates the arm_simd_floatHF_type_node so must come before arm_init_neon_builtins which uses it. */ arm_init_fp16_builtins (); @@ -2546,15 +1782,11 @@ arm_builtin_decl (unsigned code, bool initialize_p ATTRIBUTE_UNUSED) clear instructions. */ static rtx -safe_vector_operand (rtx x, machine_mode mode) +safe_vector_operand (rtx x, machine_mode mode ATTRIBUTE_UNUSED) { if (x != const0_rtx) return x; - x = gen_reg_rtx (mode); - - emit_insn (gen_iwmmxt_clrdi (mode == DImode ? x - : gen_rtx_SUBREG (DImode, x, 0))); - return x; + __builtin_unreachable (); } /* Function to expand ternary builtins. */ @@ -3266,21 +2498,10 @@ arm_general_expand_builtin (unsigned int fcode, const struct builtin_description * d; enum insn_code icode; tree arg0; - tree arg1; - tree arg2; rtx op0; rtx op1; - rtx op2; rtx pat; size_t i; - machine_mode tmode; - machine_mode mode0; - machine_mode mode1; - machine_mode mode2; - int opint; - int selector; - int mask; - int imm; if (fcode == ARM_BUILTIN_SIMD_LANE_CHECK) { @@ -3369,499 +2590,6 @@ arm_general_expand_builtin (unsigned int fcode, emit_insn (gen_cstoresi4 (target, op1, target, const0_rtx)); return target; - case ARM_BUILTIN_TEXTRMSB: - case ARM_BUILTIN_TEXTRMUB: - case ARM_BUILTIN_TEXTRMSH: - case ARM_BUILTIN_TEXTRMUH: - case ARM_BUILTIN_TEXTRMSW: - case ARM_BUILTIN_TEXTRMUW: - icode = (fcode == ARM_BUILTIN_TEXTRMSB ? CODE_FOR_iwmmxt_textrmsb - : fcode == ARM_BUILTIN_TEXTRMUB ? CODE_FOR_iwmmxt_textrmub - : fcode == ARM_BUILTIN_TEXTRMSH ? CODE_FOR_iwmmxt_textrmsh - : fcode == ARM_BUILTIN_TEXTRMUH ? CODE_FOR_iwmmxt_textrmuh - : CODE_FOR_iwmmxt_textrmw); - - arg0 = CALL_EXPR_ARG (exp, 0); - arg1 = CALL_EXPR_ARG (exp, 1); - op0 = expand_normal (arg0); - op1 = expand_normal (arg1); - tmode = insn_data[icode].operand[0].mode; - mode0 = insn_data[icode].operand[1].mode; - mode1 = insn_data[icode].operand[2].mode; - - if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) - op0 = copy_to_mode_reg (mode0, op0); - if (! (*insn_data[icode].operand[2].predicate) (op1, mode1)) - { - /* @@@ better error message */ - error ("selector must be an immediate"); - return gen_reg_rtx (tmode); - } - - opint = INTVAL (op1); - if (fcode == ARM_BUILTIN_TEXTRMSB || fcode == ARM_BUILTIN_TEXTRMUB) - { - if (opint > 7 || opint < 0) - error ("the range of selector should be in 0 to 7"); - } - else if (fcode == ARM_BUILTIN_TEXTRMSH || fcode == ARM_BUILTIN_TEXTRMUH) - { - if (opint > 3 || opint < 0) - error ("the range of selector should be in 0 to 3"); - } - else /* ARM_BUILTIN_TEXTRMSW || ARM_BUILTIN_TEXTRMUW. */ - { - if (opint > 1 || opint < 0) - error ("the range of selector should be in 0 to 1"); - } - - if (target == 0 - || GET_MODE (target) != tmode - || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) - target = gen_reg_rtx (tmode); - pat = GEN_FCN (icode) (target, op0, op1); - if (! pat) - return 0; - emit_insn (pat); - return target; - - case ARM_BUILTIN_WALIGNI: - /* If op2 is immediate, call walighi, else call walighr. */ - arg0 = CALL_EXPR_ARG (exp, 0); - arg1 = CALL_EXPR_ARG (exp, 1); - arg2 = CALL_EXPR_ARG (exp, 2); - op0 = expand_normal (arg0); - op1 = expand_normal (arg1); - op2 = expand_normal (arg2); - if (CONST_INT_P (op2)) - { - icode = CODE_FOR_iwmmxt_waligni; - tmode = insn_data[icode].operand[0].mode; - mode0 = insn_data[icode].operand[1].mode; - mode1 = insn_data[icode].operand[2].mode; - mode2 = insn_data[icode].operand[3].mode; - if (!(*insn_data[icode].operand[1].predicate) (op0, mode0)) - op0 = copy_to_mode_reg (mode0, op0); - if (!(*insn_data[icode].operand[2].predicate) (op1, mode1)) - op1 = copy_to_mode_reg (mode1, op1); - gcc_assert ((*insn_data[icode].operand[3].predicate) (op2, mode2)); - selector = INTVAL (op2); - if (selector > 7 || selector < 0) - error ("the range of selector should be in 0 to 7"); - } - else - { - icode = CODE_FOR_iwmmxt_walignr; - tmode = insn_data[icode].operand[0].mode; - mode0 = insn_data[icode].operand[1].mode; - mode1 = insn_data[icode].operand[2].mode; - mode2 = insn_data[icode].operand[3].mode; - if (!(*insn_data[icode].operand[1].predicate) (op0, mode0)) - op0 = copy_to_mode_reg (mode0, op0); - if (!(*insn_data[icode].operand[2].predicate) (op1, mode1)) - op1 = copy_to_mode_reg (mode1, op1); - if (!(*insn_data[icode].operand[3].predicate) (op2, mode2)) - op2 = copy_to_mode_reg (mode2, op2); - } - if (target == 0 - || GET_MODE (target) != tmode - || !(*insn_data[icode].operand[0].predicate) (target, tmode)) - target = gen_reg_rtx (tmode); - pat = GEN_FCN (icode) (target, op0, op1, op2); - if (!pat) - return 0; - emit_insn (pat); - return target; - - case ARM_BUILTIN_TINSRB: - case ARM_BUILTIN_TINSRH: - case ARM_BUILTIN_TINSRW: - case ARM_BUILTIN_WMERGE: - icode = (fcode == ARM_BUILTIN_TINSRB ? CODE_FOR_iwmmxt_tinsrb - : fcode == ARM_BUILTIN_TINSRH ? CODE_FOR_iwmmxt_tinsrh - : fcode == ARM_BUILTIN_WMERGE ? CODE_FOR_iwmmxt_wmerge - : CODE_FOR_iwmmxt_tinsrw); - arg0 = CALL_EXPR_ARG (exp, 0); - arg1 = CALL_EXPR_ARG (exp, 1); - arg2 = CALL_EXPR_ARG (exp, 2); - op0 = expand_normal (arg0); - op1 = expand_normal (arg1); - op2 = expand_normal (arg2); - tmode = insn_data[icode].operand[0].mode; - mode0 = insn_data[icode].operand[1].mode; - mode1 = insn_data[icode].operand[2].mode; - mode2 = insn_data[icode].operand[3].mode; - - if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) - op0 = copy_to_mode_reg (mode0, op0); - if (! (*insn_data[icode].operand[2].predicate) (op1, mode1)) - op1 = copy_to_mode_reg (mode1, op1); - if (! (*insn_data[icode].operand[3].predicate) (op2, mode2)) - { - error ("selector must be an immediate"); - return const0_rtx; - } - if (icode == CODE_FOR_iwmmxt_wmerge) - { - selector = INTVAL (op2); - if (selector > 7 || selector < 0) - error ("the range of selector should be in 0 to 7"); - } - if ((icode == CODE_FOR_iwmmxt_tinsrb) - || (icode == CODE_FOR_iwmmxt_tinsrh) - || (icode == CODE_FOR_iwmmxt_tinsrw)) - { - mask = 0x01; - selector= INTVAL (op2); - if (icode == CODE_FOR_iwmmxt_tinsrb && (selector < 0 || selector > 7)) - error ("the range of selector should be in 0 to 7"); - else if (icode == CODE_FOR_iwmmxt_tinsrh && (selector < 0 ||selector > 3)) - error ("the range of selector should be in 0 to 3"); - else if (icode == CODE_FOR_iwmmxt_tinsrw && (selector < 0 ||selector > 1)) - error ("the range of selector should be in 0 to 1"); - mask <<= selector; - op2 = GEN_INT (mask); - } - if (target == 0 - || GET_MODE (target) != tmode - || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) - target = gen_reg_rtx (tmode); - pat = GEN_FCN (icode) (target, op0, op1, op2); - if (! pat) - return 0; - emit_insn (pat); - return target; - - case ARM_BUILTIN_SETWCGR0: - case ARM_BUILTIN_SETWCGR1: - case ARM_BUILTIN_SETWCGR2: - case ARM_BUILTIN_SETWCGR3: - icode = (fcode == ARM_BUILTIN_SETWCGR0 ? CODE_FOR_iwmmxt_setwcgr0 - : fcode == ARM_BUILTIN_SETWCGR1 ? CODE_FOR_iwmmxt_setwcgr1 - : fcode == ARM_BUILTIN_SETWCGR2 ? CODE_FOR_iwmmxt_setwcgr2 - : CODE_FOR_iwmmxt_setwcgr3); - arg0 = CALL_EXPR_ARG (exp, 0); - op0 = expand_normal (arg0); - mode0 = insn_data[icode].operand[0].mode; - if (!(*insn_data[icode].operand[0].predicate) (op0, mode0)) - op0 = copy_to_mode_reg (mode0, op0); - pat = GEN_FCN (icode) (op0); - if (!pat) - return 0; - emit_insn (pat); - return 0; - - case ARM_BUILTIN_GETWCGR0: - case ARM_BUILTIN_GETWCGR1: - case ARM_BUILTIN_GETWCGR2: - case ARM_BUILTIN_GETWCGR3: - icode = (fcode == ARM_BUILTIN_GETWCGR0 ? CODE_FOR_iwmmxt_getwcgr0 - : fcode == ARM_BUILTIN_GETWCGR1 ? CODE_FOR_iwmmxt_getwcgr1 - : fcode == ARM_BUILTIN_GETWCGR2 ? CODE_FOR_iwmmxt_getwcgr2 - : CODE_FOR_iwmmxt_getwcgr3); - tmode = insn_data[icode].operand[0].mode; - if (target == 0 - || GET_MODE (target) != tmode - || !(*insn_data[icode].operand[0].predicate) (target, tmode)) - target = gen_reg_rtx (tmode); - pat = GEN_FCN (icode) (target); - if (!pat) - return 0; - emit_insn (pat); - return target; - - case ARM_BUILTIN_WSHUFH: - icode = CODE_FOR_iwmmxt_wshufh; - arg0 = CALL_EXPR_ARG (exp, 0); - arg1 = CALL_EXPR_ARG (exp, 1); - op0 = expand_normal (arg0); - op1 = expand_normal (arg1); - tmode = insn_data[icode].operand[0].mode; - mode1 = insn_data[icode].operand[1].mode; - mode2 = insn_data[icode].operand[2].mode; - - if (! (*insn_data[icode].operand[1].predicate) (op0, mode1)) - op0 = copy_to_mode_reg (mode1, op0); - if (! (*insn_data[icode].operand[2].predicate) (op1, mode2)) - { - error ("mask must be an immediate"); - return const0_rtx; - } - selector = INTVAL (op1); - if (selector < 0 || selector > 255) - error ("the range of mask should be in 0 to 255"); - if (target == 0 - || GET_MODE (target) != tmode - || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) - target = gen_reg_rtx (tmode); - pat = GEN_FCN (icode) (target, op0, op1); - if (! pat) - return 0; - emit_insn (pat); - return target; - - case ARM_BUILTIN_WMADDS: - return arm_expand_binop_builtin (CODE_FOR_iwmmxt_wmadds, exp, target); - case ARM_BUILTIN_WMADDSX: - return arm_expand_binop_builtin (CODE_FOR_iwmmxt_wmaddsx, exp, target); - case ARM_BUILTIN_WMADDSN: - return arm_expand_binop_builtin (CODE_FOR_iwmmxt_wmaddsn, exp, target); - case ARM_BUILTIN_WMADDU: - return arm_expand_binop_builtin (CODE_FOR_iwmmxt_wmaddu, exp, target); - case ARM_BUILTIN_WMADDUX: - return arm_expand_binop_builtin (CODE_FOR_iwmmxt_wmaddux, exp, target); - case ARM_BUILTIN_WMADDUN: - return arm_expand_binop_builtin (CODE_FOR_iwmmxt_wmaddun, exp, target); - case ARM_BUILTIN_WSADBZ: - return arm_expand_binop_builtin (CODE_FOR_iwmmxt_wsadbz, exp, target); - case ARM_BUILTIN_WSADHZ: - return arm_expand_binop_builtin (CODE_FOR_iwmmxt_wsadhz, exp, target); - - /* Several three-argument builtins. */ - case ARM_BUILTIN_WMACS: - case ARM_BUILTIN_WMACU: - case ARM_BUILTIN_TMIA: - case ARM_BUILTIN_TMIAPH: - case ARM_BUILTIN_TMIATT: - case ARM_BUILTIN_TMIATB: - case ARM_BUILTIN_TMIABT: - case ARM_BUILTIN_TMIABB: - case ARM_BUILTIN_WQMIABB: - case ARM_BUILTIN_WQMIABT: - case ARM_BUILTIN_WQMIATB: - case ARM_BUILTIN_WQMIATT: - case ARM_BUILTIN_WQMIABBN: - case ARM_BUILTIN_WQMIABTN: - case ARM_BUILTIN_WQMIATBN: - case ARM_BUILTIN_WQMIATTN: - case ARM_BUILTIN_WMIABB: - case ARM_BUILTIN_WMIABT: - case ARM_BUILTIN_WMIATB: - case ARM_BUILTIN_WMIATT: - case ARM_BUILTIN_WMIABBN: - case ARM_BUILTIN_WMIABTN: - case ARM_BUILTIN_WMIATBN: - case ARM_BUILTIN_WMIATTN: - case ARM_BUILTIN_WMIAWBB: - case ARM_BUILTIN_WMIAWBT: - case ARM_BUILTIN_WMIAWTB: - case ARM_BUILTIN_WMIAWTT: - case ARM_BUILTIN_WMIAWBBN: - case ARM_BUILTIN_WMIAWBTN: - case ARM_BUILTIN_WMIAWTBN: - case ARM_BUILTIN_WMIAWTTN: - case ARM_BUILTIN_WSADB: - case ARM_BUILTIN_WSADH: - icode = (fcode == ARM_BUILTIN_WMACS ? CODE_FOR_iwmmxt_wmacs - : fcode == ARM_BUILTIN_WMACU ? CODE_FOR_iwmmxt_wmacu - : fcode == ARM_BUILTIN_TMIA ? CODE_FOR_iwmmxt_tmia - : fcode == ARM_BUILTIN_TMIAPH ? CODE_FOR_iwmmxt_tmiaph - : fcode == ARM_BUILTIN_TMIABB ? CODE_FOR_iwmmxt_tmiabb - : fcode == ARM_BUILTIN_TMIABT ? CODE_FOR_iwmmxt_tmiabt - : fcode == ARM_BUILTIN_TMIATB ? CODE_FOR_iwmmxt_tmiatb - : fcode == ARM_BUILTIN_TMIATT ? CODE_FOR_iwmmxt_tmiatt - : fcode == ARM_BUILTIN_WQMIABB ? CODE_FOR_iwmmxt_wqmiabb - : fcode == ARM_BUILTIN_WQMIABT ? CODE_FOR_iwmmxt_wqmiabt - : fcode == ARM_BUILTIN_WQMIATB ? CODE_FOR_iwmmxt_wqmiatb - : fcode == ARM_BUILTIN_WQMIATT ? CODE_FOR_iwmmxt_wqmiatt - : fcode == ARM_BUILTIN_WQMIABBN ? CODE_FOR_iwmmxt_wqmiabbn - : fcode == ARM_BUILTIN_WQMIABTN ? CODE_FOR_iwmmxt_wqmiabtn - : fcode == ARM_BUILTIN_WQMIATBN ? CODE_FOR_iwmmxt_wqmiatbn - : fcode == ARM_BUILTIN_WQMIATTN ? CODE_FOR_iwmmxt_wqmiattn - : fcode == ARM_BUILTIN_WMIABB ? CODE_FOR_iwmmxt_wmiabb - : fcode == ARM_BUILTIN_WMIABT ? CODE_FOR_iwmmxt_wmiabt - : fcode == ARM_BUILTIN_WMIATB ? CODE_FOR_iwmmxt_wmiatb - : fcode == ARM_BUILTIN_WMIATT ? CODE_FOR_iwmmxt_wmiatt - : fcode == ARM_BUILTIN_WMIABBN ? CODE_FOR_iwmmxt_wmiabbn - : fcode == ARM_BUILTIN_WMIABTN ? CODE_FOR_iwmmxt_wmiabtn - : fcode == ARM_BUILTIN_WMIATBN ? CODE_FOR_iwmmxt_wmiatbn - : fcode == ARM_BUILTIN_WMIATTN ? CODE_FOR_iwmmxt_wmiattn - : fcode == ARM_BUILTIN_WMIAWBB ? CODE_FOR_iwmmxt_wmiawbb - : fcode == ARM_BUILTIN_WMIAWBT ? CODE_FOR_iwmmxt_wmiawbt - : fcode == ARM_BUILTIN_WMIAWTB ? CODE_FOR_iwmmxt_wmiawtb - : fcode == ARM_BUILTIN_WMIAWTT ? CODE_FOR_iwmmxt_wmiawtt - : fcode == ARM_BUILTIN_WMIAWBBN ? CODE_FOR_iwmmxt_wmiawbbn - : fcode == ARM_BUILTIN_WMIAWBTN ? CODE_FOR_iwmmxt_wmiawbtn - : fcode == ARM_BUILTIN_WMIAWTBN ? CODE_FOR_iwmmxt_wmiawtbn - : fcode == ARM_BUILTIN_WMIAWTTN ? CODE_FOR_iwmmxt_wmiawttn - : fcode == ARM_BUILTIN_WSADB ? CODE_FOR_iwmmxt_wsadb - : CODE_FOR_iwmmxt_wsadh); - arg0 = CALL_EXPR_ARG (exp, 0); - arg1 = CALL_EXPR_ARG (exp, 1); - arg2 = CALL_EXPR_ARG (exp, 2); - op0 = expand_normal (arg0); - op1 = expand_normal (arg1); - op2 = expand_normal (arg2); - tmode = insn_data[icode].operand[0].mode; - mode0 = insn_data[icode].operand[1].mode; - mode1 = insn_data[icode].operand[2].mode; - mode2 = insn_data[icode].operand[3].mode; - - if (! (*insn_data[icode].operand[1].predicate) (op0, mode0)) - op0 = copy_to_mode_reg (mode0, op0); - if (! (*insn_data[icode].operand[2].predicate) (op1, mode1)) - op1 = copy_to_mode_reg (mode1, op1); - if (! (*insn_data[icode].operand[3].predicate) (op2, mode2)) - op2 = copy_to_mode_reg (mode2, op2); - if (target == 0 - || GET_MODE (target) != tmode - || ! (*insn_data[icode].operand[0].predicate) (target, tmode)) - target = gen_reg_rtx (tmode); - pat = GEN_FCN (icode) (target, op0, op1, op2); - if (! pat) - return 0; - emit_insn (pat); - return target; - - case ARM_BUILTIN_WZERO: - target = gen_reg_rtx (DImode); - emit_insn (gen_iwmmxt_clrdi (target)); - return target; - - case ARM_BUILTIN_WSRLHI: - case ARM_BUILTIN_WSRLWI: - case ARM_BUILTIN_WSRLDI: - case ARM_BUILTIN_WSLLHI: - case ARM_BUILTIN_WSLLWI: - case ARM_BUILTIN_WSLLDI: - case ARM_BUILTIN_WSRAHI: - case ARM_BUILTIN_WSRAWI: - case ARM_BUILTIN_WSRADI: - case ARM_BUILTIN_WRORHI: - case ARM_BUILTIN_WRORWI: - case ARM_BUILTIN_WRORDI: - case ARM_BUILTIN_WSRLH: - case ARM_BUILTIN_WSRLW: - case ARM_BUILTIN_WSRLD: - case ARM_BUILTIN_WSLLH: - case ARM_BUILTIN_WSLLW: - case ARM_BUILTIN_WSLLD: - case ARM_BUILTIN_WSRAH: - case ARM_BUILTIN_WSRAW: - case ARM_BUILTIN_WSRAD: - case ARM_BUILTIN_WRORH: - case ARM_BUILTIN_WRORW: - case ARM_BUILTIN_WRORD: - icode = (fcode == ARM_BUILTIN_WSRLHI ? CODE_FOR_lshrv4hi3_iwmmxt - : fcode == ARM_BUILTIN_WSRLWI ? CODE_FOR_lshrv2si3_iwmmxt - : fcode == ARM_BUILTIN_WSRLDI ? CODE_FOR_lshrdi3_iwmmxt - : fcode == ARM_BUILTIN_WSLLHI ? CODE_FOR_ashlv4hi3_iwmmxt - : fcode == ARM_BUILTIN_WSLLWI ? CODE_FOR_ashlv2si3_iwmmxt - : fcode == ARM_BUILTIN_WSLLDI ? CODE_FOR_ashldi3_iwmmxt - : fcode == ARM_BUILTIN_WSRAHI ? CODE_FOR_ashrv4hi3_iwmmxt - : fcode == ARM_BUILTIN_WSRAWI ? CODE_FOR_ashrv2si3_iwmmxt - : fcode == ARM_BUILTIN_WSRADI ? CODE_FOR_ashrdi3_iwmmxt - : fcode == ARM_BUILTIN_WRORHI ? CODE_FOR_rorv4hi3 - : fcode == ARM_BUILTIN_WRORWI ? CODE_FOR_rorv2si3 - : fcode == ARM_BUILTIN_WRORDI ? CODE_FOR_rordi3 - : fcode == ARM_BUILTIN_WSRLH ? CODE_FOR_lshrv4hi3_di - : fcode == ARM_BUILTIN_WSRLW ? CODE_FOR_lshrv2si3_di - : fcode == ARM_BUILTIN_WSRLD ? CODE_FOR_lshrdi3_di - : fcode == ARM_BUILTIN_WSLLH ? CODE_FOR_ashlv4hi3_di - : fcode == ARM_BUILTIN_WSLLW ? CODE_FOR_ashlv2si3_di - : fcode == ARM_BUILTIN_WSLLD ? CODE_FOR_ashldi3_di - : fcode == ARM_BUILTIN_WSRAH ? CODE_FOR_ashrv4hi3_di - : fcode == ARM_BUILTIN_WSRAW ? CODE_FOR_ashrv2si3_di - : fcode == ARM_BUILTIN_WSRAD ? CODE_FOR_ashrdi3_di - : fcode == ARM_BUILTIN_WRORH ? CODE_FOR_rorv4hi3_di - : fcode == ARM_BUILTIN_WRORW ? CODE_FOR_rorv2si3_di - : fcode == ARM_BUILTIN_WRORD ? CODE_FOR_rordi3_di - : CODE_FOR_nothing); - arg1 = CALL_EXPR_ARG (exp, 1); - op1 = expand_normal (arg1); - if (GET_MODE (op1) == VOIDmode) - { - imm = INTVAL (op1); - if ((fcode == ARM_BUILTIN_WRORWI || fcode == ARM_BUILTIN_WRORW) - && (imm < 0 || imm > 32)) - { - const char *builtin = (fcode == ARM_BUILTIN_WRORWI - ? "_mm_rori_pi32" : "_mm_ror_pi32"); - error ("the range of count should be in 0 to 32; " - "please check the intrinsic %qs in code", builtin); - } - else if ((fcode == ARM_BUILTIN_WRORHI || fcode == ARM_BUILTIN_WRORH) - && (imm < 0 || imm > 16)) - { - const char *builtin = (fcode == ARM_BUILTIN_WRORHI - ? "_mm_rori_pi16" : "_mm_ror_pi16"); - error ("the range of count should be in 0 to 16; " - "please check the intrinsic %qs in code", builtin); - } - else if ((fcode == ARM_BUILTIN_WRORDI || fcode == ARM_BUILTIN_WRORD) - && (imm < 0 || imm > 64)) - { - const char *builtin = (fcode == ARM_BUILTIN_WRORDI - ? "_mm_rori_si64" : "_mm_ror_si64"); - error ("the range of count should be in 0 to 64; " - "please check the intrinsic %qs in code", builtin); - } - else if (imm < 0) - { - const char *builtin; - switch (fcode) - { - case ARM_BUILTIN_WSRLHI: - builtin = "_mm_srli_pi16"; - break; - case ARM_BUILTIN_WSRLWI: - builtin = "_mm_srli_pi32"; - break; - case ARM_BUILTIN_WSRLDI: - builtin = "_mm_srli_si64"; - break; - case ARM_BUILTIN_WSLLHI: - builtin = "_mm_slli_pi16"; - break; - case ARM_BUILTIN_WSLLWI: - builtin = "_mm_slli_pi32"; - break; - case ARM_BUILTIN_WSLLDI: - builtin = "_mm_slli_si64"; - break; - case ARM_BUILTIN_WSRAHI: - builtin = "_mm_srai_pi16"; - break; - case ARM_BUILTIN_WSRAWI: - builtin = "_mm_srai_pi32"; - break; - case ARM_BUILTIN_WSRADI: - builtin = "_mm_srai_si64"; - break; - case ARM_BUILTIN_WSRLH: - builtin = "_mm_srl_pi16"; - break; - case ARM_BUILTIN_WSRLW: - builtin = "_mm_srl_pi32"; - break; - case ARM_BUILTIN_WSRLD: - builtin = "_mm_srl_si64"; - break; - case ARM_BUILTIN_WSLLH: - builtin = "_mm_sll_pi16"; - break; - case ARM_BUILTIN_WSLLW: - builtin = "_mm_sll_pi32"; - break; - case ARM_BUILTIN_WSLLD: - builtin = "_mm_sll_si64"; - break; - case ARM_BUILTIN_WSRAH: - builtin = "_mm_sra_pi16"; - break; - case ARM_BUILTIN_WSRAW: - builtin = "_mm_sra_si64"; - break; - default: - builtin = "_mm_sra_si64"; - break; - } - error ("the count should be no less than 0; " - "please check the intrinsic %qs in code", builtin); - } - } - return arm_expand_binop_builtin (icode, exp, target); - default: break; } diff --git a/gcc/config/arm/arm-c.cc b/gcc/config/arm/arm-c.cc index 15e4080..d257e62 100644 --- a/gcc/config/arm/arm-c.cc +++ b/gcc/config/arm/arm-c.cc @@ -373,13 +373,6 @@ arm_cpu_builtins (struct cpp_reader* pfile) builtin_define (arm_arch_name); if (arm_arch_xscale) builtin_define ("__XSCALE__"); - if (arm_arch_iwmmxt) - { - builtin_define ("__IWMMXT__"); - builtin_define ("__ARM_WMMX"); - } - if (arm_arch_iwmmxt2) - builtin_define ("__IWMMXT2__"); /* ARMv6KZ was originally identified as the misspelled __ARM_ARCH_6ZK__. To preserve the existing behavior, the misspelled feature macro must still be defined. */ diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in index 1939d55..7f5a8c6 100644 --- a/gcc/config/arm/arm-cpus.in +++ b/gcc/config/arm/arm-cpus.in @@ -102,12 +102,6 @@ define feature armv8 # ARMv8 CRC32 instructions. define feature crc32 -# XScale v2 (Wireless MMX). -define feature iwmmxt - -# XScale Wireless MMX2. -define feature iwmmxt2 - # Architecture rel 8.1. define feature armv8_1 @@ -778,18 +772,19 @@ begin arch armv9-a option bf16 add bf16 FP_ARMv8 DOTPROD end arch armv9-a +# We no-longer support the iwmmxt{,2} extensions, so treat these like xscale. begin arch iwmmxt - tune for iwmmxt + tune for xscale tune flags LDSCHED STRONG XSCALE base 5TE - isa ARMv5te xscale iwmmxt + isa ARMv5te xscale end arch iwmmxt begin arch iwmmxt2 - tune for iwmmxt2 + tune for xscale tune flags LDSCHED STRONG XSCALE base 5TE - isa ARMv5te xscale iwmmxt iwmmxt2 + isa ARMv5te xscale end arch iwmmxt2 # CPU entries @@ -924,23 +919,12 @@ end cpu arm10e begin cpu xscale tune flags LDSCHED XSCALE + alias iwmmxt iwmmxt2 architecture armv5te isa xscale costs xscale end cpu xscale -begin cpu iwmmxt - tune flags LDSCHED XSCALE - architecture iwmmxt - costs xscale -end cpu iwmmxt - -begin cpu iwmmxt2 - tune flags LDSCHED XSCALE - architecture iwmmxt2 - costs xscale -end cpu iwmmxt2 - begin cpu fa606te tune flags LDSCHED architecture armv5te diff --git a/gcc/config/arm/arm-generic.md b/gcc/config/arm/arm-generic.md index c270056..a8af0e6 100644 --- a/gcc/config/arm/arm-generic.md +++ b/gcc/config/arm/arm-generic.md @@ -96,14 +96,14 @@ (and (eq_attr "generic_sched" "yes") (and (eq_attr "ldsched" "yes") (and (eq_attr "type" "load_byte,load_4") - (eq_attr "tune" "xscale,iwmmxt,iwmmxt2")))) + (eq_attr "tune" "xscale")))) "core") (define_insn_reservation "load_ldsched" 2 (and (eq_attr "generic_sched" "yes") (and (eq_attr "ldsched" "yes") (and (eq_attr "type" "load_byte,load_4") - (eq_attr "tune" "!xscale,iwmmxt,iwmmxt2")))) + (eq_attr "tune" "!xscale")))) "core") (define_insn_reservation "load_or_store" 2 diff --git a/gcc/config/arm/arm-opts.h b/gcc/config/arm/arm-opts.h index 06a1939..5c543bf 100644 --- a/gcc/config/arm/arm-opts.h +++ b/gcc/config/arm/arm-opts.h @@ -46,7 +46,6 @@ enum arm_abi_type ARM_ABI_APCS, ARM_ABI_ATPCS, ARM_ABI_AAPCS, - ARM_ABI_IWMMXT, ARM_ABI_AAPCS_LINUX }; diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h index 254c731..ff7e765 100644 --- a/gcc/config/arm/arm-protos.h +++ b/gcc/config/arm/arm-protos.h @@ -190,8 +190,6 @@ extern void arm_output_multireg_pop (rtx *, bool, rtx, bool, bool); extern void arm_set_return_address (rtx, rtx); extern int arm_eliminable_register (rtx); extern const char *arm_output_shift(rtx *, int); -extern const char *arm_output_iwmmxt_shift_immediate (const char *, rtx *, bool); -extern const char *arm_output_iwmmxt_tinsr (rtx *); extern unsigned int arm_sync_loop_insns (rtx , rtx *); extern int arm_attr_length_push_multi(rtx, rtx); extern int arm_attr_length_pop_multi(rtx *, bool, bool); @@ -475,12 +473,6 @@ extern int arm_ld_sched; /* Nonzero if this chip is a StrongARM. */ extern int arm_tune_strongarm; -/* Nonzero if this chip supports Intel Wireless MMX technology. */ -extern int arm_arch_iwmmxt; - -/* Nonzero if this chip supports Intel Wireless MMX2 technology. */ -extern int arm_arch_iwmmxt2; - /* Nonzero if this chip is an XScale. */ extern int arm_arch_xscale; diff --git a/gcc/config/arm/arm-tables.opt b/gcc/config/arm/arm-tables.opt index db7767a..544de84 100644 --- a/gcc/config/arm/arm-tables.opt +++ b/gcc/config/arm/arm-tables.opt @@ -67,12 +67,6 @@ EnumValue Enum(processor_type) String(xscale) Value( TARGET_CPU_xscale) EnumValue -Enum(processor_type) String(iwmmxt) Value( TARGET_CPU_iwmmxt) - -EnumValue -Enum(processor_type) String(iwmmxt2) Value( TARGET_CPU_iwmmxt2) - -EnumValue Enum(processor_type) String(fa606te) Value( TARGET_CPU_fa606te) EnumValue diff --git a/gcc/config/arm/arm-tune.md b/gcc/config/arm/arm-tune.md index a04d1ee..20b5f93 100644 --- a/gcc/config/arm/arm-tune.md +++ b/gcc/config/arm/arm-tune.md @@ -25,31 +25,30 @@ fa526,fa626,arm7tdmi, arm710t,arm9,arm9tdmi, arm920t,arm10tdmi,arm9e, - arm10e,xscale,iwmmxt, - iwmmxt2,fa606te,fa626te, - fmp626,fa726te,arm926ejs, - arm1026ejs,arm1136js,arm1136jfs, - arm1176jzs,arm1176jzfs,mpcorenovfp, - mpcore,arm1156t2s,arm1156t2fs, - cortexm1,cortexm0,cortexm0plus, - cortexm1smallmultiply,cortexm0smallmultiply,cortexm0plussmallmultiply, - genericv7a,cortexa5,cortexa7, - cortexa8,cortexa9,cortexa12, - cortexa15,cortexa17,cortexr4, - cortexr4f,cortexr5,cortexr7, - cortexr8,cortexm7,cortexm4, - cortexm3,marvell_pj4,cortexa15cortexa7, - cortexa17cortexa7,cortexa32,cortexa35, - cortexa53,cortexa57,cortexa72, - cortexa73,exynosm1,xgene1, - cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35, - cortexa73cortexa53,cortexa55,cortexa75, - cortexa76,cortexa76ae,cortexa77, - cortexa78,cortexa78ae,cortexa78c, - cortexa710,cortexx1,cortexx1c, - neoversen1,cortexa75cortexa55,cortexa76cortexa55, - neoversev1,neoversen2,cortexm23, - cortexm33,cortexm35p,cortexm52, - cortexm55,starmc1,cortexm85, - cortexr52,cortexr52plus" + arm10e,xscale,fa606te, + fa626te,fmp626,fa726te, + arm926ejs,arm1026ejs,arm1136js, + arm1136jfs,arm1176jzs,arm1176jzfs, + mpcorenovfp,mpcore,arm1156t2s, + arm1156t2fs,cortexm1,cortexm0, + cortexm0plus,cortexm1smallmultiply,cortexm0smallmultiply, + cortexm0plussmallmultiply,genericv7a,cortexa5, + cortexa7,cortexa8,cortexa9, + cortexa12,cortexa15,cortexa17, + cortexr4,cortexr4f,cortexr5, + cortexr7,cortexr8,cortexm7, + cortexm4,cortexm3,marvell_pj4, + cortexa15cortexa7,cortexa17cortexa7,cortexa32, + cortexa35,cortexa53,cortexa57, + cortexa72,cortexa73,exynosm1, + xgene1,cortexa57cortexa53,cortexa72cortexa53, + cortexa73cortexa35,cortexa73cortexa53,cortexa55, + cortexa75,cortexa76,cortexa76ae, + cortexa77,cortexa78,cortexa78ae, + cortexa78c,cortexa710,cortexx1, + cortexx1c,neoversen1,cortexa75cortexa55, + cortexa76cortexa55,neoversev1,neoversen2, + cortexm23,cortexm33,cortexm35p, + cortexm52,cortexm55,starmc1, + cortexm85,cortexr52,cortexr52plus" (const (symbol_ref "((enum attr_tune) arm_tune)"))) diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index 6bdb68a..8737c22 100644 --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -948,12 +948,6 @@ int arm_ld_sched = 0; /* Nonzero if this chip is a StrongARM. */ int arm_tune_strongarm = 0; -/* Nonzero if this chip supports Intel Wireless MMX technology. */ -int arm_arch_iwmmxt = 0; - -/* Nonzero if this chip supports Intel Wireless MMX2 technology. */ -int arm_arch_iwmmxt2 = 0; - /* Nonzero if this chip is an XScale. */ int arm_arch_xscale = 0; @@ -2970,11 +2964,6 @@ arm_option_check_internal (struct gcc_options *opts) { int flags = opts->x_target_flags; - /* iWMMXt and NEON are incompatible. */ - if (TARGET_IWMMXT - && bitmap_bit_p (arm_active_target.isa, isa_bit_neon)) - error ("iWMMXt and NEON are incompatible"); - /* Make sure that the processor choice does not conflict with any of the other command line choices. */ if (TARGET_ARM_P (flags) @@ -2997,10 +2986,6 @@ arm_option_check_internal (struct gcc_options *opts) warning (0, "%<-g%> with %<-mno-apcs-frame%> may not give sensible " "debugging"); - /* iWMMXt unsupported under Thumb mode. */ - if (TARGET_THUMB_P (flags) && TARGET_IWMMXT) - error ("iWMMXt unsupported under Thumb mode"); - if (TARGET_HARD_TP && TARGET_THUMB1_P (flags)) error ("cannot use %<-mtp=cp15%> with 16-bit Thumb"); @@ -3928,8 +3913,6 @@ arm_option_reconfigure_globals (void) arm_arch_thumb1 = bitmap_bit_p (arm_active_target.isa, isa_bit_thumb); arm_arch_thumb2 = bitmap_bit_p (arm_active_target.isa, isa_bit_thumb2); arm_arch_xscale = bitmap_bit_p (arm_active_target.isa, isa_bit_xscale); - arm_arch_iwmmxt = bitmap_bit_p (arm_active_target.isa, isa_bit_iwmmxt); - arm_arch_iwmmxt2 = bitmap_bit_p (arm_active_target.isa, isa_bit_iwmmxt2); arm_arch_thumb_hwdiv = bitmap_bit_p (arm_active_target.isa, isa_bit_tdiv); arm_arch_arm_hwdiv = bitmap_bit_p (arm_active_target.isa, isa_bit_adiv); arm_arch_crc = bitmap_bit_p (arm_active_target.isa, isa_bit_crc32); @@ -3997,12 +3980,6 @@ arm_options_perform_arch_sanity_checks (void) if (arm_arch5t) target_flags &= ~MASK_INTERWORK; - if (TARGET_IWMMXT && !ARM_DOUBLEWORD_ALIGN) - error ("iwmmxt requires an AAPCS compatible ABI for proper operation"); - - if (TARGET_IWMMXT_ABI && !TARGET_IWMMXT) - error ("iwmmxt abi requires an iwmmxt capable cpu"); - /* BPABI targets use linker tricks to allow interworking on cores without thumb support. */ if (TARGET_INTERWORK @@ -4043,9 +4020,7 @@ arm_options_perform_arch_sanity_checks (void) if (TARGET_AAPCS_BASED) { - if (arm_abi == ARM_ABI_IWMMXT) - arm_pcs_default = ARM_PCS_AAPCS_IWMMXT; - else if (TARGET_HARD_FLOAT_ABI) + if (TARGET_HARD_FLOAT_ABI) { arm_pcs_default = ARM_PCS_AAPCS_VFP; if (!bitmap_bit_p (arm_active_target.isa, isa_bit_vfpv2) @@ -4555,11 +4530,6 @@ use_return_insn (int iscond, rtx sibling) if (reg_needs_saving_p (regno)) return 0; - if (TARGET_REALLY_IWMMXT) - for (regno = FIRST_IWMMXT_REGNUM; regno <= LAST_IWMMXT_REGNUM; regno++) - if (reg_needs_saving_p (regno)) - return 0; - return 1; } @@ -6048,9 +6018,6 @@ arm_libcall_value_1 (machine_mode mode) { if (TARGET_AAPCS_BASED) return aapcs_libcall_value (mode); - else if (TARGET_IWMMXT_ABI - && arm_vector_mode_supported_p (mode)) - return gen_rtx_REG (mode, FIRST_IWMMXT_REGNUM); else return gen_rtx_REG (mode, ARG_REGISTER (1)); } @@ -6083,9 +6050,7 @@ arm_function_value_regno_p (const unsigned int regno) || (TARGET_32BIT && TARGET_AAPCS_BASED && TARGET_HARD_FLOAT - && regno == FIRST_VFP_REGNUM) - || (TARGET_IWMMXT_ABI - && regno == FIRST_IWMMXT_REGNUM)) + && regno == FIRST_VFP_REGNUM)) return true; return false; @@ -6102,8 +6067,6 @@ arm_apply_result_size (void) { if (TARGET_HARD_FLOAT_ABI) size += 32; - if (TARGET_IWMMXT_ABI) - size += 8; } return size; @@ -6265,7 +6228,6 @@ const struct pcs_attribute_arg #if 0 /* We could recognize these, but changes would be needed elsewhere * to implement them. */ - {"aapcs-iwmmxt", ARM_PCS_AAPCS_IWMMXT}, {"atpcs", ARM_PCS_ATPCS}, {"apcs", ARM_PCS_APCS}, #endif @@ -7195,26 +7157,12 @@ arm_init_cumulative_args (CUMULATIVE_ARGS *pcum, tree fntype, /* On the ARM, the offset starts at 0. */ pcum->nregs = 0; - pcum->iwmmxt_nregs = 0; pcum->can_split = true; /* Varargs vectors are treated the same as long long. named_count avoids having to change the way arm handles 'named' */ pcum->named_count = 0; pcum->nargs = 0; - - if (TARGET_REALLY_IWMMXT && fntype) - { - tree fn_arg; - - for (fn_arg = TYPE_ARG_TYPES (fntype); - fn_arg; - fn_arg = TREE_CHAIN (fn_arg)) - pcum->named_count += 1; - - if (! pcum->named_count) - pcum->named_count = INT_MAX; - } } /* Return 2 if double word alignment is required for argument passing, @@ -7308,22 +7256,6 @@ arm_function_arg (cumulative_args_t pcum_v, const function_arg_info &arg) return pcum->aapcs_reg; } - /* Varargs vectors are treated the same as long long. - named_count avoids having to change the way arm handles 'named' */ - if (TARGET_IWMMXT_ABI - && arm_vector_mode_supported_p (arg.mode) - && pcum->named_count > pcum->nargs + 1) - { - if (pcum->iwmmxt_nregs <= 9) - return gen_rtx_REG (arg.mode, - pcum->iwmmxt_nregs + FIRST_IWMMXT_REGNUM); - else - { - pcum->can_split = false; - return NULL_RTX; - } - } - /* Put doubleword aligned quantities in even register pairs. */ if ((pcum->nregs & 1) && ARM_DOUBLEWORD_ALIGN) { @@ -7383,9 +7315,6 @@ arm_arg_partial_bytes (cumulative_args_t pcum_v, const function_arg_info &arg) return pcum->aapcs_partial; } - if (TARGET_IWMMXT_ABI && arm_vector_mode_supported_p (arg.mode)) - return 0; - if (NUM_ARG_REGS > nregs && (NUM_ARG_REGS < nregs + ARM_NUM_REGS2 (arg.mode, arg.type)) && pcum->can_split) @@ -7422,12 +7351,7 @@ arm_function_arg_advance (cumulative_args_t pcum_v, else { pcum->nargs += 1; - if (arm_vector_mode_supported_p (arg.mode) - && pcum->named_count > pcum->nargs - && TARGET_IWMMXT_ABI) - pcum->iwmmxt_nregs += 1; - else - pcum->nregs += ARM_NUM_REGS2 (arg.mode, arg.type); + pcum->nregs += ARM_NUM_REGS2 (arg.mode, arg.type); } } @@ -8906,12 +8830,6 @@ arm_legitimate_index_p (machine_mode mode, rtx index, RTX_CODE outer, && INTVAL (index) > -1024 && (INTVAL (index) & 3) == 0); - if (TARGET_REALLY_IWMMXT && VALID_IWMMXT_REG_MODE (mode)) - return (code == CONST_INT - && INTVAL (index) < 1024 - && INTVAL (index) > -1024 - && (INTVAL (index) & 3) == 0); - if (GET_MODE_SIZE (mode) <= 4 && ! (arm_arch4 && (mode == HImode @@ -8991,17 +8909,6 @@ thumb2_legitimate_index_p (machine_mode mode, rtx index, int strict_p) && INTVAL (index) > -256 && (INTVAL (index) & 3) == 0); - if (TARGET_REALLY_IWMMXT && VALID_IWMMXT_REG_MODE (mode)) - { - /* For DImode assume values will usually live in core regs - and only allow LDRD addressing modes. */ - if (!TARGET_LDRD || mode != DImode) - return (code == CONST_INT - && INTVAL (index) < 1024 - && INTVAL (index) > -1024 - && (INTVAL (index) & 3) == 0); - } - /* For quad modes, we restrict the constant offset to be slightly less than what the instruction format permits. We do this because for quad mode moves, we will actually decompose them into two separate @@ -12463,11 +12370,6 @@ arm_register_move_cost (machine_mode mode ATTRIBUTE_UNUSED, if ((IS_VFP_CLASS (from) && !IS_VFP_CLASS (to)) || (!IS_VFP_CLASS (from) && IS_VFP_CLASS (to))) return 15; - else if ((from == IWMMXT_REGS && to != IWMMXT_REGS) - || (from != IWMMXT_REGS && to == IWMMXT_REGS)) - return 4; - else if (from == IWMMXT_GR_REGS || to == IWMMXT_GR_REGS) - return 20; else return 2; } @@ -17583,8 +17485,7 @@ struct minipool_node rtx value; /* The mode of value. */ machine_mode mode; - /* The size of the value. With iWMMXt enabled - sizes > 4 also imply an alignment of 8-bytes. */ + /* The size of the value. */ int fix_size; }; @@ -20247,9 +20148,7 @@ output_move_double (rtx *operands, bool emit, int *count) } else { - /* Use a single insn if we can. - FIXME: IWMMXT allows offsets larger than ldrd can - handle, fix these up with a pair of ldr. */ + /* Use a single insn if we can. */ if (can_ldrd && (TARGET_THUMB2 || !CONST_INT_P (otherops[2]) @@ -20274,9 +20173,7 @@ output_move_double (rtx *operands, bool emit, int *count) } else { - /* Use a single insn if we can. - FIXME: IWMMXT allows offsets larger than ldrd can handle, - fix these up with a pair of ldr. */ + /* Use a single insn if we can. */ if (can_ldrd && (TARGET_THUMB2 || !CONST_INT_P (otherops[2]) @@ -20514,8 +20411,6 @@ output_move_double (rtx *operands, bool emit, int *count) otherops[1] = XEXP (XEXP (XEXP (operands[0], 0), 1), 0); otherops[2] = XEXP (XEXP (XEXP (operands[0], 0), 1), 1); - /* IWMMXT allows offsets larger than strd can handle, - fix these up with a pair of str. */ if (!TARGET_THUMB2 && CONST_INT_P (otherops[2]) && (INTVAL(otherops[2]) <= -256 @@ -21452,34 +21347,6 @@ arm_compute_save_core_reg_mask (void) if (cfun->machine->lr_save_eliminated) save_reg_mask &= ~ (1 << LR_REGNUM); - if (TARGET_REALLY_IWMMXT - && ((bit_count (save_reg_mask) - + ARM_NUM_INTS (crtl->args.pretend_args_size + - arm_compute_static_chain_stack_bytes()) - ) % 2) != 0) - { - /* The total number of registers that are going to be pushed - onto the stack is odd. We need to ensure that the stack - is 64-bit aligned before we start to save iWMMXt registers, - and also before we start to create locals. (A local variable - might be a double or long long which we will load/store using - an iWMMXt instruction). Therefore we need to push another - ARM register, so that the stack will be 64-bit aligned. We - try to avoid using the arg registers (r0 -r3) as they might be - used to pass values in a tail call. */ - for (reg = 4; reg <= 12; reg++) - if ((save_reg_mask & (1 << reg)) == 0) - break; - - if (reg <= 12) - save_reg_mask |= (1 << reg); - else - { - cfun->machine->sibcall_blocked = 1; - save_reg_mask |= (1 << 3); - } - } - /* We may need to push an additional register for use initializing the PIC base register. */ if (TARGET_THUMB2 && IS_NESTED (func_type) && flag_pic @@ -21687,19 +21554,17 @@ output_return_instruction (rtx operand, bool really_return, bool reverse, if ((live_regs_mask & (1 << IP_REGNUM)) == (1 << IP_REGNUM)) { - /* There are three possible reasons for the IP register - being saved. 1) a stack frame was created, in which case - IP contains the old stack pointer, or 2) an ISR routine - corrupted it, or 3) it was saved to align the stack on - iWMMXt. In case 1, restore IP into SP, otherwise just - restore IP. */ + /* There are two possible reasons for the IP register being saved. + 1) a stack frame was created, in which case IP contains the old + stack pointer, or 2) an ISR routine corrupted it. In case 1, + restore IP into SP, otherwise just restore IP. */ if (frame_pointer_needed) { live_regs_mask &= ~ (1 << IP_REGNUM); live_regs_mask |= (1 << SP_REGNUM); } else - gcc_assert (IS_INTERRUPT (func_type) || TARGET_REALLY_IWMMXT); + gcc_assert (IS_INTERRUPT (func_type)); } /* On some ARM architectures it is faster to use LDR rather than @@ -23151,8 +23016,6 @@ arm_compute_frame_layout (void) if (TARGET_32BIT) { - unsigned int regno; - offsets->saved_regs_mask = arm_compute_save_core_reg_mask (); core_saved = bit_count (offsets->saved_regs_mask) * 4; saved = core_saved; @@ -23161,16 +23024,6 @@ arm_compute_frame_layout (void) preserve that condition at any subroutine call. We also require the soft frame pointer to be doubleword aligned. */ - if (TARGET_REALLY_IWMMXT) - { - /* Check for the call-saved iWMMXt registers. */ - for (regno = FIRST_IWMMXT_REGNUM; - regno <= LAST_IWMMXT_REGNUM; - regno++) - if (reg_needs_saving_p (regno)) - saved += 8; - } - func_type = arm_current_func_type (); /* Space for saved VFP registers. */ if (! IS_VOLATILE (func_type) @@ -23386,18 +23239,6 @@ arm_save_coproc_regs(void) int saved_size = 0; unsigned reg; unsigned start_reg; - rtx insn; - - if (TARGET_REALLY_IWMMXT) - for (reg = LAST_IWMMXT_REGNUM; reg >= FIRST_IWMMXT_REGNUM; reg--) - if (reg_needs_saving_p (reg)) - { - insn = gen_rtx_PRE_DEC (Pmode, stack_pointer_rtx); - insn = gen_rtx_MEM (V2SImode, insn); - insn = emit_set_insn (insn, gen_rtx_REG (V2SImode, reg)); - RTX_FRAME_RELATED_P (insn) = 1; - saved_size += 8; - } if (TARGET_VFP_BASE) { @@ -24556,42 +24397,9 @@ arm_print_operand (FILE *stream, rtx x, int code) return; case 'U': - if (!REG_P (x) - || REGNO (x) < FIRST_IWMMXT_GR_REGNUM - || REGNO (x) > LAST_IWMMXT_GR_REGNUM) - /* Bad value for wCG register number. */ - { - output_operand_lossage ("invalid operand for code '%c'", code); - return; - } - - else - fprintf (stream, "%d", REGNO (x) - FIRST_IWMMXT_GR_REGNUM); - return; - - /* Print an iWMMXt control register name. */ case 'w': - if (!CONST_INT_P (x) - || INTVAL (x) < 0 - || INTVAL (x) >= 16) - /* Bad value for wC register number. */ - { - output_operand_lossage ("invalid operand for code '%c'", code); - return; - } - - else - { - static const char * wc_reg_names [16] = - { - "wCID", "wCon", "wCSSF", "wCASF", - "wC4", "wC5", "wC6", "wC7", - "wCGR0", "wCGR1", "wCGR2", "wCGR3", - "wC12", "wC13", "wC14", "wC15" - }; - - fputs (wc_reg_names [INTVAL (x)], stream); - } + /* Former iWMMXT support, removed after GCC-15. */ + output_operand_lossage ("obsolete iWMMXT format code '%c'", code); return; /* Print the high single-precision register of a VFP double-precision @@ -25926,15 +25734,6 @@ arm_hard_regno_mode_ok (unsigned int regno, machine_mode mode) return false; } - if (TARGET_REALLY_IWMMXT) - { - if (IS_IWMMXT_GR_REGNUM (regno)) - return mode == SImode; - - if (IS_IWMMXT_REGNUM (regno)) - return VALID_IWMMXT_REG_MODE (mode); - } - /* We allow almost any value to be stored in the general registers. Restrict doubleword quantities to even register pairs in ARM state so that we can use ldrd. The same restriction applies for MVE @@ -26040,12 +25839,6 @@ arm_regno_class (int regno) return VFP_HI_REGS; } - if (IS_IWMMXT_REGNUM (regno)) - return IWMMXT_REGS; - - if (IS_IWMMXT_GR_REGNUM (regno)) - return IWMMXT_GR_REGS; - return NO_REGS; } @@ -27963,27 +27756,6 @@ arm_expand_epilogue_apcs_frame (bool really_return) gen_rtx_REG (SImode, IP_REGNUM)); } - if (TARGET_IWMMXT) - { - /* The frame pointer is guaranteed to be non-double-word aligned, as - it is set to double-word-aligned old_stack_pointer - 4. */ - rtx_insn *insn; - int lrm_count = (num_regs % 2) ? (num_regs + 2) : (num_regs + 1); - - for (i = LAST_IWMMXT_REGNUM; i >= FIRST_IWMMXT_REGNUM; i--) - if (reg_needs_saving_p (i)) - { - rtx addr = gen_frame_mem (V2SImode, - plus_constant (Pmode, hard_frame_pointer_rtx, - - lrm_count * 4)); - insn = emit_insn (gen_movsi (gen_rtx_REG (V2SImode, i), addr)); - REG_NOTES (insn) = alloc_reg_note (REG_CFA_RESTORE, - gen_rtx_REG (V2SImode, i), - NULL_RTX); - lrm_count += 2; - } - } - /* saved_regs_mask should contain IP which contains old stack pointer at the time of activation creation. Since SP and IP are adjacent registers, we can restore the value directly into SP. */ @@ -28196,23 +27968,6 @@ arm_expand_epilogue (bool really_return) stack_pointer_rtx); } - if (TARGET_IWMMXT) - for (i = FIRST_IWMMXT_REGNUM; i <= LAST_IWMMXT_REGNUM; i++) - if (reg_needs_saving_p (i)) - { - rtx_insn *insn; - rtx addr = gen_rtx_MEM (V2SImode, - gen_rtx_POST_INC (SImode, - stack_pointer_rtx)); - set_mem_alias_set (addr, get_frame_alias_set ()); - insn = emit_insn (gen_movsi (gen_rtx_REG (V2SImode, i), addr)); - REG_NOTES (insn) = alloc_reg_note (REG_CFA_RESTORE, - gen_rtx_REG (V2SImode, i), - NULL_RTX); - arm_add_cfa_adjust_cfa_note (insn, UNITS_PER_WORD, - stack_pointer_rtx, stack_pointer_rtx); - } - if (saved_regs_mask) { rtx insn; @@ -29853,7 +29608,7 @@ arm_vector_mode_supported_p (machine_mode mode) || mode == V8BFmode)) return true; - if ((TARGET_NEON || TARGET_IWMMXT) + if (TARGET_NEON && ((mode == V2SImode) || (mode == V4HImode) || (mode == V8QImode))) @@ -29945,19 +29700,6 @@ arm_preferred_simd_mode (scalar_mode mode) default:; } - if (TARGET_REALLY_IWMMXT) - switch (mode) - { - case E_SImode: - return V2SImode; - case E_HImode: - return V4HImode; - case E_QImode: - return V8QImode; - - default:; - } - if (TARGET_HAVE_MVE) switch (mode) { @@ -30039,12 +29781,6 @@ arm_debugger_regno (unsigned int regno) return 256 + (regno - FIRST_VFP_REGNUM) / 2; } - if (IS_IWMMXT_GR_REGNUM (regno)) - return 104 + regno - FIRST_IWMMXT_GR_REGNUM; - - if (IS_IWMMXT_REGNUM (regno)) - return 112 + regno - FIRST_IWMMXT_REGNUM; - if (IS_PAC_REGNUM (regno)) return DWARF_PAC_REGNUM; @@ -30631,95 +30367,6 @@ arm_output_shift(rtx * operands, int set_flags) return ""; } -/* Output assembly for a WMMX immediate shift instruction. */ -const char * -arm_output_iwmmxt_shift_immediate (const char *insn_name, rtx *operands, bool wror_or_wsra) -{ - int shift = INTVAL (operands[2]); - char templ[50]; - machine_mode opmode = GET_MODE (operands[0]); - - gcc_assert (shift >= 0); - - /* If the shift value in the register versions is > 63 (for D qualifier), - 31 (for W qualifier) or 15 (for H qualifier). */ - if (((opmode == V4HImode) && (shift > 15)) - || ((opmode == V2SImode) && (shift > 31)) - || ((opmode == DImode) && (shift > 63))) - { - if (wror_or_wsra) - { - sprintf (templ, "%s\t%%0, %%1, #%d", insn_name, 32); - output_asm_insn (templ, operands); - if (opmode == DImode) - { - sprintf (templ, "%s\t%%0, %%0, #%d", insn_name, 32); - output_asm_insn (templ, operands); - } - } - else - { - /* The destination register will contain all zeros. */ - sprintf (templ, "wzero\t%%0"); - output_asm_insn (templ, operands); - } - return ""; - } - - if ((opmode == DImode) && (shift > 32)) - { - sprintf (templ, "%s\t%%0, %%1, #%d", insn_name, 32); - output_asm_insn (templ, operands); - sprintf (templ, "%s\t%%0, %%0, #%d", insn_name, shift - 32); - output_asm_insn (templ, operands); - } - else - { - sprintf (templ, "%s\t%%0, %%1, #%d", insn_name, shift); - output_asm_insn (templ, operands); - } - return ""; -} - -/* Output assembly for a WMMX tinsr instruction. */ -const char * -arm_output_iwmmxt_tinsr (rtx *operands) -{ - int mask = INTVAL (operands[3]); - int i; - char templ[50]; - int units = mode_nunits[GET_MODE (operands[0])]; - gcc_assert ((mask & (mask - 1)) == 0); - for (i = 0; i < units; ++i) - { - if ((mask & 0x01) == 1) - { - break; - } - mask >>= 1; - } - gcc_assert (i < units); - { - switch (GET_MODE (operands[0])) - { - case E_V8QImode: - sprintf (templ, "tinsrb%%?\t%%0, %%2, #%d", i); - break; - case E_V4HImode: - sprintf (templ, "tinsrh%%?\t%%0, %%2, #%d", i); - break; - case E_V2SImode: - sprintf (templ, "tinsrw%%?\t%%0, %%2, #%d", i); - break; - default: - gcc_unreachable (); - break; - } - output_asm_insn (templ, operands); - } - return ""; -} - /* Output an arm casesi dispatch sequence. Used by arm_casesi_internal insn. Responsible for the handling of switch statements in arm. */ const char * @@ -31092,26 +30739,6 @@ arm_conditional_register_usage (void) fixed_regs[VPR_REGNUM] = 0; } - if (TARGET_REALLY_IWMMXT && !TARGET_GENERAL_REGS_ONLY) - { - regno = FIRST_IWMMXT_GR_REGNUM; - /* The 2002/10/09 revision of the XScale ABI has wCG0 - and wCG1 as call-preserved registers. The 2002/11/21 - revision changed this so that all wCG registers are - scratch registers. */ - for (regno = FIRST_IWMMXT_GR_REGNUM; - regno <= LAST_IWMMXT_GR_REGNUM; ++ regno) - fixed_regs[regno] = 0; - /* The XScale ABI has wR0 - wR9 as scratch registers, - the rest as call-preserved registers. */ - for (regno = FIRST_IWMMXT_REGNUM; - regno <= LAST_IWMMXT_REGNUM; ++ regno) - { - fixed_regs[regno] = 0; - call_used_regs[regno] = regno < FIRST_IWMMXT_REGNUM + 10; - } - } - if ((unsigned) PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM) { fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 08d3f0d..2e9d678 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -137,13 +137,6 @@ emission of floating point pcs attributes. */ #define TARGET_MAYBE_HARD_FLOAT (arm_float_abi != ARM_FLOAT_ABI_SOFT) /* Use hardware floating point calling convention. */ #define TARGET_HARD_FLOAT_ABI (arm_float_abi == ARM_FLOAT_ABI_HARD) -#define TARGET_IWMMXT (arm_arch_iwmmxt) -#define TARGET_IWMMXT2 (arm_arch_iwmmxt2) -#define TARGET_REALLY_IWMMXT (TARGET_IWMMXT && TARGET_32BIT \ - && !TARGET_GENERAL_REGS_ONLY) -#define TARGET_REALLY_IWMMXT2 (TARGET_IWMMXT2 && TARGET_32BIT \ - && !TARGET_GENERAL_REGS_ONLY) -#define TARGET_IWMMXT_ABI (TARGET_32BIT && arm_abi == ARM_ABI_IWMMXT) #define TARGET_ARM (! TARGET_THUMB) #define TARGET_EITHER 1 /* (TARGET_ARM | TARGET_THUMB) */ #define TARGET_BACKTRACE (crtl->is_leaf \ @@ -526,12 +519,6 @@ extern int arm_ld_sched; /* Nonzero if this chip is a StrongARM. */ extern int arm_tune_strongarm; -/* Nonzero if this chip supports Intel XScale with Wireless MMX technology. */ -extern int arm_arch_iwmmxt; - -/* Nonzero if this chip supports Intel Wireless MMX2 technology. */ -extern int arm_arch_iwmmxt2; - /* Nonzero if this chip is an XScale. */ extern int arm_arch_xscale; @@ -855,10 +842,6 @@ extern const int arm_arch_cde_coproc_bits[]; 1,1,1,1,1,1,1,1, \ 1,1,1,1,1,1,1,1, \ 1,1,1,1,1,1,1,1, \ - /* IWMMXT regs. */ \ - 1,1,1,1,1,1,1,1, \ - 1,1,1,1,1,1,1,1, \ - 1,1,1,1, \ /* Specials. */ \ 1,1,1,1,1,1,1,1 \ } @@ -885,10 +868,6 @@ extern const int arm_arch_cde_coproc_bits[]; 1,1,1,1,1,1,1,1, \ 1,1,1,1,1,1,1,1, \ 1,1,1,1,1,1,1,1, \ - /* IWMMXT regs. */ \ - 1,1,1,1,1,1,1,1, \ - 1,1,1,1,1,1,1,1, \ - 1,1,1,1, \ /* Specials. */ \ 1,1,1,1,1,1,1,1 \ } @@ -1010,23 +989,11 @@ extern const int arm_arch_cde_coproc_bits[]; /* Register to use for pushing function arguments. */ #define STACK_POINTER_REGNUM SP_REGNUM -#define FIRST_IWMMXT_REGNUM (LAST_HI_VFP_REGNUM + 1) -#define LAST_IWMMXT_REGNUM (FIRST_IWMMXT_REGNUM + 15) - -/* Need to sync with WCGR in iwmmxt.md. */ -#define FIRST_IWMMXT_GR_REGNUM (LAST_IWMMXT_REGNUM + 1) -#define LAST_IWMMXT_GR_REGNUM (FIRST_IWMMXT_GR_REGNUM + 3) - -#define IS_IWMMXT_REGNUM(REGNUM) \ - (((REGNUM) >= FIRST_IWMMXT_REGNUM) && ((REGNUM) <= LAST_IWMMXT_REGNUM)) -#define IS_IWMMXT_GR_REGNUM(REGNUM) \ - (((REGNUM) >= FIRST_IWMMXT_GR_REGNUM) && ((REGNUM) <= LAST_IWMMXT_GR_REGNUM)) - /* Base register for access to local variables of the function. */ -#define FRAME_POINTER_REGNUM 102 +#define FRAME_POINTER_REGNUM (CC_REGNUM + 2) /* Base register for access to arguments of the function. */ -#define ARG_POINTER_REGNUM 103 +#define ARG_POINTER_REGNUM (FRAME_POINTER_REGNUM + 1) #define FIRST_VFP_REGNUM 16 #define D7_VFP_REGNUM (FIRST_VFP_REGNUM + 15) @@ -1067,9 +1034,8 @@ extern const int arm_arch_cde_coproc_bits[]; /* The number of hard registers is 16 ARM + 1 CC + 1 SFP + 1 AFP + 1 APSRQ + 1 APSRGE + 1 VPR + 1 Pseudo register to save PAC. */ -/* Intel Wireless MMX Technology registers add 16 + 4 more. */ /* VFP (VFP3) adds 32 (64) + 1 VFPCC. */ -#define FIRST_PSEUDO_REGISTER 108 +#define FIRST_PSEUDO_REGISTER 88 #define DWARF_PAC_REGNUM 143 @@ -1086,9 +1052,6 @@ extern const int arm_arch_cde_coproc_bits[]; #define SUBTARGET_FRAME_POINTER_REQUIRED 0 #endif -#define VALID_IWMMXT_REG_MODE(MODE) \ - (arm_vector_mode_supported_p (MODE) || (MODE) == DImode) - /* Modes valid for Neon D registers. */ #define VALID_NEON_DREG_MODE(MODE) \ ((MODE) == V2SImode || (MODE) == V4HImode || (MODE) == V8QImode \ @@ -1168,9 +1131,9 @@ extern const int arm_arch_cde_coproc_bits[]; /* The conditions under which vector modes are supported for general arithmetic by any vector extension. */ -#define ARM_HAVE_V8QI_ARITH (ARM_HAVE_NEON_V8QI_ARITH || TARGET_REALLY_IWMMXT) -#define ARM_HAVE_V4HI_ARITH (ARM_HAVE_NEON_V4HI_ARITH || TARGET_REALLY_IWMMXT) -#define ARM_HAVE_V2SI_ARITH (ARM_HAVE_NEON_V2SI_ARITH || TARGET_REALLY_IWMMXT) +#define ARM_HAVE_V8QI_ARITH (ARM_HAVE_NEON_V8QI_ARITH) +#define ARM_HAVE_V4HI_ARITH (ARM_HAVE_NEON_V4HI_ARITH) +#define ARM_HAVE_V2SI_ARITH (ARM_HAVE_NEON_V2SI_ARITH) #define ARM_HAVE_V16QI_ARITH (ARM_HAVE_NEON_V16QI_ARITH || TARGET_HAVE_MVE) #define ARM_HAVE_V8HI_ARITH (ARM_HAVE_NEON_V8HI_ARITH || TARGET_HAVE_MVE) @@ -1204,9 +1167,9 @@ extern const int arm_arch_cde_coproc_bits[]; /* The conditions under which vector modes are supported by load/store instructions by any vector extension. */ -#define ARM_HAVE_V8QI_LDST (ARM_HAVE_NEON_V8QI_LDST || TARGET_REALLY_IWMMXT) -#define ARM_HAVE_V4HI_LDST (ARM_HAVE_NEON_V4HI_LDST || TARGET_REALLY_IWMMXT) -#define ARM_HAVE_V2SI_LDST (ARM_HAVE_NEON_V2SI_LDST || TARGET_REALLY_IWMMXT) +#define ARM_HAVE_V8QI_LDST (ARM_HAVE_NEON_V8QI_LDST) +#define ARM_HAVE_V4HI_LDST (ARM_HAVE_NEON_V4HI_LDST) +#define ARM_HAVE_V2SI_LDST (ARM_HAVE_NEON_V2SI_LDST) #define ARM_HAVE_V16QI_LDST (ARM_HAVE_NEON_V16QI_LDST || TARGET_HAVE_MVE) #define ARM_HAVE_V8HI_LDST (ARM_HAVE_NEON_V8HI_LDST || TARGET_HAVE_MVE) @@ -1238,8 +1201,6 @@ extern int arm_regs_in_sequence[]; function. */ #define VREG(X) (FIRST_VFP_REGNUM + (X)) -#define WREG(X) (FIRST_IWMMXT_REGNUM + (X)) -#define WGREG(X) (FIRST_IWMMXT_GR_REGNUM + (X)) #define REG_ALLOC_ORDER \ { \ @@ -1265,12 +1226,6 @@ extern int arm_regs_in_sequence[]; VREG(20), VREG(21), VREG(22), VREG(23), \ VREG(24), VREG(25), VREG(26), VREG(27), \ VREG(28), VREG(29), VREG(30), VREG(31), \ - /* IWMMX registers. */ \ - WREG(0), WREG(1), WREG(2), WREG(3), \ - WREG(4), WREG(5), WREG(6), WREG(7), \ - WREG(8), WREG(9), WREG(10), WREG(11), \ - WREG(12), WREG(13), WREG(14), WREG(15), \ - WGREG(0), WGREG(1), WGREG(2), WGREG(3), \ /* Registers not for general use. */ \ CC_REGNUM, VFPCC_REGNUM, \ FRAME_POINTER_REGNUM, ARG_POINTER_REGNUM, \ @@ -1315,8 +1270,6 @@ enum reg_class VFP_LO_REGS, VFP_HI_REGS, VFP_REGS, - IWMMXT_REGS, - IWMMXT_GR_REGS, CC_REG, VFPCC_REG, SFP_REG, @@ -1346,8 +1299,6 @@ enum reg_class "VFP_LO_REGS", \ "VFP_HI_REGS", \ "VFP_REGS", \ - "IWMMXT_REGS", \ - "IWMMXT_GR_REGS", \ "CC_REG", \ "VFPCC_REG", \ "SFP_REG", \ @@ -1363,29 +1314,27 @@ enum reg_class of length N_REG_CLASSES. */ #define REG_CLASS_CONTENTS \ { \ - { 0x00000000, 0x00000000, 0x00000000, 0x00000000 }, /* NO_REGS */ \ - { 0x000000FF, 0x00000000, 0x00000000, 0x00000000 }, /* LO_REGS */ \ - { 0x00002000, 0x00000000, 0x00000000, 0x00000000 }, /* STACK_REG */ \ - { 0x000020FF, 0x00000000, 0x00000000, 0x00000000 }, /* BASE_REGS */ \ - { 0x00005F00, 0x00000000, 0x00000000, 0x00000000 }, /* HI_REGS */ \ - { 0x0000100F, 0x00000000, 0x00000000, 0x00000000 }, /* CALLER_SAVE_REGS */ \ - { 0x00005555, 0x00000000, 0x00000000, 0x00000000 }, /* EVEN_REGS. */ \ - { 0x00005FFF, 0x00000000, 0x00000000, 0x00000000 }, /* GENERAL_REGS */ \ - { 0x00007FFF, 0x00000000, 0x00000000, 0x00000000 }, /* CORE_REGS */ \ - { 0xFFFF0000, 0x00000000, 0x00000000, 0x00000000 }, /* VFP_D0_D7_REGS */ \ - { 0xFFFF0000, 0x0000FFFF, 0x00000000, 0x00000000 }, /* VFP_LO_REGS */ \ - { 0x00000000, 0xFFFF0000, 0x0000FFFF, 0x00000000 }, /* VFP_HI_REGS */ \ - { 0xFFFF0000, 0xFFFFFFFF, 0x0000FFFF, 0x00000000 }, /* VFP_REGS */ \ - { 0x00000000, 0x00000000, 0xFFFF0000, 0x00000000 }, /* IWMMXT_REGS */ \ - { 0x00000000, 0x00000000, 0x00000000, 0x0000000F }, /* IWMMXT_GR_REGS */ \ - { 0x00000000, 0x00000000, 0x00000000, 0x00000010 }, /* CC_REG */ \ - { 0x00000000, 0x00000000, 0x00000000, 0x00000020 }, /* VFPCC_REG */ \ - { 0x00000000, 0x00000000, 0x00000000, 0x00000040 }, /* SFP_REG */ \ - { 0x00000000, 0x00000000, 0x00000000, 0x00000080 }, /* AFP_REG */ \ - { 0x00000000, 0x00000000, 0x00000000, 0x00000400 }, /* VPR_REG. */ \ - { 0x00000000, 0x00000000, 0x00000000, 0x00000800 }, /* PAC_REG. */ \ - { 0x00005FFF, 0x00000000, 0x00000000, 0x00000400 }, /* GENERAL_AND_VPR_REGS. */ \ - { 0xFFFF7FFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000040F } /* ALL_REGS. */ \ + { 0x00000000, 0x00000000, 0x00000000 }, /* NO_REGS */ \ + { 0x000000FF, 0x00000000, 0x00000000 }, /* LO_REGS */ \ + { 0x00002000, 0x00000000, 0x00000000 }, /* STACK_REG */ \ + { 0x000020FF, 0x00000000, 0x00000000 }, /* BASE_REGS */ \ + { 0x00005F00, 0x00000000, 0x00000000 }, /* HI_REGS */ \ + { 0x0000100F, 0x00000000, 0x00000000 }, /* CALLER_SAVE_REGS */ \ + { 0x00005555, 0x00000000, 0x00000000 }, /* EVEN_REGS. */ \ + { 0x00005FFF, 0x00000000, 0x00000000 }, /* GENERAL_REGS */ \ + { 0x00007FFF, 0x00000000, 0x00000000 }, /* CORE_REGS */ \ + { 0xFFFF0000, 0x00000000, 0x00000000 }, /* VFP_D0_D7_REGS */ \ + { 0xFFFF0000, 0x0000FFFF, 0x00000000 }, /* VFP_LO_REGS */ \ + { 0x00000000, 0xFFFF0000, 0x0000FFFF }, /* VFP_HI_REGS */ \ + { 0xFFFF0000, 0xFFFFFFFF, 0x0000FFFF }, /* VFP_REGS */ \ + { 0x00000000, 0x00000000, 0x00010000 }, /* CC_REG */ \ + { 0x00000000, 0x00000000, 0x00020000 }, /* VFPCC_REG */ \ + { 0x00000000, 0x00000000, 0x00040000 }, /* SFP_REG */ \ + { 0x00000000, 0x00000000, 0x00080000 }, /* AFP_REG */ \ + { 0x00000000, 0x00000000, 0x00400000 }, /* VPR_REG. */ \ + { 0x00000000, 0x00000000, 0x00800000 }, /* PAC_REG. */ \ + { 0x00005FFF, 0x00000000, 0x00400000 }, /* GENERAL_AND_VPR_REGS. */ \ + { 0xFFFF7FFF, 0xFFFFFFFF, 0x0040FFFF } /* ALL_REGS. */ \ } #define FP_SYSREGS \ @@ -1460,39 +1409,34 @@ extern const char *fp_sysreg_names[NB_FP_SYSREGS]; /* Return the register class of a scratch register needed to copy IN into or out of a register in CLASS in MODE. If it can be done directly, NO_REGS is returned. */ -#define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \ - /* Restrict which direct reloads are allowed for VFP/iWMMXt regs. */ \ - ((TARGET_HARD_FLOAT && IS_VFP_CLASS (CLASS)) \ - ? coproc_secondary_reload_class (MODE, X, FALSE) \ - : (TARGET_IWMMXT && (CLASS) == IWMMXT_REGS) \ - ? coproc_secondary_reload_class (MODE, X, TRUE) \ - : TARGET_32BIT \ - ? (((MODE) == HImode && ! arm_arch4 && true_regnum (X) == -1) \ - ? GENERAL_REGS : NO_REGS) \ - : THUMB_SECONDARY_OUTPUT_RELOAD_CLASS (CLASS, MODE, X)) +#define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \ + /* Restrict which direct reloads are allowed for VFP regs. */ \ + ((TARGET_HARD_FLOAT && IS_VFP_CLASS (CLASS)) \ + ? coproc_secondary_reload_class (MODE, X, FALSE) \ + : (TARGET_32BIT \ + ? (((MODE) == HImode && ! arm_arch4 && true_regnum (X) == -1) \ + ? GENERAL_REGS \ + : NO_REGS) \ + : THUMB_SECONDARY_OUTPUT_RELOAD_CLASS (CLASS, MODE, X))) /* If we need to load shorts byte-at-a-time, then we need a scratch. */ -#define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \ - /* Restrict which direct reloads are allowed for VFP/iWMMXt regs. */ \ - ((TARGET_HARD_FLOAT && IS_VFP_CLASS (CLASS)) \ - ? coproc_secondary_reload_class (MODE, X, FALSE) : \ - (TARGET_IWMMXT && (CLASS) == IWMMXT_REGS) ? \ - coproc_secondary_reload_class (MODE, X, TRUE) : \ - (TARGET_32BIT ? \ - (((CLASS) == IWMMXT_REGS || (CLASS) == IWMMXT_GR_REGS) \ - && CONSTANT_P (X)) \ - ? GENERAL_REGS : \ - (((MODE) == HImode && ! arm_arch4 \ - && (MEM_P (X) \ - || ((REG_P (X) || GET_CODE (X) == SUBREG) \ - && true_regnum (X) == -1))) \ - ? GENERAL_REGS : NO_REGS) \ - : THUMB_SECONDARY_INPUT_RELOAD_CLASS (CLASS, MODE, X))) +#define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \ + /* Restrict which direct reloads are allowed for VFP regs. */ \ + ((TARGET_HARD_FLOAT && IS_VFP_CLASS (CLASS)) \ + ? coproc_secondary_reload_class (MODE, X, FALSE) \ + : (TARGET_32BIT \ + ? (((MODE) == HImode \ + && ! arm_arch4 \ + && (MEM_P (X) \ + || ((REG_P (X) || GET_CODE (X) == SUBREG) \ + && true_regnum (X) == -1))) \ + ? GENERAL_REGS \ + : NO_REGS) \ + : THUMB_SECONDARY_INPUT_RELOAD_CLASS (CLASS, MODE, X))) /* Return the maximum number of consecutive registers needed to represent mode MODE in a register of class CLASS. - ARM regs are UNITS_PER_WORD bits. - FIXME: Is this true for iWMMX? */ + ARM regs are UNITS_PER_WORD bits. */ #define CLASS_MAX_NREGS(CLASS, MODE) \ (CLASS == VPR_REG) \ ? CEIL (GET_MODE_SIZE (MODE), 2) \ @@ -1672,7 +1616,6 @@ enum arm_pcs { ARM_PCS_AAPCS, /* Base standard AAPCS. */ ARM_PCS_AAPCS_VFP, /* Use VFP registers for floating point values. */ - ARM_PCS_AAPCS_IWMMXT, /* Use iWMMXT registers for vectors. */ /* This must be the last AAPCS variant. */ ARM_PCS_AAPCS_LOCAL, /* Private call within this compilation unit. */ ARM_PCS_ATPCS, /* ATPCS. */ @@ -1690,8 +1633,6 @@ typedef struct { /* This is the number of registers of arguments scanned so far. */ int nregs; - /* This is the number of iWMMXt register arguments scanned so far. */ - int iwmmxt_nregs; int named_count; int nargs; /* Which procedure call variant to use for this call. */ @@ -1739,9 +1680,7 @@ typedef struct #define FUNCTION_ARG_REGNO_P(REGNO) \ (IN_RANGE ((REGNO), 0, 3) \ || (TARGET_AAPCS_BASED && TARGET_HARD_FLOAT \ - && IN_RANGE ((REGNO), FIRST_VFP_REGNUM, FIRST_VFP_REGNUM + 15)) \ - || (TARGET_IWMMXT_ABI \ - && IN_RANGE ((REGNO), FIRST_IWMMXT_REGNUM, FIRST_IWMMXT_REGNUM + 9))) + && IN_RANGE ((REGNO), FIRST_VFP_REGNUM, FIRST_VFP_REGNUM + 15))) /* If your target environment doesn't prefix user functions with an diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md index 597ef67..5e5e112 100644 --- a/gcc/config/arm/arm.md +++ b/gcc/config/arm/arm.md @@ -37,12 +37,12 @@ (LR_REGNUM 14) ; Return address register (PC_REGNUM 15) ; Program counter (LAST_ARM_REGNUM 15) ; - (CC_REGNUM 100) ; Condition code pseudo register - (VFPCC_REGNUM 101) ; VFP Condition code pseudo register - (APSRQ_REGNUM 104) ; Q bit pseudo register - (APSRGE_REGNUM 105) ; GE bits pseudo register - (VPR_REGNUM 106) ; Vector Predication Register - MVE register. - (RA_AUTH_CODE 107) ; Pseudo register to save PAC. + (CC_REGNUM 80) ; Condition code pseudo register + (VFPCC_REGNUM 81) ; VFP Condition code pseudo register + (APSRQ_REGNUM 84) ; Q bit pseudo register + (APSRGE_REGNUM 85) ; GE bits pseudo register + (VPR_REGNUM 86) ; Vector Predication Register - MVE register. + (RA_AUTH_CODE 87) ; Pseudo register to save PAC. ] ) ;; 3rd operand to select_dominance_cc_mode @@ -149,7 +149,7 @@ ; This attribute is used to compute attribute "enabled", ; use type "any" to enable an alternative in all cases. (define_attr "arch" "any, a, t, 32, t1, t2, v6,nov6, v6t2, \ - v8mb, fix_vlldm, iwmmxt, iwmmxt2, armv6_or_vfpv3, \ + v8mb, fix_vlldm, armv6_or_vfpv3, \ neon, mve" (const_string "any")) @@ -197,10 +197,6 @@ (match_test "fix_vlldm")) (const_string "yes") - (and (eq_attr "arch" "iwmmxt2") - (match_test "TARGET_REALLY_IWMMXT2")) - (const_string "yes") - (and (eq_attr "arch" "armv6_or_vfpv3") (match_test "arm_arch6 || TARGET_VFP3")) (const_string "yes") @@ -362,18 +358,7 @@ alus_ext, alus_imm, alus_sreg,\ alus_shift_imm, alus_shift_reg, bfm, csel, rev, logic_imm, logic_reg,\ logic_shift_imm, logic_shift_reg, logics_imm, logics_reg,\ - logics_shift_imm, logics_shift_reg, extend, shift_imm, float, fcsel,\ - wmmx_wor, wmmx_wxor, wmmx_wand, wmmx_wandn, wmmx_wmov, wmmx_tmcrr,\ - wmmx_tmrrc, wmmx_wldr, wmmx_wstr, wmmx_tmcr, wmmx_tmrc, wmmx_wadd,\ - wmmx_wsub, wmmx_wmul, wmmx_wmac, wmmx_wavg2, wmmx_tinsr, wmmx_textrm,\ - wmmx_wshufh, wmmx_wcmpeq, wmmx_wcmpgt, wmmx_wmax, wmmx_wmin, wmmx_wpack,\ - wmmx_wunpckih, wmmx_wunpckil, wmmx_wunpckeh, wmmx_wunpckel, wmmx_wror,\ - wmmx_wsra, wmmx_wsrl, wmmx_wsll, wmmx_wmadd, wmmx_tmia, wmmx_tmiaph,\ - wmmx_tmiaxy, wmmx_tbcst, wmmx_tmovmsk, wmmx_wacc, wmmx_waligni,\ - wmmx_walignr, wmmx_tandc, wmmx_textrc, wmmx_torc, wmmx_torvsc, wmmx_wsad,\ - wmmx_wabs, wmmx_wabsdiff, wmmx_waddsubhx, wmmx_wsubaddhx, wmmx_wavg4,\ - wmmx_wmulw, wmmx_wqmulm, wmmx_wqmulwm, wmmx_waddbhus, wmmx_wqmiaxy,\ - wmmx_wmiaxy, wmmx_wmiawxy, wmmx_wmerge") + logics_shift_imm, logics_shift_reg, extend, shift_imm, float, fcsel") (const_string "single") (const_string "multi"))) @@ -435,7 +420,6 @@ (const_string "yes") (const_string "no")))) -(include "marvell-f-iwmmxt.md") (include "arm-generic.md") (include "arm926ejs.md") (include "arm1020e.md") @@ -2893,14 +2877,12 @@ ;; Split DImode and, ior, xor operations. Simply perform the logical ;; operation on the upper and lower halves of the registers. ;; This is needed for atomic operations in arm_split_atomic_op. -;; Avoid splitting IWMMXT instructions. (define_split [(set (match_operand:DI 0 "s_register_operand" "") (match_operator:DI 6 "logical_binary_operator" [(match_operand:DI 1 "s_register_operand" "") (match_operand:DI 2 "s_register_operand" "")]))] - "TARGET_32BIT && reload_completed - && ! IS_IWMMXT_REGNUM (REGNO (operands[0]))" + "TARGET_32BIT && reload_completed" [(set (match_dup 0) (match_op_dup:SI 6 [(match_dup 1) (match_dup 2)])) (set (match_dup 3) (match_op_dup:SI 6 [(match_dup 4) (match_dup 5)]))] " @@ -6345,7 +6327,6 @@ "TARGET_32BIT && !(TARGET_HARD_FLOAT) && !(TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT) - && !TARGET_IWMMXT && ( register_operand (operands[0], DImode) || register_operand (operands[1], DImode))" "* @@ -6554,7 +6535,7 @@ (define_insn "*arm_movsi_insn" [(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,r,r,rk,m") (match_operand:SI 1 "general_operand" "rk, I,K,j,mi,rk"))] - "TARGET_ARM && !TARGET_IWMMXT && !TARGET_HARD_FLOAT + "TARGET_ARM && !TARGET_HARD_FLOAT && ( register_operand (operands[0], SImode) || register_operand (operands[1], SImode))" "@ @@ -13123,10 +13104,8 @@ [(set_attr "conds" "unconditional") (set_attr "type" "nop")]) -;; Vector bits common to IWMMXT, Neon and MVE +;; Vector bits common to Neon and MVE (include "vec-common.md") -;; Load the Intel Wireless Multimedia Extension patterns -(include "iwmmxt.md") ;; Load the VFP co-processor patterns (include "vfp.md") ;; Thumb-1 patterns diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt index 042cb54..d5eeeae 100644 --- a/gcc/config/arm/arm.opt +++ b/gcc/config/arm/arm.opt @@ -58,9 +58,6 @@ EnumValue Enum(arm_abi_type) String(aapcs) Value(ARM_ABI_AAPCS) EnumValue -Enum(arm_abi_type) String(iwmmxt) Value(ARM_ABI_IWMMXT) - -EnumValue Enum(arm_abi_type) String(aapcs-linux) Value(ARM_ABI_AAPCS_LINUX) mabort-on-noreturn diff --git a/gcc/config/arm/constraints.md b/gcc/config/arm/constraints.md index 9f1a37a..24743a8 100644 --- a/gcc/config/arm/constraints.md +++ b/gcc/config/arm/constraints.md @@ -19,11 +19,12 @@ ;; <http://www.gnu.org/licenses/>. ;; The following register constraints have been used: -;; - in ARM/Thumb-2 state: t, w, x, y, z +;; - in ARM/Thumb-2 state: t, w, x ;; - in Thumb state: h, b ;; - in both states: l, c, k, q, Cs, Ts, US ;; In ARM state, 'l' is an alias for 'r' ;; 'f' and 'v' were previously used for FPA and MAVERICK registers. +;; 'y' and 'z' were previously used for iWMMX registers (removed after gcc-15) ;; The following normal constraints have been used: ;; in ARM/Thumb-2 state: G, I, j, J, K, L, M @@ -39,7 +40,7 @@ ;; in all states: Pg ;; The following memory constraints have been used: -;; in ARM/Thumb-2 state: Uh, Ut, Uv, Uy, Un, Um, Us, Uo, Up, Uf, Ux, Ul, Uz +;; in ARM/Thumb-2 state: Uh, Ut, Uv, Un, Um, Us, Uo, Up, Uf, Ux, Ul, Uz ;; in ARM state: Uq ;; in Thumb state: Uu, Uw ;; in all states: Q @@ -112,13 +113,6 @@ (define_register_constraint "x" "TARGET_32BIT ? VFP_D0_D7_REGS : NO_REGS" "The VFP registers @code{d0}-@code{d7}.") -(define_register_constraint "y" "TARGET_REALLY_IWMMXT ? IWMMXT_REGS : NO_REGS" - "The Intel iWMMX co-processor registers.") - -(define_register_constraint "z" - "TARGET_REALLY_IWMMXT ? IWMMXT_GR_REGS : NO_REGS" - "The Intel iWMMX GR registers.") - (define_register_constraint "l" "TARGET_THUMB ? LO_REGS : GENERAL_REGS" "In Thumb state the core registers @code{r0}-@code{r7}.") @@ -478,12 +472,6 @@ ? arm_coproc_mem_operand_no_writeback (op) : neon_vector_mem_operand (op, 2, true)"))) -(define_memory_constraint "Uy" - "@internal - In ARM/Thumb-2 state a valid iWMMX load/store address." - (and (match_code "mem") - (match_test "TARGET_32BIT && arm_coproc_mem_operand (op, TRUE)"))) - (define_memory_constraint "Un" "@internal In ARM/Thumb-2 state a valid address for Neon doubleword vector diff --git a/gcc/config/arm/iterators.md b/gcc/config/arm/iterators.md index 743fe48..0c163ed 100644 --- a/gcc/config/arm/iterators.md +++ b/gcc/config/arm/iterators.md @@ -59,30 +59,25 @@ ;; A list of modes which the VFP unit can handle (define_mode_iterator SDF [(SF "") (DF "TARGET_VFP_DOUBLE")]) -;; Integer element sizes implemented by IWMMXT. -(define_mode_iterator VMMX [V2SI V4HI V8QI]) - -(define_mode_iterator VMMX2 [V4HI V2SI]) - ;; Integer element sizes for shifts. (define_mode_iterator VSHFT [V4HI V2SI DI]) -;; Integer and float modes supported by Neon and IWMMXT. +;; Integer and float modes supported by Neon. (define_mode_iterator VALL [V2DI V2SI V4HI V8QI V2SF V4SI V8HI V16QI V4SF]) -;; Integer and float modes supported by Neon, IWMMXT and MVE. +;; Integer and float modes supported by Neon and MVE. (define_mode_iterator VNIM1 [V16QI V8HI V4SI V4SF V2DI]) -;; Integer and float modes supported by Neon and IWMMXT but not MVE. +;; Integer and float modes supported by Neon but not MVE. (define_mode_iterator VNINOTM1 [V2SI V4HI V8QI V2SF]) -;; Integer and float modes supported by Neon and IWMMXT, except V2DI. +;; Integer and float modes supported by Neon, except V2DI. (define_mode_iterator VALLW [V2SI V4HI V8QI V2SF V4SI V8HI V16QI V4SF]) -;; Integer modes supported by Neon and IWMMXT +;; Integer modes supported by Neon (define_mode_iterator VINT [V2DI V2SI V4HI V8QI V4SI V8HI V16QI]) -;; Integer modes supported by Neon and IWMMXT, except V2DI +;; Integer modes supported by Neon, except V2DI (define_mode_iterator VINTW [V2SI V4HI V8QI V4SI V8HI V16QI]) ;; Double-width vector modes, on which we support arithmetic (no HF!) @@ -1644,9 +1639,6 @@ ;; distinguishes between 16-bit Thumb and 32-bit Thumb/ARM. (define_mode_attr arch [(CC_Z "32") (SI "t1")]) -;; Determine element size suffix from vector mode. -(define_mode_attr MMX_char [(V8QI "b") (V4HI "h") (V2SI "w") (DI "d")]) - ;; vtbl<n> suffix for NEON vector modes. (define_mode_attr VTAB_n [(TI "2") (EI "3") (OI "4")]) diff --git a/gcc/config/arm/iwmmxt.md b/gcc/config/arm/iwmmxt.md deleted file mode 100644 index 0aa5dcd..0000000 --- a/gcc/config/arm/iwmmxt.md +++ /dev/null @@ -1,1766 +0,0 @@ -;; Patterns for the Intel Wireless MMX technology architecture. -;; Copyright (C) 2003-2025 Free Software Foundation, Inc. -;; Contributed by Red Hat. - -;; This file is part of GCC. - -;; GCC is free software; you can redistribute it and/or modify it under -;; the terms of the GNU General Public License as published by the Free -;; Software Foundation; either version 3, or (at your option) any later -;; version. - -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; <http://www.gnu.org/licenses/>. - -;; Register numbers. Need to sync with FIRST_IWMMXT_GR_REGNUM in arm.h -(define_constants - [(WCGR0 96) - (WCGR1 97) - (WCGR2 98) - (WCGR3 99) - ] -) - -(define_insn "tbcstv8qi" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (vec_duplicate:V8QI (match_operand:QI 1 "s_register_operand" "r")))] - "TARGET_REALLY_IWMMXT" - "tbcstb%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tbcst")] -) - -(define_insn "tbcstv4hi" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_duplicate:V4HI (match_operand:HI 1 "s_register_operand" "r")))] - "TARGET_REALLY_IWMMXT" - "tbcsth%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tbcst")] -) - -(define_insn "tbcstv2si" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (vec_duplicate:V2SI (match_operand:SI 1 "s_register_operand" "r")))] - "TARGET_REALLY_IWMMXT" - "tbcstw%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tbcst")] -) - -(define_insn "iwmmxt_iordi3" - [(set (match_operand:DI 0 "register_operand" "=y") - (ior:DI (match_operand:DI 1 "register_operand" "%y") - (match_operand:DI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wor%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "length" "4") - (set_attr "type" "wmmx_wor")] -) - -(define_insn "iwmmxt_xordi3" - [(set (match_operand:DI 0 "register_operand" "=y") - (xor:DI (match_operand:DI 1 "register_operand" "%y") - (match_operand:DI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wxor%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "length" "4") - (set_attr "type" "wmmx_wxor")] -) - -(define_insn "iwmmxt_anddi3" - [(set (match_operand:DI 0 "register_operand" "=y") - (and:DI (match_operand:DI 1 "register_operand" "%y") - (match_operand:DI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wand%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "length" "4") - (set_attr "type" "wmmx_wand")] -) - -(define_insn "iwmmxt_nanddi3" - [(set (match_operand:DI 0 "register_operand" "=y") - (and:DI (match_operand:DI 1 "register_operand" "y") - (not:DI (match_operand:DI 2 "register_operand" "y"))))] - "TARGET_REALLY_IWMMXT" - "wandn%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wandn")] -) - -(define_insn "*iwmmxt_arm_movdi" - [(set (match_operand:DI 0 "nonimmediate_di_operand" "=r, r, r, r, m,y,y,r, y,Uy,*w, r,*w,*w, *Uv") - (match_operand:DI 1 "di_operand" "rDa,Db,Dc,mi,r,y,r,y,Uy,y, r,*w,*w,*Uvi,*w"))] - "TARGET_REALLY_IWMMXT - && ( register_operand (operands[0], DImode) - || register_operand (operands[1], DImode))" - "* - switch (which_alternative) - { - case 0: - case 1: - case 2: - return \"#\"; - case 3: case 4: - return output_move_double (operands, true, NULL); - case 5: - return \"wmov%?\\t%0,%1\"; - case 6: - return \"tmcrr%?\\t%0,%Q1,%R1\"; - case 7: - return \"tmrrc%?\\t%Q0,%R0,%1\"; - case 8: - return \"wldrd%?\\t%0,%1\"; - case 9: - return \"wstrd%?\\t%1,%0\"; - case 10: - return \"fmdrr%?\\t%P0, %Q1, %R1\\t%@ int\"; - case 11: - return \"fmrrd%?\\t%Q0, %R0, %P1\\t%@ int\"; - case 12: - if (TARGET_VFP_SINGLE) - return \"fcpys%?\\t%0, %1\\t%@ int\;fcpys%?\\t%p0, %p1\\t%@ int\"; - else - return \"fcpyd%?\\t%P0, %P1\\t%@ int\"; - case 13: case 14: - return output_move_vfp (operands); - default: - gcc_unreachable (); - } - " - [(set (attr "length") (cond [(eq_attr "alternative" "0,3,4") (const_int 8) - (eq_attr "alternative" "1") (const_int 12) - (eq_attr "alternative" "2") (const_int 16) - (eq_attr "alternative" "12") - (if_then_else - (eq (symbol_ref "TARGET_VFP_SINGLE") (const_int 1)) - (const_int 8) - (const_int 4))] - (const_int 4))) - (set_attr "type" "*,*,*,load_8,store_8,*,*,*,*,*,f_mcrr,f_mrrc,\ - ffarithd,f_loadd,f_stored") - (set_attr "arm_pool_range" "*,*,*,1020,*,*,*,*,*,*,*,*,*,1020,*") - (set_attr "arm_neg_pool_range" "*,*,*,1008,*,*,*,*,*,*,*,*,*,1008,*")] -) - -(define_insn "*iwmmxt_movsi_insn" - [(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,r,r,rk, m,z,r,?z,?Uy,*t, r,*t,*t ,*Uv") - (match_operand:SI 1 "general_operand" " rk,I,K,j,mi,rk,r,z,Uy, z, r,*t,*t,*Uvi, *t"))] - "TARGET_REALLY_IWMMXT - && ( register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" - "* - switch (which_alternative) - { - case 0: return \"mov\\t%0, %1\"; - case 1: return \"mov\\t%0, %1\"; - case 2: return \"mvn\\t%0, #%B1\"; - case 3: return \"movw\\t%0, %1\"; - case 4: return \"ldr\\t%0, %1\"; - case 5: return \"str\\t%1, %0\"; - case 6: return \"tmcr\\t%0, %1\"; - case 7: return \"tmrc\\t%0, %1\"; - case 8: return arm_output_load_gr (operands); - case 9: return \"wstrw\\t%1, %0\"; - case 10:return \"fmsr\\t%0, %1\"; - case 11:return \"fmrs\\t%0, %1\"; - case 12:return \"fcpys\\t%0, %1\\t%@ int\"; - case 13: case 14: - return output_move_vfp (operands); - default: - gcc_unreachable (); - }" - [(set_attr "type" "*,*,*,*,load_4,store_4,*,*,*,*,f_mcr,f_mrc,\ - fmov,f_loads,f_stores") - (set_attr "length" "*,*,*,*,*, *,*,*, 16, *,*,*,*,*,*") - (set_attr "pool_range" "*,*,*,*,4096, *,*,*,1024, *,*,*,*,1020,*") - (set_attr "neg_pool_range" "*,*,*,*,4084, *,*,*, *, 1012,*,*,*,1008,*") - ;; Note - the "predicable" attribute is not allowed to have alternatives. - ;; Since the wSTRw wCx instruction is not predicable, we cannot support - ;; predicating any of the alternatives in this template. Instead, - ;; we do the predication ourselves, in cond_iwmmxt_movsi_insn. - (set_attr "predicable" "no") - ;; Also - we have to pretend that these insns clobber the condition code - ;; bits as otherwise arm_final_prescan_insn() will try to conditionalize - ;; them. - (set_attr "conds" "clob")] -) - -;; Because iwmmxt_movsi_insn is not predicable, we provide the -;; cond_exec version explicitly, with appropriate constraints. - -(define_insn "*cond_iwmmxt_movsi_insn" - [(cond_exec - (match_operator 2 "arm_comparison_operator" - [(match_operand 3 "cc_register" "") - (const_int 0)]) - (set (match_operand:SI 0 "nonimmediate_operand" "=r,r,r, m,z,r") - (match_operand:SI 1 "general_operand" "rI,K,mi,r,r,z")))] - "TARGET_REALLY_IWMMXT - && ( register_operand (operands[0], SImode) - || register_operand (operands[1], SImode))" - "* - switch (which_alternative) - { - case 0: return \"mov%?\\t%0, %1\"; - case 1: return \"mvn%?\\t%0, #%B1\"; - case 2: return \"ldr%?\\t%0, %1\"; - case 3: return \"str%?\\t%1, %0\"; - case 4: return \"tmcr%?\\t%0, %1\"; - default: return \"tmrc%?\\t%0, %1\"; - }" - [(set_attr "type" "*,*,load_4,store_4,*,*") - (set_attr "pool_range" "*,*,4096, *,*,*") - (set_attr "neg_pool_range" "*,*,4084, *,*,*")] -) - -(define_insn "mov<mode>_internal" - [(set (match_operand:VMMX 0 "nonimmediate_operand" "=y,m,y,?r,?y,?r,?r,?m") - (match_operand:VMMX 1 "general_operand" "y,y,mi,y,r,r,mi,r"))] - "TARGET_REALLY_IWMMXT" - "* - switch (which_alternative) - { - case 0: return \"wmov%?\\t%0, %1\"; - case 1: return \"wstrd%?\\t%1, %0\"; - case 2: return \"wldrd%?\\t%0, %1\"; - case 3: return \"tmrrc%?\\t%Q0, %R0, %1\"; - case 4: return \"tmcrr%?\\t%0, %Q1, %R1\"; - case 5: return \"#\"; - default: return output_move_double (operands, true, NULL); - }" - [(set_attr "predicable" "yes") - (set_attr "length" "4, 4, 4,4,4,8, 8,8") - (set_attr "type" "wmmx_wmov,wmmx_wstr,wmmx_wldr,wmmx_tmrrc,wmmx_tmcrr,*,load_4,store_4") - (set_attr "pool_range" "*, *, 256,*,*,*, 256,*") - (set_attr "neg_pool_range" "*, *, 244,*,*,*, 244,*")] -) - -(define_expand "iwmmxt_setwcgr0" - [(set (reg:SI WCGR0) - (match_operand:SI 0 "register_operand"))] - "TARGET_REALLY_IWMMXT" - {} -) - -(define_expand "iwmmxt_setwcgr1" - [(set (reg:SI WCGR1) - (match_operand:SI 0 "register_operand"))] - "TARGET_REALLY_IWMMXT" - {} -) - -(define_expand "iwmmxt_setwcgr2" - [(set (reg:SI WCGR2) - (match_operand:SI 0 "register_operand"))] - "TARGET_REALLY_IWMMXT" - {} -) - -(define_expand "iwmmxt_setwcgr3" - [(set (reg:SI WCGR3) - (match_operand:SI 0 "register_operand"))] - "TARGET_REALLY_IWMMXT" - {} -) - -(define_expand "iwmmxt_getwcgr0" - [(set (match_operand:SI 0 "register_operand") - (reg:SI WCGR0))] - "TARGET_REALLY_IWMMXT" - {} -) - -(define_expand "iwmmxt_getwcgr1" - [(set (match_operand:SI 0 "register_operand") - (reg:SI WCGR1))] - "TARGET_REALLY_IWMMXT" - {} -) - -(define_expand "iwmmxt_getwcgr2" - [(set (match_operand:SI 0 "register_operand") - (reg:SI WCGR2))] - "TARGET_REALLY_IWMMXT" - {} -) - -(define_expand "iwmmxt_getwcgr3" - [(set (match_operand:SI 0 "register_operand") - (reg:SI WCGR3))] - "TARGET_REALLY_IWMMXT" - {} -) - -(define_insn "*and<mode>3_iwmmxt" - [(set (match_operand:VMMX 0 "register_operand" "=y") - (and:VMMX (match_operand:VMMX 1 "register_operand" "y") - (match_operand:VMMX 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wand\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wand")] -) - -(define_insn "*ior<mode>3_iwmmxt" - [(set (match_operand:VMMX 0 "register_operand" "=y") - (ior:VMMX (match_operand:VMMX 1 "register_operand" "y") - (match_operand:VMMX 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wor\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wor")] -) - -(define_insn "*xor<mode>3_iwmmxt" - [(set (match_operand:VMMX 0 "register_operand" "=y") - (xor:VMMX (match_operand:VMMX 1 "register_operand" "y") - (match_operand:VMMX 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wxor\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wxor")] -) - - -;; Vector add/subtract - -(define_insn "*add<mode>3_iwmmxt" - [(set (match_operand:VMMX 0 "register_operand" "=y") - (plus:VMMX (match_operand:VMMX 1 "register_operand" "y") - (match_operand:VMMX 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wadd<MMX_char>%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wadd")] -) - -(define_insn "ssaddv8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (ss_plus:V8QI (match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "waddbss%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wadd")] -) - -(define_insn "ssaddv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (ss_plus:V4HI (match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "waddhss%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wadd")] -) - -(define_insn "ssaddv2si3" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (ss_plus:V2SI (match_operand:V2SI 1 "register_operand" "y") - (match_operand:V2SI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "waddwss%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wadd")] -) - -(define_insn "usaddv8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (us_plus:V8QI (match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "waddbus%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wadd")] -) - -(define_insn "usaddv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (us_plus:V4HI (match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "waddhus%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wadd")] -) - -(define_insn "usaddv2si3" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (us_plus:V2SI (match_operand:V2SI 1 "register_operand" "y") - (match_operand:V2SI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "waddwus%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wadd")] -) - -(define_insn "*sub<mode>3_iwmmxt" - [(set (match_operand:VMMX 0 "register_operand" "=y") - (minus:VMMX (match_operand:VMMX 1 "register_operand" "y") - (match_operand:VMMX 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wsub<MMX_char>%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsub")] -) - -(define_insn "sssubv8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (ss_minus:V8QI (match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wsubbss%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsub")] -) - -(define_insn "sssubv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (ss_minus:V4HI (match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wsubhss%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsub")] -) - -(define_insn "sssubv2si3" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (ss_minus:V2SI (match_operand:V2SI 1 "register_operand" "y") - (match_operand:V2SI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wsubwss%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsub")] -) - -(define_insn "ussubv8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (us_minus:V8QI (match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wsubbus%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsub")] -) - -(define_insn "ussubv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (us_minus:V4HI (match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wsubhus%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsub")] -) - -(define_insn "ussubv2si3" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (us_minus:V2SI (match_operand:V2SI 1 "register_operand" "y") - (match_operand:V2SI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wsubwus%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsub")] -) - -(define_insn "*mulv4hi3_iwmmxt" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (mult:V4HI (match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wmulul%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmul")] -) - -(define_insn "smulv4hi3_highpart" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (truncate:V4HI - (lshiftrt:V4SI - (mult:V4SI (sign_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (sign_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))) - (const_int 16))))] - "TARGET_REALLY_IWMMXT" - "wmulsm%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmul")] -) - -(define_insn "umulv4hi3_highpart" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (truncate:V4HI - (lshiftrt:V4SI - (mult:V4SI (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))) - (const_int 16))))] - "TARGET_REALLY_IWMMXT" - "wmulum%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmul")] -) - -(define_insn "iwmmxt_wmacs" - [(set (match_operand:DI 0 "register_operand" "=y") - (unspec:DI [(match_operand:DI 1 "register_operand" "0") - (match_operand:V4HI 2 "register_operand" "y") - (match_operand:V4HI 3 "register_operand" "y")] UNSPEC_WMACS))] - "TARGET_REALLY_IWMMXT" - "wmacs%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmac")] -) - -(define_insn "iwmmxt_wmacsz" - [(set (match_operand:DI 0 "register_operand" "=y") - (unspec:DI [(match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")] UNSPEC_WMACSZ))] - "TARGET_REALLY_IWMMXT" - "wmacsz%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmac")] -) - -(define_insn "iwmmxt_wmacu" - [(set (match_operand:DI 0 "register_operand" "=y") - (unspec:DI [(match_operand:DI 1 "register_operand" "0") - (match_operand:V4HI 2 "register_operand" "y") - (match_operand:V4HI 3 "register_operand" "y")] UNSPEC_WMACU))] - "TARGET_REALLY_IWMMXT" - "wmacu%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmac")] -) - -(define_insn "iwmmxt_wmacuz" - [(set (match_operand:DI 0 "register_operand" "=y") - (unspec:DI [(match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")] UNSPEC_WMACUZ))] - "TARGET_REALLY_IWMMXT" - "wmacuz%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmac")] -) - -;; Same as xordi3, but don't show input operands so that we don't think -;; they are live. -(define_insn "iwmmxt_clrdi" - [(set (match_operand:DI 0 "register_operand" "=y") - (unspec:DI [(const_int 0)] UNSPEC_CLRDI))] - "TARGET_REALLY_IWMMXT" - "wxor%?\\t%0, %0, %0" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wxor")] -) - -;; Seems like cse likes to generate these, so we have to support them. - -(define_insn "iwmmxt_clrv8qi" - [(set (match_operand:V8QI 0 "s_register_operand" "=y") - (const_vector:V8QI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0) - (const_int 0) (const_int 0)]))] - "TARGET_REALLY_IWMMXT" - "wxor%?\\t%0, %0, %0" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wxor")] -) - -(define_insn "iwmmxt_clrv4hi" - [(set (match_operand:V4HI 0 "s_register_operand" "=y") - (const_vector:V4HI [(const_int 0) (const_int 0) - (const_int 0) (const_int 0)]))] - "TARGET_REALLY_IWMMXT" - "wxor%?\\t%0, %0, %0" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wxor")] -) - -(define_insn "iwmmxt_clrv2si" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (const_vector:V2SI [(const_int 0) (const_int 0)]))] - "TARGET_REALLY_IWMMXT" - "wxor%?\\t%0, %0, %0" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wxor")] -) - -;; Unsigned averages/sum of absolute differences - -(define_insn "iwmmxt_uavgrndv8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (truncate:V8QI - (lshiftrt:V8HI - (plus:V8HI - (plus:V8HI (zero_extend:V8HI (match_operand:V8QI 1 "register_operand" "y")) - (zero_extend:V8HI (match_operand:V8QI 2 "register_operand" "y"))) - (const_vector:V8HI [(const_int 1) - (const_int 1) - (const_int 1) - (const_int 1) - (const_int 1) - (const_int 1) - (const_int 1) - (const_int 1)])) - (const_int 1))))] - "TARGET_REALLY_IWMMXT" - "wavg2br%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wavg2")] -) - -(define_insn "iwmmxt_uavgrndv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (truncate:V4HI - (lshiftrt:V4SI - (plus:V4SI - (plus:V4SI (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))) - (const_vector:V4SI [(const_int 1) - (const_int 1) - (const_int 1) - (const_int 1)])) - (const_int 1))))] - "TARGET_REALLY_IWMMXT" - "wavg2hr%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wavg2")] -) - -(define_insn "iwmmxt_uavgv8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (truncate:V8QI - (lshiftrt:V8HI - (plus:V8HI (zero_extend:V8HI (match_operand:V8QI 1 "register_operand" "y")) - (zero_extend:V8HI (match_operand:V8QI 2 "register_operand" "y"))) - (const_int 1))))] - "TARGET_REALLY_IWMMXT" - "wavg2b%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wavg2")] -) - -(define_insn "iwmmxt_uavgv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (truncate:V4HI - (lshiftrt:V4SI - (plus:V4SI (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))) - (const_int 1))))] - "TARGET_REALLY_IWMMXT" - "wavg2h%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wavg2")] -) - -;; Insert/extract/shuffle - -(define_insn "iwmmxt_tinsrb" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (vec_merge:V8QI - (vec_duplicate:V8QI - (truncate:QI (match_operand:SI 2 "nonimmediate_operand" "r"))) - (match_operand:V8QI 1 "register_operand" "0") - (match_operand:SI 3 "immediate_operand" "i")))] - "TARGET_REALLY_IWMMXT" - "* - { - return arm_output_iwmmxt_tinsr (operands); - } - " - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tinsr")] -) - -(define_insn "iwmmxt_tinsrh" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_merge:V4HI - (vec_duplicate:V4HI - (truncate:HI (match_operand:SI 2 "nonimmediate_operand" "r"))) - (match_operand:V4HI 1 "register_operand" "0") - (match_operand:SI 3 "immediate_operand" "i")))] - "TARGET_REALLY_IWMMXT" - "* - { - return arm_output_iwmmxt_tinsr (operands); - } - " - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tinsr")] -) - -(define_insn "iwmmxt_tinsrw" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (vec_merge:V2SI - (vec_duplicate:V2SI - (match_operand:SI 2 "nonimmediate_operand" "r")) - (match_operand:V2SI 1 "register_operand" "0") - (match_operand:SI 3 "immediate_operand" "i")))] - "TARGET_REALLY_IWMMXT" - "* - { - return arm_output_iwmmxt_tinsr (operands); - } - " - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tinsr")] -) - -(define_insn "iwmmxt_textrmub" - [(set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI (vec_select:QI (match_operand:V8QI 1 "register_operand" "y") - (parallel - [(match_operand:SI 2 "immediate_operand" "i")]))))] - "TARGET_REALLY_IWMMXT" - "textrmub%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_textrm")] -) - -(define_insn "iwmmxt_textrmsb" - [(set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI (vec_select:QI (match_operand:V8QI 1 "register_operand" "y") - (parallel - [(match_operand:SI 2 "immediate_operand" "i")]))))] - "TARGET_REALLY_IWMMXT" - "textrmsb%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_textrm")] -) - -(define_insn "iwmmxt_textrmuh" - [(set (match_operand:SI 0 "register_operand" "=r") - (zero_extend:SI (vec_select:HI (match_operand:V4HI 1 "register_operand" "y") - (parallel - [(match_operand:SI 2 "immediate_operand" "i")]))))] - "TARGET_REALLY_IWMMXT" - "textrmuh%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_textrm")] -) - -(define_insn "iwmmxt_textrmsh" - [(set (match_operand:SI 0 "register_operand" "=r") - (sign_extend:SI (vec_select:HI (match_operand:V4HI 1 "register_operand" "y") - (parallel - [(match_operand:SI 2 "immediate_operand" "i")]))))] - "TARGET_REALLY_IWMMXT" - "textrmsh%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_textrm")] -) - -;; There are signed/unsigned variants of this instruction, but they are -;; pointless. -(define_insn "iwmmxt_textrmw" - [(set (match_operand:SI 0 "register_operand" "=r") - (vec_select:SI (match_operand:V2SI 1 "register_operand" "y") - (parallel [(match_operand:SI 2 "immediate_operand" "i")])))] - "TARGET_REALLY_IWMMXT" - "textrmsw%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_textrm")] -) - -(define_insn "iwmmxt_wshufh" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (unspec:V4HI [(match_operand:V4HI 1 "register_operand" "y") - (match_operand:SI 2 "immediate_operand" "i")] UNSPEC_WSHUFH))] - "TARGET_REALLY_IWMMXT" - "wshufh%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wshufh")] -) - -;; Mask-generating comparisons -;; -;; Note - you cannot use patterns like these here: -;; -;; (set (match:<vector>) (<comparator>:<vector> (match:<vector>) (match:<vector>))) -;; -;; Because GCC will assume that the truth value (1 or 0) is installed -;; into the entire destination vector, (with the '1' going into the least -;; significant element of the vector). This is not how these instructions -;; behave. - -(define_insn "eqv8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (unspec_volatile:V8QI [(match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")] - VUNSPEC_WCMP_EQ))] - "TARGET_REALLY_IWMMXT" - "wcmpeqb%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wcmpeq")] -) - -(define_insn "eqv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (unspec_volatile:V4HI [(match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")] - VUNSPEC_WCMP_EQ))] - "TARGET_REALLY_IWMMXT" - "wcmpeqh%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wcmpeq")] -) - -(define_insn "eqv2si3" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec_volatile:V2SI - [(match_operand:V2SI 1 "register_operand" "y") - (match_operand:V2SI 2 "register_operand" "y")] - VUNSPEC_WCMP_EQ))] - "TARGET_REALLY_IWMMXT" - "wcmpeqw%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wcmpeq")] -) - -(define_insn "gtuv8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (unspec_volatile:V8QI [(match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")] - VUNSPEC_WCMP_GTU))] - "TARGET_REALLY_IWMMXT" - "wcmpgtub%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wcmpgt")] -) - -(define_insn "gtuv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (unspec_volatile:V4HI [(match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")] - VUNSPEC_WCMP_GTU))] - "TARGET_REALLY_IWMMXT" - "wcmpgtuh%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wcmpgt")] -) - -(define_insn "gtuv2si3" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec_volatile:V2SI [(match_operand:V2SI 1 "register_operand" "y") - (match_operand:V2SI 2 "register_operand" "y")] - VUNSPEC_WCMP_GTU))] - "TARGET_REALLY_IWMMXT" - "wcmpgtuw%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wcmpgt")] -) - -(define_insn "gtv8qi3" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (unspec_volatile:V8QI [(match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")] - VUNSPEC_WCMP_GT))] - "TARGET_REALLY_IWMMXT" - "wcmpgtsb%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wcmpgt")] -) - -(define_insn "gtv4hi3" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (unspec_volatile:V4HI [(match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")] - VUNSPEC_WCMP_GT))] - "TARGET_REALLY_IWMMXT" - "wcmpgtsh%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wcmpgt")] -) - -(define_insn "gtv2si3" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec_volatile:V2SI [(match_operand:V2SI 1 "register_operand" "y") - (match_operand:V2SI 2 "register_operand" "y")] - VUNSPEC_WCMP_GT))] - "TARGET_REALLY_IWMMXT" - "wcmpgtsw%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wcmpgt")] -) - -;; Max/min insns - -(define_insn "*smax<mode>3_iwmmxt" - [(set (match_operand:VMMX 0 "register_operand" "=y") - (smax:VMMX (match_operand:VMMX 1 "register_operand" "y") - (match_operand:VMMX 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wmaxs<MMX_char>%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmax")] -) - -(define_insn "*umax<mode>3_iwmmxt" - [(set (match_operand:VMMX 0 "register_operand" "=y") - (umax:VMMX (match_operand:VMMX 1 "register_operand" "y") - (match_operand:VMMX 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wmaxu<MMX_char>%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmax")] -) - -(define_insn "*smin<mode>3_iwmmxt" - [(set (match_operand:VMMX 0 "register_operand" "=y") - (smin:VMMX (match_operand:VMMX 1 "register_operand" "y") - (match_operand:VMMX 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wmins<MMX_char>%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmin")] -) - -(define_insn "*umin<mode>3_iwmmxt" - [(set (match_operand:VMMX 0 "register_operand" "=y") - (umin:VMMX (match_operand:VMMX 1 "register_operand" "y") - (match_operand:VMMX 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wminu<MMX_char>%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmin")] -) - -;; Pack/unpack insns. - -(define_insn "iwmmxt_wpackhss" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (vec_concat:V8QI - (ss_truncate:V4QI (match_operand:V4HI 1 "register_operand" "y")) - (ss_truncate:V4QI (match_operand:V4HI 2 "register_operand" "y"))))] - "TARGET_REALLY_IWMMXT" - "wpackhss%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wpack")] -) - -(define_insn "iwmmxt_wpackwss" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_concat:V4HI - (ss_truncate:V2HI (match_operand:V2SI 1 "register_operand" "y")) - (ss_truncate:V2HI (match_operand:V2SI 2 "register_operand" "y"))))] - "TARGET_REALLY_IWMMXT" - "wpackwss%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wpack")] -) - -(define_insn "iwmmxt_wpackdss" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (vec_concat:V2SI - (ss_truncate:SI (match_operand:DI 1 "register_operand" "y")) - (ss_truncate:SI (match_operand:DI 2 "register_operand" "y"))))] - "TARGET_REALLY_IWMMXT" - "wpackdss%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wpack")] -) - -(define_insn "iwmmxt_wpackhus" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (vec_concat:V8QI - (us_truncate:V4QI (match_operand:V4HI 1 "register_operand" "y")) - (us_truncate:V4QI (match_operand:V4HI 2 "register_operand" "y"))))] - "TARGET_REALLY_IWMMXT" - "wpackhus%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wpack")] -) - -(define_insn "iwmmxt_wpackwus" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_concat:V4HI - (us_truncate:V2HI (match_operand:V2SI 1 "register_operand" "y")) - (us_truncate:V2HI (match_operand:V2SI 2 "register_operand" "y"))))] - "TARGET_REALLY_IWMMXT" - "wpackwus%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wpack")] -) - -(define_insn "iwmmxt_wpackdus" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (vec_concat:V2SI - (us_truncate:SI (match_operand:DI 1 "register_operand" "y")) - (us_truncate:SI (match_operand:DI 2 "register_operand" "y"))))] - "TARGET_REALLY_IWMMXT" - "wpackdus%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wpack")] -) - -(define_insn "iwmmxt_wunpckihb" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (vec_merge:V8QI - (vec_select:V8QI (match_operand:V8QI 1 "register_operand" "y") - (parallel [(const_int 4) - (const_int 0) - (const_int 5) - (const_int 1) - (const_int 6) - (const_int 2) - (const_int 7) - (const_int 3)])) - (vec_select:V8QI (match_operand:V8QI 2 "register_operand" "y") - (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)])) - (const_int 85)))] - "TARGET_REALLY_IWMMXT" - "wunpckihb%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckih")] -) - -(define_insn "iwmmxt_wunpckihh" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_merge:V4HI - (vec_select:V4HI (match_operand:V4HI 1 "register_operand" "y") - (parallel [(const_int 2) - (const_int 0) - (const_int 3) - (const_int 1)])) - (vec_select:V4HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 0) - (const_int 2) - (const_int 1) - (const_int 3)])) - (const_int 5)))] - "TARGET_REALLY_IWMMXT" - "wunpckihh%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckih")] -) - -(define_insn "iwmmxt_wunpckihw" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (vec_merge:V2SI - (vec_select:V2SI (match_operand:V2SI 1 "register_operand" "y") - (parallel [(const_int 1) - (const_int 0)])) - (vec_select:V2SI (match_operand:V2SI 2 "register_operand" "y") - (parallel [(const_int 0) - (const_int 1)])) - (const_int 1)))] - "TARGET_REALLY_IWMMXT" - "wunpckihw%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckih")] -) - -(define_insn "iwmmxt_wunpckilb" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (vec_merge:V8QI - (vec_select:V8QI (match_operand:V8QI 1 "register_operand" "y") - (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)])) - (vec_select:V8QI (match_operand:V8QI 2 "register_operand" "y") - (parallel [(const_int 4) - (const_int 0) - (const_int 5) - (const_int 1) - (const_int 6) - (const_int 2) - (const_int 7) - (const_int 3)])) - (const_int 85)))] - "TARGET_REALLY_IWMMXT" - "wunpckilb%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckil")] -) - -(define_insn "iwmmxt_wunpckilh" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_merge:V4HI - (vec_select:V4HI (match_operand:V4HI 1 "register_operand" "y") - (parallel [(const_int 0) - (const_int 2) - (const_int 1) - (const_int 3)])) - (vec_select:V4HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 2) - (const_int 0) - (const_int 3) - (const_int 1)])) - (const_int 5)))] - "TARGET_REALLY_IWMMXT" - "wunpckilh%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckil")] -) - -(define_insn "iwmmxt_wunpckilw" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (vec_merge:V2SI - (vec_select:V2SI (match_operand:V2SI 1 "register_operand" "y") - (parallel [(const_int 0) - (const_int 1)])) - (vec_select:V2SI (match_operand:V2SI 2 "register_operand" "y") - (parallel [(const_int 1) - (const_int 0)])) - (const_int 1)))] - "TARGET_REALLY_IWMMXT" - "wunpckilw%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckil")] -) - -(define_insn "iwmmxt_wunpckehub" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_select:V4HI - (zero_extend:V8HI (match_operand:V8QI 1 "register_operand" "y")) - (parallel [(const_int 4) (const_int 5) - (const_int 6) (const_int 7)])))] - "TARGET_REALLY_IWMMXT" - "wunpckehub%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckeh")] -) - -(define_insn "iwmmxt_wunpckehuh" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (vec_select:V2SI - (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (parallel [(const_int 2) (const_int 3)])))] - "TARGET_REALLY_IWMMXT" - "wunpckehuh%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckeh")] -) - -(define_insn "iwmmxt_wunpckehuw" - [(set (match_operand:DI 0 "register_operand" "=y") - (vec_select:DI - (zero_extend:V2DI (match_operand:V2SI 1 "register_operand" "y")) - (parallel [(const_int 1)])))] - "TARGET_REALLY_IWMMXT" - "wunpckehuw%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckeh")] -) - -(define_insn "iwmmxt_wunpckehsb" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_select:V4HI - (sign_extend:V8HI (match_operand:V8QI 1 "register_operand" "y")) - (parallel [(const_int 4) (const_int 5) - (const_int 6) (const_int 7)])))] - "TARGET_REALLY_IWMMXT" - "wunpckehsb%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckeh")] -) - -(define_insn "iwmmxt_wunpckehsh" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (vec_select:V2SI - (sign_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (parallel [(const_int 2) (const_int 3)])))] - "TARGET_REALLY_IWMMXT" - "wunpckehsh%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckeh")] -) - -(define_insn "iwmmxt_wunpckehsw" - [(set (match_operand:DI 0 "register_operand" "=y") - (vec_select:DI - (sign_extend:V2DI (match_operand:V2SI 1 "register_operand" "y")) - (parallel [(const_int 1)])))] - "TARGET_REALLY_IWMMXT" - "wunpckehsw%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckeh")] -) - -(define_insn "iwmmxt_wunpckelub" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_select:V4HI - (zero_extend:V8HI (match_operand:V8QI 1 "register_operand" "y")) - (parallel [(const_int 0) (const_int 1) - (const_int 2) (const_int 3)])))] - "TARGET_REALLY_IWMMXT" - "wunpckelub%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckel")] -) - -(define_insn "iwmmxt_wunpckeluh" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (vec_select:V2SI - (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (parallel [(const_int 0) (const_int 1)])))] - "TARGET_REALLY_IWMMXT" - "wunpckeluh%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckel")] -) - -(define_insn "iwmmxt_wunpckeluw" - [(set (match_operand:DI 0 "register_operand" "=y") - (vec_select:DI - (zero_extend:V2DI (match_operand:V2SI 1 "register_operand" "y")) - (parallel [(const_int 0)])))] - "TARGET_REALLY_IWMMXT" - "wunpckeluw%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckel")] -) - -(define_insn "iwmmxt_wunpckelsb" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_select:V4HI - (sign_extend:V8HI (match_operand:V8QI 1 "register_operand" "y")) - (parallel [(const_int 0) (const_int 1) - (const_int 2) (const_int 3)])))] - "TARGET_REALLY_IWMMXT" - "wunpckelsb%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckel")] -) - -(define_insn "iwmmxt_wunpckelsh" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (vec_select:V2SI - (sign_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (parallel [(const_int 0) (const_int 1)])))] - "TARGET_REALLY_IWMMXT" - "wunpckelsh%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckel")] -) - -(define_insn "iwmmxt_wunpckelsw" - [(set (match_operand:DI 0 "register_operand" "=y") - (vec_select:DI - (sign_extend:V2DI (match_operand:V2SI 1 "register_operand" "y")) - (parallel [(const_int 0)])))] - "TARGET_REALLY_IWMMXT" - "wunpckelsw%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wunpckel")] -) - -;; Shifts - -(define_insn "ror<mode>3" - [(set (match_operand:VSHFT 0 "register_operand" "=y,y") - (rotatert:VSHFT (match_operand:VSHFT 1 "register_operand" "y,y") - (match_operand:SI 2 "imm_or_reg_operand" "z,i")))] - "TARGET_REALLY_IWMMXT" - "* - switch (which_alternative) - { - case 0: - return \"wror<MMX_char>g%?\\t%0, %1, %2\"; - case 1: - return arm_output_iwmmxt_shift_immediate (\"wror<MMX_char>\", operands, true); - default: - gcc_unreachable (); - } - " - [(set_attr "predicable" "yes") - (set_attr "arch" "*, iwmmxt2") - (set_attr "type" "wmmx_wror, wmmx_wror")] -) - -(define_insn "ashr<mode>3_iwmmxt" - [(set (match_operand:VSHFT 0 "register_operand" "=y,y") - (ashiftrt:VSHFT (match_operand:VSHFT 1 "register_operand" "y,y") - (match_operand:SI 2 "imm_or_reg_operand" "z,i")))] - "TARGET_REALLY_IWMMXT" - "* - switch (which_alternative) - { - case 0: - return \"wsra<MMX_char>g%?\\t%0, %1, %2\"; - case 1: - return arm_output_iwmmxt_shift_immediate (\"wsra<MMX_char>\", operands, true); - default: - gcc_unreachable (); - } - " - [(set_attr "predicable" "yes") - (set_attr "arch" "*, iwmmxt2") - (set_attr "type" "wmmx_wsra, wmmx_wsra")] -) - -(define_insn "lshr<mode>3_iwmmxt" - [(set (match_operand:VSHFT 0 "register_operand" "=y,y") - (lshiftrt:VSHFT (match_operand:VSHFT 1 "register_operand" "y,y") - (match_operand:SI 2 "imm_or_reg_operand" "z,i")))] - "TARGET_REALLY_IWMMXT" - "* - switch (which_alternative) - { - case 0: - return \"wsrl<MMX_char>g%?\\t%0, %1, %2\"; - case 1: - return arm_output_iwmmxt_shift_immediate (\"wsrl<MMX_char>\", operands, false); - default: - gcc_unreachable (); - } - " - [(set_attr "predicable" "yes") - (set_attr "arch" "*, iwmmxt2") - (set_attr "type" "wmmx_wsrl, wmmx_wsrl")] -) - -(define_insn "ashl<mode>3_iwmmxt" - [(set (match_operand:VSHFT 0 "register_operand" "=y,y") - (ashift:VSHFT (match_operand:VSHFT 1 "register_operand" "y,y") - (match_operand:SI 2 "imm_or_reg_operand" "z,i")))] - "TARGET_REALLY_IWMMXT" - "* - switch (which_alternative) - { - case 0: - return \"wsll<MMX_char>g%?\\t%0, %1, %2\"; - case 1: - return arm_output_iwmmxt_shift_immediate (\"wsll<MMX_char>\", operands, false); - default: - gcc_unreachable (); - } - " - [(set_attr "predicable" "yes") - (set_attr "arch" "*, iwmmxt2") - (set_attr "type" "wmmx_wsll, wmmx_wsll")] -) - -(define_insn "ror<mode>3_di" - [(set (match_operand:VSHFT 0 "register_operand" "=y,y") - (rotatert:VSHFT (match_operand:VSHFT 1 "register_operand" "y,y") - (match_operand:DI 2 "imm_or_reg_operand" "y,i")))] - "TARGET_REALLY_IWMMXT" - "* - switch (which_alternative) - { - case 0: - return \"wror<MMX_char>%?\\t%0, %1, %2\"; - case 1: - return arm_output_iwmmxt_shift_immediate (\"wror<MMX_char>\", operands, true); - default: - gcc_unreachable (); - } - " - [(set_attr "predicable" "yes") - (set_attr "arch" "*, iwmmxt2") - (set_attr "type" "wmmx_wror, wmmx_wror")] -) - -(define_insn "ashr<mode>3_di" - [(set (match_operand:VSHFT 0 "register_operand" "=y,y") - (ashiftrt:VSHFT (match_operand:VSHFT 1 "register_operand" "y,y") - (match_operand:DI 2 "imm_or_reg_operand" "y,i")))] - "TARGET_REALLY_IWMMXT" - "* - switch (which_alternative) - { - case 0: - return \"wsra<MMX_char>%?\\t%0, %1, %2\"; - case 1: - return arm_output_iwmmxt_shift_immediate (\"wsra<MMX_char>\", operands, true); - default: - gcc_unreachable (); - } - " - [(set_attr "predicable" "yes") - (set_attr "arch" "*, iwmmxt2") - (set_attr "type" "wmmx_wsra, wmmx_wsra")] -) - -(define_insn "lshr<mode>3_di" - [(set (match_operand:VSHFT 0 "register_operand" "=y,y") - (lshiftrt:VSHFT (match_operand:VSHFT 1 "register_operand" "y,y") - (match_operand:DI 2 "register_operand" "y,i")))] - "TARGET_REALLY_IWMMXT" - "* - switch (which_alternative) - { - case 0: - return \"wsrl<MMX_char>%?\\t%0, %1, %2\"; - case 1: - return arm_output_iwmmxt_shift_immediate (\"wsrl<MMX_char>\", operands, false); - default: - gcc_unreachable (); - } - " - [(set_attr "predicable" "yes") - (set_attr "arch" "*, iwmmxt2") - (set_attr "type" "wmmx_wsrl, wmmx_wsrl")] -) - -(define_insn "ashl<mode>3_di" - [(set (match_operand:VSHFT 0 "register_operand" "=y,y") - (ashift:VSHFT (match_operand:VSHFT 1 "register_operand" "y,y") - (match_operand:DI 2 "imm_or_reg_operand" "y,i")))] - "TARGET_REALLY_IWMMXT" - "* - switch (which_alternative) - { - case 0: - return \"wsll<MMX_char>%?\\t%0, %1, %2\"; - case 1: - return arm_output_iwmmxt_shift_immediate (\"wsll<MMX_char>\", operands, false); - default: - gcc_unreachable (); - } - " - [(set_attr "predicable" "yes") - (set_attr "arch" "*, iwmmxt2") - (set_attr "type" "wmmx_wsll, wmmx_wsll")] -) - -(define_insn "iwmmxt_wmadds" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (plus:V2SI - (mult:V2SI - (vec_select:V2SI (sign_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (parallel [(const_int 1) (const_int 3)])) - (vec_select:V2SI (sign_extend:V4SI (match_operand:V4HI 2 "register_operand" "y")) - (parallel [(const_int 1) (const_int 3)]))) - (mult:V2SI - (vec_select:V2SI (sign_extend:V4SI (match_dup 1)) - (parallel [(const_int 0) (const_int 2)])) - (vec_select:V2SI (sign_extend:V4SI (match_dup 2)) - (parallel [(const_int 0) (const_int 2)])))))] - "TARGET_REALLY_IWMMXT" - "wmadds%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmadd")] -) - -(define_insn "iwmmxt_wmaddu" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (plus:V2SI - (mult:V2SI - (vec_select:V2SI (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (parallel [(const_int 1) (const_int 3)])) - (vec_select:V2SI (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y")) - (parallel [(const_int 1) (const_int 3)]))) - (mult:V2SI - (vec_select:V2SI (zero_extend:V4SI (match_dup 1)) - (parallel [(const_int 0) (const_int 2)])) - (vec_select:V2SI (zero_extend:V4SI (match_dup 2)) - (parallel [(const_int 0) (const_int 2)])))))] - "TARGET_REALLY_IWMMXT" - "wmaddu%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmadd")] -) - -(define_insn "iwmmxt_tmia" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI (match_operand:DI 1 "register_operand" "0") - (mult:DI (sign_extend:DI - (match_operand:SI 2 "register_operand" "r")) - (sign_extend:DI - (match_operand:SI 3 "register_operand" "r")))))] - "TARGET_REALLY_IWMMXT" - "tmia%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tmia")] -) - -(define_insn "iwmmxt_tmiaph" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI (match_operand:DI 1 "register_operand" "0") - (plus:DI - (mult:DI (sign_extend:DI - (truncate:HI (match_operand:SI 2 "register_operand" "r"))) - (sign_extend:DI - (truncate:HI (match_operand:SI 3 "register_operand" "r")))) - (mult:DI (sign_extend:DI - (truncate:HI (ashiftrt:SI (match_dup 2) (const_int 16)))) - (sign_extend:DI - (truncate:HI (ashiftrt:SI (match_dup 3) (const_int 16))))))))] - "TARGET_REALLY_IWMMXT" - "tmiaph%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tmiaph")] -) - -(define_insn "iwmmxt_tmiabb" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI (match_operand:DI 1 "register_operand" "0") - (mult:DI (sign_extend:DI - (truncate:HI (match_operand:SI 2 "register_operand" "r"))) - (sign_extend:DI - (truncate:HI (match_operand:SI 3 "register_operand" "r"))))))] - "TARGET_REALLY_IWMMXT" - "tmiabb%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tmiaxy")] -) - -(define_insn "iwmmxt_tmiatb" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI (match_operand:DI 1 "register_operand" "0") - (mult:DI (sign_extend:DI - (truncate:HI - (ashiftrt:SI - (match_operand:SI 2 "register_operand" "r") - (const_int 16)))) - (sign_extend:DI - (truncate:HI - (match_operand:SI 3 "register_operand" "r"))))))] - "TARGET_REALLY_IWMMXT" - "tmiatb%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tmiaxy")] -) - -(define_insn "iwmmxt_tmiabt" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI (match_operand:DI 1 "register_operand" "0") - (mult:DI (sign_extend:DI - (truncate:HI - (match_operand:SI 2 "register_operand" "r"))) - (sign_extend:DI - (truncate:HI - (ashiftrt:SI - (match_operand:SI 3 "register_operand" "r") - (const_int 16)))))))] - "TARGET_REALLY_IWMMXT" - "tmiabt%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tmiaxy")] -) - -(define_insn "iwmmxt_tmiatt" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI (match_operand:DI 1 "register_operand" "0") - (mult:DI (sign_extend:DI - (truncate:HI - (ashiftrt:SI - (match_operand:SI 2 "register_operand" "r") - (const_int 16)))) - (sign_extend:DI - (truncate:HI - (ashiftrt:SI - (match_operand:SI 3 "register_operand" "r") - (const_int 16)))))))] - "TARGET_REALLY_IWMMXT" - "tmiatt%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tmiaxy")] -) - -(define_insn "iwmmxt_tmovmskb" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:V8QI 1 "register_operand" "y")] UNSPEC_TMOVMSK))] - "TARGET_REALLY_IWMMXT" - "tmovmskb%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tmovmsk")] -) - -(define_insn "iwmmxt_tmovmskh" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:V4HI 1 "register_operand" "y")] UNSPEC_TMOVMSK))] - "TARGET_REALLY_IWMMXT" - "tmovmskh%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tmovmsk")] -) - -(define_insn "iwmmxt_tmovmskw" - [(set (match_operand:SI 0 "register_operand" "=r") - (unspec:SI [(match_operand:V2SI 1 "register_operand" "y")] UNSPEC_TMOVMSK))] - "TARGET_REALLY_IWMMXT" - "tmovmskw%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tmovmsk")] -) - -(define_insn "iwmmxt_waccb" - [(set (match_operand:DI 0 "register_operand" "=y") - (unspec:DI [(match_operand:V8QI 1 "register_operand" "y")] UNSPEC_WACC))] - "TARGET_REALLY_IWMMXT" - "waccb%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wacc")] -) - -(define_insn "iwmmxt_wacch" - [(set (match_operand:DI 0 "register_operand" "=y") - (unspec:DI [(match_operand:V4HI 1 "register_operand" "y")] UNSPEC_WACC))] - "TARGET_REALLY_IWMMXT" - "wacch%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wacc")] -) - -(define_insn "iwmmxt_waccw" - [(set (match_operand:DI 0 "register_operand" "=y") - (unspec:DI [(match_operand:V2SI 1 "register_operand" "y")] UNSPEC_WACC))] - "TARGET_REALLY_IWMMXT" - "waccw%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wacc")] -) - -;; use unspec here to prevent 8 * imm to be optimized by cse -(define_insn "iwmmxt_waligni" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (unspec:V8QI [(subreg:V8QI - (ashiftrt:TI - (subreg:TI (vec_concat:V16QI - (match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")) 0) - (mult:SI - (match_operand:SI 3 "immediate_operand" "i") - (const_int 8))) 0)] UNSPEC_WALIGNI))] - "TARGET_REALLY_IWMMXT" - "waligni%?\\t%0, %1, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_waligni")] -) - -(define_insn "iwmmxt_walignr" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (subreg:V8QI (ashiftrt:TI - (subreg:TI (vec_concat:V16QI - (match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")) 0) - (mult:SI - (zero_extract:SI (match_operand:SI 3 "register_operand" "z") (const_int 3) (const_int 0)) - (const_int 8))) 0))] - "TARGET_REALLY_IWMMXT" - "walignr%U3%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_walignr")] -) - -(define_insn "iwmmxt_walignr0" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (subreg:V8QI (ashiftrt:TI - (subreg:TI (vec_concat:V16QI - (match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")) 0) - (mult:SI - (zero_extract:SI (reg:SI WCGR0) (const_int 3) (const_int 0)) - (const_int 8))) 0))] - "TARGET_REALLY_IWMMXT" - "walignr0%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_walignr")] -) - -(define_insn "iwmmxt_walignr1" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (subreg:V8QI (ashiftrt:TI - (subreg:TI (vec_concat:V16QI - (match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")) 0) - (mult:SI - (zero_extract:SI (reg:SI WCGR1) (const_int 3) (const_int 0)) - (const_int 8))) 0))] - "TARGET_REALLY_IWMMXT" - "walignr1%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_walignr")] -) - -(define_insn "iwmmxt_walignr2" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (subreg:V8QI (ashiftrt:TI - (subreg:TI (vec_concat:V16QI - (match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")) 0) - (mult:SI - (zero_extract:SI (reg:SI WCGR2) (const_int 3) (const_int 0)) - (const_int 8))) 0))] - "TARGET_REALLY_IWMMXT" - "walignr2%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_walignr")] -) - -(define_insn "iwmmxt_walignr3" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (subreg:V8QI (ashiftrt:TI - (subreg:TI (vec_concat:V16QI - (match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")) 0) - (mult:SI - (zero_extract:SI (reg:SI WCGR3) (const_int 3) (const_int 0)) - (const_int 8))) 0))] - "TARGET_REALLY_IWMMXT" - "walignr3%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_walignr")] -) - -(define_insn "iwmmxt_wsadb" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [ - (match_operand:V2SI 1 "register_operand" "0") - (match_operand:V8QI 2 "register_operand" "y") - (match_operand:V8QI 3 "register_operand" "y")] UNSPEC_WSAD))] - "TARGET_REALLY_IWMMXT" - "wsadb%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsad")] -) - -(define_insn "iwmmxt_wsadh" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [ - (match_operand:V2SI 1 "register_operand" "0") - (match_operand:V4HI 2 "register_operand" "y") - (match_operand:V4HI 3 "register_operand" "y")] UNSPEC_WSAD))] - "TARGET_REALLY_IWMMXT" - "wsadh%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsad")] -) - -(define_insn "iwmmxt_wsadbz" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V8QI 1 "register_operand" "y") - (match_operand:V8QI 2 "register_operand" "y")] UNSPEC_WSADZ))] - "TARGET_REALLY_IWMMXT" - "wsadbz%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsad")] -) - -(define_insn "iwmmxt_wsadhz" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")] UNSPEC_WSADZ))] - "TARGET_REALLY_IWMMXT" - "wsadhz%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsad")] -) - -(include "iwmmxt2.md") diff --git a/gcc/config/arm/iwmmxt2.md b/gcc/config/arm/iwmmxt2.md deleted file mode 100644 index 74cd148..0000000 --- a/gcc/config/arm/iwmmxt2.md +++ /dev/null @@ -1,903 +0,0 @@ -;; Patterns for the Intel Wireless MMX technology architecture. -;; Copyright (C) 2011-2025 Free Software Foundation, Inc. -;; Written by Marvell, Inc. -;; -;; This file is part of GCC. -;; -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. - -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; <http://www.gnu.org/licenses/>. - -(define_insn "iwmmxt_wabs<mode>3" - [(set (match_operand:VMMX 0 "register_operand" "=y") - (unspec:VMMX [(match_operand:VMMX 1 "register_operand" "y")] UNSPEC_WABS))] - "TARGET_REALLY_IWMMXT" - "wabs<MMX_char>%?\\t%0, %1" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wabs")] -) - -(define_insn "iwmmxt_wabsdiffb" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (truncate:V8QI - (abs:V8HI - (minus:V8HI - (zero_extend:V8HI (match_operand:V8QI 1 "register_operand" "y")) - (zero_extend:V8HI (match_operand:V8QI 2 "register_operand" "y"))))))] - "TARGET_REALLY_IWMMXT" - "wabsdiffb%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wabsdiff")] -) - -(define_insn "iwmmxt_wabsdiffh" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (truncate: V4HI - (abs:V4SI - (minus:V4SI - (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))))))] - "TARGET_REALLY_IWMMXT" - "wabsdiffh%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wabsdiff")] -) - -(define_insn "iwmmxt_wabsdiffw" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (truncate: V2SI - (abs:V2DI - (minus:V2DI - (zero_extend:V2DI (match_operand:V2SI 1 "register_operand" "y")) - (zero_extend:V2DI (match_operand:V2SI 2 "register_operand" "y"))))))] - "TARGET_REALLY_IWMMXT" - "wabsdiffw%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wabsdiff")] -) - -(define_insn "iwmmxt_waddsubhx" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_merge:V4HI - (ss_minus:V4HI - (match_operand:V4HI 1 "register_operand" "y") - (vec_select:V4HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 1) (const_int 0) (const_int 3) (const_int 2)]))) - (ss_plus:V4HI - (match_dup 1) - (vec_select:V4HI (match_dup 2) - (parallel [(const_int 1) (const_int 0) (const_int 3) (const_int 2)]))) - (const_int 10)))] - "TARGET_REALLY_IWMMXT" - "waddsubhx%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_waddsubhx")] -) - -(define_insn "iwmmxt_wsubaddhx" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (vec_merge:V4HI - (ss_plus:V4HI - (match_operand:V4HI 1 "register_operand" "y") - (vec_select:V4HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 1) (const_int 0) (const_int 3) (const_int 2)]))) - (ss_minus:V4HI - (match_dup 1) - (vec_select:V4HI (match_dup 2) - (parallel [(const_int 1) (const_int 0) (const_int 3) (const_int 2)]))) - (const_int 10)))] - "TARGET_REALLY_IWMMXT" - "wsubaddhx%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wsubaddhx")] -) - -(define_insn "addc<mode>3" - [(set (match_operand:VMMX2 0 "register_operand" "=y") - (unspec:VMMX2 - [(plus:VMMX2 - (match_operand:VMMX2 1 "register_operand" "y") - (match_operand:VMMX2 2 "register_operand" "y"))] UNSPEC_WADDC))] - "TARGET_REALLY_IWMMXT" - "wadd<MMX_char>c%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wadd")] -) - -(define_insn "iwmmxt_avg4" -[(set (match_operand:V8QI 0 "register_operand" "=y") - (truncate:V8QI - (vec_select:V8HI - (vec_merge:V8HI - (lshiftrt:V8HI - (plus:V8HI - (plus:V8HI - (plus:V8HI - (plus:V8HI - (zero_extend:V8HI (match_operand:V8QI 1 "register_operand" "y")) - (zero_extend:V8HI (match_operand:V8QI 2 "register_operand" "y"))) - (vec_select:V8HI (zero_extend:V8HI (match_dup 1)) - (parallel [(const_int 7) (const_int 0) (const_int 1) (const_int 2) - (const_int 3) (const_int 4) (const_int 5) (const_int 6)]))) - (vec_select:V8HI (zero_extend:V8HI (match_dup 2)) - (parallel [(const_int 7) (const_int 0) (const_int 1) (const_int 2) - (const_int 3) (const_int 4) (const_int 5) (const_int 6)]))) - (const_vector:V8HI [(const_int 1) (const_int 1) (const_int 1) (const_int 1) - (const_int 1) (const_int 1) (const_int 1) (const_int 1)])) - (const_int 2)) - (const_vector:V8HI [(const_int 0) (const_int 0) (const_int 0) (const_int 0) - (const_int 0) (const_int 0) (const_int 0) (const_int 0)]) - (const_int 254)) - (parallel [(const_int 1) (const_int 2) (const_int 3) (const_int 4) - (const_int 5) (const_int 6) (const_int 7) (const_int 0)]))))] - "TARGET_REALLY_IWMMXT" - "wavg4%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wavg4")] -) - -(define_insn "iwmmxt_avg4r" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (truncate:V8QI - (vec_select:V8HI - (vec_merge:V8HI - (lshiftrt:V8HI - (plus:V8HI - (plus:V8HI - (plus:V8HI - (plus:V8HI - (zero_extend:V8HI (match_operand:V8QI 1 "register_operand" "y")) - (zero_extend:V8HI (match_operand:V8QI 2 "register_operand" "y"))) - (vec_select:V8HI (zero_extend:V8HI (match_dup 1)) - (parallel [(const_int 7) (const_int 0) (const_int 1) (const_int 2) - (const_int 3) (const_int 4) (const_int 5) (const_int 6)]))) - (vec_select:V8HI (zero_extend:V8HI (match_dup 2)) - (parallel [(const_int 7) (const_int 0) (const_int 1) (const_int 2) - (const_int 3) (const_int 4) (const_int 5) (const_int 6)]))) - (const_vector:V8HI [(const_int 2) (const_int 2) (const_int 2) (const_int 2) - (const_int 2) (const_int 2) (const_int 2) (const_int 2)])) - (const_int 2)) - (const_vector:V8HI [(const_int 0) (const_int 0) (const_int 0) (const_int 0) - (const_int 0) (const_int 0) (const_int 0) (const_int 0)]) - (const_int 254)) - (parallel [(const_int 1) (const_int 2) (const_int 3) (const_int 4) - (const_int 5) (const_int 6) (const_int 7) (const_int 0)]))))] - "TARGET_REALLY_IWMMXT" - "wavg4r%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wavg4")] -) - -(define_insn "iwmmxt_wmaddsx" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (plus:V2SI - (mult:V2SI - (vec_select:V2SI (sign_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (parallel [(const_int 1) (const_int 3)])) - (vec_select:V2SI (sign_extend:V4SI (match_operand:V4HI 2 "register_operand" "y")) - (parallel [(const_int 0) (const_int 2)]))) - (mult:V2SI - (vec_select:V2SI (sign_extend:V4SI (match_dup 1)) - (parallel [(const_int 0) (const_int 2)])) - (vec_select:V2SI (sign_extend:V4SI (match_dup 2)) - (parallel [(const_int 1) (const_int 3)])))))] - "TARGET_REALLY_IWMMXT" - "wmaddsx%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmadd")] -) - -(define_insn "iwmmxt_wmaddux" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (plus:V2SI - (mult:V2SI - (vec_select:V2SI (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (parallel [(const_int 1) (const_int 3)])) - (vec_select:V2SI (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y")) - (parallel [(const_int 0) (const_int 2)]))) - (mult:V2SI - (vec_select:V2SI (zero_extend:V4SI (match_dup 1)) - (parallel [(const_int 0) (const_int 2)])) - (vec_select:V2SI (zero_extend:V4SI (match_dup 2)) - (parallel [(const_int 1) (const_int 3)])))))] - "TARGET_REALLY_IWMMXT" - "wmaddux%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmadd")] -) - -(define_insn "iwmmxt_wmaddsn" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (minus:V2SI - (mult:V2SI - (vec_select:V2SI (sign_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (parallel [(const_int 0) (const_int 2)])) - (vec_select:V2SI (sign_extend:V4SI (match_operand:V4HI 2 "register_operand" "y")) - (parallel [(const_int 0) (const_int 2)]))) - (mult:V2SI - (vec_select:V2SI (sign_extend:V4SI (match_dup 1)) - (parallel [(const_int 1) (const_int 3)])) - (vec_select:V2SI (sign_extend:V4SI (match_dup 2)) - (parallel [(const_int 1) (const_int 3)])))))] - "TARGET_REALLY_IWMMXT" - "wmaddsn%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmadd")] -) - -(define_insn "iwmmxt_wmaddun" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (minus:V2SI - (mult:V2SI - (vec_select:V2SI (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (parallel [(const_int 0) (const_int 2)])) - (vec_select:V2SI (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y")) - (parallel [(const_int 0) (const_int 2)]))) - (mult:V2SI - (vec_select:V2SI (zero_extend:V4SI (match_dup 1)) - (parallel [(const_int 1) (const_int 3)])) - (vec_select:V2SI (zero_extend:V4SI (match_dup 2)) - (parallel [(const_int 1) (const_int 3)])))))] - "TARGET_REALLY_IWMMXT" - "wmaddun%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmadd")] -) - -(define_insn "iwmmxt_wmulwsm" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (truncate:V2SI - (ashiftrt:V2DI - (mult:V2DI - (sign_extend:V2DI (match_operand:V2SI 1 "register_operand" "y")) - (sign_extend:V2DI (match_operand:V2SI 2 "register_operand" "y"))) - (const_int 32))))] - "TARGET_REALLY_IWMMXT" - "wmulwsm%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmulw")] -) - -(define_insn "iwmmxt_wmulwum" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (truncate:V2SI - (lshiftrt:V2DI - (mult:V2DI - (zero_extend:V2DI (match_operand:V2SI 1 "register_operand" "y")) - (zero_extend:V2DI (match_operand:V2SI 2 "register_operand" "y"))) - (const_int 32))))] - "TARGET_REALLY_IWMMXT" - "wmulwum%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmulw")] -) - -(define_insn "iwmmxt_wmulsmr" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (truncate:V4HI - (ashiftrt:V4SI - (plus:V4SI - (mult:V4SI - (sign_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (sign_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))) - (const_vector:V4SI [(const_int 32768) - (const_int 32768) - (const_int 32768)])) - (const_int 16))))] - "TARGET_REALLY_IWMMXT" - "wmulsmr%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmul")] -) - -(define_insn "iwmmxt_wmulumr" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (truncate:V4HI - (lshiftrt:V4SI - (plus:V4SI - (mult:V4SI - (zero_extend:V4SI (match_operand:V4HI 1 "register_operand" "y")) - (zero_extend:V4SI (match_operand:V4HI 2 "register_operand" "y"))) - (const_vector:V4SI [(const_int 32768) - (const_int 32768) - (const_int 32768) - (const_int 32768)])) - (const_int 16))))] - "TARGET_REALLY_IWMMXT" - "wmulumr%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmul")] -) - -(define_insn "iwmmxt_wmulwsmr" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (truncate:V2SI - (ashiftrt:V2DI - (plus:V2DI - (mult:V2DI - (sign_extend:V2DI (match_operand:V2SI 1 "register_operand" "y")) - (sign_extend:V2DI (match_operand:V2SI 2 "register_operand" "y"))) - (const_vector:V2DI [(const_int 2147483648) - (const_int 2147483648)])) - (const_int 32))))] - "TARGET_REALLY_IWMMXT" - "wmulwsmr%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmul")] -) - -(define_insn "iwmmxt_wmulwumr" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (truncate:V2SI - (lshiftrt:V2DI - (plus:V2DI - (mult:V2DI - (zero_extend:V2DI (match_operand:V2SI 1 "register_operand" "y")) - (zero_extend:V2DI (match_operand:V2SI 2 "register_operand" "y"))) - (const_vector:V2DI [(const_int 2147483648) - (const_int 2147483648)])) - (const_int 32))))] - "TARGET_REALLY_IWMMXT" - "wmulwumr%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmulw")] -) - -(define_insn "iwmmxt_wmulwl" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (mult:V2SI - (match_operand:V2SI 1 "register_operand" "y") - (match_operand:V2SI 2 "register_operand" "y")))] - "TARGET_REALLY_IWMMXT" - "wmulwl%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmulw")] -) - -(define_insn "iwmmxt_wqmulm" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (unspec:V4HI [(match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")] UNSPEC_WQMULM))] - "TARGET_REALLY_IWMMXT" - "wqmulm%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmulm")] -) - -(define_insn "iwmmxt_wqmulwm" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "y") - (match_operand:V2SI 2 "register_operand" "y")] UNSPEC_WQMULWM))] - "TARGET_REALLY_IWMMXT" - "wqmulwm%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmulwm")] -) - -(define_insn "iwmmxt_wqmulmr" - [(set (match_operand:V4HI 0 "register_operand" "=y") - (unspec:V4HI [(match_operand:V4HI 1 "register_operand" "y") - (match_operand:V4HI 2 "register_operand" "y")] UNSPEC_WQMULMR))] - "TARGET_REALLY_IWMMXT" - "wqmulmr%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmulm")] -) - -(define_insn "iwmmxt_wqmulwmr" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "y") - (match_operand:V2SI 2 "register_operand" "y")] UNSPEC_WQMULWMR))] - "TARGET_REALLY_IWMMXT" - "wqmulwmr%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmulwm")] -) - -(define_insn "iwmmxt_waddbhusm" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (vec_concat:V8QI - (const_vector:V4QI [(const_int 0) (const_int 0) (const_int 0) (const_int 0)]) - (us_truncate:V4QI - (ss_plus:V4HI - (match_operand:V4HI 1 "register_operand" "y") - (zero_extend:V4HI - (vec_select:V4QI (match_operand:V8QI 2 "register_operand" "y") - (parallel [(const_int 4) (const_int 5) (const_int 6) (const_int 7)])))))))] - "TARGET_REALLY_IWMMXT" - "waddbhusm%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_waddbhus")] -) - -(define_insn "iwmmxt_waddbhusl" - [(set (match_operand:V8QI 0 "register_operand" "=y") - (vec_concat:V8QI - (us_truncate:V4QI - (ss_plus:V4HI - (match_operand:V4HI 1 "register_operand" "y") - (zero_extend:V4HI - (vec_select:V4QI (match_operand:V8QI 2 "register_operand" "y") - (parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3)]))))) - (const_vector:V4QI [(const_int 0) (const_int 0) (const_int 0) (const_int 0)])))] - "TARGET_REALLY_IWMMXT" - "waddbhusl%?\\t%0, %1, %2" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_waddbhus")] -) - -(define_insn "iwmmxt_wqmiabb" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0") - (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 0)) - (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 32)) - (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 0)) - (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 32))] UNSPEC_WQMIAxy))] - "TARGET_REALLY_IWMMXT" - "wqmiabb%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmiaxy")] -) - -(define_insn "iwmmxt_wqmiabt" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0") - (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 0)) - (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 32)) - (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 16)) - (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 48))] UNSPEC_WQMIAxy))] - "TARGET_REALLY_IWMMXT" - "wqmiabt%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmiaxy")] -) - -(define_insn "iwmmxt_wqmiatb" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0") - (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 16)) - (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 48)) - (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 0)) - (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 32))] UNSPEC_WQMIAxy))] - "TARGET_REALLY_IWMMXT" - "wqmiatb%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmiaxy")] -) - -(define_insn "iwmmxt_wqmiatt" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0") - (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 16)) - (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 48)) - (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 16)) - (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 48))] UNSPEC_WQMIAxy))] - "TARGET_REALLY_IWMMXT" - "wqmiatt%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmiaxy")] -) - -(define_insn "iwmmxt_wqmiabbn" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0") - (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 0)) - (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 32)) - (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 0)) - (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 32))] UNSPEC_WQMIAxyn))] - "TARGET_REALLY_IWMMXT" - "wqmiabbn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmiaxy")] -) - -(define_insn "iwmmxt_wqmiabtn" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0") - (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 0)) - (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 32)) - (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 16)) - (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 48))] UNSPEC_WQMIAxyn))] - "TARGET_REALLY_IWMMXT" - "wqmiabtn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmiaxy")] -) - -(define_insn "iwmmxt_wqmiatbn" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0") - (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 16)) - (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 48)) - (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 0)) - (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 32))] UNSPEC_WQMIAxyn))] - "TARGET_REALLY_IWMMXT" - "wqmiatbn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmiaxy")] -) - -(define_insn "iwmmxt_wqmiattn" - [(set (match_operand:V2SI 0 "register_operand" "=y") - (unspec:V2SI [(match_operand:V2SI 1 "register_operand" "0") - (zero_extract:V4HI (match_operand:V4HI 2 "register_operand" "y") (const_int 16) (const_int 16)) - (zero_extract:V4HI (match_dup 2) (const_int 16) (const_int 48)) - (zero_extract:V4HI (match_operand:V4HI 3 "register_operand" "y") (const_int 16) (const_int 16)) - (zero_extract:V4HI (match_dup 3) (const_int 16) (const_int 48))] UNSPEC_WQMIAxyn))] - "TARGET_REALLY_IWMMXT" - "wqmiattn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wqmiaxy")] -) - -(define_insn "iwmmxt_wmiabb" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI (match_operand:DI 1 "register_operand" "0") - (plus:DI - (mult:DI - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 0)]))) - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 3 "register_operand" "y") - (parallel [(const_int 0)])))) - (mult:DI - (sign_extend:DI - (vec_select:HI (match_dup 2) - (parallel [(const_int 2)]))) - (sign_extend:DI - (vec_select:HI (match_dup 3) - (parallel [(const_int 2)])))))))] - "TARGET_REALLY_IWMMXT" - "wmiabb%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiaxy")] -) - -(define_insn "iwmmxt_wmiabt" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI (match_operand:DI 1 "register_operand" "0") - (plus:DI - (mult:DI - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 0)]))) - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 3 "register_operand" "y") - (parallel [(const_int 1)])))) - (mult:DI - (sign_extend:DI - (vec_select:HI (match_dup 2) - (parallel [(const_int 2)]))) - (sign_extend:DI - (vec_select:HI (match_dup 3) - (parallel [(const_int 3)])))))))] - "TARGET_REALLY_IWMMXT" - "wmiabt%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiaxy")] -) - -(define_insn "iwmmxt_wmiatb" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI (match_operand:DI 1 "register_operand" "0") - (plus:DI - (mult:DI - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 1)]))) - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 3 "register_operand" "y") - (parallel [(const_int 0)])))) - (mult:DI - (sign_extend:DI - (vec_select:HI (match_dup 2) - (parallel [(const_int 3)]))) - (sign_extend:DI - (vec_select:HI (match_dup 3) - (parallel [(const_int 2)])))))))] - "TARGET_REALLY_IWMMXT" - "wmiatb%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiaxy")] -) - -(define_insn "iwmmxt_wmiatt" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI (match_operand:DI 1 "register_operand" "0") - (plus:DI - (mult:DI - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 1)]))) - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 3 "register_operand" "y") - (parallel [(const_int 1)])))) - (mult:DI - (sign_extend:DI - (vec_select:HI (match_dup 2) - (parallel [(const_int 3)]))) - (sign_extend:DI - (vec_select:HI (match_dup 3) - (parallel [(const_int 3)])))))))] - "TARGET_REALLY_IWMMXT" - "wmiatt%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiaxy")] -) - -(define_insn "iwmmxt_wmiabbn" - [(set (match_operand:DI 0 "register_operand" "=y") - (minus:DI (match_operand:DI 1 "register_operand" "0") - (plus:DI - (mult:DI - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 0)]))) - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 3 "register_operand" "y") - (parallel [(const_int 0)])))) - (mult:DI - (sign_extend:DI - (vec_select:HI (match_dup 2) - (parallel [(const_int 2)]))) - (sign_extend:DI - (vec_select:HI (match_dup 3) - (parallel [(const_int 2)])))))))] - "TARGET_REALLY_IWMMXT" - "wmiabbn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiaxy")] -) - -(define_insn "iwmmxt_wmiabtn" - [(set (match_operand:DI 0 "register_operand" "=y") - (minus:DI (match_operand:DI 1 "register_operand" "0") - (plus:DI - (mult:DI - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 0)]))) - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 3 "register_operand" "y") - (parallel [(const_int 1)])))) - (mult:DI - (sign_extend:DI - (vec_select:HI (match_dup 2) - (parallel [(const_int 2)]))) - (sign_extend:DI - (vec_select:HI (match_dup 3) - (parallel [(const_int 3)])))))))] - "TARGET_REALLY_IWMMXT" - "wmiabtn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiaxy")] -) - -(define_insn "iwmmxt_wmiatbn" - [(set (match_operand:DI 0 "register_operand" "=y") - (minus:DI (match_operand:DI 1 "register_operand" "0") - (plus:DI - (mult:DI - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 1)]))) - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 3 "register_operand" "y") - (parallel [(const_int 0)])))) - (mult:DI - (sign_extend:DI - (vec_select:HI (match_dup 2) - (parallel [(const_int 3)]))) - (sign_extend:DI - (vec_select:HI (match_dup 3) - (parallel [(const_int 2)])))))))] - "TARGET_REALLY_IWMMXT" - "wmiatbn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiaxy")] -) - -(define_insn "iwmmxt_wmiattn" - [(set (match_operand:DI 0 "register_operand" "=y") - (minus:DI (match_operand:DI 1 "register_operand" "0") - (plus:DI - (mult:DI - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 2 "register_operand" "y") - (parallel [(const_int 1)]))) - (sign_extend:DI - (vec_select:HI (match_operand:V4HI 3 "register_operand" "y") - (parallel [(const_int 1)])))) - (mult:DI - (sign_extend:DI - (vec_select:HI (match_dup 2) - (parallel [(const_int 3)]))) - (sign_extend:DI - (vec_select:HI (match_dup 3) - (parallel [(const_int 3)])))))))] - "TARGET_REALLY_IWMMXT" - "wmiattn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiaxy")] -) - -(define_insn "iwmmxt_wmiawbb" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI - (match_operand:DI 1 "register_operand" "0") - (mult:DI - (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 0)]))) - (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 0)]))))))] - "TARGET_REALLY_IWMMXT" - "wmiawbb%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiawxy")] -) - -(define_insn "iwmmxt_wmiawbt" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI - (match_operand:DI 1 "register_operand" "0") - (mult:DI - (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 0)]))) - (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 1)]))))))] - "TARGET_REALLY_IWMMXT" - "wmiawbt%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiawxy")] -) - -(define_insn "iwmmxt_wmiawtb" - [(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI - (match_operand:DI 1 "register_operand" "0") - (mult:DI - (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 1)]))) - (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 0)]))))))] - "TARGET_REALLY_IWMMXT" - "wmiawtb%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiawxy")] -) - -(define_insn "iwmmxt_wmiawtt" -[(set (match_operand:DI 0 "register_operand" "=y") - (plus:DI - (match_operand:DI 1 "register_operand" "0") - (mult:DI - (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 1)]))) - (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 1)]))))))] - "TARGET_REALLY_IWMMXT" - "wmiawtt%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiawxy")] -) - -(define_insn "iwmmxt_wmiawbbn" - [(set (match_operand:DI 0 "register_operand" "=y") - (minus:DI - (match_operand:DI 1 "register_operand" "0") - (mult:DI - (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 0)]))) - (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 0)]))))))] - "TARGET_REALLY_IWMMXT" - "wmiawbbn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiawxy")] -) - -(define_insn "iwmmxt_wmiawbtn" - [(set (match_operand:DI 0 "register_operand" "=y") - (minus:DI - (match_operand:DI 1 "register_operand" "0") - (mult:DI - (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 0)]))) - (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 1)]))))))] - "TARGET_REALLY_IWMMXT" - "wmiawbtn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiawxy")] -) - -(define_insn "iwmmxt_wmiawtbn" - [(set (match_operand:DI 0 "register_operand" "=y") - (minus:DI - (match_operand:DI 1 "register_operand" "0") - (mult:DI - (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 1)]))) - (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 0)]))))))] - "TARGET_REALLY_IWMMXT" - "wmiawtbn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiawxy")] -) - -(define_insn "iwmmxt_wmiawttn" - [(set (match_operand:DI 0 "register_operand" "=y") - (minus:DI - (match_operand:DI 1 "register_operand" "0") - (mult:DI - (sign_extend:DI (vec_select:SI (match_operand:V2SI 2 "register_operand" "y") (parallel [(const_int 1)]))) - (sign_extend:DI (vec_select:SI (match_operand:V2SI 3 "register_operand" "y") (parallel [(const_int 1)]))))))] - "TARGET_REALLY_IWMMXT" - "wmiawttn%?\\t%0, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmiawxy")] -) - -(define_insn "iwmmxt_wmerge" - [(set (match_operand:DI 0 "register_operand" "=y") - (ior:DI - (ashift:DI - (match_operand:DI 2 "register_operand" "y") - (minus:SI - (const_int 64) - (mult:SI - (match_operand:SI 3 "immediate_operand" "i") - (const_int 8)))) - (lshiftrt:DI - (ashift:DI - (match_operand:DI 1 "register_operand" "y") - (mult:SI - (match_dup 3) - (const_int 8))) - (mult:SI - (match_dup 3) - (const_int 8)))))] - "TARGET_REALLY_IWMMXT" - "wmerge%?\\t%0, %1, %2, %3" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_wmerge")] -) - -(define_insn "iwmmxt_tandc<mode>3" - [(set (reg:CC CC_REGNUM) - (subreg:CC (unspec:VMMX [(const_int 0)] UNSPEC_TANDC) 0)) - (unspec:CC [(reg:SI 15)] UNSPEC_TANDC)] - "TARGET_REALLY_IWMMXT" - "tandc<MMX_char>%?\\t r15" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_tandc")] -) - -(define_insn "iwmmxt_torc<mode>3" - [(set (reg:CC CC_REGNUM) - (subreg:CC (unspec:VMMX [(const_int 0)] UNSPEC_TORC) 0)) - (unspec:CC [(reg:SI 15)] UNSPEC_TORC)] - "TARGET_REALLY_IWMMXT" - "torc<MMX_char>%?\\t r15" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_torc")] -) - -(define_insn "iwmmxt_torvsc<mode>3" - [(set (reg:CC CC_REGNUM) - (subreg:CC (unspec:VMMX [(const_int 0)] UNSPEC_TORVSC) 0)) - (unspec:CC [(reg:SI 15)] UNSPEC_TORVSC)] - "TARGET_REALLY_IWMMXT" - "torvsc<MMX_char>%?\\t r15" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_torvsc")] -) - -(define_insn "iwmmxt_textrc<mode>3" - [(set (reg:CC CC_REGNUM) - (subreg:CC (unspec:VMMX [(const_int 0) - (match_operand:SI 0 "immediate_operand" "i")] UNSPEC_TEXTRC) 0)) - (unspec:CC [(reg:SI 15)] UNSPEC_TEXTRC)] - "TARGET_REALLY_IWMMXT" - "textrc<MMX_char>%?\\t r15, %0" - [(set_attr "predicable" "yes") - (set_attr "type" "wmmx_textrc")] -) diff --git a/gcc/config/arm/marvell-f-iwmmxt.md b/gcc/config/arm/marvell-f-iwmmxt.md deleted file mode 100644 index c9c7b00..0000000 --- a/gcc/config/arm/marvell-f-iwmmxt.md +++ /dev/null @@ -1,189 +0,0 @@ -;; Marvell WMMX2 pipeline description -;; Copyright (C) 2011-2025 Free Software Foundation, Inc. -;; Written by Marvell, Inc. - -;; This file is part of GCC. - -;; GCC is free software; you can redistribute it and/or modify it -;; under the terms of the GNU General Public License as published -;; by the Free Software Foundation; either version 3, or (at your -;; option) any later version. - -;; GCC is distributed in the hope that it will be useful, but WITHOUT -;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public -;; License for more details. - -;; You should have received a copy of the GNU General Public License -;; along with GCC; see the file COPYING3. If not see -;; <http://www.gnu.org/licenses/>. - - -(define_automaton "marvell_f_iwmmxt") - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Pipelines -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;; This is a 7-stage pipelines: -;; -;; MD | MI | ME1 | ME2 | ME3 | ME4 | MW -;; -;; There are various bypasses modelled to a greater or lesser extent. -;; -;; Latencies in this file correspond to the number of cycles after -;; the issue stage that it takes for the result of the instruction to -;; be computed, or for its side-effects to occur. - -(define_cpu_unit "mf_iwmmxt_MD" "marvell_f_iwmmxt") -(define_cpu_unit "mf_iwmmxt_MI" "marvell_f_iwmmxt") -(define_cpu_unit "mf_iwmmxt_ME1" "marvell_f_iwmmxt") -(define_cpu_unit "mf_iwmmxt_ME2" "marvell_f_iwmmxt") -(define_cpu_unit "mf_iwmmxt_ME3" "marvell_f_iwmmxt") -(define_cpu_unit "mf_iwmmxt_ME4" "marvell_f_iwmmxt") -(define_cpu_unit "mf_iwmmxt_MW" "marvell_f_iwmmxt") - -(define_reservation "mf_iwmmxt_ME" - "mf_iwmmxt_ME1,mf_iwmmxt_ME2,mf_iwmmxt_ME3,mf_iwmmxt_ME4" -) - -(define_reservation "mf_iwmmxt_pipeline" - "mf_iwmmxt_MD, mf_iwmmxt_MI, mf_iwmmxt_ME, mf_iwmmxt_MW" -) - -;; An attribute to indicate whether our reservations are applicable. -(define_attr "marvell_f_iwmmxt" "yes,no" - (const (if_then_else (symbol_ref "arm_arch_iwmmxt") - (const_string "yes") (const_string "no")))) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; instruction classes -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;; An attribute appended to instructions for classification - -(define_attr "wmmxt_shift" "yes,no" - (if_then_else (eq_attr "type" "wmmx_wror, wmmx_wsll, wmmx_wsra, wmmx_wsrl") - (const_string "yes") (const_string "no")) -) - -(define_attr "wmmxt_pack" "yes,no" - (if_then_else (eq_attr "type" "wmmx_waligni, wmmx_walignr, wmmx_wmerge,\ - wmmx_wpack, wmmx_wshufh, wmmx_wunpckeh,\ - wmmx_wunpckih, wmmx_wunpckel, wmmx_wunpckil") - (const_string "yes") (const_string "no")) -) - -(define_attr "wmmxt_mult_c1" "yes,no" - (if_then_else (eq_attr "type" "wmmx_wmac, wmmx_wmadd, wmmx_wmiaxy,\ - wmmx_wmiawxy, wmmx_wmulw, wmmx_wqmiaxy,\ - wmmx_wqmulwm") - (const_string "yes") (const_string "no")) -) - -(define_attr "wmmxt_mult_c2" "yes,no" - (if_then_else (eq_attr "type" "wmmx_wmul, wmmx_wqmulm") - (const_string "yes") (const_string "no")) -) - -(define_attr "wmmxt_alu_c1" "yes,no" - (if_then_else (eq_attr "type" "wmmx_wabs, wmmx_wabsdiff, wmmx_wand,\ - wmmx_wandn, wmmx_wmov, wmmx_wor, wmmx_wxor") - (const_string "yes") (const_string "no")) -) - -(define_attr "wmmxt_alu_c2" "yes,no" - (if_then_else (eq_attr "type" "wmmx_wacc, wmmx_wadd, wmmx_waddsubhx,\ - wmmx_wavg2, wmmx_wavg4, wmmx_wcmpeq,\ - wmmx_wcmpgt, wmmx_wmax, wmmx_wmin,\ - wmmx_wsub, wmmx_waddbhus, wmmx_wsubaddhx") - (const_string "yes") (const_string "no")) -) - -(define_attr "wmmxt_alu_c3" "yes,no" - (if_then_else (eq_attr "type" "wmmx_wsad") - (const_string "yes") (const_string "no")) -) - -(define_attr "wmmxt_transfer_c1" "yes,no" - (if_then_else (eq_attr "type" "wmmx_tbcst, wmmx_tinsr,\ - wmmx_tmcr, wmmx_tmcrr") - (const_string "yes") (const_string "no")) -) - -(define_attr "wmmxt_transfer_c2" "yes,no" - (if_then_else (eq_attr "type" "wmmx_textrm, wmmx_tmovmsk,\ - wmmx_tmrc, wmmx_tmrrc") - (const_string "yes") (const_string "no")) -) - -(define_attr "wmmxt_transfer_c3" "yes,no" - (if_then_else (eq_attr "type" "wmmx_tmia, wmmx_tmiaph, wmmx_tmiaxy") - (const_string "yes") (const_string "no")) -) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Main description -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(define_insn_reservation "marvell_f_iwmmxt_alu_c1" 1 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "wmmxt_alu_c1" "yes")) - "mf_iwmmxt_pipeline") - -(define_insn_reservation "marvell_f_iwmmxt_pack" 1 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "wmmxt_pack" "yes")) - "mf_iwmmxt_pipeline") - -(define_insn_reservation "marvell_f_iwmmxt_shift" 1 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "wmmxt_shift" "yes")) - "mf_iwmmxt_pipeline") - -(define_insn_reservation "marvell_f_iwmmxt_transfer_c1" 1 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "wmmxt_transfer_c1" "yes")) - "mf_iwmmxt_pipeline") - -(define_insn_reservation "marvell_f_iwmmxt_transfer_c2" 5 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "wmmxt_transfer_c2" "yes")) - "mf_iwmmxt_pipeline") - -(define_insn_reservation "marvell_f_iwmmxt_alu_c2" 2 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "wmmxt_alu_c2" "yes")) - "mf_iwmmxt_pipeline") - -(define_insn_reservation "marvell_f_iwmmxt_alu_c3" 3 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "wmmxt_alu_c3" "yes")) - "mf_iwmmxt_pipeline") - -(define_insn_reservation "marvell_f_iwmmxt_transfer_c3" 4 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "wmmxt_transfer_c3" "yes")) - "mf_iwmmxt_pipeline") - -(define_insn_reservation "marvell_f_iwmmxt_mult_c1" 4 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "wmmxt_mult_c1" "yes")) - "mf_iwmmxt_pipeline") - -;There is a forwarding path from ME3 stage -(define_insn_reservation "marvell_f_iwmmxt_mult_c2" 3 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "wmmxt_mult_c2" "yes")) - "mf_iwmmxt_pipeline") - -(define_insn_reservation "marvell_f_iwmmxt_wstr" 0 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "type" "wmmx_wstr")) - "mf_iwmmxt_pipeline") - -;There is a forwarding path from MW stage -(define_insn_reservation "marvell_f_iwmmxt_wldr" 5 - (and (eq_attr "marvell_f_iwmmxt" "yes") - (eq_attr "type" "wmmx_wldr")) - "mf_iwmmxt_pipeline") diff --git a/gcc/config/arm/predicates.md b/gcc/config/arm/predicates.md index 75c06d9..57d4ec6 100644 --- a/gcc/config/arm/predicates.md +++ b/gcc/config/arm/predicates.md @@ -806,14 +806,8 @@ ;;------------------------------------------------------------------------- ;; -;; iWMMXt predicates -;; - -(define_predicate "imm_or_reg_operand" - (ior (match_operand 0 "immediate_operand") - (match_operand 0 "register_operand"))) - ;; Neon predicates +;; (define_predicate "const_multiple_of_8_operand" (match_code "const_int") diff --git a/gcc/config/arm/t-arm b/gcc/config/arm/t-arm index 641f8f5..670f574 100644 --- a/gcc/config/arm/t-arm +++ b/gcc/config/arm/t-arm @@ -50,11 +50,8 @@ MD_INCLUDES= $(srcdir)/config/arm/arm1020e.md \ $(srcdir)/config/arm/fa726te.md \ $(srcdir)/config/arm/fmp626.md \ $(srcdir)/config/arm/iterators.md \ - $(srcdir)/config/arm/iwmmxt.md \ - $(srcdir)/config/arm/iwmmxt2.md \ $(srcdir)/config/arm/ldmstm.md \ $(srcdir)/config/arm/ldrdstrd.md \ - $(srcdir)/config/arm/marvell-f-iwmmxt.md \ $(srcdir)/config/arm/mve.md \ $(srcdir)/config/arm/neon.md \ $(srcdir)/config/arm/predicates.md \ diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index 172c974b..019f9d4 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -235,7 +235,7 @@ (define_insn "*thumb2_movsi_insn" [(set (match_operand:SI 0 "nonimmediate_operand" "=rk,r,l,r,r,lk*r,m") (match_operand:SI 1 "general_operand" "rk,I,Py,K,j,mi,lk*r"))] - "TARGET_THUMB2 && !TARGET_IWMMXT && !TARGET_HARD_FLOAT + "TARGET_THUMB2 && !TARGET_HARD_FLOAT && ( register_operand (operands[0], SImode) || register_operand (operands[1], SImode))" { diff --git a/gcc/config/arm/types.md b/gcc/config/arm/types.md index b72c871..e517b91 100644 --- a/gcc/config/arm/types.md +++ b/gcc/config/arm/types.md @@ -184,70 +184,6 @@ ; untyped insn without type information - default, and error, ; case. ; -; The classification below is for instructions used by the Wireless MMX -; Technology. Each attribute value is used to classify an instruction of the -; same name or family. -; -; wmmx_tandc -; wmmx_tbcst -; wmmx_textrc -; wmmx_textrm -; wmmx_tinsr -; wmmx_tmcr -; wmmx_tmcrr -; wmmx_tmia -; wmmx_tmiaph -; wmmx_tmiaxy -; wmmx_tmrc -; wmmx_tmrrc -; wmmx_tmovmsk -; wmmx_torc -; wmmx_torvsc -; wmmx_wabs -; wmmx_wdiff -; wmmx_wacc -; wmmx_wadd -; wmmx_waddbhus -; wmmx_waddsubhx -; wmmx_waligni -; wmmx_walignr -; wmmx_wand -; wmmx_wandn -; wmmx_wavg2 -; wmmx_wavg4 -; wmmx_wcmpeq -; wmmx_wcmpgt -; wmmx_wmac -; wmmx_wmadd -; wmmx_wmax -; wmmx_wmerge -; wmmx_wmiawxy -; wmmx_wmiaxy -; wmmx_wmin -; wmmx_wmov -; wmmx_wmul -; wmmx_wmulw -; wmmx_wldr -; wmmx_wor -; wmmx_wpack -; wmmx_wqmiaxy -; wmmx_wqmulm -; wmmx_wqmulwm -; wmmx_wror -; wmmx_wsad -; wmmx_wshufh -; wmmx_wsll -; wmmx_wsra -; wmmx_wsrl -; wmmx_wstr -; wmmx_wsub -; wmmx_wsubaddhx -; wmmx_wunpckeh -; wmmx_wunpckel -; wmmx_wunpckih -; wmmx_wunpckil -; wmmx_wxor -; ; The classification below is for NEON instructions. If a new neon type is ; added, please ensure this is added to the is_neon_type attribute below too. ; @@ -714,65 +650,6 @@ umull,\ umulls,\ untyped,\ - wmmx_tandc,\ - wmmx_tbcst,\ - wmmx_textrc,\ - wmmx_textrm,\ - wmmx_tinsr,\ - wmmx_tmcr,\ - wmmx_tmcrr,\ - wmmx_tmia,\ - wmmx_tmiaph,\ - wmmx_tmiaxy,\ - wmmx_tmrc,\ - wmmx_tmrrc,\ - wmmx_tmovmsk,\ - wmmx_torc,\ - wmmx_torvsc,\ - wmmx_wabs,\ - wmmx_wabsdiff,\ - wmmx_wacc,\ - wmmx_wadd,\ - wmmx_waddbhus,\ - wmmx_waddsubhx,\ - wmmx_waligni,\ - wmmx_walignr,\ - wmmx_wand,\ - wmmx_wandn,\ - wmmx_wavg2,\ - wmmx_wavg4,\ - wmmx_wcmpeq,\ - wmmx_wcmpgt,\ - wmmx_wmac,\ - wmmx_wmadd,\ - wmmx_wmax,\ - wmmx_wmerge,\ - wmmx_wmiawxy,\ - wmmx_wmiaxy,\ - wmmx_wmin,\ - wmmx_wmov,\ - wmmx_wmul,\ - wmmx_wmulw,\ - wmmx_wldr,\ - wmmx_wor,\ - wmmx_wpack,\ - wmmx_wqmiaxy,\ - wmmx_wqmulm,\ - wmmx_wqmulwm,\ - wmmx_wror,\ - wmmx_wsad,\ - wmmx_wshufh,\ - wmmx_wsll,\ - wmmx_wsra,\ - wmmx_wsrl,\ - wmmx_wstr,\ - wmmx_wsub,\ - wmmx_wsubaddhx,\ - wmmx_wunpckeh,\ - wmmx_wunpckel,\ - wmmx_wunpckih,\ - wmmx_wunpckil,\ - wmmx_wxor,\ \ neon_add,\ neon_add_q,\ diff --git a/gcc/config/arm/unspecs.md b/gcc/config/arm/unspecs.md index a03609d..c1ee972 100644 --- a/gcc/config/arm/unspecs.md +++ b/gcc/config/arm/unspecs.md @@ -21,7 +21,6 @@ ;; UNSPEC Usage: ;; Note: sin and cos are no-longer used. ;; Unspec enumerators for Neon are defined in neon.md. -;; Unspec enumerators for iwmmxt2 are defined in iwmmxt2.md (define_c_enum "unspec" [ UNSPEC_PUSH_MULT ; `push multiple' operation: @@ -42,17 +41,6 @@ ; and stack frame generation. Operand 0 is the ; register to "use". UNSPEC_CHECK_ARCH ; Set CCs to indicate 26-bit or 32-bit mode. - UNSPEC_WSHUFH ; Used by the intrinsic form of the iWMMXt WSHUFH instruction. - UNSPEC_WACC ; Used by the intrinsic form of the iWMMXt WACC instruction. - UNSPEC_TMOVMSK ; Used by the intrinsic form of the iWMMXt TMOVMSK instruction. - UNSPEC_WSAD ; Used by the intrinsic form of the iWMMXt WSAD instruction. - UNSPEC_WSADZ ; Used by the intrinsic form of the iWMMXt WSADZ instruction. - UNSPEC_WMACS ; Used by the intrinsic form of the iWMMXt WMACS instruction. - UNSPEC_WMACU ; Used by the intrinsic form of the iWMMXt WMACU instruction. - UNSPEC_WMACSZ ; Used by the intrinsic form of the iWMMXt WMACSZ instruction. - UNSPEC_WMACUZ ; Used by the intrinsic form of the iWMMXt WMACUZ instruction. - UNSPEC_CLRDI ; Used by the intrinsic form of the iWMMXt CLRDI instruction. - UNSPEC_WALIGNI ; Used by the intrinsic form of the iWMMXt WALIGN instruction. UNSPEC_TLS ; A symbol that has been treated properly for TLS usage. UNSPEC_PIC_LABEL ; A label used for PIC access that does not appear in the ; instruction stream. @@ -164,18 +152,6 @@ (define_c_enum "unspec" [ - UNSPEC_WADDC ; Used by the intrinsic form of the iWMMXt WADDC instruction. - UNSPEC_WABS ; Used by the intrinsic form of the iWMMXt WABS instruction. - UNSPEC_WQMULWMR ; Used by the intrinsic form of the iWMMXt WQMULWMR instruction. - UNSPEC_WQMULMR ; Used by the intrinsic form of the iWMMXt WQMULMR instruction. - UNSPEC_WQMULWM ; Used by the intrinsic form of the iWMMXt WQMULWM instruction. - UNSPEC_WQMULM ; Used by the intrinsic form of the iWMMXt WQMULM instruction. - UNSPEC_WQMIAxyn ; Used by the intrinsic form of the iWMMXt WMIAxyn instruction. - UNSPEC_WQMIAxy ; Used by the intrinsic form of the iWMMXt WMIAxy instruction. - UNSPEC_TANDC ; Used by the intrinsic form of the iWMMXt TANDC instruction. - UNSPEC_TORC ; Used by the intrinsic form of the iWMMXt TORC instruction. - UNSPEC_TORVSC ; Used by the intrinsic form of the iWMMXt TORVSC instruction. - UNSPEC_TEXTRC ; Used by the intrinsic form of the iWMMXt TEXTRC instruction. UNSPEC_GET_FPSCR_NZCVQC ; Represent fetch of FPSCR_nzcvqc content. ]) @@ -205,12 +181,7 @@ ; a 64-bit object. VUNSPEC_POOL_16 ; `pool-entry(16)'. An entry in the constant pool for ; a 128-bit object. - VUNSPEC_TMRC ; Used by the iWMMXt TMRC instruction. - VUNSPEC_TMCR ; Used by the iWMMXt TMCR instruction. VUNSPEC_ALIGN8 ; 8-byte alignment version of VUNSPEC_ALIGN - VUNSPEC_WCMP_EQ ; Used by the iWMMXt WCMPEQ instructions - VUNSPEC_WCMP_GTU ; Used by the iWMMXt WCMPGTU instructions - VUNSPEC_WCMP_GT ; Used by the iwMMXT WCMPGT instructions VUNSPEC_EH_RETURN ; Use to override the return address for exception ; handling. VUNSPEC_ATOMIC_CAS ; Represent an atomic compare swap. diff --git a/gcc/config/arm/vec-common.md b/gcc/config/arm/vec-common.md index a485d05..061165e 100644 --- a/gcc/config/arm/vec-common.md +++ b/gcc/config/arm/vec-common.md @@ -1,4 +1,4 @@ -;; Machine Description for shared bits common to IWMMXT and Neon. +;; Machine Description for shared bits common to Neon and MVE. ;; Copyright (C) 2006-2025 Free Software Foundation, Inc. ;; Written by CodeSourcery. ;; @@ -24,7 +24,6 @@ [(set (match_operand:VNIM1 0 "nonimmediate_operand") (match_operand:VNIM1 1 "general_operand"))] "TARGET_NEON - || (TARGET_REALLY_IWMMXT && VALID_IWMMXT_REG_MODE (<MODE>mode)) || (TARGET_HAVE_MVE && VALID_MVE_SI_MODE (<MODE>mode)) || (TARGET_HAVE_MVE_FLOAT && VALID_MVE_SF_MODE (<MODE>mode))" { @@ -46,8 +45,7 @@ (define_expand "mov<mode>" [(set (match_operand:VNINOTM1 0 "nonimmediate_operand") (match_operand:VNINOTM1 1 "general_operand"))] - "TARGET_NEON - || (TARGET_REALLY_IWMMXT && VALID_IWMMXT_REG_MODE (<MODE>mode))" + "TARGET_NEON" { gcc_checking_assert (aligned_operand (operands[0], <MODE>mode)); gcc_checking_assert (aligned_operand (operands[1], <MODE>mode)); @@ -83,7 +81,7 @@ }) ;; Vector arithmetic. Expanders are blank, then unnamed insns implement -;; patterns separately for Neon, IWMMXT and MVE. +;; patterns separately for Neon and MVE. (define_expand "add<mode>3" [(set (match_operand:VDQ 0 "s_register_operand") @@ -103,10 +101,7 @@ [(set (match_operand:VDQWH 0 "s_register_operand") (mult:VDQWH (match_operand:VDQWH 1 "s_register_operand") (match_operand:VDQWH 2 "s_register_operand")))] - "ARM_HAVE_<MODE>_ARITH - && (!TARGET_REALLY_IWMMXT - || <MODE>mode == V4HImode - || <MODE>mode == V2SImode)" + "ARM_HAVE_<MODE>_ARITH" ) (define_expand "smin<mode>3" @@ -216,13 +211,13 @@ (define_expand "one_cmpl<mode>2" [(set (match_operand:VDQ 0 "s_register_operand") (not:VDQ (match_operand:VDQ 1 "s_register_operand")))] - "ARM_HAVE_<MODE>_ARITH && !TARGET_REALLY_IWMMXT" + "ARM_HAVE_<MODE>_ARITH" ) (define_expand "<absneg_str><mode>2" [(set (match_operand:VDQWH 0 "s_register_operand" "") (ABSNEG:VDQWH (match_operand:VDQWH 1 "s_register_operand" "")))] - "ARM_HAVE_<MODE>_ARITH && !TARGET_REALLY_IWMMXT" + "ARM_HAVE_<MODE>_ARITH" ) (define_expand "cadd<rot><mode>3" @@ -295,8 +290,7 @@ [(set (match_operand:VDQ 0 "nonimmediate_operand") (unspec:VDQ [(match_operand:VDQ 1 "general_operand")] UNSPEC_MISALIGNED_ACCESS))] - "ARM_HAVE_<MODE>_LDST && !BYTES_BIG_ENDIAN - && unaligned_access && !TARGET_REALLY_IWMMXT" + "ARM_HAVE_<MODE>_LDST && !BYTES_BIG_ENDIAN && unaligned_access" { rtx *memloc; bool for_store = false; @@ -373,7 +367,7 @@ (unspec:VDQIW [(match_operand:VDQIW 1 "s_register_operand" "w,w") (match_operand:VDQIW 2 "imm_lshift_or_reg_neon" "w,Ds")] VSHLQ))] - "ARM_HAVE_<MODE>_ARITH && !TARGET_REALLY_IWMMXT" + "ARM_HAVE_<MODE>_ARITH" "@ <mve_insn>.<supf>%#<V_sz_elem>\t%<V_reg>0, %<V_reg>1, %<V_reg>2 * return neon_output_shift_immediate (\"vshl\", 'i', &operands[2], <MODE>mode, VALID_NEON_QREG_MODE (<MODE>mode), true);" @@ -385,7 +379,7 @@ [(set (match_operand:VDQIW 0 "s_register_operand" "") (ashift:VDQIW (match_operand:VDQIW 1 "s_register_operand" "") (match_operand:VDQIW 2 "imm_lshift_or_reg_neon" "")))] - "ARM_HAVE_<MODE>_ARITH && !TARGET_REALLY_IWMMXT" + "ARM_HAVE_<MODE>_ARITH" { emit_insn (gen_mve_vshlq_u<mode> (operands[0], operands[1], operands[2])); DONE; @@ -398,7 +392,7 @@ [(set (match_operand:VDQIW 0 "s_register_operand") (ashiftrt:VDQIW (match_operand:VDQIW 1 "s_register_operand") (match_operand:VDQIW 2 "imm_rshift_or_reg_neon")))] - "ARM_HAVE_<MODE>_ARITH && !TARGET_REALLY_IWMMXT" + "ARM_HAVE_<MODE>_ARITH" { if (s_register_operand (operands[2], <MODE>mode)) { @@ -416,7 +410,7 @@ [(set (match_operand:VDQIW 0 "s_register_operand") (lshiftrt:VDQIW (match_operand:VDQIW 1 "s_register_operand") (match_operand:VDQIW 2 "imm_rshift_or_reg_neon")))] - "ARM_HAVE_<MODE>_ARITH && !TARGET_REALLY_IWMMXT" + "ARM_HAVE_<MODE>_ARITH" { if (s_register_operand (operands[2], <MODE>mode)) { @@ -606,8 +600,7 @@ (define_expand "clz<mode>2" [(set (match_operand:VDQIW 0 "s_register_operand") (clz:VDQIW (match_operand:VDQIW 1 "s_register_operand")))] - "ARM_HAVE_<MODE>_ARITH - && !TARGET_REALLY_IWMMXT" + "ARM_HAVE_<MODE>_ARITH" ) (define_expand "vec_init<mode><V_elem_l>" [(match_operand:VDQX 0 "s_register_operand") diff --git a/gcc/config/i386/i386-features.cc b/gcc/config/i386/i386-features.cc index 13e6c2a..6491c6b 100644 --- a/gcc/config/i386/i386-features.cc +++ b/gcc/config/i386/i386-features.cc @@ -296,9 +296,8 @@ scalar_chain::scalar_chain (enum machine_mode smode_, enum machine_mode vmode_) insns_conv = BITMAP_ALLOC (NULL); queue = NULL; - n_sse_to_integer = 0; - n_integer_to_sse = 0; - + cost_sse_integer = 0; + weighted_cost_sse_integer = 0 ; max_visits = x86_stv_max_visits; } @@ -337,20 +336,52 @@ scalar_chain::mark_dual_mode_def (df_ref def) /* Record the def/insn pair so we can later efficiently iterate over the defs to convert on insns not in the chain. */ bool reg_new = bitmap_set_bit (defs_conv, DF_REF_REGNO (def)); + basic_block bb = BLOCK_FOR_INSN (DF_REF_INSN (def)); + profile_count entry_count = ENTRY_BLOCK_PTR_FOR_FN (cfun)->count; + bool speed_p = optimize_bb_for_speed_p (bb); + int cost = 0; + if (!bitmap_bit_p (insns, DF_REF_INSN_UID (def))) { if (!bitmap_set_bit (insns_conv, DF_REF_INSN_UID (def)) && !reg_new) return; - n_integer_to_sse++; + + /* Cost integer to sse moves. */ + if (speed_p) + cost = COSTS_N_INSNS (ix86_cost->integer_to_sse) / 2; + else if (TARGET_64BIT || smode == SImode) + cost = COSTS_N_BYTES (4); + /* vmovd (4 bytes) + vpinsrd (6 bytes). */ + else if (TARGET_SSE4_1) + cost = COSTS_N_BYTES (10); + /* movd (4 bytes) + movd (4 bytes) + unpckldq (4 bytes). */ + else + cost = COSTS_N_BYTES (12); } else { if (!reg_new) return; - n_sse_to_integer++; + + /* Cost sse to integer moves. */ + if (speed_p) + cost = COSTS_N_INSNS (ix86_cost->sse_to_integer) / 2; + else if (TARGET_64BIT || smode == SImode) + cost = COSTS_N_BYTES (4); + /* vmovd (4 bytes) + vpextrd (6 bytes). */ + else if (TARGET_SSE4_1) + cost = COSTS_N_BYTES (10); + /* movd (4 bytes) + psrlq (5 bytes) + movd (4 bytes). */ + else + cost = COSTS_N_BYTES (13); } + if (speed_p) + weighted_cost_sse_integer += bb->count.to_sreal_scale (entry_count) * cost; + + cost_sse_integer += cost; + if (dump_file) fprintf (dump_file, " Mark r%d def in insn %d as requiring both modes in chain #%d\n", @@ -531,15 +562,15 @@ general_scalar_chain::vector_const_cost (rtx exp, basic_block bb) return COSTS_N_INSNS (ix86_cost->sse_load[smode == DImode ? 1 : 0]) / 2; } -/* Compute a gain for chain conversion. */ +/* Return true if it's cost profitable for chain conversion. */ -int +bool general_scalar_chain::compute_convert_gain () { bitmap_iterator bi; unsigned insn_uid; int gain = 0; - int cost = 0; + sreal weighted_gain = 0; if (dump_file) fprintf (dump_file, "Computing gain for chain #%d...\n", chain_id); @@ -559,10 +590,13 @@ general_scalar_chain::compute_convert_gain () rtx dst = SET_DEST (def_set); basic_block bb = BLOCK_FOR_INSN (insn); int igain = 0; + profile_count entry_count = ENTRY_BLOCK_PTR_FOR_FN (cfun)->count; + bool speed_p = optimize_bb_for_speed_p (bb); + sreal bb_freq = bb->count.to_sreal_scale (entry_count); if (REG_P (src) && REG_P (dst)) { - if (optimize_bb_for_size_p (bb)) + if (!speed_p) /* reg-reg move is 2 bytes, while SSE 3. */ igain += COSTS_N_BYTES (2 * m - 3); else @@ -571,7 +605,7 @@ general_scalar_chain::compute_convert_gain () } else if (REG_P (src) && MEM_P (dst)) { - if (optimize_bb_for_size_p (bb)) + if (!speed_p) /* Integer load/store is 3+ bytes and SSE 4+. */ igain += COSTS_N_BYTES (3 * m - 4); else @@ -581,7 +615,7 @@ general_scalar_chain::compute_convert_gain () } else if (MEM_P (src) && REG_P (dst)) { - if (optimize_bb_for_size_p (bb)) + if (!speed_p) igain += COSTS_N_BYTES (3 * m - 4); else igain += COSTS_N_INSNS (m * ix86_cost->int_load[2] @@ -593,7 +627,7 @@ general_scalar_chain::compute_convert_gain () of explicit load and store instructions. */ if (MEM_P (dst)) { - if (optimize_bb_for_size_p (bb)) + if (!speed_p) /* ??? This probably should account size difference of SSE and integer load rather than full SSE load. */ igain -= COSTS_N_BYTES (8); @@ -667,7 +701,7 @@ general_scalar_chain::compute_convert_gain () igain -= vector_const_cost (XEXP (src, 1), bb); if (MEM_P (XEXP (src, 1))) { - if (optimize_bb_for_size_p (bb)) + if (!speed_p) igain -= COSTS_N_BYTES (m == 2 ? 3 : 5); else igain += COSTS_N_INSNS @@ -730,7 +764,7 @@ general_scalar_chain::compute_convert_gain () case CONST_INT: if (REG_P (dst)) { - if (optimize_bb_for_size_p (bb)) + if (!speed_p) { /* xor (2 bytes) vs. xorps (3 bytes). */ if (src == const0_rtx) @@ -769,14 +803,14 @@ general_scalar_chain::compute_convert_gain () if (XVECEXP (XEXP (src, 1), 0, 0) == const0_rtx) { // movd (4 bytes) replaced with movdqa (4 bytes). - if (!optimize_bb_for_size_p (bb)) + if (!!speed_p) igain += COSTS_N_INSNS (ix86_cost->sse_to_integer - ix86_cost->xmm_move) / 2; } else { // pshufd; movd replaced with pshufd. - if (optimize_bb_for_size_p (bb)) + if (!speed_p) igain += COSTS_N_BYTES (4); else igain += ix86_cost->sse_to_integer; @@ -788,55 +822,34 @@ general_scalar_chain::compute_convert_gain () } } + if (speed_p) + weighted_gain += bb_freq * igain; + gain += igain; + if (igain != 0 && dump_file) { - fprintf (dump_file, " Instruction gain %d for ", igain); + fprintf (dump_file, " Instruction gain %d with bb_freq %.2f for", + igain, bb_freq.to_double ()); dump_insn_slim (dump_file, insn); } - gain += igain; } if (dump_file) - fprintf (dump_file, " Instruction conversion gain: %d\n", gain); - - /* Cost the integer to sse and sse to integer moves. */ - if (!optimize_function_for_size_p (cfun)) { - cost += n_sse_to_integer * COSTS_N_INSNS (ix86_cost->sse_to_integer) / 2; - /* ??? integer_to_sse but we only have that in the RA cost table. - Assume sse_to_integer/integer_to_sse are the same which they - are at the moment. */ - cost += n_integer_to_sse * COSTS_N_INSNS (ix86_cost->integer_to_sse) / 2; + fprintf (dump_file, " Instruction conversion gain: %d, \n", + gain); + fprintf (dump_file, " Registers conversion cost: %d\n", + cost_sse_integer); + fprintf (dump_file, " Weighted instruction conversion gain: %.2f, \n", + weighted_gain.to_double ()); + fprintf (dump_file, " Weighted registers conversion cost: %.2f\n", + weighted_cost_sse_integer.to_double ()); } - else if (TARGET_64BIT || smode == SImode) - { - cost += n_sse_to_integer * COSTS_N_BYTES (4); - cost += n_integer_to_sse * COSTS_N_BYTES (4); - } - else if (TARGET_SSE4_1) - { - /* vmovd (4 bytes) + vpextrd (6 bytes). */ - cost += n_sse_to_integer * COSTS_N_BYTES (10); - /* vmovd (4 bytes) + vpinsrd (6 bytes). */ - cost += n_integer_to_sse * COSTS_N_BYTES (10); - } - else - { - /* movd (4 bytes) + psrlq (5 bytes) + movd (4 bytes). */ - cost += n_sse_to_integer * COSTS_N_BYTES (13); - /* movd (4 bytes) + movd (4 bytes) + unpckldq (4 bytes). */ - cost += n_integer_to_sse * COSTS_N_BYTES (12); - } - - if (dump_file) - fprintf (dump_file, " Registers conversion cost: %d\n", cost); - - gain -= cost; - if (dump_file) - fprintf (dump_file, " Total gain: %d\n", gain); - - return gain; + if (weighted_gain != weighted_cost_sse_integer) + return weighted_gain > weighted_cost_sse_integer; + else + return gain > cost_sse_integer;; } /* Insert generated conversion instruction sequence INSNS @@ -1553,21 +1566,22 @@ timode_immed_const_gain (rtx cst, basic_block bb) return 0; } -/* Compute a gain for chain conversion. */ +/* Return true it's cost profitable for for chain conversion. */ -int +bool timode_scalar_chain::compute_convert_gain () { /* Assume that if we have to move TImode values between units, then transforming this chain isn't worth it. */ - if (n_sse_to_integer || n_integer_to_sse) - return -1; + if (cost_sse_integer) + return false; bitmap_iterator bi; unsigned insn_uid; /* Split ties to prefer V1TImode when not optimizing for size. */ int gain = optimize_size ? 0 : 1; + sreal weighted_gain = 0; if (dump_file) fprintf (dump_file, "Computing gain for chain #%d...\n", chain_id); @@ -1582,32 +1596,33 @@ timode_scalar_chain::compute_convert_gain () basic_block bb = BLOCK_FOR_INSN (insn); int scost, vcost; int igain = 0; + profile_count entry_count = ENTRY_BLOCK_PTR_FOR_FN (cfun)->count; + bool speed_p = optimize_bb_for_speed_p (bb); + sreal bb_freq = bb->count.to_sreal_scale (entry_count); switch (GET_CODE (src)) { case REG: - if (optimize_bb_for_size_p (bb)) + if (!speed_p) igain = MEM_P (dst) ? COSTS_N_BYTES (6) : COSTS_N_BYTES (3); else igain = COSTS_N_INSNS (1); break; case MEM: - igain = optimize_bb_for_size_p (bb) ? COSTS_N_BYTES (7) - : COSTS_N_INSNS (1); + igain = !speed_p ? COSTS_N_BYTES (7) : COSTS_N_INSNS (1); break; case CONST_INT: if (MEM_P (dst) && standard_sse_constant_p (src, V1TImode)) - igain = optimize_bb_for_size_p (bb) ? COSTS_N_BYTES (11) : 1; + igain = !speed_p ? COSTS_N_BYTES (11) : 1; break; case CONST_WIDE_INT: /* 2 x mov vs. vmovdqa. */ if (MEM_P (dst)) - igain = optimize_bb_for_size_p (bb) ? COSTS_N_BYTES (3) - : COSTS_N_INSNS (1); + igain = !speed_p ? COSTS_N_BYTES (3) : COSTS_N_INSNS (1); break; case NOT: @@ -1628,7 +1643,7 @@ timode_scalar_chain::compute_convert_gain () case LSHIFTRT: /* See ix86_expand_v1ti_shift. */ op1val = INTVAL (XEXP (src, 1)); - if (optimize_bb_for_size_p (bb)) + if (!speed_p) { if (op1val == 64 || op1val == 65) scost = COSTS_N_BYTES (5); @@ -1662,7 +1677,7 @@ timode_scalar_chain::compute_convert_gain () case ASHIFTRT: /* See ix86_expand_v1ti_ashiftrt. */ op1val = INTVAL (XEXP (src, 1)); - if (optimize_bb_for_size_p (bb)) + if (!speed_p) { if (op1val == 64 || op1val == 127) scost = COSTS_N_BYTES (7); @@ -1740,7 +1755,7 @@ timode_scalar_chain::compute_convert_gain () case ROTATERT: /* See ix86_expand_v1ti_rotate. */ op1val = INTVAL (XEXP (src, 1)); - if (optimize_bb_for_size_p (bb)) + if (!speed_p) { scost = COSTS_N_BYTES (13); if ((op1val & 31) == 0) @@ -1772,34 +1787,40 @@ timode_scalar_chain::compute_convert_gain () { if (GET_CODE (XEXP (src, 0)) == AND) /* and;and;or (9 bytes) vs. ptest (5 bytes). */ - igain = optimize_bb_for_size_p (bb) ? COSTS_N_BYTES (4) - : COSTS_N_INSNS (2); + igain = !speed_p ? COSTS_N_BYTES (4) : COSTS_N_INSNS (2); /* or (3 bytes) vs. ptest (5 bytes). */ - else if (optimize_bb_for_size_p (bb)) + else if (!speed_p) igain = -COSTS_N_BYTES (2); } else if (XEXP (src, 1) == const1_rtx) /* and;cmp -1 (7 bytes) vs. pcmpeqd;pxor;ptest (13 bytes). */ - igain = optimize_bb_for_size_p (bb) ? -COSTS_N_BYTES (6) - : -COSTS_N_INSNS (1); + igain = !speed_p ? -COSTS_N_BYTES (6) : -COSTS_N_INSNS (1); break; default: break; } + gain += igain; + if (speed_p) + weighted_gain += bb_freq * igain; + if (igain != 0 && dump_file) { - fprintf (dump_file, " Instruction gain %d for ", igain); + fprintf (dump_file, " Instruction gain %d with bb_freq %.2f for ", + igain, bb_freq.to_double ()); dump_insn_slim (dump_file, insn); } - gain += igain; } if (dump_file) - fprintf (dump_file, " Total gain: %d\n", gain); + fprintf (dump_file, " Total gain: %d, weighted gain %.2f\n", + gain, weighted_gain.to_double ()); - return gain; + if (weighted_gain > (sreal) 0) + return true; + else + return gain > 0; } /* Fix uses of converted REG in debug insns. */ @@ -2595,7 +2616,7 @@ convert_scalars_to_vector (bool timode_p) conversions. */ if (chain->build (&candidates[i], uid, disallowed)) { - if (chain->compute_convert_gain () > 0) + if (chain->compute_convert_gain ()) converted_insns += chain->convert (); else if (dump_file) fprintf (dump_file, "Chain #%d conversion is not profitable\n", @@ -3095,13 +3116,10 @@ ix86_place_single_vector_set (rtx dest, rtx src, bitmap bbs) insn = NEXT_INSN (insn); } - rtx_insn *set_insn; if (insn == BB_HEAD (bb)) - set_insn = emit_insn_before (set, insn); + emit_insn_before (set, insn); else - set_insn = emit_insn_after (set, - insn ? PREV_INSN (insn) : BB_END (bb)); - df_insn_rescan (set_insn); + emit_insn_after (set, insn ? PREV_INSN (insn) : BB_END (bb)); } /* At entry of the nearest common dominator for basic blocks with @@ -3225,7 +3243,6 @@ remove_partial_avx_dependency (void) /* Generate an XMM vector SET. */ set = gen_rtx_SET (vec, src); set_insn = emit_insn_before (set, insn); - df_insn_rescan (set_insn); if (cfun->can_throw_non_call_exceptions) { @@ -3396,8 +3413,7 @@ replace_vector_const (machine_mode vector_mode, rtx vector_const, vreg = gen_reg_rtx (vmode); rtx vsubreg = gen_rtx_SUBREG (vmode, vector_const, 0); rtx pat = gen_rtx_SET (vreg, vsubreg); - rtx_insn *vinsn = emit_insn_before (pat, insn); - df_insn_rescan (vinsn); + emit_insn_before (pat, insn); } replace = gen_rtx_SUBREG (mode, vreg, 0); } diff --git a/gcc/config/i386/i386-features.h b/gcc/config/i386/i386-features.h index 7f7c0f7..e3719b3 100644 --- a/gcc/config/i386/i386-features.h +++ b/gcc/config/i386/i386-features.h @@ -153,12 +153,13 @@ class scalar_chain bitmap insns_conv; hash_map<rtx, rtx> defs_map; - unsigned n_sse_to_integer; - unsigned n_integer_to_sse; + /* Cost of inserted conversion between ineteger and sse. */ + int cost_sse_integer; + sreal weighted_cost_sse_integer; auto_vec<rtx_insn *> control_flow_insns; bool build (bitmap candidates, unsigned insn_uid, bitmap disallowed); - virtual int compute_convert_gain () = 0; + virtual bool compute_convert_gain () = 0; int convert (); protected: @@ -184,7 +185,7 @@ class general_scalar_chain : public scalar_chain public: general_scalar_chain (enum machine_mode smode_, enum machine_mode vmode_) : scalar_chain (smode_, vmode_) {} - int compute_convert_gain () final override; + bool compute_convert_gain () final override; private: void convert_insn (rtx_insn *insn) final override; @@ -196,7 +197,7 @@ class timode_scalar_chain : public scalar_chain { public: timode_scalar_chain () : scalar_chain (TImode, V1TImode) {} - int compute_convert_gain () final override; + bool compute_convert_gain () final override; private: void fix_debug_reg_uses (rtx reg); diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc index 9c24a92..d55c418 100644 --- a/gcc/config/i386/i386.cc +++ b/gcc/config/i386/i386.cc @@ -21753,7 +21753,7 @@ ix86_widen_mult_cost (const struct processor_costs *cost, /* pmuludq under sse2, pmuldq under sse4.1, for sign_extend, require extra 4 mul, 4 add, 4 cmp and 2 shift. */ if (!TARGET_SSE4_1 && !uns_p) - extra_cost = (cost->mulss + cost->addss + cost->sse_op) * 4 + extra_cost = (cost->mulss + cost->sse_op + cost->sse_op) * 4 + cost->sse_op * 2; /* Fallthru. */ case V4DImode: @@ -21803,11 +21803,11 @@ ix86_multiplication_cost (const struct processor_costs *cost, else if (TARGET_AVX2) nops += 2; else if (TARGET_XOP) - extra += cost->sse_load[2]; + extra += COSTS_N_INSNS (cost->sse_load[2]) / 2; else { nops += 1; - extra += cost->sse_load[2]; + extra += COSTS_N_INSNS (cost->sse_load[2]) / 2; } goto do_qimode; @@ -21826,13 +21826,13 @@ ix86_multiplication_cost (const struct processor_costs *cost, { nmults += 1; nops += 2; - extra += cost->sse_load[2]; + extra += COSTS_N_INSNS (cost->sse_load[2]) / 2; } else { nmults += 1; nops += 4; - extra += cost->sse_load[2]; + extra += COSTS_N_INSNS (cost->sse_load[2]) / 2; } goto do_qimode; @@ -21845,14 +21845,16 @@ ix86_multiplication_cost (const struct processor_costs *cost, { nmults += 1; nops += 4; - extra += cost->sse_load[3] * 2; + /* 2 loads, so no division by 2. */ + extra += COSTS_N_INSNS (cost->sse_load[3]); } goto do_qimode; case V64QImode: nmults = 2; nops = 9; - extra = cost->sse_load[3] * 2 + cost->sse_load[4] * 2; + /* 2 loads of each size, so no division by 2. */ + extra = COSTS_N_INSNS (cost->sse_load[3] + cost->sse_load[4]); do_qimode: return ix86_vec_cost (mode, cost->mulss * nmults @@ -21945,7 +21947,7 @@ ix86_shift_rotate_cost (const struct processor_costs *cost, /* Use vpbroadcast. */ extra = cost->sse_op; else - extra = cost->sse_load[2]; + extra = COSTS_N_INSNS (cost->sse_load[2]) / 2; if (constant_op1) { @@ -21976,7 +21978,7 @@ ix86_shift_rotate_cost (const struct processor_costs *cost, shift with one insn set the cost to prefer paddb. */ if (constant_op1) { - extra = cost->sse_load[2]; + extra = COSTS_N_INSNS (cost->sse_load[2]) / 2; return ix86_vec_cost (mode, cost->sse_op) + extra; } else @@ -21991,7 +21993,9 @@ ix86_shift_rotate_cost (const struct processor_costs *cost, /* Use vpbroadcast. */ extra = cost->sse_op; else - extra = (mode == V16QImode) ? cost->sse_load[2] : cost->sse_load[3]; + extra = COSTS_N_INSNS (mode == V16QImode + ? cost->sse_load[2] + : cost->sse_load[3]) / 2; if (constant_op1) { @@ -26060,7 +26064,7 @@ ix86_vector_costs::add_stmt_cost (int count, vect_cost_for_stmt kind, else { m_num_gpr_needed[where]++; - stmt_cost += ix86_cost->sse_to_integer; + stmt_cost += COSTS_N_INSNS (ix86_cost->integer_to_sse) / 2; } } } @@ -26152,14 +26156,10 @@ ix86_vector_costs::finish_cost (const vector_costs *scalar_costs) /* When X86_TUNE_AVX512_TWO_EPILOGUES is enabled arrange for both a AVX2 and a SSE epilogue for AVX512 vectorized loops. */ if (loop_vinfo + && LOOP_VINFO_EPILOGUE_P (loop_vinfo) + && GET_MODE_SIZE (loop_vinfo->vector_mode) == 32 && ix86_tune_features[X86_TUNE_AVX512_TWO_EPILOGUES]) - { - if (GET_MODE_SIZE (loop_vinfo->vector_mode) == 64) - m_suggested_epilogue_mode = V32QImode; - else if (LOOP_VINFO_EPILOGUE_P (loop_vinfo) - && GET_MODE_SIZE (loop_vinfo->vector_mode) == 32) - m_suggested_epilogue_mode = V16QImode; - } + m_suggested_epilogue_mode = V16QImode; /* When a 128bit SSE vectorized epilogue still has a VF of 16 or larger enable a 64bit SSE epilogue. */ if (loop_vinfo diff --git a/gcc/config/nvptx/gen-multilib-matches-tests b/gcc/config/nvptx/gen-multilib-matches-tests index a07f19a..fbfae88 100644 --- a/gcc/config/nvptx/gen-multilib-matches-tests +++ b/gcc/config/nvptx/gen-multilib-matches-tests @@ -18,6 +18,7 @@ AEMM .=misa?sm_35 AEMM .=misa?sm_37 AEMM .=misa?sm_52 AEMM .=misa?sm_53 +AEMM .=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -32,14 +33,15 @@ AEMM .=misa?sm_35 AEMM .=misa?sm_37 AEMM .=misa?sm_52 AEMM .=misa?sm_53 +AEMM .=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 CMMC -BEGIN '--with-arch=sm_30', '--with-multilib-list=sm_30,sm_35,sm_37,sm_52,sm_53,sm_70,sm_75,sm_80,sm_89' +BEGIN '--with-arch=sm_30', '--with-multilib-list=sm_30,sm_35,sm_37,sm_52,sm_53,sm_61,sm_70,sm_75,sm_80,sm_89' SMOID sm_30 -SMOIL sm_30 sm_35 sm_37 sm_52 sm_53 sm_70 sm_75 sm_80 sm_89 +SMOIL sm_30 sm_35 sm_37 sm_52 sm_53 sm_61 sm_70 sm_75 sm_80 sm_89 AEMM .=misa?sm_30 CMMC @@ -52,6 +54,7 @@ AEMM .=misa?sm_35 AEMM .=misa?sm_37 AEMM .=misa?sm_52 AEMM .=misa?sm_53 +AEMM .=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -65,6 +68,7 @@ AEMM .=misa?sm_35 AEMM .=misa?sm_37 AEMM .=misa?sm_52 AEMM .=misa?sm_53 +AEMM .=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -79,6 +83,7 @@ AEMM misa?sm_30=misa?sm_35 AEMM .=misa?sm_37 AEMM .=misa?sm_52 AEMM .=misa?sm_53 +AEMM .=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -93,6 +98,7 @@ AEMM misa?sm_35=misa?sm_30 AEMM misa?sm_35=misa?sm_37 AEMM .=misa?sm_52 AEMM .=misa?sm_53 +AEMM .=misa?sm_61 AEMM .=misa?sm_70 AEMM misa?sm_75=misa?sm_80 AEMM misa?sm_75=misa?sm_89 @@ -106,6 +112,7 @@ AEMM misa?sm_30=misa?sm_35 AEMM misa?sm_30=misa?sm_37 AEMM misa?sm_30=misa?sm_52 AEMM .=misa?sm_53 +AEMM .=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -119,19 +126,55 @@ AEMM misa?sm_37=misa?sm_30 AEMM misa?sm_37=misa?sm_35 AEMM misa?sm_37=misa?sm_52 AEMM .=misa?sm_53 +AEMM .=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 AEMM .=misa?sm_89 CMMC -BEGIN '--with-arch=sm_53', '--with-multilib-list=sm_53=sm_30,sm_35,sm_37,sm_52,sm_70,sm_75,sm_80,sm_89' +BEGIN '--with-arch=sm_53', '--with-multilib-list=sm_30,sm_35,sm_37,sm_52,sm_61,sm_70,sm_75,sm_80,sm_89' SMOID sm_53 -SMOIL sm_53 sm_30 sm_35 sm_37 sm_52 sm_70 sm_75 sm_80 sm_89 +SMOIL sm_53 sm_30 sm_35 sm_37 sm_52 sm_61 sm_70 sm_75 sm_80 sm_89 AEMM .=misa?sm_53 CMMC +BEGIN '--with-arch=sm_61', '--with-multilib-list=sm_61,sm_30' +SMOID sm_61 +SMOIL sm_61 sm_30 +AEMM misa?sm_30=misa?sm_35 +AEMM misa?sm_30=misa?sm_37 +AEMM misa?sm_30=misa?sm_52 +AEMM misa?sm_30=misa?sm_53 +AEMM .=misa?sm_61 +AEMM .=misa?sm_70 +AEMM .=misa?sm_75 +AEMM .=misa?sm_80 +AEMM .=misa?sm_89 +CMMC + +BEGIN '--with-arch=sm_61', '--with-multilib-list=sm_61,sm_37' +SMOID sm_61 +SMOIL sm_61 sm_37 +AEMM misa?sm_37=misa?sm_30 +AEMM misa?sm_37=misa?sm_35 +AEMM misa?sm_37=misa?sm_52 +AEMM misa?sm_37=misa?sm_53 +AEMM .=misa?sm_61 +AEMM .=misa?sm_70 +AEMM .=misa?sm_75 +AEMM .=misa?sm_80 +AEMM .=misa?sm_89 +CMMC + +BEGIN '--with-arch=sm_61', '--with-multilib-list=sm_30,sm_35,sm_37,sm_52,sm_61,sm_70,sm_75,sm_80,sm_89' +SMOID sm_61 +SMOIL sm_61 sm_30 sm_35 sm_37 sm_52 sm_53 sm_70 sm_75 sm_80 sm_89 +AEMM .=misa?sm_61 +CMMC + + BEGIN '--with-arch=sm_70', '--with-multilib-list=sm_70' SMOID sm_70 SMOIL sm_70 @@ -140,6 +183,7 @@ AEMM .=misa?sm_35 AEMM .=misa?sm_37 AEMM .=misa?sm_52 AEMM .=misa?sm_53 +AEMM .=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -153,6 +197,7 @@ AEMM misa?sm_30=misa?sm_35 AEMM misa?sm_30=misa?sm_37 AEMM misa?sm_30=misa?sm_52 AEMM misa?sm_30=misa?sm_53 +AEMM misa?sm_30=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -166,6 +211,7 @@ AEMM misa?sm_53=misa?sm_30 AEMM misa?sm_53=misa?sm_35 AEMM misa?sm_53=misa?sm_37 AEMM misa?sm_53=misa?sm_52 +AEMM misa?sm_53=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -178,6 +224,7 @@ SMOIL sm_70 sm_53 sm_30 AEMM misa?sm_30=misa?sm_35 AEMM misa?sm_30=misa?sm_37 AEMM misa?sm_30=misa?sm_52 +AEMM misa?sm_53=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -192,6 +239,7 @@ AEMM misa?sm_30=misa?sm_35 AEMM misa?sm_30=misa?sm_37 AEMM misa?sm_30=misa?sm_52 AEMM misa?sm_30=misa?sm_53 +AEMM misa?sm_30=misa?sm_61 AEMM misa?sm_30=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -205,6 +253,7 @@ AEMM misa?sm_53=misa?sm_30 AEMM misa?sm_53=misa?sm_35 AEMM misa?sm_53=misa?sm_37 AEMM misa?sm_53=misa?sm_52 +AEMM misa?sm_53=misa?sm_61 AEMM misa?sm_53=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -217,6 +266,7 @@ SMOIL sm_75 sm_30 sm_53 AEMM misa?sm_30=misa?sm_35 AEMM misa?sm_30=misa?sm_37 AEMM misa?sm_30=misa?sm_52 +AEMM misa?sm_53=misa?sm_61 AEMM misa?sm_53=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -232,6 +282,7 @@ AEMM .=misa?sm_35 AEMM .=misa?sm_37 AEMM .=misa?sm_52 AEMM .=misa?sm_53 +AEMM .=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -245,6 +296,7 @@ AEMM misa?sm_30=misa?sm_35 AEMM misa?sm_30=misa?sm_37 AEMM misa?sm_30=misa?sm_52 AEMM misa?sm_30=misa?sm_53 +AEMM misa?sm_30=misa?sm_61 AEMM misa?sm_30=misa?sm_70 AEMM misa?sm_30=misa?sm_75 AEMM .=misa?sm_80 @@ -259,6 +311,7 @@ AEMM misa?sm_75=misa?sm_35 AEMM misa?sm_75=misa?sm_37 AEMM misa?sm_75=misa?sm_52 AEMM misa?sm_75=misa?sm_53 +AEMM misa?sm_75=misa?sm_61 AEMM misa?sm_75=misa?sm_70 AEMM .=misa?sm_80 AEMM .=misa?sm_89 @@ -273,6 +326,7 @@ AEMM .=misa?sm_35 AEMM .=misa?sm_37 AEMM .=misa?sm_52 AEMM .=misa?sm_53 +AEMM .=misa?sm_61 AEMM .=misa?sm_70 AEMM .=misa?sm_75 AEMM .=misa?sm_80 @@ -286,6 +340,7 @@ AEMM misa?sm_52=misa?sm_30 AEMM misa?sm_52=misa?sm_35 AEMM misa?sm_52=misa?sm_37 AEMM misa?sm_52=misa?sm_53 +AEMM misa?sm_52=misa?sm_61 AEMM misa?sm_52=misa?sm_70 AEMM misa?sm_52=misa?sm_75 AEMM misa?sm_52=misa?sm_80 @@ -293,8 +348,8 @@ AEMM .=misa?sm_89 CMMC -BEGIN '--with-arch=sm_89', '--with-multilib-list=sm_89,sm_30,sm_35,sm_37,sm_52,sm_53,sm_70,sm_75,sm_80' +BEGIN '--with-arch=sm_89', '--with-multilib-list=sm_89,sm_30,sm_35,sm_37,sm_52,sm_53,sm_61,sm_70,sm_75,sm_80' SMOID sm_89 -SMOIL sm_89 sm_30 sm_35 sm_37 sm_52 sm_53 sm_70 sm_75 sm_80 +SMOIL sm_89 sm_30 sm_35 sm_37 sm_52 sm_53 sm_61 sm_70 sm_75 sm_80 AEMM .=misa?sm_89 CMMC diff --git a/gcc/config/nvptx/nvptx-gen.h b/gcc/config/nvptx/nvptx-gen.h index 893df41..f5b9899 100644 --- a/gcc/config/nvptx/nvptx-gen.h +++ b/gcc/config/nvptx/nvptx-gen.h @@ -26,6 +26,7 @@ #define TARGET_SM37 (ptx_isa_option >= PTX_ISA_SM37) #define TARGET_SM52 (ptx_isa_option >= PTX_ISA_SM52) #define TARGET_SM53 (ptx_isa_option >= PTX_ISA_SM53) +#define TARGET_SM61 (ptx_isa_option >= PTX_ISA_SM61) #define TARGET_SM70 (ptx_isa_option >= PTX_ISA_SM70) #define TARGET_SM75 (ptx_isa_option >= PTX_ISA_SM75) #define TARGET_SM80 (ptx_isa_option >= PTX_ISA_SM80) diff --git a/gcc/config/nvptx/nvptx-gen.opt b/gcc/config/nvptx/nvptx-gen.opt index f45e8ef..bbae32d 100644 --- a/gcc/config/nvptx/nvptx-gen.opt +++ b/gcc/config/nvptx/nvptx-gen.opt @@ -39,6 +39,9 @@ EnumValue Enum(ptx_isa) String(sm_53) Value(PTX_ISA_SM53) EnumValue +Enum(ptx_isa) String(sm_61) Value(PTX_ISA_SM61) + +EnumValue Enum(ptx_isa) String(sm_70) Value(PTX_ISA_SM70) EnumValue diff --git a/gcc/config/nvptx/nvptx-opts.h b/gcc/config/nvptx/nvptx-opts.h index d886701..07bcd32 100644 --- a/gcc/config/nvptx/nvptx-opts.h +++ b/gcc/config/nvptx/nvptx-opts.h @@ -40,6 +40,7 @@ enum ptx_version PTX_VERSION_3_1, PTX_VERSION_4_1, PTX_VERSION_4_2, + PTX_VERSION_5_0, PTX_VERSION_6_0, PTX_VERSION_6_3, PTX_VERSION_7_0, diff --git a/gcc/config/nvptx/nvptx-sm.def b/gcc/config/nvptx/nvptx-sm.def index 1485f89..9f9e864 100644 --- a/gcc/config/nvptx/nvptx-sm.def +++ b/gcc/config/nvptx/nvptx-sm.def @@ -25,6 +25,7 @@ NVPTX_SM (35, NVPTX_SM_SEP) NVPTX_SM (37, NVPTX_SM_SEP) NVPTX_SM (52, NVPTX_SM_SEP) NVPTX_SM (53, NVPTX_SM_SEP) +NVPTX_SM (61, NVPTX_SM_SEP) NVPTX_SM (70, NVPTX_SM_SEP) NVPTX_SM (75, NVPTX_SM_SEP) NVPTX_SM (80, NVPTX_SM_SEP) diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc index f893971..b1c476e 100644 --- a/gcc/config/nvptx/nvptx.cc +++ b/gcc/config/nvptx/nvptx.cc @@ -220,6 +220,8 @@ first_ptx_version_supporting_sm (enum ptx_isa sm) return PTX_VERSION_4_1; case PTX_ISA_SM53: return PTX_VERSION_4_2; + case PTX_ISA_SM61: + return PTX_VERSION_5_0; case PTX_ISA_SM70: return PTX_VERSION_6_0; case PTX_ISA_SM75: @@ -268,6 +270,8 @@ ptx_version_to_string (enum ptx_version v) return "4.1"; case PTX_VERSION_4_2: return "4.2"; + case PTX_VERSION_5_0: + return "5.0"; case PTX_VERSION_6_0: return "6.0"; case PTX_VERSION_6_3: @@ -294,6 +298,8 @@ ptx_version_to_number (enum ptx_version v, bool major_p) return major_p ? 4 : 1; case PTX_VERSION_4_2: return major_p ? 4 : 2; + case PTX_VERSION_5_0: + return major_p ? 5 : 0; case PTX_VERSION_6_0: return major_p ? 6 : 0; case PTX_VERSION_6_3: diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index 35ef4bd..a2bb2fb 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -101,6 +101,7 @@ PTX ISA Version 3.1. */ #define TARGET_PTX_4_1 (ptx_version_option >= PTX_VERSION_4_1) #define TARGET_PTX_4_2 (ptx_version_option >= PTX_VERSION_4_2) +#define TARGET_PTX_5_0 (ptx_version_option >= PTX_VERSION_5_0) #define TARGET_PTX_6_0 (ptx_version_option >= PTX_VERSION_6_0) #define TARGET_PTX_6_3 (ptx_version_option >= PTX_VERSION_6_3) #define TARGET_PTX_7_0 (ptx_version_option >= PTX_VERSION_7_0) diff --git a/gcc/config/nvptx/nvptx.opt b/gcc/config/nvptx/nvptx.opt index ce9fbc7..d326ca4 100644 --- a/gcc/config/nvptx/nvptx.opt +++ b/gcc/config/nvptx/nvptx.opt @@ -88,10 +88,10 @@ march-map=sm_60 Target RejectNegative Alias(misa=,sm_53) march-map=sm_61 -Target RejectNegative Alias(misa=,sm_53) +Target RejectNegative Alias(misa=,sm_61) march-map=sm_62 -Target RejectNegative Alias(misa=,sm_53) +Target RejectNegative Alias(misa=,sm_61) march-map=sm_70 Target RejectNegative Alias(misa=,sm_70) @@ -134,6 +134,9 @@ EnumValue Enum(ptx_version) String(4.2) Value(PTX_VERSION_4_2) EnumValue +Enum(ptx_version) String(5.0) Value(PTX_VERSION_5_0) + +EnumValue Enum(ptx_version) String(6.0) Value(PTX_VERSION_6_0) EnumValue diff --git a/gcc/config/riscv/gen-riscv-ext-opt.cc b/gcc/config/riscv/gen-riscv-ext-opt.cc new file mode 100644 index 0000000..17b8f5b --- /dev/null +++ b/gcc/config/riscv/gen-riscv-ext-opt.cc @@ -0,0 +1,105 @@ +#include <vector> +#include <string> +#include <set> +#include <stdio.h> +#include "riscv-opts.h" + +struct version_t +{ + int major; + int minor; + version_t (int major, int minor, + enum riscv_isa_spec_class spec = ISA_SPEC_CLASS_NONE) + : major (major), minor (minor) + {} + bool operator<(const version_t &other) const + { + if (major != other.major) + return major < other.major; + return minor < other.minor; + } + + bool operator== (const version_t &other) const + { + return major == other.major && minor == other.minor; + } +}; + +static void +print_ext_doc_entry (const std::string &ext_name, const std::string &full_name, + const std::string &desc, + const std::vector<version_t> &supported_versions) +{ + // Implementation of the function to print the documentation entry + // for the extension. + std::set<version_t> unique_versions; + for (const auto &version : supported_versions) + unique_versions.insert (version); + printf ("@item %s\n", ext_name.c_str ()); + printf ("@tab"); + for (const auto &version : unique_versions) + { + printf (" %d.%d", version.major, version.minor); + } + printf ("\n"); + printf ("@tab %s", full_name.c_str ()); + if (desc.size ()) + printf (", %s", desc.c_str ()); + printf ("\n\n"); +} + +int +main () +{ + puts ("; Target options for the RISC-V port of the compiler"); + puts (";"); + puts ("; Copyright (C) 2025 Free Software Foundation, Inc."); + puts (";"); + puts ("; This file is part of GCC."); + puts (";"); + puts ( + "; GCC is free software; you can redistribute it and/or modify it under"); + puts ( + "; the terms of the GNU General Public License as published by the Free"); + puts ( + "; Software Foundation; either version 3, or (at your option) any later"); + puts ("; version."); + puts (";"); + puts ("; GCC is distributed in the hope that it will be useful, but WITHOUT"); + puts ("; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY"); + puts ("; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public"); + puts ("; License for more details."); + puts (";"); + puts ("; You should have received a copy of the GNU General Public License"); + puts ("; along with GCC; see the file COPYING3. If not see "); + puts ("; <http://www.gnu.org/licenses/>."); + + puts ("; This file is generated automatically using"); + puts ("; gcc/config/riscv/gen-riscv-ext-opt.cc from:"); + puts ("; gcc/config/riscv/riscv-ext.def"); + puts (""); + puts ("; Please *DO NOT* edit manually."); + + std::set<std::string> all_vars; +#define DEFINE_RISCV_EXT(NAME, UPPERCAE_NAME, FULL_NAME, DESC, URL, DEP_EXTS, \ + SUPPORTED_VERSIONS, FLAG_GROUP, BITMASK_GROUP_ID, \ + BITMASK_BIT_POSITION, EXTRA_EXTENSION_FLAGS) \ + all_vars.insert ("riscv_" #FLAG_GROUP "_subext"); +#include "riscv-ext.def" +#undef DEFINE_RISCV_EXT + + for (auto var : all_vars) + { + puts ("TargetVariable"); + printf ("int %s\n\n", var.c_str ()); + } + +#define DEFINE_RISCV_EXT(NAME, UPPERCAE_NAME, FULL_NAME, DESC, URL, DEP_EXTS, \ + SUPPORTED_VERSIONS, FLAG_GROUP, BITMASK_GROUP_ID, \ + BITMASK_BIT_POSITION, EXTRA_EXTENSION_FLAGS) \ + puts ("Mask(" #UPPERCAE_NAME ") Var(riscv_" #FLAG_GROUP "_subext)\n"); +#include "riscv-ext.def" +#undef DEFINE_RISCV_EXT + + return 0; +} diff --git a/gcc/config/riscv/gen-riscv-ext-texi.cc b/gcc/config/riscv/gen-riscv-ext-texi.cc new file mode 100644 index 0000000..e15fdbf --- /dev/null +++ b/gcc/config/riscv/gen-riscv-ext-texi.cc @@ -0,0 +1,88 @@ +#include <vector> +#include <string> +#include <set> +#include <stdio.h> +#include "riscv-opts.h" + +struct version_t +{ + int major; + int minor; + version_t (int major, int minor, + enum riscv_isa_spec_class spec = ISA_SPEC_CLASS_NONE) + : major (major), minor (minor) + {} + bool operator<(const version_t &other) const + { + if (major != other.major) + return major < other.major; + return minor < other.minor; + } + + bool operator== (const version_t &other) const + { + return major == other.major && minor == other.minor; + } +}; + +static void +print_ext_doc_entry (const std::string &ext_name, const std::string &full_name, + const std::string &desc, + const std::vector<version_t> &supported_versions) +{ + // Implementation of the function to print the documentation entry + // for the extension. + std::set<version_t> unique_versions; + for (const auto &version : supported_versions) + unique_versions.insert (version); + printf ("@item %s\n", ext_name.c_str ()); + printf ("@tab"); + for (const auto &version : unique_versions) + { + printf (" %d.%d", version.major, version.minor); + } + printf ("\n"); + printf ("@tab %s", full_name.c_str ()); + if (desc.size ()) + printf (", %s", desc.c_str ()); + printf ("\n\n"); +} + +int +main () +{ + puts ("@c Copyright (C) 2025 Free Software Foundation, Inc."); + puts ("@c This is part of the GCC manual."); + puts ("@c For copying conditions, see the file gcc/doc/include/fdl.texi."); + puts (""); + puts ("@c This file is generated automatically using"); + puts ("@c gcc/config/riscv/gen-riscv-ext-texi.cc from:"); + puts ("@c gcc/config/riscv/riscv-ext.def"); + puts ("@c gcc/config/riscv/riscv-opts.h"); + puts (""); + puts ("@c Please *DO NOT* edit manually."); + puts (""); + puts ("@multitable @columnfractions .10 .10 .80"); + puts ("@headitem Extension Name @tab Supported Version @tab Description"); + puts (""); + + /* g extension is a very speical extension that no clear version... */ + puts ("@item g"); + puts ("@tab -"); + puts ( + "@tab General-purpose computing base extension, @samp{g} will expand to"); + puts ("@samp{i}, @samp{m}, @samp{a}, @samp{f}, @samp{d}, @samp{zicsr} and"); + puts ("@samp{zifencei}."); + puts (""); + +#define DEFINE_RISCV_EXT(NAME, UPPERCAE_NAME, FULL_NAME, DESC, URL, DEP_EXTS, \ + SUPPORTED_VERSIONS, FLAG_GROUP, BITMASK_GROUP_ID, \ + BITMASK_BIT_POSITION, EXTRA_EXTENSION_FLAGS) \ + print_ext_doc_entry (#NAME, FULL_NAME, DESC, \ + std::vector<version_t> SUPPORTED_VERSIONS); +#include "riscv-ext.def" +#undef DEFINE_RISCV_EXT + + puts ("@end multitable"); + return 0; +} diff --git a/gcc/config/riscv/riscv-c.cc b/gcc/config/riscv/riscv-c.cc index ab6dc83..1ff1968 100644 --- a/gcc/config/riscv/riscv-c.cc +++ b/gcc/config/riscv/riscv-c.cc @@ -36,10 +36,10 @@ along with GCC; see the file COPYING3. If not see struct pragma_intrinsic_flags { - int intrinsic_target_flags; + int intrinsic_riscv_isa_flags; int intrinsic_riscv_vector_elen_flags; - int intrinsic_riscv_zvl_flags; + int intrinsic_riscv_zvl_subext; int intrinsic_riscv_zvb_subext; int intrinsic_riscv_zvk_subext; }; @@ -47,16 +47,16 @@ struct pragma_intrinsic_flags static void riscv_pragma_intrinsic_flags_pollute (struct pragma_intrinsic_flags *flags) { - flags->intrinsic_target_flags = target_flags; + flags->intrinsic_riscv_isa_flags = riscv_isa_flags; flags->intrinsic_riscv_vector_elen_flags = riscv_vector_elen_flags; - flags->intrinsic_riscv_zvl_flags = riscv_zvl_flags; + flags->intrinsic_riscv_zvl_subext = riscv_zvl_subext; flags->intrinsic_riscv_zvb_subext = riscv_zvb_subext; flags->intrinsic_riscv_zvk_subext = riscv_zvk_subext; - target_flags = target_flags + riscv_isa_flags = riscv_isa_flags | MASK_VECTOR; - riscv_zvl_flags = riscv_zvl_flags + riscv_zvl_subext = riscv_zvl_subext | MASK_ZVL32B | MASK_ZVL64B | MASK_ZVL128B @@ -97,10 +97,10 @@ riscv_pragma_intrinsic_flags_pollute (struct pragma_intrinsic_flags *flags) static void riscv_pragma_intrinsic_flags_restore (struct pragma_intrinsic_flags *flags) { - target_flags = flags->intrinsic_target_flags; + riscv_isa_flags = flags->intrinsic_riscv_isa_flags; riscv_vector_elen_flags = flags->intrinsic_riscv_vector_elen_flags; - riscv_zvl_flags = flags->intrinsic_riscv_zvl_flags; + riscv_zvl_subext = flags->intrinsic_riscv_zvl_subext; riscv_zvb_subext = flags->intrinsic_riscv_zvb_subext; riscv_zvk_subext = flags->intrinsic_riscv_zvk_subext; } diff --git a/gcc/config/riscv/riscv-ext-corev.def b/gcc/config/riscv/riscv-ext-corev.def new file mode 100644 index 0000000..eb97399 --- /dev/null +++ b/gcc/config/riscv/riscv-ext-corev.def @@ -0,0 +1,87 @@ +/* CORE-V extension definition file for RISC-V. + Copyright (C) 2025 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. + +Please run `make riscv-regen` in build folder to make sure updated anything. + +Format of DEFINE_RISCV_EXT, please refer to riscv-ext.def. */ + +DEFINE_RISCV_EXT( + /* NAME */ xcvalu, + /* UPPERCAE_NAME */ XCVALU, + /* FULL_NAME */ "Core-V miscellaneous ALU extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xcv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xcvbi, + /* UPPERCAE_NAME */ XCVBI, + /* FULL_NAME */ "xcvbi extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xcv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xcvelw, + /* UPPERCAE_NAME */ XCVELW, + /* FULL_NAME */ "Core-V event load word extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xcv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xcvmac, + /* UPPERCAE_NAME */ XCVMAC, + /* FULL_NAME */ "Core-V multiply-accumulate extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xcv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xcvsimd, + /* UPPERCAE_NAME */ XCVSIMD, + /* FULL_NAME */ "xcvsimd extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xcv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) diff --git a/gcc/config/riscv/riscv-ext-sifive.def b/gcc/config/riscv/riscv-ext-sifive.def new file mode 100644 index 0000000..c8d79da --- /dev/null +++ b/gcc/config/riscv/riscv-ext-sifive.def @@ -0,0 +1,87 @@ +/* SiFive extension definition file for RISC-V. + Copyright (C) 2025 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. + +Please run `make riscv-regen` in build folder to make sure updated anything. + +Format of DEFINE_RISCV_EXT, please refer to riscv-ext.def. */ + +DEFINE_RISCV_EXT( + /* NAME */ xsfcease, + /* UPPERCAE_NAME */ XSFCEASE, + /* FULL_NAME */ "xsfcease extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xsf, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xsfvcp, + /* UPPERCAE_NAME */ XSFVCP, + /* FULL_NAME */ "xsfvcp extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve32x"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xsf, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xsfvfnrclipxfqf, + /* UPPERCAE_NAME */ XSFVFNRCLIPXFQF, + /* FULL_NAME */ "xsfvfnrclipxfqf extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xsf, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xsfvqmaccdod, + /* UPPERCAE_NAME */ XSFVQMACCDOD, + /* FULL_NAME */ "xsfvqmaccdod extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xsf, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xsfvqmaccqoq, + /* UPPERCAE_NAME */ XSFVQMACCQOQ, + /* FULL_NAME */ "xsfvqmaccqoq extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xsf, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) diff --git a/gcc/config/riscv/riscv-ext-thead.def b/gcc/config/riscv/riscv-ext-thead.def new file mode 100644 index 0000000..327d2ae --- /dev/null +++ b/gcc/config/riscv/riscv-ext-thead.def @@ -0,0 +1,191 @@ +/* T-head extension definition file for RISC-V. + Copyright (C) 2025 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. + +Please run `make riscv-regen` in build folder to make sure updated anything. + +Format of DEFINE_RISCV_EXT, please refer to riscv-ext.def. */ + +DEFINE_RISCV_EXT( + /* NAME */ xtheadba, + /* UPPERCAE_NAME */ XTHEADBA, + /* FULL_NAME */ "T-head address calculation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadbb, + /* UPPERCAE_NAME */ XTHEADBB, + /* FULL_NAME */ "T-head basic bit-manipulation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadbs, + /* UPPERCAE_NAME */ XTHEADBS, + /* FULL_NAME */ "T-head single-bit instructions extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadcmo, + /* UPPERCAE_NAME */ XTHEADCMO, + /* FULL_NAME */ "T-head cache management operations extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadcondmov, + /* UPPERCAE_NAME */ XTHEADCONDMOV, + /* FULL_NAME */ "T-head conditional move extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadfmemidx, + /* UPPERCAE_NAME */ XTHEADFMEMIDX, + /* FULL_NAME */ "T-head indexed memory operations for floating-point registers extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadfmv, + /* UPPERCAE_NAME */ XTHEADFMV, + /* FULL_NAME */ "T-head double floating-point high-bit data transmission extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadint, + /* UPPERCAE_NAME */ XTHEADINT, + /* FULL_NAME */ "T-head acceleration interruption extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadmac, + /* UPPERCAE_NAME */ XTHEADMAC, + /* FULL_NAME */ "T-head multiply-accumulate extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadmemidx, + /* UPPERCAE_NAME */ XTHEADMEMIDX, + /* FULL_NAME */ "T-head indexed memory operation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadmempair, + /* UPPERCAE_NAME */ XTHEADMEMPAIR, + /* FULL_NAME */ "T-head two-GPR memory operation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadsync, + /* UPPERCAE_NAME */ XTHEADSYNC, + /* FULL_NAME */ "T-head multi-core synchronization extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ xtheadvector, + /* UPPERCAE_NAME */ XTHEADVECTOR, + /* FULL_NAME */ "xtheadvector extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xthead, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) diff --git a/gcc/config/riscv/riscv-ext-ventana.def b/gcc/config/riscv/riscv-ext-ventana.def new file mode 100644 index 0000000..deed47f --- /dev/null +++ b/gcc/config/riscv/riscv-ext-ventana.def @@ -0,0 +1,35 @@ +/* Ventana extension definition file for RISC-V. + Copyright (C) 2025 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. + +Please run `make riscv-regen` in build folder to make sure updated anything. + +Format of DEFINE_RISCV_EXT, please refer to riscv-ext.def. */ + +DEFINE_RISCV_EXT( + /* NAME */ xventanacondops, + /* UPPERCAE_NAME */ XVENTANACONDOPS, + /* FULL_NAME */ "Ventana integer conditional operations extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ xventana, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) diff --git a/gcc/config/riscv/riscv-ext.def b/gcc/config/riscv/riscv-ext.def new file mode 100644 index 0000000..97b5766 --- /dev/null +++ b/gcc/config/riscv/riscv-ext.def @@ -0,0 +1,1915 @@ +/* RISC-V extension definition file for RISC-V. + Copyright (C) 2025 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. + +Please run `make riscv-regen` in build folder to make sure updated anything. + +Format of DEFINE_RISCV_EXT: + NAME: + The name of the extension, e.g. "i". + UPPERCASE_NAME: + The name of the extension in uppercase, e.g. "ZBA", this used + for generate TARGET_<ext-name> marco and MASK_<ext-name> macro. + For those extension only named with single letter, it should also come with + 'RV', e.g. 'v' should use 'RVV' here. + Some of old extension like 'i' and 'm' are not follow the rule. + FULL_NAME: + The full name of the extension, e.g. "Base integer extension". + DESC: + A short description of the extension, this will used during generating + documentation, GNU Texinfo format can be used this field. + URL: + A URL for the extension. + DEP_EXTS: + A list of dependent extensions, this is a list of strings or + a list of tuples. The first element of the tuple is the name + of the extension and the second element is a function that + takes a subset_list and returns true if the extension should be added as + a dependent extension, `c` and `zca` are examples of this. + SUPPORTED_VERSIONS: + A list of tuples, each tuple contains the major version number, minor + version number and the class of the specification. The version number is a + list of integers, e.g. {2, 0} for version 2.0. The class is + a string, e.g. "ISA_SPEC_CLASS_20191213", the class of the + specification is not required for any new extension. + FLAG_GROUP: + The group of the extension, this is used to group extensions + together. The group is a string, e.g. "base", "zi", "zm", "za", "zf", + "zc", "zb", "zk" and "zi". + This should be auto generated in theory in some day... + BITMASK_GROUP_ID: + The group id of the extension for the __riscv_feature_bits. + this field should sync with riscv-c-api-doc, and keep BITMASK_NOT_YET_ALLOCATED + if not got allocated. + https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/src/c-api.adoc#extension-bitmask-definitions + BITMASK_BIT_POSITION: + The bit position of the extension for the __riscv_feature_bits. + this field should sync with riscv-c-api-doc, and keep BITMASK_NOT_YET_ALLOCATED + if not got allocated. + https://github.com/riscv-non-isa/riscv-c-api-doc/blob/main/src/c-api.adoc#extension-bitmask-definitions + EXTRA_EXTENSION_FLAGS: + Extra flags for the extension, this is a bitmask of the + extra flags. The extra flags are: + - EXT_FLAG_MACRO: Set this flag if this extension is just a macro of set of + extensions, and not define any new instrcutions, new CSRs or new + behaviors, the example is `b` extension is just a macro of `zba`, `zbb` + and `zbs`. +*/ + +DEFINE_RISCV_EXT( + /* NAME */ e, + /* UPPERCAE_NAME */ RVE, + /* FULL_NAME */ "Reduced base integer extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{2, 0}}), + /* FLAG_GROUP */ base, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ i, + /* UPPERCAE_NAME */ RVI, + /* FULL_NAME */ "Base integer extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{2, 1, ISA_SPEC_CLASS_20191213}, + {2, 1, ISA_SPEC_CLASS_20190608}, + {2, 0, ISA_SPEC_CLASS_2P2}}), + /* FLAG_GROUP */ base, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 8, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ m, + /* UPPERCAE_NAME */ MUL, + /* FULL_NAME */ "Integer multiplication and division extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zmmul"}), + /* SUPPORTED_VERSIONS */ ({{2, 0}}), + /* FLAG_GROUP */ base, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 12, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ a, + /* UPPERCAE_NAME */ ATOMIC, + /* FULL_NAME */ "Atomic extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zaamo", "zalrsc"}), + /* SUPPORTED_VERSIONS */ ({{2, 1, ISA_SPEC_CLASS_20191213}, + {2, 0, ISA_SPEC_CLASS_20190608}, + {2, 0, ISA_SPEC_CLASS_2P2}}), + /* FLAG_GROUP */ base, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 0, + /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) + +DEFINE_RISCV_EXT( + /* NAME */ f, + /* UPPERCAE_NAME */ HARD_FLOAT, + /* FULL_NAME */ "Single-precision floating-point extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{2, 2, ISA_SPEC_CLASS_20191213}, + {2, 2, ISA_SPEC_CLASS_20190608}, + {2, 0, ISA_SPEC_CLASS_2P2}}), + /* FLAG_GROUP */ base, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 5, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ d, + /* UPPERCAE_NAME */ DOUBLE_FLOAT, + /* FULL_NAME */ "Double-precision floating-point extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"f", "zicsr"}), + /* SUPPORTED_VERSIONS */ ({{2, 2, ISA_SPEC_CLASS_20191213}, + {2, 2, ISA_SPEC_CLASS_20190608}, + {2, 0, ISA_SPEC_CLASS_2P2}}), + /* FLAG_GROUP */ base, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 3, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ c, + /* UPPERCAE_NAME */ RVC, + /* FULL_NAME */ "Compressed extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zca", + {"zcf", + [] (const riscv_subset_list *subset_list) -> bool + { + return subset_list->xlen () == 32 + && subset_list->lookup ("f"); + }}, + {"zcd", + [] (const riscv_subset_list *subset_list) -> bool + { + return subset_list->lookup ("d"); + }}}), + /* SUPPORTED_VERSIONS */ ({{2, 0}}), + /* FLAG_GROUP */ base, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 2, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ b, + /* UPPERCAE_NAME */ RVB, + /* FULL_NAME */ "b extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zba", "zbb", "zbs"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ base, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) + +DEFINE_RISCV_EXT( + /* NAME */ v, + /* UPPERCAE_NAME */ RVV, + /* FULL_NAME */ "Vector extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl128b", "zve64d"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ base, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 21, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ h, + /* UPPERCAE_NAME */ RVH, + /* FULL_NAME */ "Hypervisor extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ base, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zic64b, + /* UPPERCAE_NAME */ ZIC64B, + /* FULL_NAME */ "Cache block size isf 64 bytes", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zicbom, + /* UPPERCAE_NAME */ ZICBOM, + /* FULL_NAME */ "Cache-block management extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zicbop, + /* UPPERCAE_NAME */ ZICBOP, + /* FULL_NAME */ "Cache-block prefetch extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zicboz, + /* UPPERCAE_NAME */ ZICBOZ, + /* FULL_NAME */ "Cache-block zero extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 37, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ ziccamoa, + /* UPPERCAE_NAME */ ZICCAMOA, + /* FULL_NAME */ "Main memory supports all atomics in A", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ ziccif, + /* UPPERCAE_NAME */ ZICCIF, + /* FULL_NAME */ "Main memory supports instruction fetch with atomicity requirement", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zicclsm, + /* UPPERCAE_NAME */ ZICCLSM, + /* FULL_NAME */ "Main memory supports misaligned loads/stores", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ ziccrse, + /* UPPERCAE_NAME */ ZICCRSE, + /* FULL_NAME */ "Main memory supports forward progress on LR/SC sequences", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zicfilp, + /* UPPERCAE_NAME */ ZICFILP, + /* FULL_NAME */ "zicfilp extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zicfiss, + /* UPPERCAE_NAME */ ZICFISS, + /* FULL_NAME */ "zicfiss extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr", "zimop"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zicntr, + /* UPPERCAE_NAME */ ZICNTR, + /* FULL_NAME */ "Standard extension for base counters and timers", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{2, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zicond, + /* UPPERCAE_NAME */ ZICOND, + /* FULL_NAME */ "Integer conditional operations extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 38, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zicsr, + /* UPPERCAE_NAME */ ZICSR, + /* FULL_NAME */ "Control and status register access extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{2, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zifencei, + /* UPPERCAE_NAME */ ZIFENCEI, + /* FULL_NAME */ "Instruction-fetch fence extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{2, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zihintntl, + /* UPPERCAE_NAME */ ZIHINTNTL, + /* FULL_NAME */ "Non-temporal locality hints extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 39, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zihintpause, + /* UPPERCAE_NAME */ ZIHINTPAUSE, + /* FULL_NAME */ "Pause hint extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{2, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 40, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zihpm, + /* UPPERCAE_NAME */ ZIHPM, + /* FULL_NAME */ "Standard extension for hardware performance counters", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{2, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zimop, + /* UPPERCAE_NAME */ ZIMOP, + /* FULL_NAME */ "zimop extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ 1, + /* BITMASK_BIT_POSITION*/ 1, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zilsd, + /* UPPERCAE_NAME */ ZILSD, + /* FULL_NAME */ "Load/Store pair instructions extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zi, + /* BITMASK_GROUP_ID */ 1, + /* BITMASK_BIT_POSITION*/ 1, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zmmul, + /* UPPERCAE_NAME */ ZMMUL, + /* FULL_NAME */ "Integer multiplication extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zm, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ za128rs, + /* UPPERCAE_NAME */ ZA128RS, + /* FULL_NAME */ "Reservation set size of 128 bytes", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ za, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ za64rs, + /* UPPERCAE_NAME */ ZA64RS, + /* FULL_NAME */ "Reservation set size of 64 bytes", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ za, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zaamo, + /* UPPERCAE_NAME */ ZAAMO, + /* FULL_NAME */ "zaamo extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ za, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zabha, + /* UPPERCAE_NAME */ ZABHA, + /* FULL_NAME */ "zabha extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zaamo"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ za, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zacas, + /* UPPERCAE_NAME */ ZACAS, + /* FULL_NAME */ "zacas extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zaamo"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ za, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 26, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zalrsc, + /* UPPERCAE_NAME */ ZALRSC, + /* FULL_NAME */ "zalrsc extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ za, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zawrs, + /* UPPERCAE_NAME */ ZAWRS, + /* FULL_NAME */ "Wait-on-reservation-set extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zalrsc"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ za, + /* BITMASK_GROUP_ID */ 1, + /* BITMASK_BIT_POSITION*/ 7, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zama16b, + /* UPPERCAE_NAME */ ZAMA16B, + /* FULL_NAME */ "Zama16b extension", + /* DESC */ "Misaligned loads, stores, and AMOs to main memory regions that do" + " not cross a naturally aligned 16-byte boundary are atomic.", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ za, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zfa, + /* UPPERCAE_NAME */ ZFA, + /* FULL_NAME */ "Additional floating-point extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"f"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zf, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 34, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zfbfmin, + /* UPPERCAE_NAME */ ZFBFMIN, + /* FULL_NAME */ "zfbfmin extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zfhmin"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zf, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zfh, + /* UPPERCAE_NAME */ ZFH, + /* FULL_NAME */ "Half-precision floating-point extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zfhmin"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zf, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 35, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zfhmin, + /* UPPERCAE_NAME */ ZFHMIN, + /* FULL_NAME */ "Minimal half-precision floating-point extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"f"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zf, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 36, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zfinx, + /* UPPERCAE_NAME */ ZFINX, + /* FULL_NAME */ "Single-precision floating-point in integer registers extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zinx, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zdinx, + /* UPPERCAE_NAME */ ZDINX, + /* FULL_NAME */ "Double-precision floating-point in integer registers extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zfinx", "zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zinx, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zca, + /* UPPERCAE_NAME */ ZCA, + /* FULL_NAME */ "Integer compressed instruction extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({{"c", +[] (const riscv_subset_list *subset_list) -> bool +{ + /* For RV32 Zca implies C for one of these combinations of + extensions: Zca, F_Zca_Zcf and FD_Zca_Zcf_Zcd. */ + if (subset_list->xlen () == 32) + { + if (subset_list->lookup ("d")) + return subset_list->lookup ("zcf") && subset_list->lookup ("zcd"); + + if (subset_list->lookup ("f")) + return subset_list->lookup ("zcf"); + + return true; + } + + /* For RV64 Zca implies C for one of these combinations of + extensions: Zca and FD_Zca_Zcd (Zcf is not available + for RV64). */ + if (subset_list->xlen () == 64) + { + if (subset_list->lookup ("d")) + return subset_list->lookup ("zcd"); + + return true; + } + + /* Do nothing for future RV128 specification. Behaviour + for this case is not yet well defined. */ + return false; + +}}}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zc, + /* BITMASK_GROUP_ID */ 1, + /* BITMASK_BIT_POSITION*/ 2, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zcb, + /* UPPERCAE_NAME */ ZCB, + /* FULL_NAME */ "Simple compressed instruction extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zca"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zc, + /* BITMASK_GROUP_ID */ 1, + /* BITMASK_BIT_POSITION*/ 3, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zcd, + /* UPPERCAE_NAME */ ZCD, + /* FULL_NAME */ "Compressed double-precision floating point loads and stores extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zca"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zc, + /* BITMASK_GROUP_ID */ 1, + /* BITMASK_BIT_POSITION*/ 4, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zce, + /* UPPERCAE_NAME */ ZCE, + /* FULL_NAME */ "Compressed instruction extensions for embedded processors", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zca", "zcb", "zcmp", "zcmt", + {"zcf", + [] (const riscv_subset_list *subset_list) -> bool + { + return subset_list->xlen () == 32 + && subset_list->lookup ("f"); + }}}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zc, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zcf, + /* UPPERCAE_NAME */ ZCF, + /* FULL_NAME */ "Compressed single-precision floating point loads and stores extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zca"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zc, + /* BITMASK_GROUP_ID */ 1, + /* BITMASK_BIT_POSITION*/ 5, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zcmop, + /* UPPERCAE_NAME */ ZCMOP, + /* FULL_NAME */ "zcmop extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zca"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zc, + /* BITMASK_GROUP_ID */ 1, + /* BITMASK_BIT_POSITION*/ 6, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zcmp, + /* UPPERCAE_NAME */ ZCMP, + /* FULL_NAME */ "Compressed push pop extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zca"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zc, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zcmt, + /* UPPERCAE_NAME */ ZCMT, + /* FULL_NAME */ "Table jump instruction extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zca", "zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zc, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zclsd, + /* UPPERCAE_NAME */ ZCLSD, + /* FULL_NAME */ "Compressed load/store pair instructions extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zca", "zilsd"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zc, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zba, + /* UPPERCAE_NAME */ ZBA, + /* FULL_NAME */ "Address calculation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zb, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 27, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zbb, + /* UPPERCAE_NAME */ ZBB, + /* FULL_NAME */ "Basic bit manipulation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zb, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 28, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zbc, + /* UPPERCAE_NAME */ ZBC, + /* FULL_NAME */ "Carry-less multiplication extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zb, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 29, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zbkb, + /* UPPERCAE_NAME */ ZBKB, + /* FULL_NAME */ "Cryptography bit-manipulation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zb, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 30, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zbkc, + /* UPPERCAE_NAME */ ZBKC, + /* FULL_NAME */ "Cryptography carry-less multiply extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zb, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 31, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zbkx, + /* UPPERCAE_NAME */ ZBKX, + /* FULL_NAME */ "Cryptography crossbar permutation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zb, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 32, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zbs, + /* UPPERCAE_NAME */ ZBS, + /* FULL_NAME */ "Single-bit operation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zb, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 33, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zk, + /* UPPERCAE_NAME */ ZK, + /* FULL_NAME */ "Standard scalar cryptography extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zkn", "zkr", "zkt"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zk, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) + +DEFINE_RISCV_EXT( + /* NAME */ zkn, + /* UPPERCAE_NAME */ ZKN, + /* FULL_NAME */ "NIST algorithm suite extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zbkb", "zbkc", "zbkx", "zkne", "zknd", "zknh"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zk, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) + +DEFINE_RISCV_EXT( + /* NAME */ zknd, + /* UPPERCAE_NAME */ ZKND, + /* FULL_NAME */ "AES Decryption extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 41, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zkne, + /* UPPERCAE_NAME */ ZKNE, + /* FULL_NAME */ "AES Encryption extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 42, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zknh, + /* UPPERCAE_NAME */ ZKNH, + /* FULL_NAME */ "Hash function extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 43, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zkr, + /* UPPERCAE_NAME */ ZKR, + /* FULL_NAME */ "Entropy source extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zk, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zks, + /* UPPERCAE_NAME */ ZKS, + /* FULL_NAME */ "ShangMi algorithm suite extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zbkb", "zbkc", "zbkx", "zksed", "zksh"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zk, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) + +DEFINE_RISCV_EXT( + /* NAME */ zksed, + /* UPPERCAE_NAME */ ZKSED, + /* FULL_NAME */ "SM4 block cipher extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 44, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zksh, + /* UPPERCAE_NAME */ ZKSH, + /* FULL_NAME */ "SM3 hash function extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 45, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zkt, + /* UPPERCAE_NAME */ ZKT, + /* FULL_NAME */ "Data independent execution latency extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 46, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ ztso, + /* UPPERCAE_NAME */ ZTSO, + /* FULL_NAME */ "Total store ordering extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zt, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 47, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvbb, + /* UPPERCAE_NAME */ ZVBB, + /* FULL_NAME */ "Vector basic bit-manipulation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvkb"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvb, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 48, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvbc, + /* UPPERCAE_NAME */ ZVBC, + /* FULL_NAME */ "Vector carryless multiplication extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve64x"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvb, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 49, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zve32f, + /* UPPERCAE_NAME */ ZVE32F, + /* FULL_NAME */ "Vector extensions for embedded processors", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"f", "zve32x", "zvl32b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zve, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 61, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zve32x, + /* UPPERCAE_NAME */ ZVE32X, + /* FULL_NAME */ "Vector extensions for embedded processors", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr", "zvl32b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zve, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 60, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zve64d, + /* UPPERCAE_NAME */ ZVE64D, + /* FULL_NAME */ "Vector extensions for embedded processors", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"d", "zve64f", "zvl64b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zve, + /* BITMASK_GROUP_ID */ 1, + /* BITMASK_BIT_POSITION*/ 0, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zve64f, + /* UPPERCAE_NAME */ ZVE64F, + /* FULL_NAME */ "Vector extensions for embedded processors", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"f", "zve32f", "zve64x", "zvl64b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zve, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 63, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zve64x, + /* UPPERCAE_NAME */ ZVE64X, + /* FULL_NAME */ "Vector extensions for embedded processors", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve32x", "zvl64b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zve, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 62, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvfbfmin, + /* UPPERCAE_NAME */ ZVFBFMIN, + /* FULL_NAME */ "Vector BF16 converts extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve32f"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvf, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvfbfwma, + /* UPPERCAE_NAME */ ZVFBFWMA, + /* FULL_NAME */ "zvfbfwma extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvfbfmin", "zfbfmin"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvf, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvfh, + /* UPPERCAE_NAME */ ZVFH, + /* FULL_NAME */ "Vector half-precision floating-point extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve32f", "zfhmin"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvf, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 50, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvfhmin, + /* UPPERCAE_NAME */ ZVFHMIN, + /* FULL_NAME */ "Vector minimal half-precision floating-point extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve32f"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvf, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 51, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvkb, + /* UPPERCAE_NAME */ ZVKB, + /* FULL_NAME */ "Vector cryptography bit-manipulation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve32x"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 52, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvkg, + /* UPPERCAE_NAME */ ZVKG, + /* FULL_NAME */ "Vector GCM/GMAC extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve32x"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 53, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvkn, + /* UPPERCAE_NAME */ ZVKN, + /* FULL_NAME */ "Vector NIST Algorithm Suite extension", + /* DESC */ "@samp{zvkn} will expand to", + /* URL */ , + /* DEP_EXTS */ ({"zvkned", "zvknhb", "zvkb", "zvkt"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) + +DEFINE_RISCV_EXT( + /* NAME */ zvknc, + /* UPPERCAE_NAME */ ZVKNC, + /* FULL_NAME */ "Vector NIST Algorithm Suite with carryless multiply extension, @samp{zvknc}", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvkn", "zvbc"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) + +DEFINE_RISCV_EXT( + /* NAME */ zvkned, + /* UPPERCAE_NAME */ ZVKNED, + /* FULL_NAME */ "Vector AES block cipher extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve32x"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 54, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvkng, + /* UPPERCAE_NAME */ ZVKNG, + /* FULL_NAME */ "Vector NIST Algorithm Suite with GCM extension, @samp{zvkng} will expand", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvkn", "zvkg"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) + +DEFINE_RISCV_EXT( + /* NAME */ zvknha, + /* UPPERCAE_NAME */ ZVKNHA, + /* FULL_NAME */ "Vector SHA-2 secure hash extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve32x"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 55, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvknhb, + /* UPPERCAE_NAME */ ZVKNHB, + /* FULL_NAME */ "Vector SHA-2 secure hash extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve64x"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 56, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvks, + /* UPPERCAE_NAME */ ZVKS, + /* FULL_NAME */ "Vector ShangMi algorithm suite extension, @samp{zvks} will expand", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvksed", "zvksh", "zvkb", "zvkt"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) + +DEFINE_RISCV_EXT( + /* NAME */ zvksc, + /* UPPERCAE_NAME */ ZVKSC, + /* FULL_NAME */ "Vector ShangMi algorithm suite with carryless multiplication extension,", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvks", "zvbc"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) + +DEFINE_RISCV_EXT( + /* NAME */ zvksed, + /* UPPERCAE_NAME */ ZVKSED, + /* FULL_NAME */ "Vector SM4 Block Cipher extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve32x"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 57, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvksg, + /* UPPERCAE_NAME */ ZVKSG, + /* FULL_NAME */ "Vector ShangMi algorithm suite with GCM extension, @samp{zvksg} will expand", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvks", "zvkg"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ EXT_FLAG_MACRO) + +DEFINE_RISCV_EXT( + /* NAME */ zvksh, + /* UPPERCAE_NAME */ ZVKSH, + /* FULL_NAME */ "Vector SM3 Secure Hash extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zve32x"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 58, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvkt, + /* UPPERCAE_NAME */ ZVKT, + /* FULL_NAME */ "Vector data independent execution latency extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvk, + /* BITMASK_GROUP_ID */ 0, + /* BITMASK_BIT_POSITION*/ 59, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl1024b, + /* UPPERCAE_NAME */ ZVL1024B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl512b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl128b, + /* UPPERCAE_NAME */ ZVL128B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl64b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl16384b, + /* UPPERCAE_NAME */ ZVL16384B, + /* FULL_NAME */ "zvl16384b extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl8192b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl2048b, + /* UPPERCAE_NAME */ ZVL2048B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl1024b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl256b, + /* UPPERCAE_NAME */ ZVL256B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl128b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl32768b, + /* UPPERCAE_NAME */ ZVL32768B, + /* FULL_NAME */ "zvl32768b extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl16384b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl32b, + /* UPPERCAE_NAME */ ZVL32B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl4096b, + /* UPPERCAE_NAME */ ZVL4096B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl2048b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl512b, + /* UPPERCAE_NAME */ ZVL512B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl256b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl64b, + /* UPPERCAE_NAME */ ZVL64B, + /* FULL_NAME */ "Minimum vector length standard extensions", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl32b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl65536b, + /* UPPERCAE_NAME */ ZVL65536B, + /* FULL_NAME */ "zvl65536b extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl32768b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zvl8192b, + /* UPPERCAE_NAME */ ZVL8192B, + /* FULL_NAME */ "zvl8192b extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zvl4096b"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zvl, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zhinx, + /* UPPERCAE_NAME */ ZHINX, + /* FULL_NAME */ "Half-precision floating-point in integer registers extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zhinxmin"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zinx, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ zhinxmin, + /* UPPERCAE_NAME */ ZHINXMIN, + /* FULL_NAME */ "Minimal half-precision floating-point in integer registers extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zfinx"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ zinx, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ sdtrig, + /* UPPERCAE_NAME */ SDTRIG, + /* FULL_NAME */ "sdtrig extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sd, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ sha, + /* UPPERCAE_NAME */ SHA, + /* FULL_NAME */ "The augmented hypervisor extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"h", "shcounterenw", "shgatpa", "shtvala", "shvstvala", "shvstvecd", "shvsatpa", "ssstateen"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sh, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ shcounterenw, + /* UPPERCAE_NAME */ SHCOUNTERENW, + /* FULL_NAME */ "Support writeable enables for any supported counter", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"h", "zihpm"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sh, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ shgatpa, + /* UPPERCAE_NAME */ SHGATPA, + /* FULL_NAME */ "SvNNx4 mode supported for all modes supported by satp", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"h", "ssstateen"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sh, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ shtvala, + /* UPPERCAE_NAME */ SHTVALA, + /* FULL_NAME */ "The htval register provides all needed values", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"h"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sh, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ shvstvala, + /* UPPERCAE_NAME */ SHVSTVALA, + /* FULL_NAME */ "The vstval register provides all needed values", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"h"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sh, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ shvstvecd, + /* UPPERCAE_NAME */ SHVSTVECD, + /* FULL_NAME */ "The vstvec register supports Direct mode", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"h"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sh, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ shvsatpa, + /* UPPERCAE_NAME */ SHVSATPA, + /* FULL_NAME */ "The vsatp register supports all modes supported by satp", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"h"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sh, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ smaia, + /* UPPERCAE_NAME */ SMAIA, + /* FULL_NAME */ "Advanced interrupt architecture extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"ssaia"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sm, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ smepmp, + /* UPPERCAE_NAME */ SMEPMP, + /* FULL_NAME */ "PMP Enhancements for memory access and execution prevention on Machine mode", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sm, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ smmpm, + /* UPPERCAE_NAME */ SMMPM, + /* FULL_NAME */ "smmpm extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sm, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ smnpm, + /* UPPERCAE_NAME */ SMNPM, + /* FULL_NAME */ "smnpm extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sm, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ smstateen, + /* UPPERCAE_NAME */ SMSTATEEN, + /* FULL_NAME */ "State enable extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"ssstateen"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sm, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ ssaia, + /* UPPERCAE_NAME */ SSAIA, + /* FULL_NAME */ "Advanced interrupt architecture extension for supervisor-mode", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ ss, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ sscofpmf, + /* UPPERCAE_NAME */ SSCOFPMF, + /* FULL_NAME */ "Count overflow & filtering extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ ss, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ ssnpm, + /* UPPERCAE_NAME */ SSNPM, + /* FULL_NAME */ "ssnpm extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ ss, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ sspm, + /* UPPERCAE_NAME */ SSPM, + /* FULL_NAME */ "sspm extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ ss, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ ssstateen, + /* UPPERCAE_NAME */ SSSTATEEN, + /* FULL_NAME */ "State-enable extension for supervisor-mode", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ ss, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ sstc, + /* UPPERCAE_NAME */ SSTC, + /* FULL_NAME */ "Supervisor-mode timer interrupts extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({"zicsr"}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ ss, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ ssstrict, + /* UPPERCAE_NAME */ SSSTRICT, + /* FULL_NAME */ "ssstrict extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ ss, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ supm, + /* UPPERCAE_NAME */ SUPM, + /* FULL_NAME */ "supm extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ su, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ svinval, + /* UPPERCAE_NAME */ SVINVAL, + /* FULL_NAME */ "Fine-grained address-translation cache invalidation extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ svnapot, + /* UPPERCAE_NAME */ SVNAPOT, + /* FULL_NAME */ "NAPOT translation contiguity extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ svpbmt, + /* UPPERCAE_NAME */ SVPBMT, + /* FULL_NAME */ "Page-based memory types extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ svvptc, + /* UPPERCAE_NAME */ SVVPTC, + /* FULL_NAME */ "svvptc extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ svadu, + /* UPPERCAE_NAME */ SVADU, + /* FULL_NAME */ "Hardware Updating of A/D Bits extension", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +DEFINE_RISCV_EXT( + /* NAME */ svade, + /* UPPERCAE_NAME */ SVADE, + /* FULL_NAME */ "Cause exception when hardware updating of A/D bits is disabled", + /* DESC */ "", + /* URL */ , + /* DEP_EXTS */ ({}), + /* SUPPORTED_VERSIONS */ ({{1, 0}}), + /* FLAG_GROUP */ sv, + /* BITMASK_GROUP_ID */ BITMASK_NOT_YET_ALLOCATED, + /* BITMASK_BIT_POSITION*/ BITMASK_NOT_YET_ALLOCATED, + /* EXTRA_EXTENSION_FLAGS */ 0) + +#include "riscv-ext-corev.def" +#include "riscv-ext-sifive.def" +#include "riscv-ext-thead.def" +#include "riscv-ext-ventana.def" diff --git a/gcc/config/riscv/riscv-ext.opt b/gcc/config/riscv/riscv-ext.opt new file mode 100644 index 0000000..9199aa3 --- /dev/null +++ b/gcc/config/riscv/riscv-ext.opt @@ -0,0 +1,421 @@ +; Target options for the RISC-V port of the compiler +; +; Copyright (C) 2025 Free Software Foundation, Inc. +; +; This file is part of GCC. +; +; GCC is free software; you can redistribute it and/or modify it under +; the terms of the GNU General Public License as published by the Free +; Software Foundation; either version 3, or (at your option) any later +; version. +; +; GCC is distributed in the hope that it will be useful, but WITHOUT +; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +; License for more details. +; +; You should have received a copy of the GNU General Public License +; along with GCC; see the file COPYING3. If not see +; <http://www.gnu.org/licenses/>. +; This file is generated automatically using +; gcc/config/riscv/gen-riscv-ext-opt.cc from: +; gcc/config/riscv/riscv-ext.def + +; Please *DO NOT* edit manually. +TargetVariable +int riscv_base_subext + +TargetVariable +int riscv_sd_subext + +TargetVariable +int riscv_sh_subext + +TargetVariable +int riscv_sm_subext + +TargetVariable +int riscv_ss_subext + +TargetVariable +int riscv_su_subext + +TargetVariable +int riscv_sv_subext + +TargetVariable +int riscv_xcv_subext + +TargetVariable +int riscv_xsf_subext + +TargetVariable +int riscv_xthead_subext + +TargetVariable +int riscv_xventana_subext + +TargetVariable +int riscv_za_subext + +TargetVariable +int riscv_zb_subext + +TargetVariable +int riscv_zc_subext + +TargetVariable +int riscv_zf_subext + +TargetVariable +int riscv_zi_subext + +TargetVariable +int riscv_zinx_subext + +TargetVariable +int riscv_zk_subext + +TargetVariable +int riscv_zm_subext + +TargetVariable +int riscv_zt_subext + +TargetVariable +int riscv_zvb_subext + +TargetVariable +int riscv_zve_subext + +TargetVariable +int riscv_zvf_subext + +TargetVariable +int riscv_zvk_subext + +TargetVariable +int riscv_zvl_subext + +Mask(RVE) Var(riscv_base_subext) + +Mask(RVI) Var(riscv_base_subext) + +Mask(MUL) Var(riscv_base_subext) + +Mask(ATOMIC) Var(riscv_base_subext) + +Mask(HARD_FLOAT) Var(riscv_base_subext) + +Mask(DOUBLE_FLOAT) Var(riscv_base_subext) + +Mask(RVC) Var(riscv_base_subext) + +Mask(RVB) Var(riscv_base_subext) + +Mask(RVV) Var(riscv_base_subext) + +Mask(RVH) Var(riscv_base_subext) + +Mask(ZIC64B) Var(riscv_zi_subext) + +Mask(ZICBOM) Var(riscv_zi_subext) + +Mask(ZICBOP) Var(riscv_zi_subext) + +Mask(ZICBOZ) Var(riscv_zi_subext) + +Mask(ZICCAMOA) Var(riscv_zi_subext) + +Mask(ZICCIF) Var(riscv_zi_subext) + +Mask(ZICCLSM) Var(riscv_zi_subext) + +Mask(ZICCRSE) Var(riscv_zi_subext) + +Mask(ZICFILP) Var(riscv_zi_subext) + +Mask(ZICFISS) Var(riscv_zi_subext) + +Mask(ZICNTR) Var(riscv_zi_subext) + +Mask(ZICOND) Var(riscv_zi_subext) + +Mask(ZICSR) Var(riscv_zi_subext) + +Mask(ZIFENCEI) Var(riscv_zi_subext) + +Mask(ZIHINTNTL) Var(riscv_zi_subext) + +Mask(ZIHINTPAUSE) Var(riscv_zi_subext) + +Mask(ZIHPM) Var(riscv_zi_subext) + +Mask(ZIMOP) Var(riscv_zi_subext) + +Mask(ZILSD) Var(riscv_zi_subext) + +Mask(ZMMUL) Var(riscv_zm_subext) + +Mask(ZA128RS) Var(riscv_za_subext) + +Mask(ZA64RS) Var(riscv_za_subext) + +Mask(ZAAMO) Var(riscv_za_subext) + +Mask(ZABHA) Var(riscv_za_subext) + +Mask(ZACAS) Var(riscv_za_subext) + +Mask(ZALRSC) Var(riscv_za_subext) + +Mask(ZAWRS) Var(riscv_za_subext) + +Mask(ZAMA16B) Var(riscv_za_subext) + +Mask(ZFA) Var(riscv_zf_subext) + +Mask(ZFBFMIN) Var(riscv_zf_subext) + +Mask(ZFH) Var(riscv_zf_subext) + +Mask(ZFHMIN) Var(riscv_zf_subext) + +Mask(ZFINX) Var(riscv_zinx_subext) + +Mask(ZDINX) Var(riscv_zinx_subext) + +Mask(ZCA) Var(riscv_zc_subext) + +Mask(ZCB) Var(riscv_zc_subext) + +Mask(ZCD) Var(riscv_zc_subext) + +Mask(ZCE) Var(riscv_zc_subext) + +Mask(ZCF) Var(riscv_zc_subext) + +Mask(ZCMOP) Var(riscv_zc_subext) + +Mask(ZCMP) Var(riscv_zc_subext) + +Mask(ZCMT) Var(riscv_zc_subext) + +Mask(ZCLSD) Var(riscv_zc_subext) + +Mask(ZBA) Var(riscv_zb_subext) + +Mask(ZBB) Var(riscv_zb_subext) + +Mask(ZBC) Var(riscv_zb_subext) + +Mask(ZBKB) Var(riscv_zb_subext) + +Mask(ZBKC) Var(riscv_zb_subext) + +Mask(ZBKX) Var(riscv_zb_subext) + +Mask(ZBS) Var(riscv_zb_subext) + +Mask(ZK) Var(riscv_zk_subext) + +Mask(ZKN) Var(riscv_zk_subext) + +Mask(ZKND) Var(riscv_zk_subext) + +Mask(ZKNE) Var(riscv_zk_subext) + +Mask(ZKNH) Var(riscv_zk_subext) + +Mask(ZKR) Var(riscv_zk_subext) + +Mask(ZKS) Var(riscv_zk_subext) + +Mask(ZKSED) Var(riscv_zk_subext) + +Mask(ZKSH) Var(riscv_zk_subext) + +Mask(ZKT) Var(riscv_zk_subext) + +Mask(ZTSO) Var(riscv_zt_subext) + +Mask(ZVBB) Var(riscv_zvb_subext) + +Mask(ZVBC) Var(riscv_zvb_subext) + +Mask(ZVE32F) Var(riscv_zve_subext) + +Mask(ZVE32X) Var(riscv_zve_subext) + +Mask(ZVE64D) Var(riscv_zve_subext) + +Mask(ZVE64F) Var(riscv_zve_subext) + +Mask(ZVE64X) Var(riscv_zve_subext) + +Mask(ZVFBFMIN) Var(riscv_zvf_subext) + +Mask(ZVFBFWMA) Var(riscv_zvf_subext) + +Mask(ZVFH) Var(riscv_zvf_subext) + +Mask(ZVFHMIN) Var(riscv_zvf_subext) + +Mask(ZVKB) Var(riscv_zvk_subext) + +Mask(ZVKG) Var(riscv_zvk_subext) + +Mask(ZVKN) Var(riscv_zvk_subext) + +Mask(ZVKNC) Var(riscv_zvk_subext) + +Mask(ZVKNED) Var(riscv_zvk_subext) + +Mask(ZVKNG) Var(riscv_zvk_subext) + +Mask(ZVKNHA) Var(riscv_zvk_subext) + +Mask(ZVKNHB) Var(riscv_zvk_subext) + +Mask(ZVKS) Var(riscv_zvk_subext) + +Mask(ZVKSC) Var(riscv_zvk_subext) + +Mask(ZVKSED) Var(riscv_zvk_subext) + +Mask(ZVKSG) Var(riscv_zvk_subext) + +Mask(ZVKSH) Var(riscv_zvk_subext) + +Mask(ZVKT) Var(riscv_zvk_subext) + +Mask(ZVL1024B) Var(riscv_zvl_subext) + +Mask(ZVL128B) Var(riscv_zvl_subext) + +Mask(ZVL16384B) Var(riscv_zvl_subext) + +Mask(ZVL2048B) Var(riscv_zvl_subext) + +Mask(ZVL256B) Var(riscv_zvl_subext) + +Mask(ZVL32768B) Var(riscv_zvl_subext) + +Mask(ZVL32B) Var(riscv_zvl_subext) + +Mask(ZVL4096B) Var(riscv_zvl_subext) + +Mask(ZVL512B) Var(riscv_zvl_subext) + +Mask(ZVL64B) Var(riscv_zvl_subext) + +Mask(ZVL65536B) Var(riscv_zvl_subext) + +Mask(ZVL8192B) Var(riscv_zvl_subext) + +Mask(ZHINX) Var(riscv_zinx_subext) + +Mask(ZHINXMIN) Var(riscv_zinx_subext) + +Mask(SDTRIG) Var(riscv_sd_subext) + +Mask(SHA) Var(riscv_sh_subext) + +Mask(SHCOUNTERENW) Var(riscv_sh_subext) + +Mask(SHGATPA) Var(riscv_sh_subext) + +Mask(SHTVALA) Var(riscv_sh_subext) + +Mask(SHVSTVALA) Var(riscv_sh_subext) + +Mask(SHVSTVECD) Var(riscv_sh_subext) + +Mask(SHVSATPA) Var(riscv_sh_subext) + +Mask(SMAIA) Var(riscv_sm_subext) + +Mask(SMEPMP) Var(riscv_sm_subext) + +Mask(SMMPM) Var(riscv_sm_subext) + +Mask(SMNPM) Var(riscv_sm_subext) + +Mask(SMSTATEEN) Var(riscv_sm_subext) + +Mask(SSAIA) Var(riscv_ss_subext) + +Mask(SSCOFPMF) Var(riscv_ss_subext) + +Mask(SSNPM) Var(riscv_ss_subext) + +Mask(SSPM) Var(riscv_ss_subext) + +Mask(SSSTATEEN) Var(riscv_ss_subext) + +Mask(SSTC) Var(riscv_ss_subext) + +Mask(SSSTRICT) Var(riscv_ss_subext) + +Mask(SUPM) Var(riscv_su_subext) + +Mask(SVINVAL) Var(riscv_sv_subext) + +Mask(SVNAPOT) Var(riscv_sv_subext) + +Mask(SVPBMT) Var(riscv_sv_subext) + +Mask(SVVPTC) Var(riscv_sv_subext) + +Mask(SVADU) Var(riscv_sv_subext) + +Mask(SVADE) Var(riscv_sv_subext) + +Mask(XCVALU) Var(riscv_xcv_subext) + +Mask(XCVBI) Var(riscv_xcv_subext) + +Mask(XCVELW) Var(riscv_xcv_subext) + +Mask(XCVMAC) Var(riscv_xcv_subext) + +Mask(XCVSIMD) Var(riscv_xcv_subext) + +Mask(XSFCEASE) Var(riscv_xsf_subext) + +Mask(XSFVCP) Var(riscv_xsf_subext) + +Mask(XSFVFNRCLIPXFQF) Var(riscv_xsf_subext) + +Mask(XSFVQMACCDOD) Var(riscv_xsf_subext) + +Mask(XSFVQMACCQOQ) Var(riscv_xsf_subext) + +Mask(XTHEADBA) Var(riscv_xthead_subext) + +Mask(XTHEADBB) Var(riscv_xthead_subext) + +Mask(XTHEADBS) Var(riscv_xthead_subext) + +Mask(XTHEADCMO) Var(riscv_xthead_subext) + +Mask(XTHEADCONDMOV) Var(riscv_xthead_subext) + +Mask(XTHEADFMEMIDX) Var(riscv_xthead_subext) + +Mask(XTHEADFMV) Var(riscv_xthead_subext) + +Mask(XTHEADINT) Var(riscv_xthead_subext) + +Mask(XTHEADMAC) Var(riscv_xthead_subext) + +Mask(XTHEADMEMIDX) Var(riscv_xthead_subext) + +Mask(XTHEADMEMPAIR) Var(riscv_xthead_subext) + +Mask(XTHEADSYNC) Var(riscv_xthead_subext) + +Mask(XTHEADVECTOR) Var(riscv_xthead_subext) + +Mask(XVENTANACONDOPS) Var(riscv_xventana_subext) + diff --git a/gcc/config/riscv/riscv-ext.opt.urls b/gcc/config/riscv/riscv-ext.opt.urls new file mode 100644 index 0000000..c4f4710 --- /dev/null +++ b/gcc/config/riscv/riscv-ext.opt.urls @@ -0,0 +1,2 @@ +; Autogenerated by regenerate-opt-urls.py from gcc/config/riscv/riscv-ext.opt and generated HTML + diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h index 9766b89..0f3bca5 100644 --- a/gcc/config/riscv/riscv-opts.h +++ b/gcc/config/riscv/riscv-opts.h @@ -136,16 +136,16 @@ enum rvv_vector_bits_enum { /* Bit of riscv_zvl_flags will set continually, N-1 bit will set if N-bit is set, e.g. MASK_ZVL64B has set then MASK_ZVL32B is set, so we can use popcount to calculate the minimal VLEN. */ -#define TARGET_MIN_VLEN \ - ((riscv_zvl_flags == 0) \ - ? 0 \ - : 32 << (__builtin_popcount (riscv_zvl_flags) - 1)) +#define TARGET_MIN_VLEN \ + ((riscv_zvl_subext == 0) \ + ? 0 \ + : 32 << (__builtin_popcount (riscv_zvl_subext) - 1)) /* Same as TARGET_MIN_VLEN, but take an OPTS as gcc_options. */ #define TARGET_MIN_VLEN_OPTS(opts) \ - ((opts->x_riscv_zvl_flags == 0) \ + ((opts->x_riscv_zvl_subext == 0) \ ? 0 \ - : 32 << (__builtin_popcount (opts->x_riscv_zvl_flags) - 1)) + : 32 << (__builtin_popcount (opts->x_riscv_zvl_subext) - 1)) /* The maximum LMUL according to user configuration. */ #define TARGET_MAX_LMUL \ @@ -164,4 +164,12 @@ enum riscv_tls_type { #define GPR2VR_COST_UNPROVIDED -1 +/* Extra extension flags, used for carry extra info for a RISC-V extension. */ +enum +{ + EXT_FLAG_MACRO = 1 << 0, +}; + +#define BITMASK_NOT_YET_ALLOCATED -1 + #endif /* ! GCC_RISCV_OPTS_H */ diff --git a/gcc/config/riscv/riscv-subset.h b/gcc/config/riscv/riscv-subset.h index 7b3fdae..c5d9fab 100644 --- a/gcc/config/riscv/riscv-subset.h +++ b/gcc/config/riscv/riscv-subset.h @@ -129,6 +129,5 @@ extern bool riscv_minimal_hwprobe_feature_bits (const char *, location_t); extern bool riscv_ext_is_subset (struct cl_target_option *, struct cl_target_option *); -extern int riscv_x_target_flags_isa_mask (void); #endif /* ! GCC_RISCV_SUBSET_H */ diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc index f3c706b..f652a12 100644 --- a/gcc/config/riscv/riscv-vector-builtins.cc +++ b/gcc/config/riscv/riscv-vector-builtins.cc @@ -3842,26 +3842,26 @@ check_required_extensions (const function_instance &instance) required_extensions |= RVV_REQUIRE_RV64BIT; } - uint64_t riscv_isa_flags = 0; + uint64_t isa_flags = 0; if (TARGET_VECTOR_ELEN_BF_16) - riscv_isa_flags |= RVV_REQUIRE_ELEN_BF_16; + isa_flags |= RVV_REQUIRE_ELEN_BF_16; if (TARGET_VECTOR_ELEN_FP_16) - riscv_isa_flags |= RVV_REQUIRE_ELEN_FP_16; + isa_flags |= RVV_REQUIRE_ELEN_FP_16; if (TARGET_VECTOR_ELEN_FP_32) - riscv_isa_flags |= RVV_REQUIRE_ELEN_FP_32; + isa_flags |= RVV_REQUIRE_ELEN_FP_32; if (TARGET_VECTOR_ELEN_FP_64) - riscv_isa_flags |= RVV_REQUIRE_ELEN_FP_64; + isa_flags |= RVV_REQUIRE_ELEN_FP_64; if (TARGET_VECTOR_ELEN_64) - riscv_isa_flags |= RVV_REQUIRE_ELEN_64; + isa_flags |= RVV_REQUIRE_ELEN_64; if (TARGET_64BIT) - riscv_isa_flags |= RVV_REQUIRE_RV64BIT; + isa_flags |= RVV_REQUIRE_RV64BIT; if (TARGET_FULL_V) - riscv_isa_flags |= RVV_REQUIRE_FULL_V; + isa_flags |= RVV_REQUIRE_FULL_V; if (TARGET_MIN_VLEN > 32) - riscv_isa_flags |= RVV_REQUIRE_MIN_VLEN_64; + isa_flags |= RVV_REQUIRE_MIN_VLEN_64; - uint64_t missing_extensions = required_extensions & ~riscv_isa_flags; + uint64_t missing_extensions = required_extensions & ~isa_flags; if (missing_extensions != 0) return false; return true; diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 8b77a35..d996965 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -7918,11 +7918,9 @@ riscv_can_inline_p (tree caller, tree callee) struct cl_target_option *callee_opts = TREE_TARGET_OPTION (callee_tree); struct cl_target_option *caller_opts = TREE_TARGET_OPTION (caller_tree); - int isa_flag_mask = riscv_x_target_flags_isa_mask (); - - /* Callee and caller should have the same target options except for ISA. */ - int callee_target_flags = callee_opts->x_target_flags & ~isa_flag_mask; - int caller_target_flags = caller_opts->x_target_flags & ~isa_flag_mask; + /* Callee and caller should have the same target options. */ + int callee_target_flags = callee_opts->x_target_flags; + int caller_target_flags = caller_opts->x_target_flags; if (callee_target_flags != caller_target_flags) return false; @@ -14229,7 +14227,7 @@ synthesize_ior_xor (rtx_code code, rtx operands[3]) { /* Trivial cases that don't need synthesis. */ if (SMALL_OPERAND (INTVAL (operands[2])) - || ((TARGET_ZBS || TARGET_XTHEADBS || TARGET_ZBKB) + || ((TARGET_ZBS || TARGET_ZBKB) && single_bit_mask_operand (operands[2], word_mode))) return false; @@ -14266,7 +14264,7 @@ synthesize_ior_xor (rtx_code code, rtx operands[3]) /* If we're flipping all but a small number of bits we can pre-flip the outliers, then flip all the bits, which would restore those bits that were pre-flipped. */ - if ((TARGET_ZBS || TARGET_XTHEADBS || TARGET_ZBKB) + if ((TARGET_ZBS || TARGET_ZBKB) && budget < 0 && code == XOR && popcount_hwi (~INTVAL (operands[2])) < original_budget) diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt index 80593ee..527e095 100644 --- a/gcc/config/riscv/riscv.opt +++ b/gcc/config/riscv/riscv.opt @@ -168,23 +168,14 @@ momit-leaf-frame-pointer Target Mask(OMIT_LEAF_FRAME_POINTER) Save Omit the frame pointer in leaf functions. -Mask(64BIT) - -Mask(MUL) - -Mask(ATOMIC) - -Mask(HARD_FLOAT) - -Mask(DOUBLE_FLOAT) - -Mask(RVC) +TargetVariable +int riscv_isa_flags -Mask(RVE) +Mask(64BIT) Var(riscv_isa_flags) -Mask(VECTOR) +Mask(VECTOR) Var(riscv_isa_flags) -Mask(FULL_V) +Mask(FULL_V) Var(riscv_isa_flags) mriscv-attribute Target Var(riscv_emit_attribute_p) Init(-1) @@ -233,95 +224,6 @@ TargetVariable long riscv_stack_protector_guard_offset = 0 TargetVariable -int riscv_zi_subext - -Mask(ZICSR) Var(riscv_zi_subext) - -Mask(ZIFENCEI) Var(riscv_zi_subext) - -Mask(ZIHINTNTL) Var(riscv_zi_subext) - -Mask(ZIHINTPAUSE) Var(riscv_zi_subext) - -Mask(ZICOND) Var(riscv_zi_subext) - -Mask(ZICCAMOA) Var(riscv_zi_subext) - -Mask(ZICCIF) Var(riscv_zi_subext) - -Mask(ZICCLSM) Var(riscv_zi_subext) - -Mask(ZICCRSE) Var(riscv_zi_subext) - -Mask(ZICFISS) Var(riscv_zi_subext) - -Mask(ZICFILP) Var(riscv_zi_subext) - -TargetVariable -int riscv_za_subext - -Mask(ZAWRS) Var(riscv_za_subext) - -Mask(ZAAMO) Var(riscv_za_subext) - -Mask(ZALRSC) Var(riscv_za_subext) - -Mask(ZABHA) Var(riscv_za_subext) - -Mask(ZACAS) Var(riscv_za_subext) - -Mask(ZA64RS) Var(riscv_za_subext) - -Mask(ZA128RS) Var(riscv_za_subext) - -Mask(ZAMA16B) Var(riscv_za_subext) - -TargetVariable -int riscv_zb_subext - -Mask(ZBA) Var(riscv_zb_subext) - -Mask(ZBB) Var(riscv_zb_subext) - -Mask(ZBC) Var(riscv_zb_subext) - -Mask(ZBS) Var(riscv_zb_subext) - -TargetVariable -int riscv_zinx_subext - -Mask(ZFINX) Var(riscv_zinx_subext) - -Mask(ZDINX) Var(riscv_zinx_subext) - -Mask(ZHINX) Var(riscv_zinx_subext) - -Mask(ZHINXMIN) Var(riscv_zinx_subext) - -TargetVariable -int riscv_zk_subext - -Mask(ZBKB) Var(riscv_zk_subext) - -Mask(ZBKC) Var(riscv_zk_subext) - -Mask(ZBKX) Var(riscv_zk_subext) - -Mask(ZKNE) Var(riscv_zk_subext) - -Mask(ZKND) Var(riscv_zk_subext) - -Mask(ZKNH) Var(riscv_zk_subext) - -Mask(ZKR) Var(riscv_zk_subext) - -Mask(ZKSED) Var(riscv_zk_subext) - -Mask(ZKSH) Var(riscv_zk_subext) - -Mask(ZKT) Var(riscv_zk_subext) - -TargetVariable int riscv_vector_elen_flags Mask(VECTOR_ELEN_32) Var(riscv_vector_elen_flags) @@ -337,211 +239,6 @@ Mask(VECTOR_ELEN_FP_16) Var(riscv_vector_elen_flags) Mask(VECTOR_ELEN_BF_16) Var(riscv_vector_elen_flags) TargetVariable -int riscv_zvl_flags - -Mask(ZVL32B) Var(riscv_zvl_flags) - -Mask(ZVL64B) Var(riscv_zvl_flags) - -Mask(ZVL128B) Var(riscv_zvl_flags) - -Mask(ZVL256B) Var(riscv_zvl_flags) - -Mask(ZVL512B) Var(riscv_zvl_flags) - -Mask(ZVL1024B) Var(riscv_zvl_flags) - -Mask(ZVL2048B) Var(riscv_zvl_flags) - -Mask(ZVL4096B) Var(riscv_zvl_flags) - -Mask(ZVL8192B) Var(riscv_zvl_flags) - -Mask(ZVL16384B) Var(riscv_zvl_flags) - -Mask(ZVL32768B) Var(riscv_zvl_flags) - -Mask(ZVL65536B) Var(riscv_zvl_flags) - -TargetVariable -int riscv_zvb_subext - -Mask(ZVBB) Var(riscv_zvb_subext) - -Mask(ZVBC) Var(riscv_zvb_subext) - -Mask(ZVKB) Var(riscv_zvb_subext) - -TargetVariable -int riscv_zvk_subext - -Mask(ZVKG) Var(riscv_zvk_subext) - -Mask(ZVKNED) Var(riscv_zvk_subext) - -Mask(ZVKNHA) Var(riscv_zvk_subext) - -Mask(ZVKNHB) Var(riscv_zvk_subext) - -Mask(ZVKSED) Var(riscv_zvk_subext) - -Mask(ZVKSH) Var(riscv_zvk_subext) - -Mask(ZVKN) Var(riscv_zvk_subext) - -Mask(ZVKNC) Var(riscv_zvk_subext) - -Mask(ZVKNG) Var(riscv_zvk_subext) - -Mask(ZVKS) Var(riscv_zvk_subext) - -Mask(ZVKSC) Var(riscv_zvk_subext) - -Mask(ZVKSG) Var(riscv_zvk_subext) - -Mask(ZVKT) Var(riscv_zvk_subext) - -TargetVariable -int riscv_zicmo_subext - -Mask(ZICBOZ) Var(riscv_zicmo_subext) - -Mask(ZICBOM) Var(riscv_zicmo_subext) - -Mask(ZICBOP) Var(riscv_zicmo_subext) - -Mask(ZIC64B) Var(riscv_zicmo_subext) - -TargetVariable -int riscv_mop_subext - -Mask(ZIMOP) Var(riscv_mop_subext) - -Mask(ZCMOP) Var(riscv_mop_subext) - -TargetVariable -int riscv_zf_subext - -Mask(ZFBFMIN) Var(riscv_zf_subext) - -Mask(ZFHMIN) Var(riscv_zf_subext) - -Mask(ZFH) Var(riscv_zf_subext) - -Mask(ZVFBFMIN) Var(riscv_zf_subext) - -Mask(ZVFBFWMA) Var(riscv_zf_subext) - -Mask(ZVFHMIN) Var(riscv_zf_subext) - -Mask(ZVFH) Var(riscv_zf_subext) - -TargetVariable -int riscv_zfa_subext - -Mask(ZFA) Var(riscv_zfa_subext) - -TargetVariable -int riscv_zm_subext - -Mask(ZMMUL) Var(riscv_zm_subext) - -TargetVariable -int riscv_zc_subext - -Mask(ZCA) Var(riscv_zc_subext) - -Mask(ZCB) Var(riscv_zc_subext) - -Mask(ZCE) Var(riscv_zc_subext) - -Mask(ZCF) Var(riscv_zc_subext) - -Mask(ZCD) Var(riscv_zc_subext) - -Mask(ZCMP) Var(riscv_zc_subext) - -Mask(ZCMT) Var(riscv_zc_subext) - -Mask(XCVBI) Var(riscv_xcv_subext) - -TargetVariable -int riscv_sv_subext - -Mask(SVADE) Var(riscv_sv_subext) - -Mask(SVADU) Var(riscv_sv_subext) - -Mask(SVINVAL) Var(riscv_sv_subext) - -Mask(SVNAPOT) Var(riscv_sv_subext) - -Mask(SVVPTC) Var(riscv_sv_subext) - -TargetVariable -int riscv_ztso_subext - -Mask(ZTSO) Var(riscv_ztso_subext) - -TargetVariable -int riscv_xcv_subext - -Mask(XCVMAC) Var(riscv_xcv_subext) - -Mask(XCVALU) Var(riscv_xcv_subext) - -Mask(XCVELW) Var(riscv_xcv_subext) - -Mask(XCVSIMD) Var(riscv_xcv_subext) - -TargetVariable -int riscv_xthead_subext - -Mask(XTHEADBA) Var(riscv_xthead_subext) - -Mask(XTHEADBB) Var(riscv_xthead_subext) - -Mask(XTHEADBS) Var(riscv_xthead_subext) - -Mask(XTHEADCMO) Var(riscv_xthead_subext) - -Mask(XTHEADCONDMOV) Var(riscv_xthead_subext) - -Mask(XTHEADFMEMIDX) Var(riscv_xthead_subext) - -Mask(XTHEADFMV) Var(riscv_xthead_subext) - -Mask(XTHEADINT) Var(riscv_xthead_subext) - -Mask(XTHEADMAC) Var(riscv_xthead_subext) - -Mask(XTHEADMEMIDX) Var(riscv_xthead_subext) - -Mask(XTHEADMEMPAIR) Var(riscv_xthead_subext) - -Mask(XTHEADSYNC) Var(riscv_xthead_subext) - -Mask(XTHEADVECTOR) Var(riscv_xthead_subext) - -TargetVariable -int riscv_xventana_subext - -Mask(XVENTANACONDOPS) Var(riscv_xventana_subext) - -TargetVariable -int riscv_sifive_subext - -Mask(XSFVCP) Var(riscv_sifive_subext) - -Mask(XSFCEASE) Var(riscv_sifive_subext) - -Mask(XSFVQMACCQOQ) Var(riscv_sifive_subext) - -Mask(XSFVQMACCDOD) Var(riscv_sifive_subext) - -Mask(XSFVFNRCLIPXFQF) Var(riscv_sifive_subext) - -TargetVariable int riscv_fmv_priority = 0 Enum diff --git a/gcc/config/riscv/t-riscv b/gcc/config/riscv/t-riscv index 12e2b6e..854daa9 100644 --- a/gcc/config/riscv/t-riscv +++ b/gcc/config/riscv/t-riscv @@ -187,3 +187,44 @@ s-riscv-vector-type-indexer.gen.defs: build/genrvv-type-indexer$(build_exeext) $(STAMP) s-riscv-vector-type-indexer.gen.defs genprog+=rvv-type-indexer + +RISCV_EXT_DEFS = \ + $(srcdir)/config/riscv/riscv-ext.def \ + $(srcdir)/config/riscv/riscv-ext-corev.def \ + $(srcdir)/config/riscv/riscv-ext.def \ + $(srcdir)/config/riscv/riscv-ext-sifive.def \ + $(srcdir)/config/riscv/riscv-ext-thead.def \ + $(srcdir)/config/riscv/riscv-ext-ventana.def + +$(srcdir)/config/riscv/riscv-ext.opt: $(RISCV_EXT_DEFS) + +build/gen-riscv-ext-opt$(build_exeext): $(srcdir)/config/riscv/gen-riscv-ext-opt.cc \ + $(RISCV_EXT_DEFS) + $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ + +s-riscv-ext.opt: build/gen-riscv-ext-opt$(build_exeext) + $(RUN_GEN) build/gen-riscv-ext-opt$(build_exeext) > tmp-riscv-ext.opt + $(SHELL) $(srcdir)/../move-if-change tmp-riscv-ext.opt $(srcdir)/config/riscv/riscv-ext.opt + $(STAMP) s-riscv-ext.opt + +build/gen-riscv-ext-texi$(build_exeext): $(srcdir)/config/riscv/gen-riscv-ext-texi.cc \ + $(RISCV_EXT_DEFS) + $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $< -o $@ + + +$(srcdir)/doc/riscv-ext.texi: $(RISCV_EXT_DEFS) +$(srcdir)/doc/riscv-ext.texi: s-riscv-ext.texi ; @true + +# Generate the doc when generating option file. +$(srcdir)/config/riscv/riscv-ext.opt: s-riscv-ext.texi ; @true + +s-riscv-ext.texi: build/gen-riscv-ext-texi$(build_exeext) + $(RUN_GEN) build/gen-riscv-ext-texi$(build_exeext) > tmp-riscv-ext.texi + $(SHELL) $(srcdir)/../move-if-change tmp-riscv-ext.texi $(srcdir)/doc/riscv-ext.texi + $(STAMP) s-riscv-ext.texi + +# Run `riscv-regen' after you changed or added anything from riscv-ext*.def + +.PHONY: riscv-regen + +riscv-regen: s-riscv-ext.texi s-riscv-ext.opt diff --git a/gcc/config/s390/vector.md b/gcc/config/s390/vector.md index 160e42a..cdd55b6 100644 --- a/gcc/config/s390/vector.md +++ b/gcc/config/s390/vector.md @@ -953,7 +953,7 @@ else { reg_pair += 2; // get rid of prefix %f - snprintf (buf, sizeof (buf), "ldr\t%%f0,%%f1;vpdi\t%%%%v%s,%%v1,%%%%v%s,5", reg_pair, reg_pair); + snprintf (buf, sizeof (buf), "vlr\t%%v0,%%v1;vpdi\t%%%%v%s,%%v1,%%%%v%s,5", reg_pair, reg_pair); output_asm_insn (buf, operands); return ""; } diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc index 53db06e..621fb0a 100644 --- a/gcc/config/xtensa/xtensa.cc +++ b/gcc/config/xtensa/xtensa.cc @@ -4430,17 +4430,27 @@ static int xtensa_register_move_cost (machine_mode mode ATTRIBUTE_UNUSED, reg_class_t from, reg_class_t to) { - if (from == to && from != BR_REGS && to != BR_REGS) + /* If both are equal (except for BR_REGS) or belong to AR_REGS, + the cost is 2 (the default value). */ + if ((from == to && from != BR_REGS && to != BR_REGS) + || (reg_class_subset_p (from, AR_REGS) + && reg_class_subset_p (to, AR_REGS))) return 2; - else if (reg_class_subset_p (from, AR_REGS) - && reg_class_subset_p (to, AR_REGS)) - return 2; - else if (reg_class_subset_p (from, AR_REGS) && to == ACC_REG) - return 3; - else if (from == ACC_REG && reg_class_subset_p (to, AR_REGS)) + + /* The cost between AR_REGS and FR_REGS must be <= 8 (2x the default + MEMORY_MOVE_COST) to avoid unwanted spills, and > 4 (2x the above + case) to avoid excessive register-to-register moves. */ + if ((reg_class_subset_p (from, AR_REGS) && to == FP_REGS) + || (from == FP_REGS && reg_class_subset_p (to, AR_REGS))) + return 5; + + if ((reg_class_subset_p (from, AR_REGS) && to == ACC_REG) + || (from == ACC_REG && reg_class_subset_p (to, AR_REGS))) return 3; - else - return 10; + + /* Otherwise, spills to stack (because greater than 2x the default + MEMORY_MOVE_COST). */ + return 10; } /* Compute a (partial) cost for rtx X. Return true if the complete diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f9b93e6..340552f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,44 @@ +2025-05-14 Ville Voutilainen <ville.voutilainen@gmail.com> + + * cp-gimplify.cc (cp_fold): Remove a remnant comment. + +2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com> + + PR c++/120125 + * module.cc (trees_out::write_function_def): Only set + DECL_NOT_REALLY_EXTERN if the importer might need to emit it. + * optimize.cc (maybe_thunk_body): Don't assume 'fn' has a cgraph + node created. + +2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com> + + PR c++/119864 + * decl2.cc (start_objects): Only use module initialized for + host. + (c_parse_final_cleanups): Don't always create an OMP offload + init function in modules. + +2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com> + + * name-lookup.cc (lookup_imported_hidden_friend): Add back + lazy_load_pendings with comment. + +2025-05-14 Ville Voutilainen <ville.voutilainen@gmail.com> + + * cp-gimplify.cc (cp_fold): Add to_underlying. + +2025-05-14 Owen Avery <powerboat9.gamer@gmail.com> + Jason Merrill <jason@redhat.com> + + * method.cc (synthesized_method_walk): Check whether + -Wvirtual-move-assign is enabled at the location of a base + class's move assignment operator. + +2025-05-12 Jason Merrill <jason@redhat.com> + + PR c++/120012 + * class.cc (check_non_pod_aggregate): Check is_empty_class. + 2025-05-10 Jason Merrill <jason@redhat.com> PR c++/120204 diff --git a/gcc/cp/class.cc b/gcc/cp/class.cc index 2764bb5..db39e57 100644 --- a/gcc/cp/class.cc +++ b/gcc/cp/class.cc @@ -6879,8 +6879,10 @@ check_non_pod_aggregate (tree field) tree type = TREE_TYPE (field); if (TYPE_IDENTIFIER (type) == as_base_identifier) type = TYPE_CONTEXT (type); - if (!CLASS_TYPE_P (type) || (!CLASSTYPE_NON_POD_AGGREGATE (type) - && !CLASSTYPE_NON_AGGREGATE_POD (type))) + if (!CLASS_TYPE_P (type) + || is_empty_class (type) + || (!CLASSTYPE_NON_POD_AGGREGATE (type) + && !CLASSTYPE_NON_AGGREGATE_POD (type))) return; tree size = end_of_class (type, (DECL_FIELD_IS_BASE (field) ? eoc_nvsize : eoc_nv_or_dsize)); diff --git a/gcc/cp/cp-gimplify.cc b/gcc/cp/cp-gimplify.cc index d2423fd..eab5550 100644 --- a/gcc/cp/cp-gimplify.cc +++ b/gcc/cp/cp-gimplify.cc @@ -3343,19 +3343,14 @@ cp_fold (tree x, fold_flags_t flags) || id_equal (DECL_NAME (callee), "addressof") /* This addressof equivalent is used heavily in libstdc++. */ || id_equal (DECL_NAME (callee), "__addressof") + || id_equal (DECL_NAME (callee), "to_underlying") || id_equal (DECL_NAME (callee), "as_const"))) { r = CALL_EXPR_ARG (x, 0); - /* Check that the return and argument types are sane before - folding. */ - if (INDIRECT_TYPE_P (TREE_TYPE (x)) - && INDIRECT_TYPE_P (TREE_TYPE (r))) - { - if (!same_type_p (TREE_TYPE (x), TREE_TYPE (r))) - r = build_nop (TREE_TYPE (x), r); - x = cp_fold (r, flags); - break; - } + if (!same_type_p (TREE_TYPE (x), TREE_TYPE (r))) + r = build_nop (TREE_TYPE (x), r); + x = cp_fold (r, flags); + break; } int sv = optimize, nw = sv; diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc index 15db1d6..a08d173 100644 --- a/gcc/cp/decl2.cc +++ b/gcc/cp/decl2.cc @@ -4186,7 +4186,11 @@ start_objects (bool initp, unsigned priority, bool has_body, bool omp_target = false) { bool default_init = initp && priority == DEFAULT_INIT_PRIORITY; - bool is_module_init = default_init && module_global_init_needed (); + /* FIXME: We may eventually want to treat OpenMP offload initializers + in modules specially as well. */ + bool is_module_init = (default_init + && !omp_target + && module_global_init_needed ()); tree name = NULL_TREE; if (is_module_init) @@ -5878,12 +5882,8 @@ c_parse_final_cleanups (void) if (static_init_fini_fns[true]->get_or_insert (DEFAULT_INIT_PRIORITY)) has_module_inits = true; - if (flag_openmp) - { - if (!static_init_fini_fns[2 + true]) - static_init_fini_fns[2 + true] = priority_map_t::create_ggc (); - static_init_fini_fns[2 + true]->get_or_insert (DEFAULT_INIT_PRIORITY); - } + /* FIXME: We need to work out what static constructors on OpenMP offload + target in modules will look like. */ } /* Generate initialization and destruction functions for all diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc index 05c19cf..092bae2 100644 --- a/gcc/cp/method.cc +++ b/gcc/cp/method.cc @@ -2949,7 +2949,9 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, && BINFO_VIRTUAL_P (base_binfo) && fn && TREE_CODE (fn) == FUNCTION_DECL && move_fn_p (fn) && !trivial_fn_p (fn) - && vbase_has_user_provided_move_assign (BINFO_TYPE (base_binfo))) + && vbase_has_user_provided_move_assign (BINFO_TYPE (base_binfo)) + && warning_enabled_at (DECL_SOURCE_LOCATION (fn), + OPT_Wvirtual_move_assign)) warning (OPT_Wvirtual_move_assign, "defaulted move assignment for %qT calls a non-trivial " "move assignment operator for virtual base %qT", diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index f562bf8..4f9c378 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -6024,7 +6024,7 @@ trees_out::lang_decl_bools (tree t, bits_out& bits) WB (lang->u.fn.has_dependent_explicit_spec_p); WB (lang->u.fn.immediate_fn_p); WB (lang->u.fn.maybe_deleted); - /* We do not stream lang->u.fn.implicit_constexpr. */ + WB (lang->u.fn.implicit_constexpr); WB (lang->u.fn.escalated_p); WB (lang->u.fn.xobj_func); goto lds_min; @@ -6095,7 +6095,7 @@ trees_in::lang_decl_bools (tree t, bits_in& bits) RB (lang->u.fn.has_dependent_explicit_spec_p); RB (lang->u.fn.immediate_fn_p); RB (lang->u.fn.maybe_deleted); - /* We do not stream lang->u.fn.implicit_constexpr. */ + RB (lang->u.fn.implicit_constexpr); RB (lang->u.fn.escalated_p); RB (lang->u.fn.xobj_func); goto lds_min; @@ -12193,13 +12193,23 @@ trees_in::is_matching_decl (tree existing, tree decl, bool is_typedef) /* Similarly if EXISTING has undeduced constexpr, but DECL's is already deduced. */ - if (DECL_MAYBE_DELETED (e_inner) && !DECL_MAYBE_DELETED (d_inner) - && DECL_DECLARED_CONSTEXPR_P (d_inner)) - DECL_DECLARED_CONSTEXPR_P (e_inner) = true; - else if (!DECL_MAYBE_DELETED (e_inner) && DECL_MAYBE_DELETED (d_inner)) - /* Nothing to do. */; + if (DECL_DECLARED_CONSTEXPR_P (e_inner) + == DECL_DECLARED_CONSTEXPR_P (d_inner)) + /* Already matches. */; + else if (DECL_DECLARED_CONSTEXPR_P (d_inner) + && (DECL_MAYBE_DELETED (e_inner) + || decl_implicit_constexpr_p (d_inner))) + /* DECL was deduced, copy to EXISTING. */ + { + DECL_DECLARED_CONSTEXPR_P (e_inner) = true; + if (decl_implicit_constexpr_p (d_inner)) + DECL_LANG_SPECIFIC (e_inner)->u.fn.implicit_constexpr = true; + } else if (DECL_DECLARED_CONSTEXPR_P (e_inner) - != DECL_DECLARED_CONSTEXPR_P (d_inner)) + && (DECL_MAYBE_DELETED (d_inner) + || decl_implicit_constexpr_p (e_inner))) + /* EXISTING was deduced, leave it alone. */; + else { mismatch_msg = G_("conflicting %<constexpr%> for imported " "declaration %#qD"); @@ -12638,7 +12648,11 @@ trees_out::write_function_def (tree decl) { unsigned flags = 0; - flags |= 1 * DECL_NOT_REALLY_EXTERN (decl); + /* Whether the importer should emit this definition, if used. */ + flags |= 1 * (DECL_NOT_REALLY_EXTERN (decl) + && (get_importer_interface (decl) + != importer_interface::always_import)); + if (f) { flags |= 2; diff --git a/gcc/cp/name-lookup.cc b/gcc/cp/name-lookup.cc index 9b317c4..84b5e67 100644 --- a/gcc/cp/name-lookup.cc +++ b/gcc/cp/name-lookup.cc @@ -4556,6 +4556,9 @@ lookup_imported_hidden_friend (tree friend_tmpl) || !DECL_MODULE_ENTITY_P (inner)) return NULL_TREE; + /* Load any templates matching FRIEND_TMPL from importers. */ + lazy_load_pendings (friend_tmpl); + tree name = DECL_NAME (inner); tree *slot = find_namespace_slot (current_namespace, name, false); if (!slot || !*slot || TREE_CODE (*slot) != BINDING_VECTOR) diff --git a/gcc/cp/optimize.cc b/gcc/cp/optimize.cc index 6f9a77f..fc4d6c2 100644 --- a/gcc/cp/optimize.cc +++ b/gcc/cp/optimize.cc @@ -309,8 +309,8 @@ maybe_thunk_body (tree fn, bool force) defer_mangling_aliases = save_defer_mangling_aliases; cgraph_node::get_create (fns[0])->set_comdat_group (comdat_group); cgraph_node::get_create (fns[1])->add_to_same_comdat_group - (cgraph_node::get_create (fns[0])); - symtab_node::get (fn)->add_to_same_comdat_group + (cgraph_node::get (fns[0])); + symtab_node::get_create (fn)->add_to_same_comdat_group (symtab_node::get (fns[0])); if (fns[2]) /* If *[CD][12]* dtors go into the *[CD]5* comdat group and dtor is diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc index 0d64a1c..1973d25 100644 --- a/gcc/cp/pt.cc +++ b/gcc/cp/pt.cc @@ -23529,13 +23529,13 @@ conversion_may_instantiate_p (tree to, tree from) /* Converting to a non-aggregate class type will consider its user-declared constructors, which might induce instantiation. */ - if (CLASS_TYPE_P (to) + if (CLASS_TYPE_P (complete_type (to)) && type_has_converting_constructor (to)) return true; /* Similarly, converting from a class type will consider its conversion functions. */ - if (CLASS_TYPE_P (from) + if (CLASS_TYPE_P (complete_type (from)) && TYPE_HAS_CONVERSION (from)) return true; @@ -25785,10 +25785,10 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict, INNERMOST_TEMPLATE_ARGS (CLASSTYPE_TI_ARGS (parm)), INNERMOST_TEMPLATE_ARGS (CLASSTYPE_TI_ARGS (t)), UNIFY_ALLOW_NONE, explain_p); - else - return unify_success (explain_p); + gcc_checking_assert (t == arg); } - else if (!same_type_ignoring_top_level_qualifiers_p (parm, arg)) + + if (!same_type_ignoring_top_level_qualifiers_p (parm, arg)) return unify_type_mismatch (explain_p, parm, arg); return unify_success (explain_p); diff --git a/gcc/diagnostic-format-html.cc b/gcc/diagnostic-format-html.cc index 2d642df..6bb1caf 100644 --- a/gcc/diagnostic-format-html.cc +++ b/gcc/diagnostic-format-html.cc @@ -27,11 +27,14 @@ along with GCC; see the file COPYING3. If not see #include "diagnostic-metadata.h" #include "diagnostic-format.h" #include "diagnostic-format-html.h" +#include "diagnostic-format-text.h" #include "diagnostic-output-file.h" #include "diagnostic-buffer.h" #include "selftest.h" #include "selftest-diagnostic.h" #include "pretty-print-format-impl.h" +#include "pretty-print-urlifier.h" +#include "edit-context.h" #include "intl.h" namespace xml { @@ -280,8 +283,8 @@ public: friend class diagnostic_html_format_buffer; html_builder (diagnostic_context &context, - pretty_printer &pp, - const line_maps *line_maps); + pretty_printer &pp, + const line_maps *line_maps); void on_report_diagnostic (const diagnostic_info &diagnostic, diagnostic_t orig_diag_kind, @@ -303,11 +306,27 @@ public: m_printer = &pp; } + std::unique_ptr<xml::element> + make_element_for_metadata (const diagnostic_metadata &metadata); + + std::unique_ptr<xml::element> + make_element_for_source (const diagnostic_info &diagnostic); + + std::unique_ptr<xml::element> + make_element_for_path (const diagnostic_path &path); + + std::unique_ptr<xml::element> + make_element_for_patch (const diagnostic_info &diagnostic); + private: std::unique_ptr<xml::element> make_element_for_diagnostic (const diagnostic_info &diagnostic, diagnostic_t orig_diag_kind); + std::unique_ptr<xml::element> + make_metadata_element (label_text label, + label_text url); + diagnostic_context &m_context; pretty_printer *m_printer; const line_maps *m_line_maps; @@ -560,28 +579,11 @@ html_builder::make_element_for_diagnostic (const diagnostic_info &diagnostic, if (diagnostic.metadata) { - int cwe = diagnostic.metadata->get_cwe (); - if (cwe) - { - diag_element->add_text (label_text::borrow (" ")); - auto cwe_span = make_span (label_text::borrow ("gcc-cwe-metadata")); - cwe_span->add_text (label_text::borrow ("[")); - { - auto anchor = std::make_unique<xml::element> ("a", true); - anchor->set_attr ("href", label_text::take (get_cwe_url (cwe))); - pretty_printer pp; - pp_printf (&pp, "CWE-%i", cwe); - anchor->add_text - (label_text::take (xstrdup (pp_formatted_text (&pp)))); - cwe_span->add_child (std::move (anchor)); - } - cwe_span->add_text (label_text::borrow ("]")); - diag_element->add_child (std::move (cwe_span)); - } + diag_element->add_text (label_text::borrow (" ")); + diag_element->add_child + (make_element_for_metadata (*diagnostic.metadata)); } - // TODO: show any rules - label_text option_text = label_text::take (m_context.make_option_name (diagnostic.option_id, orig_diag_kind, diagnostic.kind)); @@ -608,20 +610,122 @@ html_builder::make_element_for_diagnostic (const diagnostic_info &diagnostic, diag_element->add_child (std::move (option_span)); } + /* Source (and fix-it hints). */ + if (auto source_element = make_element_for_source (diagnostic)) + diag_element->add_child (std::move (source_element)); + + /* Execution path. */ + if (auto path = diagnostic.richloc->get_path ()) + if (auto path_element = make_element_for_path (*path)) + diag_element->add_child (std::move (path_element)); + + if (auto patch_element = make_element_for_patch (diagnostic)) + diag_element->add_child (std::move (patch_element)); + + return diag_element; +} + +std::unique_ptr<xml::element> +html_builder::make_element_for_source (const diagnostic_info &diagnostic) +{ + // TODO: ideally we'd like to capture elements within the following: + m_context.m_last_location = UNKNOWN_LOCATION; + pp_clear_output_area (m_printer); + diagnostic_show_locus (&m_context, + m_context.m_source_printing, + diagnostic.richloc, diagnostic.kind, + m_printer); + auto text = label_text::take (xstrdup (pp_formatted_text (m_printer))); + pp_clear_output_area (m_printer); + + if (strlen (text.get ()) == 0) + return nullptr; + + auto pre = std::make_unique<xml::element> ("pre", true); + pre->set_attr ("class", label_text::borrow ("gcc-annotated-source")); + pre->add_text (std::move (text)); + return pre; +} + +std::unique_ptr<xml::element> +html_builder::make_element_for_path (const diagnostic_path &path) +{ + m_context.m_last_location = UNKNOWN_LOCATION; + diagnostic_text_output_format text_format (m_context); + pp_show_color (text_format.get_printer ()) = false; + pp_buffer (text_format.get_printer ())->m_flush_p = false; + // TODO: ideally we'd like to capture elements within the following: + text_format.print_path (path); + auto text = label_text::take + (xstrdup (pp_formatted_text (text_format.get_printer ()))); + + if (strlen (text.get ()) == 0) + return nullptr; + + auto pre = std::make_unique<xml::element> ("pre", true); + pre->set_attr ("class", label_text::borrow ("gcc-execution-path")); + pre->add_text (std::move (text)); + return pre; +} + +std::unique_ptr<xml::element> +html_builder::make_element_for_patch (const diagnostic_info &diagnostic) +{ + edit_context ec (m_context.get_file_cache ()); + ec.add_fixits (diagnostic.richloc); + if (char *diff = ec.generate_diff (true)) + if (strlen (diff) > 0) + { + auto element = std::make_unique<xml::element> ("pre", true); + element->set_attr ("class", label_text::borrow ("gcc-generated-patch")); + element->add_text (label_text::take (diff)); + return element; + } + return nullptr; +} + +std::unique_ptr<xml::element> +html_builder::make_metadata_element (label_text label, + label_text url) +{ + auto item = make_span (label_text::borrow ("gcc-metadata-item")); + item->add_text (label_text::borrow ("[")); { - auto pre = std::make_unique<xml::element> ("pre", true); - pre->set_attr ("class", label_text::borrow ("gcc-annotated-source")); - // TODO: ideally we'd like to capture elements within the following: - diagnostic_show_locus (&m_context, m_context.m_source_printing, - diagnostic.richloc, diagnostic.kind, - m_printer); - pre->add_text - (label_text::take (xstrdup (pp_formatted_text (m_printer)))); - pp_clear_output_area (m_printer); - diag_element->add_child (std::move (pre)); + auto anchor = std::make_unique<xml::element> ("a", true); + anchor->set_attr ("href", std::move (url)); + anchor->add_child (std::make_unique<xml::text> (std::move (label))); + item->add_child (std::move (anchor)); } + item->add_text (label_text::borrow ("]")); + return item; +} - return diag_element; +std::unique_ptr<xml::element> +html_builder::make_element_for_metadata (const diagnostic_metadata &metadata) +{ + auto span_metadata = make_span (label_text::borrow ("gcc-metadata")); + + int cwe = metadata.get_cwe (); + if (cwe) + { + pretty_printer pp; + pp_printf (&pp, "CWE-%i", cwe); + label_text label = label_text::take (xstrdup (pp_formatted_text (&pp))); + label_text url = label_text::take (get_cwe_url (cwe)); + span_metadata->add_child + (make_metadata_element (std::move (label), std::move (url))); + } + + for (unsigned idx = 0; idx < metadata.get_num_rules (); ++idx) + { + auto &rule = metadata.get_rule (idx); + label_text label = label_text::take (rule.make_description ()); + label_text url = label_text::take (rule.make_url ()); + span_metadata->add_child + (make_metadata_element (std::move (label), std::move (url))); + } + + return span_metadata; } /* Implementation of diagnostic_context::m_diagrams.m_emission_cb @@ -734,6 +838,8 @@ public: return m_builder.get_document (); } + html_builder &get_builder () { return m_builder; } + protected: html_output_format (diagnostic_context &context, const line_maps *line_maps) @@ -852,6 +958,11 @@ public: return m_format->get_document (); } + html_builder &get_builder () const + { + return m_format->get_builder (); + } + private: class html_buffered_output_format : public html_output_format { @@ -880,7 +991,7 @@ test_simple_log () test_html_diagnostic_context dc; rich_location richloc (line_table, UNKNOWN_LOCATION); - dc.report (DK_ERROR, richloc, nullptr, 0, "this is a test: %i", 42); + dc.report (DK_ERROR, richloc, nullptr, 0, "this is a test: %qs", "foo"); const xml::document &doc = dc.get_document (); @@ -899,20 +1010,70 @@ test_simple_log () " <body>\n" " <div class=\"gcc-diagnostic-list\">\n" " <div class=\"gcc-diagnostic\">\n" - " <span class=\"gcc-message\">this is a test: 42</span>\n" - " <pre class=\"gcc-annotated-source\"></pre>\n" + " <span class=\"gcc-message\">this is a test: `<span class=\"gcc-quoted-text\">foo</span>'</span>\n" " </div>\n" " </div>\n" " </body>\n" "</html>")); } +static void +test_metadata () +{ + test_html_diagnostic_context dc; + html_builder &b = dc.get_builder (); + + { + diagnostic_metadata metadata; + metadata.add_cwe (415); + auto element = b.make_element_for_metadata (metadata); + pretty_printer pp; + element->write_as_xml (&pp, 0, true); + ASSERT_STREQ + (pp_formatted_text (&pp), + "\n" + "<span class=\"gcc-metadata\">" + "<span class=\"gcc-metadata-item\">" + "[" + "<a href=\"https://cwe.mitre.org/data/definitions/415.html\">" + "CWE-415" + "</a>" + "]" + "</span>" + "</span>"); + } + + { + diagnostic_metadata metadata; + diagnostic_metadata::precanned_rule rule ("MISC-42", + "http://example.com"); + metadata.add_rule (rule); + auto element = b.make_element_for_metadata (metadata); + pretty_printer pp; + element->write_as_xml (&pp, 0, true); + ASSERT_STREQ + (pp_formatted_text (&pp), + "\n" + "<span class=\"gcc-metadata\">" + "<span class=\"gcc-metadata-item\">" + "[" + "<a href=\"http://example.com\">" + "MISC-42" + "</a>" + "]" + "</span>" + "</span>"); + } +} + /* Run all of the selftests within this file. */ void diagnostic_format_html_cc_tests () { + auto_fix_quotes fix_quotes; test_simple_log (); + test_metadata (); } } // namespace selftest diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 212d248..40ccf22 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -17905,7 +17905,6 @@ instructions, but allow the compiler to schedule those calls. * Alpha Built-in Functions:: * ARC Built-in Functions:: * ARC SIMD Built-in Functions:: -* ARM iWMMXt Built-in Functions:: * ARM C Language Extensions (ACLE):: * ARM Floating Point Status and Control Intrinsics:: * ARM ARMv8-M Security Extensions:: @@ -18521,160 +18520,6 @@ _v4hi __builtin_arc_vaddsub4h (__v4hi, __v4hi); _v4hi __builtin_arc_vsubadd4h (__v4hi, __v4hi); @end example -@node ARM iWMMXt Built-in Functions -@subsection ARM iWMMXt Built-in Functions - -These built-in functions are available for the ARM family of -processors when the @option{-mcpu=iwmmxt} switch is used: - -@smallexample -typedef int v2si __attribute__ ((vector_size (8))); -typedef short v4hi __attribute__ ((vector_size (8))); -typedef char v8qi __attribute__ ((vector_size (8))); - -int __builtin_arm_getwcgr0 (void); -void __builtin_arm_setwcgr0 (int); -int __builtin_arm_getwcgr1 (void); -void __builtin_arm_setwcgr1 (int); -int __builtin_arm_getwcgr2 (void); -void __builtin_arm_setwcgr2 (int); -int __builtin_arm_getwcgr3 (void); -void __builtin_arm_setwcgr3 (int); -int __builtin_arm_textrmsb (v8qi, int); -int __builtin_arm_textrmsh (v4hi, int); -int __builtin_arm_textrmsw (v2si, int); -int __builtin_arm_textrmub (v8qi, int); -int __builtin_arm_textrmuh (v4hi, int); -int __builtin_arm_textrmuw (v2si, int); -v8qi __builtin_arm_tinsrb (v8qi, int, int); -v4hi __builtin_arm_tinsrh (v4hi, int, int); -v2si __builtin_arm_tinsrw (v2si, int, int); -long long __builtin_arm_tmia (long long, int, int); -long long __builtin_arm_tmiabb (long long, int, int); -long long __builtin_arm_tmiabt (long long, int, int); -long long __builtin_arm_tmiaph (long long, int, int); -long long __builtin_arm_tmiatb (long long, int, int); -long long __builtin_arm_tmiatt (long long, int, int); -int __builtin_arm_tmovmskb (v8qi); -int __builtin_arm_tmovmskh (v4hi); -int __builtin_arm_tmovmskw (v2si); -long long __builtin_arm_waccb (v8qi); -long long __builtin_arm_wacch (v4hi); -long long __builtin_arm_waccw (v2si); -v8qi __builtin_arm_waddb (v8qi, v8qi); -v8qi __builtin_arm_waddbss (v8qi, v8qi); -v8qi __builtin_arm_waddbus (v8qi, v8qi); -v4hi __builtin_arm_waddh (v4hi, v4hi); -v4hi __builtin_arm_waddhss (v4hi, v4hi); -v4hi __builtin_arm_waddhus (v4hi, v4hi); -v2si __builtin_arm_waddw (v2si, v2si); -v2si __builtin_arm_waddwss (v2si, v2si); -v2si __builtin_arm_waddwus (v2si, v2si); -v8qi __builtin_arm_walign (v8qi, v8qi, int); -long long __builtin_arm_wand(long long, long long); -long long __builtin_arm_wandn (long long, long long); -v8qi __builtin_arm_wavg2b (v8qi, v8qi); -v8qi __builtin_arm_wavg2br (v8qi, v8qi); -v4hi __builtin_arm_wavg2h (v4hi, v4hi); -v4hi __builtin_arm_wavg2hr (v4hi, v4hi); -v8qi __builtin_arm_wcmpeqb (v8qi, v8qi); -v4hi __builtin_arm_wcmpeqh (v4hi, v4hi); -v2si __builtin_arm_wcmpeqw (v2si, v2si); -v8qi __builtin_arm_wcmpgtsb (v8qi, v8qi); -v4hi __builtin_arm_wcmpgtsh (v4hi, v4hi); -v2si __builtin_arm_wcmpgtsw (v2si, v2si); -v8qi __builtin_arm_wcmpgtub (v8qi, v8qi); -v4hi __builtin_arm_wcmpgtuh (v4hi, v4hi); -v2si __builtin_arm_wcmpgtuw (v2si, v2si); -long long __builtin_arm_wmacs (long long, v4hi, v4hi); -long long __builtin_arm_wmacsz (v4hi, v4hi); -long long __builtin_arm_wmacu (long long, v4hi, v4hi); -long long __builtin_arm_wmacuz (v4hi, v4hi); -v4hi __builtin_arm_wmadds (v4hi, v4hi); -v4hi __builtin_arm_wmaddu (v4hi, v4hi); -v8qi __builtin_arm_wmaxsb (v8qi, v8qi); -v4hi __builtin_arm_wmaxsh (v4hi, v4hi); -v2si __builtin_arm_wmaxsw (v2si, v2si); -v8qi __builtin_arm_wmaxub (v8qi, v8qi); -v4hi __builtin_arm_wmaxuh (v4hi, v4hi); -v2si __builtin_arm_wmaxuw (v2si, v2si); -v8qi __builtin_arm_wminsb (v8qi, v8qi); -v4hi __builtin_arm_wminsh (v4hi, v4hi); -v2si __builtin_arm_wminsw (v2si, v2si); -v8qi __builtin_arm_wminub (v8qi, v8qi); -v4hi __builtin_arm_wminuh (v4hi, v4hi); -v2si __builtin_arm_wminuw (v2si, v2si); -v4hi __builtin_arm_wmulsm (v4hi, v4hi); -v4hi __builtin_arm_wmulul (v4hi, v4hi); -v4hi __builtin_arm_wmulum (v4hi, v4hi); -long long __builtin_arm_wor (long long, long long); -v2si __builtin_arm_wpackdss (long long, long long); -v2si __builtin_arm_wpackdus (long long, long long); -v8qi __builtin_arm_wpackhss (v4hi, v4hi); -v8qi __builtin_arm_wpackhus (v4hi, v4hi); -v4hi __builtin_arm_wpackwss (v2si, v2si); -v4hi __builtin_arm_wpackwus (v2si, v2si); -long long __builtin_arm_wrord (long long, long long); -long long __builtin_arm_wrordi (long long, int); -v4hi __builtin_arm_wrorh (v4hi, long long); -v4hi __builtin_arm_wrorhi (v4hi, int); -v2si __builtin_arm_wrorw (v2si, long long); -v2si __builtin_arm_wrorwi (v2si, int); -v2si __builtin_arm_wsadb (v2si, v8qi, v8qi); -v2si __builtin_arm_wsadbz (v8qi, v8qi); -v2si __builtin_arm_wsadh (v2si, v4hi, v4hi); -v2si __builtin_arm_wsadhz (v4hi, v4hi); -v4hi __builtin_arm_wshufh (v4hi, int); -long long __builtin_arm_wslld (long long, long long); -long long __builtin_arm_wslldi (long long, int); -v4hi __builtin_arm_wsllh (v4hi, long long); -v4hi __builtin_arm_wsllhi (v4hi, int); -v2si __builtin_arm_wsllw (v2si, long long); -v2si __builtin_arm_wsllwi (v2si, int); -long long __builtin_arm_wsrad (long long, long long); -long long __builtin_arm_wsradi (long long, int); -v4hi __builtin_arm_wsrah (v4hi, long long); -v4hi __builtin_arm_wsrahi (v4hi, int); -v2si __builtin_arm_wsraw (v2si, long long); -v2si __builtin_arm_wsrawi (v2si, int); -long long __builtin_arm_wsrld (long long, long long); -long long __builtin_arm_wsrldi (long long, int); -v4hi __builtin_arm_wsrlh (v4hi, long long); -v4hi __builtin_arm_wsrlhi (v4hi, int); -v2si __builtin_arm_wsrlw (v2si, long long); -v2si __builtin_arm_wsrlwi (v2si, int); -v8qi __builtin_arm_wsubb (v8qi, v8qi); -v8qi __builtin_arm_wsubbss (v8qi, v8qi); -v8qi __builtin_arm_wsubbus (v8qi, v8qi); -v4hi __builtin_arm_wsubh (v4hi, v4hi); -v4hi __builtin_arm_wsubhss (v4hi, v4hi); -v4hi __builtin_arm_wsubhus (v4hi, v4hi); -v2si __builtin_arm_wsubw (v2si, v2si); -v2si __builtin_arm_wsubwss (v2si, v2si); -v2si __builtin_arm_wsubwus (v2si, v2si); -v4hi __builtin_arm_wunpckehsb (v8qi); -v2si __builtin_arm_wunpckehsh (v4hi); -long long __builtin_arm_wunpckehsw (v2si); -v4hi __builtin_arm_wunpckehub (v8qi); -v2si __builtin_arm_wunpckehuh (v4hi); -long long __builtin_arm_wunpckehuw (v2si); -v4hi __builtin_arm_wunpckelsb (v8qi); -v2si __builtin_arm_wunpckelsh (v4hi); -long long __builtin_arm_wunpckelsw (v2si); -v4hi __builtin_arm_wunpckelub (v8qi); -v2si __builtin_arm_wunpckeluh (v4hi); -long long __builtin_arm_wunpckeluw (v2si); -v8qi __builtin_arm_wunpckihb (v8qi, v8qi); -v4hi __builtin_arm_wunpckihh (v4hi, v4hi); -v2si __builtin_arm_wunpckihw (v2si, v2si); -v8qi __builtin_arm_wunpckilb (v8qi, v8qi); -v4hi __builtin_arm_wunpckilh (v4hi, v4hi); -v2si __builtin_arm_wunpckilw (v2si, v2si); -long long __builtin_arm_wxor (long long, long long); -long long __builtin_arm_wzero (); -@end smallexample - - @node ARM C Language Extensions (ACLE) @subsection ARM C Language Extensions (ACLE) diff --git a/gcc/doc/gm2.texi b/gcc/doc/gm2.texi index cb52e8c..8293da4 100644 --- a/gcc/doc/gm2.texi +++ b/gcc/doc/gm2.texi @@ -1495,7 +1495,7 @@ from @samp{bad} will cause an overflow to @samp{foo}. If we compile the code with the following options: @example -$ gm2 -g -fsoft-check-all -O2 -c assignvalue.mod +$ gm2 -g -fsoft-check-all -O2 -fm2-plugin -c assignvalue.mod assignvalue.mod:16:0:inevitable that this error will occur at run time, assignment will result in an overflow @end example diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a0f1a93..ee71801 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -23520,7 +23520,7 @@ These @samp{-m} options are defined for the ARM port: @opindex mabi @item -mabi=@var{name} Generate code for the specified ABI@. Permissible values are: @samp{apcs-gnu}, -@samp{atpcs}, @samp{aapcs}, @samp{aapcs-linux} and @samp{iwmmxt}. +@samp{atpcs}, @samp{aapcs} and @samp{aapcs-linux}. @opindex mapcs-frame @item -mapcs-frame @@ -30698,6 +30698,7 @@ Generate code for the specified PTX ISA target architecture. Valid architecture strings are @samp{sm_30}, @samp{sm_35}, @samp{sm_37}, @samp{sm_52}, @samp{sm_53}, +@samp{sm_61}, @samp{sm_70}, @samp{sm_75}, @samp{sm_80}, and @samp{sm_89}. The default depends on how the compiler has been configured, see @@ -30724,6 +30725,7 @@ Generate code for the specified PTX ISA version. Valid version strings are @samp{3.1}, @samp{4.1}, @samp{4.2}, +@samp{5.0}, @samp{6.0}, @samp{6.3}, @samp{7.0}, @samp{7.3}, and @samp{7.8}. The default PTX ISA version is the one that added support for the @@ -31143,501 +31145,8 @@ syntax @samp{<major>p<minor>} or @samp{<major>}, (e.g.@: @samp{m2p1} or @end table Supported extension are listed below: -@multitable @columnfractions .10 .10 .80 -@headitem Extension Name @tab Supported Version @tab Description -@item i -@tab 2.0, 2.1 -@tab Base integer extension. - -@item e -@tab 2.0 -@tab Reduced base integer extension. - -@item g -@tab - -@tab General-purpose computing base extension, @samp{g} will expand to -@samp{i}, @samp{m}, @samp{a}, @samp{f}, @samp{d}, @samp{zicsr} and -@samp{zifencei}. - -@item m -@tab 2.0 -@tab Integer multiplication and division extension. - -@item a -@tab 2.0, 2.1 -@tab Atomic extension. - -@item f -@tab 2.0, 2.2 -@tab Single-precision floating-point extension. - -@item d -@tab 2.0, 2.2 -@tab Double-precision floating-point extension. - -@item c -@tab 2.0 -@tab Compressed extension. - -@item h -@tab 1.0 -@tab Hypervisor extension. - -@item v -@tab 1.0 -@tab Vector extension. - -@item zicsr -@tab 2.0 -@tab Control and status register access extension. - -@item zifencei -@tab 2.0 -@tab Instruction-fetch fence extension. - -@item zicond -@tab 1.0 -@tab Integer conditional operations extension. - -@item za64rs -@tab 1.0 -@tab Reservation set size of 64 bytes. - -@item za128rs -@tab 1.0 -@tab Reservation set size of 128 bytes. - -@item zawrs -@tab 1.0 -@tab Wait-on-reservation-set extension. - -@item zba -@tab 1.0 -@tab Address calculation extension. - -@item zbb -@tab 1.0 -@tab Basic bit manipulation extension. - -@item zbc -@tab 1.0 -@tab Carry-less multiplication extension. - -@item zbs -@tab 1.0 -@tab Single-bit operation extension. - -@item zfinx -@tab 1.0 -@tab Single-precision floating-point in integer registers extension. - -@item zdinx -@tab 1.0 -@tab Double-precision floating-point in integer registers extension. - -@item zhinx -@tab 1.0 -@tab Half-precision floating-point in integer registers extension. - -@item zhinxmin -@tab 1.0 -@tab Minimal half-precision floating-point in integer registers extension. - -@item zbkb -@tab 1.0 -@tab Cryptography bit-manipulation extension. - -@item zbkc -@tab 1.0 -@tab Cryptography carry-less multiply extension. - -@item zbkx -@tab 1.0 -@tab Cryptography crossbar permutation extension. - -@item zkne -@tab 1.0 -@tab AES Encryption extension. - -@item zknd -@tab 1.0 -@tab AES Decryption extension. - -@item zknh -@tab 1.0 -@tab Hash function extension. - -@item zkr -@tab 1.0 -@tab Entropy source extension. - -@item zksed -@tab 1.0 -@tab SM4 block cipher extension. - -@item zksh -@tab 1.0 -@tab SM3 hash function extension. - -@item zkt -@tab 1.0 -@tab Data independent execution latency extension. - -@item zk -@tab 1.0 -@tab Standard scalar cryptography extension. - -@item zkn -@tab 1.0 -@tab NIST algorithm suite extension. - -@item zks -@tab 1.0 -@tab ShangMi algorithm suite extension. -@item zihintntl -@tab 1.0 -@tab Non-temporal locality hints extension. - -@item zihintpause -@tab 1.0 -@tab Pause hint extension. - -@item zicboz -@tab 1.0 -@tab Cache-block zero extension. - -@item zicbom -@tab 1.0 -@tab Cache-block management extension. - -@item zicbop -@tab 1.0 -@tab Cache-block prefetch extension. - -@item zic64b -@tab 1.0 -@tab Cache block size isf 64 bytes. - -@item ziccamoa -@tab 1.0 -@tab Main memory supports all atomics in A. - -@item ziccif -@tab 1.0 -@tab Main memory supports instruction fetch with atomicity requirement. - -@item zicclsm -@tab 1.0 -@tab Main memory supports misaligned loads/stores. - -@item ziccrse -@tab 1.0 -@tab Main memory supports forward progress on LR/SC sequences. - -@item zicntr -@tab 2.0 -@tab Standard extension for base counters and timers. - -@item zihpm -@tab 2.0 -@tab Standard extension for hardware performance counters. - -@item ztso -@tab 1.0 -@tab Total store ordering extension. - -@item zve32x -@tab 1.0 -@tab Vector extensions for embedded processors. - -@item zve32f -@tab 1.0 -@tab Vector extensions for embedded processors. - -@item zve64x -@tab 1.0 -@tab Vector extensions for embedded processors. - -@item zve64f -@tab 1.0 -@tab Vector extensions for embedded processors. - -@item zve64d -@tab 1.0 -@tab Vector extensions for embedded processors. - -@item zvl32b -@tab 1.0 -@tab Minimum vector length standard extensions - -@item zvl64b -@tab 1.0 -@tab Minimum vector length standard extensions - -@item zvl128b -@tab 1.0 -@tab Minimum vector length standard extensions - -@item zvl256b -@tab 1.0 -@tab Minimum vector length standard extensions - -@item zvl512b -@tab 1.0 -@tab Minimum vector length standard extensions - -@item zvl1024b -@tab 1.0 -@tab Minimum vector length standard extensions - -@item zvl2048b -@tab 1.0 -@tab Minimum vector length standard extensions - -@item zvl4096b -@tab 1.0 -@tab Minimum vector length standard extensions - -@item zvbb -@tab 1.0 -@tab Vector basic bit-manipulation extension. - -@item zvbc -@tab 1.0 -@tab Vector carryless multiplication extension. - -@item zvkb -@tab 1.0 -@tab Vector cryptography bit-manipulation extension. - -@item zvkg -@tab 1.0 -@tab Vector GCM/GMAC extension. - -@item zvkned -@tab 1.0 -@tab Vector AES block cipher extension. - -@item zvknha -@tab 1.0 -@tab Vector SHA-2 secure hash extension. - -@item zvknhb -@tab 1.0 -@tab Vector SHA-2 secure hash extension. - -@item zvksed -@tab 1.0 -@tab Vector SM4 Block Cipher extension. - -@item zvksh -@tab 1.0 -@tab Vector SM3 Secure Hash extension. - -@item zvkn -@tab 1.0 -@tab Vector NIST Algorithm Suite extension, @samp{zvkn} will expand to -@samp{zvkned}, @samp{zvknhb}, @samp{zvkb} and @samp{zvkt}. - -@item zvknc -@tab 1.0 -@tab Vector NIST Algorithm Suite with carryless multiply extension, @samp{zvknc} -will expand to @samp{zvkn} and @samp{zvbc}. - -@item zvkng -@tab 1.0 -@tab Vector NIST Algorithm Suite with GCM extension, @samp{zvkng} will expand -to @samp{zvkn} and @samp{zvkg}. - -@item zvks -@tab 1.0 -@tab Vector ShangMi algorithm suite extension, @samp{zvks} will expand -to @samp{zvksed}, @samp{zvksh}, @samp{zvkb} and @samp{zvkt}. - -@item zvksc -@tab 1.0 -@tab Vector ShangMi algorithm suite with carryless multiplication extension, -@samp{zvksc} will expand to @samp{zvks} and @samp{zvbc}. - -@item zvksg -@tab 1.0 -@tab Vector ShangMi algorithm suite with GCM extension, @samp{zvksg} will expand -to @samp{zvks} and @samp{zvkg}. - -@item zvkt -@tab 1.0 -@tab Vector data independent execution latency extension. - -@item zfh -@tab 1.0 -@tab Half-precision floating-point extension. - -@item zfhmin -@tab 1.0 -@tab Minimal half-precision floating-point extension. - -@item zvfh -@tab 1.0 -@tab Vector half-precision floating-point extension. - -@item zvfhmin -@tab 1.0 -@tab Vector minimal half-precision floating-point extension. - -@item zvfbfmin -@tab 1.0 -@tab Vector BF16 converts extension. - -@item zfa -@tab 1.0 -@tab Additional floating-point extension. - -@item zmmul -@tab 1.0 -@tab Integer multiplication extension. - -@item zca -@tab 1.0 -@tab Integer compressed instruction extension. - -@item zcf -@tab 1.0 -@tab Compressed single-precision floating point loads and stores extension. - -@item zcd -@tab 1.0 -@tab Compressed double-precision floating point loads and stores extension. - -@item zcb -@tab 1.0 -@tab Simple compressed instruction extension. - -@item zce -@tab 1.0 -@tab Compressed instruction extensions for embedded processors. - -@item zcmp -@tab 1.0 -@tab Compressed push pop extension. - -@item zcmt -@tab 1.0 -@tab Table jump instruction extension. - -@item smaia -@tab 1.0 -@tab Advanced interrupt architecture extension. - -@item smepmp -@tab 1.0 -@tab PMP Enhancements for memory access and execution prevention on Machine mode. - -@item smstateen -@tab 1.0 -@tab State enable extension. - -@item ssaia -@tab 1.0 -@tab Advanced interrupt architecture extension for supervisor-mode. - -@item sscofpmf -@tab 1.0 -@tab Count overflow & filtering extension. - -@item ssstateen -@tab 1.0 -@tab State-enable extension for supervisor-mode. - -@item sstc -@tab 1.0 -@tab Supervisor-mode timer interrupts extension. - -@item svade -@tab 1.0 -@tab Cause exception when hardware updating of A/D bits is disabled - -@item svadu -@tab 1.0 -@tab Hardware Updating of A/D Bits extension. - -@item svinval -@tab 1.0 -@tab Fine-grained address-translation cache invalidation extension. - -@item svnapot -@tab 1.0 -@tab NAPOT translation contiguity extension. - -@item svpbmt -@tab 1.0 -@tab Page-based memory types extension. - -@item xcvmac -@tab 1.0 -@tab Core-V multiply-accumulate extension. - -@item xcvalu -@tab 1.0 -@tab Core-V miscellaneous ALU extension. - -@item xcvelw -@tab 1.0 -@tab Core-V event load word extension. - -@item xtheadba -@tab 1.0 -@tab T-head address calculation extension. - -@item xtheadbb -@tab 1.0 -@tab T-head basic bit-manipulation extension. - -@item xtheadbs -@tab 1.0 -@tab T-head single-bit instructions extension. - -@item xtheadcmo -@tab 1.0 -@tab T-head cache management operations extension. - -@item xtheadcondmov -@tab 1.0 -@tab T-head conditional move extension. - -@item xtheadfmemidx -@tab 1.0 -@tab T-head indexed memory operations for floating-point registers extension. - -@item xtheadfmv -@tab 1.0 -@tab T-head double floating-point high-bit data transmission extension. - -@item xtheadint -@tab 1.0 -@tab T-head acceleration interruption extension. - -@item xtheadmac -@tab 1.0 -@tab T-head multiply-accumulate extension. - -@item xtheadmemidx -@tab 1.0 -@tab T-head indexed memory operation extension. - -@item xtheadmempair -@tab 1.0 -@tab T-head two-GPR memory operation extension. - -@item xtheadsync -@tab 1.0 -@tab T-head multi-core synchronization extension. - -@item xventanacondops -@tab 1.0 -@tab Ventana integer conditional operations extension. - -@end multitable +@include riscv-ext.texi When @option{-march=} is not specified, use the setting from @option{-mcpu}. diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index ae7a601..f6314af 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -2171,12 +2171,6 @@ VFP floating-point registers @code{d0}-@code{d31} and the appropriate subset @code{d0}-@code{d15} based on command line options. Used for 64 bit values only. Not valid for Thumb1. -@item y -The iWMMX co-processor registers. - -@item z -The iWMMX GR registers. - @item G The floating-point constant 0.0 @@ -2210,9 +2204,6 @@ A symbol in the text segment of the current file @item Uv A memory reference suitable for VFP load/store insns (reg+constant offset) -@item Uy -A memory reference suitable for iWMMXt load/store instructions. - @item Uq A memory reference suitable for the ARMv4 ldrsb instruction. @end table diff --git a/gcc/doc/riscv-ext.texi b/gcc/doc/riscv-ext.texi new file mode 100644 index 0000000..bd3d29c --- /dev/null +++ b/gcc/doc/riscv-ext.texi @@ -0,0 +1,665 @@ +@c Copyright (C) 2025 Free Software Foundation, Inc. +@c This is part of the GCC manual. +@c For copying conditions, see the file gcc/doc/include/fdl.texi. + +@c This file is generated automatically using +@c gcc/config/riscv/gen-riscv-ext-texi.cc from: +@c gcc/config/riscv/riscv-ext.def +@c gcc/config/riscv/riscv-opts.h + +@c Please *DO NOT* edit manually. + +@multitable @columnfractions .10 .10 .80 +@headitem Extension Name @tab Supported Version @tab Description + +@item g +@tab - +@tab General-purpose computing base extension, @samp{g} will expand to +@samp{i}, @samp{m}, @samp{a}, @samp{f}, @samp{d}, @samp{zicsr} and +@samp{zifencei}. + +@item e +@tab 2.0 +@tab Reduced base integer extension + +@item i +@tab 2.0 2.1 +@tab Base integer extension + +@item m +@tab 2.0 +@tab Integer multiplication and division extension + +@item a +@tab 2.0 2.1 +@tab Atomic extension + +@item f +@tab 2.0 2.2 +@tab Single-precision floating-point extension + +@item d +@tab 2.0 2.2 +@tab Double-precision floating-point extension + +@item c +@tab 2.0 +@tab Compressed extension + +@item b +@tab 1.0 +@tab b extension + +@item v +@tab 1.0 +@tab Vector extension + +@item h +@tab 1.0 +@tab Hypervisor extension + +@item zic64b +@tab 1.0 +@tab Cache block size isf 64 bytes + +@item zicbom +@tab 1.0 +@tab Cache-block management extension + +@item zicbop +@tab 1.0 +@tab Cache-block prefetch extension + +@item zicboz +@tab 1.0 +@tab Cache-block zero extension + +@item ziccamoa +@tab 1.0 +@tab Main memory supports all atomics in A + +@item ziccif +@tab 1.0 +@tab Main memory supports instruction fetch with atomicity requirement + +@item zicclsm +@tab 1.0 +@tab Main memory supports misaligned loads/stores + +@item ziccrse +@tab 1.0 +@tab Main memory supports forward progress on LR/SC sequences + +@item zicfilp +@tab 1.0 +@tab zicfilp extension + +@item zicfiss +@tab 1.0 +@tab zicfiss extension + +@item zicntr +@tab 2.0 +@tab Standard extension for base counters and timers + +@item zicond +@tab 1.0 +@tab Integer conditional operations extension + +@item zicsr +@tab 2.0 +@tab Control and status register access extension + +@item zifencei +@tab 2.0 +@tab Instruction-fetch fence extension + +@item zihintntl +@tab 1.0 +@tab Non-temporal locality hints extension + +@item zihintpause +@tab 2.0 +@tab Pause hint extension + +@item zihpm +@tab 2.0 +@tab Standard extension for hardware performance counters + +@item zimop +@tab 1.0 +@tab zimop extension + +@item zilsd +@tab 1.0 +@tab Load/Store pair instructions extension + +@item zmmul +@tab 1.0 +@tab Integer multiplication extension + +@item za128rs +@tab 1.0 +@tab Reservation set size of 128 bytes + +@item za64rs +@tab 1.0 +@tab Reservation set size of 64 bytes + +@item zaamo +@tab 1.0 +@tab zaamo extension + +@item zabha +@tab 1.0 +@tab zabha extension + +@item zacas +@tab 1.0 +@tab zacas extension + +@item zalrsc +@tab 1.0 +@tab zalrsc extension + +@item zawrs +@tab 1.0 +@tab Wait-on-reservation-set extension + +@item zama16b +@tab 1.0 +@tab Zama16b extension, Misaligned loads, stores, and AMOs to main memory regions that do not cross a naturally aligned 16-byte boundary are atomic. + +@item zfa +@tab 1.0 +@tab Additional floating-point extension + +@item zfbfmin +@tab 1.0 +@tab zfbfmin extension + +@item zfh +@tab 1.0 +@tab Half-precision floating-point extension + +@item zfhmin +@tab 1.0 +@tab Minimal half-precision floating-point extension + +@item zfinx +@tab 1.0 +@tab Single-precision floating-point in integer registers extension + +@item zdinx +@tab 1.0 +@tab Double-precision floating-point in integer registers extension + +@item zca +@tab 1.0 +@tab Integer compressed instruction extension + +@item zcb +@tab 1.0 +@tab Simple compressed instruction extension + +@item zcd +@tab 1.0 +@tab Compressed double-precision floating point loads and stores extension + +@item zce +@tab 1.0 +@tab Compressed instruction extensions for embedded processors + +@item zcf +@tab 1.0 +@tab Compressed single-precision floating point loads and stores extension + +@item zcmop +@tab 1.0 +@tab zcmop extension + +@item zcmp +@tab 1.0 +@tab Compressed push pop extension + +@item zcmt +@tab 1.0 +@tab Table jump instruction extension + +@item zclsd +@tab 1.0 +@tab Compressed load/store pair instructions extension + +@item zba +@tab 1.0 +@tab Address calculation extension + +@item zbb +@tab 1.0 +@tab Basic bit manipulation extension + +@item zbc +@tab 1.0 +@tab Carry-less multiplication extension + +@item zbkb +@tab 1.0 +@tab Cryptography bit-manipulation extension + +@item zbkc +@tab 1.0 +@tab Cryptography carry-less multiply extension + +@item zbkx +@tab 1.0 +@tab Cryptography crossbar permutation extension + +@item zbs +@tab 1.0 +@tab Single-bit operation extension + +@item zk +@tab 1.0 +@tab Standard scalar cryptography extension + +@item zkn +@tab 1.0 +@tab NIST algorithm suite extension + +@item zknd +@tab 1.0 +@tab AES Decryption extension + +@item zkne +@tab 1.0 +@tab AES Encryption extension + +@item zknh +@tab 1.0 +@tab Hash function extension + +@item zkr +@tab 1.0 +@tab Entropy source extension + +@item zks +@tab 1.0 +@tab ShangMi algorithm suite extension + +@item zksed +@tab 1.0 +@tab SM4 block cipher extension + +@item zksh +@tab 1.0 +@tab SM3 hash function extension + +@item zkt +@tab 1.0 +@tab Data independent execution latency extension + +@item ztso +@tab 1.0 +@tab Total store ordering extension + +@item zvbb +@tab 1.0 +@tab Vector basic bit-manipulation extension + +@item zvbc +@tab 1.0 +@tab Vector carryless multiplication extension + +@item zve32f +@tab 1.0 +@tab Vector extensions for embedded processors + +@item zve32x +@tab 1.0 +@tab Vector extensions for embedded processors + +@item zve64d +@tab 1.0 +@tab Vector extensions for embedded processors + +@item zve64f +@tab 1.0 +@tab Vector extensions for embedded processors + +@item zve64x +@tab 1.0 +@tab Vector extensions for embedded processors + +@item zvfbfmin +@tab 1.0 +@tab Vector BF16 converts extension + +@item zvfbfwma +@tab 1.0 +@tab zvfbfwma extension + +@item zvfh +@tab 1.0 +@tab Vector half-precision floating-point extension + +@item zvfhmin +@tab 1.0 +@tab Vector minimal half-precision floating-point extension + +@item zvkb +@tab 1.0 +@tab Vector cryptography bit-manipulation extension + +@item zvkg +@tab 1.0 +@tab Vector GCM/GMAC extension + +@item zvkn +@tab 1.0 +@tab Vector NIST Algorithm Suite extension, @samp{zvkn} will expand to + +@item zvknc +@tab 1.0 +@tab Vector NIST Algorithm Suite with carryless multiply extension, @samp{zvknc} + +@item zvkned +@tab 1.0 +@tab Vector AES block cipher extension + +@item zvkng +@tab 1.0 +@tab Vector NIST Algorithm Suite with GCM extension, @samp{zvkng} will expand + +@item zvknha +@tab 1.0 +@tab Vector SHA-2 secure hash extension + +@item zvknhb +@tab 1.0 +@tab Vector SHA-2 secure hash extension + +@item zvks +@tab 1.0 +@tab Vector ShangMi algorithm suite extension, @samp{zvks} will expand + +@item zvksc +@tab 1.0 +@tab Vector ShangMi algorithm suite with carryless multiplication extension, + +@item zvksed +@tab 1.0 +@tab Vector SM4 Block Cipher extension + +@item zvksg +@tab 1.0 +@tab Vector ShangMi algorithm suite with GCM extension, @samp{zvksg} will expand + +@item zvksh +@tab 1.0 +@tab Vector SM3 Secure Hash extension + +@item zvkt +@tab 1.0 +@tab Vector data independent execution latency extension + +@item zvl1024b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl128b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl16384b +@tab 1.0 +@tab zvl16384b extension + +@item zvl2048b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl256b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl32768b +@tab 1.0 +@tab zvl32768b extension + +@item zvl32b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl4096b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl512b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl64b +@tab 1.0 +@tab Minimum vector length standard extensions + +@item zvl65536b +@tab 1.0 +@tab zvl65536b extension + +@item zvl8192b +@tab 1.0 +@tab zvl8192b extension + +@item zhinx +@tab 1.0 +@tab Half-precision floating-point in integer registers extension + +@item zhinxmin +@tab 1.0 +@tab Minimal half-precision floating-point in integer registers extension + +@item sdtrig +@tab 1.0 +@tab sdtrig extension + +@item sha +@tab 1.0 +@tab The augmented hypervisor extension + +@item shcounterenw +@tab 1.0 +@tab Support writeable enables for any supported counter + +@item shgatpa +@tab 1.0 +@tab SvNNx4 mode supported for all modes supported by satp + +@item shtvala +@tab 1.0 +@tab The htval register provides all needed values + +@item shvstvala +@tab 1.0 +@tab The vstval register provides all needed values + +@item shvstvecd +@tab 1.0 +@tab The vstvec register supports Direct mode + +@item shvsatpa +@tab 1.0 +@tab The vsatp register supports all modes supported by satp + +@item smaia +@tab 1.0 +@tab Advanced interrupt architecture extension + +@item smepmp +@tab 1.0 +@tab PMP Enhancements for memory access and execution prevention on Machine mode + +@item smmpm +@tab 1.0 +@tab smmpm extension + +@item smnpm +@tab 1.0 +@tab smnpm extension + +@item smstateen +@tab 1.0 +@tab State enable extension + +@item ssaia +@tab 1.0 +@tab Advanced interrupt architecture extension for supervisor-mode + +@item sscofpmf +@tab 1.0 +@tab Count overflow & filtering extension + +@item ssnpm +@tab 1.0 +@tab ssnpm extension + +@item sspm +@tab 1.0 +@tab sspm extension + +@item ssstateen +@tab 1.0 +@tab State-enable extension for supervisor-mode + +@item sstc +@tab 1.0 +@tab Supervisor-mode timer interrupts extension + +@item ssstrict +@tab 1.0 +@tab ssstrict extension + +@item supm +@tab 1.0 +@tab supm extension + +@item svinval +@tab 1.0 +@tab Fine-grained address-translation cache invalidation extension + +@item svnapot +@tab 1.0 +@tab NAPOT translation contiguity extension + +@item svpbmt +@tab 1.0 +@tab Page-based memory types extension + +@item svvptc +@tab 1.0 +@tab svvptc extension + +@item svadu +@tab 1.0 +@tab Hardware Updating of A/D Bits extension + +@item svade +@tab 1.0 +@tab Cause exception when hardware updating of A/D bits is disabled + +@item xcvalu +@tab 1.0 +@tab Core-V miscellaneous ALU extension + +@item xcvbi +@tab 1.0 +@tab xcvbi extension + +@item xcvelw +@tab 1.0 +@tab Core-V event load word extension + +@item xcvmac +@tab 1.0 +@tab Core-V multiply-accumulate extension + +@item xcvsimd +@tab 1.0 +@tab xcvsimd extension + +@item xsfcease +@tab 1.0 +@tab xsfcease extension + +@item xsfvcp +@tab 1.0 +@tab xsfvcp extension + +@item xsfvfnrclipxfqf +@tab 1.0 +@tab xsfvfnrclipxfqf extension + +@item xsfvqmaccdod +@tab 1.0 +@tab xsfvqmaccdod extension + +@item xsfvqmaccqoq +@tab 1.0 +@tab xsfvqmaccqoq extension + +@item xtheadba +@tab 1.0 +@tab T-head address calculation extension + +@item xtheadbb +@tab 1.0 +@tab T-head basic bit-manipulation extension + +@item xtheadbs +@tab 1.0 +@tab T-head single-bit instructions extension + +@item xtheadcmo +@tab 1.0 +@tab T-head cache management operations extension + +@item xtheadcondmov +@tab 1.0 +@tab T-head conditional move extension + +@item xtheadfmemidx +@tab 1.0 +@tab T-head indexed memory operations for floating-point registers extension + +@item xtheadfmv +@tab 1.0 +@tab T-head double floating-point high-bit data transmission extension + +@item xtheadint +@tab 1.0 +@tab T-head acceleration interruption extension + +@item xtheadmac +@tab 1.0 +@tab T-head multiply-accumulate extension + +@item xtheadmemidx +@tab 1.0 +@tab T-head indexed memory operation extension + +@item xtheadmempair +@tab 1.0 +@tab T-head two-GPR memory operation extension + +@item xtheadsync +@tab 1.0 +@tab T-head multi-core synchronization extension + +@item xtheadvector +@tab 1.0 +@tab xtheadvector extension + +@item xventanacondops +@tab 1.0 +@tab Ventana integer conditional operations extension + +@end multitable diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 65eeecc..1c718c4 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -2042,10 +2042,6 @@ ARM target uses emulated floating point operations. ARM target supports @code{-mfpu=vfp -mfloat-abi=hard}. Some multilibs may be incompatible with these options. -@item arm_iwmmxt_ok -ARM target supports @code{-mcpu=iwmmxt}. -Some multilibs may be incompatible with this option. - @item arm_neon ARM target supports generating NEON instructions. diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc index 35fcf50..5f48ced 100644 --- a/gcc/fold-const.cc +++ b/gcc/fold-const.cc @@ -7246,10 +7246,10 @@ tree_swap_operands_p (const_tree arg0, const_tree arg1) if (TREE_CONSTANT (arg0)) return true; - /* Put invariant address in arg1. */ - if (is_gimple_invariant_address (arg1)) + /* Put addresses in arg1. */ + if (TREE_CODE (arg1) == ADDR_EXPR) return false; - if (is_gimple_invariant_address (arg0)) + if (TREE_CODE (arg0) == ADDR_EXPR) return true; /* It is preferable to swap two SSA_NAME to ensure a canonical form diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b3f63e0..15b51e1 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,59 @@ +2025-05-14 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/120139 + * dump-parse-tree.cc (get_c_type_name): If no constant + size of an array exists, output an asterisk. + +2025-05-14 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/120107 + * dump-parse-tree.cc (write_type): Do not dump non-interoperable + types. + +2025-05-14 Tobias Burnus <tburnus@baylibre.com> + + PR fortran/120225 + * simplify.cc (gfc_simplify_cotand): Fix used argument in + mpfr_tanu call. + +2025-05-14 Tobias Burnus <tburnus@baylibre.com> + + PR fortran/120225 + * simplify.cc: Include "trigd_fe.inc" only with MPFR < 4.2.0. + (rad2deg, rad2deg): Only define if MPFR < 4.2.0. + (gfc_simplify_acosd, gfc_simplify_asind, gfc_simplify_atand, + gfc_simplify_atan2d, gfc_simplify_cosd, gfc_simplify_tand, + gfc_simplify_cotand): Use mpfr_...u functions with MPFR >= 4.2.0. + +2025-05-13 Yuao Ma <c8ef@outlook.com> + Steven G. Kargl <kargl@gcc.gnu.org> + + PR fortran/113413 + * intrinsic.cc (do_check): Minor doc polish. + (add_functions): Add atand(y, x) mapping. + * intrinsic.texi: Update atand example. + +2025-05-13 Jakub Jelinek <jakub@redhat.com> + Daniil Kochergin <daniil2472s@gmail.com> + Tobias Burnus <tburnus@baylibre.com> + + PR fortran/120191 + * trans-intrinsic.cc (strip_kind_from_actual): Remove. + (gfc_conv_intrinsic_minmaxloc): Don't call strip_kind_from_actual. + Free and clear kind_arg->expr if non-NULL. Set back_arg->name to + "%VAL" instead of a loop looking for last argument. Remove actual + variable, use array_arg instead. Free and clear dim_arg->expr if + non-NULL for BT_CHARACTER cases instead of using a loop. + +2025-05-11 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/120163 + * gfortran.h: Add formal_resolved to gfc_symbol. + * resolve.cc (gfc_resolve_formal_arglist): Set it. + (resolve_function): Do not call gfc_get_formal_from_actual_arglist + if we already resolved a formal arglist. + (resolve_call): Likewise. + 2025-05-10 Harald Anlauf <anlauf@gmx.de> PR fortran/102891 diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc index dd920f3..3cd2eee 100644 --- a/gcc/fortran/dump-parse-tree.cc +++ b/gcc/fortran/dump-parse-tree.cc @@ -4371,6 +4371,8 @@ get_c_type_name (gfc_typespec *ts, gfc_array_spec *as, const char **pre, mpz_clear (sz); *asterisk = false; } + else + *asterisk = true; } return ret; } @@ -4415,10 +4417,11 @@ write_type (gfc_symbol *sym) { gfc_component *c; - /* Don't dump our iso c module, nor vtypes. */ + /* Don't dump types that are not interoperable, our very own ISO C Binding + module, or vtypes. */ if (sym->from_intmod == INTMOD_ISO_C_BINDING || sym->attr.flavor != FL_DERIVED - || sym->attr.vtype) + || sym->attr.vtype || !sym->attr.is_bind_c) return; fprintf (dumpfile, "typedef struct %s {\n", sym->name); diff --git a/gcc/fortran/intrinsic.cc b/gcc/fortran/intrinsic.cc index 2eba209..908e1da 100644 --- a/gcc/fortran/intrinsic.cc +++ b/gcc/fortran/intrinsic.cc @@ -376,11 +376,11 @@ do_check (gfc_intrinsic_sym *specific, gfc_actual_arglist *arg) Argument list: char * name of function - int whether function is elemental - int If the function can be used as an actual argument [1] - bt return type of function - int kind of return type of function - int Fortran standard version + int whether function is elemental + int If the function can be used as an actual argument [1] + bt return type of function + int kind of return type of function + int Fortran standard version check pointer to check function simplify pointer to simplification function resolve pointer to resolution function @@ -396,7 +396,7 @@ do_check (gfc_intrinsic_sym *specific, gfc_actual_arglist *arg) [1] Whether a function can or cannot be used as an actual argument is - determined by its presence on the 13.6 list in Fortran 2003. The + determined by its presence in the 13.6 list in Fortran 2003. The following intrinsics, which are GNU extensions, are considered allowed as actual arguments: ACOSH ATANH DACOSH DASINH DATANH DCONJG DIMAG ZABS ZCOS ZEXP ZLOG ZSIN ZSQRT. */ @@ -3479,6 +3479,13 @@ add_functions (void) gfc_check_fn_r, gfc_simplify_atand, gfc_resolve_trigd, x, BT_REAL, dr, REQUIRED); + /* Two-argument version of atand, equivalent to atan2d. */ + add_sym_2 ("atand", GFC_ISYM_ATAN2D, CLASS_ELEMENTAL, ACTUAL_YES, + BT_REAL, dr, GFC_STD_F2023, + gfc_check_atan2, gfc_simplify_atan2d, gfc_resolve_trigd2, + y, BT_REAL, dr, REQUIRED, + x, BT_REAL, dr, REQUIRED); + make_generic ("atand", GFC_ISYM_ATAND, GFC_STD_F2023); add_sym_1 ("datand", GFC_ISYM_ATAND, CLASS_ELEMENTAL, ACTUAL_YES, diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index 3a105bc..48c2d60 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -1547,7 +1547,7 @@ Fortran 90 and later @node ATAN -@section @code{ATAN} --- Arctangent function +@section @code{ATAN} --- Arctangent function @fnindex ATAN @fnindex DATAN @cindex trigonometric function, tangent, inverse @@ -1619,6 +1619,7 @@ Degrees function: @* @item @emph{Synopsis}: @multitable @columnfractions .80 @item @code{RESULT = ATAND(X)} +@item @code{RESULT = ATAND(Y, X)} @end multitable @item @emph{Description}: @@ -1630,21 +1631,23 @@ Elemental function @item @emph{Arguments}: @multitable @columnfractions .15 .70 -@item @var{X} @tab The type shall be @code{REAL}; -if @var{Y} is present, @var{X} shall be REAL. +@item @var{X} @tab The type shall be @code{REAL}. @item @var{Y} @tab The type and kind type parameter shall be the same as @var{X}. @end multitable @item @emph{Return value}: The return value is of the same type and kind as @var{X}. -The result is in degrees and lies in the range -@math{-90 \leq \Re \atand(x) \leq 90}. +If @var{Y} is present, the result is identical to @code{ATAN2D(Y, X)}. +Otherwise, the result is in degrees and lies in the range +@math{-90 \leq \atand(x) \leq 90}. @item @emph{Example}: @smallexample program test_atand real(8) :: x = 2.866_8 + real(4) :: x1 = 1.e0_4, y1 = 0.5e0_4 x = atand(x) + x1 = atand(y1, x1) end program test_atand @end smallexample diff --git a/gcc/fortran/simplify.cc b/gcc/fortran/simplify.cc index 208251b..1927097 100644 --- a/gcc/fortran/simplify.cc +++ b/gcc/fortran/simplify.cc @@ -1183,6 +1183,7 @@ gfc_simplify_asin (gfc_expr *x) } +#if MPFR_VERSION < MPFR_VERSION_NUM(4,2,0) /* Convert radians to degrees, i.e., x * 180 / pi. */ static void @@ -1196,6 +1197,7 @@ rad2deg (mpfr_t x) mpfr_div (x, x, tmp, GFC_RND_MODE); mpfr_clear (tmp); } +#endif /* Simplify ACOSD(X) where the returned value has units of degree. */ @@ -1217,8 +1219,12 @@ gfc_simplify_acosd (gfc_expr *x) } result = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where); +#if MPFR_VERSION >= MPFR_VERSION_NUM(4,2,0) + mpfr_acosu (result->value.real, x->value.real, 360, GFC_RND_MODE); +#else mpfr_acos (result->value.real, x->value.real, GFC_RND_MODE); rad2deg (result->value.real); +#endif return range_check (result, "ACOSD"); } @@ -1243,8 +1249,12 @@ gfc_simplify_asind (gfc_expr *x) } result = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where); +#if MPFR_VERSION >= MPFR_VERSION_NUM(4,2,0) + mpfr_asinu (result->value.real, x->value.real, 360, GFC_RND_MODE); +#else mpfr_asin (result->value.real, x->value.real, GFC_RND_MODE); rad2deg (result->value.real); +#endif return range_check (result, "ASIND"); } @@ -1261,8 +1271,12 @@ gfc_simplify_atand (gfc_expr *x) return NULL; result = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where); +#if MPFR_VERSION >= MPFR_VERSION_NUM(4,2,0) + mpfr_atanu (result->value.real, x->value.real, 360, GFC_RND_MODE); +#else mpfr_atan (result->value.real, x->value.real, GFC_RND_MODE); rad2deg (result->value.real); +#endif return range_check (result, "ATAND"); } @@ -1954,8 +1968,13 @@ gfc_simplify_atan2d (gfc_expr *y, gfc_expr *x) } result = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where); +#if MPFR_VERSION >= MPFR_VERSION_NUM(4,2,0) + mpfr_atan2u (result->value.real, y->value.real, x->value.real, 360, + GFC_RND_MODE); +#else mpfr_atan2 (result->value.real, y->value.real, x->value.real, GFC_RND_MODE); rad2deg (result->value.real); +#endif return range_check (result, "ATAN2D"); } @@ -1990,6 +2009,8 @@ gfc_simplify_cos (gfc_expr *x) } +#if MPFR_VERSION < MPFR_VERSION_NUM(4,2,0) +/* Used by trigd_fe.inc. */ static void deg2rad (mpfr_t x) { @@ -2001,11 +2022,13 @@ deg2rad (mpfr_t x) mpfr_mul (x, x, d2r, GFC_RND_MODE); mpfr_clear (d2r); } +#endif +#if MPFR_VERSION < MPFR_VERSION_NUM(4,2,0) /* Simplification routines for SIND, COSD, TAND. */ #include "trigd_fe.inc" - +#endif /* Simplify COSD(X) where X has the unit of degree. */ @@ -2018,8 +2041,12 @@ gfc_simplify_cosd (gfc_expr *x) return NULL; result = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where); +#if MPFR_VERSION >= MPFR_VERSION_NUM(4,2,0) + mpfr_cosu (result->value.real, x->value.real, 360, GFC_RND_MODE); +#else mpfr_set (result->value.real, x->value.real, GFC_RND_MODE); simplify_cosd (result->value.real); +#endif return range_check (result, "COSD"); } @@ -2036,8 +2063,12 @@ gfc_simplify_sind (gfc_expr *x) return NULL; result = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where); +#if MPFR_VERSION >= MPFR_VERSION_NUM(4,2,0) + mpfr_sinu (result->value.real, x->value.real, 360, GFC_RND_MODE); +#else mpfr_set (result->value.real, x->value.real, GFC_RND_MODE); simplify_sind (result->value.real); +#endif return range_check (result, "SIND"); } @@ -2054,8 +2085,12 @@ gfc_simplify_tand (gfc_expr *x) return NULL; result = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where); +#if MPFR_VERSION >= MPFR_VERSION_NUM(4,2,0) + mpfr_tanu (result->value.real, x->value.real, 360, GFC_RND_MODE); +#else mpfr_set (result->value.real, x->value.real, GFC_RND_MODE); simplify_tand (result->value.real); +#endif return range_check (result, "TAND"); } @@ -2078,7 +2113,11 @@ gfc_simplify_cotand (gfc_expr *x) result = gfc_get_constant_expr (x->ts.type, x->ts.kind, &x->where); mpfr_set (result->value.real, x->value.real, GFC_RND_MODE); mpfr_add_ui (result->value.real, result->value.real, 90, GFC_RND_MODE); +#if MPFR_VERSION >= MPFR_VERSION_NUM(4,2,0) + mpfr_tanu (result->value.real, result->value.real, 360, GFC_RND_MODE); +#else simplify_tand (result->value.real); +#endif mpfr_neg (result->value.real, result->value.real, GFC_RND_MODE); return range_check (result, "COTAND"); diff --git a/gcc/fortran/trans-intrinsic.cc b/gcc/fortran/trans-intrinsic.cc index 440cbdd..fce5ee2 100644 --- a/gcc/fortran/trans-intrinsic.cc +++ b/gcc/fortran/trans-intrinsic.cc @@ -4715,22 +4715,6 @@ maybe_absent_optional_variable (gfc_expr *e) } -/* Remove unneeded kind= argument from actual argument list when the - result conversion is dealt with in a different place. */ - -static void -strip_kind_from_actual (gfc_actual_arglist * actual) -{ - for (gfc_actual_arglist *a = actual; a; a = a->next) - { - if (a && a->name && strcmp (a->name, "kind") == 0) - { - gfc_free_expr (a->expr); - a->expr = NULL; - } - } -} - /* Emit code for minloc or maxloc intrinsic. There are many different cases we need to handle. For performance reasons we sometimes create two loops instead of one, where the second one is much simpler. @@ -4925,7 +4909,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op) tree b_if, b_else; tree back; gfc_loopinfo loop, *ploop; - gfc_actual_arglist *actual, *array_arg, *dim_arg, *mask_arg, *kind_arg; + gfc_actual_arglist *array_arg, *dim_arg, *mask_arg, *kind_arg; gfc_actual_arglist *back_arg; gfc_ss *arrayss = nullptr; gfc_ss *maskss = nullptr; @@ -4944,8 +4928,7 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op) int n; bool optional_mask; - actual = expr->value.function.actual; - array_arg = actual; + array_arg = expr->value.function.actual; dim_arg = array_arg->next; mask_arg = dim_arg->next; kind_arg = mask_arg->next; @@ -4954,14 +4937,16 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op) bool dim_present = dim_arg->expr != nullptr; bool nested_loop = dim_present && expr->rank > 0; - /* The last argument, BACK, is passed by value. Ensure that - by setting its name to %VAL. */ - for (gfc_actual_arglist *a = actual; a; a = a->next) + /* Remove kind. */ + if (kind_arg->expr) { - if (a->next == NULL) - a->name = "%VAL"; + gfc_free_expr (kind_arg->expr); + kind_arg->expr = NULL; } + /* Pass BACK argument by value. */ + back_arg->name = "%VAL"; + if (se->ss) { if (se->ss->info->useflags) @@ -4983,25 +4968,19 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, enum tree_code op) } } - arrayexpr = actual->expr; + arrayexpr = array_arg->expr; - /* Special case for character maxloc. Remove unneeded actual - arguments, then call a library function. */ + /* Special case for character maxloc. Remove unneeded "dim" actual + argument, then call a library function. */ if (arrayexpr->ts.type == BT_CHARACTER) { gcc_assert (expr->rank == 0); - gfc_actual_arglist *a = actual; - strip_kind_from_actual (a); - while (a) + if (dim_arg->expr) { - if (a->name && strcmp (a->name, "dim") == 0) - { - gfc_free_expr (a->expr); - a->expr = NULL; - } - a = a->next; + gfc_free_expr (dim_arg->expr); + dim_arg->expr = NULL; } gfc_conv_intrinsic_funcall (se, expr); return; diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc index 0b8150f..2a48d4a 100644 --- a/gcc/fortran/trans-openmp.cc +++ b/gcc/fortran/trans-openmp.cc @@ -2478,6 +2478,26 @@ gfc_omp_deep_mapping_do (bool is_cnt, const gimple *ctx, tree clause, else while (TREE_CODE (tmp) == COMPONENT_REF || TREE_CODE (tmp) == ARRAY_REF) tmp = TREE_OPERAND (tmp, TREE_CODE (tmp) == COMPONENT_REF ? 1 : 0); + if (TREE_CODE (tmp) == MEM_REF) + tmp = TREE_OPERAND (tmp, 0); + if (TREE_CODE (tmp) == SSA_NAME) + { + gimple *def_stmt = SSA_NAME_DEF_STMT (tmp); + if (gimple_code (def_stmt) == GIMPLE_ASSIGN) + { + tmp = gimple_assign_rhs1 (def_stmt); + if (poly) + { + tmp = TYPE_FIELDS (type); + type = TREE_TYPE (tmp); + } + else + while (TREE_CODE (tmp) == COMPONENT_REF + || TREE_CODE (tmp) == ARRAY_REF) + tmp = TREE_OPERAND (tmp, + TREE_CODE (tmp) == COMPONENT_REF ? 1 : 0); + } + } /* If the clause argument is nonallocatable, skip is-allocate check. */ if (GFC_DECL_GET_SCALAR_ALLOCATABLE (tmp) || GFC_DECL_GET_SCALAR_POINTER (tmp) diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc index e63fd6f..009c573 100644 --- a/gcc/gimple-fold.cc +++ b/gcc/gimple-fold.cc @@ -6239,8 +6239,9 @@ replace_stmt_with_simplification (gimple_stmt_iterator *gsi, auto code = tree_code (res_op->code); if (TREE_CODE_CLASS (code) == tcc_comparison /* GIMPLE_CONDs condition may not throw. */ - && (!flag_exceptions - || !cfun->can_throw_non_call_exceptions + && ((cfun + && (!flag_exceptions + || !cfun->can_throw_non_call_exceptions)) || !operation_could_trap_p (code, FLOAT_TYPE_P (TREE_TYPE (ops[0])), false, NULL_TREE))) @@ -6276,6 +6277,33 @@ replace_stmt_with_simplification (gimple_stmt_iterator *gsi, } else if (!inplace) { + /* For throwing comparisons, see if the GIMPLE_COND is the same as + the comparison would be. + This can happen due to the match pattern for + `(ne (cmp @0 @1) integer_zerop)` which creates a new expression + for the comparison. */ + if (TREE_CODE_CLASS (code) == tcc_comparison + && (!cfun + || (flag_exceptions + && cfun->can_throw_non_call_exceptions)) + && operation_could_trap_p (code, + FLOAT_TYPE_P (TREE_TYPE (ops[0])), + false, NULL_TREE)) + { + tree lhs = gimple_cond_lhs (cond_stmt); + if (gimple_cond_code (cond_stmt) == NE_EXPR + && TREE_CODE (lhs) == SSA_NAME + && INTEGRAL_TYPE_P (TREE_TYPE (lhs)) + && integer_zerop (gimple_cond_rhs (cond_stmt))) + { + gimple *s = SSA_NAME_DEF_STMT (lhs); + if (is_gimple_assign (s) + && gimple_assign_rhs_code (s) == code + && operand_equal_p (gimple_assign_rhs1 (s), ops[0]) + && operand_equal_p (gimple_assign_rhs2 (s), ops[1])) + return false; + } + } tree res = maybe_push_res_to_seq (res_op, seq); if (!res) return false; diff --git a/gcc/gimple.h b/gcc/gimple.h index 977ff1c..94d5a13 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -3716,6 +3716,7 @@ gimple_cond_code (const gimple *gs) inline void gimple_cond_set_code (gcond *gs, enum tree_code code) { + gcc_gimple_checking_assert (TREE_CODE_CLASS (code) == tcc_comparison); gs->subcode = code; } diff --git a/gcc/lto-streamer-out.cc b/gcc/lto-streamer-out.cc index a055d12d..86d3384 100644 --- a/gcc/lto-streamer-out.cc +++ b/gcc/lto-streamer-out.cc @@ -1256,7 +1256,17 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map<tree, hashval_t> *map, if (CODE_CONTAINS_STRUCT (code, TS_DECL_COMMON)) { - hstate.add_hwi (DECL_MODE (t)); + /* Similar to TYPE_MODE, avoid streaming out host-specific DECL_MODE + for aggregate type with offloading enabled, and while streaming-in + recompute appropriate DECL_MODE for accelerator. */ + if (lto_stream_offload_p + && (VAR_P (t) + || TREE_CODE (t) == PARM_DECL + || TREE_CODE (t) == FIELD_DECL) + && AGGREGATE_TYPE_P (TREE_TYPE (t))) + hstate.add_hwi (VOIDmode); + else + hstate.add_hwi (DECL_MODE (t)); hstate.add_flag (DECL_NONLOCAL (t)); hstate.add_flag (DECL_VIRTUAL_P (t)); hstate.add_flag (DECL_IGNORED_P (t)); @@ -1354,7 +1364,19 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map<tree, hashval_t> *map, if (CODE_CONTAINS_STRUCT (code, TS_TYPE_COMMON)) { - hstate.add_hwi (TYPE_MODE (t)); + /* For offloading, avoid streaming out TYPE_MODE for aggregate type since + it may be host-specific. For eg, aarch64 uses OImode for ARRAY_TYPE + whose size is 256-bits, which is not representable on accelerator. + Instead stream out VOIDmode, and while streaming-in, recompute + appropriate TYPE_MODE for accelerator. */ + if (lto_stream_offload_p + && (AGGREGATE_TYPE_P (t) || VECTOR_TYPE_P (t))) + hstate.add_hwi (VOIDmode); + /* for VECTOR_TYPE, TYPE_MODE reevaluates the mode using target_flags + not necessary valid in a global context. + Use the raw value previously set by layout_type. */ + else + hstate.add_hwi (TYPE_MODE_RAW (t)); /* TYPE_NO_FORCE_BLK is private to stor-layout and need no streaming. */ hstate.add_flag (TYPE_PACKED (t)); diff --git a/gcc/m2/ChangeLog b/gcc/m2/ChangeLog index 058468b..40396a2 100644 --- a/gcc/m2/ChangeLog +++ b/gcc/m2/ChangeLog @@ -1,3 +1,14 @@ +2025-05-13 Gaius Mulley <gaiusmod2@gmail.com> + + PR modula2/120253 + * m2.flex (FIRST_COLUMN): New define. + (updatepos): Remove commented code. + (consumeLine): Assign column to FIRST_COLUMN. + (initLine): Ditto. + (m2flex_GetColumnNo): Return FIRST_COLUMN if currentLine is NULL. + (m2flex_GetLineNo): Rewrite for positive logic. + (m2flex_GetLocation): Ditto. + 2025-05-05 Gaius Mulley <gaiusmod2@gmail.com> PR modula2/120117 diff --git a/gcc/m2/m2.flex b/gcc/m2/m2.flex index d08ac3e..e3cf010 100644 --- a/gcc/m2/m2.flex +++ b/gcc/m2/m2.flex @@ -48,6 +48,8 @@ static int cpreprocessor = 0; /* Replace this with correct getter. */ #define EXTERN extern "C" #endif +#define FIRST_COLUMN 1 + /* m2.flex provides a lexical analyser for GNU Modula-2. */ struct lineInfo { @@ -558,7 +560,7 @@ static void consumeLine (void) currentLine->lineno = lineno; currentLine->tokenpos=0; currentLine->nextpos=0; - currentLine->column=0; + currentLine->column=FIRST_COLUMN; START_LINE (lineno, yyleng); yyless(1); /* push back all but the \n */ traceLine (); @@ -621,7 +623,6 @@ static void updatepos (void) seenModuleStart = false; currentLine->nextpos = currentLine->tokenpos+yyleng; currentLine->toklen = yyleng; - /* if (currentLine->column == 0) */ currentLine->column = currentLine->tokenpos+1; currentLine->location = M2Options_OverrideLocation (GET_LOCATION (currentLine->column, @@ -677,7 +678,7 @@ static void initLine (void) currentLine->toklen = 0; currentLine->nextpos = 0; currentLine->lineno = lineno; - currentLine->column = 0; + currentLine->column = FIRST_COLUMN; currentLine->inuse = true; currentLine->next = NULL; } @@ -812,10 +813,10 @@ EXTERN bool m2flex_OpenSource (char *s) EXTERN int m2flex_GetLineNo (void) { - if (currentLine != NULL) - return currentLine->lineno; - else + if (currentLine == NULL) return 0; + else + return currentLine->lineno; } /* @@ -825,10 +826,10 @@ EXTERN int m2flex_GetLineNo (void) EXTERN int m2flex_GetColumnNo (void) { - if (currentLine != NULL) - return currentLine->column; + if (currentLine == NULL) + return FIRST_COLUMN; else - return 0; + return currentLine->column; } /* @@ -837,10 +838,10 @@ EXTERN int m2flex_GetColumnNo (void) EXTERN location_t m2flex_GetLocation (void) { - if (currentLine != NULL) - return currentLine->location; - else + if (currentLine == NULL) return 0; + else + return currentLine->location; } /* diff --git a/gcc/match.pd b/gcc/match.pd index ab496d9..79485f9 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -2845,7 +2845,7 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) /* (&a + b) !=/== (&a[1] + c) -> (&a[0] - &a[1]) + b !=/== c */ (for neeq (ne eq) (simplify - (neeq:c ADDR_EXPR@0 (pointer_plus @2 @3)) + (neeq:c (pointer_plus @2 @3) ADDR_EXPR@0) (with { poly_int64 diff; tree inner_type = TREE_TYPE (@3);} (if (ptr_difference_const (@0, @2, &diff)) (neeq { build_int_cst_type (inner_type, diff); } @3)))) @@ -3242,7 +3242,21 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) SAT_U_ADD = IMAGPART (SUM) != 0 ? -1 : REALPART (SUM) */ (cond^ (ne (imagpart (IFN_ADD_OVERFLOW@2 @0 INTEGER_CST@1)) integer_zerop) integer_minus_onep (realpart @2)) - (if (types_match (type, @0) && int_fits_type_p (@1, type))))) + (if (types_match (type, @0) && int_fits_type_p (@1, type)))) + (match (unsigned_integer_sat_add @0 @1) + /* WIDEN_SUM = (WT)X + (WT)Y + SAT_U_ADD = WIDEN_SUM > MAX ? MAX : (NT)WIDEN_SUM */ + (cond^ (le (plus (convert@2 @0) (convert@3 @1)) INTEGER_CST@4) + (plus:c @0 @1) integer_minus_onep) + (if (types_match (type, @0, @1) && types_match (@2, @3)) + (with + { + unsigned precision = TYPE_PRECISION (type); + unsigned widen_precision = TYPE_PRECISION (TREE_TYPE (@2)); + wide_int max = wi::mask (precision, false, widen_precision); + wide_int c4 = wi::to_wide (@4); + } + (if (wi::eq_p (c4, max) && widen_precision > precision)))))) /* Saturation sub for unsigned integer. */ (if (INTEGRAL_TYPE_P (type) && TYPE_UNSIGNED (type)) @@ -7644,8 +7658,8 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) (for cmp (eq ne) (simplify - /* SSA names are canonicalized to 2nd place. */ - (cmp addr@0 SSA_NAME@1) + /* ADDRs are canonicalized to 2nd place. */ + (cmp SSA_NAME@1 addr@0) (with { poly_int64 off; tree base; @@ -11294,26 +11308,58 @@ and, (match (ctz_table_index @1 @2 @3) (rshift (mult (bit_and:c (negate @1) @1) INTEGER_CST@2) INTEGER_CST@3)) +/* Floatint point/integer comparison and integer->integer + or floating point -> float point conversion. */ (match (cond_expr_convert_p @0 @2 @3 @6) (cond (simple_comparison@6 @0 @1) (convert@4 @2) (convert@5 @3)) - (if (INTEGRAL_TYPE_P (type) - && INTEGRAL_TYPE_P (TREE_TYPE (@2)) - && INTEGRAL_TYPE_P (TREE_TYPE (@0)) - && INTEGRAL_TYPE_P (TREE_TYPE (@3)) - && TYPE_PRECISION (type) != TYPE_PRECISION (TREE_TYPE (@0)) - && TYPE_PRECISION (TREE_TYPE (@0)) - == TYPE_PRECISION (TREE_TYPE (@2)) - && TYPE_PRECISION (TREE_TYPE (@0)) - == TYPE_PRECISION (TREE_TYPE (@3)) + (if ((INTEGRAL_TYPE_P (type) + || (!flag_trapping_math && SCALAR_FLOAT_TYPE_P (type))) + && ((INTEGRAL_TYPE_P (TREE_TYPE (@2)) + && INTEGRAL_TYPE_P (TREE_TYPE (@3))) + || (SCALAR_FLOAT_TYPE_P (TREE_TYPE (@2)) + && types_match (TREE_TYPE (@2), TREE_TYPE (@3)))) + && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (@0))) + && operand_equal_p (TYPE_SIZE (TREE_TYPE (@0)), + TYPE_SIZE (TREE_TYPE (@2))) + && operand_equal_p (TYPE_SIZE (TREE_TYPE (@0)), + TYPE_SIZE (TREE_TYPE (@3))) /* For vect_recog_cond_expr_convert_pattern, @2 and @3 can differ in signess when convert is truncation, but not ok for extension since it's sign_extend vs zero_extend. */ - && (TYPE_PRECISION (TREE_TYPE (@0)) > TYPE_PRECISION (type) + && (known_gt (tree_to_poly_uint64 (TYPE_SIZE (TREE_TYPE (@0))), + tree_to_poly_uint64 (TYPE_SIZE (type))) || (TYPE_UNSIGNED (TREE_TYPE (@2)) == TYPE_UNSIGNED (TREE_TYPE (@3)))) && single_use (@4) && single_use (@5)))) +/* Floating point or integer comparison and integer to floating point + conversion. */ +(match (cond_expr_convert_p @0 @2 @3 @6) + (cond (simple_comparison@6 @0 @1) (float@4 @2) (float@5 @3)) + (if (SCALAR_FLOAT_TYPE_P (type) && !flag_trapping_math + && INTEGRAL_TYPE_P (TREE_TYPE (@2)) + && types_match (TREE_TYPE (@2), TREE_TYPE (@3)) + && !operand_equal_p (TYPE_SIZE (type), TYPE_SIZE (TREE_TYPE (@0))) + && operand_equal_p (TYPE_SIZE (TREE_TYPE (@0)), + TYPE_SIZE (TREE_TYPE (@2))) + && single_use (@4) + && single_use (@5)))) + +/* Floating point or integer comparison and floating point to integer + conversion. */ +(match (cond_expr_convert_p @0 @2 @3 @6) + (cond (simple_comparison@6 @0 @1) (fix_trunc@4 @2) (fix_trunc@5 @3)) + (if (INTEGRAL_TYPE_P (type) && !flag_trapping_math + && SCALAR_FLOAT_TYPE_P (TREE_TYPE (@2)) + && types_match (TREE_TYPE (@2), TREE_TYPE (@3)) + && !operand_equal_p (TYPE_SIZE (type), + TYPE_SIZE (TREE_TYPE (@0))) + && operand_equal_p (TYPE_SIZE (TREE_TYPE (@0)), + TYPE_SIZE (TREE_TYPE (@2))) + && single_use (@4) + && single_use (@5)))) + (for bit_op (bit_and bit_ior bit_xor) (match (bitwise_induction_p @0 @2 @3) (bit_op:c diff --git a/gcc/optabs.cc b/gcc/optabs.cc index 0a14b1e..fe68a25 100644 --- a/gcc/optabs.cc +++ b/gcc/optabs.cc @@ -4304,9 +4304,6 @@ can_compare_p (enum rtx_code code, machine_mode mode, && (icode = optab_handler (cstore_optab, mode)) != CODE_FOR_nothing && insn_operand_matches (icode, 1, test)) return true; - if (purpose == ccp_cmov - && optab_handler (cmov_optab, mode) != CODE_FOR_nothing) - return true; mode = GET_MODE_WIDER_MODE (mode).else_void (); PUT_MODE (test, mode); diff --git a/gcc/optabs.def b/gcc/optabs.def index 23f7923..0c1435d 100644 --- a/gcc/optabs.def +++ b/gcc/optabs.def @@ -294,7 +294,6 @@ OPTAB_D (cond_len_fnms_optab, "cond_len_fnms$a") OPTAB_D (cond_len_neg_optab, "cond_len_neg$a") OPTAB_D (cond_len_one_cmpl_optab, "cond_len_one_cmpl$a") OPTAB_D (vcond_mask_len_optab, "vcond_mask_len_$a") -OPTAB_D (cmov_optab, "cmov$a6") OPTAB_D (cstore_optab, "cstore$a4") OPTAB_D (ctrap_optab, "ctrap$a4") OPTAB_D (addv4_optab, "addv$I$a4") diff --git a/gcc/optabs.h b/gcc/optabs.h index 23fa77b..ae525c8 100644 --- a/gcc/optabs.h +++ b/gcc/optabs.h @@ -244,11 +244,10 @@ extern void emit_unop_insn (enum insn_code, rtx, rtx, enum rtx_code); extern void emit_libcall_block (rtx_insn *, rtx, rtx, rtx); /* The various uses that a comparison can have; used by can_compare_p: - jumps, conditional moves, store flag operations. */ + jumps, store flag operations. */ enum can_compare_purpose { ccp_jump, - ccp_cmov, ccp_store_flag }; diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog index a9ed995..809dc01 100644 --- a/gcc/po/ChangeLog +++ b/gcc/po/ChangeLog @@ -1,3 +1,11 @@ +2025-05-14 Joseph Myers <josmyers@redhat.com> + + * sv.po: Update. + +2025-05-12 Joseph Myers <josmyers@redhat.com> + + * sv.po: Update. + 2025-04-30 Joseph Myers <josmyers@redhat.com> * be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po, diff --git a/gcc/po/sv.po b/gcc/po/sv.po index 3296bed..28318cd 100644 --- a/gcc/po/sv.po +++ b/gcc/po/sv.po @@ -32,7 +32,7 @@ msgstr "" "Project-Id-Version: gcc 15.1.0\n" "Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n" "POT-Creation-Date: 2025-04-23 19:27+0000\n" -"PO-Revision-Date: 2025-04-28 09:09+0200\n" +"PO-Revision-Date: 2025-05-14 22:41+0200\n" "Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" "Language: sv\n" @@ -2732,7 +2732,7 @@ msgstr "Varna för avslutande blanktecken på rader utom i råa stränglitterale #: c-family/c.opt:1523 #, no-c-format msgid "Warn about trailing whitespace on lines except when in raw string literals. Equivalent to Wtrailing-whitespace=blanks when enabled or Wtrailing-whitespace=none when disabled." -msgstr "Varna för avslutande mellanrum på rader utom i råa strängliteraler. Ekvivalent med Wtrailing-whitespace=blanks när det är aktiverat eller Wtrailing-whitespace=none när det är avaktiverat." +msgstr "Varna för avslutande mellanrum på rader utom i råa stränglitteraler. Ekvivalent med Wtrailing-whitespace=blanks när det är aktiverat eller Wtrailing-whitespace=none när det är avaktiverat." #: c-family/c.opt:1527 #, no-c-format @@ -3864,7 +3864,7 @@ msgstr "-finternal-ebcdic\tIntern bearbetning är i EBCDIC kodsida 1140" #: cobol/lang.opt:94 #, no-c-format msgid "Enable/disable static linkage for CALL literals" -msgstr "Aktivera/avaktivera statisk länkning för CALL-literaler" +msgstr "Aktivera/avaktivera statisk länkning för CALL-litteraler" #: cobol/lang.opt:98 #, no-c-format @@ -4719,7 +4719,7 @@ msgstr "Det maximala djupet av exploderade noder som skall förekomma i en dot-d #: analyzer/analyzer.opt:59 #, no-c-format msgid "The number of bytes at which to ellipsize string literals in analyzer text art diagrams." -msgstr "Antalet byte vid vilket strängliteraler i textkonstdiagram från analyseraren skall ha ellips." +msgstr "Antalet byte vid vilket stränglitteraler i textkonstdiagram från analyseraren skall ha ellips." #: analyzer/analyzer.opt:63 #, no-c-format @@ -6677,7 +6677,7 @@ msgstr "Parameter för att styra vilka återskrivningsmöjligheter vi försöker #: config/aarch64/aarch64.opt:437 #, no-c-format msgid "Warn about usage of experimental Function Multi Versioning." -msgstr "Varna för användning av experminetell funktionsmultiversionering." +msgstr "Varna för användning av experimentell funktionsmultiversionering." #: config/linux.opt:24 #, no-c-format @@ -8848,7 +8848,7 @@ msgstr "Gör så att länkarens lättnadsmaskin antar att programräknaren slår #: config/avr/avr.opt:112 #, no-c-format msgid "Optimization. Accumulate outgoing function arguments and acquire/release the needed stack space for outgoing function arguments in function prologue/epilogue. Without this option, outgoing arguments are pushed before calling a function and popped afterwards. This option can lead to reduced code size for functions that call many functions that get their arguments on the stack like, for example printf." -msgstr "Optimering. Samla utgående funktionsargument och ta/släpp det nödvändiga stackutrymmet för utgående funktionsargument i funktionsprologen/-epilogen. Utan denna flagga trycks utgående argument på stacken före anrop av en funktion och plockas efteråt. Denna flagga kan medföra reducerad kodstorlek för funktioner som anropar många funktioner som får sina argument på stacken som, till exempel printf." +msgstr "Optimering. Samla utgående funktionsargument och ta/släpp det nödvändiga stackutrymmet för utgående funktionsargument i funktionsprologen/-epilogen. Utan denna flagga trycks utgående argument på stacken före anrop av en funktion och plockas efteråt. Denna flagga kan medföra reducerad kodstorlek för funktioner som anropar många funktioner som får sina argument på stacken, som till exempel printf." #: config/avr/avr.opt:116 #, no-c-format @@ -8878,7 +8878,7 @@ msgstr "Enheten har sektionen .rodata placerad i RAM-området." #: config/avr/avr.opt:137 #, no-c-format msgid "This option is used internally for multilib generation and selection. The device has no SPH special function register." -msgstr "Denna flagga används internt för multilib-generering och -val. Enheten har inga speiciella SPH-fuktionsregister." +msgstr "Denna flagga används internt för multilib-generering och -val. Enheten har inga speciella SPH-fuktionsregister." #: config/avr/avr.opt:141 #, no-c-format @@ -14856,7 +14856,7 @@ msgstr "Skriv en KÄLLFIL.opt-record.json-fil med detaljer om vilka optimeringar #: common.opt:2469 #, no-c-format msgid "Detect loops calculating CRC and replace with faster implementation. If the target supports CRC instruction and the CRC loop uses the same polynomial as the one used in the CRC instruction, directly replace with the corresponding CRC instruction. Otherwise, if the target supports carry-less-multiplication instruction, generate CRC using it. If neither case applies, generate table-based CRC." -msgstr "Upptäck slingor som beräknar CRC och ersätt dem med en snabbare implementation. Om målet stödjer en CRC-instruktion och CRC-slingan använder samma polynom smo det som används i CRC-instruktionen, ersätt då direkt med motsvarande CRC-instruktion. Annars, om målet stöjder en instruktion för minnesfri multiplikation, generera en CRC som använder det. Om inget av fallen är tillämpligt, generera tabellbaserad CRC." +msgstr "Upptäck slingor som beräknar CRC och ersätt dem med en snabbare implementation. Om målet stödjer en CRC-instruktion och CRC-slingan använder samma polynom smo det som används i CRC-instruktionen, ersätt då direkt med motsvarande CRC-instruktion. Annars, om målet stödjer en instruktion för minnesfri multiplikation, generera en CRC som använder det. Om inget av fallen är tillämpligt, generera tabellbaserad CRC." #: common.opt:2483 #, no-c-format @@ -17528,7 +17528,7 @@ msgstr "Framtvinga användningen av SLP vid vektorisering, misslyckas om det int #: params.opt:1266 #, no-c-format msgid "Maximum number of basic blocks before VRP switches to a fast model with less memory requirements." -msgstr "Maximalt antal grundblock innan VRP byter till en snabb modell med mintre minneskrav." +msgstr "Maximalt antal grundblock innan VRP byter till en snabb modell med mindre minneskrav." #: params.opt:1270 #, no-c-format @@ -17563,7 +17563,7 @@ msgstr "den anropade returnerar en post" #: calls.cc:2565 msgid "target is not able to optimize the call into a sibling call" -msgstr "målet kan inte optinera anropet till ett syskonanrop" +msgstr "målet kan inte optimera anropet till ett syskonanrop" #: calls.cc:2574 msgid "callee returns twice" @@ -49107,7 +49107,7 @@ msgstr "%<detach%>-klausulens händelsehandtag har typen %qT istället för %<om #: cp/parser.cc:42940 #, gcc-internal-format msgid "string literal must not contain %<\\0%>" -msgstr "strängliteraler får inte innehålla %<\\0%>" +msgstr "stränglitteraler får inte innehålla %<\\0%>" #: c/c-parser.cc:20581 c/c-parser.cc:20702 cp/parser.cc:42835 #: cp/parser.cc:42975 @@ -52621,7 +52621,6 @@ msgstr "%s: regcomp: %s" msgid "logic error: missing inode for %s" msgstr "logikfel: saknad inod för %s" -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104709 #: cobol/util.cc:2141 #, gcc-internal-format, gfc-internal-format msgid "failed compiling %s" @@ -75706,10 +75705,9 @@ msgid "Expected associate name at %C" msgstr "Ett associationsnamn förväntade vid %C" #: fortran/match.cc:1940 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Bad continuation line at %C" +#, gcc-internal-format, gfc-internal-format msgid "Bad bounds remapping list at %C" -msgstr "Felaktig fortsättningsrad vid %C" +msgstr "Felaktig litea på gränsavbildningar vid %C" #: fortran/match.cc:1946 #, gcc-internal-format, gfc-internal-format @@ -75747,10 +75745,9 @@ msgid "The associate name %s with an assumed rank target at %L must have a bound msgstr "Det associerade namnet %s med ett mål med antagen ordning vid %L måste ha en lista för omavbildning av gränser (lista av nedtregräns:övregräns för varje dimension)" #: fortran/match.cc:2018 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "The assumed-rank array at %C shall not have a codimension" +#, gcc-internal-format, gfc-internal-format msgid "The assumed rank target at %C must be contiguous" -msgstr "Vektorn med antagen ordning vid %C får inte ha en co-dimension" +msgstr "Målet med antagen ordning vid %C måste vara sammanhängande" #: fortran/match.cc:2037 #, gcc-internal-format @@ -75783,16 +75780,14 @@ msgid "DO CONCURRENT construct at %C" msgstr "DO CONCURRENT-konstruktion vid %C" #: fortran/match.cc:2826 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "selector %qs specified more than once in set %qs" +#, gcc-internal-format, gfc-internal-format msgid "DEFAULT (NONE) specified more than once in DO CONCURRENT at %C" -msgstr "väljaren %qs anges mer än en gång i mängden %qs" +msgstr "DEFAULT (NONE) anges mer än en gång i DO CONCURRENT vid %C" #: fortran/match.cc:2915 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Expected structure component name at %C" +#, gcc-internal-format, gfc-internal-format msgid "Expected reduction operator or function name at %C" -msgstr "Postkomponentnamn förväntades vid %C" +msgstr "En reduktionsoperator eller ett funktionsnamn förväntades vid %C" #: fortran/match.cc:2935 fortran/openmp.cc:2439 fortran/openmp.cc:2475 #: fortran/openmp.cc:2885 fortran/openmp.cc:2910 @@ -75801,28 +75796,24 @@ msgid "Expected %<:%> at %C" msgstr "%<:%> förväntades vid %C" #: fortran/match.cc:2945 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Expected variable name at %C" +#, gcc-internal-format, gfc-internal-format msgid "Expected variable name in reduction list at %C" -msgstr "Variabelnamn förväntades vid %C" +msgstr "Variabelnamn förväntades i reduktionslistan vid %C" #: fortran/match.cc:2964 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Expected association list at %C" +#, gcc-internal-format, gfc-internal-format msgid "Expected ',' or ')' in reduction list at %C" -msgstr "Associationslista förväntades vid %C" +msgstr "”,” eller ”)” förväntades i reduktionslistan vid %C" #: fortran/match.cc:2970 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "PROCEDURE list at %C" +#, gcc-internal-format, gfc-internal-format msgid "REDUCE locality spec at %L" -msgstr "PROCEDURE-lista vid %C" +msgstr "REDUCE-likalitestsspecifikation vid %L" #: fortran/match.cc:2977 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Invalid type-spec at %C" +#, gcc-internal-format, gfc-internal-format msgid "Locality spec at %L" -msgstr "Ogiltig typspecifikation vid %C" +msgstr "Lokalitetsspecifikation vid %L" #: fortran/match.cc:3112 #, gcc-internal-format @@ -76920,16 +76911,14 @@ msgid "Unexpected junk at %C" msgstr "Oväntad skräp vid %C" #: fortran/openmp.cc:464 -#, fuzzy, gcc-internal-format -#| msgid "%<omp_all_memory%> at %C not permitted in this clause" +#, gcc-internal-format msgid "%<omp_all_memory%> at %L not permitted in this clause" -msgstr "%<omp_all_memory%> vid %C är inte tillåtet i denna klausul" +msgstr "%<omp_all_memory%> vid %L är inte tillåtet i denna klausul" #: fortran/openmp.cc:509 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "List item shall not be coindexed at %C" +#, gcc-internal-format, gfc-internal-format msgid "List item shall not be coindexed at %L" -msgstr "Listobjektet skall inte vara co-indexerat vid %C" +msgstr "Listobjektet skall inte vara co-indexerat vid %L" #: fortran/openmp.cc:535 #, gcc-internal-format @@ -76937,10 +76926,9 @@ msgid "%qs at %L is part of the common block %</%s/%> and may only be specificed msgstr "%qs vid %L är del av common-blocket %</%s/%> och kan endast anges implicit via det namngivna common-blocket" #: fortran/openmp.cc:562 -#, fuzzy, gcc-internal-format -#| msgid "COMMON block /%s/ not found at %C" +#, gcc-internal-format msgid "COMMON block %</%s/%> not found at %L" -msgstr "COMMON-block /%s/ finns inte vid %C" +msgstr "COMMON-block %</%s/%> finns inte vid %L" #: fortran/openmp.cc:606 fortran/openmp.cc:696 #, gcc-internal-format, gfc-internal-format @@ -76958,10 +76946,9 @@ msgid "Syntax error in OpenMP detach clause at %C" msgstr "Syntaxfel i OpenMP-frånkopplingsklausul vid %C" #: fortran/openmp.cc:755 -#, fuzzy, gcc-internal-format -#| msgid "%<omp_all_memory%> used with dependence-type other than OUT or INOUT at %C" +#, gcc-internal-format msgid "%<omp_all_memory%> used with dependence-type other than OUT or INOUT at %L" -msgstr "%<omp_all_memory%> använt med en annan beroendetyp än OUT eller INOUT vid %C" +msgstr "%<omp_all_memory%> använt med en annan beroendetyp än OUT eller INOUT vid %L" #: fortran/openmp.cc:808 #, gcc-internal-format, gfc-internal-format @@ -76969,10 +76956,9 @@ msgid "Syntax error in OpenMP SINK dependence-type list at %C" msgstr "Syntaxfel i OpenMP DEPEND SINK beroendetyplista vid %C" #: fortran/openmp.cc:871 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Syntax error in OpenACC expression list at %C" +#, gcc-internal-format, gfc-internal-format msgid "Syntax error in OpenMP expression list at %C" -msgstr "Syntaxfel i OpenACC-uttryckslista vid %C" +msgstr "Syntaxfel i OpenMP-uttryckslista vid %C" #: fortran/openmp.cc:873 #, gcc-internal-format, gfc-internal-format @@ -77040,8 +77026,7 @@ msgid "Invalid combined or composite directive at %L" msgstr "Ogiltigt kombinerat eller sammansatt direktiv vid %L" #: fortran/openmp.cc:1644 -#, fuzzy, gcc-internal-format -#| msgid "Invalid %qs directive at %L in %s clause: declarative, informational and meta directives not permitted" +#, gcc-internal-format msgid "Invalid %qs directive at %L in %s clause: declarative, informational, and meta directives not permitted" msgstr "Felaktigt %qs-direktiv vid %L i %s-klausul: direktiven declarative, informational och meta är inte tillåtna" @@ -77073,52 +77058,44 @@ msgid "Unexpected %<(%> at %C" msgstr "Oväntat %<(%> vid %C" #: fortran/openmp.cc:1909 -#, fuzzy, gcc-internal-format -#| msgid "expected %<{%> at %C" +#, gcc-internal-format msgid "Expected %<{%> at %C" msgstr "%<{%> förväntades vid %C" #: fortran/openmp.cc:1919 -#, fuzzy, gcc-internal-format -#| msgid "expected trait selector name at %C" +#, gcc-internal-format msgid "Duplicated %<fr%> preference-selector-name at %C" -msgstr "trait-väljarnamn förväntades vid %C" +msgstr "Dubblerad %<fr%>-preferensväljarnamn vid %C" #: fortran/openmp.cc:1944 fortran/openmp.cc:2082 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "expected constant integer expression with valid sync-hint value" +#, gcc-internal-format, gfc-internal-format msgid "Expected constant scalar integer expression or non-empty default-kind character literal at %L" -msgstr "konstant heltalsuttryck med giltigt sync-hint-värde förväntades" +msgstr "Ett konstant skalärt heltalsuttryck eller en icke-tom standardsorts teckenliteral vid %L" #: fortran/openmp.cc:1958 fortran/openmp.cc:2095 -#, fuzzy, gcc-internal-format -#| msgid "Unknown procedure name %qs at %C" +#, gcc-internal-format msgid "Unknown foreign runtime identifier %qd at %L" -msgstr "Okänt procedurnamn %qs vid %C" +msgstr "Okänd främmande körtidsidentifierare %qd vid %L" #: fortran/openmp.cc:1972 fortran/openmp.cc:2107 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Unexpected character in variable list at %C" +#, gcc-internal-format, gfc-internal-format msgid "Unexpected null character in character literal at %L" -msgstr "Oväntat tecken i variabellista vid %C" +msgstr "Oväntat null-tecken i teckenliteralen vid %L" #: fortran/openmp.cc:1979 fortran/openmp.cc:2114 -#, fuzzy, gcc-internal-format -#| msgid "Unknown procedure name %qs at %C" +#, gcc-internal-format msgid "Unknown foreign runtime identifier %qs at %L" -msgstr "Okänt procedurnamn %qs vid %C" +msgstr "Okänd främmande körtidsidentifierare %qs vid %L" #: fortran/openmp.cc:1986 fortran/openmp.cc:7079 -#, fuzzy, gcc-internal-format -#| msgid "expected %<)%> at %C" +#, gcc-internal-format msgid "Expected %<)%> at %C" msgstr "%<)%> förväntades vid %C" #: fortran/openmp.cc:2002 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "expected identifier or string literal at %C" +#, gcc-internal-format, gfc-internal-format msgid "Expected default-kind character literal at %L" -msgstr "identifierare eller strängkonstant förväntades vid %C" +msgstr "En standardsorts teckenliteral förväntades vid %L" #: fortran/openmp.cc:2013 #, gcc-internal-format @@ -77126,64 +77103,54 @@ msgid "Character literal at %L must start with %<ompx_%>" msgstr "Teckenliteralen vid %L måste börja med %<ompx_%>" #: fortran/openmp.cc:2021 -#, fuzzy, gcc-internal-format -#| msgid "Unexpected character in variable list at %C" +#, gcc-internal-format msgid "Unexpected null or %<,%> character in character literal at %L" -msgstr "Oväntat tecken i variabellista vid %C" +msgstr "Oväntat null eller %<,%>-tecken i teckenliteralen vid %L" #: fortran/openmp.cc:2038 -#, fuzzy, gcc-internal-format -#| msgid "Expected %<)%> or %<,%> at %C" +#, gcc-internal-format msgid "Expected %<fr(%> or %<attr(%> at %C" -msgstr "%<)%> eller %<,%> förväntades vid %C" +msgstr "%<fr(%> eller %<attr(%> förväntades vid %C" #: fortran/openmp.cc:2045 -#, fuzzy, gcc-internal-format -#| msgid "Expected %<,%> or %<)%> at %C" +#, gcc-internal-format msgid "Expected %<,%> or %<}%> at %C" -msgstr "%<,%> eller %<)%> förväntades vid %C" +msgstr "%<,%> eller %<}%> förväntades vid %C" #: fortran/openmp.cc:2161 -#, fuzzy, gcc-internal-format -#| msgid "Duplicate access-specifier at %C" +#, gcc-internal-format msgid "Duplicate %<prefer_type%> modifier at %C" -msgstr "Dubblerad åtkomstspecifikation vid %C" +msgstr "Dubblerad modifierare %<prefer_type%> vid %C" #: fortran/openmp.cc:2173 fortran/openmp.cc:2209 fortran/openmp.cc:2231 -#, fuzzy, gcc-internal-format -#| msgid "Expected %<,%> or %<)%> at %C" +#, gcc-internal-format msgid "Expected %<,%> or %<:%> at %C" -msgstr "%<,%> eller %<)%> förväntades vid %C" +msgstr "%<,%> eller %<:%> förväntades vid %C" #: fortran/openmp.cc:2186 -#, fuzzy, gcc-internal-format -#| msgid "Expected %<(%> after %qs at %C" +#, gcc-internal-format msgid "Expected %<(%> after %<prefer_type%> at %C" -msgstr "%<(%> förväntades efter %qs vid %C" +msgstr "%<(%> förväntades efter %<prefer_type%> vid %C" #: fortran/openmp.cc:2194 -#, fuzzy, gcc-internal-format -#| msgid "expected %<match%> at %C" +#, gcc-internal-format msgid "Duplicate %<targetsync%> at %C" -msgstr "%<match%> förväntades vid %C" +msgstr "Dubblerat %<targetsync%> vid %C" #: fortran/openmp.cc:2216 -#, fuzzy, gcc-internal-format -#| msgid "Duplicate %s attribute at %L" +#, gcc-internal-format msgid "Duplicate %<target%> at %C" -msgstr "Dubblerat %s-attribut vid %L" +msgstr "Dubblerat %<target%> vid %C" #: fortran/openmp.cc:2234 -#, fuzzy, gcc-internal-format -#| msgid "Expected %<)%> or %<,%> at %C" +#, gcc-internal-format msgid "Expected %<prefer_type%>, %<target%>, or %<targetsync%> at %C" -msgstr "%<)%> eller %<,%> förväntades vid %C" +msgstr "%<prefer_type%> %<target%> eller %<targetsync%> förväntades vid %C" #: fortran/openmp.cc:2242 -#, fuzzy, gcc-internal-format -#| msgid "Expected %<)%> or %<,%> at %C" +#, gcc-internal-format msgid "Missing required %<target%> and/or %<targetsync%> modifier at %C" -msgstr "%<)%> eller %<,%> förväntades vid %C" +msgstr "Nödvändig modifierare %<target%> och/eller %<targetsync%> saknas vid %C" #: fortran/openmp.cc:2295 #, gcc-internal-format @@ -77361,10 +77328,9 @@ msgid "ORDERED clause argument not constant positive integer at %C" msgstr "ORDERED-klausulargument är inte ett konstant positivt heltal vid %C" #: fortran/openmp.cc:3912 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "ORDERED clause argument not constant positive integer at %C" +#, gcc-internal-format, gfc-internal-format msgid "PARTIAL clause argument not constant positive integer at %C" -msgstr "ORDERED-klausulargument är inte ett konstant positivt heltal vid %C" +msgstr "Klausulargumentet PARTIAL är inte ett konstant positivt heltal vid %C" #: fortran/openmp.cc:4194 #, gcc-internal-format, gfc-internal-format @@ -77715,28 +77681,24 @@ msgid "expected expression at %C" msgstr "uttryck förväntades vid %C" #: fortran/openmp.cc:6477 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "property must be a constant logical expression at %C" +#, gcc-internal-format, gfc-internal-format msgid "property must be a logical expression at %L" -msgstr "egenskapen måste vara ett konstant logiskt uttryck vid %C" +msgstr "egenskapen måste vara ett logiskt uttryck vid %L" #: fortran/openmp.cc:6481 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "property must be a constant integer expression at %C" +#, gcc-internal-format, gfc-internal-format msgid "property must be an integer expression at %L" -msgstr "egenskapen måste vara ett konstant heltalsuttryck vid %C" +msgstr "egenskapen måste vara ett heltalsuttryck vid %L" #: fortran/openmp.cc:6488 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "property must be a constant logical expression at %C" +#, gcc-internal-format, gfc-internal-format msgid "property must be a constant logical expression at %L" -msgstr "egenskapen måste vara ett konstant logiskt uttryck vid %C" +msgstr "egenskapen måste vara ett konstant logiskt uttryck vid %L" #: fortran/openmp.cc:6492 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "property must be a constant integer expression at %C" +#, gcc-internal-format, gfc-internal-format msgid "property must be a constant integer expression at %L" -msgstr "egenskapen måste vara ett konstant heltalsuttryck vid %C" +msgstr "egenskapen måste vara ett konstant heltalsuttryck vid %L" #: fortran/openmp.cc:6506 #, gcc-internal-format, gfc-internal-format @@ -77784,46 +77746,39 @@ msgid "%qs clause at %L specified more than once" msgstr "Klausulen %qs vid %L angiven mer än en gång" #: fortran/openmp.cc:6776 -#, fuzzy, gcc-internal-format -#| msgid "expected %<ancestor%> or %<device_num%>" +#, gcc-internal-format msgid "expected %<nothing%>, %<need_device_ptr%> or %<need_device_addr%> at %C" -msgstr "%<ancestor%> eller %<device_num%> förväntades" +msgstr "%<nothing%>, %<need_device_ptr%> eller %<need_device_addr%> förväntades vid %C" #: fortran/openmp.cc:6782 fortran/openmp.cc:6900 fortran/openmp.cc:7055 -#, fuzzy, gcc-internal-format -#| msgid "Expected %<:%> at %C" +#, gcc-internal-format msgid "expected %<:%> at %C" msgstr "%<:%> förväntades vid %C" #: fortran/openmp.cc:6815 -#, fuzzy, gcc-internal-format -#| msgid "Expected %<:%> at %C" +#, gcc-internal-format msgid "unexpected %<:%> at %C" -msgstr "%<:%> förväntades vid %C" +msgstr "Oväntat %<:%> vid %C" #: fortran/openmp.cc:6862 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Expected integer expression at %C" +#, gcc-internal-format, gfc-internal-format msgid "expected constant integer expression at %C" -msgstr "Heltalsuttryck förväntades vid %C" +msgstr "ett konstant heltalsuttryck förväntades vid %C" #: fortran/openmp.cc:6884 -#, fuzzy, gcc-internal-format -#| msgid "ORDERED clause argument not constant positive integer at %C" +#, gcc-internal-format msgid "expected dummy parameter name, %<omp_num_args%> or constant positive integer at %C" -msgstr "ORDERED-klausulargument är inte ett konstant positivt heltal vid %C" +msgstr "ett attrapparameternamn, %<omp_num_args%> eller konstant positivt heltal förväntades vid %C" #: fortran/openmp.cc:6931 -#, fuzzy, gcc-internal-format -#| msgid "expected %<)%> at %C" +#, gcc-internal-format msgid "expected %<interop%> at %C" -msgstr "%<)%> förväntades vid %C" +msgstr "%<interop%> förväntades vid %C" #: fortran/openmp.cc:6981 -#, fuzzy, gcc-internal-format -#| msgid "expected %<at%>, %<severity%> or %<message%> clause" +#, gcc-internal-format msgid "expected %<match%>, %<adjust_args%> or %<append_args%> at %C" -msgstr "%<at%>-, %<severity%>- eller %<message%>-klausul förväntades" +msgstr "%<match%>-, %<adust_args%> eller %<append_args%> förväntades vid %C" #: fortran/openmp.cc:6987 #, gcc-internal-format @@ -77831,10 +77786,9 @@ msgid "the %qs clause at %L can only be specified if the %<dispatch%> selector o msgstr "klausulen %s vid %L kan endast anges om väljaren %<dispatch%> i konstruktionsväljarmängden förekommer i klausulen %<match%>" #: fortran/openmp.cc:7027 -#, fuzzy, gcc-internal-format -#| msgid "expected %<host%>, %<nohost%> or %<any%>" +#, gcc-internal-format msgid "expected %<when%>, %<otherwise%>, or %<default%> at %C" -msgstr "%<host%>, %<nohost%> eller %<any%> förväntades" +msgstr "%<when%>, %<otherwise%> eller %<default%> förväntades vid %C" #: fortran/openmp.cc:7034 #, gcc-internal-format @@ -77847,10 +77801,9 @@ msgid "%<otherwise%> or %<default%> clause must appear last in %<metadirective%> msgstr "en klausul %<otherwise%> eller %<default%> måste ligga sist i %<metadirective%> vid %C" #: fortran/openmp.cc:7069 -#, fuzzy, gcc-internal-format -#| msgid "destructor priorities are not supported" +#, gcc-internal-format msgid "declarative directive variants are not supported" -msgstr "destruerarprioriteter stödjs ej" +msgstr "deklarativa direktivvarianter stödjs ej" #: fortran/openmp.cc:7090 #, gcc-internal-format, gfc-internal-format @@ -77858,10 +77811,9 @@ msgid "variant directive used in OMP BEGIN METADIRECTIVE at %C must have a corre msgstr "variantdirektivet som används i OMP BEGIN METADIRECTIVE vid %C måste ha ett mostsvarande slutdirektiv" #: fortran/openmp.cc:7124 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Unexpected junk after OMP THREADPRIVATE at %C" +#, gcc-internal-format, gfc-internal-format msgid "Unexpected junk after OMP METADIRECTIVE at %C" -msgstr "Oväntat skräp efter OMP THREADPRIVATE vid %C" +msgstr "Oväntat skräp efter OMP METADIRECTIVE vid %C" #: fortran/openmp.cc:7183 #, gcc-internal-format, gfc-internal-format @@ -77879,10 +77831,9 @@ msgid "Syntax error in !$OMP THREADPRIVATE list at %C" msgstr "Syntaxfel i !$OMP THREADPRIVATE-lista vid %C" #: fortran/openmp.cc:7326 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Program unit at %L has OpenMP device constructs/routines but does not set !$OMP REQUIRES REVERSE_OFFLOAD but other program units do" +#, gcc-internal-format, gfc-internal-format msgid "Program unit at %L has OpenMP device constructs/routines but does not set !$OMP REQUIRES %s but other program units do" -msgstr "Programenheten vid %L har OpenMP device-konstruktioner/-rutiner men sätter inte !$OMP REQUIRES REVERSE_OFFLOAD men andra programenheter gör det" +msgstr "Programenheten vid %L har OpenMP device-konstruktioner/-rutiner men sätter inte !$OMP REQUIRES %s men andra programenheter gör det" #: fortran/openmp.cc:7369 #, gcc-internal-format @@ -77930,10 +77881,9 @@ msgid "Clause expected at %C" msgstr "Klausul förväntades vid %C" #: fortran/openmp.cc:7557 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Expected UNIFIED_ADDRESS, UNIFIED_SHARED_MEMORY, DYNAMIC_ALLOCATORS, REVERSE_OFFLOAD, or ATOMIC_DEFAULT_MEM_ORDER clause at %L" +#, gcc-internal-format, gfc-internal-format msgid "Expected UNIFIED_ADDRESS, UNIFIED_SHARED_MEMORY, SELF_MAPS, DYNAMIC_ALLOCATORS, REVERSE_OFFLOAD, or ATOMIC_DEFAULT_MEM_ORDER clause at %L" -msgstr "UNIFIED_ADDRESS-, UNIFIED_SHARED_MEMORY-, DYNAMIC_ALLOCATORS-, REVERSE_OFFLOAD- eller ATOMIC_DEFAULT_MEM_ORDER-klausul förväntades vid %L" +msgstr "UNIFIED_ADDRESS-, UNIFIED_SHARED_MEMORY-, SELF_MAPS-, DYNAMIC_ALLOCATORS-, REVERSE_OFFLOAD- eller ATOMIC_DEFAULT_MEM_ORDER-klausul förväntades vid %L" #: fortran/openmp.cc:7583 #, gcc-internal-format, gfc-internal-format @@ -78190,10 +78140,8 @@ msgstr "HOLDS-uttryck vid %L måste vara ett skalärt logiskt uttryck" msgid "ORDERED clause parameter is less than COLLAPSE at %L" msgstr "ORDERED-klausulparameter är mindre än COLLAPSE vid %L" -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107122 #: fortran/openmp.cc:8623 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "ORDER clause must not be used together ORDERED at %L" +#, gcc-internal-format, gfc-internal-format msgid "ORDER clause must not be used together with ORDERED at %L" msgstr "en ORDER-klausul får inte användas tillsammans med ORDERED vid %L" @@ -78224,16 +78172,14 @@ msgid "FINAL clause at %L requires a scalar LOGICAL expression" msgstr "FINAL-klausul vid %L kräver ett skalärt LOGICAL-uttryck" #: fortran/openmp.cc:8798 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "IF clause at %L requires a scalar LOGICAL expression" +#, gcc-internal-format, gfc-internal-format msgid "NOVARIANTS clause at %L requires a scalar LOGICAL expression" -msgstr "IF-klausul vid %L kräver ett skalärt LOGICAL-uttryck" +msgstr "NOVARIANTS-klausul vid %L kräver ett skalärt LOGICAL-uttryck" #: fortran/openmp.cc:8808 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "SELF clause at %L requires a scalar LOGICAL expression" +#, gcc-internal-format, gfc-internal-format msgid "NOCONTEXT clause at %L requires a scalar LOGICAL expression" -msgstr "SELF-klausulen vid %L kräver ett skalärt LOGICAL-uttryck" +msgstr "NOCONTEXT-klausulen vid %L kräver ett skalärt LOGICAL-uttryck" #: fortran/openmp.cc:8819 #, gcc-internal-format, gfc-internal-format @@ -78319,16 +78265,14 @@ msgid "DEPEND clause at %L requires %<targetsync%> interop-type, lacking it for msgstr "Klausulen DEPEND vid %L behöver interop-typen %<targetsync%>, den saknas för %qs vid %L" #: fortran/openmp.cc:9044 -#, fuzzy, gcc-internal-format -#| msgid "Allocator %qs at %L in USES_ALLOCATORS must be a scalar integer of kind %<omp_allocator_handle_kind%>" +#, gcc-internal-format msgid "%qs at %L in %qs clause must be a scalar integer variable of %<omp_interop_kind%> kind" -msgstr "Allokeraren %qs vid %L i USES_ALLOCATORS måste vara ett skalärt heltal av ssorten %<omp_allocator_handle_kind%>" +msgstr "%qs vid %L i klausulen %qs måste vara en skalär heltalsvariabel av sorten %<omp_interop_kind%>" #: fortran/openmp.cc:9049 -#, fuzzy, gcc-internal-format -#| msgid "%qs and %qs cannot both be enabled" +#, gcc-internal-format msgid "%qs at %L in %qs clause must be definable" -msgstr "%qs och %qs kan inte båda aktiveras" +msgstr "%qs vid %L i klausulen %qs måste vara definierbar" #: fortran/openmp.cc:9088 #, gcc-internal-format @@ -78560,7 +78504,7 @@ msgstr "Memspace %qs vid %L i USES_ALLOCATORS måste vara ett fördefinierat min #: fortran/openmp.cc:9878 #, gcc-internal-format msgid "Allocator %qs at %L in USES_ALLOCATORS must be a scalar integer of kind %<omp_allocator_handle_kind%>" -msgstr "Allokeraren %qs vid %L i USES_ALLOCATORS måste vara ett skalärt heltal av ssorten %<omp_allocator_handle_kind%>" +msgstr "Allokeraren %qs vid %L i USES_ALLOCATORS måste vara ett skalärt heltal av sorten %<omp_allocator_handle_kind%>" #: fortran/openmp.cc:9886 #, gcc-internal-format @@ -78614,16 +78558,14 @@ msgid "DETACH event handle %qs in %s clause at %L" msgstr "DETACH-händelsehandtag %qs i %s-klausul vid %L" #: fortran/openmp.cc:10016 -#, fuzzy, gcc-internal-format -#| msgid "List item %qs with allocatable components is not permitted in map clause at %L" +#, gcc-internal-format msgid "Sorry, list item %qs at %L with allocatable components is not yet supported in %s clause" -msgstr "Listposten %qs med allokerbara komponenter är inte tillåtet i map-klausulen vid %L" +msgstr "Ledsen, listposten %qs vid %L med allokerbara komponenter stödjs inte ännu i klausulen %s" #: fortran/openmp.cc:10022 -#, fuzzy, gcc-internal-format -#| msgid "comparison with string literal results in unspecified behavior" +#, gcc-internal-format msgid "Polymorphic list item %qs at %L in %s clause has unspecified behavior and unsupported" -msgstr "jämförelse med stränglitteral resulterar i odefinierat beteende" +msgstr "Det polymorfa listelementet %qs vid %L i klausulen %s har i odefinierat beteende och stödjs ej" #: fortran/openmp.cc:10054 #, gcc-internal-format, gfc-internal-format @@ -78686,22 +78628,19 @@ msgid "DIST_SCHEDULE clause's chunk_size at %L requires a scalar INTEGER express msgstr "DIST_SCHEDULE-klausulens chunk_size vid %L kräver ett skalärt INTEGER-uttryck" #: fortran/openmp.cc:10349 -#, fuzzy, gcc-internal-format -#| msgid "%<DETACH%> clause at %L must not be used together with %<MERGEABLE%> clause" +#, gcc-internal-format msgid "%<GRAINSIZE%> clause at %L must not be used together with %<NUM_TASKS%> clause" -msgstr "en %<DETACH%>-klausul vid %L får inte användas tillsammans med en %<MERGEABLE%>-klausul" +msgstr "en %<GRAINSIZE%>-klausul vid %L får inte användas tillsammans med en %<NUM_TASKS%>-klausul" #: fortran/openmp.cc:10352 -#, fuzzy, gcc-internal-format -#| msgid "%<DETACH%> clause at %L must not be used together with %<MERGEABLE%> clause" +#, gcc-internal-format msgid "%<REDUCTION%> clause at %L must not be used together with %<NOGROUP%> clause" -msgstr "en %<DETACH%>-klausul vid %L får inte användas tillsammans med en %<MERGEABLE%>-klausul" +msgstr "en %<REDUCTION%>-klausul vid %L får inte användas tillsammans med en %<NOGROUP%>-klausul" #: fortran/openmp.cc:10356 -#, fuzzy, gcc-internal-format -#| msgid "%<DETACH%> clause at %L must not be used together with %<MERGEABLE%> clause" +#, gcc-internal-format msgid "%<FULL%> clause at %C must not be used together with %<PARTIAL%> clause" -msgstr "en %<DETACH%>-klausul vid %L får inte användas tillsammans med en %<MERGEABLE%>-klausul" +msgstr "en %<FULL%>-klausul vid %C får inte användas tillsammans med en %<PARTIAL%>-klausul" #: fortran/openmp.cc:10379 #, gcc-internal-format, gfc-internal-format @@ -78719,10 +78658,9 @@ msgid "%s must contain at least one MAP clause at %L" msgstr "%s måste innehålla åtminstone en MAP-klausul vid %L" #: fortran/openmp.cc:10416 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "TILE requires constant expression at %L" +#, gcc-internal-format, gfc-internal-format msgid "SIZES requires constant expression at %L" -msgstr "TILE behöver ett konstant uttryck vid %L" +msgstr "SIZES behöver ett konstant uttryck vid %L" #: fortran/openmp.cc:10432 #, gcc-internal-format @@ -78825,8 +78763,7 @@ msgid "expr in !$OMP ATOMIC COMPARE assignment var = expr must be scalar and can msgstr "uttr i !$OMP ATOMIC COMPARE-tilldelning var = uttr måste vara skalär och får inte referera var vid %L" #: fortran/openmp.cc:10858 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "!$OMP ATOMIC UPDATE at %L with FAIL clause requiries either the COMPARE clause or using the intrinsic MIN/MAX procedure" +#, gcc-internal-format, gfc-internal-format msgid "!$OMP ATOMIC UPDATE at %L with FAIL clause requires either the COMPARE clause or using the intrinsic MIN/MAX procedure" msgstr "!$OMP ATOMIC UPDATE vid %L med en FAIL-klausul behöver antingen klausulen COMPARE eller användning av den inbyggda proceduren MIN/MAX" @@ -78916,10 +78853,9 @@ msgid "%s cannot contain OpenMP API call in intervening code at %L" msgstr "%s kan inte innehålla OpenMP-API-anrop i mellanliggande kod vid %L" #: fortran/openmp.cc:12052 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "LINEAR clause modifier used on DO or SIMD construct at %L" +#, gcc-internal-format, gfc-internal-format msgid "SIZES clause is required on !$OMP TILE construct at %L" -msgstr "LINEAR-klausulmodifierare använd på DO- eller SIMD-konstruktion vid %L" +msgstr "en klausul SIZES krävs på konstruktionen !$OMP TILE vid %L" #: fortran/openmp.cc:12079 #, gcc-internal-format, gfc-internal-format @@ -79038,10 +78974,9 @@ msgid "%s inner loops must be perfectly nested with REDUCTION INSCAN clause at % msgstr "%s intre slingor måste vara perfekt nästade med en REDUCTION INSCAN-klausul vid %L" #: fortran/openmp.cc:12284 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "%s inner loops must be perfectly nested with ORDERED clause at %L" +#, gcc-internal-format, gfc-internal-format msgid "%s inner loops must be perfectly nested at %L" -msgstr "%s inre slingor måste vara perfekt nästade med klausulen ORDERED vid %L" +msgstr "%s inre slingor måste vara perfekt nästade vid %L" #: fortran/openmp.cc:12538 fortran/openmp.cc:12551 #, gcc-internal-format, gfc-internal-format @@ -79144,10 +79079,9 @@ msgid "!$OMP DECLARE SIMD should refer to containing procedure %qs at %L" msgstr "!$OMP DECLARE SIMD skall referera till den inneslutande proceduren %qs vid %L" #: fortran/openmp.cc:13115 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "expected constant logical expression" +#, gcc-internal-format, gfc-internal-format msgid "Expected constant non-negative scalar integer offset expression at %L" -msgstr "ett konstant logiskt uttryck förväntades" +msgstr "Ett konstant icke-negativt skalärt heltalsavståndsuttryck förväntades vid %L" #: fortran/openmp.cc:13118 #, gcc-internal-format @@ -79155,10 +79089,9 @@ msgid "For range-based %<adjust_args%>, a constant positive scalar integer expre msgstr "För intervallbaserat %<adjust_args%> krävs ett konstant positivt skalärt heltalsuttryck vid %L" #: fortran/openmp.cc:13132 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Unexpected character in variable list at %C" +#, gcc-internal-format, gfc-internal-format msgid "Expected dummy parameter name or a positive integer at %L" -msgstr "Oväntat tecken i variabellista vid %C" +msgstr "Ett attrapparameternamn eller ettt positivt heltal förväntades vid %L" #: fortran/openmp.cc:13158 #, gcc-internal-format, gfc-internal-format @@ -79301,10 +79234,9 @@ msgid "The value of n in %<-finit-character=n%> must be between 0 and 127" msgstr "Värdet på n i %<-finit-character=n%> måste vara mellan 0 och 127" #: fortran/options.cc:889 -#, fuzzy, gcc-internal-format -#| msgid "command-line option %qs is valid for %s but not for %s" +#, gcc-internal-format msgid "command-line option %<-fno-builtin-%s%> is not valid for Fortran" -msgstr "kommandoradsflaggan %qs är giltig för %s men inte för %s" +msgstr "kommandoradsflaggan %<-fno-builtin-%s%> är inte giltig för Fortran" #: fortran/parse.cc:665 #, gcc-internal-format, gfc-internal-format @@ -79740,10 +79672,9 @@ msgstr "Namngivet DO-block vid %L kräver matchande ENDDO-namn" #. "begin metadirective" construct, or perhaps the #. "end metadirective" is missing entirely. #: fortran/parse.cc:5817 fortran/parse.cc:6314 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Unexpected junk after OMP THREADPRIVATE at %C" +#, gcc-internal-format, gfc-internal-format msgid "Expected OMP END METADIRECTIVE at %C" -msgstr "Oväntat skräp efter OMP THREADPRIVATE vid %C" +msgstr "OMP END METADIRECTIVE förväntades vid %C" #: fortran/parse.cc:5827 fortran/parse.cc:6330 fortran/parse.cc:6348 #, gcc-internal-format, gfc-internal-format @@ -79796,16 +79727,14 @@ msgid "%<OMP DISPATCH%> directive must be followed by a procedure call with opti msgstr "Direktivet %<OMP DISPATCH%> måste följas av ett proceduranrop med en möjlig tilldelning vid %C" #: fortran/parse.cc:6416 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Duplicated NOWAIT clause on %s and %s at %C" +#, gcc-internal-format, gfc-internal-format msgid "Duplicated NOWAIT clause on !$OMP DISPATCH and !$OMP END DISPATCH at %C" -msgstr "Dubblerad NOWAIT-klausul på %s och %s vid %C" +msgstr "Dubblerad NOWAIT-klausul på !$OMP DISPATCH och !$OMP END DISPATCH vid %C" #: fortran/parse.cc:6488 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Unexpected %s statement in WHERE block at %C" +#, gcc-internal-format, gfc-internal-format msgid "Unexpected %s statement in OMP METADIRECTIVE block at %C" -msgstr "Oväntad %s-sats i WHERE-block vid %C" +msgstr "Oväntad %s-sats i blocket OMP METADIRECTIVE vid %C" #: fortran/parse.cc:6529 #, gcc-internal-format, gfc-internal-format @@ -79931,10 +79860,9 @@ msgid "Integer too big for its kind at %C. This check can be disabled with the o msgstr "Heltal för stort för sin sort vid %C. Denna kontroll kan avaktiveras med flaggan %<-fno-range-check%>" #: fortran/primary.cc:388 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Integer kind %d at %C not available" +#, gcc-internal-format, gfc-internal-format msgid "Unsigned kind %d at %C not available" -msgstr "Heltalssort %d vid %C inte tillgänglig" +msgstr "Teckenlös sort %d vid %C inte tillgänglig" #: fortran/primary.cc:419 #, gcc-internal-format, gfc-internal-format @@ -80210,10 +80138,9 @@ msgid "Procedure pointer component %qs requires an argument list at %C" msgstr "Procedurpekarkomponent %qs kräver en argumentlista vid %C" #: fortran/primary.cc:2833 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Expected array subscript stride at %C" +#, gcc-internal-format, gfc-internal-format msgid "Unexpected array/substring ref at %C" -msgstr "Förväntade intervall av vektorindex vid %C" +msgstr "Oväntad vektor-/delsträngs-ref vid %C" #: fortran/primary.cc:2855 #, gcc-internal-format, gfc-internal-format @@ -80707,10 +80634,9 @@ msgid "The element in the structure constructor at %L, for pointer component %qs msgstr "Elementet i postkonstrueraren vid %L, för pekarkomponent %qs, borde vara en POINTER eller en TARGET" #: fortran/resolve.cc:1589 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Pointer assignment with vector subscript on rhs at %L" +#, gcc-internal-format, gfc-internal-format msgid "Pointer assignment target at %L has a vector subscript" -msgstr "Pekartilldelning med vektorindexering på högersidan vid %L" +msgstr "Pekartilldelningsmålet vid %L har en vektorindexering" #: fortran/resolve.cc:1601 #, gcc-internal-format @@ -80753,8 +80679,7 @@ msgid "The intrinsic %qs declared INTRINSIC at %L is not available in the curren msgstr "Den inbyggda %qs deklarerad INTRINSIC vid %L är inte tillgänglig i den aktuella standardinställningen utan i %s. Använd en lämplig flagga %<-std=*%> eller aktivera %<-fall-intrinsics%> för att använda den." #: fortran/resolve.cc:1989 -#, fuzzy, gcc-internal-format -#| msgid "Non-RECURSIVE procedure %qs from module %qs is possibly calling itself recursively in procedure %qs. Declare it RECURSIVE or use %<-frecursive%>" +#, gcc-internal-format msgid "Non-RECURSIVE procedure %qs from module %qs is possibly calling itself recursively in procedure %qs. Declare it RECURSIVE or use %<-frecursive%>" msgstr "Icke RECURSIVE procedur %qs från modulen %qs anropar kanske sig själv rekursivt i proceduren %qs. Deklarera den RECURSIVE eller använd %<-frecursive%>" @@ -80889,10 +80814,9 @@ msgid "Function %qs at %L has no IMPLICIT type" msgstr "Funktionen %qs vid %L har ingen IMPLICIT-typ" #: fortran/resolve.cc:3283 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Reference to impure function %qs at %L inside a DO CONCURRENT %s" +#, gcc-internal-format, gfc-internal-format msgid "Reference to impure function at %L inside a DO CONCURRENT" -msgstr "Referens till den orena funktionen %qs vid %L är inuti ett DO CONCURRENT-%s" +msgstr "Referens till en oren funktion vid %L inuti ett DO CONCURRENT" #: fortran/resolve.cc:3294 #, gcc-internal-format @@ -80936,10 +80860,9 @@ msgid "Function %qs is declared CHARACTER(*) and cannot be used at %L since it i msgstr "Funktionen %qs är deklarerad CHARACTER(*) och får inte användas vid %L eftersom det inte är ett attrappargument" #: fortran/resolve.cc:3470 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Missing argument list in function %qs at %C" +#, gcc-internal-format, gfc-internal-format msgid "Different argument lists in external dummy function %s at %L and %L" -msgstr "Argumentlista saknas i funktionen %qs vid %C" +msgstr "Olika argumentlistor i den externa atrappfunktionen %s vid %L och %L" #: fortran/resolve.cc:3509 #, gcc-internal-format @@ -80972,10 +80895,9 @@ msgid "Using function %qs at %L is deprecated" msgstr "Att använda funktionen %qs vid %L bör undvikas" #: fortran/resolve.cc:3701 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Subroutine call to %qs in DO CONCURRENT block at %L is not PURE" +#, gcc-internal-format, gfc-internal-format msgid "Subroutine call at %L in a DO CONCURRENT block is not PURE" -msgstr "Subrutinanrop till %qs i DO CONCURRENT-block vid %L är inte PURE" +msgstr "Subrutinanrop vid %L i ett block DO CONCURRENT är inte PURE" #: fortran/resolve.cc:3710 #, gcc-internal-format @@ -81068,10 +80990,9 @@ msgid "BOZ literal constant at %L cannot be an operand of unary operator %qs" msgstr "BOZ-litteralkonstanten vid %L får inte vara en operand till den unära operatorn %qs" #: fortran/resolve.cc:4368 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "comparison of unsigned expression in %<>= 0%> is always true" +#, gcc-internal-format, gfc-internal-format msgid "Negation of unsigned expression at %L not permitted " -msgstr "jämförelse med unsigned-uttryck %<>= 0%> är alltid sant" +msgstr "Negation av ett teckenlöst uttryck vid %L är inte tillåtet " #: fortran/resolve.cc:4389 #, gcc-internal-format @@ -81079,52 +81000,44 @@ msgid "Operands at %L and %L cannot appear as operands of binary operator %qs" msgstr "Operander vid %L och %L kan inte förekomma som operander av den binära operatorn %qs" #: fortran/resolve.cc:4399 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Invalid context for NULL() pointer at %%L" +#, gcc-internal-format, gfc-internal-format msgid "Invalid context for NULL() pointer at %L" -msgstr "Ogiltigt sammanhang för NULL()-pekare vid %%L" +msgstr "Ogiltigt sammanhang för NULL()-pekare vid %L" #: fortran/resolve.cc:4417 -#, fuzzy, gcc-internal-format -#| msgid "Operand of unary numeric operator %%<%s%%> at %%L is %s" +#, gcc-internal-format msgid "Operand of unary numeric operator %qs at %L is %s" -msgstr "Operand till unär numerisk operator %%<%s%%> vid %%L är %s" +msgstr "Operand till unär numerisk operator %qs vid %L är %s" #: fortran/resolve.cc:4432 fortran/resolve.cc:4466 -#, fuzzy, gcc-internal-format -#| msgid "Operands of binary numeric operator %%<%s%%> at %%L are %s/%s" +#, gcc-internal-format msgid "Operands of binary numeric operator %qs at %L are %s/%s" -msgstr "Operander till binär numerisk operator %%<%s%%> vid %%L är %s/%s" +msgstr "Operander till binär numerisk operator %qs vid %L är %s/%s" #: fortran/resolve.cc:4446 fortran/resolve.cc:4635 fortran/resolve.cc:4804 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Inconsistent ranks for operator at %%L and %%L" +#, gcc-internal-format, gfc-internal-format msgid "Inconsistent ranks for operator at %L and %L" -msgstr "Inkonsistenta ordningar för operator vid %%L och %%L" +msgstr "Inkonsistenta ordningar för operator vid %L och %L" #: fortran/resolve.cc:4458 -#, fuzzy, gcc-internal-format -#| msgid "Unexpected derived-type entities in binary intrinsic numeric operator %%<%s%%> at %%L" +#, gcc-internal-format msgid "Unexpected derived-type entities in binary intrinsic numeric operator %qs at %L" -msgstr "Oväntade entiteter av härledd typ i binär inbyggd numerisk operator %%<%s%%> vid %%L" +msgstr "Oväntade entiteter av härledd typ i binär inbyggd numerisk operator %qs vid %L" #: fortran/resolve.cc:4482 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Operands of string concatenation operator at %%L are %s/%s" +#, gcc-internal-format, gfc-internal-format msgid "Operands of string concatenation operator at %L are %s/%s" -msgstr "Operanderna till strängkonkateneringsoperatorn vid %%L är %s/%s" +msgstr "Operanderna till strängkonkateneringsoperatorn vid %L är %s/%s" #: fortran/resolve.cc:4525 -#, fuzzy, gcc-internal-format -#| msgid "Operands of logical operator %%<%s%%> at %%L are %s/%s" +#, gcc-internal-format msgid "Operands of logical operator %qs at %L are %s/%s" -msgstr "Operanderna till logiska operatorn %%<%s%%> vid %%L är %s/%s" +msgstr "Operanderna till logiska operatorn %qs vid %L är %s/%s" #: fortran/resolve.cc:4548 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Operand of .not. operator at %%L is %s" +#, gcc-internal-format, gfc-internal-format msgid "Operand of .not. operator at %L is %s" -msgstr "Operand till operatorn .not. vid %%L är %s" +msgstr "Operand till operatorn .not. vid %L är %s" #: fortran/resolve.cc:4563 #, gcc-internal-format, gfc-internal-format @@ -81137,10 +81050,9 @@ msgid "BOZ literal constant near %L cannot appear as an operand of a relational msgstr "BOZ-litteralkonstanten nära %L får inte förekomma som en operand till en relationsoperator" #: fortran/resolve.cc:4643 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Inconsistent ranks for operator at %%L and %%L" +#, gcc-internal-format, gfc-internal-format msgid "Inconsistent types for operator at %L and %L: %s and %s" -msgstr "Inkonsistenta ordningar för operator vid %%L och %%L" +msgstr "Inkonsistenta typer för operatorn vid %L och %L: %s och %s" #: fortran/resolve.cc:4667 #, gcc-internal-format, gfc-internal-format @@ -81153,40 +81065,34 @@ msgid "Inequality comparison for %s at %L" msgstr "Olikhetsjämförelse av %s vid %L" #: fortran/resolve.cc:4682 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Logicals at %%L must be compared with %s instead of %s" +#, gcc-internal-format, gfc-internal-format msgid "Logicals at %L must be compared with %s instead of %s" -msgstr "Logiska vid %%L måste jämföras med %s istället för %s" +msgstr "Logiska vid %L måste jämföras med %s istället för %s" #: fortran/resolve.cc:4690 -#, fuzzy, gcc-internal-format -#| msgid "Operands of comparison operator %%<%s%%> at %%L are %s/%s" +#, gcc-internal-format msgid "Operands of comparison operator %qs at %L are %s/%s" -msgstr "Operanderna till jämförelseoperatorn %%<%s%%> vid %%L är %s/%s" +msgstr "Operanderna till jämförelseoperatorn %qs vid %L är %s/%s" #: fortran/resolve.cc:4705 -#, fuzzy, gcc-internal-format -#| msgid "Unknown operator %%<%s%%> at %%L; did you mean %%<%s%%>?" +#, gcc-internal-format msgid "Unknown operator %qs at %L; did you mean %qs?" -msgstr "Okänd operator %%<%s%%> vid %%L; menade du %%<%s%%>?" +msgstr "Okänd operator %qs vid %L; menade du %qs?" #: fortran/resolve.cc:4708 -#, fuzzy, gcc-internal-format -#| msgid "Unknown operator %%<%s%%> at %%L" +#, gcc-internal-format msgid "Unknown operator %qs at %L" -msgstr "Okänd operator %%<%s%%> vid %%L" +msgstr "Okänd operator %qs vid %L" #: fortran/resolve.cc:4713 -#, fuzzy, gcc-internal-format -#| msgid "Operand of user operator %%<%s%%> at %%L is %s" +#, gcc-internal-format msgid "Operand of user operator %qs at %L is %s" -msgstr "Operanderna till användaroperatorn %%<%s%%> vid %%L är %s" +msgstr "Operanderna till användaroperatorn %qs vid %L är %s" #: fortran/resolve.cc:4720 -#, fuzzy, gcc-internal-format -#| msgid "Operands of user operator %%<%s%%> at %%L are %s/%s" +#, gcc-internal-format msgid "Operands of user operator %qs at %L are %s/%s" -msgstr "Operanderna till användaroperatorn %%<%s%%> vid %%L är %s/%s" +msgstr "Operanderna till användaroperatorn %qs vid %L är %s/%s" #: fortran/resolve.cc:4734 #, gcc-internal-format @@ -81194,10 +81100,9 @@ msgid "resolve_operator(): Bad intrinsic" msgstr "resolve_operator(): Felaktig inbyggd" #: fortran/resolve.cc:4832 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Inconsistent ranks for operator at %%L and %%L" +#, gcc-internal-format, gfc-internal-format msgid "Inconsistent coranks for operator at %L and %L" -msgstr "Inkonsistenta ordningar för operator vid %%L och %%L" +msgstr "Inkonsistenta co-ordningar för operator vid %L och %L" #: fortran/resolve.cc:5031 #, gcc-internal-format, gfc-internal-format @@ -81315,45 +81220,39 @@ msgid "Array index at %L is an array of rank %d" msgstr "Vektorindex vid %L är en vektor med ordning %d" #: fortran/resolve.cc:5506 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Argument dim at %L must be scalar" +#, gcc-internal-format, gfc-internal-format msgid "TEAM_NUMBER argument at %L must be scalar" -msgstr "Dim-argumentet vid %L måste vara skalärt" +msgstr "Argumentet till TEAM_NUMBER vid %L måste vara skalärt" #: fortran/resolve.cc:5513 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Expression at %L must be of INTEGER type, found %s" +#, gcc-internal-format, gfc-internal-format msgid "TEAM_NUMBER argument at %L must be of INTEGER type, found %s" -msgstr "Uttryck vid %L måste vara av INTEGER-typ, hittade %s" +msgstr "Argumentet till TEAM_NUMBER vid %L måste vara av INTEGER-typ, hittade %s" #: fortran/resolve.cc:5527 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Argument dim at %L must be scalar" +#, gcc-internal-format, gfc-internal-format msgid "TEAM argument at %L must be scalar" -msgstr "Dim-argumentet vid %L måste vara skalärt" +msgstr "Argumentet till TEAM vid %L måste vara skalärt" #: fortran/resolve.cc:5536 #, gcc-internal-format, gfc-internal-format msgid "TEAM argument at %L must be of TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV, found %s" -msgstr "Artument till TEAM vid %L master vara av TEAM_TYPE från den inbyggda modulen ISO_FORTRAN_ENV, fick %s" +msgstr "Argumentet till TEAM vid %L måste vara av TEAM_TYPE från den inbyggda modulen ISO_FORTRAN_ENV, hittade %s" #: fortran/resolve.cc:5550 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Argument dim at %L must be scalar" +#, gcc-internal-format, gfc-internal-format msgid "STAT argument at %L must be scalar" -msgstr "Dim-argumentet vid %L måste vara skalärt" +msgstr "Argumentet till STAT vid %L måste vara skalärt" #: fortran/resolve.cc:5557 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Expression at %L must be of INTEGER type, found %s" +#, gcc-internal-format, gfc-internal-format msgid "STAT argument at %L must be of INTEGER type, found %s" -msgstr "Uttryck vid %L måste vara av INTEGER-typ, hittade %s" +msgstr "Argumentet till STAT vid %L måste vara av INTEGER-typ, hittade %s" #: fortran/resolve.cc:5566 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Expression at %L must be scalar" +#, gcc-internal-format, gfc-internal-format msgid "STAT's expression at %L must be a variable" -msgstr "Uttryck vid %L måste vara skalärt" +msgstr "STATs uttryck vid %L måste vara en variabel" #: fortran/resolve.cc:5588 #, gcc-internal-format, gfc-internal-format @@ -81406,10 +81305,9 @@ msgid "gfc_expression_rank(): Two array specs" msgstr "gfc_expression_rank(): Två vektorspecifikationer" #: fortran/resolve.cc:6048 -#, fuzzy, gcc-internal-format -#| msgid "illegal operand " +#, gcc-internal-format msgid "Illegal coarray index" -msgstr "ogiltig operand " +msgstr "Otillåtet co-vektorindex" #: fortran/resolve.cc:6096 #, gcc-internal-format, gfc-internal-format @@ -81591,22 +81489,19 @@ msgid "Variable %qs at %L not specified in a locality spec of DO CONCURRENT at % msgstr "Variabeln %qs vid %L inte angiven i en lokalitetsspecifikation av DO CONCURRENT vid %L men behövs på grund av DEFAULT (NONE)" #: fortran/resolve.cc:8235 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Expected variable name at %C" +#, gcc-internal-format, gfc-internal-format msgid "Expected variable name in %s locality spec at %L" -msgstr "Variabelnamn förväntades vid %C" +msgstr "Variabelnamn förväntades i %s lokalitetsspecifikation vid %L" #: fortran/resolve.cc:8244 -#, fuzzy, gcc-internal-format -#| msgid "Variable %qs at %L has not been assigned a format label" +#, gcc-internal-format msgid "Variable %qs at %L has already been specified in a locality-spec" -msgstr "Variabeln %qs vid %L har inte tilldelats en formatetikett" +msgstr "Variabeln %qs vid %L har redan angivits i en lokalitetsspecifikation" #: fortran/resolve.cc:8254 -#, fuzzy, gcc-internal-format -#| msgid "SAVE attribute at %L cannot be specified in a PURE procedure" +#, gcc-internal-format msgid "Index variable %qs at %L cannot be specified in a locality-spec" -msgstr "SAVE-attribut vid %L kan inte anges i en PURE-procedur" +msgstr "Indexvariabeln %qs vid %L kan inte anges i en lokalitetsspecifikation" #: fortran/resolve.cc:8267 #, gcc-internal-format @@ -81614,16 +81509,14 @@ msgid "OPTIONAL attribute not permitted for %qs in %s locality-spec at %L" msgstr "Attributet OPTIONAL är inte tillåtet för %qs i lokalitetsspecifikationen %s vid %L" #: fortran/resolve.cc:8274 -#, fuzzy, gcc-internal-format -#| msgid "Assumed size array %qs in %s clause at %L" +#, gcc-internal-format msgid "Assumed-size array not permitted for %qs in %s locality-spec at %L" -msgstr "Vektor %qs med antagen storlek i %s-klausul vid %L" +msgstr "En vektor med antagen storlek är inte tillåten till %qs i lokalitetsspecifikationen %s vid %L" #: fortran/resolve.cc:8287 -#, fuzzy, gcc-internal-format -#| msgid "ALLOCATABLE object %qs in %s clause at %L" +#, gcc-internal-format msgid "ALLOCATABLE attribute not permitted for %qs in %s locality-spec at %L" -msgstr "ALLOCATABLE-objekt %qs i %s-klausul vid %L" +msgstr "Attributet ALLOCATABLE är inte tillåtet till %qs i lokalitetsspecifikationen %s vid %L" #: fortran/resolve.cc:8292 #, gcc-internal-format @@ -81631,10 +81524,9 @@ msgid "Nonpointer polymorphic dummy argument not permitted for %qs in %s localit msgstr "Polymorft attrappargument som inte är en pekare är inte tillåtet för %qs i lokalitetsspecifikationen %s vid %L" #: fortran/resolve.cc:8297 -#, fuzzy, gcc-internal-format -#| msgid "Cray pointer %qs in %s clause at %L" +#, gcc-internal-format msgid "Coarray not permitted for %qs in %s locality-spec at %L" -msgstr "Cray-pekare %qs i %s-klausul vid %L" +msgstr "En co-vektor är inte tillåten till %qs i lokalitetsspecifikationen %s vid %L" #: fortran/resolve.cc:8303 #, gcc-internal-format @@ -81642,10 +81534,9 @@ msgid "Finalizable type not permitted for %qs in %s locality-spec at %L" msgstr "en finalize:bar typ är inte tillåten för %qs i lokalitetsspecifikationen %s vid %L" #: fortran/resolve.cc:8308 -#, fuzzy, gcc-internal-format -#| msgid "List item %qs with allocatable components is not permitted in map clause at %L" +#, gcc-internal-format msgid "Type with ultimate allocatable component not permitted for %qs in %s locality-spec at %L" -msgstr "Listposten %qs med allokerbara komponenter är inte tillåtet i map-klausulen vid %L" +msgstr "Typen med en ytterst allokerbar komponent är inte är inte tillåten till %qs i lokalitetsspecifikationen %s vid %L" #: fortran/resolve.cc:8316 #, gcc-internal-format @@ -81658,16 +81549,14 @@ msgid "VOLATILE attribute not permitted for %qs in REDUCE locality-spec at %L" msgstr "Attributet VOLATILE är inte tillåtet för %qs i lokalitetsspecifikationen REDUCE vid %L" #: fortran/resolve.cc:8374 -#, fuzzy, gcc-internal-format -#| msgid "Unexpected intrinsic type %qs at %L" +#, gcc-internal-format msgid "Expected numeric type for %qs in REDUCE at %L, got %s" -msgstr "Oväntad inbyggd typ %qs vid %L" +msgstr "En numerisk typ förväntades till %qs i REDUCE vid %L, fick %s" #: fortran/resolve.cc:8383 -#, fuzzy, gcc-internal-format -#| msgid "Expected block name of %qs in %s statement at %L" +#, gcc-internal-format msgid "Expected logical type for %qs in REDUCE at %L, got %qs" -msgstr "Blocknamn på %qs i %s-sats förväntades vid %L" +msgstr "En logiskt typ förväntades till %qs i REDUCE vid %L, fick %s" #: fortran/resolve.cc:8401 #, gcc-internal-format @@ -81680,10 +81569,9 @@ msgid "Expected integer type for %qs in REDUCE with IAND/IOR/IEOR at %L, got %s" msgstr "En heltalstyp förväntades för %qs i REDUCE med IAND/IOR/IEOR vid %L, fick %s" #: fortran/resolve.cc:8448 -#, fuzzy, gcc-internal-format -#| msgid "variable %qD set but not used" +#, gcc-internal-format msgid "Variable %qs in locality-spec at %L is not used" -msgstr "variabeln %qD sätts men används inte" +msgstr "Variabeln %qs i lokalitetsspecifikationen vid %L används inte" #: fortran/resolve.cc:8479 #, gcc-internal-format, gfc-internal-format @@ -81736,10 +81624,9 @@ msgid "Source-expr at %L and allocate-object at %L must have the same shape" msgstr "Källuttryck vid %L och allokeringsobjekt vid %L måste ha samma form" #: fortran/resolve.cc:8943 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Only intrinsic operators can be used in expression at %L" +#, gcc-internal-format, gfc-internal-format msgid "The intrinsic NULL cannot be used as source-expr at %L" -msgstr "Endast inbyggda operatorer kan användas i uttryck vid %L" +msgstr "Den inbyggda NULL kan inte användas som källuttryck vid %L" #: fortran/resolve.cc:8951 #, gcc-internal-format, gfc-internal-format @@ -82216,10 +82103,9 @@ msgid "Variable in the ordinary assignment at %L is a procedure pointer componen msgstr "Variabeln i den ordinära tilldelningen vid %L är en procedurpekarkomponent" #: fortran/resolve.cc:12319 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Cannot convert %s to %s at %L" +#, gcc-internal-format, gfc-internal-format msgid "Cannot assign %s to %s at %L" -msgstr "Kan inte konvertera %s till %s vid %L" +msgstr "Kan inte tilldela %s till %s vid %L" #: fortran/resolve.cc:12367 #, gcc-internal-format @@ -82425,10 +82311,9 @@ msgid "Entity %qs at %L has a deferred type parameter and requires either the PO msgstr "Enheten %qs vid %L har en fördröjd typparameter och kräver antingen attributet POINTER eller ALLOCATABLE" #: fortran/resolve.cc:14579 -#, fuzzy, gcc-internal-format -#| msgid "CLASS variable %qs at %L cannot have the PARAMETER attribute" +#, gcc-internal-format msgid "Automatic object %qs at %L cannot have the SAVE attribute" -msgstr "CLASS-variabeln %qs vid %L får inte ha attributet PARAMETER" +msgstr "Det automatiska objektet %qs vid %L får inte ha attributet SAVE" #. F08:C541. The shape of an array defined in a main program or module #. * needs to be constant. @@ -83138,10 +83023,9 @@ msgid "Variable %qs at %L is a coarray and is not ALLOCATABLE, SAVE nor a dummy msgstr "Variabeln %qs vid %L är en co-vektor och är inte ALLOCATABLE, SAVE eller ett attrappargument" #: fortran/resolve.cc:17799 -#, fuzzy, gcc-internal-format -#| msgid "Coarray variable %qs at %L shall not have codimensions with deferred shape" +#, gcc-internal-format msgid "Coarray variable %qs at %L shall not have codimensions with deferred shape without allocatable" -msgstr "Co-vektorvariabeln %qs vid %L skall inte ha co-dimensioner med fördröjd form" +msgstr "Co-vektorvariabeln %qs vid %L skall inte ha co-dimensioner med fördröjd form utan allokerbarhet" #: fortran/resolve.cc:17807 #, gcc-internal-format @@ -83326,10 +83210,9 @@ msgid "Non-CHARACTER object %qs in default CHARACTER EQUIVALENCE statement at %L msgstr "Icke-CHARACTER-objektet %qs i standard-CHARACTER EQUIVALENCE-satsen vid %L" #: fortran/resolve.cc:18938 -#, fuzzy, gcc-internal-format -#| msgid "Syntax error in EQUIVALENCE statement at %L" +#, gcc-internal-format msgid "Non-NUMERIC object %qs in default NUMERIC EQUIVALENCE statement at %L" -msgstr "Syntaxfel i EQUIVALENCE-sats vid %L" +msgstr "Ett icke-numeriskt objektet %qs i satsen NUMERIC EQUIVALENCE vid %L" #: fortran/resolve.cc:18956 #, gcc-internal-format @@ -83422,10 +83305,9 @@ msgid "!$OMP at %C starts a commented line as it neither is followed by a space msgstr "!$OMP vid %C inleder en kommentarrad eftersom det varken följs av en blank eller en fortsättningsrad" #: fortran/scanner.cc:1011 -#, fuzzy, gcc-internal-format -#| msgid "Ignoring '!$omx' vendor-extension sentinel at %C" +#, gcc-internal-format msgid "Ignoring %<!$omx%> vendor-extension sentinel at %C" -msgstr "Ignorerar leverantörsutvidgningens vaktpost ”!$omx” vid %C" +msgstr "Ignorerar leverantörsutvidgningens vaktpost %<!$omx%> vid %C" #: fortran/scanner.cc:1323 fortran/scanner.cc:1526 #, gcc-internal-format, gfc-internal-format @@ -84027,10 +83909,9 @@ msgid "SAVE attribute at %L cannot be specified in a PURE procedure" msgstr "SAVE-attribut vid %L kan inte anges i en PURE-procedur" #: fortran/symbol.cc:1323 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Duplicate SAVE attribute specified at %L" +#, gcc-internal-format, gfc-internal-format msgid "Duplicate SAVE attribute specified near %C" -msgstr "Dubblerat SAVE-attribut angivet vid %L" +msgstr "Dubblerat SAVE-attribut angivet nära %C" #: fortran/symbol.cc:1327 #, gcc-internal-format, gfc-internal-format @@ -84234,10 +84115,9 @@ msgid "Derived type %qs declared at %L must have the BIND attribute to be C inte msgstr "Härledd typ %qs deklarerad vid %L måste ha attributet BIND för att vara ett C-interoperativ" #: fortran/symbol.cc:4640 -#, fuzzy, gcc-internal-format -#| msgid "Derived type %qs with BIND(C) attribute at %L is empty, and may be inaccessible by the C companion processor" +#, gcc-internal-format msgid "Derived type %qs with BIND(C) attribute at %L has no components" -msgstr "Härledd typ %qs med attributet BIND(C) vid %L är tom, och kan vara otillgängliga av C-följeslagarprocessorn" +msgstr "Den härledda typen %qs med attributet BIND(C) vid %L har inga komponenter" #. Generally emit warning, but not twice if -pedantic is given. #: fortran/symbol.cc:4646 @@ -84306,10 +84186,9 @@ msgid "Overlapping unequal initializers in EQUIVALENCE at %C" msgstr "Överlappande olika initierare i EQUIVALENCE vid %C" #: fortran/trans-array.cc:2466 fortran/trans-expr.cc:10439 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "The structure constructor at %C has been finalized. This feature was removed by f08/0011. Use -std=f2018 or -std=gnu to eliminate the finalization." +#, gcc-internal-format, gfc-internal-format msgid "The structure constructor at %L has been finalized. This feature was removed by f08/0011. Use -std=f2018 or -std=gnu to eliminate the finalization." -msgstr "Postkonstrueraren vid %C har avslutats. Denna funktion togs bart av f08/0011. Använd -std=f2018 eller -std=gnu för att eliminera avslutningen." +msgstr "Postkonstrueraren vid %L har avslutats. Denna funktion togs bart av f08/0011. Använd -std=f2018 eller -std=gnu för att eliminera avslutningen." #. Problems occur when we get something like #. integer :: a(lots) = (/(i, i=1, lots)/) @@ -84505,16 +84384,14 @@ msgid "Sorry, !$ACC DECLARE at %L is not allowed in BLOCK construct" msgstr "Ledsen, !$ACC DECLARE vid %L är inte tillåtet i BLOCK-konstruktion" #: fortran/trans-decl.cc:7199 fortran/trans-expr.cc:6117 -#, fuzzy, gcc-internal-format -#| msgid "Builtin not implemented" +#, gcc-internal-format msgid "Unsigned not yet implemented" -msgstr "Inbyggd inte implementerad" +msgstr "Teckenlöst är inte implementerat ännu" #: fortran/trans-decl.cc:8317 -#, fuzzy, gcc-internal-format -#| msgid "Symbol %qs at %C is already in a COMMON block" +#, gcc-internal-format msgid "Symbol %qs at %L is declared in a BLOCK DATA program unit but is not in a COMMON block" -msgstr "Symbolen %qs vid %C är redan i ett COMMON-block" +msgstr "Symbolen %qs vid %L är deklarerad i en programenhet BLOCK DATA men är inte i ett COMMON-block" #: fortran/trans-expr.cc:1211 #, gcc-internal-format, gfc-internal-format @@ -84593,16 +84470,14 @@ msgid "implicit mapping of assumed size array %qD" msgstr "implicit avbildning av vektorn %qD med antagen storlek" #: fortran/trans-openmp.cc:2149 -#, fuzzy, gcc-internal-format -#| msgid "comparison with string literal results in unspecified behavior" +#, gcc-internal-format msgid "Mapping of unlimited polymorphic list item %qD is unspecified behavior and unsupported" -msgstr "jämförelse med stränglitteral resulterar i odefinierat beteende" +msgstr "Avbildning av den obegränsade polymorfa listposten %qD är odefinierat beteende och stödjs ej" #: fortran/trans-openmp.cc:2154 -#, fuzzy, gcc-internal-format -#| msgid "comparison with string literal results in unspecified behavior" +#, gcc-internal-format msgid "Mapping of polymorphic list item %qD is unspecified behavior" -msgstr "jämförelse med stränglitteral resulterar i odefinierat beteende" +msgstr "Avbildningen av den polymorfa listposten %qD är odefinierat beteende" #: fortran/trans-openmp.cc:4176 #, gcc-internal-format @@ -84655,10 +84530,9 @@ msgid "gfc_trans_omp_workshare(): Bad statement code" msgstr "gfc_trans_omp_workshare(): Felaktig satskod" #: fortran/trans-openmp.cc:9631 -#, fuzzy, gcc-internal-format -#| msgid "The base name for 'declare variant' must be specified at %L " +#, gcc-internal-format msgid "The base name for %<declare variant%> must be specified at %L" -msgstr "Basnamnet för ”declare variant” måste anges vid %L" +msgstr "Basnamnet för %<declare variant%> måste anges vid %L" #: fortran/trans-openmp.cc:9642 #, gcc-internal-format, gfc-internal-format @@ -84726,58 +84600,49 @@ msgid "the %qs clause can only be specified if the %<dispatch%> selector of the msgstr "klausulen %qs kan endast anges om väljaren %<dispatch%> i konstruktionsväljarmängden förekommer i klausulen %<match%> vid %L" #: fortran/trans-openmp.cc:9912 fortran/trans-openmp.cc:9951 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Expected argument list at %C" +#, gcc-internal-format, gfc-internal-format msgid "Expected positive argument index at %L" -msgstr "Argumentlista förväntades vid %C" +msgstr "Ett positivt argumentindex förväntades vid %L" #: fortran/trans-openmp.cc:9923 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "attribute %qs positional argument %i value %wi exceeds number of function arguments %u" +#, gcc-internal-format, gfc-internal-format msgid "Argument index at %L exceeds number of arguments %d" -msgstr "värdet %3$wi på argument %2$i till attributet %1$qs överskrider antalet funktionsargument %4$u" +msgstr "Argumentindexet vid %L överskrider antalet argument %d" #: fortran/trans-openmp.cc:9961 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "Upper cobound is less than lower cobound at %L" +#, gcc-internal-format, gfc-internal-format msgid "Upper argument index smaller than lower one at %L" -msgstr "Övre cobound är mindre än den lägre cobound vid %L" +msgstr "Det övre argumentindexet är mindre än det lägre vid %L" #: fortran/trans-openmp.cc:9987 -#, fuzzy, gcc-internal-format -#| msgid "Variable %qs is not a dummy argument at %L" +#, gcc-internal-format msgid "List item %qs at %L, declared at %L, is not a dummy argument" -msgstr "Variabeln %qs är inte ett attrappargument vid %L" +msgstr "Listposten %qs vid %L, deklarerad vid %L, är inte ett attrappargument" #: fortran/trans-openmp.cc:10001 -#, fuzzy, gcc-internal-format -#| msgid "List item %qs in %s clause at %L must be of TYPE(C_PTR)" +#, gcc-internal-format msgid "Argument %qs at %L to list item in %<need_device_ptr%> at %L must be a scalar of TYPE(C_PTR)" -msgstr "Listposten %qs i %s-klausul vid %L måste vara TYPE(C_PTR)" +msgstr "Argumentet %qs vid %L till listposten i %<need_device_ptr%> vid %L måste vara en skalär av TYPE(C_PTR)" #: fortran/trans-openmp.cc:10008 -#, fuzzy, gcc-internal-format -#| msgid "%qs is not valid for %qs" +#, gcc-internal-format msgid "Consider using %<need_device_addr%> instead" -msgstr "%qs är inte giltigt för %qs" +msgstr "Överväg att använda %<need_device_addr%> istället" #: fortran/trans-openmp.cc:10015 -#, fuzzy, gcc-internal-format -#| msgid "Argument %qs of elemental procedure at %L cannot have the ALLOCATABLE attribute" +#, gcc-internal-format msgid "Argument %qs at %L to list item in %<need_device_addr%> at %L must not have the VALUE attribute" -msgstr "Argumentet %qs av elementär procedur vid %L får inte ha attributet ALLOCATABLE" +msgstr "Argumentet %qs vid %L till listposten i %<need_device_addr%> vid %L får inte ha attributet VALUE" #: fortran/trans-openmp.cc:10024 -#, fuzzy, gcc-internal-format -#| msgid "%qs clause at %L specified more than once" +#, gcc-internal-format msgid "%qs at %L is specified more than once" -msgstr "Klausulen %qs vid %L angiven mer än en gång" +msgstr "%qs vid %L anges mer än en gång" #: fortran/trans-openmp.cc:10041 -#, fuzzy, gcc-internal-format -#| msgid "%qs is not valid for %qs" +#, gcc-internal-format msgid "%<need_device_addr%> not yet supported" -msgstr "%qs är inte giltigt för %qs" +msgstr "%<need_device_addr%> stödjs inte ännu" #: fortran/trans-stmt.cc:576 #, gcc-internal-format, gfc-internal-format @@ -84800,17 +84665,15 @@ msgid "gfc_trans_select(): Bad type for case expr." msgstr "gfc_trans_select(): Felaktig typ för Bad type for case-uttryck." #: fortran/trans-stmt.cc:5170 -#, fuzzy, gcc-internal-format -#| msgid "Sorry, the event component of derived type at %L is not yet supported" +#, gcc-internal-format msgid "Sorry, %s specifier at %L for assumed-size array %qs is not yet supported" -msgstr "Ledsen, händelsekomponenten hos härledd typ vid %L stödjs inte ännu" +msgstr "Ledsen, specificeraren %s vid %L för vektorn %qs med antagen storlek stödjs inte ännu" #. Cf. PR fortran/ #: fortran/trans-stmt.cc:5207 -#, fuzzy, gcc-internal-format -#| msgid "Sorry, the event component of derived type at %L is not yet supported" +#, gcc-internal-format msgid "Sorry, LOCAL specifier at %L for %qs of derived type with default initializer is not yet supported" -msgstr "Ledsen, händelsekomponenten hos härledd typ vid %L stödjs inte ännu" +msgstr "Ledsen, specificeraren LOCAL vid %L för %qs av härledd typp med standardinitierare stödjs inte ännu" #: fortran/trans-types.cc:619 #, gcc-internal-format @@ -84974,16 +84837,14 @@ msgid "unexpected EOF" msgstr "oväntat filslut" #: go/gofrontend/expressions.cc:985 -#, fuzzy, gcc-internal-format -#| msgid "invalid use of %qD" +#, gcc-internal-format msgid "invalid use of type" -msgstr "ogiltig användning av %qD" +msgstr "ogiltig användning av typen" #: go/gofrontend/statements.cc:2670 -#, fuzzy, gcc-internal-format -#| msgid "expected expression" +#, gcc-internal-format msgid "expected call expression" -msgstr "uttryck förväntades" +msgstr "ett anropsuttryck förväntades" #: lto/lto-common.cc:2041 #, gcc-internal-format @@ -86483,10 +86344,9 @@ msgid "label definition in %<constexpr%> function only available with %<-std=c++ msgstr "en etikettdefinition i en %<constexpr%>-funktion är endast tillgängligt med %<-std=c++2b%> eller %<-std=gnu++2b%>" #: rust/backend/rust-tree.cc:616 -#, fuzzy, gcc-internal-format -#| msgid "ignoring return value of %qD, that must be used: %<%s%>" +#, gcc-internal-format msgid "ignoring return value of %qD, that must be used: %qs" -msgstr "ignorerar returvärdet av %qD, som måste användas: %<%s%>" +msgstr "ignorerar returvärdet av %qD, som måste användas: %qs" #: rust/backend/rust-tree.cc:617 #, gcc-internal-format @@ -86494,10 +86354,9 @@ msgid "ignoring return value of %qD, that must be used" msgstr "ignorerar returvärdet av %qD, som måste användas" #: rust/backend/rust-tree.cc:633 -#, fuzzy, gcc-internal-format -#| msgid "ignoring returned value of type %qT, that must be used: %<%s%>" +#, gcc-internal-format msgid "ignoring returned value of type %qT, that must be used: %qs" -msgstr "ignorerar returnerat värde av typen %qT, som måste användas: %<%s%>" +msgstr "ignorerar returnerat värde av typen %qT, som måste användas: %qs" #: rust/backend/rust-tree.cc:634 #, gcc-internal-format @@ -86514,1163 +86373,3 @@ msgstr "oanvänt namn %qE" #, gcc-internal-format, gfc-internal-format msgid "are you trying to break %s? how dare you?" msgstr "försöker du göra sönder %s? hur vågar du?" - -#, gcc-internal-format -#~ msgid "%qF requires arch15 or higher" -#~ msgstr "%qF behöver arch15 eller högre" - -#, gcc-internal-format -#~ msgid "%qs matching variant requires arch15 or higher" -#~ msgstr "%qs-matchning kräver arch15 eller högre" - -#, gcc-internal-format -#~ msgid "Builtin %qF requires arch15 or higher" -#~ msgstr "Inbyggd %qF kräver arch15 eller högre" - -#, gcc-internal-format -#~ msgid "use of %<this%> in a constant expression" -#~ msgstr "%<this%> används i ett konstant uttryck" - -#, gcc-internal-format, gfc-internal-format -#~ msgid "FIRSTPRIVATE with polymorphic list item at %L is unspecified behavior" -#~ msgstr "FIRSTPRIVATE med ett polymorft listelement vid %L är ett ospecificerat beteeende" - -#, gcc-internal-format -#~ msgid "Sorry, LOCAL and LOCAL_INIT are not yet supported for %<do concurrent%> constructs at %L" -#~ msgstr "Ledsen, LOCAL och LOCAL_INIT stödjs inte ännu för konstruktioner %<do concurrent%> vid %L" - -#, fuzzy, gcc-internal-format -#~| msgid "comparison with string literal results in unspecified behavior" -#~ msgid "Implicit mapping of polymorphic variable %qD is unspecified behavior" -#~ msgstr "jämförelse med stränglitteral resulterar i odefinierat beteende" - -#, no-c-format -#~ msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, and AVX10.1 built-in functions and code generation." -#~ msgstr "Stöd inbyggda MMX-, SSE-, SSE2-, SSE3-, SSSE3-, SSE4.1-, SSE4.2-, AVX-, AVX2- och AVX10.1-funktioner och -kodgenerering." - -#, no-c-format -#~ msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX10.1 and AVX10.2 built-in functions and code generation." -#~ msgstr "Stöd inbyggda MMX-, SSE-, SSE2-, SSE3-, SSSE3-, SSE4.1-, SSE4.2-, AVX-, AVX2-, AVX10.1- och AVX10.2-funktioner och -kodgenerering." - -#, gcc-internal-format -#~ msgid "%<-mesa%> is deprecated and support for ESA/390 will be removed; use %<-mzarch%> instead" -#~ msgstr "%<-mesa%> bör undvikas och stöd för ESA/390 kommer tas bort; anvnd %<-march%> istället" - -#, gcc-internal-format -#~ msgid "%<append_args%> clause not yet supported for %qD, except when specifying all %d objects in the %<interop%> clause of the %<dispatch%> directive" -#~ msgstr "%<append_args%>-klausulen stödjs inte ännu för %qD, utom när alla %d objekt specificeras i %<interop%>-klausulen till %<dispatch%>-direktivet" - -#, gcc-internal-format -#~ msgid "required by %<dispatch%> construct" -#~ msgstr "krävs av konstruktionen %<dispatch%>" - -#, gcc-internal-format -#~ msgid "%<#pragma omp interop%> not yet supported" -#~ msgstr "%<#pragma omp interop%> stödjs inte ännu" - -#, gcc-internal-format -#~ msgid "%<init%> clause with modifier other than %<prefer_type%>, %<target%> or %<targetsync%>" -#~ msgstr "en klausul %<init%> med en annan modifierare än %<prefer_type%>, %<target%> eller %<targetsync%>" - -#, c-format -#~ msgid "bad I/O address 0x" -#~ msgstr "felaktig I/O-adress 0x" - -#, gcc-internal-format -#~ msgid "late or dynamic variant resolution required for call in a %<dispatch%> construct" -#~ msgstr "sen eller dynamisk variantupplösning krävs för anrop i en %<dispatch%>-konstruktion" - -#, gcc-internal-format -#~ msgid "unexpected %<interop%> clause as invoked procedure %qD is not variant substituted" -#~ msgstr "oväntad %<interop%>-klausul eftersom den anropade proceduren %qD inte är variantsubtituerad" - -#, gcc-internal-format, gfc-internal-format -#~ msgid "TEAM= attribute in %C misplaced" -#~ msgstr "attributet TEAM= i %C är felplacerat" - -#, gcc-internal-format, gfc-internal-format -#~ msgid "STAT= attribute in %C misplaced" -#~ msgstr "attributet STAT= i %C är felplacerat" - -#, gcc-internal-format, gfc-internal-format -#~ msgid "Sorry, not yet able to call a non-pure/non-elemental function %s in a coarray reference; use a temporary for the function's result instead" -#~ msgstr "Ledsen, kan inte ännu anropa en icke-ren/icke-elementär funktion %s i en co-vektor-referens; använd en temporär till funktionsresultatet istället" - -#~ msgid "You need a C startup file for -msys-crt0=" -#~ msgstr "Du behöver en C-uppstartsfil för -msys-crt0=" - -#, no-c-format -#~ msgid "Enable certain features present in the Concepts TS." -#~ msgstr "Aktivera vissa funktioner som finns i Concepts TS." - -#, no-c-format -#~ msgid "Conform to the ISO 2023 C++ draft standard (experimental and incomplete support)." -#~ msgstr "Följ standardutkastet ISO 2023 C++ (experimentellt och ofullständigt stöd)." - -#, no-c-format -#~ msgid "Conform to the ISO 2023 C standard draft (expected to be published in 2024) (experimental and incomplete support)." -#~ msgstr "Följ standardutkastet ISO 2023 C (förväntas publiceras under 2024) (experimentellt och ofullständigt stöd)." - -#, no-c-format -#~ msgid "Conform to the ISO 2023 C++ draft standard with GNU extensions (experimental and incomplete support)." -#~ msgstr "Följ standardutkastet ISO 2023 C++ med GNU-utökningar (experimentellt och ofullständigt stöd)." - -#, no-c-format -#~ msgid "Conform to the ISO 2023 C standard draft (expected to be published in 2024) with GNU extensions (experimental and incomplete support)." -#~ msgstr "Följ standardutkastet ISO 2023 C (förväntas publiceras under 2024) med GNU-utökningar (experimentellt och ofullständigt stöd)." - -#, no-c-format -#~ msgid "When generating -fpic code, allow the use of PLTs. Ignored for fno-pic." -#~ msgstr "Vid generering av -fpic-kod, tillåt användningen av PLT:er. Ignoreras för fno-pic." - -#, no-c-format -#~ msgid "Use LRA instead of reload." -#~ msgstr "Använd LRA istället för omladdning." - -#, no-c-format -#~ msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512PF built-in functions and code generation." -#~ msgstr "Stöd inbyggda MMX-, SSE-, SSE2-, SSE3-, SSSE3-, SSE4.1-, SSE4.2-, AVX-, AVX2- och AVX512F- och AVX512PF-funktioner och -kodgenerering." - -#, no-c-format -#~ msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512ER built-in functions and code generation." -#~ msgstr "Stöd inbyggda MMX-, SSE-, SSE2-, SSE3-, SSSE3-, SSE4.1-, SSE4.2-, AVX-, AVX2- och AVX512F- och AVX512ER-funktioner och -kodgenerering." - -#, no-c-format -#~ msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX512F and AVX5124FMAPS built-in functions and code generation." -#~ msgstr "Stöd inbyggda MMX-, SSE-, SSE2-, SSE3-, SSSE3-, SSE4.1-, SSE4.2-, AVX-, AVX2-, AVX512F- och AVX5124FMAPS-funktioner och -kodgenerering." - -#, no-c-format -#~ msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX512F and AVX5124VNNIW built-in functions and code generation." -#~ msgstr "Stöd inbyggda MMX-, SSE-, SSE2-, SSE3-, SSSE3-, SSE4.1-, SSE4.2-, AVX-, AVX2-, AVX512F- och AVX5124VNNIW-funktioner och -kodgenerering." - -#, no-c-format -#~ msgid "Support PREFETCHWT1 built-in functions and code generation." -#~ msgstr "Stöd inbyggda PREFETCHWT1-funktioner och -kodgenerering." - -#, no-c-format -#~ msgid "Link with a limited version of the C library." -#~ msgstr "Länka med en begränsad version av C-biblioteket." - -#, no-c-format -#~ msgid "Name of system library to link against." -#~ msgstr "Namn på systembiblioteket att länka mot." - -#, no-c-format -#~ msgid "Name of the startfile." -#~ msgstr "Namn på startfilen." - -#, no-c-format -#~ msgid "Link with HAL BSP." -#~ msgstr "Länka med HAL BSP." - -#, no-c-format -#~ msgid "Enable DIV, DIVU." -#~ msgstr "Aktivera DIV, DIVU." - -#, no-c-format -#~ msgid "Enable MUL instructions." -#~ msgstr "Använd MUL-instruktioner." - -#, no-c-format -#~ msgid "Enable MULX instructions, assume fast shifter." -#~ msgstr "Använd MULX-instruktioner, anta snabb skiftare." - -#, no-c-format -#~ msgid "Use table based fast divide (default at -O3)." -#~ msgstr "Använd tabellbaserad snabb division (standard för -O3)." - -#, no-c-format -#~ msgid "All memory accesses use I/O load/store instructions." -#~ msgstr "Alla minnesåtkomster använder I/O ladda-/lagrainstruktioner." - -#, no-c-format -#~ msgid "Volatile memory accesses use I/O load/store instructions." -#~ msgstr "Volatila minnesåtkomster använder I/O ladda-/lagrainstruktioner." - -#, no-c-format -#~ msgid "Volatile memory accesses do not use I/O load/store instructions." -#~ msgstr "Volatila minnesåtkomster använder inte I/O ladda-/lagrainstruktioner." - -#, no-c-format -#~ msgid "Enable/disable GP-relative addressing." -#~ msgstr "Aktivera/avaktivera GP-relativ adressering." - -#, no-c-format -#~ msgid "Valid options for GP-relative addressing (for -mgpopt):" -#~ msgstr "Giltiga flaggor för GP-relativ adressering (för -mgpopt):" - -#, no-c-format -#~ msgid "Equivalent to -mgpopt=none." -#~ msgstr "Ekvivalent med -mgpopt=none." - -#, no-c-format -#~ msgid "Floating point custom instruction configuration name." -#~ msgstr "Namn på anpassad instruktionskonfiguration för flyttal." - -#, no-c-format -#~ msgid "Do not use the ftruncds custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen ftruncds." - -#, no-c-format -#~ msgid "Integer id (N) of ftruncds custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion ftruncds." - -#, no-c-format -#~ msgid "Do not use the fextsd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fextsd." - -#, no-c-format -#~ msgid "Integer id (N) of fextsd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fextsd." - -#, no-c-format -#~ msgid "Do not use the fixdu custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fixdu." - -#, no-c-format -#~ msgid "Integer id (N) of fixdu custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fixdu." - -#, no-c-format -#~ msgid "Do not use the fixdi custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fixdi." - -#, no-c-format -#~ msgid "Integer id (N) of fixdi custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fixdi." - -#, no-c-format -#~ msgid "Do not use the fixsu custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fixsu." - -#, no-c-format -#~ msgid "Integer id (N) of fixsu custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fixsu." - -#, no-c-format -#~ msgid "Do not use the fixsi custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fixsi." - -#, no-c-format -#~ msgid "Integer id (N) of fixsi custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fixsi." - -#, no-c-format -#~ msgid "Do not use the floatud custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen floatud." - -#, no-c-format -#~ msgid "Integer id (N) of floatud custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion floatud." - -#, no-c-format -#~ msgid "Do not use the floatid custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen floatid." - -#, no-c-format -#~ msgid "Integer id (N) of floatid custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion floatid." - -#, no-c-format -#~ msgid "Do not use the floatus custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen floatus." - -#, no-c-format -#~ msgid "Integer id (N) of floatus custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion floatus." - -#, no-c-format -#~ msgid "Do not use the floatis custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen floatis." - -#, no-c-format -#~ msgid "Integer id (N) of floatis custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion floatis." - -#, no-c-format -#~ msgid "Do not use the fcmpned custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmpned." - -#, no-c-format -#~ msgid "Integer id (N) of fcmpned custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmpned." - -#, no-c-format -#~ msgid "Do not use the fcmpeqd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmpeqd." - -#, no-c-format -#~ msgid "Integer id (N) of fcmpeqd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmpeqd." - -#, no-c-format -#~ msgid "Do not use the fcmpged custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmpged." - -#, no-c-format -#~ msgid "Integer id (N) of fcmpged custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmpged." - -#, no-c-format -#~ msgid "Do not use the fcmpgtd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmpgtd." - -#, no-c-format -#~ msgid "Integer id (N) of fcmpgtd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmpgtd." - -#, no-c-format -#~ msgid "Do not use the fcmpled custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmpled." - -#, no-c-format -#~ msgid "Integer id (N) of fcmpled custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmpled." - -#, no-c-format -#~ msgid "Do not use the fcmpltd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmpltd." - -#, no-c-format -#~ msgid "Integer id (N) of fcmpltd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmpltd." - -#, no-c-format -#~ msgid "Do not use the flogd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen flogd." - -#, no-c-format -#~ msgid "Integer id (N) of flogd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion flogd." - -#, no-c-format -#~ msgid "Do not use the fexpd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fexpd." - -#, no-c-format -#~ msgid "Integer id (N) of fexpd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fexpd." - -#, no-c-format -#~ msgid "Do not use the fatand custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fatand." - -#, no-c-format -#~ msgid "Integer id (N) of fatand custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fatand." - -#, no-c-format -#~ msgid "Do not use the ftand custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen ftand." - -#, no-c-format -#~ msgid "Integer id (N) of ftand custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion ftand." - -#, no-c-format -#~ msgid "Do not use the fsind custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fsind." - -#, no-c-format -#~ msgid "Integer id (N) of fsind custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fsind." - -#, no-c-format -#~ msgid "Do not use the fcosd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcosd." - -#, no-c-format -#~ msgid "Integer id (N) of fcosd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcosd." - -#, no-c-format -#~ msgid "Do not use the fsqrtd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fsqrtd." - -#, no-c-format -#~ msgid "Integer id (N) of fsqrtd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fsqrtd." - -#, no-c-format -#~ msgid "Do not use the fabsd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fabsd." - -#, no-c-format -#~ msgid "Integer id (N) of fabsd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fabsd." - -#, no-c-format -#~ msgid "Do not use the fnegd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fnegd." - -#, no-c-format -#~ msgid "Integer id (N) of fnegd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fnegd." - -#, no-c-format -#~ msgid "Do not use the fmaxd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fmaxd." - -#, no-c-format -#~ msgid "Integer id (N) of fmaxd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fmaxd." - -#, no-c-format -#~ msgid "Do not use the fmind custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fmind." - -#, no-c-format -#~ msgid "Integer id (N) of fmind custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fmind." - -#, no-c-format -#~ msgid "Do not use the fdivd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fdivd." - -#, no-c-format -#~ msgid "Integer id (N) of fdivd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fdivd." - -#, no-c-format -#~ msgid "Do not use the fmuld custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fmuld." - -#, no-c-format -#~ msgid "Integer id (N) of fmuld custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fmuld." - -#, no-c-format -#~ msgid "Do not use the fsubd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fsubd." - -#, no-c-format -#~ msgid "Integer id (N) of fsubd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fsubd." - -#, no-c-format -#~ msgid "Do not use the faddd custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen faddd." - -#, no-c-format -#~ msgid "Integer id (N) of faddd custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion faddd." - -#, no-c-format -#~ msgid "Do not use the fcmpnes custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmpnes." - -#, no-c-format -#~ msgid "Integer id (N) of fcmpnes custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmpnes." - -#, no-c-format -#~ msgid "Do not use the fcmpeqs custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmpeqs." - -#, no-c-format -#~ msgid "Integer id (N) of fcmpeqs custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmpeqs." - -#, no-c-format -#~ msgid "Do not use the fcmpges custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmpges." - -#, no-c-format -#~ msgid "Integer id (N) of fcmpges custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmpges." - -#, no-c-format -#~ msgid "Do not use the fcmpgts custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmpgts." - -#, no-c-format -#~ msgid "Integer id (N) of fcmpgts custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmpgts." - -#, no-c-format -#~ msgid "Do not use the fcmples custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmples." - -#, no-c-format -#~ msgid "Integer id (N) of fcmples custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmples." - -#, no-c-format -#~ msgid "Do not use the fcmplts custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcmplts." - -#, no-c-format -#~ msgid "Integer id (N) of fcmplts custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcmplts." - -#, no-c-format -#~ msgid "Do not use the flogs custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen flogs." - -#, no-c-format -#~ msgid "Integer id (N) of flogs custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion flogs." - -#, no-c-format -#~ msgid "Do not use the fexps custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fexps." - -#, no-c-format -#~ msgid "Integer id (N) of fexps custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fexps." - -#, no-c-format -#~ msgid "Do not use the fatans custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fatans." - -#, no-c-format -#~ msgid "Integer id (N) of fatans custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fatans." - -#, no-c-format -#~ msgid "Do not use the ftans custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen ftans." - -#, no-c-format -#~ msgid "Integer id (N) of ftans custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion ftans." - -#, no-c-format -#~ msgid "Do not use the fsins custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fsins." - -#, no-c-format -#~ msgid "Integer id (N) of fsins custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fsins." - -#, no-c-format -#~ msgid "Do not use the fcoss custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fcoss." - -#, no-c-format -#~ msgid "Integer id (N) of fcoss custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fcoss." - -#, no-c-format -#~ msgid "Do not use the fsqrts custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fsqrts." - -#, no-c-format -#~ msgid "Integer id (N) of fsqrts custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fsqrts." - -#, no-c-format -#~ msgid "Do not use the fabss custom instr." -#~ msgstr "Använd inte den anpassade instruktionen fabss." - -#, no-c-format -#~ msgid "Integer id (N) of fabss custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fabss." - -#, no-c-format -#~ msgid "Do not use the fnegs custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fnegs." - -#, no-c-format -#~ msgid "Integer id (N) of fnegs custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fnegs." - -#, no-c-format -#~ msgid "Do not use the fmaxs custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fmaxs." - -#, no-c-format -#~ msgid "Integer id (N) of fmaxs custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fmaxs." - -#, no-c-format -#~ msgid "Do not use the fmins custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fmins." - -#, no-c-format -#~ msgid "Integer id (N) of fmins custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fmins." - -#, no-c-format -#~ msgid "Do not use the fdivs custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fdivs." - -#, no-c-format -#~ msgid "Integer id (N) of fdivs custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fdivs." - -#, no-c-format -#~ msgid "Do not use the fmuls custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fmuls." - -#, no-c-format -#~ msgid "Integer id (N) of fmuls custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fmuls." - -#, no-c-format -#~ msgid "Do not use the fsubs custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fsubs." - -#, no-c-format -#~ msgid "Integer id (N) of fsubs custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fsubs." - -#, no-c-format -#~ msgid "Do not use the fadds custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fadds." - -#, no-c-format -#~ msgid "Integer id (N) of fadds custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fadds." - -#, no-c-format -#~ msgid "Do not use the frdy custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen frdy." - -#, no-c-format -#~ msgid "Integer id (N) of frdy custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion frdy." - -#, no-c-format -#~ msgid "Do not use the frdxhi custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen frdxhi." - -#, no-c-format -#~ msgid "Integer id (N) of frdxhi custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion frdxhi." - -#, no-c-format -#~ msgid "Do not use the frdxlo custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen frdxlo." - -#, no-c-format -#~ msgid "Integer id (N) of frdxlo custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion frdxlo." - -#, no-c-format -#~ msgid "Do not use the fwry custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fwry." - -#, no-c-format -#~ msgid "Integer id (N) of fwry custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fwry." - -#, no-c-format -#~ msgid "Do not use the fwrx custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen fwrx." - -#, no-c-format -#~ msgid "Integer id (N) of fwrx custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion fwrx." - -#, no-c-format -#~ msgid "Do not use the round custom instruction." -#~ msgstr "Använd inte den anpassade instruktionen round." - -#, no-c-format -#~ msgid "Integer id (N) of round custom instruction." -#~ msgstr "Heltals-id (N) för anpassad instruktion round." - -#, no-c-format -#~ msgid "Valid Nios II ISA levels (for -march):" -#~ msgstr "Giltiga Nios II ISA-nivåer (för -march):" - -#, no-c-format -#~ msgid "Enable generation of R2 BMX instructions." -#~ msgstr "Aktivera generering av R2 BMX-instruktioner." - -#, no-c-format -#~ msgid "Enable generation of R2 CDX instructions." -#~ msgstr "Använd generering av R2 CDX-instruktioner." - -#, no-c-format -#~ msgid "Regular expression matching additional GP-addressible section names." -#~ msgstr "Reguljärt uttryck som matchar ytterligare GP-adresserbara sektionsnamn." - -#, no-c-format -#~ msgid "Regular expression matching section names for r0-relative addressing." -#~ msgstr "Reguljärt uttryck som matchar sektionsnamn för r0-relativ adressering." - -#, no-c-format -#~ msgid "Target DFLOAT double precision code." -#~ msgstr "Sikta på DFLOAT-dubbelprecisionskod." - -#, no-c-format -#~ msgid "Improve GCC's ability to track column numbers in large source files, at the expense of slower compilation." -#~ msgstr "Förbättra GCC:s förmåga att följa kolumnnummer i stora källkodsfiler, på bekostnad av långsammare kompilering." - -#~ msgid "bad address, not an I/O address:" -#~ msgstr "felaktig adress, inte en I/O-adress:" - -#~ msgid "candidate:" -#~ msgstr "kandidat:" - -#~ msgid "%r%s:%d:%d:%R [ skipping %d instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]\n" -#~ msgstr "%r%s:%d:%d:%R [ hoppar över %d instansieringskontexter, använd -ftemplate-backtrace-limit=0 för att avaktivera ]\n" - -#~ msgid "%r%s:%d:%d:%R in %<constexpr%> expansion of %qs" -#~ msgstr "%r%s:%d:%d:%R i expansion av %<constexpr%> i %qs" - -#, gcc-internal-format -#~ msgid "AVX512PF support will be removed in GCC 15" -#~ msgstr "stöd för AVX512PF kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "AVX512ER support will be removed in GCC 15" -#~ msgstr "stöd för AVX512ER kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "AVX5124FMAPS support will be removed in GCC 15" -#~ msgstr "stöd för AVX5124FMAPS kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "AVX5124VNNIW support will be removed in GCC 15" -#~ msgstr "stöd för AVX5124VNNIW kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "PREFETCHWT1 support will be removed in GCC 15" -#~ msgstr "stöd för PREFETCHWT1 kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "%<or%> of unmatched not-equal tests is always 1" -#~ msgstr "%<or%> mellan omatchade olikhetstester är alltid 1" - -#, gcc-internal-format -#~ msgid "%<and%> of mutually exclusive equal-tests is always 0" -#~ msgstr "%<and%> mellan ömsesidigt uteslutande likhetstester är alltid 0" - -#, gcc-internal-format -#~ msgid "%+qD causes a section type conflict" -#~ msgstr "%+qD orsakar en sektionstypkonflikt" - -#, gcc-internal-format -#~ msgid "section type conflict" -#~ msgstr "sektionstypskonflikt" - -#, gcc-internal-format -#~ msgid "%s %<%s%.*s%> expects argument of type %<%T%s%>, but argument %d has type %qT" -#~ msgstr "%s %<%s%.*s%> förväntar sig argument av typen %<%T%s%>, men argument %d har typen %qT" - -#, gcc-internal-format -#~ msgid "%s %<%s%.*s%> expects a matching %<%T%s%> argument" -#~ msgstr "%s %<%s%.*s%> förväntar sig ett matchande %<%T%s%>-argument" - -#, gcc-internal-format -#~ msgid "adding %<-flarge-source-files%> will allow for more column-tracking support, at the expense of compilation time and memory" -#~ msgstr "att lägga till %<-flarge-source-files%> kommer tillåta mer kolumnspårningstöd, på bekostnad av kompileringstid och minne" - -#, gcc-internal-format -#~ msgid "%<-fconcepts-ts%> is deprecated and will be removed in GCC 15; please convert your code to C++20 concepts" -#~ msgstr "%<-fconcepts-ts%> undanbedes och kommer tas bort i GCC 15; konvertera din kod till C++20-koncept" - -#, gcc-internal-format -#~ msgid "previously declared as %s with bound %<%s%>" -#~ msgstr "tidigare deklaration som %s med gränsen %<%s%>" - -#, gcc-internal-format -#~ msgid "bad value %<%s%> for %<-mtls-size=%> switch" -#~ msgstr "felaktigt värde %<%s%> till flaggan %<-mtls-size=%>" - -#, gcc-internal-format -#~ msgid "invalid argument %<%s%> for %<%s%>" -#~ msgstr "ogiltigt argument %<%s%> till %<%s%>" - -#, gcc-internal-format -#~ msgid "nested function trampolines not supported on GCN5 due to non-executable stacks" -#~ msgstr "nästade funktionstrampoliner stödjs inte på GCN5 på grund av icke exekverbar stack" - -#, gcc-internal-format -#~ msgid "cannot open intermediate gcn obj file" -#~ msgstr "kan inte öppna intermediär gcn-obj-fil" - -#, gcc-internal-format -#~ msgid "the forth argument must be scale 1, 2, 4, 8" -#~ msgstr "det fjärde argumentet ha skala 1, 2, 4, 8" - -#, gcc-internal-format -#~ msgid "incorrect hint operand" -#~ msgstr "felaktig tipsoperand" - -#, gcc-internal-format -#~ msgid "%<-mtune=knl%> support will be removed in GCC 15" -#~ msgstr "stödet för %<-mtune=knl%> kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "%<target(\"tune=knl\")%> support will be removed in GCC 15" -#~ msgstr "stödet för %<target(\"tune=knl\")%> kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "%<-mtune=knm%> support will be removed in GCC 15" -#~ msgstr "stödet för %<-mtune=knm%> kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "%<target(\"tune=knm\")%> support will be removed in GCC 15" -#~ msgstr "stödet för %<target(\"tune=knm\")%> kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "%<-march=knl%> support will be removed in GCC 15" -#~ msgstr "stödet för %<-march=knl%> kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "%<target(\"arch=knl\")%> support will be removed in GCC 15" -#~ msgstr "stödet för %<target(\"arch=knl\")%> kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "%<-march=knm%> support will be removed in GCC 15" -#~ msgstr "stödet för %<-march=knm%> kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "%<target(\"arch=knm\")%> support will be removed in GCC 15" -#~ msgstr "stödet för %<target(\"arch=knm\")%> kommer tas bort i GCC 15" - -#, gcc-internal-format -#~ msgid "%<-mfpxx%> requires %<-mlra%>" -#~ msgstr "%<-mfpxx%> kräver %<-mlra%>" - -#, gcc-internal-format -#~ msgid "Unknown form for stack limit expression" -#~ msgstr "Okänd form på stackgränsuttryck" - -#, gcc-internal-format -#~ msgid "switch %<-mcustom-%s%> is required for double-precision floating-point" -#~ msgstr "flaggan %<-mcustom-%s%> behövs för dubbel precisions flyttal" - -#, gcc-internal-format -#~ msgid "conflicting use of %<-mcustom%> switches, target attributes, and/or %<__builtin_custom_%> functions" -#~ msgstr "motstridig användning av %<-mcustom%>-flaggor, målattribut, och/eller %<__builtin_custom_%>-funktioner" - -#, gcc-internal-format -#~ msgid "ignoring unrecognized switch %<-mcustom-fpu-cfg%> value %<%s%>" -#~ msgstr "ignorerar okänt värde %<%s%> till flaggan %<-mcustom-fpu-cfg%>" - -#, gcc-internal-format -#~ msgid "switch %<-mcustom-%s%> value %d must be between 0 and 255" -#~ msgstr "värdet %2$d till flaggan %<-mcustom-%1$s%> måste vara mellan 0 och 255" - -#, gcc-internal-format -#~ msgid "position-independent code requires the Linux ABI" -#~ msgstr "positionsoberoende kod behöver Linux-ABI:et" - -#, gcc-internal-format -#~ msgid "PIC support for %<-fstack-limit-symbol%>" -#~ msgstr "PIC-stöd för %<-fstack-limit-symbol%>" - -#, gcc-internal-format -#~ msgid "%<-mgpopt%> not supported with PIC" -#~ msgstr "%<-mgpopt%> stödjs inte med PIC" - -#, gcc-internal-format -#~ msgid "%<-mgprel-sec=%> not supported with PIC" -#~ msgstr "%<-mgprel-sec=%> stödjs inte med PIC" - -#, gcc-internal-format -#~ msgid "%<-mr0rel-sec=%> not supported with PIC" -#~ msgstr "%<-mr0rel-sec=%> stödjs inte med PIC" - -#, gcc-internal-format -#~ msgid "%<-mgprel-sec=%> argument is not a valid regular expression" -#~ msgstr "argumentet till %<-mgprel-sec=%> är inte ett giltigt reguljärt uttryck" - -#, gcc-internal-format -#~ msgid "%<-mr0rel-sec=%> argument is not a valid regular expression" -#~ msgstr "argumentet till %<-mr0rel-sec=%> är inte ett giltigt reguljärt uttryck" - -#, gcc-internal-format -#~ msgid "BMX instructions are only supported with R2 architecture" -#~ msgstr "BMX-instruktioner stödjs endast med R2-arkitekturen" - -#, gcc-internal-format -#~ msgid "CDX instructions are only supported with R2 architecture" -#~ msgstr "CDX-instruktioner stödjs endast med R2-arkitekturer" - -#, gcc-internal-format -#~ msgid "R2 architecture is little-endian only" -#~ msgstr "R2-arkitekturen har endast omvänd byteordning" - -#, gcc-internal-format -#~ msgid "cannot call %<__builtin_custom_%s%> without specifying switch %<-mcustom-%s%>" -#~ msgstr "det går inte att anropa %<__builtin_custom_%s%> utan att ange flaggan %<-mcustom-%s%>" - -#, gcc-internal-format -#~ msgid "custom instruction opcode must be a compile-time constant in the range 0-255 for %<__builtin_custom_%s%>" -#~ msgstr "anpassade instruktions-opkoder måste vara kompileringstillfälleskonstanter i intervallet 0-255 för %<__builtin_custom_%s%>" - -#, gcc-internal-format, gfc-internal-format -#~ msgid "control register number must be in range 0-31 for %s" -#~ msgstr "styrregisternummer måste vara i intervallet 0-31 för %s" - -#, gcc-internal-format, gfc-internal-format -#~ msgid "register number must be in range 0-31 for %s" -#~ msgstr "registernummer måste vara i intervallet 0-31 för %s" - -#, gcc-internal-format, gfc-internal-format -#~ msgid "immediate value must fit into a %d-bit integer for %s" -#~ msgstr "ett omedelbart värde måste passa i ett %d-bitars heltal för %s" - -#, gcc-internal-format -#~ msgid "the ENI instruction operand must be either 0 or 1" -#~ msgstr "operanden till instruktionen ENI måste vara antingen 0 eller 1" - -#, gcc-internal-format, gfc-internal-format -#~ msgid "built-in function %s requires Nios II R%d" -#~ msgstr "den inbyggda funktionen %s behöver Nios II R%d" - -#, gcc-internal-format -#~ msgid "switch %<-mcustom-%s%> conflicts with switch %<-mcustom-%s%>" -#~ msgstr "flaggan %<-mcustom-%s%> står i konflikt med flaggan %<-mcustom-%s%>" - -#, gcc-internal-format -#~ msgid "call to %<__builtin_custom_%s%> conflicts with switch %<-mcustom-%s%>" -#~ msgstr "anrop till %<__builtin_custom_%s%> står i konflikt med flaggan %<-mcustom-%s%>" - -#, gcc-internal-format -#~ msgid "%<custom-fpu-cfg%> option does not support %<no-%>" -#~ msgstr "flaggan %<custom-fpu-cfg%> stödjer inte %<no-%>" - -#, gcc-internal-format -#~ msgid "%<custom-fpu-cfg%> option requires configuration argument" -#~ msgstr "flaggan %<custom-fpu-cfg%> behöver konfigurationsargument" - -#, gcc-internal-format -#~ msgid "%<no-custom-%s%> does not accept arguments" -#~ msgstr "%<no-custom-%s%> tar inte argument" - -#, gcc-internal-format -#~ msgid "%<custom-%s=%> requires argument" -#~ msgstr "%<custom-%s=%> behöver argument" - -#, gcc-internal-format -#~ msgid "%<custom-%s=%> argument should be a non-negative integer" -#~ msgstr "argumentet till %<custom-%s=%> skall vara ett ickenegativt heltal" - -#, gcc-internal-format -#~ msgid "%<custom-%s=%> is not recognized as FPU instruction" -#~ msgstr "%<custom-%s=%> är inte känt som en FPU-instruktion" - -#, gcc-internal-format -#~ msgid "invalid custom instruction option %qs" -#~ msgstr "ogiltig flagga för anpassad instruktion %qs" - -#, gcc-internal-format -#~ msgid "parameter %u (%q+D) has void type" -#~ msgstr "parameter %u (%q+D) har void-typ" - -#, gcc-internal-format, gfc-internal-format -#~ msgid "parameter %u has void type" -#~ msgstr "parameter %u har void-typ" - -#, gcc-internal-format -#~ msgid "%<_Generic%> association has function type" -#~ msgstr "%<_Generic%>-association har funktionstyp" - -#, gcc-internal-format -#~ msgid "%<#pragma omp allocate%> for static variables like %qD not yet supported" -#~ msgstr "%<#pragma omp allocate%> för statiska variabler som %qD stödjs inte ännu" - -#, gcc-internal-format -#~ msgid "expected %<match%>" -#~ msgstr "%<match%> förväntades" - -#, gcc-internal-format -#~ msgid "%qs attribute cannot be applied to a function that does not take variable arguments" -#~ msgstr "attributet %qs kan användas på en funktion som inte tar variabla argument" - -#, gcc-internal-format -#~ msgid " passing %qT as %<this%> argument discards qualifiers" -#~ msgstr " att skicka %qT som %<this%>-argument kastar kvalificerare" - -#, gcc-internal-format -#~ msgid "the temporary was destroyed at the end of the full expression %qE" -#~ msgstr "den temporära destruerades vid slutet av det fullständiga uttrycket %qE" - -#, gcc-internal-format -#~ msgid "cast from %qT is not allowed in a constant expression because %qE does not point to an object" -#~ msgstr "typkonvertering från %qT är inte tillåtet i ett konstant uttryck eftersom %qE inte pekar på ett objekt" - -#, gcc-internal-format -#~ msgid "unexpected template-id %qE" -#~ msgstr "oväntat mall-id %qE" - -#, gcc-internal-format -#~ msgid "function concept must be called" -#~ msgstr "funktionskoncept måste anropas" - -#, gcc-internal-format -#~ msgid "function call of variable concept %qE" -#~ msgstr "funktionsanrop av variabelkonceptet %qE" - -#, gcc-internal-format -#~ msgid "no matching concepts for %qE" -#~ msgstr "inga matchande koncept för %qE" - -#, gcc-internal-format -#~ msgid "%qE cannot be introduced with an ellipsis %<...%>" -#~ msgstr "%qE kan inte introduceras med en ellips %<...%>" - -#, gcc-internal-format -#~ msgid "prototype declared here" -#~ msgstr "prototypen deklarerad här" - -#, gcc-internal-format -#~ msgid "all template parameters of %qD must be introduced" -#~ msgstr "alla mallparametrar till %qD måste introduceras" - -#, gcc-internal-format -#~ msgid "cannot deduce template parameters from introduction list" -#~ msgstr "kan inte härleda mallargument från introduktionslistan" - -#, gcc-internal-format -#~ msgid "definition of concept %qD is empty" -#~ msgstr "definitionen av konceptet %qD är tom" - -#, gcc-internal-format -#~ msgid "definition of concept %qD has multiple statements" -#~ msgstr "definitionen av konceptet %qD har flera satser" - -#, gcc-internal-format -#~ msgid "cannot initialize a return object of type %qT with an rvalue of type %<void%>" -#~ msgstr "det går inte att initiera ett returobjekt av typen %qT med ett r-värde av typen %<void%>" - -#, gcc-internal-format -#~ msgid "ignoring return value of %qD, declared with attribute %<nodiscard%>: %<%s%>" -#~ msgstr "ignorerar returvärdet av %qD, deklarerad med attributet %<nodiscard%>: %<%s%>" - -#, gcc-internal-format -#~ msgid "ignoring returned value of type %qT, declared with attribute %<nodiscard%>: %<%s%>" -#~ msgstr "ignorerar returnerat värde av typen %qT, deklarerat med attributet %<nodiscard%>: %<%s%>" - -#, gcc-internal-format -#~ msgid "cannot specialize concept %q#D" -#~ msgstr "kan inte specialisera konceptet %q#D" - -#, gcc-internal-format -#~ msgid "variable concept has no initializer" -#~ msgstr "variabelkoncept har ingen initierare" - -#, gcc-internal-format -#~ msgid "concept %q#D declared with function parameters" -#~ msgstr "konceptet %q#D deklarerad med funktionsparametrar" - -#, gcc-internal-format -#~ msgid "concept %q#D declared with a deduced return type" -#~ msgstr "konceptet %q#D deklarerat med en härledd returtyp" - -#, gcc-internal-format -#~ msgid "concept %q#D with non-%<bool%> return type %qT" -#~ msgstr "koncept %q#D med icke-%<bool%>-returtyp %qT" - -#, gcc-internal-format -#~ msgid "concept %qD has no definition" -#~ msgstr "konceptet %qD har ingen definition" - -#, gcc-internal-format -#~ msgid "a function concept cannot be constrained" -#~ msgstr "ett funktionskoncept kan inte begränsas" - -#, gcc-internal-format -#~ msgid "concept must have type %<bool%>" -#~ msgstr "koncept måste ha typen %<bool%>" - -#, gcc-internal-format -#~ msgid "a variable concept cannot be constrained" -#~ msgstr "ett variabelkoncept kan inte begränsas" - -#, gcc-internal-format -#~ msgid "%<long%> and %<short%> specified together" -#~ msgstr "%<long%> och %<short%> angivna tillsammans" - -#, gcc-internal-format -#~ msgid "defaulted declaration %q+D does not match the expected signature" -#~ msgstr "standarddeklaration %q+D stämmer inte med den förväntade signaturen" - -#, gcc-internal-format -#~ msgid "%q#D references internal linkage entity %q#D" -#~ msgstr "%q#D refererar entiteten %q#D med intern länkning" - -#, gcc-internal-format -#~ msgid "macro debug output may be incomplete with modules" -#~ msgstr "makrofelsökningsutdata kan vara ofullständig med moduler" - -#, gcc-internal-format -#~ msgid "module dependencies require preprocessing" -#~ msgstr "modulberoenden kräver preprocessning" - -#, gcc-internal-format -#~ msgid "you should use the %<-%s%> option" -#~ msgstr "du behöver använda flaggan %<-%s%>" - -#, gcc-internal-format -#~ msgid "%<%T::%D%> names the constructor, not the type" -#~ msgstr "%<%T::%D%> namnger konstrueraren, inte typen" - -#, gcc-internal-format -#~ msgid "import cannot appear directly in a linkage-specification" -#~ msgstr "import får inte förekomma direkt i en länkningsspecifikation" - -#, gcc-internal-format -#~ msgid "extra %<;%>" -#~ msgstr "extra %<;%>" - -#, gcc-internal-format -#~ msgid "use of %<auto%> in template argument only available with %<-fconcepts-ts%>" -#~ msgstr "användning av %<auto%> i mallargument är endast tillgängligt med %<-fconcepts-ts%>" - -#, gcc-internal-format -#~ msgid "template-introductions are not part of C++20 concepts; use %qs to enable" -#~ msgstr "mallintroduktioner är inte en del av C++20 koncept; använd %qs för att aktivera" - -#, gcc-internal-format -#~ msgid "no matching concept for template-introduction" -#~ msgstr "det finns inget matchande koncept för mallintroduktionen" - -#, gcc-internal-format -#~ msgid "explicit specialization of function concept %qD" -#~ msgstr "explicit specialisering av funktionskonceptet %qD" - -#, gcc-internal-format -#~ msgid "specialization of variable concept %q#D" -#~ msgstr "specialisering av variabelkonceptet %q#D" - -#, gcc-internal-format -#~ msgid "explicit instantiation of variable concept %q#D" -#~ msgstr "explicit instansiering av variabelkonceptet %q#D" - -#, gcc-internal-format -#~ msgid "explicit instantiation of function concept %q#D" -#~ msgstr "explicit instansiering av funktionskonceptet %q#D" - -#, gcc-internal-format -#~ msgid "invalid use of %qT in template argument" -#~ msgstr "felaktig användning av %qT i mallargument" - -#, gcc-internal-format -#~ msgid "non-pointer argument to %<__builtin_launder%>" -#~ msgstr "icke-pekar-argument till %<__builtin_launder%>" - -#, gcc-internal-format -#~ msgid "statement-expression in a constant expression" -#~ msgstr "satsuttryck i ett konstant uttryck" - -#, gcc-internal-format, gfc-internal-format -#~ msgid " Included at %s:%d:" -#~ msgstr " Inkluderad vid %s:%d:" - -#, gcc-internal-format -#~ msgid "<During initialization>\n" -#~ msgstr "<Under initiering>\n" - -#, gcc-internal-format, gfc-internal-format -#~ msgid "Program unit at %L has OpenMP device constructs/routines but does not set !$OMP REQUIRES UNIFIED_ADDRESS but other program units do" -#~ msgstr "Programenheten vid %L har OpenMP device-konstruktioner/-rutiner men sätter inte !$OMP REQUIRES UNIFIED_ADDRESS men andra programenheter gör det" - -#, gcc-internal-format, gfc-internal-format -#~ msgid "Program unit at %L has OpenMP device constructs/routines but does not set !$OMP REQUIRES UNIFIED_SHARED_MEMORY but other program units do" -#~ msgstr "Programenheten vid %L har OpenMP device-konstruktioner/-rutiner men sätter inte !$OMP REQUIRES UNIFIED_SHARED_MEMORY men andra programenheter gör det" - -#, gcc-internal-format -#~ msgid "Sorry, !$OMP allocate for variable %qs at %L with SAVE attribute not yet implemented" -#~ msgstr "Ledsen, !$OMP allokering för variabeln %qs vid %L med attributet SAVE stödjs inte ännu" - -#, gcc-internal-format -#~ msgid "%qs specified in 'allocate' clause at %L but not in an explicit privatization clause" -#~ msgstr "%qs angivet i en ”allocate”-klausul vid %L men inte i en explicit privatiseringsklausul" diff --git a/gcc/range-op-float.cc b/gcc/range-op-float.cc index 4719829..dafd9c0 100644 --- a/gcc/range-op-float.cc +++ b/gcc/range-op-float.cc @@ -2899,6 +2899,37 @@ private: } } fop_div; +// Implement fold for a cast from float to an int. +bool +operator_cast::fold_range (irange &, tree, const frange &, + const irange &, relation_trio) const +{ + return false; +} + +// Implement op1_range for a cast from float to an int. +bool +operator_cast::op1_range (frange &, tree, const irange &, + const irange &, relation_trio) const +{ + return false; +} + +// Implement fold for a cast from int to a float. +bool +operator_cast::fold_range (frange &, tree, const irange &, + const frange &, relation_trio) const +{ + return false; +} + +// Implement op1_range for a cast from int to a float. +bool +operator_cast::op1_range (irange &, tree, const frange &, + const frange &, relation_trio) const +{ + return false; +} // Initialize any float operators to the primary table diff --git a/gcc/range-op-mixed.h b/gcc/range-op-mixed.h index bb8e90a..3fb7bff 100644 --- a/gcc/range-op-mixed.h +++ b/gcc/range-op-mixed.h @@ -473,6 +473,15 @@ public: bool fold_range (prange &r, tree type, const irange &op1, const prange &op2, relation_trio rel = TRIO_VARYING) const final override; + bool fold_range (irange &r, tree type, + const frange &lh, + const irange &rh, + relation_trio = TRIO_VARYING) const; + bool fold_range (frange &r, tree type, + const irange &lh, + const frange &rh, + relation_trio = TRIO_VARYING) const; + bool op1_range (irange &r, tree type, const irange &lhs, const irange &op2, relation_trio rel = TRIO_VARYING) const final override; @@ -485,6 +494,15 @@ public: bool op1_range (prange &r, tree type, const irange &lhs, const prange &op2, relation_trio rel = TRIO_VARYING) const final override; + bool op1_range (frange &r, tree type, + const irange &lhs, + const irange &op2, + relation_trio = TRIO_VARYING) const; + bool op1_range (irange &r, tree type, + const frange &lhs, + const frange &op2, + relation_trio = TRIO_VARYING) const; + relation_kind lhs_op1_relation (const irange &lhs, const irange &op1, const irange &op2, relation_kind) const final override; diff --git a/gcc/range-op.cc b/gcc/range-op.cc index 35b3e18..06d357f 100644 --- a/gcc/range-op.cc +++ b/gcc/range-op.cc @@ -164,6 +164,8 @@ dispatch_trio (unsigned lhs, unsigned op1, unsigned op2) // These are the supported dispatch patterns. These map to the parameter list // of the routines in range_operator. Note the last 3 characters are // shorthand for the LHS, OP1, and OP2 range discriminator class. +// Reminder, single operand instructions use the LHS type for op2, even if +// unused. so FLOAT = INT would be RO_FIF. const unsigned RO_III = dispatch_trio (VR_IRANGE, VR_IRANGE, VR_IRANGE); const unsigned RO_IFI = dispatch_trio (VR_IRANGE, VR_FRANGE, VR_IRANGE); @@ -246,6 +248,10 @@ range_op_handler::fold_range (vrange &r, tree type, return m_operator->fold_range (as_a <frange> (r), type, as_a <irange> (lh), as_a <irange> (rh), rel); + case RO_FIF: + return m_operator->fold_range (as_a <frange> (r), type, + as_a <irange> (lh), + as_a <frange> (rh), rel); case RO_PPP: return m_operator->fold_range (as_a <prange> (r), type, as_a <prange> (lh), @@ -292,6 +298,10 @@ range_op_handler::op1_range (vrange &r, tree type, return m_operator->op1_range (as_a <irange> (r), type, as_a <irange> (lhs), as_a <irange> (op2), rel); + case RO_IFF: + return m_operator->op1_range (as_a <irange> (r), type, + as_a <frange> (lhs), + as_a <frange> (op2), rel); case RO_PPP: return m_operator->op1_range (as_a <prange> (r), type, as_a <prange> (lhs), @@ -312,6 +322,10 @@ range_op_handler::op1_range (vrange &r, tree type, return m_operator->op1_range (as_a <frange> (r), type, as_a <irange> (lhs), as_a <frange> (op2), rel); + case RO_FII: + return m_operator->op1_range (as_a <frange> (r), type, + as_a <irange> (lhs), + as_a <irange> (op2), rel); case RO_FFF: return m_operator->op1_range (as_a <frange> (r), type, as_a <frange> (lhs), @@ -761,6 +775,30 @@ range_operator::fold_range (irange &r, tree type, return true; } + +bool +range_operator::fold_range (frange &, tree, const irange &, + const frange &, relation_trio) const +{ + return false; +} + +bool +range_operator::op1_range (irange &, tree, const frange &, + const frange &, relation_trio) const +{ + return false; +} + +bool +range_operator::op1_range (frange &, tree, const irange &, + const irange &, relation_trio) const +{ + return false; +} + + + // The default for op1_range is to return false. bool diff --git a/gcc/range-op.h b/gcc/range-op.h index 594e678..1075786 100644 --- a/gcc/range-op.h +++ b/gcc/range-op.h @@ -86,6 +86,10 @@ public: const irange &lh, const irange &rh, relation_trio = TRIO_VARYING) const; + virtual bool fold_range (frange &r, tree type, + const irange &lh, + const frange &rh, + relation_trio = TRIO_VARYING) const; virtual bool fold_range (prange &r, tree type, const prange &lh, const prange &rh, @@ -146,7 +150,14 @@ public: const irange &lhs, const frange &op2, relation_trio = TRIO_VARYING) const; - + virtual bool op1_range (irange &r, tree type, + const frange &lhs, + const frange &op2, + relation_trio = TRIO_VARYING) const; + virtual bool op1_range (frange &r, tree type, + const irange &lhs, + const irange &op2, + relation_trio = TRIO_VARYING) const; virtual bool op2_range (irange &r, tree type, const irange &lhs, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5a6b911..69f9b6e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,402 @@ +2025-05-14 Simon Martin <simon@nasilyan.com> + + PR c++/120126 + * g++.dg/cpp0x/lambda/lambda-ice33.C: New test. + +2025-05-14 Jiawei <jiawei@iscas.ac.cn> + + * gcc.target/riscv/arch-55.c: New test. + +2025-05-14 Martin Jambor <mjambor@suse.cz> + + * gcc.dg/ipa/pr120044-1.c: New test. + * gcc.dg/ipa/pr120044-2.c: Likewise. + * gcc.dg/tree-ssa/pr114864.c: Likewise. + +2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com> + + PR c++/120125 + * g++.dg/modules/clone-4_a.C: New test. + * g++.dg/modules/clone-4_b.C: New test. + +2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com> + + PR c++/119864 + * g++.dg/modules/openmp-1.C: New test. + +2025-05-14 Nathaniel Shead <nathanieloshead@gmail.com> + + * g++.dg/modules/tpl-friend-19_a.C: New test. + * g++.dg/modules/tpl-friend-19_b.C: New test. + +2025-05-14 Ville Voutilainen <ville.voutilainen@gmail.com> + + * g++.dg/opt/pr96780_cpp23.C: New. + +2025-05-14 Owen Avery <powerboat9.gamer@gmail.com> + Jason Merrill <jason@redhat.com> + + * g++.dg/warn/ignore-virtual-move-assign.C: New test. + +2025-05-14 liuhongt <hongtao.liu@intel.com> + + * gcc.target/i386/pr103771-4.c: New test. + +2025-05-13 Tobias Burnus <tburnus@baylibre.com> + + PR fortran/113413 + * gfortran.dg/dec_math.f90: Add comment that degree + functions are part of F2023. + +2025-05-13 Yuao Ma <c8ef@outlook.com> + Steven G. Kargl <kargl@gcc.gnu.org> + + PR fortran/113413 + * gfortran.dg/dec_math.f90: Add atand(y, x) testcase. + +2025-05-13 Andrew Pinski <quic_apinski@quicinc.com> + + PR tree-optimization/119903 + * g++.dg/tree-ssa/pr119903-1.C: New test. + +2025-05-13 Andrew Pinski <quic_apinski@quicinc.com> + + PR middle-end/118868 + * c-c++-common/pr118868-1.c: New test. + +2025-05-13 Gaius Mulley <gaiusmod2@gmail.com> + + PR modula2/120188 + * gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp: + Remove call to gm2-dg-frontend-configure-check and replace with + tests for whether plugin variables exist. + +2025-05-13 Jakub Jelinek <jakub@redhat.com> + + PR libfortran/120196 + * gfortran.dg/pr120196.f90: New test. + +2025-05-13 Jakub Jelinek <jakub@redhat.com> + + PR fortran/120191 + * gfortran.dg/pr120191_3.f90: New test. + +2025-05-13 Jakub Jelinek <jakub@redhat.com> + + PR fortran/120191 + * gfortran.dg/pr120191_2.f90: New test. + +2025-05-13 Jakub Jelinek <jakub@redhat.com> + Daniil Kochergin <daniil2472s@gmail.com> + Tobias Burnus <tburnus@baylibre.com> + + PR fortran/120191 + * gfortran.dg/pr120191_1.f90: New test. + +2025-05-13 David Malcolm <dmalcolm@redhat.com> + + PR other/116792 + * gcc.dg/html-output/missing-semicolon.py: Verify that we don't + have an empty "gcc-annotated-source" and we do have a + "gcc-generated-patch". + * gcc.dg/plugin/diagnostic-test-metadata-html.c: New test. + * gcc.dg/plugin/diagnostic-test-metadata-html.py: New test script. + * gcc.dg/plugin/diagnostic-test-paths-2.c: Add + "-fdiagnostics-add-output=experimental-html" to options. Add + invocation of diagnostic-test-paths-2.py. + * gcc.dg/plugin/diagnostic-test-paths-2.py: New test script. + * gcc.dg/plugin/plugin.exp (plugin_test_list): Add + diagnostic-test-metadata-html.c. + +2025-05-13 Andrew MacLeod <amacleod@redhat.com> + + * gcc.dg/tree-ssa/vrp124.c: New. + +2025-05-12 Pan Li <pan2.li@intel.com> + + * gcc.target/riscv/rvv/autovec/sat/vec_sat_arith.h: Add test helper macros. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u16-from-u32.c: New test. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u16-from-u64.c: New test. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u32-from-u64.c: New test. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u16.c: New test. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u32.c: New test. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u64.c: New test. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u16-from-u32.c: New test. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u16-from-u64.c: New test. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u32-from-u64.c: New test. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u16.c: New test. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u32.c: New test. + * gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u64.c: New test. + +2025-05-12 Pan Li <pan2.li@intel.com> + + * gcc.target/riscv/sat/sat_arith.h: Add test helper macros. + * gcc.target/riscv/sat/sat_u_add-7-u16-from-u32.c: New test. + * gcc.target/riscv/sat/sat_u_add-7-u16-from-u64.c: New test. + * gcc.target/riscv/sat/sat_u_add-7-u32-from-u64.c: New test. + * gcc.target/riscv/sat/sat_u_add-7-u8-from-u16.c: New test. + * gcc.target/riscv/sat/sat_u_add-7-u8-from-u32.c: New test. + * gcc.target/riscv/sat/sat_u_add-7-u8-from-u64.c: New test. + * gcc.target/riscv/sat/sat_u_add-run-7-u16-from-u32.c: New test. + * gcc.target/riscv/sat/sat_u_add-run-7-u16-from-u64.c: New test. + * gcc.target/riscv/sat/sat_u_add-run-7-u32-from-u64.c: New test. + * gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u16.c: New test. + * gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u32.c: New test. + * gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u64.c: New test. + +2025-05-12 Jason Merrill <jason@redhat.com> + + PR c++/120012 + * g++.dg/abi/base-defaulted2.C: New test. + +2025-05-12 Gaius Mulley <gaiusmod2@gmail.com> + + PR modula2/120188 + * lib/gm2-dg.exp (gm2-dg-frontend-configure-check): New function. + (gm2-dg-runtest): Add -O2 to the option_list. + * gm2.dg/doc/examples/plugin/fail/assignvalue.mod: New test. + * gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp: New test. + +2025-05-12 Thomas Schwinge <tschwinge@baylibre.com> + + * gcc.target/nvptx/march-map=sm_61.c: Adjust. + * gcc.target/nvptx/march-map=sm_62.c: Likewise. + * gcc.target/nvptx/march=sm_61.c: New. + +2025-05-12 Thomas Schwinge <tschwinge@baylibre.com> + + * gcc.target/nvptx/mptx=5.0.c: New. + +2025-05-12 Christophe Lyon <christophe.lyon@linaro.org> + + PR target/116445 + * gcc.target/arm/unsigned-extend-2.c: Fix dg directives. + +2025-05-12 Dongyan Chen <chendongyan@isrc.iscas.ac.cn> + + * gcc.target/riscv/arch-ss-1.c: New test. + * gcc.target/riscv/arch-ss-2.c: New test. + +2025-05-12 Dongyan Chen <chendongyan@isrc.iscas.ac.cn> + + * gcc.target/riscv/arch-zilsd-1.c: New. + * gcc.target/riscv/arch-zilsd-2.c: New. + * gcc.target/riscv/arch-zilsd-3.c: New. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * gcc.target/arm/ivopts.c: Remove test for iwmmxt + * lib/target-supports.exp + (check_effective_target_arm_iwmmxt_ok): Delete. + +2025-05-12 Richard Earnshaw <rearnsha@arm.com> + + * gcc.target/arm/mmx-1.c: Removed. + * gcc.target/arm/mmx-2.c: Removed. + * gcc.target/arm/pr64208.c: Removed. + * gcc.target/arm/pr79145.c: Removed. + * gcc.target/arm/pr99724.c: Removed. + * gcc.target/arm/pr99786.c: Removed. + +2025-05-12 Richard Biener <rguenther@suse.de> + + PR testsuite/120222 + * gcc.dg/tree-ssa/gen-vect-28.c: Use noipa on main_1. + +2025-05-12 Jiawei <jiawei@iscas.ac.cn> + + * gcc.target/riscv/arch-52.c: Fix regular expression. + +2025-05-12 Chao-ying Fu <cfu@wavecomp.com> + + * gcc.target/mips/pr54240.c: Scan phiopt2. + +2025-05-11 Jan Hubicka <hubicka@ucw.cz> + + * gcc.target/i386/pr91446.c: xfail. + * gcc.target/i386/pr99881.c: remove xfail. + +2025-05-11 Max Filippov <jcmvbkbc@gmail.com> + + * lib/target-supports.exp + (check_effective_target_xtensa_atomic): New function. + (check_effective_target_sync_int_long) + (check_effective_target_sync_char_short): Add test for xtensa. + +2025-05-11 Robert Dubner <rdubner@symas.com> + + * cobol.dg/group2/258_Nested_PERFORM.cob: New testcase. + * cobol.dg/group2/259_PERFORM_VARYING_BY_-0.2.cob: Likewise. + * cobol.dg/group2/338_Default_Arithmetic__1_.cob: Likewise. + * cobol.dg/group2/access_to_OPTIONAL_LINKAGE_item_not_passed.cob: Likewise. + * cobol.dg/group2/ALLOCATE___FREE_basic_default_versions.cob: Likewise. + * cobol.dg/group2/ALLOCATE___FREE_with_BASED_item__1_.cob: Likewise. + * cobol.dg/group2/ALLOCATE___FREE_with_BASED_item__2_.cob: Likewise. + * cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.cob: Likewise. + * cobol.dg/group2/Alphanumeric_and_binary_numeric.cob: Likewise. + * cobol.dg/group2/Alphanumeric_MOVE_with_truncation.cob: Likewise. + * cobol.dg/group2/ANY_LENGTH__1_.cob: Likewise. + * cobol.dg/group2/ANY_LENGTH__2_.cob: Likewise. + * cobol.dg/group2/ANY_LENGTH__3_.cob: Likewise. + * cobol.dg/group2/ANY_LENGTH__4_.cob: Likewise. + * cobol.dg/group2/ANY_LENGTH__5_.cob: Likewise. + * cobol.dg/group2/CALL_with_OMITTED_parameter.cob: Likewise. + * cobol.dg/group2/Class_check_with_reference_modification.cob: Likewise. + * cobol.dg/group2/Complex_HEX__VALUE_and_MOVE.cob: Likewise. + * cobol.dg/group2/Complex_IF.cob: Likewise. + * cobol.dg/group2/Concatenation_operator.cob: Likewise. + * cobol.dg/group2/CONTINUE_AFTER_1_SECONDS.cob: Likewise. + * cobol.dg/group2/CURRENCY_SIGN.cob: Likewise. + * cobol.dg/group2/CURRENCY_SIGN_WITH_PICTURE_SYMBOL.cob: Likewise. + * cobol.dg/group2/DECIMAL-POINT_is_COMMA__1_.cob: Likewise. + * cobol.dg/group2/DECIMAL-POINT_is_COMMA__2_.cob: Likewise. + * cobol.dg/group2/DECIMAL-POINT_is_COMMA__3_.cob: Likewise. + * cobol.dg/group2/DECIMAL-POINT_is_COMMA__4_.cob: Likewise. + * cobol.dg/group2/DECIMAL-POINT_is_COMMA__5_.cob: Likewise. + * cobol.dg/group2/EC-SIZE-TRUNCATION_EC-SIZE-OVERFLOW.cob: Likewise. + * cobol.dg/group2/EC-SIZE-ZERO-DIVIDE__fixed_and_float.cob: Likewise. + * cobol.dg/group2/EXIT_PARAGRAPH.cob: Likewise. + * cobol.dg/group2/EXIT_PERFORM.cob: Likewise. + * cobol.dg/group2/EXIT_PERFORM_CYCLE.cob: Likewise. + * cobol.dg/group2/EXIT_SECTION.cob: Likewise. + * cobol.dg/group2/Fixed_continuation_indicator.cob: Likewise. + * cobol.dg/group2/FLOAT-LONG_with_SIZE_ERROR.cob: Likewise. + * cobol.dg/group2/FLOAT-SHORT___FLOAT-LONG_w_o_SIZE_ERROR.cob: Likewise. + * cobol.dg/group2/FLOAT-SHORT_with_SIZE_ERROR.cob: Likewise. + * cobol.dg/group2/Index_and_parenthesized_expression.cob: Likewise. + * cobol.dg/group2/LENGTH_OF_omnibus.cob: Likewise. + * cobol.dg/group2/LOCAL-STORAGE__3__with_recursive_PROGRAM-ID.cob: Likewise. + * cobol.dg/group2/LOCAL-STORAGE__4__with_recursive_PROGRAM-ID_..._USING.cob: Likewise. + * cobol.dg/group2/MOVE_indexes.cob: Likewise. + * cobol.dg/group2/MOVE_integer_literal_to_alphanumeric.cob: Likewise. + * cobol.dg/group2/MOVE_to_edited_item__1_.cob: Likewise. + * cobol.dg/group2/MOVE_to_edited_item__2_.cob: Likewise. + * cobol.dg/group2/MOVE_to_item_with_simple_and_floating_insertion.cob: Likewise. + * cobol.dg/group2/MOVE_to_itself.cob: Likewise. + * cobol.dg/group2/MOVE_to_JUSTIFIED_item.cob: Likewise. + * cobol.dg/group2/MOVE_with_group_refmod.cob: Likewise. + * cobol.dg/group2/MOVE_with_refmod.cob: Likewise. + * cobol.dg/group2/MOVE_with_refmod__variable_.cob: Likewise. + * cobol.dg/group2/MOVE_Z_literal_.cob: Likewise. + * cobol.dg/group2/Multi-target_MOVE_with_subscript_re-evaluation.cob: Likewise. + * cobol.dg/group2/Non-numeric_data_in_numeric_items__1_.cob: Likewise. + * cobol.dg/group2/Non-numeric_data_in_numeric_items__2_.cob: Likewise. + * cobol.dg/group2/Non-overflow_after_overflow.cob: Likewise. + * cobol.dg/group2/OCCURS_clause_with_1_entry.cob: Likewise. + * cobol.dg/group2/OSVS_Arithmetic_Test__2_.cob: Likewise. + * cobol.dg/group2/PERFORM_..._CONTINUE.cob: Likewise. + * cobol.dg/group2/PERFORM_inline__1_.cob: Likewise. + * cobol.dg/group2/PERFORM_inline__2_.cob: Likewise. + * cobol.dg/group2/PERFORM_type_OSVS.cob: Likewise. + * cobol.dg/group2/PIC_ZZZ-__ZZZ_.cob: Likewise. + * cobol.dg/group2/Quick_check_of_PIC_XX_COMP-5.cob: Likewise. + * cobol.dg/group2/Quote_marks_in_comment_paragraphs.cob: Likewise. + * cobol.dg/group2/Recursive_PERFORM_paragraph.cob: Likewise. + * cobol.dg/group2/REDEFINES_values_on_FILLER_and_INITIALIZE.cob: Likewise. + * cobol.dg/group2/SORT__EBCDIC_table_sort__1_.cob: Likewise. + * cobol.dg/group2/SORT__EBCDIC_table_sort__2_.cob: Likewise. + * cobol.dg/group2/SORT__table_sort__2_.cob: Likewise. + * cobol.dg/group2/SORT__table_sort__3A_.cob: Likewise. + * cobol.dg/group2/SORT__table_sort__3B_.cob: Likewise. + * cobol.dg/group2/SORT__table_sort.cob: Likewise. + * cobol.dg/group2/SOURCE_FIXED_FREE_directives.cob: Likewise. + * cobol.dg/group2/Static_CALL_with_ON_EXCEPTION__with_-fno-static-call_.cob: Likewise. + * cobol.dg/group2/_-static__compilation.cob: Likewise. + * cobol.dg/group2/STOP_RUN_WITH_ERROR_STATUS.cob: Likewise. + * cobol.dg/group2/STOP_RUN_WITH_NORMAL_STATUS.cob: Likewise. + * cobol.dg/group2/STRING___UNSTRING__NOT__ON_OVERFLOW.cob: Likewise. + * cobol.dg/group2/STRING_with_subscript_reference.cob: Likewise. + * cobol.dg/group2/UNSTRING_DELIMITED_ALL_LOW-VALUE.cob: Likewise. + * cobol.dg/group2/UNSTRING_DELIMITED_ALL_SPACE-2.cob: Likewise. + * cobol.dg/group2/UNSTRING_DELIMITED_POINTER.cob: Likewise. + * cobol.dg/group2/UNSTRING_DELIMITER_IN.cob: Likewise. + * cobol.dg/group2/UNSTRING_with_FUNCTION___literal.cob: Likewise. + * cobol.dg/group2/258_Nested_PERFORM.out: Known-good results file. + * cobol.dg/group2/259_PERFORM_VARYING_BY_-0.2.out: Likewise. + * cobol.dg/group2/338_Default_Arithmetic__1_.out: Likewise. + * cobol.dg/group2/access_to_OPTIONAL_LINKAGE_item_not_passed.out: Likewise. + * cobol.dg/group2/ALLOCATE___FREE_basic_default_versions.out: Likewise. + * cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.out: Likewise. + * cobol.dg/group2/Alphanumeric_MOVE_with_truncation.out: Likewise. + * cobol.dg/group2/ANY_LENGTH__1_.out: Likewise. + * cobol.dg/group2/ANY_LENGTH__2_.out: Likewise. + * cobol.dg/group2/ANY_LENGTH__3_.out: Likewise. + * cobol.dg/group2/ANY_LENGTH__5_.out: Likewise. + * cobol.dg/group2/CALL_with_OMITTED_parameter.out: Likewise. + * cobol.dg/group2/Complex_HEX__VALUE_and_MOVE.out: Likewise. + * cobol.dg/group2/Complex_IF.out: Likewise. + * cobol.dg/group2/Concatenation_operator.out: Likewise. + * cobol.dg/group2/CONTINUE_AFTER_1_SECONDS.out: Likewise. + * cobol.dg/group2/CURRENCY_SIGN.out: Likewise. + * cobol.dg/group2/CURRENCY_SIGN_WITH_PICTURE_SYMBOL.out: Likewise. + * cobol.dg/group2/DECIMAL-POINT_is_COMMA__1_.out: Likewise. + * cobol.dg/group2/DECIMAL-POINT_is_COMMA__2_.out: Likewise. + * cobol.dg/group2/DECIMAL-POINT_is_COMMA__3_.out: Likewise. + * cobol.dg/group2/DECIMAL-POINT_is_COMMA__4_.out: Likewise. + * cobol.dg/group2/DECIMAL-POINT_is_COMMA__5_.out: Likewise. + * cobol.dg/group2/EC-SIZE-TRUNCATION_EC-SIZE-OVERFLOW.out: Likewise. + * cobol.dg/group2/EC-SIZE-ZERO-DIVIDE__fixed_and_float.out: Likewise. + * cobol.dg/group2/EXIT_PERFORM_CYCLE.out: Likewise. + * cobol.dg/group2/EXIT_PERFORM.out: Likewise. + * cobol.dg/group2/Fixed_continuation_indicator.out: Likewise. + * cobol.dg/group2/FLOAT-LONG_with_SIZE_ERROR.out: Likewise. + * cobol.dg/group2/FLOAT-SHORT___FLOAT-LONG_w_o_SIZE_ERROR.out: Likewise. + * cobol.dg/group2/FLOAT-SHORT_with_SIZE_ERROR.out: Likewise. + * cobol.dg/group2/Index_and_parenthesized_expression.out: Likewise. + * cobol.dg/group2/LENGTH_OF_omnibus.out: Likewise. + * cobol.dg/group2/LOCAL-STORAGE__3__with_recursive_PROGRAM-ID.out: Likewise. + * cobol.dg/group2/LOCAL-STORAGE__4__with_recursive_PROGRAM-ID_..._USING.out: Likewise. + * cobol.dg/group2/MOVE_integer_literal_to_alphanumeric.out: Likewise. + * cobol.dg/group2/MOVE_to_edited_item__1_.out: Likewise. + * cobol.dg/group2/MOVE_to_edited_item__2_.out: Likewise. + * cobol.dg/group2/MOVE_to_item_with_simple_and_floating_insertion.out: Likewise. + * cobol.dg/group2/MOVE_to_JUSTIFIED_item.out: Likewise. + * cobol.dg/group2/MOVE_Z_literal_.out: Likewise. + * cobol.dg/group2/Multi-target_MOVE_with_subscript_re-evaluation.out: Likewise. + * cobol.dg/group2/Non-numeric_data_in_numeric_items__1_.out: Likewise. + * cobol.dg/group2/Non-numeric_data_in_numeric_items__2_.out: Likewise. + * cobol.dg/group2/OSVS_Arithmetic_Test__2_.out: Likewise. + * cobol.dg/group2/Quick_check_of_PIC_XX_COMP-5.out: Likewise. + * cobol.dg/group2/Quote_marks_in_comment_paragraphs.out: Likewise. + * cobol.dg/group2/Recursive_PERFORM_paragraph.out: Likewise. + * cobol.dg/group2/REDEFINES_values_on_FILLER_and_INITIALIZE.out: Likewise. + * cobol.dg/group2/SORT__table_sort__2_.out: Likewise. + * cobol.dg/group2/SORT__table_sort__3A_.out: Likewise. + * cobol.dg/group2/SORT__table_sort__3B_.out: Likewise. + * cobol.dg/group2/SOURCE_FIXED_FREE_directives.out: Likewise. + * cobol.dg/group2/Static_CALL_with_ON_EXCEPTION__with_-fno-static-call_.out: Likewise. + * cobol.dg/group2/_-static__compilation.out: Likewise. + * cobol.dg/group2/STRING___UNSTRING__NOT__ON_OVERFLOW.out: Likewise. + * cobol.dg/group2/UNSTRING_with_FUNCTION___literal.out: Likewise. + +2025-05-11 Richard Biener <rguenther@suse.de> + + PR tree-optimization/120211 + * gcc.dg/vect/vect-early-break_135-pr120211.c: New testcase. + * gcc.dg/torture/pr120211-1.c: Likewise. + +2025-05-11 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/120163 + * gfortran.dg/interface_61.f90: New test. + +2025-05-11 Jiawei <jiawei@iscas.ac.cn> + + * gcc.target/riscv/arch-53.c: New test. + * gcc.target/riscv/arch-54.c: New test. + +2025-05-11 Jiawei <jiawei@iscas.ac.cn> + + * gcc.target/riscv/arch-49.c: New test. + * gcc.target/riscv/arch-50.c: New test. + * gcc.target/riscv/arch-51.c: New test. + * gcc.target/riscv/arch-52.c: New test. + +2025-05-11 Andrew Pinski <quic_apinski@quicinc.com> + + PR testsuite/119909 + * gcc.dg/torture/pr119131-1.c: Add -Wno-psabi. + 2025-05-10 Robert Dubner <rdubner@symas.com> * cobol.dg/group1/simple-if.cob: Make explicitly >>SOURCE FREE diff --git a/gcc/testsuite/c-c++-common/pr118868-1.c b/gcc/testsuite/c-c++-common/pr118868-1.c new file mode 100644 index 0000000..d0a9e77f7 --- /dev/null +++ b/gcc/testsuite/c-c++-common/pr118868-1.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ + +/* PR middle-end/118868 */ + +/* __builtin_assoc_barrier should work on pointers without any ICE */ +void *f(void *a) +{ + return __builtin_assoc_barrier(a); +} diff --git a/gcc/testsuite/cobol.dg/group1/check_88.cob b/gcc/testsuite/cobol.dg/group1/check_88.cob index 4a7723e..18a299f 100644 --- a/gcc/testsuite/cobol.dg/group1/check_88.cob +++ b/gcc/testsuite/cobol.dg/group1/check_88.cob @@ -3,25 +3,25 @@ *> { dg-output {\-> <\-(\n|\r\n|\r)} } *> { dg-output {\->"""<\-(\n|\r\n|\r)} } *> { dg-output {\->000<\-(\n|\r\n|\r)} } -*> { dg-output {\->ÿÿÿ<\-(\n|\r\n|\r)} } +*> { dg-output {\->.*<\-(\n|\r\n|\r)} } *> { dg-output { (\n|\r\n|\r)} } *> { dg-output {\-><\-(\n|\r\n|\r)} } *> { dg-output {\-> <\-(\n|\r\n|\r)} } *> { dg-output {\->""""<\-(\n|\r\n|\r)} } *> { dg-output {\->0000<\-(\n|\r\n|\r)} } -*> { dg-output {\->ÿÿÿÿ<\-(\n|\r\n|\r)} } +*> { dg-output {\->.*<\-(\n|\r\n|\r)} } *> { dg-output { (\n|\r\n|\r)} } *> { dg-output {There should be no garbage after character 32(\n|\r\n|\r)} } *> { dg-output {\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\*\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-(\n|\r\n|\r)} } -*> { dg-output {üüüüüüüüüüüüüüüüüüü Bundesstraße (\n|\r\n|\r)} } -*> { dg-output {üüüüüüüüüüüüüüüüüüü Bundesstraße (\n|\r\n|\r)} } +*> { dg-output {.* Bundesstra.e (\n|\r\n|\r)} } +*> { dg-output {.* Bundesstra.e (\n|\r\n|\r)} } *> { dg-output { (\n|\r\n|\r)} } *> { dg-output {There should be no spaces before the final quote(\n|\r\n|\r)} } -*> { dg-output {"üüüüüüüüüüüüüüüüüüü Bundesstraße"(\n|\r\n|\r)} } +*> { dg-output {".* Bundesstraße"(\n|\r\n|\r)} } *> { dg-output { (\n|\r\n|\r)} } *> { dg-output { IsLow ""(\n|\r\n|\r)} } *> { dg-output { IsZero "000"(\n|\r\n|\r)} } -*> { dg-output { IsHi "ÿÿÿ"(\n|\r\n|\r)} } +*> { dg-output { IsHi ".*"(\n|\r\n|\r)} } *> { dg-output { IsBob "bob"(\n|\r\n|\r)} } *> { dg-output { IsQuote """""(\n|\r\n|\r)} } *> { dg-output { IsSpace " "(\n|\r\n|\r)} } diff --git a/gcc/testsuite/cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.cob b/gcc/testsuite/cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.cob index 6fab992..a5ef3a8 100644 --- a/gcc/testsuite/cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.cob +++ b/gcc/testsuite/cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.cob @@ -81,12 +81,13 @@ 02 based-x pic x(24) value "I am I, Don Quixote". 02 based-9 pic 999 value 123. 02 based-p pointer value NULL. + 01 pval redefines based-var pointer. 01 allocated-pointer pointer. procedure division. display "allocate characters (ISO 2023 Rule 8: OPT_INIT if specified, otherwise defaultbyte, otherwise zero)" allocate 35 characters returning allocated-pointer set address of based-var to allocated-pointer - call "reporter" using based-var + display pval free allocated-pointer goback. end program prog-high. diff --git a/gcc/testsuite/cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.out b/gcc/testsuite/cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.out index c141fdf..ea05e96 100644 --- a/gcc/testsuite/cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.out +++ b/gcc/testsuite/cobol.dg/group2/ALLOCATE_Rule_8_OPTION_INITIALIZE_with_figconst.out @@ -12,6 +12,5 @@ allocate characters (ISO 2023 Rule 8: OPT_INIT if specified, otherwise defaultb " " " " 0x2020202020202020 initialize high-value allocate characters (ISO 2023 Rule 8: OPT_INIT if specified, otherwise defaultbyte, otherwise zero) - (1) as allocated - "ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ" "¿¿¿" 0xffffffffffffffff +0xffffffffffffffff diff --git a/gcc/testsuite/cobol.dg/group2/INSPECT_CONVERTING_TO_figurative_constants.cob b/gcc/testsuite/cobol.dg/group2/INSPECT_CONVERTING_TO_figurative_constants.cob index 2983cce..91440f5 100644 --- a/gcc/testsuite/cobol.dg/group2/INSPECT_CONVERTING_TO_figurative_constants.cob +++ b/gcc/testsuite/cobol.dg/group2/INSPECT_CONVERTING_TO_figurative_constants.cob @@ -1,27 +1,27 @@ *> { dg-do run } *> { dg-output-file "group2/INSPECT_CONVERTING_TO_figurative_constants.out" } - identification division. program-id. clouseau. data division. working-storage section. 01 item pic x(12). + 01 pitem redefines item pointer. procedure division. move all "abcd" to item inspect item converting "abcd" to low-values - display "low-values " space """" item """" + display "low-values " space """" pitem """" move all "abcd" to item inspect item converting "abcd" to spaces - display "spaces " space """" item """" + display "spaces " space """" pitem """" move all "abcd" to item inspect item converting "abcd" to zeros - display "zeros " space """" item """" + display "zeros " space """" pitem """" move all "abcd" to item inspect item converting "abcd" to quotes - display "quotes " space """" item """" + display "quotes " space """" pitem """" move all "abcd" to item inspect item converting "abcd" to high-values - display "high-values" space """" item """" + display "high-values" space """" pitem """" goback. end program clouseau. diff --git a/gcc/testsuite/cobol.dg/group2/INSPECT_CONVERTING_TO_figurative_constants.out b/gcc/testsuite/cobol.dg/group2/INSPECT_CONVERTING_TO_figurative_constants.out index 7de6e48..23ce49b 100644 --- a/gcc/testsuite/cobol.dg/group2/INSPECT_CONVERTING_TO_figurative_constants.out +++ b/gcc/testsuite/cobol.dg/group2/INSPECT_CONVERTING_TO_figurative_constants.out @@ -1,6 +1,6 @@ -low-values "" -spaces " " -zeros "000000000000" -quotes """""""""""""" -high-values "ÿÿÿÿÿÿÿÿÿÿÿÿ" +low-values "0x0000000000000000" +spaces "0x2020202020202020" +zeros "0x3030303030303030" +quotes "0x2222222222222222" +high-values "0xffffffffffffffff" diff --git a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_1.cob b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_1.cob index 1bbdea4..2f306f1 100644 --- a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_1.cob +++ b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_1.cob @@ -25,7 +25,7 @@ Move ' EFABDBCGABEFGG 0301010005TUXYXVWRXYZZPZ' to row(1). Move ' BABABC 0200000101SXYXYZ' to row(3). Move ' BBBC 0001000200SSVW' to row(5). -` + compute rowlim = 2*rows - 1 Display ' INPUT C0 C1 C2 C3 C4 OUTPUT' diff --git a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_2.cob b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_2.cob index a464101..0e4297d 100644 --- a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_2.cob +++ b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_2.cob @@ -25,7 +25,7 @@ *> the observed outputs Move ' BBB 0300ZZZ' to row(1). Move ' ABA 0300ZZZ' to row(3). -` + compute rowlim = 2*rows - 1 Display ' INPUT C0 C1 OUTPUT' diff --git a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_3.cob b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_3.cob index 7111e9c..0b6c00c 100644 --- a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_3.cob +++ b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_3.cob @@ -19,7 +19,7 @@ Move ' ADDDDA 000005AZZZZZ' to row(5). Move ' CDDDDC 000000CDDDDC' to row(7). Move ' BDBBBDB 000300BDWWWDB' to row(9). -` + Display ' INPUT C0 C1 C2 OUTPUT' Display ' -------------------- -- -- -- --------------------' Perform Example-3 with test after diff --git a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_4.cob b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_4.cob index 192e1a8..03a0b07 100644 --- a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_4.cob +++ b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_4.cob @@ -24,7 +24,7 @@ *> Even-numbered rows are modified by the INSPECT statements and contain *> the observed outputs Move ' ABABABABC 01ABABXYABC' to row(1). -` + compute rowlim = 2*rows - 1 Display ' INPUT C0 C1 OUTPUT' diff --git a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_5-f.cob b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_5-f.cob index 0923720..5ef97e1 100644 --- a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_5-f.cob +++ b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_5-f.cob @@ -30,7 +30,7 @@ Move ' ABABBCAB 000106ABABBCXY' to row(1). Move ' ABDBABC 000001AVDBABC' to row(3). Move ' BCABCABD 010000BCABCAVD' to row(5). -` + compute rowlim = 2*rows - 1 Display ' INPUT C0 C1 C2 OUTPUT' diff --git a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_6.cob b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_6.cob index 75917a2..40cecfc 100644 --- a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_6.cob +++ b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_6.cob @@ -22,7 +22,7 @@ *> Even-numbered rows are modified by the INSPECT statements and contain *> the observed outputs Move ' AC"AEBDFBCD#AB"D AC"XEYXFYZX#AB"D' to row(1). -` + compute rowlim = 2*rows - 1 Display ' INPUT OUTPUT' diff --git a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_7.cob b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_7.cob index ca2ae71..abf9eb9 100644 --- a/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_7.cob +++ b/gcc/testsuite/cobol.dg/group2/INSPECT_ISO_Example_7.cob @@ -27,7 +27,7 @@ Move ' 415-245-1212 415-245-1212' to row(1). Move ' 415-CH5-1212 415-??5-1212' to row(3). Move ' 20%Numeric 20%???????' to row(5). -` + compute rowlim = 2*rows - 1 Display ' INPUT OUTPUT' diff --git a/gcc/testsuite/cobol.dg/group2/Multiple_INDEXED_BY_variables_with_the_same_name.cob b/gcc/testsuite/cobol.dg/group2/Multiple_INDEXED_BY_variables_with_the_same_name.cob new file mode 100644 index 0000000..4bcc06c --- /dev/null +++ b/gcc/testsuite/cobol.dg/group2/Multiple_INDEXED_BY_variables_with_the_same_name.cob @@ -0,0 +1,24 @@ + *> { dg-do run } + *> { dg-output-file "group2/Multiple_INDEXED_BY_variables_with_the_same_name.out" } + IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + DATA DIVISION. + WORKING-STORAGE SECTION. + 01 GROUP-1-TABLE. + 05 TABLE-LEVEL-1 VALUE "ABCDEFGHIJKLMNO". + 06 TABLE-ITEM PICTURE X OCCURS 15 TIMES INDEXED BY IND. + 88 EQUALS-M VALUE "M". + 01 GROUP-2-TABLE. + 05 TABLE-LEVEL-1 VALUE "abcdefghijklmno". + 06 TABLE-ITEM PICTURE X OCCURS 15 TIMES INDEXED BY IND. + 88 EQUALS-M VALUE "M". + PROCEDURE DIVISION. + set IND OF GROUP-1-TABLE to 2 + set IND OF GROUP-2-TABLE to 4 + display "The output should be ""Db""" + display "The output is " """" + TABLE-ITEM of GROUP-1-TABLE(IND OF GROUP-2-TABLE) + TABLE-ITEM of GROUP-2-TABLE(IND OF GROUP-1-TABLE) + """" + goback. + diff --git a/gcc/testsuite/cobol.dg/group2/Multiple_INDEXED_BY_variables_with_the_same_name.out b/gcc/testsuite/cobol.dg/group2/Multiple_INDEXED_BY_variables_with_the_same_name.out new file mode 100644 index 0000000..c4d70c9 --- /dev/null +++ b/gcc/testsuite/cobol.dg/group2/Multiple_INDEXED_BY_variables_with_the_same_name.out @@ -0,0 +1,3 @@ +The output should be "Db" +The output is "Db" + diff --git a/gcc/testsuite/g++.dg/abi/base-defaulted2.C b/gcc/testsuite/g++.dg/abi/base-defaulted2.C new file mode 100644 index 0000000..9652ae6 --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/base-defaulted2.C @@ -0,0 +1,12 @@ +// { dg-do compile { target c++11 } } +// { dg-additional-options "-fabi-version=20 -Wabi" } + +struct Base { +protected: + Base() = default; + ~Base() = default; +}; + +struct Derived : Base { + void* ptr; // { dg-bogus "offset" } +}; diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice33.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice33.C new file mode 100644 index 0000000..8564286 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice33.C @@ -0,0 +1,12 @@ +// PR c++/120126 +// { dg-do compile { target c++11 } } + +template <typename... Args> +int sum(Args... args) { + return [args...] { // { dg-error "parameter packs not expanded with" } + typename decltype(args)::type temp; + }; +} +int main() { + sum(1, 10); +} diff --git a/gcc/testsuite/g++.dg/modules/clone-4_a.C b/gcc/testsuite/g++.dg/modules/clone-4_a.C new file mode 100644 index 0000000..3ee6109 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/clone-4_a.C @@ -0,0 +1,12 @@ +// PR c++/120125 +// { dg-additional-options "-fmodules -fdeclone-ctor-dtor" } +// { dg-module-cmi M } + +export module M; + +void foo(); +export template <typename _Tp> struct __shared_ptr { + inline __shared_ptr() { foo(); } +}; + +template class __shared_ptr<int>; diff --git a/gcc/testsuite/g++.dg/modules/clone-4_b.C b/gcc/testsuite/g++.dg/modules/clone-4_b.C new file mode 100644 index 0000000..1b36cb4 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/clone-4_b.C @@ -0,0 +1,12 @@ +// PR c++/120125 +// { dg-additional-options "-fmodules -fdeclone-ctor-dtor" } + +import M; + +int main() { + __shared_ptr<int> s1; + __shared_ptr<double> s2; +} + +// { dg-final { scan-assembler-not {_ZNW1M12__shared_ptrIiEC[1-4]Ev:} } } +// { dg-final { scan-assembler {_ZNW1M12__shared_ptrIdEC2Ev:} } } diff --git a/gcc/testsuite/g++.dg/modules/modules.exp b/gcc/testsuite/g++.dg/modules/modules.exp index 81d0beb..73b5de1 100644 --- a/gcc/testsuite/g++.dg/modules/modules.exp +++ b/gcc/testsuite/g++.dg/modules/modules.exp @@ -36,7 +36,6 @@ if ![info exists DEFAULT_CXXFLAGS] then { set DEFAULT_CXXFLAGS " -pedantic-errors -Wno-long-long" } set DEFAULT_MODFLAGS $DEFAULT_CXXFLAGS -set MOD_STD_LIST { 17 2a 2b } dg-init @@ -261,44 +260,16 @@ proc srcdir {} { return $testdir } -# Return set of std options to iterate over, taken from g++-dg.exp & compat.exp +# Return set of std options to iterate over. proc module-init { src } { - set tmp [dg-get-options $src] - set option_list {} - set have_std 0 - set std_prefix "-std=c++" + set option_list [g++-std-flags $src] global extra_tool_flags set extra_tool_flags {} - global MOD_STD_LIST - - foreach op $tmp { - switch [lindex $op 0] { - "dg-options" { - set std_prefix "-std=gnu++" - if { [string match "*-std=*" [lindex $op 2]] } { - set have_std 1 - } - eval lappend extra_tool_flags [lindex $op 2] - } - "dg-additional-options" { - if { [string match "*-std=*" [lindex $op 2]] } { - set have_std 1 - } - eval lappend extra_tool_flags [lindex $op 2] - } - } - } - if { $have_std } { - lappend option_list "" - } elseif { [string match "*xtreme*" $src] } { + if { [llength $option_list] + && [string match "*xtreme*" $src] } { # Only run the xtreme tests once. - set x [lindex $MOD_STD_LIST end] - lappend option_list "${std_prefix}$x" - } else { - foreach x $MOD_STD_LIST { - lappend option_list "${std_prefix}$x" - } + set option_list [lrange [lsort $option_list] end end] } return $option_list diff --git a/gcc/testsuite/g++.dg/modules/openmp-1.C b/gcc/testsuite/g++.dg/modules/openmp-1.C new file mode 100644 index 0000000..b5a30ad --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/openmp-1.C @@ -0,0 +1,9 @@ +// PR c++/119864 +// { dg-do assemble } +// { dg-additional-options "-fmodules -fopenmp" } +// { dg-require-effective-target "fopenmp" } + +export module M; + +int foo(); +int x = foo(); diff --git a/gcc/testsuite/g++.dg/modules/tpl-friend-19_a.C b/gcc/testsuite/g++.dg/modules/tpl-friend-19_a.C new file mode 100644 index 0000000..59f0175 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/tpl-friend-19_a.C @@ -0,0 +1,16 @@ +// { dg-additional-options "-fmodules -Wno-global-module" } +// { dg-module-cmi M } + +module; + +template <typename _MemFunPtr> +class _Mem_fn_base { + template <typename> friend struct _Bind_check_arity; +}; + +template <typename> struct _Bind_check_arity {}; + +export module M; + +template struct _Bind_check_arity<int>; +export _Mem_fn_base<int> mem_fn(); diff --git a/gcc/testsuite/g++.dg/modules/tpl-friend-19_b.C b/gcc/testsuite/g++.dg/modules/tpl-friend-19_b.C new file mode 100644 index 0000000..ce99647 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/tpl-friend-19_b.C @@ -0,0 +1,6 @@ +// { dg-additional-options "-fmodules" } + +import M; +int main() { + mem_fn(); +} diff --git a/gcc/testsuite/g++.dg/opt/pr96780_cpp23.C b/gcc/testsuite/g++.dg/opt/pr96780_cpp23.C new file mode 100644 index 0000000..ba4a837 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/pr96780_cpp23.C @@ -0,0 +1,16 @@ +// PR c++/96780 +// Verify calls to std::move/forward are folded away by the frontend. +// { dg-do compile { target c++23 } } +// { dg-additional-options "-ffold-simple-inlines -fdump-tree-gimple" } + +#include <utility> + +enum class A : char {a}; + +extern A& x; + +void f() { + auto&& x1 = std::to_underlying(x); +} + +// { dg-final { scan-tree-dump-not "= std::to_underlying" "gimple" } } diff --git a/gcc/testsuite/g++.dg/template/unify13.C b/gcc/testsuite/g++.dg/template/unify13.C new file mode 100644 index 0000000..ec7ca9d --- /dev/null +++ b/gcc/testsuite/g++.dg/template/unify13.C @@ -0,0 +1,18 @@ +// PR c++/120161 + +template<class T, class U> +struct mp_list { }; + +template<class T> +struct Wrap { struct type { }; }; + +struct A : mp_list<Wrap<int>::type, void> + , mp_list<Wrap<long>::type, void> { }; + +template<class U> +void f(mp_list<Wrap<int>::type, U>*); + +int main() { + A a; + f(&a); +} diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr119903-1.C b/gcc/testsuite/g++.dg/tree-ssa/pr119903-1.C new file mode 100644 index 0000000..605f989 --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/pr119903-1.C @@ -0,0 +1,24 @@ +// { dg-do compile { target c++11 } } +// { dg-options "-O2 -fnon-call-exceptions -ftrapping-math -fdump-tree-optimized-eh" } + +// PR tree-optimization/119903 +// match and simplify would cause the internal throwable fp comparison +// to become only external throwable and lose the landing pad. + +int f() noexcept; +int g() noexcept; + +int m(double a) +{ + try { + if (a < 1.0) + return f(); + return g(); + }catch(...) + { + return -1; + } +} + +// Make sure There is a landing pad for the non-call exception from the comparison. +// { dg-final { scan-tree-dump "LP " "optimized" } } diff --git a/gcc/testsuite/g++.dg/warn/ignore-virtual-move-assign.C b/gcc/testsuite/g++.dg/warn/ignore-virtual-move-assign.C new file mode 100644 index 0000000..73922e6 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/ignore-virtual-move-assign.C @@ -0,0 +1,45 @@ +// { dg-do compile { target c++11 } } +// { dg-options "-Wvirtual-move-assign -Wattributes" } + +#include <utility> + +class A +{ + int val; + +public: + explicit A (int val) : val (val) {} + + A (const A &oth) : val (0) {} + A &operator= (const A &oth) { return *this; } + A (A &&oth) : val (oth.val) { oth.val = 0; } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvirtual-move-assign" + A &operator= (A &&oth) + { + val += oth.val; + oth.val = 0; + return *this; + } +#pragma GCC diagnostic pop +}; + +class B : virtual A +{ +public: + B () : A (12) {} + B &operator= (B &&) = default; +}; + +class C : virtual A +{ +public: + C () : A (12) {} +}; + +void +test_fn () +{ + C x, y; + x = std::move (y); +} diff --git a/gcc/testsuite/gcc.dg/html-output/missing-semicolon.py b/gcc/testsuite/gcc.dg/html-output/missing-semicolon.py index 8687168..8ac1f14 100644 --- a/gcc/testsuite/gcc.dg/html-output/missing-semicolon.py +++ b/gcc/testsuite/gcc.dg/html-output/missing-semicolon.py @@ -60,7 +60,8 @@ def test_basics(html_tree): pre = diag.find('xhtml:pre', ns) assert pre is not None - assert pre.attrib['class'] == 'gcc-annotated-source' + assert pre.attrib['class'] == 'gcc-generated-patch' + assert pre.text.startswith('--- ') # For reference, here's the generated HTML: """ @@ -76,7 +77,9 @@ def test_basics(html_tree): <div class="gcc-diagnostic-list"> <div class="gcc-diagnostic"> <span class="gcc-message">expected '<span class="gcc-quoted-text">;</span>' before '<span class="gcc-quoted-text">}</span>' token</span> - <pre class="gcc-annotated-source"></pre> + <pre class="gcc-generated-patch"> + [...snip...] + </pre> </div> </div> </body> diff --git a/gcc/testsuite/gcc.dg/ipa/pr120044-1.c b/gcc/testsuite/gcc.dg/ipa/pr120044-1.c new file mode 100644 index 0000000..f9fee3e --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/pr120044-1.c @@ -0,0 +1,17 @@ +/* { dg-do run } */ +/* { dg-options "-O3 -fno-early-inlining -fno-tree-fre -fno-tree-pre -fno-code-hoisting -fno-inline" } */ + +struct a { + int b; +} const c; +void d(char p, struct a e) { + while (e.b) + ; +} +static unsigned short f(const struct a g) { + d(g.b, g); + return g.b; +} +int main() { + return f(c); +} diff --git a/gcc/testsuite/gcc.dg/ipa/pr120044-2.c b/gcc/testsuite/gcc.dg/ipa/pr120044-2.c new file mode 100644 index 0000000..5130791 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/pr120044-2.c @@ -0,0 +1,17 @@ +/* { dg-do run } */ +/* { dg-options "-O3 -fno-early-inlining -fno-tree-fre -fno-tree-pre -fno-code-hoisting -fno-ipa-cp" } */ + +struct a { + int b; +} const c; +void d(char p, struct a e) { + while (e.b) + ; +} +static unsigned short f(const struct a g) { + d(g.b, g); + return g.b; +} +int main() { + return f(c); +} diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-html.c b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-html.c new file mode 100644 index 0000000..2499e8d --- /dev/null +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-html.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-fdiagnostics-set-output=experimental-html" } */ +/* { dg-additional-options "-fdiagnostics-show-caret" } */ + +extern char *gets (char *s); + +void test_cwe (void) +{ + char buf[1024]; + gets (buf); +} + +/* Use a Python script to verify various properties about the generated + HTML file: + { dg-final { run-html-pytest diagnostic-test-metadata-html.c "diagnostic-test-metadata-html.py" } } */ diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-html.py b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-html.py new file mode 100644 index 0000000..e475e95 --- /dev/null +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata-html.py @@ -0,0 +1,68 @@ +# Verify that metadata works in HTML output. + +from htmltest import * + +import pytest + +@pytest.fixture(scope='function', autouse=True) +def html_tree(): + return html_tree_from_env() + +XHTML = 'http://www.w3.org/1999/xhtml' +ns = {'xhtml': XHTML} + +def make_tag(local_name): + return f'{{{XHTML}}}' + local_name + +def test_metadata(html_tree): + root = html_tree.getroot () + assert root.tag == make_tag('html') + + body = root.find('xhtml:body', ns) + assert body is not None + + diag_list = body.find('xhtml:div', ns) + assert diag_list is not None + assert diag_list.attrib['class'] == 'gcc-diagnostic-list' + + diag = diag_list.find('xhtml:div', ns) + assert diag is not None + assert diag.attrib['class'] == 'gcc-diagnostic' + + spans = diag.findall('xhtml:span', ns) + metadata = spans[1] + assert metadata.attrib['class'] == 'gcc-metadata' + assert metadata[0].tag == make_tag('span') + assert metadata[0].attrib['class'] == 'gcc-metadata-item' + assert metadata[0].text == '[' + assert metadata[0][0].tag == make_tag('a') + assert metadata[0][0].attrib['href'] == 'https://cwe.mitre.org/data/definitions/242.html' + assert metadata[0][0].text == 'CWE-242' + assert metadata[0][0].tail == ']' + + assert metadata[1].tag == make_tag('span') + assert metadata[1].attrib['class'] == 'gcc-metadata-item' + assert metadata[1].text == '[' + assert metadata[1][0].tag == make_tag('a') + assert metadata[1][0].attrib['href'] == 'https://example.com/' + assert metadata[1][0].text == 'STR34-C' + assert metadata[1][0].tail == ']' + + src = diag.find('xhtml:pre', ns) + assert src.attrib['class'] == 'gcc-annotated-source' + assert src.text == ( + ' gets (buf);\n' + ' ^~~~~~~~~~\n') + +# For reference, here's the generated HTML: +""" + <body> + <div class="gcc-diagnostic-list"> + <div class="gcc-diagnostic"> + <span class="gcc-message">never use '<span class="gcc-quoted-text">gets</span>'</span> + <span class="gcc-metadata"><span class="gcc-metadata-item">[<a href="https://cwe.mitre.org/data/definitions/242.html">CWE-242</a>]</span><span class="gcc-metadata-item">[<a href="https://example.com/">STR34-C</a>]</span></span> + ...etc... + </div> + </div> + </body> +""" diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-2.c b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-2.c index b8134ae..26605f7 100644 --- a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-2.c +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fdiagnostics-show-caret -fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events" } */ +/* { dg-options "-fdiagnostics-show-caret -fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fdiagnostics-add-output=experimental-html" } */ #include <stddef.h> #include <stdlib.h> @@ -52,3 +52,7 @@ make_a_list_of_random_ints_badly(PyObject *self, | (3) when calling 'PyList_Append', passing NULL from (1) as argument 1 { dg-end-multiline-output "" } */ } + +/* Use a Python script to verify various properties about the generated + HTML file: + { dg-final { run-html-pytest diagnostic-test-paths-2.c "diagnostic-test-paths-2.py" } } */ diff --git a/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-2.py b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-2.py new file mode 100644 index 0000000..c212e49 --- /dev/null +++ b/gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-2.py @@ -0,0 +1,35 @@ +# Verify that execution paths work in HTML output. + +from htmltest import * + +import pytest + +@pytest.fixture(scope='function', autouse=True) +def html_tree(): + return html_tree_from_env() + +XHTML = 'http://www.w3.org/1999/xhtml' +ns = {'xhtml': XHTML} + +def make_tag(local_name): + return f'{{{XHTML}}}' + local_name + +def test_paths(html_tree): + root = html_tree.getroot () + assert root.tag == make_tag('html') + + body = root.find('xhtml:body', ns) + assert body is not None + + diag_list = body.find('xhtml:div', ns) + assert diag_list is not None + assert diag_list.attrib['class'] == 'gcc-diagnostic-list' + + diag = diag_list.find('xhtml:div', ns) + assert diag is not None + assert diag.attrib['class'] == 'gcc-diagnostic' + + pre = diag.findall('xhtml:pre', ns) + assert pre[0].attrib['class'] == 'gcc-annotated-source' + assert pre[1].attrib['class'] == 'gcc-execution-path' + assert pre[1].text.startswith(" 'make_a_list_of_random_ints_badly': events 1-3") diff --git a/gcc/testsuite/gcc.dg/plugin/plugin.exp b/gcc/testsuite/gcc.dg/plugin/plugin.exp index a84fbae..a066b67 100644 --- a/gcc/testsuite/gcc.dg/plugin/plugin.exp +++ b/gcc/testsuite/gcc.dg/plugin/plugin.exp @@ -105,6 +105,7 @@ set plugin_test_list [list \ diagnostic-test-inlining-4.c } \ { diagnostic_plugin_test_metadata.cc diagnostic-test-metadata.c \ + diagnostic-test-metadata-html.c \ diagnostic-test-metadata-sarif.c } \ { diagnostic_plugin_test_nesting.cc \ diagnostic-test-nesting-text-plain.c \ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c index 5c0ea58..4b3ce4e 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c @@ -9,7 +9,8 @@ /* unaligned store. */ -int main_1 (int off) +int __attribute__((noipa)) +main_1 (int off) { int i; char ia[N+OFF]; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr114864.c b/gcc/testsuite/gcc.dg/tree-ssa/pr114864.c new file mode 100644 index 0000000..cd9b94c --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr114864.c @@ -0,0 +1,15 @@ +/* { dg-do run } */ +/* { dg-options "-O1 -fno-tree-dce -fno-tree-fre" } */ + +struct a { + int b; +} const c; +void d(const struct a f) {} +void e(const struct a f) { + f.b == 0 ? 1 : f.b; + d(f); +} +int main() { + e(c); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp124.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp124.c new file mode 100644 index 0000000..789b550 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp124.c @@ -0,0 +1,31 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-evrp" } */ + +/* Test removal of trailing zero mask ranges from signed values. */ +/* Mask off the lower 4 bits of an integer. */ +#define MASK 0XF + +void dead (int c); +void keep(); + +/* A signed character should have a range something like : */ +/* int [-INF, -16][0, 0][16, 2147483632] MASK 0xfffffff0 VALUE 0x0 */ + +int +foo2 (int c) +{ + c = c & ~MASK; + if (c == 0) + return 0; + if (c > -16) + { + keep (); + if (c < 16) + dead (c); + } + if (c > (__INT_MAX__ & ~MASK)) + dead (c); + return 0; +} + +/* { dg-final { scan-tree-dump-not "dead" "evrp" } } */ diff --git a/gcc/testsuite/gcc.target/arm/ivopts.c b/gcc/testsuite/gcc.target/arm/ivopts.c index 582fdab..6e3e74c 100644 --- a/gcc/testsuite/gcc.target/arm/ivopts.c +++ b/gcc/testsuite/gcc.target/arm/ivopts.c @@ -12,5 +12,4 @@ tr5 (short array[], int n) /* { dg-final { scan-tree-dump-times "PHI <" 1 "ivopts"} } */ /* { dg-final { object-size text <= 20 { target { arm_thumb2_no_arm_v8_1m_lob } } } } */ -/* { dg-final { object-size text <= 32 { target { arm_nothumb && { ! arm_iwmmxt_ok } } } } } */ -/* { dg-final { object-size text <= 36 { target { arm_nothumb && arm_iwmmxt_ok } } } } */ +/* { dg-final { object-size text <= 32 { target { arm_nothumb } } } } */ diff --git a/gcc/testsuite/gcc.target/arm/mmx-1.c b/gcc/testsuite/gcc.target/arm/mmx-1.c deleted file mode 100644 index 8060dbd..0000000 --- a/gcc/testsuite/gcc.target/arm/mmx-1.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Verify that if IP is saved to ensure stack alignment, we don't load - it into sp. */ -/* { dg-do compile } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mcpu=*" } { "-mcpu=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mabi=*" } { "-mabi=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-march=*" } { "-march=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ -/* { dg-options "-O -mno-apcs-frame -mcpu=iwmmxt -mabi=iwmmxt" } */ -/* { dg-require-effective-target arm32 } */ -/* { dg-require-effective-target arm_iwmmxt_ok } */ -/* { dg-final { scan-assembler "push.*ip,\[ ]*pc" } } */ -/* { dg-skip-if "r9 is reserved in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */ - -/* This function uses all the call-saved registers, namely r4, r5, r6, - r7, r8, r9, sl, fp. Since we also save lr, that leaves an odd - number of registers, and the compiler will push ip to align the - stack. Make sure that we restore ip into ip, not into sp as is - done when using a frame pointer. The -mno-apcs-frame option - permits the frame pointer to be used as an ordinary register. */ - -void -foo(void) -{ - __asm volatile ("" : : : - "r4", "r5", "r6", "r7", "r8", "r9", "sl", "fp", "lr"); -} diff --git a/gcc/testsuite/gcc.target/arm/mmx-2.c b/gcc/testsuite/gcc.target/arm/mmx-2.c deleted file mode 100644 index 0540f65..0000000 --- a/gcc/testsuite/gcc.target/arm/mmx-2.c +++ /dev/null @@ -1,166 +0,0 @@ -/* { dg-do compile } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mcpu=*" } { "-mcpu=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mabi=*" } { "-mabi=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-march=*" } { "-march=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ -/* { dg-require-effective-target arm32 } */ -/* { dg-require-effective-target arm_iwmmxt_ok } */ -/* { dg-options "-mcpu=iwmmxt -flax-vector-conversions -std=gnu99" } */ - -/* Internal data types for implementing the intrinsics. */ -typedef int __v2si __attribute__ ((vector_size (8))); -typedef short __v4hi __attribute__ ((vector_size (8))); -typedef signed char __v8qi __attribute__ ((vector_size (8))); - -void -foo(void) -{ - volatile int isink; - volatile long long llsink; - volatile __v8qi v8sink; - volatile __v4hi v4sink; - volatile __v2si v2sink; - - isink = __builtin_arm_getwcgr0 (); - __builtin_arm_setwcgr0 (isink); - isink = __builtin_arm_getwcgr1 (); - __builtin_arm_setwcgr1 (isink); - isink = __builtin_arm_getwcgr2 (); - __builtin_arm_setwcgr2 (isink); - isink = __builtin_arm_getwcgr3 (); - __builtin_arm_setwcgr3 (isink); - - isink = __builtin_arm_textrmsb (v8sink, 0); - isink = __builtin_arm_textrmsh (v4sink, 0); - isink = __builtin_arm_textrmsw (v2sink, 0); - isink = __builtin_arm_textrmub (v8sink, 0); - isink = __builtin_arm_textrmuh (v4sink, 0); - isink = __builtin_arm_textrmuw (v2sink, 0); - v8sink = __builtin_arm_tinsrb (v8sink, isink, 0); - v4sink = __builtin_arm_tinsrh (v4sink, isink, 0); - v2sink = __builtin_arm_tinsrw (v2sink, isink, 0); - llsink = __builtin_arm_tmia (llsink, isink, isink); - llsink = __builtin_arm_tmiabb (llsink, isink, isink); - llsink = __builtin_arm_tmiabt (llsink, isink, isink); - llsink = __builtin_arm_tmiaph (llsink, isink, isink); - llsink = __builtin_arm_tmiatb (llsink, isink, isink); - llsink = __builtin_arm_tmiatt (llsink, isink, isink); - isink = __builtin_arm_tmovmskb (v8sink); - isink = __builtin_arm_tmovmskh (v4sink); - isink = __builtin_arm_tmovmskw (v2sink); - llsink = __builtin_arm_waccb (v8sink); - llsink = __builtin_arm_wacch (v4sink); - llsink = __builtin_arm_waccw (v2sink); - v8sink = __builtin_arm_waddb (v8sink, v8sink); - v8sink = __builtin_arm_waddbss (v8sink, v8sink); - v8sink = __builtin_arm_waddbus (v8sink, v8sink); - v4sink = __builtin_arm_waddh (v4sink, v4sink); - v4sink = __builtin_arm_waddhss (v4sink, v4sink); - v4sink = __builtin_arm_waddhus (v4sink, v4sink); - v2sink = __builtin_arm_waddw (v2sink, v2sink); - v2sink = __builtin_arm_waddwss (v2sink, v2sink); - v2sink = __builtin_arm_waddwus (v2sink, v2sink); - v8sink = __builtin_arm_walign (v8sink, v8sink, 0); /* waligni: 3-bit immediate. */ - v8sink = __builtin_arm_walign (v8sink, v8sink, isink); /* walignr: GP register. */ - llsink = __builtin_arm_wand(llsink, llsink); - llsink = __builtin_arm_wandn (llsink, llsink); - v8sink = __builtin_arm_wavg2b (v8sink, v8sink); - v8sink = __builtin_arm_wavg2br (v8sink, v8sink); - v4sink = __builtin_arm_wavg2h (v4sink, v4sink); - v4sink = __builtin_arm_wavg2hr (v4sink, v4sink); - v8sink = __builtin_arm_wcmpeqb (v8sink, v8sink); - v4sink = __builtin_arm_wcmpeqh (v4sink, v4sink); - v2sink = __builtin_arm_wcmpeqw (v2sink, v2sink); - v8sink = __builtin_arm_wcmpgtsb (v8sink, v8sink); - v4sink = __builtin_arm_wcmpgtsh (v4sink, v4sink); - v2sink = __builtin_arm_wcmpgtsw (v2sink, v2sink); - v8sink = __builtin_arm_wcmpgtub (v8sink, v8sink); - v4sink = __builtin_arm_wcmpgtuh (v4sink, v4sink); - v2sink = __builtin_arm_wcmpgtuw (v2sink, v2sink); - llsink = __builtin_arm_wmacs (llsink, v4sink, v4sink); - llsink = __builtin_arm_wmacsz (v4sink, v4sink); - llsink = __builtin_arm_wmacu (llsink, v4sink, v4sink); - llsink = __builtin_arm_wmacuz (v4sink, v4sink); - v4sink = __builtin_arm_wmadds (v4sink, v4sink); - v4sink = __builtin_arm_wmaddu (v4sink, v4sink); - v8sink = __builtin_arm_wmaxsb (v8sink, v8sink); - v4sink = __builtin_arm_wmaxsh (v4sink, v4sink); - v2sink = __builtin_arm_wmaxsw (v2sink, v2sink); - v8sink = __builtin_arm_wmaxub (v8sink, v8sink); - v4sink = __builtin_arm_wmaxuh (v4sink, v4sink); - v2sink = __builtin_arm_wmaxuw (v2sink, v2sink); - v8sink = __builtin_arm_wminsb (v8sink, v8sink); - v4sink = __builtin_arm_wminsh (v4sink, v4sink); - v2sink = __builtin_arm_wminsw (v2sink, v2sink); - v8sink = __builtin_arm_wminub (v8sink, v8sink); - v4sink = __builtin_arm_wminuh (v4sink, v4sink); - v2sink = __builtin_arm_wminuw (v2sink, v2sink); - v4sink = __builtin_arm_wmulsm (v4sink, v4sink); - v4sink = __builtin_arm_wmulul (v4sink, v4sink); - v4sink = __builtin_arm_wmulum (v4sink, v4sink); - llsink = __builtin_arm_wor (llsink, llsink); - v2sink = __builtin_arm_wpackdss (llsink, llsink); - v2sink = __builtin_arm_wpackdus (llsink, llsink); - v8sink = __builtin_arm_wpackhss (v4sink, v4sink); - v8sink = __builtin_arm_wpackhus (v4sink, v4sink); - v4sink = __builtin_arm_wpackwss (v2sink, v2sink); - v4sink = __builtin_arm_wpackwus (v2sink, v2sink); - llsink = __builtin_arm_wrord (llsink, llsink); - llsink = __builtin_arm_wrordi (llsink, isink); - v4sink = __builtin_arm_wrorh (v4sink, llsink); - v4sink = __builtin_arm_wrorhi (v4sink, isink); - v2sink = __builtin_arm_wrorw (v2sink, llsink); - v2sink = __builtin_arm_wrorwi (v2sink, isink); - v2sink = __builtin_arm_wsadb (v2sink, v8sink, v8sink); - v2sink = __builtin_arm_wsadbz (v8sink, v8sink); - v2sink = __builtin_arm_wsadh (v2sink, v4sink, v4sink); - v2sink = __builtin_arm_wsadhz (v4sink, v4sink); - v4sink = __builtin_arm_wshufh (v4sink, 0); - llsink = __builtin_arm_wslld (llsink, llsink); - llsink = __builtin_arm_wslldi (llsink, 0); - v4sink = __builtin_arm_wsllh (v4sink, llsink); - v4sink = __builtin_arm_wsllhi (v4sink, isink); - v2sink = __builtin_arm_wsllw (v2sink, llsink); - v2sink = __builtin_arm_wsllwi (v2sink, isink); - llsink = __builtin_arm_wsrad (llsink, llsink); - llsink = __builtin_arm_wsradi (llsink, isink); - v4sink = __builtin_arm_wsrah (v4sink, llsink); - v4sink = __builtin_arm_wsrahi (v4sink, isink); - v2sink = __builtin_arm_wsraw (v2sink, llsink); - v2sink = __builtin_arm_wsrawi (v2sink, isink); - llsink = __builtin_arm_wsrld (llsink, llsink); - llsink = __builtin_arm_wsrldi (llsink, isink); - v4sink = __builtin_arm_wsrlh (v4sink, llsink); - v4sink = __builtin_arm_wsrlhi (v4sink, isink); - v2sink = __builtin_arm_wsrlw (v2sink, llsink); - v2sink = __builtin_arm_wsrlwi (v2sink, isink); - v8sink = __builtin_arm_wsubb (v8sink, v8sink); - v8sink = __builtin_arm_wsubbss (v8sink, v8sink); - v8sink = __builtin_arm_wsubbus (v8sink, v8sink); - v4sink = __builtin_arm_wsubh (v4sink, v4sink); - v4sink = __builtin_arm_wsubhss (v4sink, v4sink); - v4sink = __builtin_arm_wsubhus (v4sink, v4sink); - v2sink = __builtin_arm_wsubw (v2sink, v2sink); - v2sink = __builtin_arm_wsubwss (v2sink, v2sink); - v2sink = __builtin_arm_wsubwus (v2sink, v2sink); - v4sink = __builtin_arm_wunpckehsb (v8sink); - v2sink = __builtin_arm_wunpckehsh (v4sink); - llsink = __builtin_arm_wunpckehsw (v2sink); - v4sink = __builtin_arm_wunpckehub (v8sink); - v2sink = __builtin_arm_wunpckehuh (v4sink); - llsink = __builtin_arm_wunpckehuw (v2sink); - v4sink = __builtin_arm_wunpckelsb (v8sink); - v2sink = __builtin_arm_wunpckelsh (v4sink); - llsink = __builtin_arm_wunpckelsw (v2sink); - v4sink = __builtin_arm_wunpckelub (v8sink); - v2sink = __builtin_arm_wunpckeluh (v4sink); - llsink = __builtin_arm_wunpckeluw (v2sink); - v8sink = __builtin_arm_wunpckihb (v8sink, v8sink); - v4sink = __builtin_arm_wunpckihh (v4sink, v4sink); - v2sink = __builtin_arm_wunpckihw (v2sink, v2sink); - v8sink = __builtin_arm_wunpckilb (v8sink, v8sink); - v4sink = __builtin_arm_wunpckilh (v4sink, v4sink); - v2sink = __builtin_arm_wunpckilw (v2sink, v2sink); - llsink = __builtin_arm_wxor (llsink, llsink); - llsink = __builtin_arm_wzero (); -} diff --git a/gcc/testsuite/gcc.target/arm/pr64208.c b/gcc/testsuite/gcc.target/arm/pr64208.c deleted file mode 100644 index 96fd56d..0000000 --- a/gcc/testsuite/gcc.target/arm/pr64208.c +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do compile } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mcpu=*" } { "-mcpu=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mabi=*" } { "-mabi=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-march=*" } { "-march=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ -/* { dg-require-effective-target arm32 } */ -/* { dg-require-effective-target arm_iwmmxt_ok } */ -/* { dg-options "-O1 -mcpu=iwmmxt" } */ - -long long x6(void); -void x7(long long, long long); -void x8(long long); - -int x0; -long long *x1; - -void x2(void) { - long long *x3 = x1; - while (x1) { - long long x4 = x0, x5 = x6(); - x7(x4, x5); - x8(x5); - *x3 = 0; - } -} diff --git a/gcc/testsuite/gcc.target/arm/pr79145.c b/gcc/testsuite/gcc.target/arm/pr79145.c deleted file mode 100644 index 6678244..0000000 --- a/gcc/testsuite/gcc.target/arm/pr79145.c +++ /dev/null @@ -1,16 +0,0 @@ -/* { dg-do compile } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mcpu=*" } { "-mcpu=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mabi=*" } { "-mabi=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-march=*" } { "-march=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ -/* { dg-require-effective-target arm32 } */ -/* { dg-require-effective-target arm_iwmmxt_ok } */ -/* { dg-options "-mcpu=iwmmxt" } */ - -int -main (void) -{ - volatile long long t1; - t1 ^= 0x55; - return 0; -} diff --git a/gcc/testsuite/gcc.target/arm/pr99724.c b/gcc/testsuite/gcc.target/arm/pr99724.c deleted file mode 100644 index 5411078..0000000 --- a/gcc/testsuite/gcc.target/arm/pr99724.c +++ /dev/null @@ -1,31 +0,0 @@ -/* PR target/99724 */ -/* { dg-do compile } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mcpu=*" } { "-mcpu=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mabi=*" } { "-mabi=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-march=*" } { "-march=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ -/* { dg-require-effective-target arm32 } */ -/* { dg-require-effective-target arm_iwmmxt_ok } */ -/* { dg-options "-O1 -mcpu=iwmmxt" } */ - -typedef int V __attribute__((vector_size (8))); -struct __attribute__((packed)) S { char a; V b; char c[7]; }; - -void -foo (V *x) -{ - *x = ~*x; -} - -void -bar (V *x) -{ - *x = -*x; -} - -void -baz (V *x, struct S *p) -{ - V y = p->b; - *x = y; -} diff --git a/gcc/testsuite/gcc.target/arm/pr99786.c b/gcc/testsuite/gcc.target/arm/pr99786.c deleted file mode 100644 index 11d86f0..0000000 --- a/gcc/testsuite/gcc.target/arm/pr99786.c +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do compile } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mcpu=*" } { "-mcpu=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mabi=*" } { "-mabi=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-march=*" } { "-march=iwmmxt" } } */ -/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */ -/* { dg-require-effective-target arm32 } */ -/* { dg-require-effective-target arm_iwmmxt_ok } */ -/* { dg-options "-O3 -mcpu=iwmmxt" } */ - -typedef signed char V __attribute__((vector_size (8))); - -void -foo (V *a) -{ - *a = *a * 3; -} - -typedef signed short Vshort __attribute__((vector_size (8))); -void -foo_short (Vshort *a) -{ - *a = *a * 3; -} - -typedef signed int Vint __attribute__((vector_size (8))); -void -foo_int (Vint *a) -{ - *a = *a * 3; -} diff --git a/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c b/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c index 41ee994..d9f95a1 100644 --- a/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c +++ b/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c @@ -1,6 +1,31 @@ /* { dg-do compile } */ -/* { dg-require-effective-target arm_thumb2_ok_no_arm_v8_1m_lob } */ -/* { dg-options "-O" } */ +/* { dg-require-effective-target arm_thumb2_ok } */ +/* { dg-options "-O2 -mthumb" } */ +/* { dg-final { check-function-bodies "**" "" } } */ + +/* +** foo: +** movs (r[0-9]+), #8 +** ( +** subs \1, \1, #1 +** ands \1, \1, #255 +** and r0, r1, r0, lsr #1 +** bne .L[0-9]+ +** bx lr +** | +** subs \1, \1, #1 +** and r0, r1, r0, lsr #1 +** ands \1, \1, #255 +** bne .L[0-9]+ +** bx lr +** | +** push {lr} +** dls lr, \1 +** and r0, r1, r0, lsr #1 +** le lr, .L[0-9]+ +** pop {pc} +** ) +*/ unsigned short foo (unsigned short x, unsigned short c) { @@ -12,7 +37,3 @@ unsigned short foo (unsigned short x, unsigned short c) } return x; } - -/* { dg-final { scan-assembler "ands" } } */ -/* { dg-final { scan-assembler-not "uxtb" } } */ -/* { dg-final { scan-assembler-not "cmp" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr103771-4.c b/gcc/testsuite/gcc.target/i386/pr103771-4.c new file mode 100644 index 0000000..299337d --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr103771-4.c @@ -0,0 +1,82 @@ +/* { dg-do compile } */ +/* { dg-options "-march=x86-64-v4 -Ofast -fdump-tree-vect-details" } */ +/* { dg-final { scan-assembler-not "kshift" { target { ! ia32 } } } } */ +/* { dg-final { scan-tree-dump-times "loop vectorized using 64 byte vectors" 6 "vect" { target { ! ia32 } } } } */ + +void +foo (float* a, float* b, int* c, int* d, long long* __restrict e, int n) +{ + for (int i = 0 ; i != n; i++) + { + long long tmp = c[i]; + long long tmp2 = d[i]; + if (a[i] < b[i]) + tmp = tmp2; + e[i] = tmp; + } +} + +void +foo1 (double* a, double* b, long long* c, long long* d, int* __restrict e, int n) +{ + for (int i = 0 ; i != n; i++) + { + int tmp = (int)c[i]; + int tmp2 = (int)d[i]; + if (a[i] < b[i]) + tmp = tmp2; + e[i] = tmp; + } +} + +void +foo2 (float* a, float* b, int* c, int* d, double* __restrict e, int n) +{ + for (int i = 0 ; i != n; i++) + { + double tmp = c[i]; + double tmp2 = d[i]; + if (a[i] < b[i]) + tmp = tmp2; + e[i] = tmp; + } +} + +void +foo3 (double* a, double* b, long long* c, long long* d, float* __restrict e, int n) +{ + for (int i = 0 ; i != n; i++) + { + float tmp = c[i]; + float tmp2 = d[i]; + if (a[i] < b[i]) + tmp = tmp2; + e[i] = tmp; + } +} + +void +foo4 (int* a, int* b, int* c, int* d, double* __restrict e, int n) +{ + for (int i = 0 ; i != n; i++) + { + double tmp = c[i]; + double tmp2 = d[i]; + if (a[i] < b[i]) + tmp = tmp2; + e[i] = tmp; + } +} + +void +foo5 (long long* a, long long* b, long long* c, long long* d, float* __restrict e, int n) +{ + for (int i = 0 ; i != n; i++) + { + float tmp = c[i]; + float tmp2 = d[i]; + if (a[i] < b[i]) + tmp = tmp2; + e[i] = tmp; + } +} diff --git a/gcc/testsuite/gcc.target/i386/pr110310.c b/gcc/testsuite/gcc.target/i386/pr110310.c index dce388a..6056439 100644 --- a/gcc/testsuite/gcc.target/i386/pr110310.c +++ b/gcc/testsuite/gcc.target/i386/pr110310.c @@ -9,5 +9,5 @@ void foo (int * __restrict a, int *b) /* We should vectorize the main loop with AVX512 and the epilog with SSE. */ -/* { dg-final { scan-tree-dump "optimized: loop vectorized using 64 byte vectors" "vect" } } */ -/* { dg-final { scan-tree-dump "optimized: loop vectorized using 16 byte vectors" "vect" } } */ +/* { dg-final { scan-tree-dump "loop vectorized using 64 byte vectors" "vect" } } */ +/* { dg-final { scan-tree-dump "loop vectorized using 16 byte vectors" "vect" } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr91446.c b/gcc/testsuite/gcc.target/i386/pr91446.c index 0243ca3..d129405 100644 --- a/gcc/testsuite/gcc.target/i386/pr91446.c +++ b/gcc/testsuite/gcc.target/i386/pr91446.c @@ -21,4 +21,4 @@ foo (unsigned long long width, unsigned long long height, bar (&t); } -/* { dg-final { scan-assembler-times "vmovdqa\[^\n\r\]*xmm\[0-9\]" 2 } } */ +/* { dg-final { scan-assembler-times "vmovdqa\[^\n\r\]*xmm\[0-9\]" 2 { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gcc.target/i386/pr99881.c b/gcc/testsuite/gcc.target/i386/pr99881.c index 3e087eb..a1ec1d1b 100644 --- a/gcc/testsuite/gcc.target/i386/pr99881.c +++ b/gcc/testsuite/gcc.target/i386/pr99881.c @@ -1,7 +1,7 @@ /* PR target/99881. */ /* { dg-do compile { target { ! ia32 } } } */ /* { dg-options "-Ofast -march=skylake" } */ -/* { dg-final { scan-assembler-not "xmm\[0-9\]" { xfail *-*-* } } } */ +/* { dg-final { scan-assembler-not "xmm\[0-9\]" } } */ void foo (int* __restrict a, int n, int c) diff --git a/gcc/testsuite/gcc.target/i386/vect-epilogues-1.c b/gcc/testsuite/gcc.target/i386/vect-epilogues-1.c new file mode 100644 index 0000000..a7f5f12 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/vect-epilogues-1.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -mavx2 -mno-avx512f -mtune=generic -fdump-tree-vect-optimized" } */ + +int test (signed char *data, int n) +{ + int sum = 0; + for (int i = 0; i < n; ++i) + sum += data[i]; + return sum; +} + +/* { dg-final { scan-tree-dump "loop vectorized using 32 byte vectors" "vect" } } */ +/* { dg-final { scan-tree-dump "loop vectorized using 16 byte vectors" "vect" } } */ +/* { dg-final { scan-tree-dump "loop vectorized using 8 byte vectors" "vect" { target { ! ia32 } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/vect-epilogues-2.c b/gcc/testsuite/gcc.target/i386/vect-epilogues-2.c new file mode 100644 index 0000000..d6c06ed --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/vect-epilogues-2.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -mavx512bw -mtune=generic -fdump-tree-vect-optimized" } */ + +int test (signed char *data, int n) +{ + int sum = 0; + for (int i = 0; i < n; ++i) + sum += data[i]; + return sum; +} + +/* { dg-final { scan-tree-dump "loop vectorized using 64 byte vectors" "vect" } } */ +/* { dg-final { scan-tree-dump "loop vectorized using 32 byte vectors" "vect" } } */ +/* { dg-final { scan-tree-dump-not "loop vectorized using 16 byte vectors" "vect" } } */ +/* { dg-final { scan-tree-dump-not "loop vectorized using 8 byte vectors" "vect" } } */ diff --git a/gcc/testsuite/gcc.target/i386/vect-epilogues-3.c b/gcc/testsuite/gcc.target/i386/vect-epilogues-3.c new file mode 100644 index 0000000..0ee610f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/vect-epilogues-3.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -mavx512bw -mtune=znver4 -fdump-tree-vect-optimized" } */ + +int test (signed char *data, int n) +{ + int sum = 0; + for (int i = 0; i < n; ++i) + sum += data[i]; + return sum; +} + +/* { dg-final { scan-tree-dump "loop vectorized using 64 byte vectors" "vect" } } */ +/* { dg-final { scan-tree-dump "loop vectorized using 32 byte vectors" "vect" } } */ +/* { dg-final { scan-tree-dump "loop vectorized using 16 byte vectors" "vect" } } */ +/* { dg-final { scan-tree-dump "loop vectorized using 8 byte vectors" "vect" { target { ! ia32 } } } } */ diff --git a/gcc/testsuite/gcc.target/i386/vect-epilogues-4.c b/gcc/testsuite/gcc.target/i386/vect-epilogues-4.c new file mode 100644 index 0000000..498db6b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/vect-epilogues-4.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -mavx512bw -mtune=generic --param vect-partial-vector-usage=1 -fdump-tree-vect-optimized" } */ + +int test (signed char *data, int n) +{ + int sum = 0; + for (int i = 0; i < n; ++i) + sum += data[i]; + return sum; +} + +/* { dg-final { scan-tree-dump-times "loop vectorized using 64 byte vectors" 2 "vect" } } */ +/* { dg-final { scan-tree-dump-not "loop vectorized using 32 byte vectors" "vect" } } */ diff --git a/gcc/testsuite/gcc.target/i386/vect-epilogues-5.c b/gcc/testsuite/gcc.target/i386/vect-epilogues-5.c new file mode 100644 index 0000000..6772cab --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/vect-epilogues-5.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -mavx512bw -mtune=znver4 --param vect-partial-vector-usage=1 -fdump-tree-vect-optimized" } */ + +int test (signed char *data, int n) +{ + int sum = 0; + for (int i = 0; i < n; ++i) + sum += data[i]; + return sum; +} + +/* { dg-final { scan-tree-dump-times "loop vectorized using 64 byte vectors" 2 "vect" } } */ +/* { dg-final { scan-tree-dump-not "loop vectorized using 32 byte vectors" "vect" } } */ diff --git a/gcc/testsuite/gcc.target/mips/pr54240.c b/gcc/testsuite/gcc.target/mips/pr54240.c index d3976f6..31b793b 100644 --- a/gcc/testsuite/gcc.target/mips/pr54240.c +++ b/gcc/testsuite/gcc.target/mips/pr54240.c @@ -27,4 +27,4 @@ NOMIPS16 int foo(S *s) return next->v; } -/* { dg-final { scan-tree-dump "Hoisting adjacent loads" "phiopt1" } } */ +/* { dg-final { scan-tree-dump "Hoisting adjacent loads" "phiopt2" } } */ diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_61.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_61.c index 742e25d..d6e8ce9 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_61.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_61.c @@ -2,7 +2,7 @@ /* { dg-options {-march-map=sm_61 -mptx=_} } */ /* { dg-additional-options -save-temps } */ /* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ -/* { dg-final { scan-assembler-times {(?n)^ \.target sm_53$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.target sm_61$} 1 } } */ #if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ @@ -12,7 +12,7 @@ #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif -#if __PTX_SM__ != 530 +#if __PTX_SM__ != 610 #error wrong value for __PTX_SM__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march-map=sm_62.c b/gcc/testsuite/gcc.target/nvptx/march-map=sm_62.c index 02ced4c..ccce6f7 100644 --- a/gcc/testsuite/gcc.target/nvptx/march-map=sm_62.c +++ b/gcc/testsuite/gcc.target/nvptx/march-map=sm_62.c @@ -2,7 +2,7 @@ /* { dg-options {-march-map=sm_62 -mptx=_} } */ /* { dg-additional-options -save-temps } */ /* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ -/* { dg-final { scan-assembler-times {(?n)^ \.target sm_53$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.target sm_61$} 1 } } */ #if __PTX_ISA_VERSION_MAJOR__ != 7 #error wrong value for __PTX_ISA_VERSION_MAJOR__ @@ -12,7 +12,7 @@ #error wrong value for __PTX_ISA_VERSION_MINOR__ #endif -#if __PTX_SM__ != 530 +#if __PTX_SM__ != 610 #error wrong value for __PTX_SM__ #endif diff --git a/gcc/testsuite/gcc.target/nvptx/march=sm_61.c b/gcc/testsuite/gcc.target/nvptx/march=sm_61.c new file mode 100644 index 0000000..d8bccb8 --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/march=sm_61.c @@ -0,0 +1,19 @@ +/* { dg-do assemble } */ +/* { dg-options {-march=sm_61 -mptx=_} } */ +/* { dg-additional-options -save-temps } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 7\.3$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.target sm_61$} 1 } } */ + +#if __PTX_ISA_VERSION_MAJOR__ != 7 +#error wrong value for __PTX_ISA_VERSION_MAJOR__ +#endif + +#if __PTX_ISA_VERSION_MINOR__ != 3 +#error wrong value for __PTX_ISA_VERSION_MINOR__ +#endif + +#if __PTX_SM__ != 610 +#error wrong value for __PTX_SM__ +#endif + +int dummy; diff --git a/gcc/testsuite/gcc.target/nvptx/mptx=5.0.c b/gcc/testsuite/gcc.target/nvptx/mptx=5.0.c new file mode 100644 index 0000000..5d6163e --- /dev/null +++ b/gcc/testsuite/gcc.target/nvptx/mptx=5.0.c @@ -0,0 +1,19 @@ +/* { dg-do assemble } */ +/* { dg-options {-march=sm_30 -mptx=5.0} } */ +/* { dg-additional-options -save-temps } */ +/* { dg-final { scan-assembler-times {(?n)^ \.version 5\.0$} 1 } } */ +/* { dg-final { scan-assembler-times {(?n)^ \.target sm_30$} 1 } } */ + +#if __PTX_ISA_VERSION_MAJOR__ != 5 +#error wrong value for __PTX_ISA_VERSION_MAJOR__ +#endif + +#if __PTX_ISA_VERSION_MINOR__ != 0 +#error wrong value for __PTX_ISA_VERSION_MINOR__ +#endif + +#if __PTX_SM__ != 300 +#error wrong value for __PTX_SM__ +#endif + +int dummy; diff --git a/gcc/testsuite/gcc.target/riscv/arch-52.c b/gcc/testsuite/gcc.target/riscv/arch-52.c index da6aea8..6133370 100644 --- a/gcc/testsuite/gcc.target/riscv/arch-52.c +++ b/gcc/testsuite/gcc.target/riscv/arch-52.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-march=rva22u64v -mabi=lp64" } */ -/* { dg-warning "*Should use \"_\" to contact Profiles with other extensions" } */ +/* { dg-warning "Should use \"_\" to contact Profiles with other extensions" "" { target *-*-* } 0 } */ int foo () {} diff --git a/gcc/testsuite/gcc.target/riscv/arch-55.c b/gcc/testsuite/gcc.target/riscv/arch-55.c new file mode 100644 index 0000000..0e8a294 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-55.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64g_sha -mabi=lp64d" } */ + +void foo(){} + +/* { dg-final { scan-assembler ".attribute arch, \"rv64i2p1_m2p0_a2p1_f2p2" +"_d2p2_h1p0_zicsr2p0_zifencei2p0_zmmul1p0_zaamo1p0_zalrsc1p0_sha1p0" +"_shcounterenw1p0_shgatpa1p0_shtvala1p0_shvsatpa1p0_shvstvala1p0_shvstvecd1p0" +"_ssstateen1p0\"" } } */
\ No newline at end of file diff --git a/gcc/testsuite/gcc.target/riscv/arch-ss-1.c b/gcc/testsuite/gcc.target/riscv/arch-ss-1.c new file mode 100644 index 0000000..8f95737 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-ss-1.c @@ -0,0 +1,5 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gc_ssnpm_smnpm_smmpm_sspm_supm -mabi=lp64" } */ +int foo() +{ +} diff --git a/gcc/testsuite/gcc.target/riscv/arch-ss-2.c b/gcc/testsuite/gcc.target/riscv/arch-ss-2.c new file mode 100644 index 0000000..f1d7724 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-ss-2.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm -mabi=ilp32d" } */ +int foo() +{ +} +/* { dg-error "'-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm': ssnpm extension supports in rv64 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm': smnpm extension supports in rv64 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm': smmpm extension supports in rv64 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm': sspm extension supports in rv64 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv32gc_ssnpm_smnpm_smmpm_sspm_supm': supm extension supports in rv64 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv32imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd_zcf_smmpm_smnpm_ssnpm_sspm_supm': ssnpm extension supports in rv64 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv32imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd_zcf_smmpm_smnpm_ssnpm_sspm_supm': smnpm extension supports in rv64 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv32imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd_zcf_smmpm_smnpm_ssnpm_sspm_supm': smmpm extension supports in rv64 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv32imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd_zcf_smmpm_smnpm_ssnpm_sspm_supm': sspm extension supports in rv64 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv32imafdc_zicsr_zifencei_zmmul_zaamo_zalrsc_zca_zcd_zcf_smmpm_smnpm_ssnpm_sspm_supm': supm extension supports in rv64 only" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.target/riscv/arch-zilsd-1.c b/gcc/testsuite/gcc.target/riscv/arch-zilsd-1.c new file mode 100644 index 0000000..452c04e --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-zilsd-1.c @@ -0,0 +1,5 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv32gc_zilsd_zclsd -mabi=ilp32d" } */ +int foo() +{ +} diff --git a/gcc/testsuite/gcc.target/riscv/arch-zilsd-2.c b/gcc/testsuite/gcc.target/riscv/arch-zilsd-2.c new file mode 100644 index 0000000..5d6185d --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-zilsd-2.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gc_zilsd -mabi=ilp32d" } */ +int foo() +{ +} +/* { dg-error "'-march=rv64gc_zilsd': zilsd extension supports in rv32 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv64imafdc_zicsr_zifencei_zilsd_zmmul_zaamo_zalrsc_zca_zcd': zilsd extension supports in rv32 only" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.target/riscv/arch-zilsd-3.c b/gcc/testsuite/gcc.target/riscv/arch-zilsd-3.c new file mode 100644 index 0000000..3cda120 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/arch-zilsd-3.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gc_zclsd -mabi=ilp32d" } */ +int foo() +{ +} +/* { dg-error "'-march=rv64gc_zclsd': zilsd extension supports in rv32 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv64gc_zclsd': zclsd extension supports in rv32 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv64imafdc_zicsr_zifencei_zilsd_zmmul_zaamo_zalrsc_zca_zcd_zclsd': zilsd extension supports in rv32 only" "" { target *-*-* } 0 } */ +/* { dg-error "'-march=rv64imafdc_zicsr_zifencei_zilsd_zmmul_zaamo_zalrsc_zca_zcd_zclsd': zclsd extension supports in rv32 only" "" { target *-*-* } 0 } */ diff --git a/gcc/testsuite/gcc.target/riscv/pr120223.c b/gcc/testsuite/gcc.target/riscv/pr120223.c new file mode 100644 index 0000000..fae21b6 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/pr120223.c @@ -0,0 +1,4 @@ +/* { dg-do compile } */ +/* { dg-options "-mcpu=thead-c906" } */ +long foo(long x) { return x ^ 0x80000000; } + diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_arith.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_arith.h index 7db892c..983c9b4 100644 --- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_arith.h +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_arith.h @@ -123,6 +123,22 @@ vec_sat_u_add_##T##_fmt_8 (T *out, T *op_1, T *op_2, unsigned limit) \ } \ } +#define DEF_VEC_SAT_U_ADD_FMT_9(WT, T) \ +void __attribute__((noinline)) \ +vec_sat_u_add_##WT##_##T##_fmt_9 (T *out, T *op_1, T *op_2, unsigned limit) \ +{ \ + unsigned i; \ + T max = -1; \ + for (i = 0; i < limit; i++) \ + { \ + T x = op_1[i]; \ + T y = op_2[i]; \ + WT val = (WT)x + (WT)y; \ + out[i] = val > max ? max : (T)val; \ + } \ +} +#define DEF_VEC_SAT_U_ADD_FMT_9_WRAP(WT, T) DEF_VEC_SAT_U_ADD_FMT_9(WT, T) + #define RUN_VEC_SAT_U_ADD_FMT_1(T, out, op_1, op_2, N) \ vec_sat_u_add_##T##_fmt_1(out, op_1, op_2, N) @@ -147,6 +163,21 @@ vec_sat_u_add_##T##_fmt_8 (T *out, T *op_1, T *op_2, unsigned limit) \ #define RUN_VEC_SAT_U_ADD_FMT_8(T, out, op_1, op_2, N) \ vec_sat_u_add_##T##_fmt_8(out, op_1, op_2, N) +#define RUN_VEC_SAT_U_ADD_FMT_9_FROM_U16(T, out, op_1, op_2, N) \ + vec_sat_u_add_uint16_t_##T##_fmt_9(out, op_1, op_2, N) +#define RUN_VEC_SAT_U_ADD_FMT_9_FROM_U16_WRAP(T, out, op_1, op_2, N) \ + RUN_VEC_SAT_U_ADD_FMT_9_FROM_U16(T, out, op_1, op_2, N) + +#define RUN_VEC_SAT_U_ADD_FMT_9_FROM_U32(T, out, op_1, op_2, N) \ + vec_sat_u_add_uint32_t_##T##_fmt_9(out, op_1, op_2, N) +#define RUN_VEC_SAT_U_ADD_FMT_9_FROM_U32_WRAP(T, out, op_1, op_2, N) \ + RUN_VEC_SAT_U_ADD_FMT_9_FROM_U32(T, out, op_1, op_2, N) + +#define RUN_VEC_SAT_U_ADD_FMT_9_FROM_U64(T, out, op_1, op_2, N) \ + vec_sat_u_add_uint64_t_##T##_fmt_9(out, op_1, op_2, N) +#define RUN_VEC_SAT_U_ADD_FMT_9_FROM_U64_WRAP(T, out, op_1, op_2, N) \ + RUN_VEC_SAT_U_ADD_FMT_9_FROM_U64(T, out, op_1, op_2, N) + #define DEF_VEC_SAT_U_ADD_IMM_FMT_1(T, IMM) \ T __attribute__((noinline)) \ vec_sat_u_add_imm##IMM##_##T##_fmt_1 (T *out, T *in, unsigned limit) \ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u16-from-u32.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u16-from-u32.c new file mode 100644 index 0000000..6e9cbd2 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u16-from-u32.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -ftree-vectorize -fdump-tree-optimized" } */ + +#include "vec_sat_arith.h" + +DEF_VEC_SAT_U_ADD_FMT_9(uint32_t, uint16_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 2 "optimized" } } */ +/* { dg-final { scan-assembler-times {vsaddu\.vv} 1 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u16-from-u64.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u16-from-u64.c new file mode 100644 index 0000000..3ab4641 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u16-from-u64.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -ftree-vectorize -fdump-tree-optimized" } */ + +#include "vec_sat_arith.h" + +DEF_VEC_SAT_U_ADD_FMT_9(uint64_t, uint16_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 2 "optimized" } } */ +/* { dg-final { scan-assembler-times {vsaddu\.vv} 1 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u32-from-u64.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u32-from-u64.c new file mode 100644 index 0000000..57aa772 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u32-from-u64.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -ftree-vectorize -fdump-tree-optimized" } */ + +#include "vec_sat_arith.h" + +DEF_VEC_SAT_U_ADD_FMT_9(uint64_t, uint32_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 2 "optimized" } } */ +/* { dg-final { scan-assembler-times {vsaddu\.vv} 1 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u16.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u16.c new file mode 100644 index 0000000..d14fe00 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u16.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -ftree-vectorize -fdump-tree-optimized" } */ + +#include "vec_sat_arith.h" + +DEF_VEC_SAT_U_ADD_FMT_9(uint16_t, uint8_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 2 "optimized" } } */ +/* { dg-final { scan-assembler-times {vsaddu\.vv} 1 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u32.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u32.c new file mode 100644 index 0000000..240af94 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u32.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -ftree-vectorize -fdump-tree-optimized" } */ + +#include "vec_sat_arith.h" + +DEF_VEC_SAT_U_ADD_FMT_9(uint32_t, uint8_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 2 "optimized" } } */ +/* { dg-final { scan-assembler-times {vsaddu\.vv} 1 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u64.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u64.c new file mode 100644 index 0000000..706d4f2 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-9-u8-from-u64.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -ftree-vectorize -fdump-tree-optimized" } */ + +#include "vec_sat_arith.h" + +DEF_VEC_SAT_U_ADD_FMT_9(uint64_t, uint8_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 2 "optimized" } } */ +/* { dg-final { scan-assembler-times {vsaddu\.vv} 1 } } */ diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u16-from-u32.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u16-from-u32.c new file mode 100644 index 0000000..06d3ba0 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u16-from-u32.c @@ -0,0 +1,76 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "vec_sat_arith.h" + +#define T uint16_t +#define WT uint32_t +#define N 16 +#define RUN_VEC_SAT_BINARY RUN_VEC_SAT_U_ADD_FMT_9_FROM_U32_WRAP + +DEF_VEC_SAT_U_ADD_FMT_9_WRAP(WT, T) + +T test_data[][3][N] = { + { + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_0 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_1 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* expect */ + }, + { + { + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + }, + { + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + }, + { + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + }, + }, + { + { + 0, 0, 1, 0, + 1, 2, 3, 0, + 1, 2, 3, 4, + 5, 65534, 65535, 9, + }, + { + 0, 1, 1, 65534, + 65534, 65534, 65534, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 9, + }, + { + 0, 1, 2, 65534, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 18, + }, + }, +}; + +#include "vec_sat_binary_vvv_run.h" diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u16-from-u64.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u16-from-u64.c new file mode 100644 index 0000000..64dbde7 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u16-from-u64.c @@ -0,0 +1,76 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "vec_sat_arith.h" + +#define T uint16_t +#define WT uint64_t +#define N 16 +#define RUN_VEC_SAT_BINARY RUN_VEC_SAT_U_ADD_FMT_9_FROM_U64_WRAP + +DEF_VEC_SAT_U_ADD_FMT_9_WRAP(WT, T) + +T test_data[][3][N] = { + { + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_0 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_1 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* expect */ + }, + { + { + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + }, + { + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + }, + { + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + }, + }, + { + { + 0, 0, 1, 0, + 1, 2, 3, 0, + 1, 2, 3, 4, + 5, 65534, 65535, 9, + }, + { + 0, 1, 1, 65534, + 65534, 65534, 65534, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 9, + }, + { + 0, 1, 2, 65534, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 65535, + 65535, 65535, 65535, 18, + }, + }, +}; + +#include "vec_sat_binary_vvv_run.h" diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u32-from-u64.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u32-from-u64.c new file mode 100644 index 0000000..2523126 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u32-from-u64.c @@ -0,0 +1,76 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "vec_sat_arith.h" + +#define T uint32_t +#define WT uint64_t +#define N 16 +#define RUN_VEC_SAT_BINARY RUN_VEC_SAT_U_ADD_FMT_9_FROM_U64_WRAP + +DEF_VEC_SAT_U_ADD_FMT_9_WRAP(WT, T) + +T test_data[][3][N] = { + { + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_0 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_1 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* expect */ + }, + { + { + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 4294967295, + }, + { + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 4294967295, + }, + { + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 4294967295, + }, + }, + { + { + 0, 0, 1, 0, + 1, 2, 3, 0, + 1, 2, 3, 4, + 5, 4294967294, 4294967295, 9, + }, + { + 0, 1, 1, 4294967294, + 4294967294, 4294967294, 4294967294, 4294967295, + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 9, + }, + { + 0, 1, 2, 4294967294, + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 4294967295, + 4294967295, 4294967295, 4294967295, 18, + }, + }, +}; + +#include "vec_sat_binary_vvv_run.h" diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u16.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u16.c new file mode 100644 index 0000000..4cd4817 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u16.c @@ -0,0 +1,76 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "vec_sat_arith.h" + +#define T uint8_t +#define WT uint16_t +#define N 16 +#define RUN_VEC_SAT_BINARY RUN_VEC_SAT_U_ADD_FMT_9_FROM_U16_WRAP + +DEF_VEC_SAT_U_ADD_FMT_9_WRAP(WT, T) + +T test_data[][3][N] = { + { + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_0 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_1 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* expect */ + }, + { + { + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + }, + { + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + }, + { + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + }, + }, + { + { + 0, 0, 1, 0, + 1, 2, 3, 0, + 1, 2, 3, 4, + 5, 254, 255, 9, + }, + { + 0, 1, 1, 254, + 254, 254, 254, 255, + 255, 255, 255, 255, + 255, 255, 255, 9, + }, + { + 0, 1, 2, 254, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 18, + }, + }, +}; + +#include "vec_sat_binary_vvv_run.h" diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u32.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u32.c new file mode 100644 index 0000000..6b46465 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u32.c @@ -0,0 +1,76 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "vec_sat_arith.h" + +#define T uint8_t +#define WT uint32_t +#define N 16 +#define RUN_VEC_SAT_BINARY RUN_VEC_SAT_U_ADD_FMT_9_FROM_U32_WRAP + +DEF_VEC_SAT_U_ADD_FMT_9_WRAP(WT, T) + +T test_data[][3][N] = { + { + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_0 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_1 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* expect */ + }, + { + { + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + }, + { + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + }, + { + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + }, + }, + { + { + 0, 0, 1, 0, + 1, 2, 3, 0, + 1, 2, 3, 4, + 5, 254, 255, 9, + }, + { + 0, 1, 1, 254, + 254, 254, 254, 255, + 255, 255, 255, 255, + 255, 255, 255, 9, + }, + { + 0, 1, 2, 254, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 18, + }, + }, +}; + +#include "vec_sat_binary_vvv_run.h" diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u64.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u64.c new file mode 100644 index 0000000..4cd4817 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/sat/vec_sat_u_add-run-9-u8-from-u64.c @@ -0,0 +1,76 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "vec_sat_arith.h" + +#define T uint8_t +#define WT uint16_t +#define N 16 +#define RUN_VEC_SAT_BINARY RUN_VEC_SAT_U_ADD_FMT_9_FROM_U16_WRAP + +DEF_VEC_SAT_U_ADD_FMT_9_WRAP(WT, T) + +T test_data[][3][N] = { + { + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_0 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* arg_1 */ + { + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + }, /* expect */ + }, + { + { + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + }, + { + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + }, + { + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + }, + }, + { + { + 0, 0, 1, 0, + 1, 2, 3, 0, + 1, 2, 3, 4, + 5, 254, 255, 9, + }, + { + 0, 1, 1, 254, + 254, 254, 254, 255, + 255, 255, 255, 255, + 255, 255, 255, 9, + }, + { + 0, 1, 2, 254, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 18, + }, + }, +}; + +#include "vec_sat_binary_vvv_run.h" diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_arith.h b/gcc/testsuite/gcc.target/riscv/sat/sat_arith.h index c8a135a..2225d30 100644 --- a/gcc/testsuite/gcc.target/riscv/sat/sat_arith.h +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_arith.h @@ -53,12 +53,34 @@ sat_u_add_##T##_fmt_6 (T x, T y) \ return (T)(x + y) < x ? -1 : (x + y); \ } +#define DEF_SAT_U_ADD_FMT_7(WT, T) \ +T __attribute__((noinline)) \ +sat_u_add_##WT##_##T##_fmt_7(T x, T y) \ +{ \ + T max = -1; \ + WT val = (WT)x + (WT)y; \ + return val > max ? max : (T)val; \ +} +#define DEF_SAT_U_ADD_FMT_7_WRAP(WT, T) DEF_SAT_U_ADD_FMT_7(WT, T) + #define RUN_SAT_U_ADD_FMT_1(T, x, y) sat_u_add_##T##_fmt_1(x, y) #define RUN_SAT_U_ADD_FMT_2(T, x, y) sat_u_add_##T##_fmt_2(x, y) #define RUN_SAT_U_ADD_FMT_3(T, x, y) sat_u_add_##T##_fmt_3(x, y) #define RUN_SAT_U_ADD_FMT_4(T, x, y) sat_u_add_##T##_fmt_4(x, y) #define RUN_SAT_U_ADD_FMT_5(T, x, y) sat_u_add_##T##_fmt_5(x, y) #define RUN_SAT_U_ADD_FMT_6(T, x, y) sat_u_add_##T##_fmt_6(x, y) +#define RUN_SAT_U_ADD_FMT_7_FROM_U16(T, x, y) \ + sat_u_add_uint16_t_##T##_fmt_7(x, y) +#define RUN_SAT_U_ADD_FMT_7_FROM_U16_WRAP(T, x, y) \ + RUN_SAT_U_ADD_FMT_7_FROM_U16(T, x, y) +#define RUN_SAT_U_ADD_FMT_7_FROM_U32(T, x, y) \ + sat_u_add_uint32_t_##T##_fmt_7(x, y) +#define RUN_SAT_U_ADD_FMT_7_FROM_U32_WRAP(T, x, y) \ + RUN_SAT_U_ADD_FMT_7_FROM_U32(T, x, y) +#define RUN_SAT_U_ADD_FMT_7_FROM_U64(T, x, y) \ + sat_u_add_uint64_t_##T##_fmt_7(x, y) +#define RUN_SAT_U_ADD_FMT_7_FROM_U64_WRAP(T, x, y) \ + RUN_SAT_U_ADD_FMT_7_FROM_U64(T, x, y) #define DEF_SAT_U_ADD_IMM_FMT_1(T, IMM) \ T __attribute__((noinline)) \ diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u16-from-u32.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u16-from-u32.c new file mode 100644 index 0000000..527f8de --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u16-from-u32.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized -fno-schedule-insns -fno-schedule-insns2" } */ +/* { dg-final { check-function-bodies "**" "" } } */ + +#include "sat_arith.h" + +/* +** sat_u_add_uint32_t_uint16_t_fmt_7: +** add\s+[atx][0-9]+,\s*a0,\s*a1 +** slli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*48 +** srli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*48 +** sltu\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** neg\s+[atx][0-9]+,\s*[atx][0-9]+ +** or\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** slli\s+a0,\s*a0,\s*48 +** srli\s+a0,\s*a0,\s*48 +** ret +*/ +DEF_SAT_U_ADD_FMT_7(uint32_t, uint16_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 1 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u16-from-u64.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u16-from-u64.c new file mode 100644 index 0000000..e9031de --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u16-from-u64.c @@ -0,0 +1,21 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized -fno-schedule-insns -fno-schedule-insns2" } */ +/* { dg-final { check-function-bodies "**" "" } } */ + +#include "sat_arith.h" + +/* +** sat_u_add_uint64_t_uint16_t_fmt_7: +** add\s+[atx][0-9]+,\s*a0,\s*a1 +** slli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*48 +** srli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*48 +** sltu\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** neg\s+[atx][0-9]+,\s*[atx][0-9]+ +** or\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** slli\s+a0,\s*a0,\s*48 +** srli\s+a0,\s*a0,\s*48 +** ret +*/ +DEF_SAT_U_ADD_FMT_7(uint64_t, uint16_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 1 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u32-from-u64.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u32-from-u64.c new file mode 100644 index 0000000..a71bd2f --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u32-from-u64.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized -fno-schedule-insns -fno-schedule-insns2" } */ +/* { dg-final { check-function-bodies "**" "" } } */ + +#include "sat_arith.h" + +/* +** sat_u_add_uint64_t_uint32_t_fmt_7: +** slli\s+[atx][0-9]+,\s*a0,\s*32 +** srli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*32 +** add\s+[atx][0-9]+,\s*a[01],\s*a[01] +** slli\s+[atx][0-9]+,\s*[atx][0-9],\s*32 +** srli\s+[atx][0-9]+,\s*[atx][0-9]+,\s*32 +** sltu\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** neg\s+[atx][0-9]+,\s*[atx][0-9]+ +** or\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** sext.w\s+a0,\s*a0 +** ret +*/ +DEF_SAT_U_ADD_FMT_7(uint64_t, uint32_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 1 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u8-from-u16.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u8-from-u16.c new file mode 100644 index 0000000..5892986 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u8-from-u16.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized -fno-schedule-insns -fno-schedule-insns2" } */ +/* { dg-final { check-function-bodies "**" "" } } */ + +#include "sat_arith.h" + +/* +** sat_u_add_uint16_t_uint8_t_fmt_7: +** add\s+[atx][0-9]+,\s*a0,\s*a1 +** andi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*0xff +** sltu\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** neg\s+[atx][0-9]+,\s*[atx][0-9]+ +** or\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** andi\s+a0,\s*a0,\s*0xff +** ret +*/ +DEF_SAT_U_ADD_FMT_7(uint16_t, uint8_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 1 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u8-from-u32.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u8-from-u32.c new file mode 100644 index 0000000..a42a712 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u8-from-u32.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized -fno-schedule-insns -fno-schedule-insns2" } */ +/* { dg-final { check-function-bodies "**" "" } } */ + +#include "sat_arith.h" + +/* +** sat_u_add_uint32_t_uint8_t_fmt_7: +** add\s+[atx][0-9]+,\s*a0,\s*a1 +** andi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*0xff +** sltu\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** neg\s+[atx][0-9]+,\s*[atx][0-9]+ +** or\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** andi\s+a0,\s*a0,\s*0xff +** ret +*/ +DEF_SAT_U_ADD_FMT_7(uint32_t, uint8_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 1 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u8-from-u64.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u8-from-u64.c new file mode 100644 index 0000000..f37ef1c --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-7-u8-from-u64.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gc -mabi=lp64d -fdump-tree-optimized -fno-schedule-insns -fno-schedule-insns2" } */ +/* { dg-final { check-function-bodies "**" "" } } */ + +#include "sat_arith.h" + +/* +** sat_u_add_uint64_t_uint8_t_fmt_7: +** add\s+[atx][0-9]+,\s*a0,\s*a1 +** andi\s+[atx][0-9]+,\s*[atx][0-9]+,\s*0xff +** sltu\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** neg\s+[atx][0-9]+,\s*[atx][0-9]+ +** or\s+[atx][0-9]+,\s*[atx][0-9]+,\s*[atx][0-9]+ +** andi\s+a0,\s*a0,\s*0xff +** ret +*/ +DEF_SAT_U_ADD_FMT_7(uint64_t, uint8_t) + +/* { dg-final { scan-tree-dump-times ".SAT_ADD " 1 "optimized" } } */ diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u16-from-u32.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u16-from-u32.c new file mode 100644 index 0000000..25dc1d1 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u16-from-u32.c @@ -0,0 +1,26 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "sat_arith.h" + +#define T uint16_t +#define WT uint32_t +#define RUN_SAT_BINARY RUN_SAT_U_ADD_FMT_7_FROM_U32_WRAP + +DEF_SAT_U_ADD_FMT_7_WRAP(WT, T) + +T test_data[][3] = { + /* arg_0, arg_1, expect */ + { 0, 0, 0, }, + { 0, 1, 1, }, + { 1, 1, 2, }, + { 0, 65534, 65534, }, + { 1, 65534, 65535, }, + { 2, 65534, 65535, }, + { 0, 65535, 65535, }, + { 1, 65535, 65535, }, + { 2, 65535, 65535, }, + { 65535, 65535, 65535, }, +}; + +#include "scalar_sat_binary.h" diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u16-from-u64.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u16-from-u64.c new file mode 100644 index 0000000..565b108 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u16-from-u64.c @@ -0,0 +1,26 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "sat_arith.h" + +#define T uint16_t +#define WT uint64_t +#define RUN_SAT_BINARY RUN_SAT_U_ADD_FMT_7_FROM_U64_WRAP + +DEF_SAT_U_ADD_FMT_7_WRAP(WT, T) + +T test_data[][3] = { + /* arg_0, arg_1, expect */ + { 0, 0, 0, }, + { 0, 1, 1, }, + { 1, 1, 2, }, + { 0, 65534, 65534, }, + { 1, 65534, 65535, }, + { 2, 65534, 65535, }, + { 0, 65535, 65535, }, + { 1, 65535, 65535, }, + { 2, 65535, 65535, }, + { 65535, 65535, 65535, }, +}; + +#include "scalar_sat_binary.h" diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u32-from-u64.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u32-from-u64.c new file mode 100644 index 0000000..6ff34fd --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u32-from-u64.c @@ -0,0 +1,26 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "sat_arith.h" + +#define T uint32_t +#define WT uint64_t +#define RUN_SAT_BINARY RUN_SAT_U_ADD_FMT_7_FROM_U64_WRAP + +DEF_SAT_U_ADD_FMT_7_WRAP(WT, T) + +T test_data[][3] = { + /* arg_0, arg_1, expect */ + { 0, 0, 0, }, + { 0, 1, 1, }, + { 1, 1, 2, }, + { 0, 4294967294, 4294967294, }, + { 1, 4294967294, 4294967295, }, + { 2, 4294967294, 4294967295, }, + { 0, 4294967295, 4294967295, }, + { 1, 4294967295, 4294967295, }, + { 2, 4294967295, 4294967295, }, + { 4294967295, 4294967295, 4294967295, }, +}; + +#include "scalar_sat_binary.h" diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u16.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u16.c new file mode 100644 index 0000000..9e6e70a --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u16.c @@ -0,0 +1,26 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "sat_arith.h" + +#define T uint8_t +#define WT uint16_t +#define RUN_SAT_BINARY RUN_SAT_U_ADD_FMT_7_FROM_U16_WRAP + +DEF_SAT_U_ADD_FMT_7_WRAP(WT, T) + +T test_data[][3] = { + /* arg_0, arg_1, expect */ + { 0, 0, 0, }, + { 0, 1, 1, }, + { 1, 1, 2, }, + { 0, 254, 254, }, + { 1, 254, 255, }, + { 2, 254, 255, }, + { 0, 255, 255, }, + { 1, 255, 255, }, + { 2, 255, 255, }, + { 255, 255, 255, }, +}; + +#include "scalar_sat_binary.h" diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u32.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u32.c new file mode 100644 index 0000000..a1134ed --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u32.c @@ -0,0 +1,26 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "sat_arith.h" + +#define T uint8_t +#define WT uint32_t +#define RUN_SAT_BINARY RUN_SAT_U_ADD_FMT_7_FROM_U32_WRAP + +DEF_SAT_U_ADD_FMT_7_WRAP(WT, T) + +T test_data[][3] = { + /* arg_0, arg_1, expect */ + { 0, 0, 0, }, + { 0, 1, 1, }, + { 1, 1, 2, }, + { 0, 254, 254, }, + { 1, 254, 255, }, + { 2, 254, 255, }, + { 0, 255, 255, }, + { 1, 255, 255, }, + { 2, 255, 255, }, + { 255, 255, 255, }, +}; + +#include "scalar_sat_binary.h" diff --git a/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u64.c b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u64.c new file mode 100644 index 0000000..ef9f7aa --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/sat/sat_u_add-run-7-u8-from-u64.c @@ -0,0 +1,26 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=c99" } */ + +#include "sat_arith.h" + +#define T uint8_t +#define WT uint64_t +#define RUN_SAT_BINARY RUN_SAT_U_ADD_FMT_7_FROM_U64_WRAP + +DEF_SAT_U_ADD_FMT_7_WRAP(WT, T) + +T test_data[][3] = { + /* arg_0, arg_1, expect */ + { 0, 0, 0, }, + { 0, 1, 1, }, + { 1, 1, 2, }, + { 0, 254, 254, }, + { 1, 254, 255, }, + { 2, 254, 255, }, + { 0, 255, 255, }, + { 1, 255, 255, }, + { 2, 255, 255, }, + { 255, 255, 255, }, +}; + +#include "scalar_sat_binary.h" diff --git a/gcc/testsuite/gfortran.dg/dec_math.f90 b/gcc/testsuite/gfortran.dg/dec_math.f90 index 393e7de..79c1807 100644 --- a/gcc/testsuite/gfortran.dg/dec_math.f90 +++ b/gcc/testsuite/gfortran.dg/dec_math.f90 @@ -5,6 +5,12 @@ ! Test extra math intrinsics formerly offered by -fdec-math, ! now included with -std=gnu or -std=legacy. ! +! Since Fortran 2023, the degree trigonometric functions (sind, cosd, ...) +! are part of the standard; additionally, Fortran 2023 added a two-argument +! version of atand as alias for atan2d. +! +! Note that cotan and cotand are not part of Fortran 2023; hence, this file +! still requires -std=gnu and cannot be compiled with -std=f2023. module dec_math @@ -522,6 +528,69 @@ call cmpq(q_i1, q_oxe, q_ox, q_tol, "(x) qatand") #endif ! Input +f_i1 = 1.0_4 +f_i2 = 2.0_4 +d_i1 = 1.0_8 +d_i2 = 2.0_8 +#ifdef __GFC_REAL_10__ +l_i1 = 1.0_10 +l_i2 = 2.0_10 +#endif +#ifdef __GFC_REAL_16__ +q_i1 = 1.0_16 +q_i2 = 2.0_16 +#endif + +! Expected +f_oe = r2d_f * atan2 (f_i1, f_i2) +f_oxe = r2d_f * atan2 (xf * f_i1, f_i2) +d_oe = r2d_d * atan2 (d_i1, d_i2) +d_oxe = r2d_d * atan2 (xd * d_i1, d_i2) +#ifdef __GFC_REAL_10__ +l_oe = r2d_l * atan2 (l_i1, l_i2) +l_oxe = r2d_l * atan2 (xl * l_i1, l_i2) +#endif +#ifdef __GFC_REAL_16__ +q_oe = r2d_q * atan2 (q_i1, q_i2) +q_oxe = r2d_q * atan2 (xq * q_i1, q_i2) +#endif + +! Actual +f_oa = atand (f_i1, f_i2) +f_oc = atand (1.0_4, 2.0_4) +f_ox = atand (xf * f_i1, f_i2) +d_oa = atand (d_i1, d_i2) +d_oc = atand (1.0_8, 2.0_8) +d_ox = atand (xd * d_i1, d_i2) +#ifdef __GFC_REAL_10__ +l_oa = atand (l_i1, l_i2) +l_oc = atand (1.0_10, 2.0_10) +l_ox = atand (xl * l_i1, l_i2) +#endif +#ifdef __GFC_REAL_16__ +q_oa = atand (q_i1, q_i2) +q_oc = atand (1.0_16, 2.0_16) +q_ox = atand (xq * q_i1, q_i2) +#endif + +call cmpf(f_i1, f_oe, f_oa, f_tol, "( ) fatand") +call cmpf(f_i1, f_oe, f_oc, f_tol, "(c) fatand") +call cmpf(f_i1, f_oxe, f_ox, f_tol, "(x) fatand") +call cmpd(d_i1, d_oe, d_oa, d_tol, "( ) datand") +call cmpd(d_i1, d_oe, d_oc, d_tol, "(c) datand") +call cmpd(d_i1, d_oxe, d_ox, d_tol, "(x) atand") +#ifdef __GFC_REAL_10__ +call cmpl(l_i1, l_oe, l_oa, l_tol, "( ) latand") +call cmpl(l_i1, l_oe, l_oc, l_tol, "(c) latand") +call cmpl(l_i1, l_oxe, l_ox, l_tol, "(x) latand") +#endif +#ifdef __GFC_REAL_16__ +call cmpq(q_i1, q_oe, q_oa, q_tol, "( ) qatand") +call cmpq(q_i1, q_oe, q_oc, q_tol, "(c) qatand") +call cmpq(q_i1, q_oxe, q_ox, q_tol, "(x) qatand") +#endif + +! Input f_i1 = 34.3775_4 d_i1 = 34.3774677078494_8 #ifdef __GFC_REAL_10__ diff --git a/gcc/testsuite/gfortran.dg/pr120191_1.f90 b/gcc/testsuite/gfortran.dg/pr120191_1.f90 new file mode 100644 index 0000000..13a787d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr120191_1.f90 @@ -0,0 +1,614 @@ +! PR fortran/120191 +! { dg-do run } + + integer(kind=1) :: a1(10, 10, 10), b1(10) + integer(kind=2) :: a2(10, 10, 10), b2(10) + integer(kind=4) :: a4(10, 10, 10), b4(10) + integer(kind=8) :: a8(10, 10, 10), b8(10) + real(kind=4) :: r4(10, 10, 10), s4(10) + real(kind=8) :: r8(10, 10, 10), s8(10) + logical :: l1(10, 10, 10), l2(10), l3 + l1 = .true. + l2 = .true. + l3 = .true. + a1 = 0 + if (any (maxloc (a1) .ne. 1)) stop 1 + if (any (maxloc (a1, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (a1, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (a1, kind=2) .ne. 1)) stop 4 + if (any (maxloc (a1, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (a1, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (maxloc (a1, 1) .ne. 1)) stop 7 + if (any (maxloc (a1, 1, back=.false.) .ne. 1)) stop 8 + if (any (maxloc (a1, 1, back=.true.) .ne. 10)) stop 9 + if (any (maxloc (a1, 1, kind=1) .ne. 1)) stop 10 + if (any (maxloc (a1, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (maxloc (a1, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (maxloc (a1, 1, l1) .ne. 1)) stop 13 + if (any (maxloc (a1, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (maxloc (a1, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (maxloc (a1, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (maxloc (a1, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (maxloc (a1, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (maxloc (a1, 1, l3) .ne. 1)) stop 19 + if (any (maxloc (a1, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (maxloc (a1, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (maxloc (a1, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (maxloc (a1, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (maxloc (a1, 1, l3, 2, .true.) .ne. 10)) stop 24 + b1 = 0 + if (any (maxloc (b1) .ne. 1)) stop 1 + if (any (maxloc (b1, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (b1, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (b1, kind=2) .ne. 1)) stop 4 + if (any (maxloc (b1, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (b1, kind=8, back=.true.) .ne. 10)) stop 6 + if (maxloc (b1, 1) .ne. 1) stop 7 + if (maxloc (b1, 1, back=.false.) .ne. 1) stop 8 + if (maxloc (b1, 1, back=.true.) .ne. 10) stop 9 + if (maxloc (b1, 1, kind=1) .ne. 1) stop 10 + if (maxloc (b1, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (maxloc (b1, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (maxloc (b1, 1, l2) .ne. 1) stop 13 + if (maxloc (b1, 1, l2, back=.false.) .ne. 1) stop 14 + if (maxloc (b1, 1, l2, back=.true.) .ne. 10) stop 15 + if (maxloc (b1, 1, l2, kind=8) .ne. 1) stop 16 + if (maxloc (b1, 1, l2, 4, .false.) .ne. 1) stop 17 + if (maxloc (b1, 1, l2, 2, .true.) .ne. 10) stop 18 + if (maxloc (b1, 1, l3) .ne. 1) stop 19 + if (maxloc (b1, 1, l3, back=.false.) .ne. 1) stop 20 + if (maxloc (b1, 1, l3, back=.true.) .ne. 10) stop 21 + if (maxloc (b1, 1, l3, kind=8) .ne. 1) stop 22 + if (maxloc (b1, 1, l3, 4, .false.) .ne. 1) stop 23 + if (maxloc (b1, 1, l3, 2, .true.) .ne. 10) stop 24 + a2 = 0 + if (any (maxloc (a2) .ne. 1)) stop 1 + if (any (maxloc (a2, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (a2, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (a2, kind=2) .ne. 1)) stop 4 + if (any (maxloc (a2, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (a2, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (maxloc (a2, 1) .ne. 1)) stop 7 + if (any (maxloc (a2, 1, back=.false.) .ne. 1)) stop 8 + if (any (maxloc (a2, 1, back=.true.) .ne. 10)) stop 9 + if (any (maxloc (a2, 1, kind=1) .ne. 1)) stop 10 + if (any (maxloc (a2, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (maxloc (a2, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (maxloc (a2, 1, l1) .ne. 1)) stop 13 + if (any (maxloc (a2, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (maxloc (a2, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (maxloc (a2, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (maxloc (a2, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (maxloc (a2, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (maxloc (a2, 1, l3) .ne. 1)) stop 19 + if (any (maxloc (a2, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (maxloc (a2, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (maxloc (a2, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (maxloc (a2, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (maxloc (a2, 1, l3, 2, .true.) .ne. 10)) stop 24 + b2 = 0 + if (any (maxloc (b2) .ne. 1)) stop 1 + if (any (maxloc (b2, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (b2, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (b2, kind=2) .ne. 1)) stop 4 + if (any (maxloc (b2, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (b2, kind=8, back=.true.) .ne. 10)) stop 6 + if (maxloc (b2, 1) .ne. 1) stop 7 + if (maxloc (b2, 1, back=.false.) .ne. 1) stop 8 + if (maxloc (b2, 1, back=.true.) .ne. 10) stop 9 + if (maxloc (b2, 1, kind=1) .ne. 1) stop 10 + if (maxloc (b2, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (maxloc (b2, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (maxloc (b2, 1, l2) .ne. 1) stop 13 + if (maxloc (b2, 1, l2, back=.false.) .ne. 1) stop 14 + if (maxloc (b2, 1, l2, back=.true.) .ne. 10) stop 15 + if (maxloc (b2, 1, l2, kind=8) .ne. 1) stop 16 + if (maxloc (b2, 1, l2, 4, .false.) .ne. 1) stop 17 + if (maxloc (b2, 1, l2, 2, .true.) .ne. 10) stop 18 + if (maxloc (b2, 1, l3) .ne. 1) stop 19 + if (maxloc (b2, 1, l3, back=.false.) .ne. 1) stop 20 + if (maxloc (b2, 1, l3, back=.true.) .ne. 10) stop 21 + if (maxloc (b2, 1, l3, kind=8) .ne. 1) stop 22 + if (maxloc (b2, 1, l3, 4, .false.) .ne. 1) stop 23 + if (maxloc (b2, 1, l3, 2, .true.) .ne. 10) stop 24 + a4 = 0 + if (any (maxloc (a4) .ne. 1)) stop 1 + if (any (maxloc (a4, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (a4, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (a4, kind=2) .ne. 1)) stop 4 + if (any (maxloc (a4, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (a4, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (maxloc (a4, 1) .ne. 1)) stop 7 + if (any (maxloc (a4, 1, back=.false.) .ne. 1)) stop 8 + if (any (maxloc (a4, 1, back=.true.) .ne. 10)) stop 9 + if (any (maxloc (a4, 1, kind=1) .ne. 1)) stop 10 + if (any (maxloc (a4, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (maxloc (a4, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (maxloc (a4, 1, l1) .ne. 1)) stop 13 + if (any (maxloc (a4, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (maxloc (a4, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (maxloc (a4, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (maxloc (a4, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (maxloc (a4, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (maxloc (a4, 1, l3) .ne. 1)) stop 19 + if (any (maxloc (a4, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (maxloc (a4, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (maxloc (a4, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (maxloc (a4, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (maxloc (a4, 1, l3, 2, .true.) .ne. 10)) stop 24 + b4 = 0 + if (any (maxloc (b4) .ne. 1)) stop 1 + if (any (maxloc (b4, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (b4, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (b4, kind=2) .ne. 1)) stop 4 + if (any (maxloc (b4, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (b4, kind=8, back=.true.) .ne. 10)) stop 6 + if (maxloc (b4, 1) .ne. 1) stop 7 + if (maxloc (b4, 1, back=.false.) .ne. 1) stop 8 + if (maxloc (b4, 1, back=.true.) .ne. 10) stop 9 + if (maxloc (b4, 1, kind=1) .ne. 1) stop 10 + if (maxloc (b4, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (maxloc (b4, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (maxloc (b4, 1, l2) .ne. 1) stop 13 + if (maxloc (b4, 1, l2, back=.false.) .ne. 1) stop 14 + if (maxloc (b4, 1, l2, back=.true.) .ne. 10) stop 15 + if (maxloc (b4, 1, l2, kind=8) .ne. 1) stop 16 + if (maxloc (b4, 1, l2, 4, .false.) .ne. 1) stop 17 + if (maxloc (b4, 1, l2, 2, .true.) .ne. 10) stop 18 + if (maxloc (b4, 1, l3) .ne. 1) stop 19 + if (maxloc (b4, 1, l3, back=.false.) .ne. 1) stop 20 + if (maxloc (b4, 1, l3, back=.true.) .ne. 10) stop 21 + if (maxloc (b4, 1, l3, kind=8) .ne. 1) stop 22 + if (maxloc (b4, 1, l3, 4, .false.) .ne. 1) stop 23 + if (maxloc (b4, 1, l3, 2, .true.) .ne. 10) stop 24 + a8 = 0 + if (any (maxloc (a8) .ne. 1)) stop 1 + if (any (maxloc (a8, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (a8, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (a8, kind=2) .ne. 1)) stop 4 + if (any (maxloc (a8, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (a8, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (maxloc (a8, 1) .ne. 1)) stop 7 + if (any (maxloc (a8, 1, back=.false.) .ne. 1)) stop 8 + if (any (maxloc (a8, 1, back=.true.) .ne. 10)) stop 9 + if (any (maxloc (a8, 1, kind=1) .ne. 1)) stop 10 + if (any (maxloc (a8, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (maxloc (a8, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (maxloc (a8, 1, l1) .ne. 1)) stop 13 + if (any (maxloc (a8, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (maxloc (a8, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (maxloc (a8, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (maxloc (a8, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (maxloc (a8, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (maxloc (a8, 1, l3) .ne. 1)) stop 19 + if (any (maxloc (a8, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (maxloc (a8, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (maxloc (a8, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (maxloc (a8, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (maxloc (a8, 1, l3, 2, .true.) .ne. 10)) stop 24 + b8 = 0 + if (any (maxloc (b8) .ne. 1)) stop 1 + if (any (maxloc (b8, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (b8, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (b8, kind=2) .ne. 1)) stop 4 + if (any (maxloc (b8, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (b8, kind=8, back=.true.) .ne. 10)) stop 6 + if (maxloc (b8, 1) .ne. 1) stop 7 + if (maxloc (b8, 1, back=.false.) .ne. 1) stop 8 + if (maxloc (b8, 1, back=.true.) .ne. 10) stop 9 + if (maxloc (b8, 1, kind=1) .ne. 1) stop 10 + if (maxloc (b8, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (maxloc (b8, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (maxloc (b8, 1, l2) .ne. 1) stop 13 + if (maxloc (b8, 1, l2, back=.false.) .ne. 1) stop 14 + if (maxloc (b8, 1, l2, back=.true.) .ne. 10) stop 15 + if (maxloc (b8, 1, l2, kind=8) .ne. 1) stop 16 + if (maxloc (b8, 1, l2, 4, .false.) .ne. 1) stop 17 + if (maxloc (b8, 1, l2, 2, .true.) .ne. 10) stop 18 + if (maxloc (b8, 1, l3) .ne. 1) stop 19 + if (maxloc (b8, 1, l3, back=.false.) .ne. 1) stop 20 + if (maxloc (b8, 1, l3, back=.true.) .ne. 10) stop 21 + if (maxloc (b8, 1, l3, kind=8) .ne. 1) stop 22 + if (maxloc (b8, 1, l3, 4, .false.) .ne. 1) stop 23 + if (maxloc (b8, 1, l3, 2, .true.) .ne. 10) stop 24 + r4 = 0.0 + if (any (maxloc (r4) .ne. 1)) stop 1 + if (any (maxloc (r4, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (r4, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (r4, kind=2) .ne. 1)) stop 4 + if (any (maxloc (r4, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (r4, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (maxloc (r4, 1) .ne. 1)) stop 7 + if (any (maxloc (r4, 1, back=.false.) .ne. 1)) stop 8 + if (any (maxloc (r4, 1, back=.true.) .ne. 10)) stop 9 + if (any (maxloc (r4, 1, kind=1) .ne. 1)) stop 10 + if (any (maxloc (r4, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (maxloc (r4, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (maxloc (r4, 1, l1) .ne. 1)) stop 13 + if (any (maxloc (r4, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (maxloc (r4, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (maxloc (r4, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (maxloc (r4, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (maxloc (r4, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (maxloc (r4, 1, l3) .ne. 1)) stop 19 + if (any (maxloc (r4, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (maxloc (r4, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (maxloc (r4, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (maxloc (r4, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (maxloc (r4, 1, l3, 2, .true.) .ne. 10)) stop 24 + s4 = 0.0 + if (any (maxloc (s4) .ne. 1)) stop 1 + if (any (maxloc (s4, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (s4, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (s4, kind=2) .ne. 1)) stop 4 + if (any (maxloc (s4, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (s4, kind=8, back=.true.) .ne. 10)) stop 6 + if (maxloc (s4, 1) .ne. 1) stop 7 + if (maxloc (s4, 1, back=.false.) .ne. 1) stop 8 + if (maxloc (s4, 1, back=.true.) .ne. 10) stop 9 + if (maxloc (s4, 1, kind=1) .ne. 1) stop 10 + if (maxloc (s4, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (maxloc (s4, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (maxloc (s4, 1, l2) .ne. 1) stop 13 + if (maxloc (s4, 1, l2, back=.false.) .ne. 1) stop 14 + if (maxloc (s4, 1, l2, back=.true.) .ne. 10) stop 15 + if (maxloc (s4, 1, l2, kind=8) .ne. 1) stop 16 + if (maxloc (s4, 1, l2, 4, .false.) .ne. 1) stop 17 + if (maxloc (s4, 1, l2, 2, .true.) .ne. 10) stop 18 + if (maxloc (s4, 1, l3) .ne. 1) stop 19 + if (maxloc (s4, 1, l3, back=.false.) .ne. 1) stop 20 + if (maxloc (s4, 1, l3, back=.true.) .ne. 10) stop 21 + if (maxloc (s4, 1, l3, kind=8) .ne. 1) stop 22 + if (maxloc (s4, 1, l3, 4, .false.) .ne. 1) stop 23 + if (maxloc (s4, 1, l3, 2, .true.) .ne. 10) stop 24 + r8 = 0.0 + if (any (maxloc (r8) .ne. 1)) stop 1 + if (any (maxloc (r8, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (r8, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (r8, kind=2) .ne. 1)) stop 4 + if (any (maxloc (r8, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (r8, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (maxloc (r8, 1) .ne. 1)) stop 7 + if (any (maxloc (r8, 1, back=.false.) .ne. 1)) stop 8 + if (any (maxloc (r8, 1, back=.true.) .ne. 10)) stop 9 + if (any (maxloc (r8, 1, kind=1) .ne. 1)) stop 10 + if (any (maxloc (r8, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (maxloc (r8, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (maxloc (r8, 1, l1) .ne. 1)) stop 13 + if (any (maxloc (r8, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (maxloc (r8, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (maxloc (r8, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (maxloc (r8, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (maxloc (r8, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (maxloc (r8, 1, l3) .ne. 1)) stop 19 + if (any (maxloc (r8, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (maxloc (r8, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (maxloc (r8, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (maxloc (r8, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (maxloc (r8, 1, l3, 2, .true.) .ne. 10)) stop 24 + s8 = 0.0 + if (any (maxloc (s8) .ne. 1)) stop 1 + if (any (maxloc (s8, back=.false.) .ne. 1)) stop 2 + if (any (maxloc (s8, back=.true.) .ne. 10)) stop 3 + if (any (maxloc (s8, kind=2) .ne. 1)) stop 4 + if (any (maxloc (s8, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (maxloc (s8, kind=8, back=.true.) .ne. 10)) stop 6 + if (maxloc (s8, 1) .ne. 1) stop 7 + if (maxloc (s8, 1, back=.false.) .ne. 1) stop 8 + if (maxloc (s8, 1, back=.true.) .ne. 10) stop 9 + if (maxloc (s8, 1, kind=1) .ne. 1) stop 10 + if (maxloc (s8, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (maxloc (s8, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (maxloc (s8, 1, l2) .ne. 1) stop 13 + if (maxloc (s8, 1, l2, back=.false.) .ne. 1) stop 14 + if (maxloc (s8, 1, l2, back=.true.) .ne. 10) stop 15 + if (maxloc (s8, 1, l2, kind=8) .ne. 1) stop 16 + if (maxloc (s8, 1, l2, 4, .false.) .ne. 1) stop 17 + if (maxloc (s8, 1, l2, 2, .true.) .ne. 10) stop 18 + if (maxloc (s8, 1, l3) .ne. 1) stop 19 + if (maxloc (s8, 1, l3, back=.false.) .ne. 1) stop 20 + if (maxloc (s8, 1, l3, back=.true.) .ne. 10) stop 21 + if (maxloc (s8, 1, l3, kind=8) .ne. 1) stop 22 + if (maxloc (s8, 1, l3, 4, .false.) .ne. 1) stop 23 + if (maxloc (s8, 1, l3, 2, .true.) .ne. 10) stop 24 + a1 = 0 + if (any (minloc (a1) .ne. 1)) stop 1 + if (any (minloc (a1, back=.false.) .ne. 1)) stop 2 + if (any (minloc (a1, back=.true.) .ne. 10)) stop 3 + if (any (minloc (a1, kind=2) .ne. 1)) stop 4 + if (any (minloc (a1, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (a1, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (minloc (a1, 1) .ne. 1)) stop 7 + if (any (minloc (a1, 1, back=.false.) .ne. 1)) stop 8 + if (any (minloc (a1, 1, back=.true.) .ne. 10)) stop 9 + if (any (minloc (a1, 1, kind=1) .ne. 1)) stop 10 + if (any (minloc (a1, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (minloc (a1, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (minloc (a1, 1, l1) .ne. 1)) stop 13 + if (any (minloc (a1, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (minloc (a1, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (minloc (a1, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (minloc (a1, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (minloc (a1, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (minloc (a1, 1, l3) .ne. 1)) stop 19 + if (any (minloc (a1, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (minloc (a1, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (minloc (a1, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (minloc (a1, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (minloc (a1, 1, l3, 2, .true.) .ne. 10)) stop 24 + b1 = 0 + if (any (minloc (b1) .ne. 1)) stop 1 + if (any (minloc (b1, back=.false.) .ne. 1)) stop 2 + if (any (minloc (b1, back=.true.) .ne. 10)) stop 3 + if (any (minloc (b1, kind=2) .ne. 1)) stop 4 + if (any (minloc (b1, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (b1, kind=8, back=.true.) .ne. 10)) stop 6 + if (minloc (b1, 1) .ne. 1) stop 7 + if (minloc (b1, 1, back=.false.) .ne. 1) stop 8 + if (minloc (b1, 1, back=.true.) .ne. 10) stop 9 + if (minloc (b1, 1, kind=1) .ne. 1) stop 10 + if (minloc (b1, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (minloc (b1, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (minloc (b1, 1, l2) .ne. 1) stop 13 + if (minloc (b1, 1, l2, back=.false.) .ne. 1) stop 14 + if (minloc (b1, 1, l2, back=.true.) .ne. 10) stop 15 + if (minloc (b1, 1, l2, kind=8) .ne. 1) stop 16 + if (minloc (b1, 1, l2, 4, .false.) .ne. 1) stop 17 + if (minloc (b1, 1, l2, 2, .true.) .ne. 10) stop 18 + if (minloc (b1, 1, l3) .ne. 1) stop 19 + if (minloc (b1, 1, l3, back=.false.) .ne. 1) stop 20 + if (minloc (b1, 1, l3, back=.true.) .ne. 10) stop 21 + if (minloc (b1, 1, l3, kind=8) .ne. 1) stop 22 + if (minloc (b1, 1, l3, 4, .false.) .ne. 1) stop 23 + if (minloc (b1, 1, l3, 2, .true.) .ne. 10) stop 24 + a2 = 0 + if (any (minloc (a2) .ne. 1)) stop 1 + if (any (minloc (a2, back=.false.) .ne. 1)) stop 2 + if (any (minloc (a2, back=.true.) .ne. 10)) stop 3 + if (any (minloc (a2, kind=2) .ne. 1)) stop 4 + if (any (minloc (a2, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (a2, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (minloc (a2, 1) .ne. 1)) stop 7 + if (any (minloc (a2, 1, back=.false.) .ne. 1)) stop 8 + if (any (minloc (a2, 1, back=.true.) .ne. 10)) stop 9 + if (any (minloc (a2, 1, kind=1) .ne. 1)) stop 10 + if (any (minloc (a2, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (minloc (a2, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (minloc (a2, 1, l1) .ne. 1)) stop 13 + if (any (minloc (a2, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (minloc (a2, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (minloc (a2, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (minloc (a2, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (minloc (a2, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (minloc (a2, 1, l3) .ne. 1)) stop 19 + if (any (minloc (a2, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (minloc (a2, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (minloc (a2, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (minloc (a2, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (minloc (a2, 1, l3, 2, .true.) .ne. 10)) stop 24 + b2 = 0 + if (any (minloc (b2) .ne. 1)) stop 1 + if (any (minloc (b2, back=.false.) .ne. 1)) stop 2 + if (any (minloc (b2, back=.true.) .ne. 10)) stop 3 + if (any (minloc (b2, kind=2) .ne. 1)) stop 4 + if (any (minloc (b2, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (b2, kind=8, back=.true.) .ne. 10)) stop 6 + if (minloc (b2, 1) .ne. 1) stop 7 + if (minloc (b2, 1, back=.false.) .ne. 1) stop 8 + if (minloc (b2, 1, back=.true.) .ne. 10) stop 9 + if (minloc (b2, 1, kind=1) .ne. 1) stop 10 + if (minloc (b2, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (minloc (b2, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (minloc (b2, 1, l2) .ne. 1) stop 13 + if (minloc (b2, 1, l2, back=.false.) .ne. 1) stop 14 + if (minloc (b2, 1, l2, back=.true.) .ne. 10) stop 15 + if (minloc (b2, 1, l2, kind=8) .ne. 1) stop 16 + if (minloc (b2, 1, l2, 4, .false.) .ne. 1) stop 17 + if (minloc (b2, 1, l2, 2, .true.) .ne. 10) stop 18 + if (minloc (b2, 1, l3) .ne. 1) stop 19 + if (minloc (b2, 1, l3, back=.false.) .ne. 1) stop 20 + if (minloc (b2, 1, l3, back=.true.) .ne. 10) stop 21 + if (minloc (b2, 1, l3, kind=8) .ne. 1) stop 22 + if (minloc (b2, 1, l3, 4, .false.) .ne. 1) stop 23 + if (minloc (b2, 1, l3, 2, .true.) .ne. 10) stop 24 + a4 = 0 + if (any (minloc (a4) .ne. 1)) stop 1 + if (any (minloc (a4, back=.false.) .ne. 1)) stop 2 + if (any (minloc (a4, back=.true.) .ne. 10)) stop 3 + if (any (minloc (a4, kind=2) .ne. 1)) stop 4 + if (any (minloc (a4, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (a4, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (minloc (a4, 1) .ne. 1)) stop 7 + if (any (minloc (a4, 1, back=.false.) .ne. 1)) stop 8 + if (any (minloc (a4, 1, back=.true.) .ne. 10)) stop 9 + if (any (minloc (a4, 1, kind=1) .ne. 1)) stop 10 + if (any (minloc (a4, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (minloc (a4, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (minloc (a4, 1, l1) .ne. 1)) stop 13 + if (any (minloc (a4, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (minloc (a4, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (minloc (a4, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (minloc (a4, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (minloc (a4, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (minloc (a4, 1, l3) .ne. 1)) stop 19 + if (any (minloc (a4, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (minloc (a4, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (minloc (a4, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (minloc (a4, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (minloc (a4, 1, l3, 2, .true.) .ne. 10)) stop 24 + b4 = 0 + if (any (minloc (b4) .ne. 1)) stop 1 + if (any (minloc (b4, back=.false.) .ne. 1)) stop 2 + if (any (minloc (b4, back=.true.) .ne. 10)) stop 3 + if (any (minloc (b4, kind=2) .ne. 1)) stop 4 + if (any (minloc (b4, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (b4, kind=8, back=.true.) .ne. 10)) stop 6 + if (minloc (b4, 1) .ne. 1) stop 7 + if (minloc (b4, 1, back=.false.) .ne. 1) stop 8 + if (minloc (b4, 1, back=.true.) .ne. 10) stop 9 + if (minloc (b4, 1, kind=1) .ne. 1) stop 10 + if (minloc (b4, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (minloc (b4, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (minloc (b4, 1, l2) .ne. 1) stop 13 + if (minloc (b4, 1, l2, back=.false.) .ne. 1) stop 14 + if (minloc (b4, 1, l2, back=.true.) .ne. 10) stop 15 + if (minloc (b4, 1, l2, kind=8) .ne. 1) stop 16 + if (minloc (b4, 1, l2, 4, .false.) .ne. 1) stop 17 + if (minloc (b4, 1, l2, 2, .true.) .ne. 10) stop 18 + if (minloc (b4, 1, l3) .ne. 1) stop 19 + if (minloc (b4, 1, l3, back=.false.) .ne. 1) stop 20 + if (minloc (b4, 1, l3, back=.true.) .ne. 10) stop 21 + if (minloc (b4, 1, l3, kind=8) .ne. 1) stop 22 + if (minloc (b4, 1, l3, 4, .false.) .ne. 1) stop 23 + if (minloc (b4, 1, l3, 2, .true.) .ne. 10) stop 24 + a8 = 0 + if (any (minloc (a8) .ne. 1)) stop 1 + if (any (minloc (a8, back=.false.) .ne. 1)) stop 2 + if (any (minloc (a8, back=.true.) .ne. 10)) stop 3 + if (any (minloc (a8, kind=2) .ne. 1)) stop 4 + if (any (minloc (a8, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (a8, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (minloc (a8, 1) .ne. 1)) stop 7 + if (any (minloc (a8, 1, back=.false.) .ne. 1)) stop 8 + if (any (minloc (a8, 1, back=.true.) .ne. 10)) stop 9 + if (any (minloc (a8, 1, kind=1) .ne. 1)) stop 10 + if (any (minloc (a8, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (minloc (a8, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (minloc (a8, 1, l1) .ne. 1)) stop 13 + if (any (minloc (a8, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (minloc (a8, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (minloc (a8, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (minloc (a8, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (minloc (a8, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (minloc (a8, 1, l3) .ne. 1)) stop 19 + if (any (minloc (a8, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (minloc (a8, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (minloc (a8, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (minloc (a8, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (minloc (a8, 1, l3, 2, .true.) .ne. 10)) stop 24 + b8 = 0 + if (any (minloc (b8) .ne. 1)) stop 1 + if (any (minloc (b8, back=.false.) .ne. 1)) stop 2 + if (any (minloc (b8, back=.true.) .ne. 10)) stop 3 + if (any (minloc (b8, kind=2) .ne. 1)) stop 4 + if (any (minloc (b8, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (b8, kind=8, back=.true.) .ne. 10)) stop 6 + if (minloc (b8, 1) .ne. 1) stop 7 + if (minloc (b8, 1, back=.false.) .ne. 1) stop 8 + if (minloc (b8, 1, back=.true.) .ne. 10) stop 9 + if (minloc (b8, 1, kind=1) .ne. 1) stop 10 + if (minloc (b8, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (minloc (b8, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (minloc (b8, 1, l2) .ne. 1) stop 13 + if (minloc (b8, 1, l2, back=.false.) .ne. 1) stop 14 + if (minloc (b8, 1, l2, back=.true.) .ne. 10) stop 15 + if (minloc (b8, 1, l2, kind=8) .ne. 1) stop 16 + if (minloc (b8, 1, l2, 4, .false.) .ne. 1) stop 17 + if (minloc (b8, 1, l2, 2, .true.) .ne. 10) stop 18 + if (minloc (b8, 1, l3) .ne. 1) stop 19 + if (minloc (b8, 1, l3, back=.false.) .ne. 1) stop 20 + if (minloc (b8, 1, l3, back=.true.) .ne. 10) stop 21 + if (minloc (b8, 1, l3, kind=8) .ne. 1) stop 22 + if (minloc (b8, 1, l3, 4, .false.) .ne. 1) stop 23 + if (minloc (b8, 1, l3, 2, .true.) .ne. 10) stop 24 + r4 = 0.0 + if (any (minloc (r4) .ne. 1)) stop 1 + if (any (minloc (r4, back=.false.) .ne. 1)) stop 2 + if (any (minloc (r4, back=.true.) .ne. 10)) stop 3 + if (any (minloc (r4, kind=2) .ne. 1)) stop 4 + if (any (minloc (r4, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (r4, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (minloc (r4, 1) .ne. 1)) stop 7 + if (any (minloc (r4, 1, back=.false.) .ne. 1)) stop 8 + if (any (minloc (r4, 1, back=.true.) .ne. 10)) stop 9 + if (any (minloc (r4, 1, kind=1) .ne. 1)) stop 10 + if (any (minloc (r4, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (minloc (r4, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (minloc (r4, 1, l1) .ne. 1)) stop 13 + if (any (minloc (r4, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (minloc (r4, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (minloc (r4, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (minloc (r4, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (minloc (r4, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (minloc (r4, 1, l3) .ne. 1)) stop 19 + if (any (minloc (r4, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (minloc (r4, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (minloc (r4, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (minloc (r4, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (minloc (r4, 1, l3, 2, .true.) .ne. 10)) stop 24 + s4 = 0.0 + if (any (minloc (s4) .ne. 1)) stop 1 + if (any (minloc (s4, back=.false.) .ne. 1)) stop 2 + if (any (minloc (s4, back=.true.) .ne. 10)) stop 3 + if (any (minloc (s4, kind=2) .ne. 1)) stop 4 + if (any (minloc (s4, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (s4, kind=8, back=.true.) .ne. 10)) stop 6 + if (minloc (s4, 1) .ne. 1) stop 7 + if (minloc (s4, 1, back=.false.) .ne. 1) stop 8 + if (minloc (s4, 1, back=.true.) .ne. 10) stop 9 + if (minloc (s4, 1, kind=1) .ne. 1) stop 10 + if (minloc (s4, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (minloc (s4, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (minloc (s4, 1, l2) .ne. 1) stop 13 + if (minloc (s4, 1, l2, back=.false.) .ne. 1) stop 14 + if (minloc (s4, 1, l2, back=.true.) .ne. 10) stop 15 + if (minloc (s4, 1, l2, kind=8) .ne. 1) stop 16 + if (minloc (s4, 1, l2, 4, .false.) .ne. 1) stop 17 + if (minloc (s4, 1, l2, 2, .true.) .ne. 10) stop 18 + if (minloc (s4, 1, l3) .ne. 1) stop 19 + if (minloc (s4, 1, l3, back=.false.) .ne. 1) stop 20 + if (minloc (s4, 1, l3, back=.true.) .ne. 10) stop 21 + if (minloc (s4, 1, l3, kind=8) .ne. 1) stop 22 + if (minloc (s4, 1, l3, 4, .false.) .ne. 1) stop 23 + if (minloc (s4, 1, l3, 2, .true.) .ne. 10) stop 24 + r8 = 0.0 + if (any (minloc (r8) .ne. 1)) stop 1 + if (any (minloc (r8, back=.false.) .ne. 1)) stop 2 + if (any (minloc (r8, back=.true.) .ne. 10)) stop 3 + if (any (minloc (r8, kind=2) .ne. 1)) stop 4 + if (any (minloc (r8, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (r8, kind=8, back=.true.) .ne. 10)) stop 6 + if (any (minloc (r8, 1) .ne. 1)) stop 7 + if (any (minloc (r8, 1, back=.false.) .ne. 1)) stop 8 + if (any (minloc (r8, 1, back=.true.) .ne. 10)) stop 9 + if (any (minloc (r8, 1, kind=1) .ne. 1)) stop 10 + if (any (minloc (r8, 1, kind=2, back=.false.) .ne. 1)) stop 11 + if (any (minloc (r8, 1, kind=4, back=.true.) .ne. 10)) stop 12 + if (any (minloc (r8, 1, l1) .ne. 1)) stop 13 + if (any (minloc (r8, 1, l1, back=.false.) .ne. 1)) stop 14 + if (any (minloc (r8, 1, l1, back=.true.) .ne. 10)) stop 15 + if (any (minloc (r8, 1, l1, kind=8) .ne. 1)) stop 16 + if (any (minloc (r8, 1, l1, 4, .false.) .ne. 1)) stop 17 + if (any (minloc (r8, 1, l1, 2, .true.) .ne. 10)) stop 18 + if (any (minloc (r8, 1, l3) .ne. 1)) stop 19 + if (any (minloc (r8, 1, l3, back=.false.) .ne. 1)) stop 20 + if (any (minloc (r8, 1, l3, back=.true.) .ne. 10)) stop 21 + if (any (minloc (r8, 1, l3, kind=8) .ne. 1)) stop 22 + if (any (minloc (r8, 1, l3, 4, .false.) .ne. 1)) stop 23 + if (any (minloc (r8, 1, l3, 2, .true.) .ne. 10)) stop 24 + s8 = 0.0 + if (any (minloc (s8) .ne. 1)) stop 1 + if (any (minloc (s8, back=.false.) .ne. 1)) stop 2 + if (any (minloc (s8, back=.true.) .ne. 10)) stop 3 + if (any (minloc (s8, kind=2) .ne. 1)) stop 4 + if (any (minloc (s8, kind=4, back=.false.) .ne. 1)) stop 5 + if (any (minloc (s8, kind=8, back=.true.) .ne. 10)) stop 6 + if (minloc (s8, 1) .ne. 1) stop 7 + if (minloc (s8, 1, back=.false.) .ne. 1) stop 8 + if (minloc (s8, 1, back=.true.) .ne. 10) stop 9 + if (minloc (s8, 1, kind=1) .ne. 1) stop 10 + if (minloc (s8, 1, kind=2, back=.false.) .ne. 1) stop 11 + if (minloc (s8, 1, kind=4, back=.true.) .ne. 10) stop 12 + if (minloc (s8, 1, l2) .ne. 1) stop 13 + if (minloc (s8, 1, l2, back=.false.) .ne. 1) stop 14 + if (minloc (s8, 1, l2, back=.true.) .ne. 10) stop 15 + if (minloc (s8, 1, l2, kind=8) .ne. 1) stop 16 + if (minloc (s8, 1, l2, 4, .false.) .ne. 1) stop 17 + if (minloc (s8, 1, l2, 2, .true.) .ne. 10) stop 18 + if (minloc (s8, 1, l3) .ne. 1) stop 19 + if (minloc (s8, 1, l3, back=.false.) .ne. 1) stop 20 + if (minloc (s8, 1, l3, back=.true.) .ne. 10) stop 21 + if (minloc (s8, 1, l3, kind=8) .ne. 1) stop 22 + if (minloc (s8, 1, l3, 4, .false.) .ne. 1) stop 23 + if (minloc (s8, 1, l3, 2, .true.) .ne. 10) stop 24 +end diff --git a/gcc/testsuite/gfortran.dg/pr120191_2.f90 b/gcc/testsuite/gfortran.dg/pr120191_2.f90 new file mode 100644 index 0000000..6334286 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr120191_2.f90 @@ -0,0 +1,84 @@ +! PR fortran/120191 +! { dg-do run } + + character(kind=1, len=2) :: a(4, 4, 4), b(4) + logical :: l(4, 4, 4), m, n(4) + a = 'aa' + b = 'aa' + l = .true. + m = .true. + n = .true. + if (any (maxloc (a) .ne. 1)) stop 1 + if (any (maxloc (a, dim=1) .ne. 1)) stop 2 + if (any (maxloc (a, 1) .ne. 1)) stop 3 + if (any (maxloc (a, dim=1, mask=l, kind=4, back=.false.) .ne. 1)) stop 4 + if (any (maxloc (a, 1, l, 4, .false.) .ne. 1)) stop 5 + if (any (maxloc (a, dim=1, mask=m, kind=4, back=.false.) .ne. 1)) stop 6 + if (any (maxloc (a, 1, m, 4, .false.) .ne. 1)) stop 7 + if (any (maxloc (a, dim=1, mask=l, kind=4, back=.true.) .ne. 4)) stop 8 + if (any (maxloc (a, 1, l, 4, .true.) .ne. 4)) stop 9 + if (any (maxloc (a, dim=1, mask=m, kind=4, back=.true.) .ne. 4)) stop 10 + if (any (maxloc (a, 1, m, 4, .true.) .ne. 4)) stop 11 + if (any (maxloc (b) .ne. 1)) stop 12 + if (maxloc (b, dim=1) .ne. 1) stop 13 + if (maxloc (b, 1) .ne. 1) stop 14 + if (maxloc (b, dim=1, mask=n, kind=4, back=.false.) .ne. 1) stop 15 + if (maxloc (b, 1, n, 4, .false.) .ne. 1) stop 16 + if (maxloc (b, dim=1, mask=m, kind=4, back=.false.) .ne. 1) stop 17 + if (maxloc (b, 1, m, 4, .false.) .ne. 1) stop 18 + if (maxloc (b, dim=1, mask=n, kind=4, back=.true.) .ne. 4) stop 19 + if (maxloc (b, 1, n, 4, .true.) .ne. 4) stop 20 + if (maxloc (b, dim=1, mask=m, kind=4, back=.true.) .ne. 4) stop 21 + if (maxloc (b, 1, m, 4, .true.) .ne. 4) stop 22 + l = .false. + m = .false. + n = .false. + if (any (maxloc (a, dim=1, mask=l, kind=4, back=.false.) .ne. 0)) stop 23 + if (any (maxloc (a, 1, l, 4, .false.) .ne. 0)) stop 24 + if (maxloc (b, dim=1, mask=n, kind=4, back=.false.) .ne. 0) stop 25 + if (maxloc (b, 1, n, 4, .false.) .ne. 0) stop 26 + if (maxloc (b, dim=1, mask=m, kind=4, back=.false.) .ne. 0) stop 27 + if (maxloc (b, 1, m, 4, .false.) .ne. 0) stop 28 + if (maxloc (b, dim=1, mask=n, kind=4, back=.true.) .ne. 0) stop 29 + if (maxloc (b, 1, n, 4, .true.) .ne. 0) stop 30 + if (maxloc (b, dim=1, mask=m, kind=4, back=.true.) .ne. 0) stop 31 + if (maxloc (b, 1, m, 4, .true.) .ne. 0) stop 32 + l = .true. + m = .true. + n = .true. + if (any (minloc (a) .ne. 1)) stop 1 + if (any (minloc (a, dim=1) .ne. 1)) stop 2 + if (any (minloc (a, 1) .ne. 1)) stop 3 + if (any (minloc (a, dim=1, mask=l, kind=4, back=.false.) .ne. 1)) stop 4 + if (any (minloc (a, 1, l, 4, .false.) .ne. 1)) stop 5 + if (any (minloc (a, dim=1, mask=m, kind=4, back=.false.) .ne. 1)) stop 6 + if (any (minloc (a, 1, m, 4, .false.) .ne. 1)) stop 7 + if (any (minloc (a, dim=1, mask=l, kind=4, back=.true.) .ne. 4)) stop 8 + if (any (minloc (a, 1, l, 4, .true.) .ne. 4)) stop 9 + if (any (minloc (a, dim=1, mask=m, kind=4, back=.true.) .ne. 4)) stop 10 + if (any (minloc (a, 1, m, 4, .true.) .ne. 4)) stop 11 + if (any (minloc (b) .ne. 1)) stop 12 + if (minloc (b, dim=1) .ne. 1) stop 13 + if (minloc (b, 1) .ne. 1) stop 14 + if (minloc (b, dim=1, mask=n, kind=4, back=.false.) .ne. 1) stop 15 + if (minloc (b, 1, n, 4, .false.) .ne. 1) stop 16 + if (minloc (b, dim=1, mask=m, kind=4, back=.false.) .ne. 1) stop 17 + if (minloc (b, 1, m, 4, .false.) .ne. 1) stop 18 + if (minloc (b, dim=1, mask=n, kind=4, back=.true.) .ne. 4) stop 19 + if (minloc (b, 1, n, 4, .true.) .ne. 4) stop 20 + if (minloc (b, dim=1, mask=m, kind=4, back=.true.) .ne. 4) stop 21 + if (minloc (b, 1, m, 4, .true.) .ne. 4) stop 22 + l = .false. + m = .false. + n = .false. + if (any (minloc (a, dim=1, mask=l, kind=4, back=.false.) .ne. 0)) stop 23 + if (any (minloc (a, 1, l, 4, .false.) .ne. 0)) stop 24 + if (minloc (b, dim=1, mask=n, kind=4, back=.false.) .ne. 0) stop 25 + if (minloc (b, 1, n, 4, .false.) .ne. 0) stop 26 + if (minloc (b, dim=1, mask=m, kind=4, back=.false.) .ne. 0) stop 27 + if (minloc (b, 1, m, 4, .false.) .ne. 0) stop 28 + if (minloc (b, dim=1, mask=n, kind=4, back=.true.) .ne. 0) stop 29 + if (minloc (b, 1, n, 4, .true.) .ne. 0) stop 30 + if (minloc (b, dim=1, mask=m, kind=4, back=.true.) .ne. 0) stop 31 + if (minloc (b, 1, m, 4, .true.) .ne. 0) stop 32 +end diff --git a/gcc/testsuite/gfortran.dg/pr120191_3.f90 b/gcc/testsuite/gfortran.dg/pr120191_3.f90 new file mode 100644 index 0000000..26e4095 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr120191_3.f90 @@ -0,0 +1,23 @@ +! PR fortran/120191 +! { dg-do run } + + character(kind=1, len=2) :: a(4, 4, 4), b(4) + logical :: l(4, 4, 4), m, n(4) + a = 'aa' + b = 'aa' + l = .false. + m = .false. + n = .false. + if (any (maxloc (a, dim=1, mask=m, kind=4, back=.false.) .ne. 0)) stop 1 + if (any (maxloc (a, 1, m, 4, .false.) .ne. 0)) stop 2 + if (any (maxloc (a, dim=1, mask=l, kind=4, back=.true.) .ne. 0)) stop 3 + if (any (maxloc (a, 1, l, 4, .true.) .ne. 0)) stop 4 + if (any (maxloc (a, dim=1, mask=m, kind=4, back=.true.) .ne. 0)) stop 5 + if (any (maxloc (a, 1, m, 4, .true.) .ne. 0)) stop 6 + if (any (minloc (a, dim=1, mask=m, kind=4, back=.false.) .ne. 0)) stop 7 + if (any (minloc (a, 1, m, 4, .false.) .ne. 0)) stop 8 + if (any (minloc (a, dim=1, mask=l, kind=4, back=.true.) .ne. 0)) stop 9 + if (any (minloc (a, 1, l, 4, .true.) .ne. 0)) stop 10 + if (any (minloc (a, dim=1, mask=m, kind=4, back=.true.) .ne. 0)) stop 11 + if (any (minloc (a, 1, m, 4, .true.) .ne. 0)) stop 12 +end diff --git a/gcc/testsuite/gfortran.dg/pr120196.f90 b/gcc/testsuite/gfortran.dg/pr120196.f90 new file mode 100644 index 0000000..368c43a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr120196.f90 @@ -0,0 +1,26 @@ +! PR libfortran/120196 +! { dg-do run } + +program pr120196 + character(len=:, kind=1), allocatable :: a(:), s + character(len=:, kind=4), allocatable :: b(:), t + logical, allocatable :: l(:) + logical :: m + allocate (character(len=16, kind=1) :: a(10), s) + allocate (l(10)) + a(:) = "" + s = "*" + l = .true. + m = .true. + if (findloc (a, s, dim=1, back=.true.) .ne. 0) stop 1 + if (findloc (a, s, mask=l, dim=1, back=.true.) .ne. 0) stop 2 + if (findloc (a, s, mask=m, dim=1, back=.true.) .ne. 0) stop 3 + deallocate (a, s) + allocate (character(len=16, kind=4) :: b(10), t) + b(:) = "" + t = "*" + if (findloc (b, t, dim=1, back=.true.) .ne. 0) stop 4 + if (findloc (b, t, mask=l, dim=1, back=.true.) .ne. 0) stop 5 + if (findloc (b, t, mask=m, dim=1, back=.true.) .ne. 0) stop 6 + deallocate (b, t, l) +end program pr120196 diff --git a/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/assignvalue.mod b/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/assignvalue.mod new file mode 100644 index 0000000..56eb0bb --- /dev/null +++ b/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/assignvalue.mod @@ -0,0 +1,25 @@ +(* { dg-do compile } *) +(* { dg-options "-fsoft-check-all -fm2-plugin" } *) +(* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } *) + +MODULE assignvalue ; (*!m2iso+gm2*) + +PROCEDURE bad () : INTEGER ; +VAR + i: INTEGER ; +BEGIN + i := -1 ; + RETURN i +END bad ; + +VAR + foo: CARDINAL ; +BEGIN + (* The m2rte plugin will detect this as an error, post + optimization. *) + foo := bad () (* { dg-error "error: In program module assignvalue" } *) + (* { dg-begin-multiline-output "" } +runtime error will occur, assignment will cause a range error, as the runtime instance value of 'CARDINAL' does not overlap with the type 'INTEGER' + { dg-end-multiline-output "" } *) + +END assignvalue. diff --git a/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp b/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp new file mode 100644 index 0000000..6ddf2d5 --- /dev/null +++ b/gcc/testsuite/gm2.dg/doc/examples/plugin/fail/doc-examples-plugin-fail.exp @@ -0,0 +1,25 @@ +# Compile tests, no torture testing. +# +# These tests should all generate errors if the plugin is available. + +# Load support procs. +load_lib gm2-dg.exp + +gm2_init_pim4 $srcdir/$subdir + +# Initialize `dg'. +dg-init + +# If the --enable-plugin has not been enabled during configure, bail. +if { ![info exists TESTING_IN_BUILD_TREE] || ![info exists ENABLE_PLUGIN] } { + return +} + +# Main loop. + +set tests [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] + +gm2-dg-runtest $tests "" "" + +# All done. +dg-finish diff --git a/gcc/testsuite/lib/g++-dg.exp b/gcc/testsuite/lib/g++-dg.exp index 26bda65..eb7a971 100644 --- a/gcc/testsuite/lib/g++-dg.exp +++ b/gcc/testsuite/lib/g++-dg.exp @@ -27,6 +27,78 @@ proc g++-dg-prune { system text } { return [gcc-dg-prune $system $text] } +# Return a list of -std flags to use for TEST. +proc g++-std-flags { test } { + # If the testcase specifies a standard, use that one. + # If not, run it under several standards, allowing GNU extensions + # if there's a dg-options line. + if ![search_for $test "-std=*++"] { + if [search_for $test "dg-options"] { + set std_prefix "-std=gnu++" + } else { + set std_prefix "-std=c++" + } + + set low 0 + # Some directories expect certain minimums. + if { [string match "*/modules/*" $test] } { set low 17 } + + # See g++.exp for the initial value of this list. + global gpp_std_list + if { [llength $gpp_std_list] > 0 } { + set std_list {} + foreach ver $gpp_std_list { + set cmpver $ver + if { $ver == 98 } { set cmpver 03 } + if { $ver ni $std_list + && $cmpver >= $low } { + lappend std_list $ver + } + } + } else { + # If the test mentions specific C++ versions, test those. + set lines [get_matching_lines $test {\{ dg* c++[0-9][0-9]}] + set std_list {} + foreach line $lines { + regexp {c\+\+([0-9][0-9])} $line -> ver + lappend std_list $ver + + if { $ver == 98 } { + # Leave low alone. + } elseif { [regexp {dg-do|dg-require-effective-target} $line] } { + set low $ver + } + } + #verbose "low: $low" 1 + + set std_list [lsort -unique $std_list] + + # If fewer than 3 specific versions are mentioned, add more. + # The order of this list is significant: first $cxx_default, + # then the oldest and newest, then others in rough order of + # importance based on test coverage and usage. + foreach ver { 17 98 26 11 20 14 23 } { + set cmpver $ver + if { $ver == 98 } { set cmpver 03 } + if { [llength $std_list] < 3 + && $ver ni $std_list + && $cmpver >= $low } { + lappend std_list $ver + } + } + verbose "std_list: $std_list" 1 + } + set option_list { } + foreach x $std_list { + if { $x eq "impcx" } then { set x "26 -fimplicit-constexpr" } + lappend option_list "${std_prefix}$x" + } + } else { + set option_list { "" } + } + return $option_list +} + # Modified dg-runtest that runs tests in multiple standard modes, # unless they specifically specify one standard. proc g++-dg-runtest { testcases flags default-extra-flags } { @@ -38,62 +110,7 @@ proc g++-dg-runtest { testcases flags default-extra-flags } { continue } - # If the testcase specifies a standard, use that one. - # If not, run it under several standards, allowing GNU extensions - # if there's a dg-options line. - if ![search_for $test "-std=*++"] { - if [search_for $test "dg-options"] { - set std_prefix "-std=gnu++" - } else { - set std_prefix "-std=c++" - } - - # See g++.exp for the initial value of this list. - global gpp_std_list - if { [llength $gpp_std_list] > 0 } { - set std_list $gpp_std_list - } else { - # If the test mentions specific C++ versions, test those. - set lines [get_matching_lines $test {\{ dg* c++[0-9][0-9]}] - set std_list {} - set low 0 - foreach line $lines { - regexp {c\+\+([0-9][0-9])} $line -> ver - lappend std_list $ver - - if { $ver == 98 } { - # Leave low alone. - } elseif { [regexp {dg-do|dg-require-effective-target} $line] } { - set low $ver - } - } - #verbose "low: $low" 1 - - set std_list [lsort -unique $std_list] - - # If fewer than 3 specific versions are mentioned, add more. - # The order of this list is significant: first $cxx_default, - # then the oldest and newest, then others in rough order of - # importance based on test coverage and usage. - foreach ver { 17 98 26 11 20 14 23 } { - set cmpver $ver - if { $ver == 98 } { set cmpver 03 } - if { [llength $std_list] < 3 - && $ver ni $std_list - && $cmpver > $low } { - lappend std_list $ver - } - } - verbose "std_list: $std_list" 1 - } - set option_list { } - foreach x $std_list { - if { $x eq "impcx" } then { set x "26 -fimplicit-constexpr" } - lappend option_list "${std_prefix}$x" - } - } else { - set option_list { "" } - } + set option_list [g++-std-flags $test] set nshort [file tail [file dirname $test]]/[file tail $test] diff --git a/gcc/testsuite/lib/gm2-dg.exp b/gcc/testsuite/lib/gm2-dg.exp index eaed554..5a36507 100644 --- a/gcc/testsuite/lib/gm2-dg.exp +++ b/gcc/testsuite/lib/gm2-dg.exp @@ -65,7 +65,7 @@ proc gm2-dg-runtest { testcases flags default-extra-flags } { if [expr [search_for $test "dg-do run"]] { set option_list $TORTURE_OPTIONS } else { - set option_list [list { -O } ] + set option_list [list { -O -O2 } ] } set nshort [file tail [file dirname $test]]/[file tail $test] @@ -77,3 +77,38 @@ proc gm2-dg-runtest { testcases flags default-extra-flags } { } } + +# Check if frontend has been configured with option. +# This checks a configure build option was used and not +# the availability of a compiler command line option. + +proc gm2-dg-frontend-configure-check { option } { + global GCC_UNDER_TEST + + # ignore any arguments after the command + set compiler [lindex $GCC_UNDER_TEST 0] + + if ![is_remote host] { + set compiler_name [which $compiler] + } else { + set compiler_name $compiler + } + + # verify that the compiler exists + if { $compiler_name != 0 } then { + set tmp [remote_exec host "$compiler -v"] + set status [lindex $tmp 0] + set output [lindex $tmp 1] + regexp "Configured with.*\[\n\r\]" $output config + set option "*${option}*" + if { [string match $option $config] } { + return 1 + } else { + return 0 + } + } else { + # compiler does not exist (this should have already been detected) + warning "$compiler does not exist" + return 0 + } +} diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 287e51b..e0495d8 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -7436,19 +7436,6 @@ proc check_effective_target_arm_softfloat { } { }] } -# Return 1 if this is an ARM target supporting -mcpu=iwmmxt. -# Some multilibs may be incompatible with this option. - -proc check_effective_target_arm_iwmmxt_ok { } { - if { [check_effective_target_arm32] } { - return [check_no_compiler_messages arm_iwmmxt_ok object { - int dummy; - } "-mcpu=iwmmxt"] - } else { - return 0 - } -} - # Return true if LDRD/STRD instructions are prefered over LDM/STM instructions # for an ARM target. proc check_effective_target_arm_prefer_ldrd_strd { } { @@ -10145,6 +10132,7 @@ proc check_effective_target_sync_int_long { } { || ([istarget arc*-*-*] && [check_effective_target_arc_atomic]) || [check_effective_target_mips_llsc] || [istarget nvptx*-*-*] + || ([istarget xtensa*-*-*] && [check_effective_target_xtensa_atomic]) }}] } @@ -10182,7 +10170,9 @@ proc check_effective_target_sync_char_short { } { || ([istarget riscv*-*-*] && ([check_effective_target_riscv_zalrsc] || [check_effective_target_riscv_zabha])) - || [check_effective_target_mips_llsc] }}] + || [check_effective_target_mips_llsc] + || ([istarget xtensa*-*-*] && [check_effective_target_xtensa_atomic]) + }}] } # Return 1 if thread_fence does not rely on __sync_synchronize @@ -14407,3 +14397,12 @@ proc check_effective_target_speculation_barrier_defined { } { } }] } + +# Return 1 if this is a compiler supporting Xtensa atomic operations +proc check_effective_target_xtensa_atomic { } { + return [check_no_compiler_messages xtensa_atomic assembly { + #if __XCHAL_HAVE_S32C1I != 1 && __XCHAL_HAVE_EXCLUSIVE != 1 + #error FOO + #endif + }] +} diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index 6a95b82..b342b14 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -3867,22 +3867,6 @@ verify_gimple_assign_unary (gassign *stmt) return false; - case NEGATE_EXPR: - case ABS_EXPR: - case BIT_NOT_EXPR: - case PAREN_EXPR: - case CONJ_EXPR: - /* Disallow pointer and offset types for many of the unary gimple. */ - if (POINTER_TYPE_P (lhs_type) - || TREE_CODE (lhs_type) == OFFSET_TYPE) - { - error ("invalid types for %qs", code_name); - debug_generic_expr (lhs_type); - debug_generic_expr (rhs1_type); - return true; - } - break; - case ABSU_EXPR: if (!ANY_INTEGRAL_TYPE_P (lhs_type) || !TYPE_UNSIGNED (lhs_type) @@ -3908,6 +3892,27 @@ verify_gimple_assign_unary (gassign *stmt) } return false; + case CONJ_EXPR: + if (TREE_CODE (lhs_type) != COMPLEX_TYPE) + { +diagnose_unary_lhs: + error ("invalid type for %qs", code_name); + debug_generic_expr (lhs_type); + return true; + } + break; + + case NEGATE_EXPR: + case ABS_EXPR: + case BIT_NOT_EXPR: + if (POINTER_TYPE_P (lhs_type) || TREE_CODE (lhs_type) == OFFSET_TYPE) + goto diagnose_unary_lhs; + /* FALLTHRU */ + case PAREN_EXPR: + if (AGGREGATE_TYPE_P (lhs_type)) + goto diagnose_unary_lhs; + break; + default: gcc_unreachable (); } diff --git a/gcc/tree-cfgcleanup.cc b/gcc/tree-cfgcleanup.cc index 9a8a668..a34a51e 100644 --- a/gcc/tree-cfgcleanup.cc +++ b/gcc/tree-cfgcleanup.cc @@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see #include "cgraph.h" #include "tree-into-ssa.h" #include "tree-cfgcleanup.h" +#include "gimple-pretty-print.h" /* The set of blocks in that at least one of the following changes happened: @@ -122,6 +123,41 @@ convert_single_case_switch (gswitch *swtch, gimple_stmt_iterator &gsi) return true; } +/* Canonicalize _Bool == 0 and _Bool != 1 to _Bool != 0 of STMT in BB by + swapping edges of the BB. */ +bool +canonicalize_bool_cond (gcond *stmt, basic_block bb) +{ + tree rhs1 = gimple_cond_lhs (stmt); + tree rhs2 = gimple_cond_rhs (stmt); + enum tree_code code = gimple_cond_code (stmt); + if (code != EQ_EXPR && code != NE_EXPR) + return false; + if (TREE_CODE (TREE_TYPE (rhs1)) != BOOLEAN_TYPE + && (!INTEGRAL_TYPE_P (TREE_TYPE (rhs1)) + || TYPE_PRECISION (TREE_TYPE (rhs1)) != 1)) + return false; + + /* Canonicalize _Bool == 0 and _Bool != 1 to _Bool != 0 by swapping edges. */ + if (code == EQ_EXPR && !integer_zerop (rhs2)) + return false; + if (code == NE_EXPR && !integer_onep (rhs2)) + return false; + + gimple_cond_set_code (stmt, NE_EXPR); + gimple_cond_set_rhs (stmt, build_zero_cst (TREE_TYPE (rhs1))); + EDGE_SUCC (bb, 0)->flags ^= (EDGE_TRUE_VALUE|EDGE_FALSE_VALUE); + EDGE_SUCC (bb, 1)->flags ^= (EDGE_TRUE_VALUE|EDGE_FALSE_VALUE); + + if (dump_file) + { + fprintf (dump_file, " Swapped '"); + print_gimple_expr (dump_file, stmt, 0); + fprintf (dump_file, "'\n"); + } + return true; +} + /* Disconnect an unreachable block in the control expression starting at block BB. */ @@ -145,6 +181,9 @@ cleanup_control_expr_graph (basic_block bb, gimple_stmt_iterator gsi) && convert_single_case_switch (as_a<gswitch *> (stmt), gsi)) stmt = gsi_stmt (gsi); + if (gimple_code (stmt) == GIMPLE_COND) + canonicalize_bool_cond (as_a<gcond*> (stmt), bb); + fold_defer_overflow_warnings (); switch (gimple_code (stmt)) { diff --git a/gcc/tree-cfgcleanup.h b/gcc/tree-cfgcleanup.h index 83c857f..94b430e 100644 --- a/gcc/tree-cfgcleanup.h +++ b/gcc/tree-cfgcleanup.h @@ -28,5 +28,6 @@ extern bool delete_unreachable_blocks_update_callgraph (cgraph_node *dst_node, bool update_clones); extern unsigned clean_up_loop_closed_phi (function *); extern bool phi_alternatives_equal (basic_block, edge, edge); +extern bool canonicalize_bool_cond (gcond *stmt, basic_block bb); #endif /* GCC_TREE_CFGCLEANUP_H */ diff --git a/gcc/tree-sra.cc b/gcc/tree-sra.cc index 302b73e..4b6daf7 100644 --- a/gcc/tree-sra.cc +++ b/gcc/tree-sra.cc @@ -4205,8 +4205,10 @@ sra_modify_expr (tree *expr, bool write, gimple_stmt_iterator *stmt_gsi, } else { - gassign *stmt; + if (TREE_READONLY (access->base)) + return false; + gassign *stmt; if (access->grp_partial_lhs) repl = force_gimple_operand_gsi (stmt_gsi, repl, true, NULL_TREE, true, diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc index fafc4d6..3187314 100644 --- a/gcc/tree-ssa-forwprop.cc +++ b/gcc/tree-ssa-forwprop.cc @@ -551,9 +551,8 @@ forward_propagate_into_gimple_cond (gcond *stmt) tree rhs1 = gimple_cond_lhs (stmt); tree rhs2 = gimple_cond_rhs (stmt); - /* We can do tree combining on SSA_NAME and comparison expressions. */ - if (TREE_CODE_CLASS (gimple_cond_code (stmt)) != tcc_comparison) - return 0; + /* GIMPLE_COND will always be a comparison. */ + gcc_assert (TREE_CODE_CLASS (gimple_cond_code (stmt)) == tcc_comparison); tmp = forward_propagate_into_comparison_1 (stmt, code, boolean_type_node, @@ -580,22 +579,8 @@ forward_propagate_into_gimple_cond (gcond *stmt) return (cfg_changed || is_gimple_min_invariant (tmp)) ? 2 : 1; } - /* Canonicalize _Bool == 0 and _Bool != 1 to _Bool != 0 by swapping edges. */ - if ((TREE_CODE (TREE_TYPE (rhs1)) == BOOLEAN_TYPE - || (INTEGRAL_TYPE_P (TREE_TYPE (rhs1)) - && TYPE_PRECISION (TREE_TYPE (rhs1)) == 1)) - && ((code == EQ_EXPR - && integer_zerop (rhs2)) - || (code == NE_EXPR - && integer_onep (rhs2)))) - { - basic_block bb = gimple_bb (stmt); - gimple_cond_set_code (stmt, NE_EXPR); - gimple_cond_set_rhs (stmt, build_zero_cst (TREE_TYPE (rhs1))); - EDGE_SUCC (bb, 0)->flags ^= (EDGE_TRUE_VALUE|EDGE_FALSE_VALUE); - EDGE_SUCC (bb, 1)->flags ^= (EDGE_TRUE_VALUE|EDGE_FALSE_VALUE); - return 1; - } + if (canonicalize_bool_cond (stmt, gimple_bb (stmt))) + return 1; return 0; } @@ -4497,6 +4482,8 @@ pass_forwprop::execute (function *fun) } } } + if (substituted_p) + update_stmt (stmt); if (substituted_p && is_gimple_assign (stmt) && gimple_assign_rhs_code (stmt) == ADDR_EXPR) @@ -4536,17 +4523,7 @@ pass_forwprop::execute (function *fun) && !SSA_NAME_IS_DEFAULT_DEF (use)) bitmap_set_bit (simple_dce_worklist, SSA_NAME_VERSION (use)); - } - - if (changed || substituted_p) - { - if (maybe_clean_or_replace_eh_stmt (orig_stmt, stmt)) - bitmap_set_bit (to_purge, bb->index); - if (!was_noreturn - && is_gimple_call (stmt) && gimple_call_noreturn_p (stmt)) - to_fixup.safe_push (stmt); update_stmt (stmt); - substituted_p = false; } switch (gimple_code (stmt)) @@ -4560,11 +4537,9 @@ pass_forwprop::execute (function *fun) { int did_something; did_something = forward_propagate_into_comparison (&gsi); - if (maybe_clean_or_replace_eh_stmt (stmt, gsi_stmt (gsi))) - bitmap_set_bit (to_purge, bb->index); if (did_something == 2) cfg_changed = true; - changed = did_something != 0; + changed |= did_something != 0; } else if ((code == PLUS_EXPR || code == BIT_IOR_EXPR @@ -4580,15 +4555,15 @@ pass_forwprop::execute (function *fun) } else if (code == CONSTRUCTOR && TREE_CODE (TREE_TYPE (rhs1)) == VECTOR_TYPE) - changed = simplify_vector_constructor (&gsi); + changed |= simplify_vector_constructor (&gsi); else if (code == ARRAY_REF) - changed = simplify_count_trailing_zeroes (&gsi); + changed |= simplify_count_trailing_zeroes (&gsi); break; } case GIMPLE_SWITCH: - changed = simplify_gimple_switch (as_a <gswitch *> (stmt), - edges_to_remove); + changed |= simplify_gimple_switch (as_a <gswitch *> (stmt), + edges_to_remove); break; case GIMPLE_COND: @@ -4597,7 +4572,7 @@ pass_forwprop::execute (function *fun) (as_a <gcond *> (stmt)); if (did_something == 2) cfg_changed = true; - changed = did_something != 0; + changed |= did_something != 0; break; } @@ -4606,13 +4581,23 @@ pass_forwprop::execute (function *fun) tree callee = gimple_call_fndecl (stmt); if (callee != NULL_TREE && fndecl_built_in_p (callee, BUILT_IN_NORMAL)) - changed = simplify_builtin_call (&gsi, callee); + changed |= simplify_builtin_call (&gsi, callee); break; } default:; } + if (changed || substituted_p) + { + substituted_p = false; + stmt = gsi_stmt (gsi); + if (maybe_clean_or_replace_eh_stmt (orig_stmt, stmt)) + bitmap_set_bit (to_purge, bb->index); + if (!was_noreturn + && is_gimple_call (stmt) && gimple_call_noreturn_p (stmt)) + to_fixup.safe_push (stmt); + } if (changed) { /* If the stmt changed then re-visit it and the statements diff --git a/gcc/tree-ssanames.cc b/gcc/tree-ssanames.cc index de7b9b7..fd2abfe 100644 --- a/gcc/tree-ssanames.cc +++ b/gcc/tree-ssanames.cc @@ -488,7 +488,7 @@ set_bitmask (tree name, const wide_int &value, const wide_int &mask) { gcc_assert (!POINTER_TYPE_P (TREE_TYPE (name))); - int_range<2> r (TREE_TYPE (name)); + int_range_max r (TREE_TYPE (name)); r.update_bitmask (irange_bitmask (value, mask)); set_range_info (name, r); } diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index fe6f3cf..2d1a688 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -9698,7 +9698,7 @@ vectorizable_nonlinear_induction (loop_vec_info loop_vinfo, gphi *phi = dyn_cast <gphi *> (stmt_info->stmt); - tree vectype = STMT_VINFO_VECTYPE (stmt_info); + tree vectype = SLP_TREE_VECTYPE (slp_node); poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype); enum vect_induction_op_type induction_type = STMT_VINFO_LOOP_PHI_EVOLUTION_TYPE (stmt_info); @@ -9723,7 +9723,7 @@ vectorizable_nonlinear_induction (loop_vec_info loop_vinfo, /* TODO: Support multi-lane SLP for nonlinear iv. There should be separate vector iv update for each iv and a permutation to generate wanted vector iv. */ - if (slp_node && SLP_TREE_LANES (slp_node) > 1) + if (SLP_TREE_LANES (slp_node) > 1) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, @@ -9934,13 +9934,7 @@ vectorizable_nonlinear_induction (loop_vec_info loop_vinfo, add_phi_arg (induction_phi, vec_def, loop_latch_edge (iv_loop), UNKNOWN_LOCATION); - if (slp_node) - slp_node->push_vec_def (induction_phi); - else - { - STMT_VINFO_VEC_STMTS (stmt_info).safe_push (induction_phi); - *vec_stmt = induction_phi; - } + slp_node->push_vec_def (induction_phi); /* In case that vectorization factor (VF) is bigger than the number of elements that we can fit in a vectype (nunits), we have to generate @@ -9970,10 +9964,7 @@ vectorizable_nonlinear_induction (loop_vec_info loop_vinfo, induction_type); gsi_insert_seq_before (&si, stmts, GSI_SAME_STMT); new_stmt = SSA_NAME_DEF_STMT (vec_def); - if (slp_node) - slp_node->push_vec_def (new_stmt); - else - STMT_VINFO_VEC_STMTS (stmt_info).safe_push (new_stmt); + slp_node->push_vec_def (new_stmt); } } @@ -9999,15 +9990,13 @@ vectorizable_induction (loop_vec_info loop_vinfo, stmt_vector_for_cost *cost_vec) { class loop *loop = LOOP_VINFO_LOOP (loop_vinfo); - unsigned ncopies; bool nested_in_vect_loop = false; class loop *iv_loop; tree vec_def; edge pe = loop_preheader_edge (loop); basic_block new_bb; - tree new_vec, vec_init = NULL_TREE, vec_step, t; + tree vec_init = NULL_TREE, vec_step, t; tree new_name; - gimple *new_stmt; gphi *induction_phi; tree induc_def, vec_dest; poly_uint64 vf = LOOP_VINFO_VECT_FACTOR (loop_vinfo); @@ -10034,15 +10023,9 @@ vectorizable_induction (loop_vec_info loop_vinfo, return vectorizable_nonlinear_induction (loop_vinfo, stmt_info, vec_stmt, slp_node, cost_vec); - tree vectype = STMT_VINFO_VECTYPE (stmt_info); + tree vectype = SLP_TREE_VECTYPE (slp_node); poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype); - if (slp_node) - ncopies = 1; - else - ncopies = vect_get_num_copies (loop_vinfo, vectype); - gcc_assert (ncopies >= 1); - /* FORNOW. These restrictions should be relaxed. */ if (nested_in_vect_loop_p (loop, stmt_info)) { @@ -10052,14 +10035,6 @@ vectorizable_induction (loop_vec_info loop_vinfo, edge latch_e; tree loop_arg; - if (ncopies > 1) - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "multiple types in nested loop.\n"); - return false; - } - exit_phi = NULL; latch_e = loop_latch_edge (loop->inner); loop_arg = PHI_ARG_DEF_FROM_EDGE (phi, latch_e); @@ -10096,7 +10071,7 @@ vectorizable_induction (loop_vec_info loop_vinfo, iv_loop = loop; gcc_assert (iv_loop == (gimple_bb (phi))->loop_father); - if (slp_node && (!nunits.is_constant () && SLP_TREE_LANES (slp_node) != 1)) + if (!nunits.is_constant () && SLP_TREE_LANES (slp_node) != 1) { /* The current SLP code creates the step value element-by-element. */ if (dump_enabled_p ()) @@ -10152,41 +10127,28 @@ vectorizable_induction (loop_vec_info loop_vinfo, if (!vec_stmt) /* transformation not required. */ { unsigned inside_cost = 0, prologue_cost = 0; - if (slp_node) - { - /* We eventually need to set a vector type on invariant - arguments. */ - unsigned j; - slp_tree child; - FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (slp_node), j, child) - if (!vect_maybe_update_slp_op_vectype - (child, SLP_TREE_VECTYPE (slp_node))) - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "incompatible vector types for " - "invariants\n"); - return false; - } - /* loop cost for vec_loop. */ - inside_cost - = record_stmt_cost (cost_vec, - SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node), - vector_stmt, stmt_info, 0, vect_body); - /* prologue cost for vec_init (if not nested) and step. */ - prologue_cost = record_stmt_cost (cost_vec, 1 + !nested_in_vect_loop, - scalar_to_vec, - stmt_info, 0, vect_prologue); - } - else /* if (!slp_node) */ - { - /* loop cost for vec_loop. */ - inside_cost = record_stmt_cost (cost_vec, ncopies, vector_stmt, - stmt_info, 0, vect_body); - /* prologue cost for vec_init and vec_step. */ - prologue_cost = record_stmt_cost (cost_vec, 2, scalar_to_vec, - stmt_info, 0, vect_prologue); - } + /* We eventually need to set a vector type on invariant + arguments. */ + unsigned j; + slp_tree child; + FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (slp_node), j, child) + if (!vect_maybe_update_slp_op_vectype + (child, SLP_TREE_VECTYPE (slp_node))) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "incompatible vector types for " + "invariants\n"); + return false; + } + /* loop cost for vec_loop. */ + inside_cost = record_stmt_cost (cost_vec, + SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node), + vector_stmt, stmt_info, 0, vect_body); + /* prologue cost for vec_init (if not nested) and step. */ + prologue_cost = record_stmt_cost (cost_vec, 1 + !nested_in_vect_loop, + scalar_to_vec, + stmt_info, 0, vect_prologue); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, "vect_model_induction_cost: inside_cost = %d, " @@ -10217,670 +10179,374 @@ vectorizable_induction (loop_vec_info loop_vinfo, with group size 3 we need [i0, i1, i2, i0 + S0] [i1 + S1, i2 + S2, i0 + 2*S0, i1 + 2*S1] [i2 + 2*S2, i0 + 3*S0, i1 + 3*S1, i2 + 3*S2]. */ - if (slp_node) + gimple_stmt_iterator incr_si; + bool insert_after; + standard_iv_increment_position (iv_loop, &incr_si, &insert_after); + + /* The initial values are vectorized, but any lanes > group_size + need adjustment. */ + slp_tree init_node + = SLP_TREE_CHILDREN (slp_node)[pe->dest_idx]; + + /* Gather steps. Since we do not vectorize inductions as + cycles we have to reconstruct the step from SCEV data. */ + unsigned group_size = SLP_TREE_LANES (slp_node); + tree *steps = XALLOCAVEC (tree, group_size); + tree *inits = XALLOCAVEC (tree, group_size); + stmt_vec_info phi_info; + FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (slp_node), i, phi_info) + { + steps[i] = STMT_VINFO_LOOP_PHI_EVOLUTION_PART (phi_info); + if (!init_node) + inits[i] = gimple_phi_arg_def (as_a<gphi *> (phi_info->stmt), + pe->dest_idx); + } + + /* Now generate the IVs. */ + unsigned nvects = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node); + gcc_assert (multiple_p (nunits * nvects, group_size)); + unsigned nivs; + unsigned HOST_WIDE_INT const_nunits; + if (nested_in_vect_loop) + nivs = nvects; + else if (nunits.is_constant (&const_nunits)) { - gimple_stmt_iterator incr_si; - bool insert_after; - standard_iv_increment_position (iv_loop, &incr_si, &insert_after); - - /* The initial values are vectorized, but any lanes > group_size - need adjustment. */ - slp_tree init_node - = SLP_TREE_CHILDREN (slp_node)[pe->dest_idx]; - - /* Gather steps. Since we do not vectorize inductions as - cycles we have to reconstruct the step from SCEV data. */ - unsigned group_size = SLP_TREE_LANES (slp_node); - tree *steps = XALLOCAVEC (tree, group_size); - tree *inits = XALLOCAVEC (tree, group_size); - stmt_vec_info phi_info; - FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (slp_node), i, phi_info) - { - steps[i] = STMT_VINFO_LOOP_PHI_EVOLUTION_PART (phi_info); - if (!init_node) - inits[i] = gimple_phi_arg_def (as_a<gphi *> (phi_info->stmt), - pe->dest_idx); - } - - /* Now generate the IVs. */ - unsigned nvects = SLP_TREE_NUMBER_OF_VEC_STMTS (slp_node); - gcc_assert (multiple_p (nunits * nvects, group_size)); - unsigned nivs; - unsigned HOST_WIDE_INT const_nunits; - if (nested_in_vect_loop) - nivs = nvects; - else if (nunits.is_constant (&const_nunits)) - { - /* Compute the number of distinct IVs we need. First reduce - group_size if it is a multiple of const_nunits so we get - one IV for a group_size of 4 but const_nunits 2. */ - unsigned group_sizep = group_size; - if (group_sizep % const_nunits == 0) - group_sizep = group_sizep / const_nunits; - nivs = least_common_multiple (group_sizep, - const_nunits) / const_nunits; - } - else - { - gcc_assert (SLP_TREE_LANES (slp_node) == 1); - nivs = 1; - } - gimple_seq init_stmts = NULL; - tree lupdate_mul = NULL_TREE; - if (!nested_in_vect_loop) + /* Compute the number of distinct IVs we need. First reduce + group_size if it is a multiple of const_nunits so we get + one IV for a group_size of 4 but const_nunits 2. */ + unsigned group_sizep = group_size; + if (group_sizep % const_nunits == 0) + group_sizep = group_sizep / const_nunits; + nivs = least_common_multiple (group_sizep, const_nunits) / const_nunits; + } + else + { + gcc_assert (SLP_TREE_LANES (slp_node) == 1); + nivs = 1; + } + gimple_seq init_stmts = NULL; + tree lupdate_mul = NULL_TREE; + if (!nested_in_vect_loop) + { + if (nunits.is_constant (&const_nunits)) { - if (nunits.is_constant (&const_nunits)) - { - /* The number of iterations covered in one vector iteration. */ - unsigned lup_mul = (nvects * const_nunits) / group_size; - lupdate_mul - = build_vector_from_val (step_vectype, - SCALAR_FLOAT_TYPE_P (stept) - ? build_real_from_wide (stept, lup_mul, - UNSIGNED) - : build_int_cstu (stept, lup_mul)); - } - else - { - if (SCALAR_FLOAT_TYPE_P (stept)) - { - tree tem = build_int_cst (integer_type_node, vf); - lupdate_mul = gimple_build (&init_stmts, FLOAT_EXPR, - stept, tem); - } - else - lupdate_mul = build_int_cst (stept, vf); - lupdate_mul = gimple_build_vector_from_val (&init_stmts, - step_vectype, - lupdate_mul); - } + /* The number of iterations covered in one vector iteration. */ + unsigned lup_mul = (nvects * const_nunits) / group_size; + lupdate_mul + = build_vector_from_val (step_vectype, + SCALAR_FLOAT_TYPE_P (stept) + ? build_real_from_wide (stept, lup_mul, + UNSIGNED) + : build_int_cstu (stept, lup_mul)); } - tree peel_mul = NULL_TREE; - if (LOOP_VINFO_MASK_SKIP_NITERS (loop_vinfo)) + else { if (SCALAR_FLOAT_TYPE_P (stept)) - peel_mul = gimple_build (&init_stmts, FLOAT_EXPR, stept, - LOOP_VINFO_MASK_SKIP_NITERS (loop_vinfo)); - else - peel_mul = gimple_convert (&init_stmts, stept, - LOOP_VINFO_MASK_SKIP_NITERS (loop_vinfo)); - peel_mul = gimple_build_vector_from_val (&init_stmts, - step_vectype, peel_mul); - - /* If early break then we have to create a new PHI which we can use as - an offset to adjust the induction reduction in early exits. - - This is because when peeling for alignment using masking, the first - few elements of the vector can be inactive. As such if we find the - entry in the first iteration we have adjust the starting point of - the scalar code. - - We do this by creating a new scalar PHI that keeps track of whether - we are the first iteration of the loop (with the additional masking) - or whether we have taken a loop iteration already. - - The generated sequence: - - pre-header: - bb1: - i_1 = <number of leading inactive elements> - - header: - bb2: - i_2 = PHI <i_1(bb1), 0(latch)> - … - - early-exit: - bb3: - i_3 = iv_step * i_2 + PHI<vector-iv> - - The first part of the adjustment to create i_1 and i_2 are done here - and the last part creating i_3 is done in - vectorizable_live_operations when the induction extraction is - materialized. */ - if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo) - && !LOOP_VINFO_MASK_NITERS_PFA_OFFSET (loop_vinfo)) { - auto skip_niters = LOOP_VINFO_MASK_SKIP_NITERS (loop_vinfo); - tree ty_skip_niters = TREE_TYPE (skip_niters); - tree break_lhs_phi = vect_get_new_vect_var (ty_skip_niters, - vect_scalar_var, - "pfa_iv_offset"); - gphi *nphi = create_phi_node (break_lhs_phi, bb); - add_phi_arg (nphi, skip_niters, pe, UNKNOWN_LOCATION); - add_phi_arg (nphi, build_zero_cst (ty_skip_niters), - loop_latch_edge (iv_loop), UNKNOWN_LOCATION); - - LOOP_VINFO_MASK_NITERS_PFA_OFFSET (loop_vinfo) - = PHI_RESULT (nphi); + tree tem = build_int_cst (integer_type_node, vf); + lupdate_mul = gimple_build (&init_stmts, FLOAT_EXPR, stept, tem); } + else + lupdate_mul = build_int_cst (stept, vf); + lupdate_mul = gimple_build_vector_from_val (&init_stmts, step_vectype, + lupdate_mul); } - tree step_mul = NULL_TREE; - unsigned ivn; - auto_vec<tree> vec_steps; - for (ivn = 0; ivn < nivs; ++ivn) + } + tree peel_mul = NULL_TREE; + if (LOOP_VINFO_MASK_SKIP_NITERS (loop_vinfo)) + { + if (SCALAR_FLOAT_TYPE_P (stept)) + peel_mul = gimple_build (&init_stmts, FLOAT_EXPR, stept, + LOOP_VINFO_MASK_SKIP_NITERS (loop_vinfo)); + else + peel_mul = gimple_convert (&init_stmts, stept, + LOOP_VINFO_MASK_SKIP_NITERS (loop_vinfo)); + peel_mul = gimple_build_vector_from_val (&init_stmts, + step_vectype, peel_mul); + + /* If early break then we have to create a new PHI which we can use as + an offset to adjust the induction reduction in early exits. + + This is because when peeling for alignment using masking, the first + few elements of the vector can be inactive. As such if we find the + entry in the first iteration we have adjust the starting point of + the scalar code. + + We do this by creating a new scalar PHI that keeps track of whether + we are the first iteration of the loop (with the additional masking) + or whether we have taken a loop iteration already. + + The generated sequence: + + pre-header: + bb1: + i_1 = <number of leading inactive elements> + + header: + bb2: + i_2 = PHI <i_1(bb1), 0(latch)> + … + + early-exit: + bb3: + i_3 = iv_step * i_2 + PHI<vector-iv> + + The first part of the adjustment to create i_1 and i_2 are done here + and the last part creating i_3 is done in + vectorizable_live_operations when the induction extraction is + materialized. */ + if (LOOP_VINFO_EARLY_BREAKS (loop_vinfo) + && !LOOP_VINFO_MASK_NITERS_PFA_OFFSET (loop_vinfo)) + { + auto skip_niters = LOOP_VINFO_MASK_SKIP_NITERS (loop_vinfo); + tree ty_skip_niters = TREE_TYPE (skip_niters); + tree break_lhs_phi = vect_get_new_vect_var (ty_skip_niters, + vect_scalar_var, + "pfa_iv_offset"); + gphi *nphi = create_phi_node (break_lhs_phi, bb); + add_phi_arg (nphi, skip_niters, pe, UNKNOWN_LOCATION); + add_phi_arg (nphi, build_zero_cst (ty_skip_niters), + loop_latch_edge (iv_loop), UNKNOWN_LOCATION); + + LOOP_VINFO_MASK_NITERS_PFA_OFFSET (loop_vinfo) = PHI_RESULT (nphi); + } + } + tree step_mul = NULL_TREE; + unsigned ivn; + auto_vec<tree> vec_steps; + for (ivn = 0; ivn < nivs; ++ivn) + { + gimple_seq stmts = NULL; + bool invariant = true; + if (nunits.is_constant (&const_nunits)) { - gimple_seq stmts = NULL; - bool invariant = true; - if (nunits.is_constant (&const_nunits)) + tree_vector_builder step_elts (step_vectype, const_nunits, 1); + tree_vector_builder init_elts (vectype, const_nunits, 1); + tree_vector_builder mul_elts (step_vectype, const_nunits, 1); + for (unsigned eltn = 0; eltn < const_nunits; ++eltn) { - tree_vector_builder step_elts (step_vectype, const_nunits, 1); - tree_vector_builder init_elts (vectype, const_nunits, 1); - tree_vector_builder mul_elts (step_vectype, const_nunits, 1); - for (unsigned eltn = 0; eltn < const_nunits; ++eltn) - { - /* The scalar steps of the IVs. */ - tree elt = steps[(ivn*const_nunits + eltn) % group_size]; - elt = gimple_convert (&init_stmts, - TREE_TYPE (step_vectype), elt); - step_elts.quick_push (elt); - if (!init_node) - { - /* The scalar inits of the IVs if not vectorized. */ - elt = inits[(ivn*const_nunits + eltn) % group_size]; - if (!useless_type_conversion_p (TREE_TYPE (vectype), - TREE_TYPE (elt))) - elt = gimple_build (&init_stmts, VIEW_CONVERT_EXPR, - TREE_TYPE (vectype), elt); - init_elts.quick_push (elt); - } - /* The number of steps to add to the initial values. */ - unsigned mul_elt = (ivn*const_nunits + eltn) / group_size; - mul_elts.quick_push (SCALAR_FLOAT_TYPE_P (stept) - ? build_real_from_wide (stept, mul_elt, - UNSIGNED) - : build_int_cstu (stept, mul_elt)); - } - vec_step = gimple_build_vector (&init_stmts, &step_elts); - step_mul = gimple_build_vector (&init_stmts, &mul_elts); + /* The scalar steps of the IVs. */ + tree elt = steps[(ivn*const_nunits + eltn) % group_size]; + elt = gimple_convert (&init_stmts, TREE_TYPE (step_vectype), elt); + step_elts.quick_push (elt); if (!init_node) - vec_init = gimple_build_vector (&init_stmts, &init_elts); - } - else - { - if (init_node) - ; - else if (INTEGRAL_TYPE_P (TREE_TYPE (steps[0]))) - { - new_name = gimple_convert (&init_stmts, stept, inits[0]); - /* Build the initial value directly as a VEC_SERIES_EXPR. */ - vec_init = gimple_build (&init_stmts, VEC_SERIES_EXPR, - step_vectype, new_name, steps[0]); - if (!useless_type_conversion_p (vectype, step_vectype)) - vec_init = gimple_build (&init_stmts, VIEW_CONVERT_EXPR, - vectype, vec_init); - } - else { - /* Build: - [base, base, base, ...] - + (vectype) [0, 1, 2, ...] * [step, step, step, ...]. */ - gcc_assert (SCALAR_FLOAT_TYPE_P (TREE_TYPE (steps[0]))); - gcc_assert (flag_associative_math); - gcc_assert (index_vectype != NULL_TREE); - - tree index = build_index_vector (index_vectype, 0, 1); - new_name = gimple_convert (&init_stmts, TREE_TYPE (steps[0]), - inits[0]); - tree base_vec = gimple_build_vector_from_val (&init_stmts, - step_vectype, - new_name); - tree step_vec = gimple_build_vector_from_val (&init_stmts, - step_vectype, - steps[0]); - vec_init = gimple_build (&init_stmts, FLOAT_EXPR, - step_vectype, index); - vec_init = gimple_build (&init_stmts, MULT_EXPR, - step_vectype, vec_init, step_vec); - vec_init = gimple_build (&init_stmts, PLUS_EXPR, - step_vectype, vec_init, base_vec); - if (!useless_type_conversion_p (vectype, step_vectype)) - vec_init = gimple_build (&init_stmts, VIEW_CONVERT_EXPR, - vectype, vec_init); + /* The scalar inits of the IVs if not vectorized. */ + elt = inits[(ivn*const_nunits + eltn) % group_size]; + if (!useless_type_conversion_p (TREE_TYPE (vectype), + TREE_TYPE (elt))) + elt = gimple_build (&init_stmts, VIEW_CONVERT_EXPR, + TREE_TYPE (vectype), elt); + init_elts.quick_push (elt); } - /* iv_loop is nested in the loop to be vectorized. Generate: - vec_step = [S, S, S, S] */ - t = unshare_expr (steps[0]); - gcc_assert (CONSTANT_CLASS_P (t) - || TREE_CODE (t) == SSA_NAME); - vec_step = gimple_build_vector_from_val (&init_stmts, - step_vectype, t); - } - vec_steps.safe_push (vec_step); - if (peel_mul) - { - if (!step_mul) - step_mul = peel_mul; - else - step_mul = gimple_build (&init_stmts, - MINUS_EXPR, step_vectype, - step_mul, peel_mul); - } - - /* Create the induction-phi that defines the induction-operand. */ - vec_dest = vect_get_new_vect_var (vectype, vect_simple_var, - "vec_iv_"); - induction_phi = create_phi_node (vec_dest, iv_loop->header); - induc_def = PHI_RESULT (induction_phi); - - /* Create the iv update inside the loop */ - tree up = vec_step; - if (lupdate_mul) - { - if (LOOP_VINFO_USING_SELECT_VL_P (loop_vinfo)) - { - /* When we're using loop_len produced by SELEC_VL, the - non-final iterations are not always processing VF - elements. So vectorize induction variable instead of - - _21 = vect_vec_iv_.6_22 + { VF, ... }; - - We should generate: - - _35 = .SELECT_VL (ivtmp_33, VF); - vect_cst__22 = [vec_duplicate_expr] _35; - _21 = vect_vec_iv_.6_22 + vect_cst__22; */ - vec_loop_lens *lens = &LOOP_VINFO_LENS (loop_vinfo); - tree len = vect_get_loop_len (loop_vinfo, NULL, lens, 1, - vectype, 0, 0); - if (SCALAR_FLOAT_TYPE_P (stept)) - expr = gimple_build (&stmts, FLOAT_EXPR, stept, len); - else - expr = gimple_convert (&stmts, stept, len); - lupdate_mul = gimple_build_vector_from_val (&stmts, - step_vectype, - expr); - up = gimple_build (&stmts, MULT_EXPR, - step_vectype, vec_step, lupdate_mul); - } - else - up = gimple_build (&init_stmts, - MULT_EXPR, step_vectype, - vec_step, lupdate_mul); - } - vec_def = gimple_convert (&stmts, step_vectype, induc_def); - vec_def = gimple_build (&stmts, - PLUS_EXPR, step_vectype, vec_def, up); - vec_def = gimple_convert (&stmts, vectype, vec_def); - insert_iv_increment (&incr_si, insert_after, stmts); - add_phi_arg (induction_phi, vec_def, loop_latch_edge (iv_loop), - UNKNOWN_LOCATION); - - if (init_node) - vec_init = vect_get_slp_vect_def (init_node, ivn); - if (!nested_in_vect_loop - && step_mul - && !integer_zerop (step_mul)) - { - gcc_assert (invariant); - vec_def = gimple_convert (&init_stmts, step_vectype, vec_init); - up = gimple_build (&init_stmts, MULT_EXPR, step_vectype, - vec_step, step_mul); - vec_def = gimple_build (&init_stmts, PLUS_EXPR, step_vectype, - vec_def, up); - vec_init = gimple_convert (&init_stmts, vectype, vec_def); - } - - /* Set the arguments of the phi node: */ - add_phi_arg (induction_phi, vec_init, pe, UNKNOWN_LOCATION); - - slp_node->push_vec_def (induction_phi); - } - if (!nested_in_vect_loop) - { - /* Fill up to the number of vectors we need for the whole group. */ - if (nunits.is_constant (&const_nunits)) - nivs = least_common_multiple (group_size, - const_nunits) / const_nunits; - else - nivs = 1; - vec_steps.reserve (nivs-ivn); - for (; ivn < nivs; ++ivn) - { - slp_node->push_vec_def (SLP_TREE_VEC_DEFS (slp_node)[0]); - vec_steps.quick_push (vec_steps[0]); + /* The number of steps to add to the initial values. */ + unsigned mul_elt = (ivn*const_nunits + eltn) / group_size; + mul_elts.quick_push (SCALAR_FLOAT_TYPE_P (stept) + ? build_real_from_wide (stept, mul_elt, + UNSIGNED) + : build_int_cstu (stept, mul_elt)); } + vec_step = gimple_build_vector (&init_stmts, &step_elts); + step_mul = gimple_build_vector (&init_stmts, &mul_elts); + if (!init_node) + vec_init = gimple_build_vector (&init_stmts, &init_elts); } - - /* Re-use IVs when we can. We are generating further vector - stmts by adding VF' * stride to the IVs generated above. */ - if (ivn < nvects) + else { - if (nunits.is_constant (&const_nunits)) + if (init_node) + ; + else if (INTEGRAL_TYPE_P (TREE_TYPE (steps[0]))) { - unsigned vfp = (least_common_multiple (group_size, const_nunits) - / group_size); - lupdate_mul - = build_vector_from_val (step_vectype, - SCALAR_FLOAT_TYPE_P (stept) - ? build_real_from_wide (stept, - vfp, UNSIGNED) - : build_int_cstu (stept, vfp)); + new_name = gimple_convert (&init_stmts, stept, inits[0]); + /* Build the initial value directly as a VEC_SERIES_EXPR. */ + vec_init = gimple_build (&init_stmts, VEC_SERIES_EXPR, + step_vectype, new_name, steps[0]); + if (!useless_type_conversion_p (vectype, step_vectype)) + vec_init = gimple_build (&init_stmts, VIEW_CONVERT_EXPR, + vectype, vec_init); } else { - if (SCALAR_FLOAT_TYPE_P (stept)) - { - tree tem = build_int_cst (integer_type_node, nunits); - lupdate_mul = gimple_build (&init_stmts, FLOAT_EXPR, - stept, tem); - } - else - lupdate_mul = build_int_cst (stept, nunits); - lupdate_mul = gimple_build_vector_from_val (&init_stmts, - step_vectype, - lupdate_mul); - } - for (; ivn < nvects; ++ivn) - { - gimple *iv - = SSA_NAME_DEF_STMT (SLP_TREE_VEC_DEFS (slp_node)[ivn - nivs]); - tree def = gimple_get_lhs (iv); - if (ivn < 2*nivs) - vec_steps[ivn - nivs] - = gimple_build (&init_stmts, MULT_EXPR, step_vectype, - vec_steps[ivn - nivs], lupdate_mul); - gimple_seq stmts = NULL; - def = gimple_convert (&stmts, step_vectype, def); - def = gimple_build (&stmts, PLUS_EXPR, step_vectype, - def, vec_steps[ivn % nivs]); - def = gimple_convert (&stmts, vectype, def); - if (gimple_code (iv) == GIMPLE_PHI) - gsi_insert_seq_before (&si, stmts, GSI_SAME_STMT); - else - { - gimple_stmt_iterator tgsi = gsi_for_stmt (iv); - gsi_insert_seq_after (&tgsi, stmts, GSI_CONTINUE_LINKING); - } - slp_node->push_vec_def (def); + /* Build: + [base, base, base, ...] + + (vectype) [0, 1, 2, ...] * [step, step, step, ...]. */ + gcc_assert (SCALAR_FLOAT_TYPE_P (TREE_TYPE (steps[0]))); + gcc_assert (flag_associative_math); + gcc_assert (index_vectype != NULL_TREE); + + tree index = build_index_vector (index_vectype, 0, 1); + new_name = gimple_convert (&init_stmts, TREE_TYPE (steps[0]), + inits[0]); + tree base_vec = gimple_build_vector_from_val (&init_stmts, + step_vectype, + new_name); + tree step_vec = gimple_build_vector_from_val (&init_stmts, + step_vectype, + steps[0]); + vec_init = gimple_build (&init_stmts, FLOAT_EXPR, + step_vectype, index); + vec_init = gimple_build (&init_stmts, MULT_EXPR, + step_vectype, vec_init, step_vec); + vec_init = gimple_build (&init_stmts, PLUS_EXPR, + step_vectype, vec_init, base_vec); + if (!useless_type_conversion_p (vectype, step_vectype)) + vec_init = gimple_build (&init_stmts, VIEW_CONVERT_EXPR, + vectype, vec_init); } + /* iv_loop is nested in the loop to be vectorized. Generate: + vec_step = [S, S, S, S] */ + t = unshare_expr (steps[0]); + gcc_assert (CONSTANT_CLASS_P (t) + || TREE_CODE (t) == SSA_NAME); + vec_step = gimple_build_vector_from_val (&init_stmts, + step_vectype, t); + } + vec_steps.safe_push (vec_step); + if (peel_mul) + { + if (!step_mul) + step_mul = peel_mul; + else + step_mul = gimple_build (&init_stmts, + MINUS_EXPR, step_vectype, + step_mul, peel_mul); } - new_bb = gsi_insert_seq_on_edge_immediate (pe, init_stmts); - gcc_assert (!new_bb); + /* Create the induction-phi that defines the induction-operand. */ + vec_dest = vect_get_new_vect_var (vectype, vect_simple_var, + "vec_iv_"); + induction_phi = create_phi_node (vec_dest, iv_loop->header); + induc_def = PHI_RESULT (induction_phi); - return true; - } - - tree init_expr = vect_phi_initial_value (phi); - - gimple_seq stmts = NULL; - if (!nested_in_vect_loop) - { - /* Convert the initial value to the IV update type. */ - tree new_type = TREE_TYPE (step_expr); - init_expr = gimple_convert (&stmts, new_type, init_expr); - - /* If we are using the loop mask to "peel" for alignment then we need - to adjust the start value here. */ - tree skip_niters = LOOP_VINFO_MASK_SKIP_NITERS (loop_vinfo); - if (skip_niters != NULL_TREE) + /* Create the iv update inside the loop */ + tree up = vec_step; + if (lupdate_mul) { - if (FLOAT_TYPE_P (vectype)) - skip_niters = gimple_build (&stmts, FLOAT_EXPR, new_type, - skip_niters); - else - skip_niters = gimple_convert (&stmts, new_type, skip_niters); - tree skip_step = gimple_build (&stmts, MULT_EXPR, new_type, - skip_niters, step_expr); - init_expr = gimple_build (&stmts, MINUS_EXPR, new_type, - init_expr, skip_step); - } - } + if (LOOP_VINFO_USING_SELECT_VL_P (loop_vinfo)) + { + /* When we're using loop_len produced by SELEC_VL, the + non-final iterations are not always processing VF + elements. So vectorize induction variable instead of - if (stmts) - { - new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts); - gcc_assert (!new_bb); - } + _21 = vect_vec_iv_.6_22 + { VF, ... }; - /* Create the vector that holds the initial_value of the induction. */ - if (nested_in_vect_loop) - { - /* iv_loop is nested in the loop to be vectorized. init_expr had already - been created during vectorization of previous stmts. We obtain it - from the STMT_VINFO_VEC_STMT of the defining stmt. */ - auto_vec<tree> vec_inits; - vect_get_vec_defs_for_operand (loop_vinfo, stmt_info, 1, - init_expr, &vec_inits); - vec_init = vec_inits[0]; - /* If the initial value is not of proper type, convert it. */ - if (!useless_type_conversion_p (vectype, TREE_TYPE (vec_init))) - { - new_stmt - = gimple_build_assign (vect_get_new_ssa_name (vectype, - vect_simple_var, - "vec_iv_"), - VIEW_CONVERT_EXPR, - build1 (VIEW_CONVERT_EXPR, vectype, - vec_init)); - vec_init = gimple_assign_lhs (new_stmt); - new_bb = gsi_insert_on_edge_immediate (loop_preheader_edge (iv_loop), - new_stmt); - gcc_assert (!new_bb); - } - } - else - { - /* iv_loop is the loop to be vectorized. Create: - vec_init = [X, X+S, X+2*S, X+3*S] (S = step_expr, X = init_expr) */ - stmts = NULL; - new_name = gimple_convert (&stmts, TREE_TYPE (step_expr), init_expr); + We should generate: - unsigned HOST_WIDE_INT const_nunits; - if (nunits.is_constant (&const_nunits)) - { - tree_vector_builder elts (step_vectype, const_nunits, 1); - elts.quick_push (new_name); - for (i = 1; i < const_nunits; i++) - { - /* Create: new_name_i = new_name + step_expr */ - new_name = gimple_build (&stmts, PLUS_EXPR, TREE_TYPE (new_name), - new_name, step_expr); - elts.quick_push (new_name); + _35 = .SELECT_VL (ivtmp_33, VF); + vect_cst__22 = [vec_duplicate_expr] _35; + _21 = vect_vec_iv_.6_22 + vect_cst__22; */ + vec_loop_lens *lens = &LOOP_VINFO_LENS (loop_vinfo); + tree len = vect_get_loop_len (loop_vinfo, NULL, lens, 1, + vectype, 0, 0); + if (SCALAR_FLOAT_TYPE_P (stept)) + expr = gimple_build (&stmts, FLOAT_EXPR, stept, len); + else + expr = gimple_convert (&stmts, stept, len); + lupdate_mul = gimple_build_vector_from_val (&stmts, step_vectype, + expr); + up = gimple_build (&stmts, MULT_EXPR, + step_vectype, vec_step, lupdate_mul); } - /* Create a vector from [new_name_0, new_name_1, ..., - new_name_nunits-1] */ - vec_init = gimple_build_vector (&stmts, &elts); - } - else if (INTEGRAL_TYPE_P (TREE_TYPE (step_expr))) - /* Build the initial value directly from a VEC_SERIES_EXPR. */ - vec_init = gimple_build (&stmts, VEC_SERIES_EXPR, step_vectype, - new_name, step_expr); - else - { - /* Build: - [base, base, base, ...] - + (vectype) [0, 1, 2, ...] * [step, step, step, ...]. */ - gcc_assert (SCALAR_FLOAT_TYPE_P (TREE_TYPE (step_expr))); - gcc_assert (flag_associative_math); - gcc_assert (index_vectype != NULL_TREE); - - tree index = build_index_vector (index_vectype, 0, 1); - tree base_vec = gimple_build_vector_from_val (&stmts, step_vectype, - new_name); - tree step_vec = gimple_build_vector_from_val (&stmts, step_vectype, - step_expr); - vec_init = gimple_build (&stmts, FLOAT_EXPR, step_vectype, index); - vec_init = gimple_build (&stmts, MULT_EXPR, step_vectype, - vec_init, step_vec); - vec_init = gimple_build (&stmts, PLUS_EXPR, step_vectype, - vec_init, base_vec); - } - vec_init = gimple_convert (&stmts, vectype, vec_init); + else + up = gimple_build (&init_stmts, MULT_EXPR, step_vectype, + vec_step, lupdate_mul); + } + vec_def = gimple_convert (&stmts, step_vectype, induc_def); + vec_def = gimple_build (&stmts, PLUS_EXPR, step_vectype, vec_def, up); + vec_def = gimple_convert (&stmts, vectype, vec_def); + insert_iv_increment (&incr_si, insert_after, stmts); + add_phi_arg (induction_phi, vec_def, loop_latch_edge (iv_loop), + UNKNOWN_LOCATION); - if (stmts) + if (init_node) + vec_init = vect_get_slp_vect_def (init_node, ivn); + if (!nested_in_vect_loop + && step_mul + && !integer_zerop (step_mul)) { - new_bb = gsi_insert_seq_on_edge_immediate (pe, stmts); - gcc_assert (!new_bb); + gcc_assert (invariant); + vec_def = gimple_convert (&init_stmts, step_vectype, vec_init); + up = gimple_build (&init_stmts, MULT_EXPR, step_vectype, + vec_step, step_mul); + vec_def = gimple_build (&init_stmts, PLUS_EXPR, step_vectype, + vec_def, up); + vec_init = gimple_convert (&init_stmts, vectype, vec_def); } - } - - - /* Create the vector that holds the step of the induction. */ - gimple_stmt_iterator *step_iv_si = NULL; - if (nested_in_vect_loop) - /* iv_loop is nested in the loop to be vectorized. Generate: - vec_step = [S, S, S, S] */ - new_name = step_expr; - else if (LOOP_VINFO_USING_SELECT_VL_P (loop_vinfo)) - { - /* When we're using loop_len produced by SELEC_VL, the non-final - iterations are not always processing VF elements. So vectorize - induction variable instead of - _21 = vect_vec_iv_.6_22 + { VF, ... }; + /* Set the arguments of the phi node: */ + add_phi_arg (induction_phi, vec_init, pe, UNKNOWN_LOCATION); - We should generate: - - _35 = .SELECT_VL (ivtmp_33, VF); - vect_cst__22 = [vec_duplicate_expr] _35; - _21 = vect_vec_iv_.6_22 + vect_cst__22; */ - gcc_assert (!slp_node); - gimple_seq seq = NULL; - vec_loop_lens *lens = &LOOP_VINFO_LENS (loop_vinfo); - tree len = vect_get_loop_len (loop_vinfo, NULL, lens, 1, vectype, 0, 0); - expr = force_gimple_operand (fold_convert (TREE_TYPE (step_expr), - unshare_expr (len)), - &seq, true, NULL_TREE); - new_name = gimple_build (&seq, MULT_EXPR, TREE_TYPE (step_expr), expr, - step_expr); - gsi_insert_seq_before (&si, seq, GSI_SAME_STMT); - step_iv_si = &si; + slp_node->push_vec_def (induction_phi); } - else + if (!nested_in_vect_loop) { - /* iv_loop is the loop to be vectorized. Generate: - vec_step = [VF*S, VF*S, VF*S, VF*S] */ - gimple_seq seq = NULL; - if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (step_expr))) - { - expr = build_int_cst (integer_type_node, vf); - expr = gimple_build (&seq, FLOAT_EXPR, TREE_TYPE (step_expr), expr); - } + /* Fill up to the number of vectors we need for the whole group. */ + if (nunits.is_constant (&const_nunits)) + nivs = least_common_multiple (group_size, const_nunits) / const_nunits; else - expr = build_int_cst (TREE_TYPE (step_expr), vf); - new_name = gimple_build (&seq, MULT_EXPR, TREE_TYPE (step_expr), - expr, step_expr); - if (seq) + nivs = 1; + vec_steps.reserve (nivs-ivn); + for (; ivn < nivs; ++ivn) { - new_bb = gsi_insert_seq_on_edge_immediate (pe, seq); - gcc_assert (!new_bb); + slp_node->push_vec_def (SLP_TREE_VEC_DEFS (slp_node)[0]); + vec_steps.quick_push (vec_steps[0]); } } - t = unshare_expr (new_name); - gcc_assert (CONSTANT_CLASS_P (new_name) - || TREE_CODE (new_name) == SSA_NAME); - new_vec = build_vector_from_val (step_vectype, t); - vec_step = vect_init_vector (loop_vinfo, stmt_info, - new_vec, step_vectype, step_iv_si); - - - /* Create the following def-use cycle: - loop prolog: - vec_init = ... - vec_step = ... - loop: - vec_iv = PHI <vec_init, vec_loop> - ... - STMT - ... - vec_loop = vec_iv + vec_step; */ - - /* Create the induction-phi that defines the induction-operand. */ - vec_dest = vect_get_new_vect_var (vectype, vect_simple_var, "vec_iv_"); - induction_phi = create_phi_node (vec_dest, iv_loop->header); - induc_def = PHI_RESULT (induction_phi); - - /* Create the iv update inside the loop */ - stmts = NULL; - vec_def = gimple_convert (&stmts, step_vectype, induc_def); - vec_def = gimple_build (&stmts, PLUS_EXPR, step_vectype, vec_def, vec_step); - vec_def = gimple_convert (&stmts, vectype, vec_def); - gsi_insert_seq_before (&si, stmts, GSI_SAME_STMT); - new_stmt = SSA_NAME_DEF_STMT (vec_def); - - /* Set the arguments of the phi node: */ - add_phi_arg (induction_phi, vec_init, pe, UNKNOWN_LOCATION); - add_phi_arg (induction_phi, vec_def, loop_latch_edge (iv_loop), - UNKNOWN_LOCATION); - - STMT_VINFO_VEC_STMTS (stmt_info).safe_push (induction_phi); - *vec_stmt = induction_phi; - - /* In case that vectorization factor (VF) is bigger than the number - of elements that we can fit in a vectype (nunits), we have to generate - more than one vector stmt - i.e - we need to "unroll" the - vector stmt by a factor VF/nunits. For more details see documentation - in vectorizable_operation. */ - - if (ncopies > 1) + /* Re-use IVs when we can. We are generating further vector + stmts by adding VF' * stride to the IVs generated above. */ + if (ivn < nvects) { - gimple_seq seq = NULL; - /* FORNOW. This restriction should be relaxed. */ - gcc_assert (!nested_in_vect_loop); - /* We expect LOOP_VINFO_USING_SELECT_VL_P to be false if ncopies > 1. */ - gcc_assert (!LOOP_VINFO_USING_SELECT_VL_P (loop_vinfo)); - - /* Create the vector that holds the step of the induction. */ - if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (step_expr))) + if (nunits.is_constant (&const_nunits)) { - expr = build_int_cst (integer_type_node, nunits); - expr = gimple_build (&seq, FLOAT_EXPR, TREE_TYPE (step_expr), expr); + unsigned vfp = (least_common_multiple (group_size, const_nunits) + / group_size); + lupdate_mul + = build_vector_from_val (step_vectype, + SCALAR_FLOAT_TYPE_P (stept) + ? build_real_from_wide (stept, + vfp, UNSIGNED) + : build_int_cstu (stept, vfp)); } else - expr = build_int_cst (TREE_TYPE (step_expr), nunits); - new_name = gimple_build (&seq, MULT_EXPR, TREE_TYPE (step_expr), - expr, step_expr); - if (seq) { - new_bb = gsi_insert_seq_on_edge_immediate (pe, seq); - gcc_assert (!new_bb); - } - - t = unshare_expr (new_name); - gcc_assert (CONSTANT_CLASS_P (new_name) - || TREE_CODE (new_name) == SSA_NAME); - new_vec = build_vector_from_val (step_vectype, t); - vec_step = vect_init_vector (loop_vinfo, stmt_info, - new_vec, step_vectype, NULL); - - vec_def = induc_def; - for (i = 1; i < ncopies + 1; i++) - { - /* vec_i = vec_prev + vec_step */ - gimple_seq stmts = NULL; - vec_def = gimple_convert (&stmts, step_vectype, vec_def); - vec_def = gimple_build (&stmts, - PLUS_EXPR, step_vectype, vec_def, vec_step); - vec_def = gimple_convert (&stmts, vectype, vec_def); - - gsi_insert_seq_before (&si, stmts, GSI_SAME_STMT); - if (i < ncopies) + if (SCALAR_FLOAT_TYPE_P (stept)) { - new_stmt = SSA_NAME_DEF_STMT (vec_def); - STMT_VINFO_VEC_STMTS (stmt_info).safe_push (new_stmt); + tree tem = build_int_cst (integer_type_node, nunits); + lupdate_mul = gimple_build (&init_stmts, FLOAT_EXPR, stept, tem); } else + lupdate_mul = build_int_cst (stept, nunits); + lupdate_mul = gimple_build_vector_from_val (&init_stmts, step_vectype, + lupdate_mul); + } + for (; ivn < nvects; ++ivn) + { + gimple *iv + = SSA_NAME_DEF_STMT (SLP_TREE_VEC_DEFS (slp_node)[ivn - nivs]); + tree def = gimple_get_lhs (iv); + if (ivn < 2*nivs) + vec_steps[ivn - nivs] + = gimple_build (&init_stmts, MULT_EXPR, step_vectype, + vec_steps[ivn - nivs], lupdate_mul); + gimple_seq stmts = NULL; + def = gimple_convert (&stmts, step_vectype, def); + def = gimple_build (&stmts, PLUS_EXPR, step_vectype, + def, vec_steps[ivn % nivs]); + def = gimple_convert (&stmts, vectype, def); + if (gimple_code (iv) == GIMPLE_PHI) + gsi_insert_seq_before (&si, stmts, GSI_SAME_STMT); + else { - /* vec_1 = vec_iv + (VF/n * S) - vec_2 = vec_1 + (VF/n * S) - ... - vec_n = vec_prev + (VF/n * S) = vec_iv + VF * S = vec_loop - - vec_n is used as vec_loop to save the large step register and - related operations. */ - add_phi_arg (induction_phi, vec_def, loop_latch_edge (iv_loop), - UNKNOWN_LOCATION); + gimple_stmt_iterator tgsi = gsi_for_stmt (iv); + gsi_insert_seq_after (&tgsi, stmts, GSI_CONTINUE_LINKING); } + slp_node->push_vec_def (def); } } - if (dump_enabled_p ()) - dump_printf_loc (MSG_NOTE, vect_location, - "transform induction: created def-use cycle: %G%G", - (gimple *) induction_phi, SSA_NAME_DEF_STMT (vec_def)); + new_bb = gsi_insert_seq_on_edge_immediate (pe, init_stmts); + gcc_assert (!new_bb); return true; } diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc index ca19add..d848476 100644 --- a/gcc/tree-vect-patterns.cc +++ b/gcc/tree-vect-patterns.cc @@ -1098,6 +1098,7 @@ vect_recog_cond_expr_convert_pattern (vec_info *vinfo, tree lhs, match[4], temp, type, new_lhs, op2; gimple *cond_stmt; gimple *pattern_stmt; + enum tree_code code = NOP_EXPR; if (!last_stmt) return NULL; @@ -1111,6 +1112,11 @@ vect_recog_cond_expr_convert_pattern (vec_info *vinfo, vect_pattern_detected ("vect_recog_cond_expr_convert_pattern", last_stmt); + if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (lhs))) + code = INTEGRAL_TYPE_P (TREE_TYPE (match[1])) ? FLOAT_EXPR : CONVERT_EXPR; + else if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (match[1]))) + code = FIX_TRUNC_EXPR; + op2 = match[2]; type = TREE_TYPE (match[1]); if (TYPE_SIGN (type) != TYPE_SIGN (TREE_TYPE (match[2]))) @@ -1127,7 +1133,7 @@ vect_recog_cond_expr_convert_pattern (vec_info *vinfo, append_pattern_def_seq (vinfo, stmt_vinfo, cond_stmt, get_vectype_for_scalar_type (vinfo, type)); new_lhs = vect_recog_temp_ssa_var (TREE_TYPE (lhs), NULL); - pattern_stmt = gimple_build_assign (new_lhs, NOP_EXPR, temp); + pattern_stmt = gimple_build_assign (new_lhs, code, temp); *type_out = STMT_VINFO_VECTYPE (stmt_vinfo); if (dump_enabled_p ()) diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc index 857517f..fb2262a 100644 --- a/gcc/tree-vect-slp.cc +++ b/gcc/tree-vect-slp.cc @@ -8036,7 +8036,7 @@ vect_prologue_cost_for_slp (slp_tree node, we are costing so avoid passing it down more than once. Pass it to the first vec_construct or scalar_to_vec part since for those the x86 backend tries to account for GPR to XMM register moves. */ - record_stmt_cost (cost_vec, 1, kind, + record_stmt_cost (cost_vec, 1, kind, nullptr, (kind != vector_load && !passed) ? node : nullptr, vectype, 0, vect_prologue); if (kind != vector_load) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index bd390b2..6695854 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -130,7 +130,8 @@ record_stmt_cost (stmt_vector_for_cost *body_cost_vec, int count, tree vectype, int misalign, enum vect_cost_model_location where) { - return record_stmt_cost (body_cost_vec, count, kind, NULL, node, + return record_stmt_cost (body_cost_vec, count, kind, + SLP_TREE_REPRESENTATIVE (node), node, vectype, misalign, where); } @@ -905,11 +906,8 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo, bool *fatal) be generated for the single vector op. We will handle that shortly. */ static void -vect_model_simple_cost (vec_info *, - stmt_vec_info stmt_info, int ncopies, - enum vect_def_type *dt, - int ndts, - slp_tree node, +vect_model_simple_cost (vec_info *, int ncopies, enum vect_def_type *dt, + int ndts, slp_tree node, stmt_vector_for_cost *cost_vec, vect_cost_for_stmt kind = vector_stmt) { @@ -928,11 +926,11 @@ vect_model_simple_cost (vec_info *, for (int i = 0; i < ndts; i++) if (dt[i] == vect_constant_def || dt[i] == vect_external_def) prologue_cost += record_stmt_cost (cost_vec, 1, scalar_to_vec, - stmt_info, 0, vect_prologue); + node, 0, vect_prologue); /* Pass the inside-of-loop statements to the target-specific cost model. */ inside_cost += record_stmt_cost (cost_vec, ncopies, kind, - stmt_info, 0, vect_body); + node, 0, vect_body); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, @@ -1019,13 +1017,15 @@ vect_get_store_cost (vec_info *, stmt_vec_info stmt_info, slp_tree slp_node, unsigned int *inside_cost, stmt_vector_for_cost *body_cost_vec) { + tree vectype + = slp_node ? SLP_TREE_VECTYPE (slp_node) : STMT_VINFO_VECTYPE (stmt_info); switch (alignment_support_scheme) { case dr_aligned: { *inside_cost += record_stmt_cost (body_cost_vec, ncopies, - vector_store, stmt_info, slp_node, 0, - vect_body); + vector_store, stmt_info, slp_node, + vectype, 0, vect_body); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, @@ -1038,7 +1038,7 @@ vect_get_store_cost (vec_info *, stmt_vec_info stmt_info, slp_tree slp_node, /* Here, we assign an additional cost for the unaligned store. */ *inside_cost += record_stmt_cost (body_cost_vec, ncopies, unaligned_store, stmt_info, slp_node, - misalignment, vect_body); + vectype, misalignment, vect_body); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, "vect_model_store_cost: unaligned supported by " @@ -1072,12 +1072,15 @@ vect_get_load_cost (vec_info *, stmt_vec_info stmt_info, slp_tree slp_node, stmt_vector_for_cost *body_cost_vec, bool record_prologue_costs) { + tree vectype + = slp_node ? SLP_TREE_VECTYPE (slp_node) : STMT_VINFO_VECTYPE (stmt_info); switch (alignment_support_scheme) { case dr_aligned: { *inside_cost += record_stmt_cost (body_cost_vec, ncopies, vector_load, - stmt_info, slp_node, 0, vect_body); + stmt_info, slp_node, vectype, + 0, vect_body); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, @@ -1090,7 +1093,7 @@ vect_get_load_cost (vec_info *, stmt_vec_info stmt_info, slp_tree slp_node, /* Here, we assign an additional cost for the unaligned load. */ *inside_cost += record_stmt_cost (body_cost_vec, ncopies, unaligned_load, stmt_info, slp_node, - misalignment, vect_body); + vectype, misalignment, vect_body); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, @@ -1102,18 +1105,19 @@ vect_get_load_cost (vec_info *, stmt_vec_info stmt_info, slp_tree slp_node, case dr_explicit_realign: { *inside_cost += record_stmt_cost (body_cost_vec, ncopies * 2, - vector_load, stmt_info, slp_node, 0, - vect_body); + vector_load, stmt_info, slp_node, + vectype, 0, vect_body); *inside_cost += record_stmt_cost (body_cost_vec, ncopies, - vec_perm, stmt_info, slp_node, 0, - vect_body); + vec_perm, stmt_info, slp_node, + vectype, 0, vect_body); /* FIXME: If the misalignment remains fixed across the iterations of the containing loop, the following cost should be added to the prologue costs. */ if (targetm.vectorize.builtin_mask_for_load) *inside_cost += record_stmt_cost (body_cost_vec, 1, vector_stmt, - stmt_info, slp_node, 0, vect_body); + stmt_info, slp_node, vectype, + 0, vect_body); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, @@ -1139,17 +1143,21 @@ vect_get_load_cost (vec_info *, stmt_vec_info stmt_info, slp_tree slp_node, { *prologue_cost += record_stmt_cost (prologue_cost_vec, 2, vector_stmt, stmt_info, - slp_node, 0, vect_prologue); + slp_node, vectype, + 0, vect_prologue); if (targetm.vectorize.builtin_mask_for_load) *prologue_cost += record_stmt_cost (prologue_cost_vec, 1, vector_stmt, stmt_info, - slp_node, 0, vect_prologue); + slp_node, vectype, + 0, vect_prologue); } *inside_cost += record_stmt_cost (body_cost_vec, ncopies, vector_load, - stmt_info, slp_node, 0, vect_body); + stmt_info, slp_node, vectype, + 0, vect_body); *inside_cost += record_stmt_cost (body_cost_vec, ncopies, vec_perm, - stmt_info, slp_node, 0, vect_body); + stmt_info, slp_node, vectype, + 0, vect_body); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, @@ -3756,8 +3764,7 @@ vectorizable_call (vec_info *vinfo, } STMT_VINFO_TYPE (stmt_info) = call_vec_info_type; DUMP_VECT_SCOPE ("vectorizable_call"); - vect_model_simple_cost (vinfo, stmt_info, - ncopies, dt, ndts, slp_node, cost_vec); + vect_model_simple_cost (vinfo, ncopies, dt, ndts, slp_node, cost_vec); if (ifn != IFN_LAST && modifier == NARROW && !slp_node) record_stmt_cost (cost_vec, ncopies / 2, vec_promote_demote, stmt_info, 0, vect_body); @@ -4724,8 +4731,7 @@ vectorizable_simd_clone_call (vec_info *vinfo, stmt_vec_info stmt_info, STMT_VINFO_TYPE (stmt_info) = call_simd_clone_vec_info_type; DUMP_VECT_SCOPE ("vectorizable_simd_clone_call"); -/* vect_model_simple_cost (vinfo, stmt_info, ncopies, - dt, slp_node, cost_vec); */ +/* vect_model_simple_cost (vinfo, ncopies, dt, slp_node, cost_vec); */ return true; } @@ -5922,7 +5928,7 @@ vectorizable_conversion (vec_info *vinfo, if (modifier == NONE) { STMT_VINFO_TYPE (stmt_info) = type_conversion_vec_info_type; - vect_model_simple_cost (vinfo, stmt_info, (1 + multi_step_cvt), + vect_model_simple_cost (vinfo, (1 + multi_step_cvt), dt, ndts, slp_node, cost_vec); } else if (modifier == NARROW_SRC || modifier == NARROW_DST) @@ -6291,8 +6297,7 @@ vectorizable_assignment (vec_info *vinfo, STMT_VINFO_TYPE (stmt_info) = assignment_vec_info_type; DUMP_VECT_SCOPE ("vectorizable_assignment"); if (!vect_nop_conversion_p (stmt_info)) - vect_model_simple_cost (vinfo, stmt_info, ncopies, dt, ndts, slp_node, - cost_vec); + vect_model_simple_cost (vinfo, ncopies, dt, ndts, slp_node, cost_vec); return true; } @@ -6662,7 +6667,7 @@ vectorizable_shift (vec_info *vinfo, } STMT_VINFO_TYPE (stmt_info) = shift_vec_info_type; DUMP_VECT_SCOPE ("vectorizable_shift"); - vect_model_simple_cost (vinfo, stmt_info, ncopies, dt, + vect_model_simple_cost (vinfo, ncopies, dt, scalar_shift_arg ? 1 : ndts, slp_node, cost_vec); return true; } @@ -7099,8 +7104,7 @@ vectorizable_operation (vec_info *vinfo, STMT_VINFO_TYPE (stmt_info) = op_vec_info_type; DUMP_VECT_SCOPE ("vectorizable_operation"); - vect_model_simple_cost (vinfo, stmt_info, - 1, dt, ndts, slp_node, cost_vec); + vect_model_simple_cost (vinfo, 1, dt, ndts, slp_node, cost_vec); if (using_emulated_vectors_p) { /* The above vect_model_simple_cost call handles constants @@ -8676,7 +8680,7 @@ vectorizable_store (vec_info *vinfo, } else if (vls_type != VLS_STORE_INVARIANT) return; - *prologue_cost += record_stmt_cost (cost_vec, 1, scalar_to_vec, stmt_info, + *prologue_cost += record_stmt_cost (cost_vec, 1, scalar_to_vec, slp_node, 0, vect_prologue); }; @@ -8985,8 +8989,7 @@ vectorizable_store (vec_info *vinfo, if (nstores > 1) inside_cost += record_stmt_cost (cost_vec, n_adjacent_stores, - vec_to_scalar, stmt_info, slp_node, - 0, vect_body); + vec_to_scalar, slp_node, 0, vect_body); } if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, @@ -9323,8 +9326,7 @@ vectorizable_store (vec_info *vinfo, { if (costing_p && vls_type == VLS_STORE_INVARIANT) prologue_cost += record_stmt_cost (cost_vec, 1, scalar_to_vec, - stmt_info, slp_node, 0, - vect_prologue); + slp_node, 0, vect_prologue); else if (!costing_p) { /* Since the store is not grouped, DR_GROUP_SIZE is 1, and @@ -9398,8 +9400,7 @@ vectorizable_store (vec_info *vinfo, unsigned int cnunits = vect_nunits_for_cost (vectype); inside_cost += record_stmt_cost (cost_vec, cnunits, scalar_store, - stmt_info, slp_node, 0, - vect_body); + slp_node, 0, vect_body); continue; } @@ -9467,7 +9468,7 @@ vectorizable_store (vec_info *vinfo, unsigned int cnunits = vect_nunits_for_cost (vectype); inside_cost += record_stmt_cost (cost_vec, cnunits, scalar_store, - stmt_info, slp_node, 0, vect_body); + slp_node, 0, vect_body); continue; } @@ -9575,14 +9576,14 @@ vectorizable_store (vec_info *vinfo, consumed by the load). */ inside_cost += record_stmt_cost (cost_vec, cnunits, vec_to_scalar, - stmt_info, slp_node, 0, vect_body); + slp_node, 0, vect_body); /* N scalar stores plus extracting the elements. */ inside_cost += record_stmt_cost (cost_vec, cnunits, vec_to_scalar, - stmt_info, slp_node, 0, vect_body); + slp_node, 0, vect_body); inside_cost += record_stmt_cost (cost_vec, cnunits, scalar_store, - stmt_info, slp_node, 0, vect_body); + slp_node, 0, vect_body); continue; } @@ -9776,8 +9777,7 @@ vectorizable_store (vec_info *vinfo, int group_size = DR_GROUP_SIZE (first_stmt_info); int nstmts = ceil_log2 (group_size) * group_size; inside_cost += record_stmt_cost (cost_vec, nstmts, vec_perm, - stmt_info, slp_node, 0, - vect_body); + slp_node, 0, vect_body); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, "vect_model_store_cost: " @@ -9806,8 +9806,7 @@ vectorizable_store (vec_info *vinfo, { if (costing_p) inside_cost += record_stmt_cost (cost_vec, 1, vec_perm, - stmt_info, slp_node, 0, - vect_body); + slp_node, 0, vect_body); else { tree perm_mask = perm_mask_for_reverse (vectype); @@ -10026,11 +10025,11 @@ vectorizable_store (vec_info *vinfo, /* Spill. */ prologue_cost += record_stmt_cost (cost_vec, ncopies, vector_store, - stmt_info, slp_node, 0, vect_epilogue); + slp_node, 0, vect_epilogue); /* Loads. */ prologue_cost += record_stmt_cost (cost_vec, ncopies * nregs, scalar_load, - stmt_info, slp_node, 0, vect_epilogue); + slp_node, 0, vect_epilogue); } } } @@ -10603,9 +10602,8 @@ vectorizable_load (vec_info *vinfo, enum vect_cost_model_location cost_loc = hoist_p ? vect_prologue : vect_body; unsigned int cost = record_stmt_cost (cost_vec, 1, scalar_load, - stmt_info, slp_node, 0, - cost_loc); - cost += record_stmt_cost (cost_vec, 1, scalar_to_vec, stmt_info, + slp_node, 0, cost_loc); + cost += record_stmt_cost (cost_vec, 1, scalar_to_vec, slp_node, 0, cost_loc); unsigned int prologue_cost = hoist_p ? cost : 0; unsigned int inside_cost = hoist_p ? 0 : cost; @@ -10871,8 +10869,7 @@ vectorizable_load (vec_info *vinfo, n_adjacent_loads++; else inside_cost += record_stmt_cost (cost_vec, 1, scalar_load, - stmt_info, slp_node, 0, - vect_body); + slp_node, 0, vect_body); continue; } tree this_off = build_int_cst (TREE_TYPE (alias_off), @@ -10910,8 +10907,7 @@ vectorizable_load (vec_info *vinfo, { if (costing_p) inside_cost += record_stmt_cost (cost_vec, 1, vec_construct, - stmt_info, slp_node, 0, - vect_body); + slp_node, 0, vect_body); else { tree vec_inv = build_constructor (lvectype, v); @@ -10966,8 +10962,7 @@ vectorizable_load (vec_info *vinfo, vect_transform_slp_perm_load (vinfo, slp_node, vNULL, NULL, vf, true, &n_perms, &n_loads); inside_cost += record_stmt_cost (cost_vec, n_perms, vec_perm, - first_stmt_info, slp_node, 0, - vect_body); + slp_node, 0, vect_body); } else vect_transform_slp_perm_load (vinfo, slp_node, dr_chain, gsi, vf, @@ -11537,7 +11532,7 @@ vectorizable_load (vec_info *vinfo, unsigned int cnunits = vect_nunits_for_cost (vectype); inside_cost = record_stmt_cost (cost_vec, cnunits, scalar_load, - stmt_info, slp_node, 0, vect_body); + slp_node, 0, vect_body); continue; } if (STMT_VINFO_GATHER_SCATTER_P (stmt_info)) @@ -11613,7 +11608,7 @@ vectorizable_load (vec_info *vinfo, unsigned int cnunits = vect_nunits_for_cost (vectype); inside_cost = record_stmt_cost (cost_vec, cnunits, scalar_load, - stmt_info, slp_node, 0, vect_body); + slp_node, 0, vect_body); continue; } poly_uint64 offset_nunits @@ -11742,16 +11737,16 @@ vectorizable_load (vec_info *vinfo, /* For emulated gathers N offset vector element offset add is consumed by the load). */ inside_cost = record_stmt_cost (cost_vec, const_nunits, - vec_to_scalar, stmt_info, + vec_to_scalar, slp_node, 0, vect_body); /* N scalar loads plus gathering them into a vector. */ inside_cost = record_stmt_cost (cost_vec, const_nunits, scalar_load, - stmt_info, slp_node, 0, vect_body); + slp_node, 0, vect_body); inside_cost = record_stmt_cost (cost_vec, 1, vec_construct, - stmt_info, slp_node, 0, vect_body); + slp_node, 0, vect_body); continue; } unsigned HOST_WIDE_INT const_offset_nunits @@ -12412,8 +12407,7 @@ vectorizable_load (vec_info *vinfo, { if (costing_p) inside_cost = record_stmt_cost (cost_vec, 1, vec_perm, - stmt_info, slp_node, 0, - vect_body); + slp_node, 0, vect_body); else { tree perm_mask = perm_mask_for_reverse (vectype); @@ -12482,8 +12476,7 @@ vectorizable_load (vec_info *vinfo, vect_transform_slp_perm_load (vinfo, slp_node, vNULL, nullptr, vf, true, &n_perms, nullptr); inside_cost = record_stmt_cost (cost_vec, n_perms, vec_perm, - stmt_info, slp_node, 0, - vect_body); + slp_node, 0, vect_body); } else { @@ -12510,8 +12503,7 @@ vectorizable_load (vec_info *vinfo, int group_size = DR_GROUP_SIZE (first_stmt_info); int nstmts = ceil_log2 (group_size) * group_size; inside_cost += record_stmt_cost (cost_vec, nstmts, vec_perm, - stmt_info, slp_node, 0, - vect_body); + slp_node, 0, vect_body); if (dump_enabled_p ()) dump_printf_loc (MSG_NOTE, vect_location, @@ -12931,7 +12923,7 @@ vectorizable_condition (vec_info *vinfo, } STMT_VINFO_TYPE (stmt_info) = condition_vec_info_type; - vect_model_simple_cost (vinfo, stmt_info, ncopies, dts, ndts, slp_node, + vect_model_simple_cost (vinfo, ncopies, dts, ndts, slp_node, cost_vec, kind); return true; } @@ -13363,8 +13355,7 @@ vectorizable_comparison_1 (vec_info *vinfo, tree vectype, return false; } - vect_model_simple_cost (vinfo, stmt_info, - ncopies * (1 + (bitop2 != NOP_EXPR)), + vect_model_simple_cost (vinfo, ncopies * (1 + (bitop2 != NOP_EXPR)), dts, ndts, slp_node, cost_vec); return true; } diff --git a/gcc/tree-vectorizer.cc b/gcc/tree-vectorizer.cc index 447f882..2f77e46 100644 --- a/gcc/tree-vectorizer.cc +++ b/gcc/tree-vectorizer.cc @@ -1026,10 +1026,19 @@ vect_transform_loops (hash_table<simduid_to_vf> *&simduid_to_vf_htab, { if (GET_MODE_SIZE (loop_vinfo->vector_mode).is_constant (&bytes)) dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, - "loop vectorized using %wu byte vectors\n", bytes); + "%sloop vectorized using %s%wu byte vectors and" + " unroll factor %u\n", + LOOP_VINFO_EPILOGUE_P (loop_vinfo) + ? "epilogue " : "", + LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo) + ? "masked " : "", bytes, + (unsigned int) LOOP_VINFO_VECT_FACTOR + (loop_vinfo).to_constant ()); else dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, vect_location, - "loop vectorized using variable length vectors\n"); + "%sloop vectorized using variable length vectors\n", + LOOP_VINFO_EPILOGUE_P (loop_vinfo) + ? "epilogue " : ""); } loop_p new_loop = vect_transform_loop (loop_vinfo, diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index a2f33a5..7aa2b02 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -2441,17 +2441,15 @@ record_stmt_cost (stmt_vector_for_cost *body_cost_vec, int count, STMT_VINFO_VECTYPE (stmt_info), misalign, where); } -/* Overload of record_stmt_cost with VECTYPE derived from STMT_INFO and - SLP node specified. */ +/* Overload of record_stmt_cost with VECTYPE derived from SLP node. */ inline unsigned record_stmt_cost (stmt_vector_for_cost *body_cost_vec, int count, - enum vect_cost_for_stmt kind, stmt_vec_info stmt_info, - slp_tree node, + enum vect_cost_for_stmt kind, slp_tree node, int misalign, enum vect_cost_model_location where) { - return record_stmt_cost (body_cost_vec, count, kind, stmt_info, node, - STMT_VINFO_VECTYPE (stmt_info), misalign, where); + return record_stmt_cost (body_cost_vec, count, kind, node, + SLP_TREE_VECTYPE (node), misalign, where); } extern void vect_finish_replace_stmt (vec_info *, stmt_vec_info, gimple *); diff --git a/gcc/value-range.cc b/gcc/value-range.cc index a770b41..d2c14e7 100644 --- a/gcc/value-range.cc +++ b/gcc/value-range.cc @@ -2286,7 +2286,7 @@ irange::set_range_from_bitmask () if (has_zero) { int_range<2> zero; - zero.set_zero (type ()); + zero.set_zero (m_type); union_ (zero); } if (flag_checking) @@ -2295,31 +2295,58 @@ irange::set_range_from_bitmask () } else if (popcount == 0) { - set_zero (type ()); + set_zero (m_type); return true; } - // If the mask doesn't have any trailing zero, return. + // If the mask doesn't have a trailing zero, theres nothing to filter. int z = wi::ctz (m_bitmask.mask ()); if (!z) return false; - // Remove trailing ranges that this bitmask indicates can't exist. - int_range_max mask_range; - int prec = TYPE_PRECISION (type ()); - wide_int ub = (wi::one (prec) << z) - 1; - mask_range = int_range<2> (type (), wi::zero (prec), ub); + int prec = TYPE_PRECISION (m_type); + wide_int value = m_bitmask.value (); + wide_int mask = m_bitmask.mask (); - // Then remove the specific value these bits contain from the range. - wide_int value = m_bitmask.value () & ub; - mask_range.intersect (int_range<2> (type (), value, value, VR_ANTI_RANGE)); + // Remove the [0, X] values which the trailing-zero mask rules out. + // For example, if z == 4, the mask is 0xFFF0, and the lowest 4 bits + // define the range [0, 15]. Only one of which (value & low_mask) is allowed. + wide_int ub = (wi::one (prec) << z) - 1; // Upper bound of affected range. + int_range_max mask_range (m_type, wi::zero (prec), ub); - // Inverting produces a list of ranges which can be valid. + // Remove the one valid value from the excluded range and form an anti-range. + wide_int allow = value & ub; + mask_range.intersect (int_range<2> (m_type, allow, allow, VR_ANTI_RANGE)); + + // Invert it to get the allowed values and intersect it with the main range. mask_range.invert (); + bool changed = intersect (mask_range); - // And finally select R from only those valid values. - intersect (mask_range); - return true; + // Now handle the rest of the domain — the upper side for positive values, + // or [-X, -1] for signed negatives. + // Compute the maximum value representable under the mask/value constraint. + ub = mask | value; + + // If value is non-negative, adjust the upper limit to remove values above + // UB that conflict with known fixed bits. + if (TYPE_SIGN (m_type) == UNSIGNED || wi::clz (ub) > 0) + mask_range = int_range<1> (m_type, wi::zero (prec), ub); + else + { + // For signed negative values, find the lowest value with trailing zeros. + // This forms a range such as [-512, -1] for z=9. + wide_int lb = -(wi::one (prec) << z); + mask_range = int_range<2> (m_type, lb, wi::minus_one (prec)); + + // Remove the one allowed value from that set. + allow = value | lb; + mask_range.intersect (int_range<2> (m_type, allow, allow, VR_ANTI_RANGE)); + mask_range.invert (); + } + + // Make sure we call intersect, so do it first. + changed = intersect (mask_range) | changed; + return changed; } void diff --git a/include/ChangeLog b/include/ChangeLog index f3d4cbd..310a5d5 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2025-05-14 Andreas Schwab <schwab@suse.de> + + * libiberty.h (mkstemps): Remove duplicate. + 2025-03-29 Iain Sandoe <iain@sandoe.co.uk> PR cobol/119283 diff --git a/include/libiberty.h b/include/libiberty.h index d4e8791..4ec9b9a 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -215,10 +215,6 @@ extern int ffs(int); extern int mkstemps(char *, int); #endif -#if defined (HAVE_DECL_MKSTEMPS) && !HAVE_DECL_MKSTEMPS -extern int mkstemps(char *, int); -#endif - /* Make memrchr available on systems that do not have it. */ #if !defined (__GNU_LIBRARY__ ) && !defined (__linux__) && \ !defined (HAVE_MEMRCHR) diff --git a/libcpp/po/ChangeLog b/libcpp/po/ChangeLog index aedfd2c..262bcb1 100644 --- a/libcpp/po/ChangeLog +++ b/libcpp/po/ChangeLog @@ -1,3 +1,11 @@ +2025-05-14 Joseph Myers <josmyers@redhat.com> + + * es.po: Update. + +2025-05-12 Joseph Myers <josmyers@redhat.com> + + * es.po: Update. + 2025-03-20 Joseph Myers <josmyers@redhat.com> * de.po: Update. diff --git a/libcpp/po/es.po b/libcpp/po/es.po index cc2cff2..4c55a08 100644 --- a/libcpp/po/es.po +++ b/libcpp/po/es.po @@ -1,15 +1,15 @@ # Spanish localization for cpplib -# Copyright (C) 2001 - 2024 Free Software Foundation, Inc. +# Copyright (C) 2001 - 2025 Free Software Foundation, Inc. # This file is distributed under the same license as the gcc package. # Francisco Javier Serrador <fserrador@gmail.com>, 2018. # Antonio Ceballos Roa <aceballos@gmail.com>, 2021. -# Cristian Othón Martínez Vera <cfuga@cfuga.mx>, 2001 - 2012, 2022, 2023, 2024. +# Cristian Othón Martínez Vera <cfuga@cfuga.mx>, 2001 - 2012, 2022, 2023, 2024, 2025 msgid "" msgstr "" -"Project-Id-Version: cpplib 14.1-b20240218\n" +"Project-Id-Version: cpplib 15.1-b20250316\n" "Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n" "POT-Creation-Date: 2025-03-14 22:05+0000\n" -"PO-Revision-Date: 2024-02-19 11:47-0600\n" +"PO-Revision-Date: 2025-05-14 12:48-0600\n" "Last-Translator: Cristian Othón Martínez Vera <cfuga@cfuga.mx>\n" "Language-Team: Spanish <es@tp.org.es>\n" "Language: es\n" @@ -33,10 +33,9 @@ msgid "no iconv implementation, cannot convert from %s to %s" msgstr "no hay una implementación de iconv, no se puede convertir de %s a %s" #: charset.cc:870 -#, fuzzy, gcc-internal-format -#| msgid "character 0x%lx is not in the basic source character set\n" +#, gcc-internal-format msgid "character 0x%lx is not in the basic source character set" -msgstr "el carácter 0x%lx no está en el conjunto básico de caracteres fuente\n" +msgstr "el carácter 0x%lx no está en el conjunto básico de caracteres fuente" #: charset.cc:887 charset.cc:2639 msgid "converting to execution character set" @@ -52,22 +51,19 @@ msgid "universal character names are only valid in C++ and C99" msgstr "los nombres universales de carácter sólo son válidos en C++ y C99" #: charset.cc:1553 -#, fuzzy, gcc-internal-format -#| msgid "C99's universal character names are incompatible with C90" +#, gcc-internal-format msgid "C99%'s universal character names are incompatible with C90" msgstr "los nombres universales de carácter de C99 son incompatibles con C90" #: charset.cc:1556 -#, fuzzy, gcc-internal-format -#| msgid "the meaning of '\\%c' is different in traditional C" +#, gcc-internal-format msgid "the meaning of %<\\%c%> is different in traditional C" -msgstr "el significado de '\\%c' es diferente en C tradicional" +msgstr "el significado de <\\%c> es diferente en C tradicional" #: charset.cc:1595 -#, fuzzy, gcc-internal-format -#| msgid "'\\N' not followed by '{'" +#, gcc-internal-format msgid "%<\\N%> not followed by %<{%>" -msgstr "'\\N' no tiene una '{' a continuación" +msgstr "%<\\N%> no tiene una %<{%> a continuación" #: charset.cc:1625 msgid "empty named universal character escape sequence; treating it as separate tokens" @@ -82,40 +78,34 @@ msgid "named universal character escapes are only valid in C++23" msgstr "las secuencias de escape de carácter universal nombradas sólo son válidas en C++23" #: charset.cc:1659 -#, fuzzy, gcc-internal-format -#| msgid "\\N{%.*s} is not a valid universal character; treating it as separate tokens" +#, gcc-internal-format msgid "%<\\N{%.*s}%> is not a valid universal character; treating it as separate tokens" -msgstr "\\N{%.*s} no es un carácter universal válido; se trata como elementos separados" +msgstr "%<\\N{%.*s}%> no es un carácter universal válido; se trata como elementos separados" #: charset.cc:1665 -#, fuzzy, gcc-internal-format -#| msgid "\\N{%.*s} is not a valid universal character" +#, gcc-internal-format msgid "%<\\N{%.*s}%> is not a valid universal character" -msgstr "\\N{%.*s} no es un carácter universal válido" +msgstr "%<\\N{%.*s}%> no es un carácter universal válido" #: charset.cc:1675 -#, fuzzy, gcc-internal-format -#| msgid "did you mean \\N{%s}?" +#, gcc-internal-format msgid "did you mean %<\\N{%s}%>?" -msgstr "¿Quiso decir \\N{%s}?" +msgstr "¿Quiso decir %<\\N{%s}%>?" #: charset.cc:1693 -#, fuzzy, gcc-internal-format -#| msgid "'\\N{' not terminated with '}' after %.*s; treating it as separate tokens" +#, gcc-internal-format msgid "%<\\N{%> not terminated with %<}%> after %.*s; treating it as separate tokens" -msgstr "'\\N{' no termina con '}' después de %.*s; se trata como elemntos separados" +msgstr "%<\\N{%> no termina con %<}%> después de %.*s; se trata como elemntos separados" #: charset.cc:1702 -#, fuzzy, gcc-internal-format -#| msgid "'\\N{' not terminated with '}' after %.*s" +#, gcc-internal-format msgid "%<\\N{%> not terminated with %<}%> after %.*s" -msgstr "'\\N{' no termina con '}' después de %.*s" +msgstr "%<\\N{%> no termina con %<}%> después de %.*s" #: charset.cc:1710 -#, fuzzy, gcc-internal-format -#| msgid "In _cpp_valid_ucn but not a UCN" +#, gcc-internal-format msgid "in %<_cpp_valid_ucn%> but not a UCN" -msgstr "En _cpp_valid_unc pero no es un NUC" +msgstr "En %<_cpp_valid_ucn%> pero no es un NUC" #: charset.cc:1753 msgid "empty delimited escape sequence; treating it as separate tokens" @@ -127,20 +117,17 @@ msgstr "secuencia de escape delimitada vacía" #: charset.cc:1769 charset.cc:2172 charset.cc:2289 msgid "delimited escape sequences are only valid in C++23" -msgstr "las secuencias de escape delimitadoas sólo son válidas en C++23" +msgstr "las secuencias de escape delimitadas sólo son válidas en C++23" #: charset.cc:1774 charset.cc:1779 charset.cc:2177 charset.cc:2182 #: charset.cc:2294 charset.cc:2299 -#, fuzzy -#| msgid "delimited escape sequences are only valid in C++23" msgid "delimited escape sequences are only valid in C2Y" -msgstr "las secuencias de escape delimitadoas sólo son válidas en C++23" +msgstr "las secuencias de escape delimitadas sólo son válidas en C2Y" #: charset.cc:1794 -#, fuzzy, gcc-internal-format -#| msgid "'\\u{' not terminated with '}' after %.*s; treating it as separate tokens" +#, gcc-internal-format msgid "%<\\u{%> not terminated with %<}%> after %.*s; treating it as separate tokens" -msgstr "'\\u{' no termina con '}' después de %.*s; se trata como elementos separados" +msgstr "%<\\u{%> no termina con %<}%> después de %.*s; se trata como elementos separados" #: charset.cc:1806 #, gcc-internal-format @@ -148,10 +135,9 @@ msgid "incomplete universal character name %.*s" msgstr "nombre universal de carácter %.*s incompleto" #: charset.cc:1810 -#, fuzzy, gcc-internal-format -#| msgid "'\\u{' not terminated with '}' after %.*s" +#, gcc-internal-format msgid "%<\\u{%> not terminated with %<}%> after %.*s" -msgstr "'\\u{' no termina con '}' después de %.*s" +msgstr "%<\\u{%> no termina con %<}%> después de %.*s" #: charset.cc:1818 #, gcc-internal-format @@ -159,16 +145,14 @@ msgid "%.*s is not a valid universal character" msgstr "%.*s no es un carácter universal válido" #: charset.cc:1834 charset.cc:1838 -#, fuzzy, gcc-internal-format -#| msgid "%.*s is not a valid universal character" +#, gcc-internal-format msgid "%.*s is not a valid universal character name before C23" -msgstr "%.*s no es un carácter universal válido" +msgstr "%.*s no es un carácter universal válido antes de C23" #: charset.cc:1854 lex.cc:2096 -#, fuzzy, gcc-internal-format -#| msgid "'$' in identifier or number" +#, gcc-internal-format msgid "%<$%> in identifier or number" -msgstr "'$' en el identificador o número" +msgstr "%<$%> en el identificador o número" #: charset.cc:1864 #, gcc-internal-format @@ -204,72 +188,62 @@ msgid "extended character %.*s is not valid at the start of an identifier" msgstr "el carácter extendido %.*s no es válido al inicio de un identificador" #: charset.cc:2129 -#, fuzzy, gcc-internal-format -#| msgid "the meaning of '\\x' is different in traditional C" +#, gcc-internal-format msgid "the meaning of %<\\x%> is different in traditional C" -msgstr "el significado de '\\x' es diferente en C tradicional" +msgstr "el significado de %<\\x%> es diferente en C tradicional" #: charset.cc:2190 -#, fuzzy, gcc-internal-format -#| msgid "\\x used with no following hex digits" +#, gcc-internal-format msgid "%<\\x%> used with no following hex digits" -msgstr "se usó \\x sin dígitos hexadecimales a continuación" +msgstr "se usó %<\\x%> sin dígitos hexadecimales a continuación" #: charset.cc:2196 -#, fuzzy, gcc-internal-format -#| msgid "'\\x{' not terminated with '}' after %.*s" +#, gcc-internal-format msgid "%<\\x{%> not terminated with %<}%> after %.*s" -msgstr "'\\x{' no termina con '}' después de %.*s" +msgstr "%<\\x{%> no termina con %<}%> después de %.*s" #: charset.cc:2204 msgid "hex escape sequence out of range" -msgstr "secuencia de escape hexadecimal fuera de rango" +msgstr "secuencia de escape hexadecimal fuera de intervalo" #: charset.cc:2247 -#, fuzzy, gcc-internal-format -#| msgid "'\\o' not followed by '{'" +#, gcc-internal-format msgid "%<\\o%> not followed by %<{%>" -msgstr "'\\o' no tiene una '{' a continuación" +msgstr "%<\\o%> no tiene una %<{%> a continuación" #: charset.cc:2305 -#, fuzzy, gcc-internal-format -#| msgid "'\\o{' not terminated with '}' after %.*s" +#, gcc-internal-format msgid "%<\\o{%> not terminated with %<}%> after %.*s" -msgstr "'\\o{' no termina con '}' después de %.*s" +msgstr "%<\\o{%> no termina con %<}%> después de %.*s" #: charset.cc:2314 msgid "octal escape sequence out of range" -msgstr "secuencia de escape octal fuera de rango" +msgstr "secuencia de escape octal fuera de intervalo" #: charset.cc:2366 charset.cc:2376 -#, fuzzy, gcc-internal-format -#| msgid "numeric escape sequence in unevaluated string: '\\%c'" +#, gcc-internal-format msgid "numeric escape sequence in unevaluated string: %<\\%c%>" -msgstr "secuencia de escape numérica en cadena sin evaluar: '\\%c'" +msgstr "secuencia de escape numérica en cadena sin evaluar: %<\\%c%>" #: charset.cc:2404 -#, fuzzy, gcc-internal-format -#| msgid "the meaning of '\\a' is different in traditional C" +#, gcc-internal-format msgid "the meaning of %<\\a%> is different in traditional C" -msgstr "el significado de '\\a' es diferente en C tradicional" +msgstr "el significado de %<\\a%> es diferente en C tradicional" #: charset.cc:2410 -#, fuzzy, gcc-internal-format -#| msgid "non-ISO-standard escape sequence, '\\%c'" +#, gcc-internal-format msgid "non-ISO-standard escape sequence, %<\\%c%>" -msgstr "secuencia de escape que no es estándard ISO, '\\%c'" +msgstr "secuencia de escape que no es estándard ISO, %<\\%c%>" #: charset.cc:2418 -#, fuzzy, gcc-internal-format -#| msgid "unknown escape sequence: '\\%c'" +#, gcc-internal-format msgid "unknown escape sequence: %<\\%c%>" -msgstr "secuencia de escape desconocida: '\\%c'" +msgstr "secuencia de escape desconocida: %<\\%c%>" #: charset.cc:2428 -#, fuzzy, gcc-internal-format -#| msgid "unknown escape sequence: '\\%s'" +#, gcc-internal-format msgid "unknown escape sequence: %<\\%s%>" -msgstr "secuencia de escape desconocida: '\\%s'" +msgstr "secuencia de escape desconocida: %<\\%s%>" #: charset.cc:2436 msgid "converting escape sequence to execution character set" @@ -288,10 +262,9 @@ msgid "at least one character in a multi-character literal not encodable in a si msgstr "por lo menos un carácter no es codificable en una literal multi-carácter en una sola ejecución de unidad de código de carácter" #: charset.cc:2830 -#, fuzzy, gcc-internal-format -#| msgid "multi-character literal with %ld characters exceeds 'int' size of %ld bytes" +#, gcc-internal-format msgid "multi-character literal with %ld characters exceeds %<int%> size of %ld bytes" -msgstr "la literal multi-carácter con %ld caracteres excede el tamaño de 'int' de %ld bytes" +msgstr "la literal multi-carácter con %ld caracteres excede el tamaño de %<int%> de %ld bytes" #: charset.cc:2834 charset.cc:2929 msgid "multi-character literal cannot have an encoding prefix" @@ -315,10 +288,9 @@ msgid "failure to convert %s to %s" msgstr "no se puede convertir %s a %s" #: directives.cc:243 -#, fuzzy, gcc-internal-format -#| msgid "extra tokens at end of #%s directive" +#, gcc-internal-format msgid "extra tokens at end of %<#%s%> directive" -msgstr "elementos extra al final de la directiva #%s" +msgstr "elementos extra al final de la directiva %<#%s%>" #: directives.cc:286 #, gcc-internal-format, gfc-internal-format @@ -326,47 +298,40 @@ msgid "extra tokens at end of #%s directive" msgstr "elementos extra al final de la directiva #%s" #: directives.cc:396 -#, fuzzy, gcc-internal-format -#| msgid "#%s is a GCC extension" +#, gcc-internal-format msgid "%<#%s%> is a GCC extension" -msgstr "#%s es una extensión de GCC" +msgstr "%<#%s%> es una extensión de GCC" #: directives.cc:404 directives.cc:2686 directives.cc:2725 -#, fuzzy, gcc-internal-format -#| msgid "#%s before C++23 is a GCC extension" +#, gcc-internal-format msgid "%<#%s%> before C++23 is a GCC extension" -msgstr "#%s antes de C++23 es una extensión de GCC" +msgstr "%<#%s%> antes de C++23 es una extensión de GCC" #: directives.cc:409 directives.cc:415 directives.cc:1374 directives.cc:2690 #: directives.cc:2730 -#, fuzzy, gcc-internal-format -#| msgid "#%s before C23 is a GCC extension" +#, gcc-internal-format msgid "%<#%s%> before C23 is a GCC extension" -msgstr "#%s antes de C23 es una extensión de GCC" +msgstr "%<#%s%> antes de C23 es una extensión de GCC" #: directives.cc:423 -#, fuzzy, gcc-internal-format -#| msgid "#%s is a deprecated GCC extension" +#, gcc-internal-format msgid "%<#%s%> is a deprecated GCC extension" -msgstr "#%s es una extensión de GCC obsoleta" +msgstr "%<#%s%> es una extensión de GCC obsoleta" #: directives.cc:436 -#, fuzzy, gcc-internal-format -#| msgid "suggest not using #elif in traditional C" +#, gcc-internal-format msgid "suggest not using %<#elif%> in traditional C" -msgstr "se sugiere no usar #elif en C tradicional" +msgstr "se sugiere no usar %<#elif%> en C tradicional" #: directives.cc:439 -#, fuzzy, gcc-internal-format -#| msgid "traditional C ignores #%s with the # indented" +#, gcc-internal-format msgid "traditional C ignores %<#%s%> with the %<#%> indented" -msgstr "C tradicional descarta #%s con el # indentado" +msgstr "C tradicional descarta %<#%s%> con el %<#%> indentado" #: directives.cc:443 -#, fuzzy, gcc-internal-format -#| msgid "suggest hiding #%s from traditional C with an indented #" +#, gcc-internal-format msgid "suggest hiding %<#%s%> from traditional C with an indented %<#%>" -msgstr "se sugiere ocultar #%s de C tradicional con un # indentado" +msgstr "se sugiere ocultar %<#%s%> de C tradicional con un %<#%> indentado" #: directives.cc:468 msgid "embedding a directive within macro arguments is not portable" @@ -387,44 +352,38 @@ msgid "invalid preprocessing directive #%s" msgstr "directiva de preprocesamiento #%s inválida" #: directives.cc:656 -#, fuzzy, gcc-internal-format -#| msgid "\"%s\" cannot be used as a macro name" +#, gcc-internal-format msgid "%qs cannot be used as a macro name" -msgstr "«%s» no se puede utilizar como nombre de macro" +msgstr "%qs no se puede utilizar como nombre de macro" #: directives.cc:663 -#, fuzzy, gcc-internal-format -#| msgid "\"%s\" cannot be used as a macro name as it is an operator in C++" +#, gcc-internal-format msgid "%qs cannot be used as a macro name as it is an operator in C++" -msgstr "no se puede utilizar «%s» como un nombre de macro porque es un operador en C++" +msgstr "no se puede utilizar %qs como un nombre de macro porque es un operador en C++" #: directives.cc:666 -#, fuzzy, gcc-internal-format -#| msgid "no macro name given in #%s directive" +#, gcc-internal-format msgid "no macro name given in %<#%s%> directive" -msgstr "no se dio un nombre de macro en la directiva #%s" +msgstr "no se dio un nombre de macro en la directiva %<#%s%>" #: directives.cc:669 msgid "macro names must be identifiers" msgstr "los nombres de macro deben ser identificadores" #: directives.cc:743 directives.cc:747 -#, fuzzy, gcc-internal-format -#| msgid "undefining \"%s\"" +#, gcc-internal-format msgid "undefining %qs" -msgstr "borrando la definición de «%s»" +msgstr "borrando la definición de %qs" #: directives.cc:805 -#, fuzzy, gcc-internal-format -#| msgid "missing terminating > character" +#, gcc-internal-format msgid "missing terminating %<>%> character" -msgstr "falta el carácter de terminación >" +msgstr "falta el carácter de terminación %<>%>" #: directives.cc:865 -#, fuzzy, gcc-internal-format -#| msgid "#%s expects \"FILENAME\" or <FILENAME>" +#, gcc-internal-format msgid "%<#%s%> expects %<\"FILENAME\"%> or %<<FILENAME>%>" -msgstr "#%s espera «NOMBREFICHERO» o <NOMBREFICHERO>" +msgstr "%<#%s$> espera %<«NOMBREFICHERO»%> o %<<NOMBREFICHERO>%>" #: directives.cc:911 directives.cc:1391 #, gcc-internal-format, gfc-internal-format @@ -432,133 +391,116 @@ msgid "empty filename in #%s" msgstr "nombre de fichero vacío en #%s" #: directives.cc:920 -#, fuzzy, gcc-internal-format -#| msgid "#include nested depth %u exceeds maximum of %u (use -fmax-include-depth=DEPTH to increase the maximum)" +#, gcc-internal-format msgid "%<#include%> nested depth %u exceeds maximum of %u (use %<-fmax-include-depth=DEPTH%> to increase the maximum)" -msgstr "la profundidad anidada %u de #include excede el máximo %u (utilice -fmax-include-depth=PROFUNDIDAD para aumentar el máximo)" +msgstr "la profundidad anidada %u de %<#include%> excede el máximo de %u (utilice %<-fmax-include-depth=PROFUNDIDAD%> para aumentar el máximo)" #: directives.cc:965 -#, fuzzy, gcc-internal-format -#| msgid "#include_next in primary source file" +#, gcc-internal-format msgid "%<#include_next%> in primary source file" -msgstr "#include_next en fichero primario de código fuente" +msgstr "%<#include_next%> en fichero primario de código fuente" #: directives.cc:1037 directives.cc:1059 directives.cc:1062 directives.cc:1065 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "unbalanced stack in %s" +#, gcc-internal-format, gfc-internal-format msgid "unbalanced '%c'" -msgstr "pila desbalanceada en %s" +msgstr "«%c» desbalanceado" #: directives.cc:1120 directives.cc:1311 #, gcc-internal-format msgid "expected %<)%>" -msgstr "" +msgstr "se esperaba %<)%>" #: directives.cc:1126 directives.cc:1177 -#, fuzzy -#| msgid "expected parameter name, found \"%s\"" msgid "expected parameter name" -msgstr "se esperaba un nombre de parámetro; se ha encontrado «%s»" +msgstr "se esperaba un nombre de parámetro" #: directives.cc:1137 #, gcc-internal-format msgid "%<gnu::base64%> parameter conflicts with %<limit%> or %<gnu::offset%> parameters" -msgstr "" +msgstr "el parámetro %<gnu::base64%> tiene conflictos con los parámetros %<limit%> o %<gnu::offset%>" #: directives.cc:1147 #, gcc-internal-format msgid "%<gnu::base64%> parameter required in preprocessed source" -msgstr "" +msgstr "se requiere el parámetro %<gnu::base64%> en una fuente preprocesada" #: directives.cc:1168 #, gcc-internal-format msgid "expected %<:%>" -msgstr "" +msgstr "se esperaba %<:%>" #: directives.cc:1235 -#, fuzzy, gcc-internal-format -#| msgid "duplicate macro parameter \"%s\"" +#, gcc-internal-format msgid "duplicate embed parameter '%.*s%s%.*s'" -msgstr "parámetro de macro «%s» duplicado" +msgstr "parámetro imbuído «%.*s%s%.*s» duplicado" #: directives.cc:1247 #, gcc-internal-format msgid "unknown embed parameter '%.*s%s%.*s'" -msgstr "" +msgstr "parámetro imbuído «%.*s%s%.*s» desconocido" #: directives.cc:1256 #, gcc-internal-format msgid "expected %<(%>" -msgstr "" +msgstr "se esperaba %<(%>" #: directives.cc:1269 #, gcc-internal-format msgid "too large %<gnu::offset%> argument" -msgstr "" +msgstr "argumento %<gnu::offset%> demasiado grande" #: directives.cc:1316 -#, fuzzy -#| msgid "null character(s) preserved in literal" msgid "expected character string literal" -msgstr "caracter(es) nulo(s) preservados en la literal" +msgstr "se esperaba una literal de carácter de cadena" #: directives.cc:1361 -#, fuzzy, gcc-internal-format -#| msgid "suggest not using #elif in traditional C" +#, gcc-internal-format msgid "%<#embed%> not supported in traditional C" -msgstr "se sugiere no usar #elif en C tradicional" +msgstr "no se admite %<#embed%> en C tradicional" #: directives.cc:1370 -#, fuzzy, gcc-internal-format -#| msgid "#%s before C++23 is a GCC extension" +#, gcc-internal-format msgid "%<#%s%> before C++26 is a GCC extension" -msgstr "#%s antes de C++23 es una extensión de GCC" +msgstr "%<#%s%> antes de C++26 es una extensión de GCC" #: directives.cc:1379 -#, fuzzy, gcc-internal-format -#| msgid "#%s is a GCC extension" +#, gcc-internal-format msgid "%<#%s%> is a C23 feature" -msgstr "#%s es una extensión de GCC" +msgstr "%<#%s%> es una característica de C23" #: directives.cc:1436 -#, fuzzy, gcc-internal-format -#| msgid "invalid flag \"%s\" in line directive" +#, gcc-internal-format msgid "invalid flag %qs in line directive" -msgstr "indicador «%s» inválido en la línea de directiva" +msgstr "indicador %qs inválido en la línea de directiva" #: directives.cc:1504 -#, fuzzy, gcc-internal-format -#| msgid "unexpected end of file after #line" +#, gcc-internal-format msgid "unexpected end of file after %<#line%>" -msgstr "fin de fichero inesperado después de #line" +msgstr "fin de fichero inesperado después de %<#line%>" #: directives.cc:1507 -#, fuzzy, gcc-internal-format -#| msgid "\"%s\" after #line is not a positive integer" +#, gcc-internal-format msgid "%qs after %<#line%> is not a positive integer" -msgstr "«%s» después de #line no es un entero positivo" +msgstr "%qs después de %<#line%> no es un entero positivo" #: directives.cc:1513 directives.cc:1516 msgid "line number out of range" -msgstr "número de línea fuera de rango" +msgstr "número de línea fuera de intervalo" #: directives.cc:1529 directives.cc:1610 -#, fuzzy, gcc-internal-format -#| msgid "\"%s\" is not a valid filename" +#, gcc-internal-format msgid "%qs is not a valid filename" -msgstr "«%s» no es un nombre de fichero válido" +msgstr "%qs no es un nombre de fichero válido" #: directives.cc:1570 -#, fuzzy, gcc-internal-format -#| msgid "\"%s\" after # is not a positive integer" +#, gcc-internal-format msgid "%qs after %<#%> is not a positive integer" -msgstr "«%s» después de # no es un entero positivo" +msgstr "%qs después de %<#%> no es un entero positivo" #: directives.cc:1637 -#, fuzzy, gcc-internal-format -#| msgid "file \"%s\" linemarker ignored due to incorrect nesting" +#, gcc-internal-format msgid "file %qs linemarker ignored due to incorrect nesting" -msgstr "se descarta la marca lineal de fichero «%s» debido a anidación incorrecta" +msgstr "se descarta la marca lineal de fichero %qs debido a anidación incorrecta" #: directives.cc:1715 directives.cc:1717 directives.cc:1719 directives.cc:2326 #, gcc-internal-format, gfc-internal-format @@ -571,68 +513,58 @@ msgid "invalid #%s directive" msgstr "directiva #%s inválida" #: directives.cc:1806 -#, fuzzy, gcc-internal-format -#| msgid "registering pragmas in namespace \"%s\" with mismatched name expansion" +#, gcc-internal-format msgid "registering pragmas in namespace %qs with mismatched name expansion" -msgstr "se registran pragmas en el espacio de nombres «%s» con una expansión de nombre que no coincide" +msgstr "se registran pragmas en el espacio de nombres %qs con una expansión de nombre que no coincide" #: directives.cc:1815 -#, fuzzy, gcc-internal-format -#| msgid "registering pragma \"%s\" with name expansion and no namespace" +#, gcc-internal-format msgid "registering pragma %qs with name expansion and no namespace" -msgstr "se registra el pragma «%s» con expansión de nombre y sin un espacio de nombres" +msgstr "se registra el pragma %qs con expansión de nombre y sin un espacio de nombres" #: directives.cc:1833 -#, fuzzy, gcc-internal-format -#| msgid "registering \"%s\" as both a pragma and a pragma namespace" +#, gcc-internal-format msgid "registering %qs as both a pragma and a pragma namespace" -msgstr "se registra «%s» como un pragma y como un espacio de nombres de pragma" +msgstr "se registra %qs como un pragma y como un espacio de nombres de pragma" #: directives.cc:1836 -#, fuzzy, gcc-internal-format -#| msgid "#pragma %s %s is already registered" +#, gcc-internal-format msgid "%<#pragma %s %s%> is already registered" -msgstr "#pragma %s %s ya está registrado" +msgstr "%<#pragma %s %s%> ya está registrado" #: directives.cc:1839 -#, fuzzy, gcc-internal-format -#| msgid "#pragma %s is already registered" +#, gcc-internal-format msgid "%<#pragma %s%> is already registered" -msgstr "#pragma %s ya está registrado" +msgstr "%<#pragma %s%> ya está registrado" #: directives.cc:1870 msgid "registering pragma with NULL handler" msgstr "se registra un pragma con manejador NULL" #: directives.cc:2088 -#, fuzzy, gcc-internal-format -#| msgid "#pragma once in main file" +#, gcc-internal-format msgid "%<#pragma once%> in main file" -msgstr "#pragma una vez en el fichero principal" +msgstr "%<#pragma once%> en el fichero principal" #: directives.cc:2158 -#, fuzzy, gcc-internal-format -#| msgid "invalid #pragma push_macro directive" +#, gcc-internal-format msgid "invalid %<#pragma %s_macro%> directive" -msgstr "directiva #pragma push_macro inválida" +msgstr "directiva %<#pragma %s_macro%> inválida" #: directives.cc:2237 -#, fuzzy, gcc-internal-format -#| msgid "invalid #pragma GCC poison directive" +#, gcc-internal-format msgid "invalid %<#pragma GCC poison%> directive" -msgstr "directiva #pragma de GCC envenenada inválida" +msgstr "directiva %<#pragma GCC poison%> inválida" #: directives.cc:2246 -#, fuzzy, gcc-internal-format -#| msgid "poisoning existing macro \"%s\"" +#, gcc-internal-format msgid "poisoning existing macro %qs" -msgstr "se envenena el macro existente «%s»" +msgstr "se envenena el macro existente %qs" #: directives.cc:2268 -#, fuzzy, gcc-internal-format -#| msgid "#pragma system_header ignored outside include file" +#, gcc-internal-format msgid "%<#pragma system_header%> ignored outside include file" -msgstr "se descarta #pragma system_header fuera del fichero a incluir" +msgstr "se descarta %<#pragma system_header%> fuera del fichero a incluir" #: directives.cc:2293 #, gcc-internal-format, gfc-internal-format @@ -645,66 +577,56 @@ msgid "current file is older than %s" msgstr "el fichero actual es más antiguo que %s" #: directives.cc:2321 -#, fuzzy, gcc-internal-format -#| msgid "invalid \"#pragma GCC %s\" directive" +#, gcc-internal-format msgid "invalid %<#pragma GCC %s%> directive" -msgstr "directiva «#pragma GCC %s» inválida" +msgstr "directiva %<#pragma GCC %s%> inválida" #: directives.cc:2541 -#, fuzzy, gcc-internal-format -#| msgid "_Pragma takes a parenthesized string literal" +#, gcc-internal-format msgid "%<_Pragma%> takes a parenthesized string literal" -msgstr "_Pragma lleva una cadena literal entre paréntesis" +msgstr "%<_Pragma%> lleva una cadena literal entre paréntesis" #: directives.cc:2624 -#, fuzzy, gcc-internal-format -#| msgid "#else without #if" +#, gcc-internal-format msgid "%<#else%> without %<#if%>" -msgstr "#else sin #if" +msgstr "%<#else%> sin %<#if%>" #: directives.cc:2629 -#, fuzzy, gcc-internal-format -#| msgid "#else after #else" +#, gcc-internal-format msgid "%<#else%> after %<#else%>" -msgstr "#else después de #else" +msgstr "%<#else%> después de %<#else%>" #: directives.cc:2631 directives.cc:2666 msgid "the conditional began here" msgstr "el condicional empezó aquí" #: directives.cc:2657 -#, fuzzy, gcc-internal-format -#| msgid "#%s without #if" +#, gcc-internal-format msgid "%<#%s%> without %<#if%>" -msgstr "#%s sin #if" +msgstr "%<#%s%> sin %<#if%>" #: directives.cc:2663 -#, fuzzy, gcc-internal-format -#| msgid "#%s after #else" +#, gcc-internal-format msgid "%<#%s%> after %<#else%>" -msgstr "#%s después de #else" +msgstr "%<#%s%> después de %<#else%>" #: directives.cc:2767 -#, fuzzy, gcc-internal-format -#| msgid "#endif without #if" +#, gcc-internal-format msgid "%<#endif%> without %<#if%>" -msgstr "#endif sin #if" +msgstr "%<#endif%> sin %<#if%>" #: directives.cc:2852 -#, fuzzy, gcc-internal-format -#| msgid "missing '(' after predicate" +#, gcc-internal-format msgid "missing %<(%> after predicate" -msgstr "falta '(' después del predicado" +msgstr "falta %<(%> después del predicado" #: directives.cc:2870 -#, fuzzy, gcc-internal-format -#| msgid "missing ')' to complete answer" +#, gcc-internal-format msgid "missing %<)%> to complete answer" -msgstr "falta ')' para completar la respuesta" +msgstr "falta %<)%> para completar la respuesta" #: directives.cc:2882 -#, fuzzy, gcc-internal-format -#| msgid "predicate's answer is empty" +#, gcc-internal-format msgid "predicate%'s answer is empty" msgstr "la respuesta del predicado está vacía" @@ -717,10 +639,9 @@ msgid "predicate must be an identifier" msgstr "el predicado debe ser un identificador" #: directives.cc:2997 -#, fuzzy, gcc-internal-format -#| msgid "\"%s\" re-asserted" +#, gcc-internal-format msgid "%qs re-asserted" -msgstr "«%s» reafirmado" +msgstr "%qs reafirmado" #: directives.cc:3305 #, gcc-internal-format, gfc-internal-format @@ -741,16 +662,14 @@ msgid "fixed-point constants are a GCC extension" msgstr "las constantes de coma fija son una extensión GCC" #: expr.cc:721 -#, fuzzy, gcc-internal-format -#| msgid "invalid prefix \"0b\" for floating constant" +#, gcc-internal-format msgid "invalid prefix %<0b%> for floating constant" -msgstr "prefijo «0b» inválido en la constante de coma flotante" +msgstr "prefijo %<0b%> inválido en la constante de coma flotante" #: expr.cc:727 -#, fuzzy, gcc-internal-format -#| msgid "invalid prefix \"0b\" for floating constant" +#, gcc-internal-format msgid "invalid prefix %<0o%> for floating constant" -msgstr "prefijo «0b» inválido en la constante de coma flotante" +msgstr "prefijo %<0o%> inválido en la constante de coma flotante" #: expr.cc:740 msgid "use of C++17 hexadecimal floating constant" @@ -761,38 +680,32 @@ msgid "use of C99 hexadecimal floating constant" msgstr "uso de una constante de coma flotante hexadecimal C99" #: expr.cc:789 -#, fuzzy, gcc-internal-format -#| msgid "invalid suffix \"%.*s\" on floating constant" +#, gcc-internal-format msgid "invalid suffix %<%.*s%> on floating constant" -msgstr "sufijo «%.*s» inválido en la constante de coma flotante" +msgstr "sufijo %<%.*s%> inválido en la constante de coma flotante" #: expr.cc:800 expr.cc:870 -#, fuzzy, gcc-internal-format -#| msgid "traditional C rejects the \"%.*s\" suffix" +#, gcc-internal-format msgid "traditional C rejects the %<%.*s%> suffix" -msgstr "C tradicional rechaza «%.*s» como sufijo" +msgstr "C tradicional rechaza %<%.*s%> como sufijo" #: expr.cc:809 msgid "suffix for double constant is a GCC extension" msgstr "el sufijo para una constante doble es una extensión GCC" #: expr.cc:815 -#, fuzzy, gcc-internal-format -#| msgid "invalid suffix \"%.*s\" with hexadecimal floating constant" +#, gcc-internal-format msgid "invalid suffix %<%.*s%> with hexadecimal floating constant" -msgstr "sufijo «%.*s» inválido en la constante de coma flotante hexadecimal" +msgstr "sufijo %<%.*s%> inválido en la constante de coma flotante hexadecimal" #: expr.cc:829 expr.cc:833 -#, fuzzy -#| msgid "decimal float constants are a C23 feature" msgid "decimal floating constants are a C23 feature" msgstr "las constantes de coma flotante decimal son una característica de C23" #: expr.cc:853 -#, fuzzy, gcc-internal-format -#| msgid "invalid suffix \"%.*s\" on integer constant" +#, gcc-internal-format msgid "invalid suffix %<%.*s%> on integer constant" -msgstr "sufijo «%.*s» inválido en la constante entera" +msgstr "sufijo %<%.*s%> inválido en la constante entera" #: expr.cc:878 msgid "use of C++11 long long integer constant" @@ -822,16 +735,12 @@ msgid "imaginary constants are a GCC extension" msgstr "las constantes imaginarias son una extensión de GCC" #: expr.cc:939 -#, fuzzy -#| msgid "binary constants are a C23 feature or GCC extension" msgid "imaginary constants are a C2Y feature or GCC extension" -msgstr "las constantes binarias son una característica de C23 o una extensión de GCC" +msgstr "las constantes binarias son una característica de C2Y o una extensión de GCC" #: expr.cc:944 -#, fuzzy -#| msgid "binary constants are a C23 feature" msgid "imaginary constants are a C2Y feature" -msgstr "las constantes binarias son una característica de C23" +msgstr "las constantes imaginarias son una característica de C2Y" #: expr.cc:956 msgid "binary constants are a C++14 feature or GCC extension" @@ -846,16 +755,14 @@ msgid "binary constants are a C23 feature" msgstr "las constantes binarias son una característica de C23" #: expr.cc:974 -#, fuzzy, gcc-internal-format -#| msgid "binary constants are a C23 feature or GCC extension" +#, gcc-internal-format msgid "%<0o%> prefixed constants are a C2Y feature or GCC extension" -msgstr "las constantes binarias son una característica de C23 o una extensión de GCC" +msgstr "las constantes con prefijo %<0o%> son una característica de C2Y o una extensión de GCC" #: expr.cc:979 -#, fuzzy, gcc-internal-format -#| msgid "binary constants are a C23 feature" +#, gcc-internal-format msgid "%<0o%> prefixed constants are a C2Y feature" -msgstr "las constantes binarias son una característica de C23" +msgstr "las constantes con prefijo %<0o%> son una característica de C2Y" #: expr.cc:1077 msgid "integer constant is too large for its type" @@ -868,31 +775,27 @@ msgstr "la constante entera es tan grande que es unsigned" #: expr.cc:1189 #, gcc-internal-format msgid "%<defined%> in %<#embed%> parameter" -msgstr "" +msgstr "%<defined%> en un parámetro %<#embed%>" #: expr.cc:1206 -#, fuzzy, gcc-internal-format -#| msgid "missing ')' after \"defined\"" +#, gcc-internal-format msgid "missing %<)%> after %<defined%>" -msgstr "falta ')' después de «defined»" +msgstr "falta %<)%> después de %<defined%>" #: expr.cc:1213 -#, fuzzy, gcc-internal-format -#| msgid "operator \"defined\" requires an identifier" +#, gcc-internal-format msgid "operator %<defined%> requires an identifier" -msgstr "el operador «defined» requiere un identificador" +msgstr "el operador %<defined%> requiere un identificador" #: expr.cc:1221 -#, fuzzy, gcc-internal-format -#| msgid "(\"%s\" is an alternative token for \"%s\" in C++)" +#, gcc-internal-format msgid "(%qs is an alternative token for %qs in C++)" -msgstr "(«%s» es un elemento alternativo para «%s» en C++)" +msgstr "(%qs es un elemento alternativo para %qs en C++)" #: expr.cc:1234 -#, fuzzy, gcc-internal-format -#| msgid "this use of \"defined\" may not be portable" +#, gcc-internal-format msgid "this use of %<defined%> may not be portable" -msgstr "este uso de «defined» puede no ser transportable" +msgstr "este uso de %<defined%> puede no ser transportable" #: expr.cc:1279 msgid "user-defined literal in preprocessor expression" @@ -907,10 +810,9 @@ msgid "imaginary number in preprocessor expression" msgstr "número imaginario en una expresión del preprocesador" #: expr.cc:1339 -#, fuzzy, gcc-internal-format -#| msgid "\"%s\" is not defined, evaluates to 0" +#, gcc-internal-format msgid "%qs is not defined, evaluates to %<0%>" -msgstr "«%s» no está definido, evalúa a 0" +msgstr "%qs no está definido, evalúa a %<0%>" #: expr.cc:1351 msgid "assertions are a GCC extension" @@ -927,11 +829,11 @@ msgstr "pila desbalanceada en %s" #: expr.cc:1633 msgid "negative embed parameter operand" -msgstr "" +msgstr "operando de parámetro imbuído negativo" #: expr.cc:1639 msgid "too large embed parameter operand" -msgstr "" +msgstr "operando de parámetro imbuído demasiado grande" #: expr.cc:1658 #, gcc-internal-format, gfc-internal-format @@ -939,70 +841,61 @@ msgid "impossible operator '%u'" msgstr "operador '%u' imposible" #: expr.cc:1759 -#, fuzzy, gcc-internal-format -#| msgid "missing ')' in expression" +#, gcc-internal-format msgid "missing %<)%> in expression" -msgstr "falta ')' en la expresión" +msgstr "falta %<)%> en la expresión" #: expr.cc:1788 -#, fuzzy, gcc-internal-format -#| msgid "'?' without following ':'" +#, gcc-internal-format msgid "%<?%> without following %<:%>" -msgstr "'?' sin ':' a continuación" +msgstr "%<?%> sin %<:%> a continuación" #: expr.cc:1798 msgid "integer overflow in preprocessor expression" msgstr "desbordamiento entero en expresión del preprocesador" #: expr.cc:1803 -#, fuzzy, gcc-internal-format -#| msgid "missing '(' in expression" +#, gcc-internal-format msgid "missing %<(%> in expression" -msgstr "falta '(' en la expresión" +msgstr "falta %<(%> en la expresión" #: expr.cc:1835 -#, fuzzy, gcc-internal-format -#| msgid "the left operand of \"%s\" changes sign when promoted" +#, gcc-internal-format msgid "the left operand of %qs changes sign when promoted" -msgstr "el operando izquierdo de «%s» cambia de signo cuando es promovido" +msgstr "el operando izquierdo de %qs cambia de signo cuando es promovido" #: expr.cc:1840 -#, fuzzy, gcc-internal-format -#| msgid "the right operand of \"%s\" changes sign when promoted" +#, gcc-internal-format msgid "the right operand of %qs changes sign when promoted" -msgstr "el operando derecho de «%s» cambia de signo cuando es promovido" +msgstr "el operando derecho de %qs cambia de signo cuando es promovido" #: expr.cc:2099 msgid "traditional C rejects the unary plus operator" msgstr "C tradicional rechaza el operador unario mas" #: expr.cc:2197 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "comma operator in operand of #if" +#, gcc-internal-format, gfc-internal-format msgid "comma operator in operand of #%s" -msgstr "operador coma en operando de #if" +msgstr "operador coma en operando de #%s" #: expr.cc:2335 -#, fuzzy, gcc-internal-format, gfc-internal-format -#| msgid "division by zero in #if" +#, gcc-internal-format, gfc-internal-format msgid "division by zero in #%s" -msgstr "división entre cero en #if" +msgstr "división entre cero en #%s" #: files.cc:530 -#, fuzzy, gcc-internal-format -#| msgid "NULL directory in find_file" +#, gcc-internal-format msgid "NULL directory in %<find_file%>" -msgstr "directorio NULL en find_file" +msgstr "directorio NULL en %<find_file%>" #: files.cc:603 msgid "one or more PCH files were found, but they were invalid" msgstr "se encontró uno o más ficheros PCH, pero eran inválidos" #: files.cc:607 -#, fuzzy, gcc-internal-format -#| msgid "use -Winvalid-pch for more information" +#, gcc-internal-format msgid "use %<-Winvalid-pch%> for more information" -msgstr "use -Winvalid-pch para más información" +msgstr "use %<-Winvalid-pch%> para más información" #: files.cc:737 files.cc:1661 #, gcc-internal-format, gfc-internal-format @@ -1027,12 +920,12 @@ msgstr "no hay ruta de inclusión en la cual se pueda buscar %s" #: files.cc:1455 #, gcc-internal-format msgid "%<gnu::base64%> parameter can be only used with %<\".\"%>" -msgstr "" +msgstr "el parámetro %<gnu::base64%> solamente se puede usar con %<\".\"%>" #: files.cc:1472 #, gcc-internal-format msgid "%<gnu::base64%> argument not valid base64 encoded string" -msgstr "" +msgstr "el argumento de %<gnu::base64%> no es una cadena codificada en base64 válida" #: files.cc:2228 msgid "Multiple include guards may be useful for:\n" @@ -1041,18 +934,17 @@ msgstr "Guardias múltiples de include pueden ser útiles para:\n" #: files.cc:2306 #, gcc-internal-format msgid "header guard %qs followed by %<#define%> of a different macro" -msgstr "" +msgstr "guarda de encabezado %qs seguida por %<#define%> de un macro diferente" #: files.cc:2310 #, gcc-internal-format msgid "%qs is defined here; did you mean %qs?" -msgstr "" +msgstr "%qs se define aquí; ¿quiso decir %qs?" #: init.cc:676 -#, fuzzy, gcc-internal-format -#| msgid "cppchar_t must be an unsigned type" +#, gcc-internal-format msgid "%<cppchar_t%> must be an unsigned type" -msgstr "cppchar_t debe ser de un tipo unsigned" +msgstr "%<cppchar_t%> debe ser de un tipo unsigned" #: init.cc:680 #, gcc-internal-format, gfc-internal-format @@ -1060,28 +952,24 @@ msgid "preprocessor arithmetic has maximum precision of %lu bits; target require msgstr "la aritmética del preprocesador tiene una precisión máxima de %lu bits; el objetivo requiere de %lu bits" #: init.cc:687 -#, fuzzy, gcc-internal-format -#| msgid "CPP arithmetic must be at least as precise as a target int" +#, gcc-internal-format msgid "CPP arithmetic must be at least as precise as a target %<int%>" -msgstr "la aritmética de CPP debe se al menos tan precisa como un int del objetivo" +msgstr "la aritmética de CPP debe se al menos tan precisa como un %<int%> del objetivo" #: init.cc:691 -#, fuzzy, gcc-internal-format -#| msgid "target char is less than 8 bits wide" +#, gcc-internal-format msgid "target %<char%> is less than 8 bits wide" -msgstr "el char del objetivo tiene menos de 8 bits de ancho" +msgstr "el %<char%> del objetivo tiene menos de 8 bits de ancho" #: init.cc:695 -#, fuzzy, gcc-internal-format -#| msgid "target wchar_t is narrower than target char" +#, gcc-internal-format msgid "target %<wchar_t%> is narrower than target %<char%>" -msgstr "el wchar_t del objetivo es más estrecho que el char del objetivo" +msgstr "el %<wchar_t%> del objetivo es más estrecho que el %<char%> del objetivo" #: init.cc:699 -#, fuzzy, gcc-internal-format -#| msgid "target int is narrower than target char" +#, gcc-internal-format msgid "target %<int%> is narrower than target %<char%>" -msgstr "el int del objetivo es más estrecho que el char del objetivo" +msgstr "el %<int%> del objetivo es más estrecho que el %<char%> del objetivo" #: init.cc:704 msgid "CPP half-integer narrower than CPP character" @@ -1098,43 +986,41 @@ msgstr "caracteres de barra invertida y fin de línea separados por espacio" #: lex.cc:1109 lex.cc:1145 msgid "trailing whitespace" -msgstr "" +msgstr "espacio en blanco al final" #: lex.cc:1116 msgid "backslash-newline at end of file" msgstr "no hay caractér de barra invertida o fin de línea al final del fichero" #: lex.cc:1132 -#, fuzzy, gcc-internal-format -#| msgid "trigraph ??%c converted to %c" +#, gcc-internal-format msgid "trigraph %<??%c%> converted to %<%c%>" -msgstr "se convierte el trigrafo ??%c a %c" +msgstr "se convierte el trigrafo %<??%c%> a %<%c%>" #: lex.cc:1138 -#, fuzzy, gcc-internal-format -#| msgid "trigraph ??%c ignored, use -trigraphs to enable" +#, gcc-internal-format msgid "trigraph %<??%c%> ignored, use %<-trigraphs%> to enable" -msgstr "se descarta el trigrafo ??%c, use -trigraphs para reconocerlo" +msgstr "se descarta el trigrafo %<??%c%>, use %<-trigraphs%> para reconocerlo" #: lex.cc:1149 msgid "too many consecutive spaces in leading whitespace" -msgstr "" +msgstr "demasiados espacios consecutivos en un espacio en blanco al inicio" #: lex.cc:1154 msgid "tab after space in leading whitespace" -msgstr "" +msgstr "tabulador después de espacio en un espacio en blanco al inicio" #: lex.cc:1161 msgid "whitespace other than spaces in leading whitespace" -msgstr "" +msgstr "espacio en blanco diferente a espacios en un espacio en blanco al inicio" #: lex.cc:1167 msgid "whitespace other than tabs in leading whitespace" -msgstr "" +msgstr "espacio en blanco diferente a tabuladores en un espacio en blanco al inicio" #: lex.cc:1173 msgid "whitespace other than spaces and tabs in leading whitespace" -msgstr "" +msgstr "espacio en blanco diferente a espacios y tabuladores en un espacio en blanco al inicio" #: lex.cc:1623 msgid "end of bidirectional context" @@ -1149,52 +1035,44 @@ msgid "unpaired UTF-8 bidirectional control character detected" msgstr "se detectó un carácter de control bidireccional UTF-8 sin emparejar" #: lex.cc:1706 -#, fuzzy, gcc-internal-format -#| msgid "UTF-8 vs UCN mismatch when closing a context by \"%s\"" +#, gcc-internal-format msgid "UTF-8 vs UCN mismatch when closing a context by %qs" -msgstr "no coincide UTF-8 vs UCN al cerrar un contexto por «%s»" +msgstr "no coincide UTF-8 vs UCN al cerrar un contexto por %qs" #: lex.cc:1715 -#, fuzzy, gcc-internal-format -#| msgid "\"%s\" is closing an unopened context" +#, gcc-internal-format msgid "%qs is closing an unopened context" -msgstr "«%s» está cerrando un contexto sin abrir" +msgstr "%qs está cerrando un contexto sin abrir" #: lex.cc:1719 -#, fuzzy, gcc-internal-format -#| msgid "found problematic Unicode character \"%s\"" +#, gcc-internal-format msgid "found problematic Unicode character %qs" -msgstr "se encontró el carácter Unicode problemático «%s»" +msgstr "se encontró el carácter Unicode problemático %qs" #: lex.cc:1749 lex.cc:1755 -#, fuzzy, gcc-internal-format -#| msgid "invalid UTF-8 character <%x><%x>" +#, gcc-internal-format msgid "invalid UTF-8 character %<<%x>%>" -msgstr "carácter UTF-8 <%x><%x> inválido" +msgstr "carácter UTF-8 %<<%x>%> inválido" #: lex.cc:1765 lex.cc:1771 -#, fuzzy, gcc-internal-format -#| msgid "invalid UTF-8 character <%x><%x><%x>" +#, gcc-internal-format msgid "invalid UTF-8 character %<<%x><%x>%>" -msgstr "carácter UTF-8 <%x><%x><%x> inválido" +msgstr "carácter UTF-8 %<<%x><%x>%> inválido" #: lex.cc:1781 lex.cc:1787 -#, fuzzy, gcc-internal-format -#| msgid "invalid UTF-8 character <%x><%x><%x><%x>" +#, gcc-internal-format msgid "invalid UTF-8 character %<<%x><%x><%x>%>" -msgstr "carácter UTF-8 <%x><%x><%x><%x> inválido" +msgstr "carácter UTF-8 %<<%x><%x><%x>%> inválido" #: lex.cc:1797 lex.cc:1803 -#, fuzzy, gcc-internal-format -#| msgid "invalid UTF-8 character <%x><%x><%x><%x>" +#, gcc-internal-format msgid "invalid UTF-8 character %<<%x><%x><%x><%x>%>" -msgstr "carácter UTF-8 <%x><%x><%x><%x> inválido" +msgstr "carácter UTF-8 %<<%x><%x><%x><%x>%> inválido" #: lex.cc:1885 -#, fuzzy, gcc-internal-format -#| msgid "\"/*\" within comment" +#, gcc-internal-format msgid "%</*%> within comment" -msgstr "«/*» dentro de un comentario" +msgstr "%</*%> dentro de un comentario" #: lex.cc:1990 #, gcc-internal-format, gfc-internal-format @@ -1206,62 +1084,53 @@ msgid "null character(s) ignored" msgstr "se descarta(n) caracter(es) nulo(s)" #: lex.cc:2063 -#, fuzzy, gcc-internal-format -#| msgid "`%.*s' is not in NFKC" +#, gcc-internal-format msgid "%<%.*s%> is not in NFKC" -msgstr "`%.*s' no está en NFKC" +msgstr "%<%.*s%> no está en NFKC" #: lex.cc:2066 lex.cc:2069 -#, fuzzy, gcc-internal-format -#| msgid "`%.*s' is not in NFC" +#, gcc-internal-format msgid "%<%.*s%> is not in NFC" -msgstr "`%.*s' no está en NFC" +msgstr "%<%.*s%> no está en NFC" #: lex.cc:2158 -#, fuzzy, gcc-internal-format -#| msgid "__VA_OPT__ is not available until C++20" +#, gcc-internal-format msgid "%<__VA_OPT__%> is not available until C++20" -msgstr "__VA_OPT__ no está disponible hasta C++20" +msgstr "%<__VA_OPT__%> no está disponible hasta C++20" #: lex.cc:2161 -#, fuzzy, gcc-internal-format -#| msgid "__VA_OPT__ is not available until C23" +#, gcc-internal-format msgid "%<__VA_OPT__%> is not available until C23" -msgstr "__VA_OPT__ no está disponible hasta C23" +msgstr "%<__VA_OPT__%> no está disponible hasta C23" #: lex.cc:2169 -#, fuzzy, gcc-internal-format -#| msgid "__VA_OPT__ can only appear in the expansion of a C++20 variadic macro" +#, gcc-internal-format msgid "%<__VA_OPT__%> can only appear in the expansion of a C++20 variadic macro" -msgstr "__VA_OPT__ solamente puede aparecer en la expansión de una macro variadic de C++20" +msgstr "%<__VA_OPT__%> solamente puede aparecer en la expansión de una macro variadic de C++20" #: lex.cc:2186 -#, fuzzy, gcc-internal-format -#| msgid "attempt to use poisoned \"%s\"" +#, gcc-internal-format msgid "attempt to use poisoned %qs" -msgstr "intento de utilizar «%s» envenenado" +msgstr "intento de utilizar %qs envenenado" #: lex.cc:2191 msgid "poisoned here" msgstr "envenenado aquí" #: lex.cc:2201 -#, fuzzy, gcc-internal-format -#| msgid "__VA_ARGS__ can only appear in the expansion of a C++11 variadic macro" +#, gcc-internal-format msgid "%<__VA_ARGS__%> can only appear in the expansion of a C++11 variadic macro" -msgstr "__VA_ARGS__ solamente puede aparecer en la expansión de una macro variadic C++11" +msgstr "%<__VA_ARGS__%> solamente puede aparecer en la expansión de una macro variadic C++11" #: lex.cc:2205 -#, fuzzy, gcc-internal-format -#| msgid "__VA_ARGS__ can only appear in the expansion of a C99 variadic macro" +#, gcc-internal-format msgid "%<__VA_ARGS__%> can only appear in the expansion of a C99 variadic macro" -msgstr "__VA_ARGS__ solamente puede aparecer en la expansión de una macro variadic C99" +msgstr "%<__VA_ARGS__%> solamente puede aparecer en la expansión de una macro variadic C99" #: lex.cc:2217 -#, fuzzy, gcc-internal-format -#| msgid "identifier \"%s\" is a special operator name in C++" +#, gcc-internal-format msgid "identifier %qs is a special operator name in C++" -msgstr "el identificador «%s» es un nombre de operador especial en C++" +msgstr "el identificador %qs es un nombre de operador especial en C++" #: lex.cc:2353 msgid "adjacent digit separators" @@ -1306,33 +1175,29 @@ msgid "module control-line cannot be in included file" msgstr "la línea de control del módulo no puede estar en un fichero incluido" #: lex.cc:3593 -#, fuzzy, gcc-internal-format -#| msgid "module control-line \"%s\" cannot be an object-like macro" +#, gcc-internal-format msgid "module control-line %qs cannot be an object-like macro" -msgstr "la línea de control del módulo «%s» no puede ser una macro de tipo objeto" +msgstr "la línea de control del módulo %qs no puede ser una macro de tipo objeto" #: lex.cc:3631 -#, fuzzy, gcc-internal-format -#| msgid "module control-line \"%s\" cannot be an object-like macro" +#, gcc-internal-format msgid "module name %qs cannot be an object-like macro" -msgstr "la línea de control del módulo «%s» no puede ser una macro de tipo objeto" +msgstr "el nombre de módulo %qs no puede ser una macro de tipo objeto" #: lex.cc:3637 -#, fuzzy, gcc-internal-format -#| msgid "module control-line \"%s\" cannot be an object-like macro" +#, gcc-internal-format msgid "module partition %qs cannot be an object-like macro" -msgstr "la línea de control del módulo «%s» no puede ser una macro de tipo objeto" +msgstr "la partición de módulo %qs no puede ser una macro de tipo objeto" #: lex.cc:3658 -#, fuzzy, gcc-internal-format -#| msgid "'\\o' not followed by '{'" +#, gcc-internal-format msgid "module name followed by %<(%>" -msgstr "'\\o' no tiene una '{' a continuación" +msgstr "nombre de módulo seguido por %<(%>" #: lex.cc:3662 #, gcc-internal-format msgid "module partition followed by %<(%>" -msgstr "" +msgstr "partición de módulo seguido por %<(%>" #: lex.cc:4071 lex.cc:5504 traditional.cc:174 msgid "unterminated comment" @@ -1373,70 +1238,59 @@ msgid "'##' cannot appear at either end of __VA_OPT__" msgstr "'##' no puede aparecer o en el final de una __VA_OPT__" #: macro.cc:144 -#, fuzzy, gcc-internal-format -#| msgid "__VA_OPT__ may not appear in a __VA_OPT__" +#, gcc-internal-format msgid "%<__VA_OPT__%> may not appear in a %<__VA_OPT__%>" -msgstr "__VA_OPT__ no puede aparecer en un __VA_OPT__" +msgstr "%<__VA_OPT__%> no puede aparecer en un %<__VA_OPT__%>" #: macro.cc:157 -#, fuzzy, gcc-internal-format -#| msgid "__VA_OPT__ must be followed by an open parenthesis" +#, gcc-internal-format msgid "%<__VA_OPT__%> must be followed by an open parenthesis" -msgstr "__VA_OPT__ debe estar seguido por un paréntesis abierto" +msgstr "%<__VA_OPT__%> debe estar seguido por un paréntesis abierto" #: macro.cc:235 -#, fuzzy, gcc-internal-format -#| msgid "unterminated __VA_OPT__" +#, gcc-internal-format msgid "unterminated %<__VA_OPT__%>" -msgstr "__VA_OPT__ sin terminar" +msgstr "%<__VA_OPT__%> sin terminar" #: macro.cc:396 -#, fuzzy, gcc-internal-format -#| msgid "\"%s\" used outside of preprocessing directive" +#, gcc-internal-format msgid "%qs used outside of preprocessing directive" -msgstr "se ha utilizado «%s» fuera de una directiva de preprocesamiento" +msgstr "se ha utilizado %qs fuera de una directiva de preprocesamiento" #: macro.cc:407 -#, fuzzy, gcc-internal-format -#| msgid "missing '(' before \"%s\" operand" +#, gcc-internal-format msgid "missing %<(%> before %qs operand" -msgstr "falta '(' antes del operando «%s»" +msgstr "falta %<(%> antes del operando %qs" #: macro.cc:425 -#, fuzzy, gcc-internal-format -#| msgid "operator \"%s\" requires a header-name" +#, gcc-internal-format msgid "operator %qs requires a header-name" -msgstr "el operador «%s» requiere un nombre cabecera" +msgstr "el operador %qs requiere un nombre-de-cabecera" #: macro.cc:454 -#, fuzzy, gcc-internal-format -#| msgid "missing ')' after \"%s\" operand" +#, gcc-internal-format msgid "missing %<)%> after %qs operand" -msgstr "falta ')' después del operando «%s»" +msgstr "falta %<)%> después del operando %qs" #: macro.cc:499 -#, fuzzy, gcc-internal-format -#| msgid "empty filename in #%s" +#, gcc-internal-format msgid "empty filename in %qs" -msgstr "nombre de fichero vacío en #%s" +msgstr "nombre de fichero vacío en %qs" #: macro.cc:533 -#, fuzzy, gcc-internal-format -#| msgid "macro \"%s\" is not used" +#, gcc-internal-format msgid "macro %qs is not used" -msgstr "el macro «%s» no se utiliza" +msgstr "el macro %qs no se utiliza" #: macro.cc:572 macro.cc:888 -#, fuzzy, gcc-internal-format -#| msgid "invalid built-in macro \"%s\"" +#, gcc-internal-format msgid "invalid built-in macro %qs" -msgstr "macro interna «%s» inválida" +msgstr "macro interna %qs inválida" #: macro.cc:579 macro.cc:687 -#, fuzzy, gcc-internal-format -#| msgid "macro \"%s\" might prevent reproducible builds" +#, gcc-internal-format msgid "macro %qs might prevent reproducible builds" -msgstr "macro «%s» quizá previene compilaciones reproducibles" +msgstr "macro %qs quizá previene compilaciones reproducibles" #: macro.cc:610 msgid "could not determine file timestamp" @@ -1447,22 +1301,19 @@ msgid "could not determine date and time" msgstr "no se puede determinar la fecha y la hora" #: macro.cc:733 -#, fuzzy, gcc-internal-format -#| msgid "__COUNTER__ expanded inside directive with -fdirectives-only" +#, gcc-internal-format msgid "%<__COUNTER__%> expanded inside directive with %<-fdirectives-only%>" -msgstr "se expande __COUNTER__ dentro de una directiva con -fdirectives-only" +msgstr "se expande %<__COUNTER__%> dentro de una directiva con %<-fdirectives-only%>" #: macro.cc:760 -#, fuzzy, gcc-internal-format -#| msgid "suggest not using #elif in traditional C" +#, gcc-internal-format msgid "%<__has_embed%> not supported in traditional C" -msgstr "se sugiere no usar #elif en C tradicional" +msgstr "no se admite %<__has_embed%> en C tradicional" #: macro.cc:1007 -#, fuzzy, gcc-internal-format -#| msgid "invalid string literal, ignoring final '\\'" +#, gcc-internal-format msgid "invalid string literal, ignoring final %<\\%>" -msgstr "cadena literal inválida, se descarta el '\\' final" +msgstr "cadena literal inválida, se descarta el %<\\%> final" #: macro.cc:1071 #, gcc-internal-format @@ -1470,46 +1321,39 @@ msgid "pasting \"%.*s\" and \"%.*s\" does not give a valid preprocessing token" msgstr "pegar «%.*s» y «%.*s» no da un elemento válido de preprocesamiento" #: macro.cc:1203 -#, fuzzy, gcc-internal-format -#| msgid "ISO C++11 requires at least one argument for the \"...\" in a variadic macro" +#, gcc-internal-format msgid "ISO C++11 requires at least one argument for the %<...%> in a variadic macro" -msgstr "ISO C++ requiere al menos un argumento: para la «...» en una macro variadic" +msgstr "ISO C++ requiere al menos un argumento para la %<...%> en una macro variadic" #: macro.cc:1207 -#, fuzzy, gcc-internal-format -#| msgid "ISO C99 requires at least one argument for the \"...\" in a variadic macro" +#, gcc-internal-format msgid "ISO C99 requires at least one argument for the %<...%> in a variadic macro" -msgstr "ISO C99 requiere al menos un argumento para la «...» en una macro variadic" +msgstr "ISO C99 requiere al menos un argumento para la %<...%> en una macro variadic" #: macro.cc:1214 -#, fuzzy, gcc-internal-format -#| msgid "macro \"%s\" requires %u arguments, but only %u given" +#, gcc-internal-format msgid "macro %qs requires %u arguments, but only %u given" -msgstr "el macro «%s» requiere %u argumentos, pero solo se proporcionan %u" +msgstr "el macro %qs requiere %u argumentos, pero solo se proporcionan %u" #: macro.cc:1219 -#, fuzzy, gcc-internal-format -#| msgid "macro \"%s\" passed %u arguments, but takes just %u" +#, gcc-internal-format msgid "macro %qs passed %u arguments, but takes just %u" -msgstr "el macro «%s» pasó %u argumentos, pero solamente toma %u" +msgstr "el macro %qs pasó %u argumentos, pero solamente toma %u" #: macro.cc:1223 -#, fuzzy, gcc-internal-format -#| msgid "macro \"%s\" defined here" +#, gcc-internal-format msgid "macro %qs defined here" -msgstr "el macro «%s» se definió aquí" +msgstr "el macro %qs se definió aquí" #: macro.cc:1417 traditional.cc:822 -#, fuzzy, gcc-internal-format -#| msgid "unterminated argument list invoking macro \"%s\"" +#, gcc-internal-format msgid "unterminated argument list invoking macro %qs" -msgstr "lista de argumentos sin terminar al invocar el macro «%s»" +msgstr "lista de argumentos sin terminar al invocar el macro %qs" #: macro.cc:1563 -#, fuzzy, gcc-internal-format -#| msgid "function-like macro \"%s\" must be used with arguments in traditional C" +#, gcc-internal-format msgid "function-like macro %qs must be used with arguments in traditional C" -msgstr "la función de macro «%s» se debe usar con argumentos en C tradicional" +msgstr "la función de tipo macro %qs se debe usar con argumentos en C tradicional" #: macro.cc:2398 #, gcc-internal-format, gfc-internal-format @@ -1524,41 +1368,36 @@ msgstr "al invocar el macro %s argumento %d: los argumentos de macro vacíos est #: macro.cc:3238 #, gcc-internal-format msgid "%qc in module name or partition comes from or after macro expansion" -msgstr "" +msgstr "%qc en el nombre o partición del módulo viene de o después de una expansión de macro" #: macro.cc:3481 -#, fuzzy, gcc-internal-format -#| msgid "duplicate macro parameter \"%s\"" +#, gcc-internal-format msgid "duplicate macro parameter %qs" -msgstr "parámetro de macro «%s» duplicado" +msgstr "parámetro de macro %qs duplicado" #: macro.cc:3563 -#, fuzzy, gcc-internal-format -#| msgid "expected parameter name, found \"%s\"" +#, gcc-internal-format msgid "expected parameter name, found %qs" -msgstr "se esperaba un nombre de parámetro; se ha encontrado «%s»" +msgstr "se esperaba un nombre de parámetro, se encontró %qs" #: macro.cc:3564 -#, fuzzy, gcc-internal-format -#| msgid "expected ',' or ')', found \"%s\"" +#, gcc-internal-format msgid "expected %<,%> or %<)%>, found %qs" -msgstr "se esperaba ',' o ')'; se ha encontrado «%s»" +msgstr "se esperaba %<,%> o %<)%>, se encontró %qs" #: macro.cc:3565 msgid "expected parameter name before end of line" msgstr "se esperaba un nombre de parámetro antes del fin de línea" #: macro.cc:3566 -#, fuzzy, gcc-internal-format -#| msgid "expected ')' before end of line" +#, gcc-internal-format msgid "expected %<)%> before end of line" -msgstr "se esperaba ')' antes del fin de línea" +msgstr "se esperaba %<)%> antes del fin de línea" #: macro.cc:3567 -#, fuzzy, gcc-internal-format -#| msgid "expected ')' after \"...\"" +#, gcc-internal-format msgid "expected %<)%> after %<...%>" -msgstr "se esperaba ')' después de «...»" +msgstr "se esperaba %<)%> después de %<...%>" #: macro.cc:3624 msgid "anonymous variadic macros were introduced in C++11" @@ -1577,10 +1416,9 @@ msgid "ISO C does not permit named variadic macros" msgstr "ISO C no permite macros variadic nombrados" #: macro.cc:3682 -#, fuzzy, gcc-internal-format -#| msgid "'##' cannot appear at either end of a macro expansion" +#, gcc-internal-format msgid "%<##%> cannot appear at either end of a macro expansion" -msgstr "'##' no puede aparece en o al final de una expansión de macro" +msgstr "%<##%> no puede aparece en o al final de una expansión de macro" #: macro.cc:3720 msgid "ISO C++11 requires whitespace after the macro name" @@ -1595,70 +1433,61 @@ msgid "missing whitespace after the macro name" msgstr "faltan espacios en blanco después del nombre de macro" #: macro.cc:3798 -#, fuzzy, gcc-internal-format -#| msgid "'#' is not followed by a macro parameter" +#, gcc-internal-format msgid "%<#%> is not followed by a macro parameter" -msgstr "'#' no es seguido por un parámetro de macro" +msgstr "%<#%> no es seguido por un parámetro de macro" #: macro.cc:3961 -#, fuzzy, gcc-internal-format -#| msgid "\"%s\" redefined" +#, gcc-internal-format msgid "%qs redefined" -msgstr "«%s» redefinido" +msgstr "%qs redefinido" #: macro.cc:3965 msgid "this is the location of the previous definition" msgstr "esta es la ubicación de la definición previa" #: macro.cc:4103 -#, fuzzy, gcc-internal-format -#| msgid "macro argument \"%s\" would be stringified in traditional C" +#, gcc-internal-format msgid "macro argument %qs would be stringified in traditional C" -msgstr "el argumento de macro «%s» debería ser convertido a cadena en C tradicional" +msgstr "el argumento de macro %qs debería ser convertido a cadena en C tradicional" #: pch.cc:90 pch.cc:342 pch.cc:356 pch.cc:374 pch.cc:380 pch.cc:389 pch.cc:396 msgid "while writing precompiled header" msgstr "al escribir el encabezado precompilado" #: pch.cc:616 -#, fuzzy, gcc-internal-format -#| msgid "%s: not used because `%.*s' is poisoned" +#, gcc-internal-format msgid "%s: not used because %<%.*s%> is poisoned" -msgstr "%s: no se usa porque `%.*s' está envenenado" +msgstr "%s: no se usa porque %<%.*s%> está envenenado" #: pch.cc:638 -#, fuzzy, gcc-internal-format -#| msgid "%s: not used because `%.*s' not defined" +#, gcc-internal-format msgid "%s: not used because %<%.*s%> not defined" -msgstr "%s: no se usa porque `%.*s' no está definido" +msgstr "%s: no se usa porque %<%.*s%> no está definido" #: pch.cc:650 -#, fuzzy, gcc-internal-format -#| msgid "%s: not used because `%.*s' defined as `%s' not `%.*s'" +#, gcc-internal-format msgid "%s: not used because %<%.*s%> defined as %qs not %<%.*s%>" -msgstr "%s: no se usa porque `%.*s' está definido como `%s' no como `%.*s'" +msgstr "%s: no se usa porque %<%.*s%> está definido como %qs y no como %<%.*s%>" #: pch.cc:693 -#, fuzzy, gcc-internal-format -#| msgid "%s: not used because `%s' is defined" +#, gcc-internal-format msgid "%s: not used because %qs is defined" -msgstr "%s: no se usa porque `%s' está definido" +msgstr "%s: no se usa porque %qs está definido" #: pch.cc:713 -#, fuzzy, gcc-internal-format -#| msgid "%s: not used because `__COUNTER__' is invalid" +#, gcc-internal-format msgid "%s: not used because %<__COUNTER__%> is invalid" -msgstr "%s: no se usa porque `__COUNTER__' es inválido" +msgstr "%s: no se usa porque %<__COUNTER__%> es inválido" #: pch.cc:722 pch.cc:885 msgid "while reading precompiled header" msgstr "al leer el encabezado precompilado" #: traditional.cc:891 -#, fuzzy, gcc-internal-format -#| msgid "detected recursion whilst expanding macro \"%s\"" +#, gcc-internal-format msgid "detected recursion whilst expanding macro %qs" -msgstr "se detectó recursión al expandir el macro «%s»" +msgstr "se detectó recursión al expandir el macro %qs" #: traditional.cc:1114 msgid "syntax error in macro parameter list" diff --git a/libgcc/config/libbid/bid128_string.c b/libgcc/config/libbid/bid128_string.c index fce036a..49ad179 100644..100755 --- a/libgcc/config/libbid/bid128_string.c +++ b/libgcc/config/libbid/bid128_string.c @@ -31,6 +31,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "bid128_2_str.h" #include "bid128_2_str_macros.h" +#define MIN_DIGITS(a,b) ((a) < (b) ? (a) : (b)) + extern int bid128_coeff_2_string (UINT64 X_hi, UINT64 X_lo, char *char_ptr); @@ -283,6 +285,7 @@ bid128_from_string (char *ps _RND_MODE_PARAM _EXC_FLAGS_PARAM int ndigits_before, ndigits_after, ndigits_total, dec_expon, sgn_exp, i, d2, rdx_pt_enc; char c, buffer[MAX_STRING_DIGITS_128]; + int min_digits, sticky_bit=0; int save_rnd_mode; int save_fpsf; @@ -443,8 +446,10 @@ bid128_from_string (char *ps _RND_MODE_PARAM _EXC_FLAGS_PARAM if (!rdx_pt_enc) { // investigate string (before radix point) while ((unsigned) (c - '0') <= 9 - && ndigits_before < MAX_STRING_DIGITS_128) { - buffer[ndigits_before] = c; + /*&& ndigits_before < MAX_STRING_DIGITS_128*/) { + if(ndigits_before < MAX_FORMAT_DIGITS_128) buffer[ndigits_before] = c; + else if(ndigits_before < MAX_STRING_DIGITS_128) { buffer[ndigits_before] = c; } + else if(c>'0') { sticky_bit = 1; } ps++; c = *ps; ndigits_before++; @@ -457,8 +462,10 @@ bid128_from_string (char *ps _RND_MODE_PARAM _EXC_FLAGS_PARAM // investigate string (after radix point) while ((unsigned) (c - '0') <= 9 - && ndigits_total < MAX_STRING_DIGITS_128) { - buffer[ndigits_total] = c; + /*&& ndigits_total < MAX_STRING_DIGITS_128*/) { + if(ndigits_total < MAX_FORMAT_DIGITS_128) buffer[ndigits_total] = c; + else if(ndigits_total < MAX_STRING_DIGITS_128) { buffer[ndigits_total] = c; } + else if(c>'0') { sticky_bit = 1; } ps++; c = *ps; ndigits_total++; @@ -474,8 +481,10 @@ bid128_from_string (char *ps _RND_MODE_PARAM _EXC_FLAGS_PARAM ndigits_total = 0; // investigate string (after radix point) while ((unsigned) (c - '0') <= 9 - && ndigits_total < MAX_STRING_DIGITS_128) { - buffer[ndigits_total] = c; + /*&& ndigits_total < MAX_STRING_DIGITS_128*/) { + if(ndigits_total < MAX_FORMAT_DIGITS_128) buffer[ndigits_total] = c; + else if(ndigits_total < MAX_STRING_DIGITS_128) { buffer[ndigits_total] = c; } + else if(c>'0') { sticky_bit = 1; } ps++; c = *ps; ndigits_total++; @@ -594,57 +603,63 @@ bid128_from_string (char *ps _RND_MODE_PARAM _EXC_FLAGS_PARAM coeff_l2 = coeff_low + coeff_low; coeff_low = (coeff_l2 << 2) + coeff_l2 + buffer[i] - '0'; } - switch(rnd_mode) { - case ROUNDING_TO_NEAREST: - carry = ((unsigned) ('4' - buffer[i])) >> 31; - if ((buffer[i] == '5' && !(coeff_low & 1)) || dec_expon < 0) { - if (dec_expon >= 0) { - carry = 0; - i++; - } - for (; i < ndigits_total; i++) { - if (buffer[i] > '0') { - carry = 1; - break; - } + switch(rnd_mode) { + case ROUNDING_TO_NEAREST: + carry = ((unsigned) ('4' - buffer[i])) >> 31; + if ((buffer[i] == '5' && !(coeff_low & 1) && !sticky_bit) || dec_expon < 0) { + if (dec_expon >= 0) { + carry = 0; + i++; + } + min_digits = MIN_DIGITS(ndigits_total, MAX_STRING_DIGITS_128); + for (carry=sticky_bit; (!carry) && (i < min_digits); i++) { + if (buffer[i] > '0') { + carry = 1; + break; + } + } } - } - break; - - case ROUNDING_DOWN: - if(sign_x) - for (; i < ndigits_total; i++) { - if (buffer[i] > '0') { - carry = 1; - break; - } + break; + + case ROUNDING_DOWN: + if(sign_x) { + min_digits = MIN_DIGITS(ndigits_total, MAX_STRING_DIGITS_128); + for (carry=sticky_bit; (!carry) && (i < min_digits); i++) { + if (buffer[i] > '0') { + carry = 1; + break; + } + } } - break; - case ROUNDING_UP: - if(!sign_x) - for (; i < ndigits_total; i++) { - if (buffer[i] > '0') { - carry = 1; - break; - } + break; + case ROUNDING_UP: + if(!sign_x) { + min_digits = MIN_DIGITS(ndigits_total, MAX_STRING_DIGITS_128); + for (carry=sticky_bit; (!carry) && (i < min_digits); i++) { + if (buffer[i] > '0') { + carry = 1; + break; + } + } } - break; - case ROUNDING_TO_ZERO: - carry=0; - break; - case ROUNDING_TIES_AWAY: - carry = ((unsigned) ('4' - buffer[i])) >> 31; - if (dec_expon < 0) { - for (; i < ndigits_total; i++) { - if (buffer[i] > '0') { - carry = 1; - break; - } + break; + case ROUNDING_TO_ZERO: + carry=0; + break; + case ROUNDING_TIES_AWAY: + carry = ((unsigned) ('4' - buffer[i])) >> 31; + if (dec_expon < 0) { + min_digits = MIN_DIGITS(ndigits_total, MAX_STRING_DIGITS_128); + for (carry=sticky_bit; (!carry) && (i < min_digits); i++) { + if (buffer[i] > '0') { + carry = 1; + break; + } + } } - } - break; - - default: break; // default added to avoid compiler warning + break; + + default: break; // default added to avoid compiler warning } // now form the coefficient as coeff_high*10^17+coeff_low+carry scale_high = 100000000000000000ull; diff --git a/libgcobol/ChangeLog b/libgcobol/ChangeLog index fe41ffb..06b99f2 100644 --- a/libgcobol/ChangeLog +++ b/libgcobol/ChangeLog @@ -1,3 +1,13 @@ +2025-05-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * libgcobol.cc [!LOG_PERROR] (LOG_PERROR): Provide fallback. + +2025-05-11 Robert Dubner <rdubner@symas.com> + + PR cobol/119377 + * common-defs.h: (struct cbl_declaratives_t): Change "bool global" to + "uint32_t global". + 2025-05-10 Robert Dubner <rdubner@symas.com> * common-defs.h (ec_cmp): Delete "getenv("match_declarative")" calls. diff --git a/libgcobol/libgcobol.cc b/libgcobol/libgcobol.cc index 2de87cb..56b1a7b 100644 --- a/libgcobol/libgcobol.cc +++ b/libgcobol/libgcobol.cc @@ -75,6 +75,11 @@ #include "exceptl.h" +/* BSD extension. */ +#if !defined(LOG_PERROR) +#define LOG_PERROR 0 +#endif + #if !defined (HAVE_STRFROMF32) # if __FLT_MANT_DIG__ == 24 && __FLT_MAX_EXP__ == 128 static int diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index d36fcc1..638c03e 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,48 @@ +2025-05-13 Jakub Jelinek <jakub@redhat.com> + + PR libfortran/120196 + * m4/ifindloc2.m4 (header1, header2): For back use i > 0 rather than + i >= 0 as for condition. + * generated/findloc2_s1.c: Regenerate. + * generated/findloc2_s4.c: Regenerate. + +2025-05-13 Jakub Jelinek <jakub@redhat.com> + + PR fortran/120191 + * m4/ifunction-s.m4 (SCALAR_ARRAY_FUNCTION): Don't multiply + GFC_DESCRIPTOR_EXTENT(array,) by string_len. + * generated/maxloc1_4_s1.c: Regenerate. + * generated/maxloc1_4_s4.c: Regenerate. + * generated/maxloc1_8_s1.c: Regenerate. + * generated/maxloc1_8_s4.c: Regenerate. + * generated/maxloc1_16_s1.c: Regenerate. + * generated/maxloc1_16_s4.c: Regenerate. + * generated/minloc1_4_s1.c: Regenerate. + * generated/minloc1_4_s4.c: Regenerate. + * generated/minloc1_8_s1.c: Regenerate. + * generated/minloc1_8_s4.c: Regenerate. + * generated/minloc1_16_s1.c: Regenerate. + * generated/minloc1_16_s4.c: Regenerate. + +2025-05-13 Jakub Jelinek <jakub@redhat.com> + + PR fortran/120191 + * m4/maxloc2s.m4: For smaxloc2 call maxloc2 if mask is NULL or *mask. + Swap back and len arguments. + * m4/minloc2s.m4: Likewise. + * generated/maxloc2_4_s1.c: Regenerate. + * generated/maxloc2_4_s4.c: Regenerate. + * generated/maxloc2_8_s1.c: Regenerate. + * generated/maxloc2_8_s4.c: Regenerate. + * generated/maxloc2_16_s1.c: Regenerate. + * generated/maxloc2_16_s4.c: Regenerate. + * generated/minloc2_4_s1.c: Regenerate. + * generated/minloc2_4_s4.c: Regenerate. + * generated/minloc2_8_s1.c: Regenerate. + * generated/minloc2_8_s4.c: Regenerate. + * generated/minloc2_16_s1.c: Regenerate. + * generated/minloc2_16_s4.c: Regenerate. + 2025-05-10 Yuao Ma <c8ef@outlook.com> * io/read.c (read_f): Comment typo, explict -> explicit. diff --git a/libgfortran/generated/findloc2_s1.c b/libgfortran/generated/findloc2_s1.c index 0dcfcc5..eeea821 100644 --- a/libgfortran/generated/findloc2_s1.c +++ b/libgfortran/generated/findloc2_s1.c @@ -49,7 +49,7 @@ findloc2_s1 (gfc_array_s1 * const restrict array, const GFC_UINTEGER_1 * restric if (back) { src = array->base_addr + (extent - 1) * sstride; - for (i = extent; i >= 0; i--) + for (i = extent; i > 0; i--) { if (compare_string (len_array, (char *) src, len_value, (char *) value) == 0) return i; @@ -112,7 +112,7 @@ mfindloc2_s1 (gfc_array_s1 * const restrict array, { src = array->base_addr + (extent - 1) * sstride; mbase += (extent - 1) * mstride; - for (i = extent; i >= 0; i--) + for (i = extent; i > 0; i--) { if (*mbase && (compare_string (len_array, (char *) src, len_value, (char *) value) == 0)) return i; diff --git a/libgfortran/generated/findloc2_s4.c b/libgfortran/generated/findloc2_s4.c index 3ac0d00..a336e34 100644 --- a/libgfortran/generated/findloc2_s4.c +++ b/libgfortran/generated/findloc2_s4.c @@ -49,7 +49,7 @@ findloc2_s4 (gfc_array_s4 * const restrict array, const GFC_UINTEGER_4 * restric if (back) { src = array->base_addr + (extent - 1) * sstride; - for (i = extent; i >= 0; i--) + for (i = extent; i > 0; i--) { if (compare_string_char4 (len_array, src, len_value, value) == 0) return i; @@ -112,7 +112,7 @@ mfindloc2_s4 (gfc_array_s4 * const restrict array, { src = array->base_addr + (extent - 1) * sstride; mbase += (extent - 1) * mstride; - for (i = extent; i >= 0; i--) + for (i = extent; i > 0; i--) { if (*mbase && (compare_string_char4 (len_array, src, len_value, value) == 0)) return i; diff --git a/libgfortran/generated/maxloc1_16_s1.c b/libgfortran/generated/maxloc1_16_s1.c index cbab817..21ea81a 100644 --- a/libgfortran/generated/maxloc1_16_s1.c +++ b/libgfortran/generated/maxloc1_16_s1.c @@ -457,7 +457,7 @@ smaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ smaxloc1_16_s1 (gfc_array_i16 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/maxloc1_16_s4.c b/libgfortran/generated/maxloc1_16_s4.c index d7d8893..47e14c1 100644 --- a/libgfortran/generated/maxloc1_16_s4.c +++ b/libgfortran/generated/maxloc1_16_s4.c @@ -457,7 +457,7 @@ smaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ smaxloc1_16_s4 (gfc_array_i16 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/maxloc1_4_s1.c b/libgfortran/generated/maxloc1_4_s1.c index 51740ee..66ee8d0 100644 --- a/libgfortran/generated/maxloc1_4_s1.c +++ b/libgfortran/generated/maxloc1_4_s1.c @@ -457,7 +457,7 @@ smaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ smaxloc1_4_s1 (gfc_array_i4 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/maxloc1_4_s4.c b/libgfortran/generated/maxloc1_4_s4.c index cf04d6d..7d889c0 100644 --- a/libgfortran/generated/maxloc1_4_s4.c +++ b/libgfortran/generated/maxloc1_4_s4.c @@ -457,7 +457,7 @@ smaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ smaxloc1_4_s4 (gfc_array_i4 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/maxloc1_8_s1.c b/libgfortran/generated/maxloc1_8_s1.c index a35e552..d4711e2 100644 --- a/libgfortran/generated/maxloc1_8_s1.c +++ b/libgfortran/generated/maxloc1_8_s1.c @@ -457,7 +457,7 @@ smaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ smaxloc1_8_s1 (gfc_array_i8 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/maxloc1_8_s4.c b/libgfortran/generated/maxloc1_8_s4.c index e264779..dea360e 100644 --- a/libgfortran/generated/maxloc1_8_s4.c +++ b/libgfortran/generated/maxloc1_8_s4.c @@ -457,7 +457,7 @@ smaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ smaxloc1_8_s4 (gfc_array_i8 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/maxloc2_16_s1.c b/libgfortran/generated/maxloc2_16_s1.c index 6e860ee..d38d422 100644 --- a/libgfortran/generated/maxloc2_16_s1.c +++ b/libgfortran/generated/maxloc2_16_s1.c @@ -152,8 +152,8 @@ GFC_INTEGER_16 smaxloc2_16_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return maxloc2_16_s1 (array, len, back); + if (mask == NULL || *mask) + return maxloc2_16_s1 (array, back, len); else return 0; } diff --git a/libgfortran/generated/maxloc2_16_s4.c b/libgfortran/generated/maxloc2_16_s4.c index e4ac04c..09fdbf8 100644 --- a/libgfortran/generated/maxloc2_16_s4.c +++ b/libgfortran/generated/maxloc2_16_s4.c @@ -152,8 +152,8 @@ GFC_INTEGER_16 smaxloc2_16_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return maxloc2_16_s4 (array, len, back); + if (mask == NULL || *mask) + return maxloc2_16_s4 (array, back, len); else return 0; } diff --git a/libgfortran/generated/maxloc2_4_s1.c b/libgfortran/generated/maxloc2_4_s1.c index 78a5012..0804f59 100644 --- a/libgfortran/generated/maxloc2_4_s1.c +++ b/libgfortran/generated/maxloc2_4_s1.c @@ -152,8 +152,8 @@ GFC_INTEGER_4 smaxloc2_4_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return maxloc2_4_s1 (array, len, back); + if (mask == NULL || *mask) + return maxloc2_4_s1 (array, back, len); else return 0; } diff --git a/libgfortran/generated/maxloc2_4_s4.c b/libgfortran/generated/maxloc2_4_s4.c index 399dab7..6dac06e4 100644 --- a/libgfortran/generated/maxloc2_4_s4.c +++ b/libgfortran/generated/maxloc2_4_s4.c @@ -152,8 +152,8 @@ GFC_INTEGER_4 smaxloc2_4_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return maxloc2_4_s4 (array, len, back); + if (mask == NULL || *mask) + return maxloc2_4_s4 (array, back, len); else return 0; } diff --git a/libgfortran/generated/maxloc2_8_s1.c b/libgfortran/generated/maxloc2_8_s1.c index 9e1d36f9..5ced3c6 100644 --- a/libgfortran/generated/maxloc2_8_s1.c +++ b/libgfortran/generated/maxloc2_8_s1.c @@ -152,8 +152,8 @@ GFC_INTEGER_8 smaxloc2_8_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return maxloc2_8_s1 (array, len, back); + if (mask == NULL || *mask) + return maxloc2_8_s1 (array, back, len); else return 0; } diff --git a/libgfortran/generated/maxloc2_8_s4.c b/libgfortran/generated/maxloc2_8_s4.c index a44c6f6..78ae1be 100644 --- a/libgfortran/generated/maxloc2_8_s4.c +++ b/libgfortran/generated/maxloc2_8_s4.c @@ -152,8 +152,8 @@ GFC_INTEGER_8 smaxloc2_8_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return maxloc2_8_s4 (array, len, back); + if (mask == NULL || *mask) + return maxloc2_8_s4 (array, back, len); else return 0; } diff --git a/libgfortran/generated/minloc1_16_s1.c b/libgfortran/generated/minloc1_16_s1.c index 8228009..b654608 100644 --- a/libgfortran/generated/minloc1_16_s1.c +++ b/libgfortran/generated/minloc1_16_s1.c @@ -457,7 +457,7 @@ sminloc1_16_s1 (gfc_array_i16 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ sminloc1_16_s1 (gfc_array_i16 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/minloc1_16_s4.c b/libgfortran/generated/minloc1_16_s4.c index e40bf54..2e709a7 100644 --- a/libgfortran/generated/minloc1_16_s4.c +++ b/libgfortran/generated/minloc1_16_s4.c @@ -457,7 +457,7 @@ sminloc1_16_s4 (gfc_array_i16 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ sminloc1_16_s4 (gfc_array_i16 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/minloc1_4_s1.c b/libgfortran/generated/minloc1_4_s1.c index 199d254..61dad55 100644 --- a/libgfortran/generated/minloc1_4_s1.c +++ b/libgfortran/generated/minloc1_4_s1.c @@ -457,7 +457,7 @@ sminloc1_4_s1 (gfc_array_i4 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ sminloc1_4_s1 (gfc_array_i4 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/minloc1_4_s4.c b/libgfortran/generated/minloc1_4_s4.c index 1f0174b..49c25d0 100644 --- a/libgfortran/generated/minloc1_4_s4.c +++ b/libgfortran/generated/minloc1_4_s4.c @@ -457,7 +457,7 @@ sminloc1_4_s4 (gfc_array_i4 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ sminloc1_4_s4 (gfc_array_i4 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/minloc1_8_s1.c b/libgfortran/generated/minloc1_8_s1.c index 39bdb9b..c0ac6e6 100644 --- a/libgfortran/generated/minloc1_8_s1.c +++ b/libgfortran/generated/minloc1_8_s1.c @@ -457,7 +457,7 @@ sminloc1_8_s1 (gfc_array_i8 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ sminloc1_8_s1 (gfc_array_i8 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/minloc1_8_s4.c b/libgfortran/generated/minloc1_8_s4.c index ed74ac9..29624d0 100644 --- a/libgfortran/generated/minloc1_8_s4.c +++ b/libgfortran/generated/minloc1_8_s4.c @@ -457,7 +457,7 @@ sminloc1_8_s4 (gfc_array_i8 * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -465,8 +465,7 @@ sminloc1_8_s4 (gfc_array_i8 * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/generated/minloc2_16_s1.c b/libgfortran/generated/minloc2_16_s1.c index 6381ad6..9b4a92d 100644 --- a/libgfortran/generated/minloc2_16_s1.c +++ b/libgfortran/generated/minloc2_16_s1.c @@ -154,8 +154,8 @@ GFC_INTEGER_16 sminloc2_16_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return minloc2_16_s1 (array, len, back); + if (mask == NULL || *mask) + return minloc2_16_s1 (array, back, len); else return 0; } diff --git a/libgfortran/generated/minloc2_16_s4.c b/libgfortran/generated/minloc2_16_s4.c index 11011b7..eac46fa 100644 --- a/libgfortran/generated/minloc2_16_s4.c +++ b/libgfortran/generated/minloc2_16_s4.c @@ -154,8 +154,8 @@ GFC_INTEGER_16 sminloc2_16_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return minloc2_16_s4 (array, len, back); + if (mask == NULL || *mask) + return minloc2_16_s4 (array, back, len); else return 0; } diff --git a/libgfortran/generated/minloc2_4_s1.c b/libgfortran/generated/minloc2_4_s1.c index 631484a..bb22f6c 100644 --- a/libgfortran/generated/minloc2_4_s1.c +++ b/libgfortran/generated/minloc2_4_s1.c @@ -154,8 +154,8 @@ GFC_INTEGER_4 sminloc2_4_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return minloc2_4_s1 (array, len, back); + if (mask == NULL || *mask) + return minloc2_4_s1 (array, back, len); else return 0; } diff --git a/libgfortran/generated/minloc2_4_s4.c b/libgfortran/generated/minloc2_4_s4.c index d606437..f3020d6 100644 --- a/libgfortran/generated/minloc2_4_s4.c +++ b/libgfortran/generated/minloc2_4_s4.c @@ -154,8 +154,8 @@ GFC_INTEGER_4 sminloc2_4_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return minloc2_4_s4 (array, len, back); + if (mask == NULL || *mask) + return minloc2_4_s4 (array, back, len); else return 0; } diff --git a/libgfortran/generated/minloc2_8_s1.c b/libgfortran/generated/minloc2_8_s1.c index b02200b..04ec913 100644 --- a/libgfortran/generated/minloc2_8_s1.c +++ b/libgfortran/generated/minloc2_8_s1.c @@ -154,8 +154,8 @@ GFC_INTEGER_8 sminloc2_8_s1 (gfc_array_s1 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return minloc2_8_s1 (array, len, back); + if (mask == NULL || *mask) + return minloc2_8_s1 (array, back, len); else return 0; } diff --git a/libgfortran/generated/minloc2_8_s4.c b/libgfortran/generated/minloc2_8_s4.c index 9d33d13..fbb6d08 100644 --- a/libgfortran/generated/minloc2_8_s4.c +++ b/libgfortran/generated/minloc2_8_s4.c @@ -154,8 +154,8 @@ GFC_INTEGER_8 sminloc2_8_s4 (gfc_array_s4 * const restrict array, GFC_LOGICAL_4 *mask, GFC_LOGICAL_4 back, gfc_charlen_type len) { - if (mask) - return minloc2_8_s4 (array, len, back); + if (mask == NULL || *mask) + return minloc2_8_s4 (array, back, len); else return 0; } diff --git a/libgfortran/m4/ifindloc2.m4 b/libgfortran/m4/ifindloc2.m4 index c6f909a..d309d8b 100644 --- a/libgfortran/m4/ifindloc2.m4 +++ b/libgfortran/m4/ifindloc2.m4 @@ -41,7 +41,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see if (back) { src = array->base_addr + (extent - 1) * sstride; - for (i = extent; i >= 0; i--) + for (i = extent; i > 0; i--) { if ('comparison`'`) return i; @@ -94,7 +94,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see { src = array->base_addr + (extent - 1) * sstride; mbase += (extent - 1) * mstride; - for (i = extent; i >= 0; i--) + for (i = extent; i > 0; i--) { if (*mbase && ('comparison`'`)) return i; diff --git a/libgfortran/m4/ifunction-s.m4 b/libgfortran/m4/ifunction-s.m4 index 8275f65..22182e9 100644 --- a/libgfortran/m4/ifunction-s.m4 +++ b/libgfortran/m4/ifunction-s.m4 @@ -421,7 +421,7 @@ s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, for (n = 0; n < dim; n++) { - extent[n] = GFC_DESCRIPTOR_EXTENT(array,n) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n); if (extent[n] <= 0) extent[n] = 0; @@ -429,8 +429,7 @@ s'name`'rtype_qual`_'atype_code` ('rtype` * const restrict retarray, for (n = dim; n < rank; n++) { - extent[n] = - GFC_DESCRIPTOR_EXTENT(array,n + 1) * string_len; + extent[n] = GFC_DESCRIPTOR_EXTENT(array,n + 1); if (extent[n] <= 0) extent[n] = 0; diff --git a/libgfortran/m4/maxloc2s.m4 b/libgfortran/m4/maxloc2s.m4 index 49ecae7..b6070b4 100644 --- a/libgfortran/m4/maxloc2s.m4 +++ b/libgfortran/m4/maxloc2s.m4 @@ -153,8 +153,8 @@ export_proto(s'name`'rtype_qual`_'atype_code`); s'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, GFC_LOGICAL_4 *mask'back_arg`, gfc_charlen_type len) { - if (mask) - return 'name`'rtype_qual`_'atype_code` (array, len, back); + if (mask == NULL || *mask) + return 'name`'rtype_qual`_'atype_code` (array, back, len); else return 0; } diff --git a/libgfortran/m4/minloc2s.m4 b/libgfortran/m4/minloc2s.m4 index 8e7b4ab..9524fc4 100644 --- a/libgfortran/m4/minloc2s.m4 +++ b/libgfortran/m4/minloc2s.m4 @@ -155,8 +155,8 @@ export_proto(s'name`'rtype_qual`_'atype_code`); s'name`'rtype_qual`_'atype_code` ('atype` * const restrict array, GFC_LOGICAL_4 *mask'back_arg`, gfc_charlen_type len) { - if (mask) - return 'name`'rtype_qual`_'atype_code` (array, len, back); + if (mask == NULL || *mask) + return 'name`'rtype_qual`_'atype_code` (array, back, len); else return 0; } diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index fa2ddae..b9cda82 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,31 @@ +2025-05-14 Tobias Burnus <tburnus@baylibre.com> + + * target.c (gomp_attach_pointer): Return bool; accept additional + bool to optionally silence the fatal pointee-not-found error. + (gomp_map_vars_internal): If the pointee could not be found, + check whether it was mapped as GOMP_MAP_ZERO_LEN_ARRAY_SECTION. + * libgomp.h (gomp_attach_pointer): Update prototype. + * oacc-mem.c (acc_attach_async, goacc_enter_data_internal): Update + calls. + * testsuite/libgomp.c/target-map-zero-sized.c: New test. + * testsuite/libgomp.c/target-map-zero-sized-2.c: New test. + * testsuite/libgomp.c/target-map-zero-sized-3.c: New test. + +2025-05-12 Thomas Schwinge <tschwinge@baylibre.com> + + PR target/119692 + * testsuite/libgomp.c++/pr119692-1-4.C: '{ dg-timeout 10 }'. + * testsuite/libgomp.c++/pr119692-1-5.C: Likewise. + * testsuite/libgomp.c++/target-exceptions-bad_cast-1.C: Likewise. + * testsuite/libgomp.c++/target-exceptions-bad_cast-2.C: Likewise. + * testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C: Likewise. + * testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C: Likewise. + +2025-05-12 Thomas Schwinge <tschwinge@baylibre.com> + + * testsuite/libgomp.c/declare-variant-3-sm61.c: New. + * testsuite/libgomp.c/declare-variant-3.h: Adjust. + 2025-05-09 Tobias Burnus <tburnus@baylibre.com> * testsuite/libgomp.c/interop-cuda-full.c: Use 'link' instead diff --git a/libgomp/libgomp.h b/libgomp/libgomp.h index d97768f..6030f9d 100644 --- a/libgomp/libgomp.h +++ b/libgomp/libgomp.h @@ -1468,10 +1468,10 @@ extern void gomp_copy_dev2host (struct gomp_device_descr *, struct goacc_asyncqueue *, void *, const void *, size_t); extern uintptr_t gomp_map_val (struct target_mem_desc *, void **, size_t); -extern void gomp_attach_pointer (struct gomp_device_descr *, +extern bool gomp_attach_pointer (struct gomp_device_descr *, struct goacc_asyncqueue *, splay_tree, splay_tree_key, uintptr_t, size_t, - struct gomp_coalesce_buf *, bool); + struct gomp_coalesce_buf *, bool, bool); extern void gomp_detach_pointer (struct gomp_device_descr *, struct goacc_asyncqueue *, splay_tree_key, uintptr_t, bool, struct gomp_coalesce_buf *); diff --git a/libgomp/oacc-mem.c b/libgomp/oacc-mem.c index 718252b..0482ed3 100644 --- a/libgomp/oacc-mem.c +++ b/libgomp/oacc-mem.c @@ -951,7 +951,7 @@ acc_attach_async (void **hostaddr, int async) } gomp_attach_pointer (acc_dev, aq, &acc_dev->mem_map, n, (uintptr_t) hostaddr, - 0, NULL, false); + 0, NULL, false, true); gomp_mutex_unlock (&acc_dev->lock); } @@ -1158,7 +1158,7 @@ goacc_enter_data_internal (struct gomp_device_descr *acc_dev, size_t mapnum, if ((kinds[i] & 0xff) == GOMP_MAP_ATTACH) { gomp_attach_pointer (acc_dev, aq, &acc_dev->mem_map, n, - (uintptr_t) h, s, NULL, false); + (uintptr_t) h, s, NULL, false, true); /* OpenACC 'attach'/'detach' doesn't affect structured/dynamic reference counts ('n->refcount', 'n->dynamic_refcount'). */ } @@ -1176,7 +1176,7 @@ goacc_enter_data_internal (struct gomp_device_descr *acc_dev, size_t mapnum, = lookup_host (acc_dev, hostaddrs[j], sizeof (void *)); gomp_attach_pointer (acc_dev, aq, &acc_dev->mem_map, m, (uintptr_t) hostaddrs[j], sizes[j], NULL, - false); + false, true); } bool processed = false; diff --git a/libgomp/target.c b/libgomp/target.c index a64ee96..9674ff4 100644 --- a/libgomp/target.c +++ b/libgomp/target.c @@ -800,12 +800,22 @@ gomp_map_fields_existing (struct target_mem_desc *tgt, (void *) cur_node.host_end); } -attribute_hidden void +/* Update the devptr by setting it to the device address of the host pointee + 'attach_to'; devptr is obtained from the splay_tree_key n. + When the pointer is already attached or the host pointee is either + NULL or in memory map, this function returns true. + Otherwise, the device pointer is set to point to the host pointee and: + - If allow_zero_length_array_sections is set, true is returned. + - Else, if fail_if_not_found is set, a fatal error is issued. + - Otherwise, false is returned. */ + +attribute_hidden bool gomp_attach_pointer (struct gomp_device_descr *devicep, struct goacc_asyncqueue *aq, splay_tree mem_map, splay_tree_key n, uintptr_t attach_to, size_t bias, struct gomp_coalesce_buf *cbufp, - bool allow_zero_length_array_sections) + bool allow_zero_length_array_sections, + bool fail_if_not_found) { struct splay_tree_key_s s; size_t size, idx; @@ -860,7 +870,7 @@ gomp_attach_pointer (struct gomp_device_descr *devicep, gomp_copy_host2dev (devicep, aq, (void *) devptr, (void *) &data, sizeof (void *), true, cbufp); - return; + return true; } s.host_start = target + bias; @@ -869,15 +879,16 @@ gomp_attach_pointer (struct gomp_device_descr *devicep, if (!tn) { - if (allow_zero_length_array_sections) - /* When allowing attachment to zero-length array sections, we - copy the host pointer when the target region is not mapped. */ - data = target; - else + /* We copy the host pointer when the target region is not mapped; + for allow_zero_length_array_sections, that's permitted. + Otherwise, it depends on the context. Return false in that + case, unless fail_if_not_found. */ + if (!allow_zero_length_array_sections && fail_if_not_found) { gomp_mutex_unlock (&devicep->lock); gomp_fatal ("pointer target not mapped for attach"); } + data = target; } else data = tn->tgt->tgt_start + tn->tgt_offset + target - tn->host_start; @@ -889,10 +900,13 @@ gomp_attach_pointer (struct gomp_device_descr *devicep, gomp_copy_host2dev (devicep, aq, (void *) devptr, (void *) &data, sizeof (void *), true, cbufp); + if (!tn && !allow_zero_length_array_sections) + return false; } else gomp_debug (1, "%s: attach count for %p -> %u\n", __FUNCTION__, (void *) attach_to, (int) n->aux->attach_count[idx]); + return true; } attribute_hidden void @@ -1587,9 +1601,37 @@ gomp_map_vars_internal (struct gomp_device_descr *devicep, bool zlas = ((kind & typemask) == GOMP_MAP_ATTACH_ZERO_LENGTH_ARRAY_SECTION); - gomp_attach_pointer (devicep, aq, mem_map, n, - (uintptr_t) hostaddrs[i], sizes[i], - cbufp, zlas); + /* For 'target enter data', the map clauses are split; + however, for more complex code with struct and + pointer members, the mapping and the attach can end up + in different sets; or the wrong mapping with the + attach. As there is no way to know whether a size + zero like 'var->ptr[i][:0]' happend in the same + directive or not, the not-attached check is now + fully silenced for 'enter data'. */ + if (openmp_p && (pragma_kind & GOMP_MAP_VARS_ENTER_DATA)) + zlas = true; + if (!gomp_attach_pointer (devicep, aq, mem_map, n, + (uintptr_t) hostaddrs[i], sizes[i], + cbufp, zlas, !openmp_p)) + { + /* Pointee not found; that's an error except for + map(var[:n]) with n == 0; the compiler adds a + runtime condition such that for those the kind is + always GOMP_MAP_ZERO_LEN_ARRAY_SECTION. */ + for (j = i; j > 0; j--) + if (*(void**) hostaddrs[i] == hostaddrs[j-1] - sizes[i] + && sizes[j-1] == 0 + && (GOMP_MAP_ZERO_LEN_ARRAY_SECTION + == (get_kind (short_mapkind, kinds, j-1) + & typemask))) + break; + if (j == 0) + { + gomp_mutex_unlock (&devicep->lock); + gomp_fatal ("pointer target not mapped for attach"); + } + } } else if ((pragma_kind & GOMP_MAP_VARS_OPENACC) != 0) { diff --git a/libgomp/testsuite/libgomp.c++/pr119692-1-4.C b/libgomp/testsuite/libgomp.c++/pr119692-1-4.C index 6995f26..af9fe1c 100644 --- a/libgomp/testsuite/libgomp.c++/pr119692-1-4.C +++ b/libgomp/testsuite/libgomp.c++/pr119692-1-4.C @@ -3,6 +3,9 @@ /* { dg-additional-options -DDEFAULT=defaultmap(firstprivate) } Wrong code for offloading execution. { dg-xfail-run-if PR119692 { offload_device } } */ +/* There are configurations where we 'WARNING: program timed out.' while in + 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. + { dg-timeout 10 } ... to make sure that happens quickly. */ /* { dg-additional-options -fdump-tree-gimple } */ #include "pr119692-1-1.C" diff --git a/libgomp/testsuite/libgomp.c++/pr119692-1-5.C b/libgomp/testsuite/libgomp.c++/pr119692-1-5.C index 02121b6..e5c6e07 100644 --- a/libgomp/testsuite/libgomp.c++/pr119692-1-5.C +++ b/libgomp/testsuite/libgomp.c++/pr119692-1-5.C @@ -3,6 +3,9 @@ /* { dg-additional-options -DDEFAULT=defaultmap(to) } Wrong code for offloading execution. { dg-xfail-run-if PR119692 { offload_device } } */ +/* There are configurations where we 'WARNING: program timed out.' while in + 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. + { dg-timeout 10 } ... to make sure that happens quickly. */ /* { dg-additional-options -fdump-tree-gimple } */ #include "pr119692-1-1.C" diff --git a/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C b/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C index 3848295..a862652 100644 --- a/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C +++ b/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C @@ -23,3 +23,6 @@ PR119692. { dg-shouldfail {'std::bad_cast' exception} } */ +/* There are configurations where we 'WARNING: program timed out.' while in + 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. + { dg-timeout 10 } ... to make sure that happens quickly. */ diff --git a/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C b/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C index 8861740..ff15c9f 100644 --- a/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C +++ b/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C @@ -22,3 +22,6 @@ For GCN, nvptx offload execution, there is no 'catch'ing; any exception is fatal. { dg-shouldfail {'MyException' exception} { offload_device } } */ +/* There are configurations where we 'WARNING: program timed out.' while in + 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. + { dg-timeout 10 } ... to make sure that happens quickly. */ diff --git a/libgomp/testsuite/libgomp.c/declare-variant-3-sm61.c b/libgomp/testsuite/libgomp.c/declare-variant-3-sm61.c new file mode 100644 index 0000000..e6941d3 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/declare-variant-3-sm61.c @@ -0,0 +1,8 @@ +/* { dg-do link { target { offload_target_nvptx } } } */ +/* { dg-additional-options -foffload=nvptx-none } */ +/* { dg-additional-options "-foffload=-misa=sm_61 -foffload=-mptx=_" } */ +/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */ + +#include "declare-variant-3.h" + +/* { dg-final { only_for_offload_target nvptx-none scan-offload-tree-dump "= f61 \\(\\);" "optimized" } } */ diff --git a/libgomp/testsuite/libgomp.c/declare-variant-3.h b/libgomp/testsuite/libgomp.c/declare-variant-3.h index c9c8f4a..f5695a2 100644 --- a/libgomp/testsuite/libgomp.c/declare-variant-3.h +++ b/libgomp/testsuite/libgomp.c/declare-variant-3.h @@ -37,6 +37,13 @@ f53 (void) __attribute__ ((noipa)) int +f61 (void) +{ + return 61; +} + +__attribute__ ((noipa)) +int f70 (void) { return 70; @@ -68,6 +75,7 @@ f89 (void) #pragma omp declare variant (f37) match (device={isa("sm_37")}) #pragma omp declare variant (f52) match (device={isa("sm_52")}) #pragma omp declare variant (f53) match (device={isa("sm_53")}) +#pragma omp declare variant (f61) match (device={isa("sm_61")}) #pragma omp declare variant (f70) match (device={isa("sm_70")}) #pragma omp declare variant (f75) match (device={isa("sm_75")}) #pragma omp declare variant (f80) match (device={isa("sm_80")}) diff --git a/libgomp/testsuite/libgomp.c/target-map-zero-sized-2.c b/libgomp/testsuite/libgomp.c/target-map-zero-sized-2.c new file mode 100644 index 0000000..3220828 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/target-map-zero-sized-2.c @@ -0,0 +1,74 @@ +int +main () +{ + int i, n; + int data[] = {1,2}; + struct S { int **ptrset; }; + +// ----------------------------------- + +/* The produced mapping for sptr1->ptrset[i][:n] + + GOMP_MAP_STRUCT (size = 1) + GOMP_MAP_ZERO_LEN_ARRAY_SECTION + GOMP_MAP_ZERO_LEN_ARRAY_SECTION + GOMP_MAP_ATTACH + GOMP_MAP_ATTACH -> attaching to 2nd GOMP_MAP_ZERO_LEN_ARRAY_SECTION + +which get split into 3 separate map_vars call; in particular, +the latter is separate and points to an unmpapped variable. + +Thus, it failed with: + libgomp: pointer target not mapped for attach */ + + struct S s1, *sptr1; + s1.ptrset = (int **) __builtin_malloc (sizeof(void*) * 3); + s1.ptrset[0] = data; + s1.ptrset[1] = data; + s1.ptrset[2] = data; + sptr1 = &s1; + + i = 1; + n = 0; + #pragma omp target enter data map(sptr1[:1], sptr1->ptrset[:3]) + #pragma omp target enter data map(sptr1->ptrset[i][:n]) + + #pragma omp target exit data map(sptr1->ptrset[i][:n]) + #pragma omp target exit data map(sptr1[:1], sptr1->ptrset[:3]) + + __builtin_free (s1.ptrset); + +// ----------------------------------- + +/* The produced mapping for sptr2->ptrset[i][:n] is similar: + + GOMP_MAP_STRUCT (size = 1) + GOMP_MAP_ZERO_LEN_ARRAY_SECTION + GOMP_MAP_TO ! this one has now a finite size + GOMP_MAP_ATTACH + GOMP_MAP_ATTACH -> attach to the GOMP_MAP_TO + +As the latter GOMP_MAP_ATTACH has now a pointer target, +the attachment worked. */ + + struct S s2, *sptr2; + s2.ptrset = (int **) __builtin_malloc (sizeof(void*) * 3); + s2.ptrset[0] = data; + s2.ptrset[1] = data; + s2.ptrset[2] = data; + sptr2 = &s2; + + i = 1; + n = 2; + #pragma omp target enter data map(sptr2[:1], sptr2->ptrset[:3]) + #pragma omp target enter data map(sptr2->ptrset[i][:n]) + + #pragma omp target + if (sptr2->ptrset[1][0] != 1 || sptr2->ptrset[1][1] != 2) + __builtin_abort (); + + #pragma omp target exit data map(sptr2->ptrset[i][:n]) + #pragma omp target exit data map(sptr2[:1], sptr2->ptrset[:3]) + + __builtin_free (s2.ptrset); +} diff --git a/libgomp/testsuite/libgomp.c/target-map-zero-sized-3.c b/libgomp/testsuite/libgomp.c/target-map-zero-sized-3.c new file mode 100644 index 0000000..f968bd3 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/target-map-zero-sized-3.c @@ -0,0 +1,49 @@ +int +main () +{ + int i, n, n2; + int data[] = {1,2}; + struct S { + int **ptrset; + int **ptrset2; + }; + + /* This is the same as target-map-zero-sized-3.c, but by mixing + mapped and non-mapped items, the mapping before the ATTACH + might (or here: is) not actually associated with the the + pointer used for attaching. Thus, if one does a simple + + if (openmp_p + && (pragma_kind & GOMP_MAP_VARS_ENTER_DATA) + && mapnum == 1) + check in target.c's gomp_map_vars_internal will fail + as mapnum > 1 but still the map associated with this + ATTACH is in a different set. */ + + struct S s1, *sptr1; + s1.ptrset = (int **) __builtin_malloc (sizeof(void*) * 3); + s1.ptrset2 = (int **) __builtin_malloc (sizeof(void*) * 3); + s1.ptrset[0] = data; + s1.ptrset[1] = data; + s1.ptrset[2] = data; + s1.ptrset2[0] = data; + s1.ptrset2[1] = data; + s1.ptrset2[2] = data; + sptr1 = &s1; + + i = 1; + n = 0; + n2 = 2; + #pragma omp target enter data map(sptr1[:1], sptr1->ptrset[:3], sptr1->ptrset2[:3]) + #pragma omp target enter data map(sptr1->ptrset[i][:n], sptr1->ptrset2[i][:n]) + + #pragma omp target + if (sptr1->ptrset2[1][0] != 1 || sptr1->ptrset2[1][1] != 2) + __builtin_abort (); + + #pragma omp target exit data map(sptr1->ptrset[i][:n], sptr1->ptrset2[i][:n]) + #pragma omp target exit data map(sptr1[:1], sptr1->ptrset[:3], sptr1->ptrset2[:3]) + + __builtin_free (s1.ptrset); + __builtin_free (s1.ptrset2); +} diff --git a/libgomp/testsuite/libgomp.c/target-map-zero-sized.c b/libgomp/testsuite/libgomp.c/target-map-zero-sized.c new file mode 100644 index 0000000..7c4ab80 --- /dev/null +++ b/libgomp/testsuite/libgomp.c/target-map-zero-sized.c @@ -0,0 +1,107 @@ +/* { dg-do run } */ +/* { dg-additional-options "-O0" } */ + +/* Issue showed up in the real world when large data was distributed + over multiple MPI progresses - such that for one process n == 0 + happend at run time. + + Before map(var[:0]) and map(var[:n]) with n > 0 was handled, + this patch now also handles map(var[:n]) with n == 0. + + Failed before with "libgomp: pointer target not mapped for attach". */ + +/* Here, the base address is shifted - which should have no effect, + but must work as well. */ +void +with_offset () +{ + struct S { + int *ptr1, *ptr2; + }; + struct S s1, s2; + int *a, *b, *c, *d; + s1.ptr1 = (int *) 0L; + s1.ptr2 = (int *) 0xdeedbeef; + s2.ptr1 = (int *) 0L; + s2.ptr2 = (int *) 0xdeedbeef; + a = (int *) 0L; + b = (int *) 0xdeedbeef; + c = (int *) 0L; + d = (int *) 0xdeedbeef; + + int n1, n2, n3, n4; + n1 = n2 = n3 = n4 = 0; + + #pragma omp target enter data map(s1.ptr1[4:n1], s1.ptr2[6:n2], a[3:n3], b[2:n4]) + + #pragma omp target map(s2.ptr1[4:n1], s2.ptr2[2:n2], c[6:n3], d[9:n4]) + { + if (s2.ptr1 != (void *) 0L || s2.ptr2 != (void *) 0xdeedbeef + || c != (void *) 0L || d != (void *) 0xdeedbeef) + __builtin_abort (); + } + + #pragma omp target map(s1.ptr1[4:n1], s1.ptr2[6:n2], a[3:n3], b[2:n4]) + { + if (s1.ptr1 != (void *) 0L || s1.ptr2 != (void *) 0xdeedbeef + || a != (void *) 0L || b != (void *) 0xdeedbeef) + __builtin_abort (); + } + + #pragma omp target + { + if (s1.ptr1 != (void *) 0L || s1.ptr2 != (void *) 0xdeedbeef + || a != (void *) 0L || b != (void *) 0xdeedbeef) + __builtin_abort (); + } + + #pragma omp target exit data map(s1.ptr1[4:n1], s1.ptr2[6:n2], a[3:n3], b[2:n4]) +} + +int +main () +{ + struct S { + int *ptr1, *ptr2; + }; + struct S s1, s2; + int *a, *b, *c, *d; + s1.ptr1 = (int *) 0L; + s1.ptr2 = (int *) 0xdeedbeef; + s2.ptr1 = (int *) 0L; + s2.ptr2 = (int *) 0xdeedbeef; + a = (int *) 0L; + b = (int *) 0xdeedbeef; + c = (int *) 0L; + d = (int *) 0xdeedbeef; + + int n1, n2, n3, n4; + n1 = n2 = n3 = n4 = 0; + + #pragma omp target enter data map(s1.ptr1[:n1], s1.ptr2[:n2], a[:n3], b[:n4]) + + #pragma omp target map(s2.ptr1[:n1], s2.ptr2[:n2], c[:n3], d[:n4]) + { + if (s2.ptr1 != (void *) 0L || s2.ptr2 != (void *) 0xdeedbeef + || c != (void *) 0L || d != (void *) 0xdeedbeef) + __builtin_abort (); + } + + #pragma omp target map(s1.ptr1[:n1], s1.ptr2[:n2], a[:n3], b[:n4]) + { + if (s1.ptr1 != (void *) 0L || s1.ptr2 != (void *) 0xdeedbeef + || a != (void *) 0L || b != (void *) 0xdeedbeef) + __builtin_abort (); + } + + #pragma omp target + { + if (s1.ptr1 != (void *) 0L || s1.ptr2 != (void *) 0xdeedbeef + || a != (void *) 0L || b != (void *) 0xdeedbeef) + __builtin_abort (); + } + + #pragma omp target exit data map(s1.ptr1[:n1], s1.ptr2[:n2], a[:n3], b[:n4]) + + with_offset (); +} diff --git a/libgomp/testsuite/libgomp.fortran/alloc-comp-4.f90 b/libgomp/testsuite/libgomp.fortran/alloc-comp-4.f90 new file mode 100644 index 0000000..d5e982b --- /dev/null +++ b/libgomp/testsuite/libgomp.fortran/alloc-comp-4.f90 @@ -0,0 +1,75 @@ +! +! Check that mapping with map(var%tiles(1)) works. +! +! This uses deep mapping to handle the allocatable +! derived-type components +! +! The tricky part is that GCC generates intermittently +! an SSA_NAME that needs to be resolved. +! +module m +type t + integer, allocatable :: den1(:,:), den2(:,:) +end type t + +type t2 + type(t), allocatable :: tiles(:) +end type t2 +end + +use m +use iso_c_binding +implicit none (type, external) +type(t2), target :: var +logical :: is_self_map +type(C_ptr) :: pden1, pden2, ptiles, ptiles1 + +allocate(var%tiles(1)) +var%tiles(1)%den1 = reshape([1,2,3,4],[2,2]) +var%tiles(1)%den2 = reshape([11,22,33,44],[2,2]) + +ptiles = c_loc(var%tiles) +ptiles1 = c_loc(var%tiles(1)) +pden1 = c_loc(var%tiles(1)%den1) +pden2 = c_loc(var%tiles(1)%den2) + + +is_self_map = .false. +!$omp target map(to: is_self_map) + is_self_map = .true. +!$omp end target + +!$omp target enter data map(var%tiles(1)) + +!$omp target firstprivate(ptiles, ptiles1, pden1, pden2) + if (any (var%tiles(1)%den1 /= reshape([1,2,3,4],[2,2]))) stop 1 + if (any (var%tiles(1)%den2 /= reshape([11,22,33,44],[2,2]))) stop 2 + var%tiles(1)%den1 = var%tiles(1)%den1 + 5 + var%tiles(1)%den2 = var%tiles(1)%den2 + 7 + + if (is_self_map) then + if (.not. c_associated (ptiles, c_loc(var%tiles))) stop 3 + if (.not. c_associated (ptiles1, c_loc(var%tiles(1)))) stop 4 + if (.not. c_associated (pden1, c_loc(var%tiles(1)%den1))) stop 5 + if (.not. c_associated (pden2, c_loc(var%tiles(1)%den2))) stop 6 + else + if (c_associated (ptiles, c_loc(var%tiles))) stop 3 + if (c_associated (ptiles1, c_loc(var%tiles(1)))) stop 4 + if (c_associated (pden1, c_loc(var%tiles(1)%den1))) stop 5 + if (c_associated (pden2, c_loc(var%tiles(1)%den2))) stop 6 + endif +!$omp end target + +if (is_self_map) then + if (any (var%tiles(1)%den1 /= 5 + reshape([1,2,3,4],[2,2]))) stop 7 + if (any (var%tiles(1)%den2 /= 7 + reshape([11,22,33,44],[2,2]))) stop 8 +else + if (any (var%tiles(1)%den1 /= reshape([1,2,3,4],[2,2]))) stop 7 + if (any (var%tiles(1)%den2 /= reshape([11,22,33,44],[2,2]))) stop 8 +endif + +!$omp target exit data map(var%tiles(1)) + +if (any (var%tiles(1)%den1 /= 5 + reshape([1,2,3,4],[2,2]))) stop 7 +if (any (var%tiles(1)%den2 /= 7 + reshape([11,22,33,44],[2,2]))) stop 8 +end diff --git a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C index 0545601..6957a6c 100644 --- a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C +++ b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C @@ -52,3 +52,6 @@ int main() PR119692. { dg-shouldfail {'std::bad_cast' exception} } */ +/* There are configurations where we 'WARNING: program timed out.' while in + 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. + { dg-timeout 10 } ... to make sure that happens quickly. */ diff --git a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C index 24399ef..0f84cf2 100644 --- a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C +++ b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C @@ -58,3 +58,6 @@ int main() For GCN, nvptx offload execution, there is no 'catch'ing; any exception is fatal. { dg-shouldfail {'std::bad_cast' exception} { ! openacc_host_selected } } */ +/* There are configurations where we 'WARNING: program timed out.' while in + 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. + { dg-timeout 10 } ... to make sure that happens quickly. */ diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 81c247a..2ae5626 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2025-05-13 Andreas Schwab <schwab@suse.de> + + * regex.c (regex_compile): Don't write beyond array bounds when + collecting range expression. + 2025-03-29 Iain Sandoe <iain@sandoe.co.uk> PR cobol/119283 diff --git a/libiberty/regex.c b/libiberty/regex.c index bc36f43..8337dea 100644 --- a/libiberty/regex.c +++ b/libiberty/regex.c @@ -3468,7 +3468,7 @@ PREFIX(regex_compile) (const char *ARG_PREFIX(pattern), PATFETCH (c); if ((c == '.' && *p == ']') || p == pend) break; - if (c1 < sizeof (str)) + if (c1 < sizeof (str) - 1) str[c1++] = c; else /* This is in any case an invalid class name. */ diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 94d4d02..464bd45 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,182 @@ +2025-05-14 Tomasz Kamiński <tkaminsk@redhat.com> + + PR libstdc++/119125 + * include/bits/move_only_function.h: Move to... + * include/bits/funcwrap.h: ...here. + * doc/doxygen/stdheader.cc (init_map): Replaced move_only_function.h + with funcwrap.h, and changed include guard to use feature test macro. + Move bits/version.h include before others. + * include/Makefile.am: Likewise. + * include/Makefile.in: Likewise. + * include/std/functional: Likewise. + +2025-05-14 Tomasz Kamiński <tkaminsk@redhat.com> + + PR libstdc++/119125 + * doc/doxygen/stdheader.cc: Addded cpyfunc_impl.h header. + * include/Makefile.am: Add bits cpyfunc_impl.h. + * include/Makefile.in: Add bits cpyfunc_impl.h. + * include/bits/cpyfunc_impl.h: New file. + * include/bits/mofunc_impl.h: Mention LWG 4255. + * include/bits/move_only_function.h: Update header description + and change guard to also check __glibcxx_copyable_function. + (_Manager::_Func): Remove noexcept. + (std::__is_polymorphic_function_v<move_only_function<_Tp>>) + (__variant::_Never_valueless_alt<std::move_only_function<_Signature...>>) + (move_only_function) [__glibcxx_move_only_function]: Adjust guard. + (std::__is_polymorphic_function_v<copyable_function<_Tp>>) + (__variant::_Never_valueless_alt<std::copyable_function<_Signature...>>) + (__polyfunc::_Cpy_base, std::copyable_function) + [__glibcxx_copyable_function]: Define. + * include/bits/version.def: Define copyable_function. + * include/bits/version.h: Regenerate. + * include/std/functional: Define __cpp_lib_copyable_function. + * src/c++23/std.cc.in (copyable_function) + [__cpp_lib_copyable_function]: Export. + * testsuite/20_util/copyable_function/call.cc: New test based on + move_only_function tests. + * testsuite/20_util/copyable_function/cons.cc: New test based on + move_only_function tests. + * testsuite/20_util/copyable_function/conv.cc: New test based on + move_only_function tests. + * testsuite/20_util/copyable_function/copy.cc: New test. + * testsuite/20_util/copyable_function/move.cc: New test based on + move_only_function tests. + +2025-05-14 Tomasz Kamiński <tkaminsk@redhat.com> + + PR libstdc++/119125 + * include/bits/mofunc_impl.h: (std::move_only_function): Adjusted for + changes in bits/move_only_function.h + (move_only_function::move_only_function(_Fn&&)): Special case + move_only_functions with same invoker. + (move_only_function::operator=(move_only_function&&)): Handle self + assigment. + * include/bits/move_only_function.h (__polyfunc::_Ptrs) + (__polyfunc::_Storage): Refactored from _Mo_func::_Storage. + (__polyfunc::__param_t): Moved from move_only_function::__param_t. + (__polyfunc::_Base_invoker, __polyfunc::_Invoke): Refactored from + move_only_function::_S_invoke. + (__polyfunc::_Manager): Refactored from _Mo_func::_S_manager. + (std::_Mofunc_base): Moved into __polyfunc::_Mo_base with parts + extracted to __polyfunc::_Storage and __polyfunc::_Manager. + (__polyfunc::__deref_as, __polyfunc::__invoker_of) + (__polyfunc::__base_of, __polyfunc::__is_invoker_convertible): Define. + (std::__is_move_only_function_v): Renamed to + __is_polymorphic_function_v. + (std::__is_polymorphic_function_v): Renamed from + __is_move_only_function_v. + * testsuite/20_util/move_only_function/call.cc: Test for + functions pointers. + * testsuite/20_util/move_only_function/conv.cc: New test. + * testsuite/20_util/move_only_function/move.cc: Tests for + self assigment. + +2025-05-14 Tomasz Kamiński <tkaminsk@redhat.com> + + PR libstdc++/119246 + * include/std/format (__format::__bflt16_t): Define. + (_GLIBCXX_FORMAT_F128): Separate value for cases where _Float128 + is used. + (__format::__float128_t): Renamed to __format::__flt128_t. + (std::formatter<_Float128, _CharT>): Define always if there is + formattable 128bit float. + (std::formatter<__float128, _CharT>): Define. + (_Arg_type::_Arg_f128): Rename to _Arg_float128 and adjust value. + (_Arg_type::_Arg_ibm128): Change value to _Arg_ldbl. + (_Arg_type::_Arg_ieee128): Define as alias to _Arg_float128. + (_Arg_value::_M_f128): Replaced with _M_ieee128 and _M_float128. + (_Arg_value::_M_ieee128, _Arg_value::_M_float128) + (_Arg_value::_M_bf16, _Arg_value::_M_f16, _Arg_value::_M_f32) + (_Arg_value::_M_f64): Define. + (_Arg_value::_S_get, basic_format_arg::_S_to_enum): Handle __bflt16, + _Float16, _Float32, _Float64, and __float128 types. + (basic_format_arg::_S_to_arg_type): Preserve _bflt16, _Float16, + _Float32, _Float64 and __float128 types. + (basic_format_arg::_M_visit): Handle _Arg_float128, _Arg_ieee128, + _Arg_b16, _Arg_f16, _Arg_f32, _Arg_f64. + * testsuite/std/format/arguments/args.cc: Updated to illustrate + that extended floating point types use handles now. Added test + for __float128. + * testsuite/std/format/parse_ctx.cc: Extended test to cover class + to check_dynamic_spec with floating point types and handles. + +2025-05-14 Ville Voutilainen <ville.voutilainen@gmail.com> + + * include/std/utility (to_underlying): Add the __always_inline__ attribute. + +2025-05-12 Thomas Schwinge <tschwinge@baylibre.com> + + PR target/119645 + * configure.host [GCN, nvptx] (atomicity_dir): Don't set. + +2025-05-12 Patrick Palka <ppalka@redhat.com> + + PR libstdc++/119714 + PR libstdc++/112490 + * include/std/expected (expected::operator==): Replace + non-dependent std::expected function parameter with a dependent + one of type expected<_Vp, _Er> where _Vp matches _Tp. + * testsuite/20_util/expected/119714.cc: New test. + +2025-05-12 Jonathan Wakely <jwakely@redhat.com> + + PR libstdc++/120187 + * include/c_global/ciso646: Only give deprecated warning for + C++20 and later. + * include/c_global/ccomplex: Add @since to Doxygen comment. + * include/c_global/cstdalign: Likewise. + * include/c_global/cstdbool: Likewise. + * include/c_global/ctgmath: Likewise. + * testsuite/18_support/headers/ciso646/macros.cc: Remove + dg-warning for c++17_only effective target. + * testsuite/18_support/headers/ciso646/macros-2.cc: New test. + +2025-05-12 Jonathan Wakely <jwakely@redhat.com> + + * doc/xml/manual/status_cxx2023.xml: Update status of proposals + implemented after GCC 14.2 release. + * doc/html/manual/status.html: Regenerate. + +2025-05-12 Jonathan Wakely <jwakely@redhat.com> + + PR libstdc++/120198 + * include/bits/version.def (scoped_lock): Do not depend on + gthreads or hosted. + * include/bits/version.h: Regenerate. + * include/std/mutex (scoped_lock): Update comment. + * testsuite/30_threads/scoped_lock/requirements/typedefs.cc: + Remove dg-require-gthreads and use custom lockable type instead + of std::mutex. Check that typedef is only present for a single + template argument. + +2025-05-12 Thomas Schwinge <tschwinge@baylibre.com> + + PR libstdc++/70560 + PR libstdc++/119667 + * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Use '__SIZE_TYPE__' + instead of 'size_t'. + * configure: Regenerate. + +2025-05-12 Jonathan Wakely <jwakely@redhat.com> + + PR libstdc++/118260 + * python/hook.in: Suppress output from gdb.execute calls to + register skips. + +2025-05-12 Jonathan Wakely <jwakely@redhat.com> + + * doc/xml/manual/status_cxx2017.xml: Update status for + std::to_chars and std::from_chars. + * doc/html/manual/*: Regenerate. + +2025-05-12 Jonathan Wakely <jwakely@redhat.com> + + PR libstdc++/65909 + * testsuite/lib/libstdc++.exp (check_v3_target_namedlocale): + Hardcode the locale name instead of passing it to the + executable. Do not hardcode buffer size for string. + 2025-05-10 Alexandre Oliva <oliva@adacore.com> * src/c++23/print.cc [__VXWORKS__]: Include ioLib.h. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 204bed5b..d1ecb1a 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -5304,7 +5304,7 @@ AC_DEFUN([GLIBCXX_ENABLE_BACKTRACE], [ [AC_TRY_LINK([], [ int i = 0; int* p = &i; - size_t s = 0; + __SIZE_TYPE__ s = 0; // backtrace_atomic_load_pointer void* vp = __atomic_load_n(&p, __ATOMIC_ACQUIRE); // backtrace_atomic_load_int @@ -5331,7 +5331,7 @@ int main() { int i = 0; int* p = &i; - size_t s = 0; + __SIZE_TYPE__ s = 0; // backtrace_atomic_load_pointer void* vp = __atomic_load_n(&p, __ATOMIC_ACQUIRE); // backtrace_atomic_load_int diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 0529ff5..d6891e5 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -53568,7 +53568,7 @@ main () int i = 0; int* p = &i; - size_t s = 0; + __SIZE_TYPE__ s = 0; // backtrace_atomic_load_pointer void* vp = __atomic_load_n(&p, __ATOMIC_ACQUIRE); // backtrace_atomic_load_int @@ -53607,7 +53607,7 @@ int main() { int i = 0; int* p = &i; - size_t s = 0; + __SIZE_TYPE__ s = 0; // backtrace_atomic_load_pointer void* vp = __atomic_load_n(&p, __ATOMIC_ACQUIRE); // backtrace_atomic_load_int diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host index 3cd1bb1..87a1822 100644 --- a/libstdc++-v3/configure.host +++ b/libstdc++-v3/configure.host @@ -370,21 +370,10 @@ case "${host}" in ;; esac ;; - amdgcn-*-amdhsa) - # To avoid greater pain elsewhere, force use of '__atomic' builtins, - # regardless of the outcome of 'configure' checks; see PR119645 - # "GCN, nvptx: libstdc++ 'checking for atomic builtins [...]... no'". - atomicity_dir=cpu/generic/atomicity_builtins - ;; arm*-*-freebsd*) port_specific_symbol_files="\$(srcdir)/../config/os/gnu-linux/arm-eabi-extra.ver" ;; nvptx-*-none) - # To avoid greater pain elsewhere, force use of '__atomic' builtins, - # regardless of the outcome of 'configure' checks; see PR119645 - # "GCN, nvptx: libstdc++ 'checking for atomic builtins [...]... no'". - atomicity_dir=cpu/generic/atomicity_builtins - # For 'make all-target-libstdc++-v3', re 'alloca'/VLA usage: EXTRA_CFLAGS="${EXTRA_CFLAGS} -mfake-ptx-alloca" OPTIMIZE_CXXFLAGS="${OPTIMIZE_CXXFLAGS} -mfake-ptx-alloca" diff --git a/libstdc++-v3/doc/doxygen/stdheader.cc b/libstdc++-v3/doc/doxygen/stdheader.cc index 3ee825f..839bfc8 100644 --- a/libstdc++-v3/doc/doxygen/stdheader.cc +++ b/libstdc++-v3/doc/doxygen/stdheader.cc @@ -54,7 +54,8 @@ void init_map() headers["function.h"] = "functional"; headers["functional_hash.h"] = "functional"; headers["mofunc_impl.h"] = "functional"; - headers["move_only_function.h"] = "functional"; + headers["cpyfunc_impl.h"] = "functional"; + headers["funcwrap.h"] = "functional"; headers["invoke.h"] = "functional"; headers["ranges_cmp.h"] = "functional"; headers["refwrap.h"] = "functional"; diff --git a/libstdc++-v3/doc/html/index.html b/libstdc++-v3/doc/html/index.html index d465fb6..dd31cff 100644 --- a/libstdc++-v3/doc/html/index.html +++ b/libstdc++-v3/doc/html/index.html @@ -142,7 +142,7 @@ Existing tests </a></span></dt><dt><span class="section"><a href="manual/test.html#test.exception.safety.containers"> C++11 Requirements Test Sequence Descriptions -</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="manual/abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="section"><a href="manual/abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.versioning">Versioning</a></span></dt><dd><dl><dt><span class="section"><a href="manual/abi.html#abi.versioning.goals">Goals</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.versioning.history">History</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.versioning.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.versioning.config">Configuring</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.versioning.active">Checking Active</a></span></dt></dl></dd><dt><span class="section"><a href="manual/abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.impl">Implementation</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.testing">Testing</a></span></dt><dd><dl><dt><span class="section"><a href="manual/abi.html#abi.testing.single">Single ABI Testing</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.testing.multi">Multiple ABI Testing</a></span></dt></dl></dd><dt><span class="section"><a href="manual/abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="section"><a href="manual/api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="section"><a href="manual/api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_440"><code class="constant">4.4</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_450"><code class="constant">4.5</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_460"><code class="constant">4.6</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_470"><code class="constant">4.7</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_480"><code class="constant">4.8</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_490"><code class="constant">4.9</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_51"><code class="constant">5</code></a></span></dt><dd><dl><dt><span class="section"><a href="manual/api.html#api.rel_53"><code class="constant">5.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="manual/api.html#api.rel_61"><code class="constant">6</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_71"><code class="constant">7</code></a></span></dt><dd><dl><dt><span class="section"><a href="manual/api.html#api.rel_72"><code class="constant">7.2</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_73"><code class="constant">7.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="manual/api.html#api.rel_81"><code class="constant">8</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_91"><code class="constant">9</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_101"><code class="constant">10</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_111"><code class="constant">11</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_121"><code class="constant">12</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_123"><code class="constant">12.3</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_131"><code class="constant">13</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_133"><code class="constant">13.3</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_141"><code class="constant">14</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_151"><code class="constant">15</code></a></span></dt></dl></dd><dt><span class="section"><a href="manual/backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="manual/backwards.html#backwards.first">First</a></span></dt><dt><span class="section"><a href="manual/backwards.html#backwards.second">Second</a></span></dt><dt><span class="section"><a href="manual/backwards.html#backwards.third">Third</a></span></dt><dd><dl><dt><span class="section"><a href="manual/backwards.html#backwards.third.headers">Pre-ISO headers removed</a></span></dt><dt><span class="section"><a href="manual/backwards.html#backwards.third.hash">Extension headers hash_map, hash_set moved to ext or backwards</a></span></dt><dt><span class="section"><a href="manual/backwards.html#backwards.third.nocreate_noreplace">No <code class="code">ios::nocreate/ios::noreplace</code>. +</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="manual/abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="section"><a href="manual/abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.versioning">Versioning</a></span></dt><dd><dl><dt><span class="section"><a href="manual/abi.html#abi.versioning.goals">Goals</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.versioning.history">History</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.versioning.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.versioning.config">Configuring</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.versioning.active">Checking Active</a></span></dt></dl></dd><dt><span class="section"><a href="manual/abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.impl">Implementation</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.testing">Testing</a></span></dt><dd><dl><dt><span class="section"><a href="manual/abi.html#abi.testing.single">Single ABI Testing</a></span></dt><dt><span class="section"><a href="manual/abi.html#abi.testing.multi">Multiple ABI Testing</a></span></dt></dl></dd><dt><span class="section"><a href="manual/abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="section"><a href="manual/api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="section"><a href="manual/api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_440"><code class="constant">4.4</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_450"><code class="constant">4.5</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_460"><code class="constant">4.6</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_470"><code class="constant">4.7</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_480"><code class="constant">4.8</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_490"><code class="constant">4.9</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_51"><code class="constant">5</code></a></span></dt><dd><dl><dt><span class="section"><a href="manual/api.html#api.rel_53"><code class="constant">5.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="manual/api.html#api.rel_61"><code class="constant">6</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_71"><code class="constant">7</code></a></span></dt><dd><dl><dt><span class="section"><a href="manual/api.html#api.rel_72"><code class="constant">7.2</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_73"><code class="constant">7.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="manual/api.html#api.rel_81"><code class="constant">8</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_91"><code class="constant">9</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_101"><code class="constant">10</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_111"><code class="constant">11</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_121"><code class="constant">12</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_123"><code class="constant">12.3</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_131"><code class="constant">13</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_133"><code class="constant">13.3</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_141"><code class="constant">14</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_151"><code class="constant">15</code></a></span></dt><dt><span class="section"><a href="manual/api.html#api.rel_16"><code class="constant">16</code></a></span></dt></dl></dd><dt><span class="section"><a href="manual/backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="manual/backwards.html#backwards.first">First</a></span></dt><dt><span class="section"><a href="manual/backwards.html#backwards.second">Second</a></span></dt><dt><span class="section"><a href="manual/backwards.html#backwards.third">Third</a></span></dt><dd><dl><dt><span class="section"><a href="manual/backwards.html#backwards.third.headers">Pre-ISO headers removed</a></span></dt><dt><span class="section"><a href="manual/backwards.html#backwards.third.hash">Extension headers hash_map, hash_set moved to ext or backwards</a></span></dt><dt><span class="section"><a href="manual/backwards.html#backwards.third.nocreate_noreplace">No <code class="code">ios::nocreate/ios::noreplace</code>. </a></span></dt><dt><span class="section"><a href="manual/backwards.html#backwards.third.streamattach"> No <code class="code">stream::attach(int fd)</code> </a></span></dt><dt><span class="section"><a href="manual/backwards.html#backwards.third.support_cxx98"> diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html index 09afdb3..4441d9c 100644 --- a/libstdc++-v3/doc/html/manual/api.html +++ b/libstdc++-v3/doc/html/manual/api.html @@ -490,7 +490,7 @@ to provide the symbols for the experimental C++ Contracts support.</p></div><div Symbols for the Filesystem TS and C++23 <code class="filename"><stacktrace></code> header were added to the static library <code class="filename">libstdc++exp.a</code>. </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_141"></a><code class="constant">14</code></h3></div></div></div><p> -Deprecate the non-standard overload that allows <code class="code">std::setfill</code> +Deprecated the non-standard overload that allows <code class="code">std::setfill</code> to be used with <code class="code">std::basic_istream</code>. </p><p> The extension allowing <code class="code">std::basic_string</code> to be instantiated @@ -509,4 +509,7 @@ and removed in C++20: </p><p> Nested <code class="code">result_type</code> and <code class="code">argument_type</code> removed from <code class="classname">std::hash</code> specializations for C++20. +</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_16"></a><code class="constant">16</code></h3></div></div></div><p> +Deprecated the non-standard overload of <code class="code">std::fabs</code> for +<code class="code">std::complex</code> arguments. </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="abi.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="appendix_porting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="backwards.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ABI Policy and Guidelines </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Backwards Compatibility</td></tr></table></div></body></html>
\ No newline at end of file diff --git a/libstdc++-v3/doc/html/manual/appendix.html b/libstdc++-v3/doc/html/manual/appendix.html index 69a0e00..e71ea54 100644 --- a/libstdc++-v3/doc/html/manual/appendix.html +++ b/libstdc++-v3/doc/html/manual/appendix.html @@ -16,7 +16,7 @@ Existing tests </a></span></dt><dt><span class="section"><a href="test.html#test.exception.safety.containers"> C++11 Requirements Test Sequence Descriptions -</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.versioning.goals">Goals</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.history">History</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.config">Configuring</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.active">Checking Active</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing">Testing</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.testing.single">Single ABI Testing</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing.multi">Multiple ABI Testing</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="section"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_440"><code class="constant">4.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_450"><code class="constant">4.5</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_460"><code class="constant">4.6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_470"><code class="constant">4.7</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_480"><code class="constant">4.8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_490"><code class="constant">4.9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_51"><code class="constant">5</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_53"><code class="constant">5.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_61"><code class="constant">6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_71"><code class="constant">7</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_72"><code class="constant">7.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_73"><code class="constant">7.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_81"><code class="constant">8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_91"><code class="constant">9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_101"><code class="constant">10</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_111"><code class="constant">11</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_121"><code class="constant">12</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_123"><code class="constant">12.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_131"><code class="constant">13</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_133"><code class="constant">13.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_141"><code class="constant">14</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_151"><code class="constant">15</code></a></span></dt></dl></dd><dt><span class="section"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third">Third</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.third.headers">Pre-ISO headers removed</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.hash">Extension headers hash_map, hash_set moved to ext or backwards</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.nocreate_noreplace">No <code class="code">ios::nocreate/ios::noreplace</code>. +</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.versioning.goals">Goals</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.history">History</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.config">Configuring</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.active">Checking Active</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing">Testing</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.testing.single">Single ABI Testing</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing.multi">Multiple ABI Testing</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="section"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_440"><code class="constant">4.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_450"><code class="constant">4.5</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_460"><code class="constant">4.6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_470"><code class="constant">4.7</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_480"><code class="constant">4.8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_490"><code class="constant">4.9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_51"><code class="constant">5</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_53"><code class="constant">5.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_61"><code class="constant">6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_71"><code class="constant">7</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_72"><code class="constant">7.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_73"><code class="constant">7.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_81"><code class="constant">8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_91"><code class="constant">9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_101"><code class="constant">10</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_111"><code class="constant">11</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_121"><code class="constant">12</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_123"><code class="constant">12.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_131"><code class="constant">13</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_133"><code class="constant">13.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_141"><code class="constant">14</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_151"><code class="constant">15</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_16"><code class="constant">16</code></a></span></dt></dl></dd><dt><span class="section"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third">Third</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.third.headers">Pre-ISO headers removed</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.hash">Extension headers hash_map, hash_set moved to ext or backwards</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.nocreate_noreplace">No <code class="code">ios::nocreate/ios::noreplace</code>. </a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.streamattach"> No <code class="code">stream::attach(int fd)</code> </a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.support_cxx98"> diff --git a/libstdc++-v3/doc/html/manual/appendix_porting.html b/libstdc++-v3/doc/html/manual/appendix_porting.html index c76ef29..e0f52db 100644 --- a/libstdc++-v3/doc/html/manual/appendix_porting.html +++ b/libstdc++-v3/doc/html/manual/appendix_porting.html @@ -14,7 +14,7 @@ Existing tests </a></span></dt><dt><span class="section"><a href="test.html#test.exception.safety.containers"> C++11 Requirements Test Sequence Descriptions -</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.versioning.goals">Goals</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.history">History</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.config">Configuring</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.active">Checking Active</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing">Testing</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.testing.single">Single ABI Testing</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing.multi">Multiple ABI Testing</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="section"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_440"><code class="constant">4.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_450"><code class="constant">4.5</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_460"><code class="constant">4.6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_470"><code class="constant">4.7</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_480"><code class="constant">4.8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_490"><code class="constant">4.9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_51"><code class="constant">5</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_53"><code class="constant">5.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_61"><code class="constant">6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_71"><code class="constant">7</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_72"><code class="constant">7.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_73"><code class="constant">7.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_81"><code class="constant">8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_91"><code class="constant">9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_101"><code class="constant">10</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_111"><code class="constant">11</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_121"><code class="constant">12</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_123"><code class="constant">12.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_131"><code class="constant">13</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_133"><code class="constant">13.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_141"><code class="constant">14</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_151"><code class="constant">15</code></a></span></dt></dl></dd><dt><span class="section"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third">Third</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.third.headers">Pre-ISO headers removed</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.hash">Extension headers hash_map, hash_set moved to ext or backwards</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.nocreate_noreplace">No <code class="code">ios::nocreate/ios::noreplace</code>. +</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.versioning.goals">Goals</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.history">History</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.config">Configuring</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.active">Checking Active</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing">Testing</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.testing.single">Single ABI Testing</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing.multi">Multiple ABI Testing</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="section"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_440"><code class="constant">4.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_450"><code class="constant">4.5</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_460"><code class="constant">4.6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_470"><code class="constant">4.7</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_480"><code class="constant">4.8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_490"><code class="constant">4.9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_51"><code class="constant">5</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_53"><code class="constant">5.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_61"><code class="constant">6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_71"><code class="constant">7</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_72"><code class="constant">7.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_73"><code class="constant">7.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_81"><code class="constant">8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_91"><code class="constant">9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_101"><code class="constant">10</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_111"><code class="constant">11</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_121"><code class="constant">12</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_123"><code class="constant">12.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_131"><code class="constant">13</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_133"><code class="constant">13.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_141"><code class="constant">14</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_151"><code class="constant">15</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_16"><code class="constant">16</code></a></span></dt></dl></dd><dt><span class="section"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third">Third</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.third.headers">Pre-ISO headers removed</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.hash">Extension headers hash_map, hash_set moved to ext or backwards</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.nocreate_noreplace">No <code class="code">ios::nocreate/ios::noreplace</code>. </a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.streamattach"> No <code class="code">stream::attach(int fd)</code> </a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.support_cxx98"> diff --git a/libstdc++-v3/doc/html/manual/index.html b/libstdc++-v3/doc/html/manual/index.html index a7af178..5f91092 100644 --- a/libstdc++-v3/doc/html/manual/index.html +++ b/libstdc++-v3/doc/html/manual/index.html @@ -123,7 +123,7 @@ Existing tests </a></span></dt><dt><span class="section"><a href="test.html#test.exception.safety.containers"> C++11 Requirements Test Sequence Descriptions -</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.versioning.goals">Goals</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.history">History</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.config">Configuring</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.active">Checking Active</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing">Testing</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.testing.single">Single ABI Testing</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing.multi">Multiple ABI Testing</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="section"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_440"><code class="constant">4.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_450"><code class="constant">4.5</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_460"><code class="constant">4.6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_470"><code class="constant">4.7</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_480"><code class="constant">4.8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_490"><code class="constant">4.9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_51"><code class="constant">5</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_53"><code class="constant">5.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_61"><code class="constant">6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_71"><code class="constant">7</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_72"><code class="constant">7.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_73"><code class="constant">7.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_81"><code class="constant">8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_91"><code class="constant">9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_101"><code class="constant">10</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_111"><code class="constant">11</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_121"><code class="constant">12</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_123"><code class="constant">12.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_131"><code class="constant">13</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_133"><code class="constant">13.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_141"><code class="constant">14</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_151"><code class="constant">15</code></a></span></dt></dl></dd><dt><span class="section"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third">Third</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.third.headers">Pre-ISO headers removed</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.hash">Extension headers hash_map, hash_set moved to ext or backwards</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.nocreate_noreplace">No <code class="code">ios::nocreate/ios::noreplace</code>. +</a></span></dt></dl></dd></dl></dd></dl></dd><dt><span class="section"><a href="abi.html">ABI Policy and Guidelines</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.cxx_interface">The C++ Interface</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning">Versioning</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.versioning.goals">Goals</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.history">History</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.prereq">Prerequisites</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.config">Configuring</a></span></dt><dt><span class="section"><a href="abi.html#abi.versioning.active">Checking Active</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.changes_allowed">Allowed Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.changes_no">Prohibited Changes</a></span></dt><dt><span class="section"><a href="abi.html#abi.impl">Implementation</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing">Testing</a></span></dt><dd><dl><dt><span class="section"><a href="abi.html#abi.testing.single">Single ABI Testing</a></span></dt><dt><span class="section"><a href="abi.html#abi.testing.multi">Multiple ABI Testing</a></span></dt></dl></dd><dt><span class="section"><a href="abi.html#abi.issues">Outstanding Issues</a></span></dt></dl></dd><dt><span class="section"><a href="api.html">API Evolution and Deprecation History</a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_300"><code class="constant">3.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_310"><code class="constant">3.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_320"><code class="constant">3.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_330"><code class="constant">3.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_340"><code class="constant">3.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_400"><code class="constant">4.0</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_410"><code class="constant">4.1</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_420"><code class="constant">4.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_430"><code class="constant">4.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_440"><code class="constant">4.4</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_450"><code class="constant">4.5</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_460"><code class="constant">4.6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_470"><code class="constant">4.7</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_480"><code class="constant">4.8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_490"><code class="constant">4.9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_51"><code class="constant">5</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_53"><code class="constant">5.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_61"><code class="constant">6</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_71"><code class="constant">7</code></a></span></dt><dd><dl><dt><span class="section"><a href="api.html#api.rel_72"><code class="constant">7.2</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_73"><code class="constant">7.3</code></a></span></dt></dl></dd><dt><span class="section"><a href="api.html#api.rel_81"><code class="constant">8</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_91"><code class="constant">9</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_101"><code class="constant">10</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_111"><code class="constant">11</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_121"><code class="constant">12</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_123"><code class="constant">12.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_131"><code class="constant">13</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_133"><code class="constant">13.3</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_141"><code class="constant">14</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_151"><code class="constant">15</code></a></span></dt><dt><span class="section"><a href="api.html#api.rel_16"><code class="constant">16</code></a></span></dt></dl></dd><dt><span class="section"><a href="backwards.html">Backwards Compatibility</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.first">First</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.second">Second</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third">Third</a></span></dt><dd><dl><dt><span class="section"><a href="backwards.html#backwards.third.headers">Pre-ISO headers removed</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.hash">Extension headers hash_map, hash_set moved to ext or backwards</a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.nocreate_noreplace">No <code class="code">ios::nocreate/ios::noreplace</code>. </a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.streamattach"> No <code class="code">stream::attach(int fd)</code> </a></span></dt><dt><span class="section"><a href="backwards.html#backwards.third.support_cxx98"> diff --git a/libstdc++-v3/doc/html/manual/source_code_style.html b/libstdc++-v3/doc/html/manual/source_code_style.html index b0b2268..a66e3a0 100644 --- a/libstdc++-v3/doc/html/manual/source_code_style.html +++ b/libstdc++-v3/doc/html/manual/source_code_style.html @@ -474,7 +474,7 @@ <br /> Examples: <code class="code">_M_num_elements _M_initialize ()</code><br /> <br /> - Static data members, constants, and enumerations: <code class="literal">_S_.*</code><br /> + Static data and function members, constants, and enumerations: <code class="literal">_S_.*</code><br /> <br /> Examples: <code class="code">_S_max_elements _S_default_value</code><br /> <br /> diff --git a/libstdc++-v3/doc/html/manual/status.html b/libstdc++-v3/doc/html/manual/status.html index 3d55e265..5ca3521 100644 --- a/libstdc++-v3/doc/html/manual/status.html +++ b/libstdc++-v3/doc/html/manual/status.html @@ -927,7 +927,22 @@ since C++14 and the implementation is complete. <span class="emphasis"><em>23</em></span> </td><td colspan="3" align="left"> <span class="emphasis"><em>General utilities</em></span> - </td></tr><tr><td align="left">23.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2</td><td align="left">Utility components</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1</td><td align="left">Header <code class="code"><utility></code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.2</td><td align="left">Operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.3</td><td align="left"><code class="code">swap</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.4</td><td align="left"><code class="code">exchange</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.5</td><td align="left">Forward/move helpers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.6</td><td align="left">Function template <code class="code">as_const</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.7</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.8</td><td align="left">Primitive numeric output conversion</td><td align="left">Partial</td><td align="left"> </td></tr><tr><td align="left">23.2.9</td><td align="left">Primitive numeric input conversion</td><td align="left">Partial</td><td align="left"> </td></tr><tr><td align="left">23.3</td><td align="left">Compile-time integer sequences</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4</td><td align="left">Pairs</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5</td><td align="left">Tuples</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6</td><td align="left">Optional objects</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.7</td><td align="left">Variants</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.8</td><td align="left">Storage for any type</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.9</td><td align="left">Bitsets</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10</td><td align="left">Memory</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.10.2</td><td align="left">Header <code class="code"><memory></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.3</td><td align="left">Pointer traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.4</td><td align="left">Pointer safety</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.5</td><td align="left">Align</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.6</td><td align="left">Allocator argument tag</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.7</td><td align="left"><code class="code">uses_allocator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.8</td><td align="left">Allocator traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.9</td><td align="left">The default allocator</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.10</td><td align="left">Specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.11</td><td align="left">C library memory allocation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.11</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.11.1</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.11.2</td><td align="left">Shared-ownership pointers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12</td><td align="left">Memory resources</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.12.1</td><td align="left">Header <code class="code"><memory_resource></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12.2</td><td align="left">Class <code class="code">memory_resource</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12.3</td><td align="left">Class template <code class="code">polymorphic_allocator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12.4</td><td align="left">Access to program-wide <code class="code">memory_resource</code> objects</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12.5</td><td align="left">Pool resource classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12.6</td><td align="left">Class <code class="code">monotonic_buffer_resource</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.13</td><td align="left">Class template <code class="code">scoped_allocator_adaptor</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14</td><td align="left">Function objects</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.14.1</td><td align="left">Header <code class="code"><functional></code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.14.2</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.14.3</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.14.4</td><td align="left">Function template <code class="code">invoke</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.5</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.6</td><td align="left">Arithmetic operation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.7</td><td align="left">Comparisons</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.8</td><td align="left">Logical operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.9</td><td align="left">Bitwise operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.10</td><td align="left">Function template <code class="code">not_fn</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.11</td><td align="left">Function object binders</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.12</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.13</td><td align="left">Polymorphic function wrappers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.14</td><td align="left">Searchers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.15</td><td align="left">Class template <code class="code">hash</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15</td><td align="left">Metaprogramming and type traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.15.1</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.15.2</td><td align="left">Header <code class="code"><type_traits></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.3</td><td align="left">Helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.4</td><td align="left">Unary Type Traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.5</td><td align="left">Type property queries</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.6</td><td align="left">Relationships between types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.7</td><td align="left">Transformations between types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.8</td><td align="left">Logical operator traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.16</td><td align="left">Compile-time rational arithmetic</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.17.2</td><td align="left">Header <code class="code"><chrono></code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.17</td><td align="left">Time utilities</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.17.3</td><td align="left">Clock requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.4</td><td align="left">Time-related traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.5</td><td align="left">Class template <code class="code">duration</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.6</td><td align="left">Class template <code class="code">time_point</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.7</td><td align="left">Clocks</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.8</td><td align="left">Header <code class="code"><ctime></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.18</td><td align="left">Class <code class="code">type_index</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.19</td><td align="left">Execution policies</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.19.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.19.2</td><td align="left">Header <code class="code"><execution></code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.19.3</td><td align="left">Execution policy type trait</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.19.4</td><td align="left">Sequenced execution policy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.19.5</td><td align="left">Parallel execution policy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.19.6</td><td align="left">Parallel and unsequenced execution policy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.19.7</td><td align="left">Execution policy objects</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left"> + </td></tr><tr><td align="left">23.1</td><td align="left">General</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2</td><td align="left">Utility components</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.1</td><td align="left">Header <code class="code"><utility></code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.2.2</td><td align="left">Operators</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.3</td><td align="left"><code class="code">swap</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.4</td><td align="left"><code class="code">exchange</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.5</td><td align="left">Forward/move helpers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.6</td><td align="left">Function template <code class="code">as_const</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.7</td><td align="left">Function template <code class="code">declval</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.2.8</td><td align="left">Primitive numeric output conversion</td><td align="left">Y</td><td align="left"> + Floating-point types up to 64-bit are formatted using + <a class="link" href="https://github.com/ulfjack/ryu" target="_top">Ryu</a>. + Types with greater precision are formatted using the C library + (<code class="function">sprintf</code> and conditionally + <code class="function">strfromf128</code>). + For powerpc64le-unknown-linux-gnu <code class="function">__sprintfieee128</code> + must be provided by Glibc. + </td></tr><tr><td align="left">23.2.9</td><td align="left">Primitive numeric input conversion</td><td align="left">Y</td><td align="left"> + Floating-point types up to 64-bit are parsed using + <a class="link" href="https://github.com/fastfloat/fast_float" target="_top">fast_float</a>. + Types with greater precision are parsed using the C library + (<code class="function">strtold</code>). + For powerpc64le-unknown-linux-gnu <code class="function">__strtoieee128</code> + must be provided by Glibc. + </td></tr><tr><td align="left">23.3</td><td align="left">Compile-time integer sequences</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.4</td><td align="left">Pairs</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.5</td><td align="left">Tuples</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.6</td><td align="left">Optional objects</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.7</td><td align="left">Variants</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.8</td><td align="left">Storage for any type</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.9</td><td align="left">Bitsets</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10</td><td align="left">Memory</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.10.2</td><td align="left">Header <code class="code"><memory></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.3</td><td align="left">Pointer traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.4</td><td align="left">Pointer safety</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.5</td><td align="left">Align</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.6</td><td align="left">Allocator argument tag</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.7</td><td align="left"><code class="code">uses_allocator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.8</td><td align="left">Allocator traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.9</td><td align="left">The default allocator</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.10</td><td align="left">Specialized algorithms</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.10.11</td><td align="left">C library memory allocation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.11</td><td align="left">Smart pointers</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.11.1</td><td align="left">Class template <code class="code">unique_ptr</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.11.2</td><td align="left">Shared-ownership pointers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12</td><td align="left">Memory resources</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.12.1</td><td align="left">Header <code class="code"><memory_resource></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12.2</td><td align="left">Class <code class="code">memory_resource</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12.3</td><td align="left">Class template <code class="code">polymorphic_allocator</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12.4</td><td align="left">Access to program-wide <code class="code">memory_resource</code> objects</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12.5</td><td align="left">Pool resource classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.12.6</td><td align="left">Class <code class="code">monotonic_buffer_resource</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.13</td><td align="left">Class template <code class="code">scoped_allocator_adaptor</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14</td><td align="left">Function objects</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.14.1</td><td align="left">Header <code class="code"><functional></code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.14.2</td><td align="left">Definitions</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.14.3</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.14.4</td><td align="left">Function template <code class="code">invoke</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.5</td><td align="left">Class template <code class="code">reference_wrapper</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.6</td><td align="left">Arithmetic operation</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.7</td><td align="left">Comparisons</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.8</td><td align="left">Logical operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.9</td><td align="left">Bitwise operations</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.10</td><td align="left">Function template <code class="code">not_fn</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.11</td><td align="left">Function object binders</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.12</td><td align="left">Function template <code class="code">mem_fn</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.13</td><td align="left">Polymorphic function wrappers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.14</td><td align="left">Searchers</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.14.15</td><td align="left">Class template <code class="code">hash</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15</td><td align="left">Metaprogramming and type traits</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.15.1</td><td align="left">Requirements</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.15.2</td><td align="left">Header <code class="code"><type_traits></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.3</td><td align="left">Helper classes</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.4</td><td align="left">Unary Type Traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.5</td><td align="left">Type property queries</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.6</td><td align="left">Relationships between types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.7</td><td align="left">Transformations between types</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.15.8</td><td align="left">Logical operator traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.16</td><td align="left">Compile-time rational arithmetic</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.17.2</td><td align="left">Header <code class="code"><chrono></code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.17</td><td align="left">Time utilities</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.17.3</td><td align="left">Clock requirements</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.4</td><td align="left">Time-related traits</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.5</td><td align="left">Class template <code class="code">duration</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.6</td><td align="left">Class template <code class="code">time_point</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.7</td><td align="left">Clocks</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.17.8</td><td align="left">Header <code class="code"><ctime></code> synopsis</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.18</td><td align="left">Class <code class="code">type_index</code></td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.19</td><td align="left">Execution policies</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.19.1</td><td align="left">In general</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.19.2</td><td align="left">Header <code class="code"><execution></code> synopsis</td><td align="left"> </td><td align="left"> </td></tr><tr><td align="left">23.19.3</td><td align="left">Execution policy type trait</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.19.4</td><td align="left">Sequenced execution policy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.19.5</td><td align="left">Parallel execution policy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.19.6</td><td align="left">Parallel and unsequenced execution policy</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left">23.19.7</td><td align="left">Execution policy objects</td><td align="left">Y</td><td align="left"> </td></tr><tr><td align="left"> <span class="emphasis"><em>24</em></span> </td><td colspan="3" align="left"> <span class="emphasis"><em>Strings</em></span> @@ -1832,13 +1847,15 @@ or any notes about the implementation. <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2278r4.html" target="_top"> P2278R4 </a> - </td><td align="center"> 13.1 </td><td align="left"> <code class="code">__cpp_lib_ranges_as_const >= 202207L</code> </td></tr><tr bgcolor="#B0B0B0"><td align="left"> <code class="code">ranges::to</code> </td><td align="left"> + </td><td align="center"> 13.1 </td><td align="left"> <code class="code">__cpp_lib_ranges_as_const >= 202207L</code> </td></tr><tr><td align="left"> <code class="code">ranges::to</code> </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1206r7.pdf" target="_top"> P1206R7 </a> - </td><td align="center"> 14.1 (<code class="code">ranges::to</code> function) </td><td align="left"> - <code class="code">__cpp_lib_containers_ranges >= 202202L</code>, - <code class="code">__cpp_lib_ranges_to_container >= 202202L</code> + </td><td align="center"> + <div class="informaltable"><table class="informaltable" border="0"><colgroup><col /></colgroup><tbody><tr><td> 14.1 (<code class="code">ranges::to</code> function) </td></tr><tr><td> 15.1 (new members in containers) </td></tr></tbody></table></div> + </td><td align="left"> + <code class="code">__cpp_lib_ranges_to_container >= 202202L</code>, + <code class="code">__cpp_lib_containers_ranges >= 202202L</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> Ranges iterators as inputs to non-Ranges algorithms </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2408r5.html" target="_top"> P2408R5 @@ -1878,11 +1895,11 @@ or any notes about the implementation. <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2322r6.html" target="_top"> P2322R6 </a> - </td><td align="center"> 13.1 </td><td align="left"> <code class="code">__cpp_lib_ranges_fold >= 202207L</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> Relaxing Ranges Just A Smidge</td><td align="left"> + </td><td align="center"> 13.1 </td><td align="left"> <code class="code">__cpp_lib_ranges_fold >= 202207L</code> </td></tr><tr><td align="left"> Relaxing Ranges Just A Smidge</td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2609r3.html" target="_top"> P2609R3 </a> - </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_ranges >= 202302L</code> </td></tr><tr><td colspan="4" align="left"> + </td><td align="center"> 14.3 </td><td align="left"> <code class="code">__cpp_lib_ranges >= 202302L</code> </td></tr><tr><td colspan="4" align="left"> <span class="bold"><strong>Compile-time programming</strong></span> </td></tr><tr><td align="left"> A proposal for a type trait to detect scoped enumerations </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1048r1.pdf" target="_top"> @@ -1912,11 +1929,11 @@ or any notes about the implementation. <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0533r9.pdf" target="_top"> P0533R9 </a> - </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_constexpr_cmath >= 202202L</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> Deprecate std::aligned_storage and std::aligned_union </td><td align="left"> + </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_constexpr_cmath >= 202202L</code> </td></tr><tr><td align="left"> Deprecate std::aligned_storage and std::aligned_union </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1413r3.pdf" target="_top"> P1413R3 </a> - </td><td align="center"> </td><td align="left"> </td></tr><tr><td align="left"> A type trait to detect reference binding to temporary </td><td align="left"> + </td><td align="center"> 13.1 </td><td align="left"> </td></tr><tr><td align="left"> A type trait to detect reference binding to temporary </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2255r2.html" target="_top"> P2255R2 </a> @@ -1958,15 +1975,15 @@ or any notes about the implementation. <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2077r3.html" target="_top"> P2077R3 </a> - </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_associative_heterogeneous_erasure >= 202110L</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> <code class="code"><flat_map></code> </td><td align="left"> + </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_associative_heterogeneous_erasure >= 202110L</code> </td></tr><tr><td align="left"> <code class="code"><flat_map></code> </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0429r9.pdf" target="_top"> P0429R9 </a> - </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_flat_map >= 202207L</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> <code class="code"><flat_set></code> </td><td align="left"> + </td><td align="center"> 15.1 </td><td align="left"> <code class="code">__cpp_lib_flat_map >= 202207L</code> </td></tr><tr><td align="left"> <code class="code"><flat_set></code> </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1222r4.pdf" target="_top"> P1222R4 </a> - </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_flat_set >= 202207L</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> <code class="code">mdspan</code> </td><td align="left"> + </td><td align="center"> 15.1 </td><td align="left"> <code class="code">__cpp_lib_flat_set >= 202207L</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> <code class="code">mdspan</code> </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0009r18.html" target="_top"> P0009R18 </a> @@ -2033,27 +2050,29 @@ or any notes about the implementation. <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2508r1.html" target="_top"> P2508R1 </a> - </td><td align="center"> 13.1 (feature test macro not defined)</td><td align="left"> <code class="code">__cpp_lib_format >= 202207L</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> + </td><td align="center"> 13.1 (feature test macro not updated until 15.1) </td><td align="left"> <code class="code">__cpp_lib_format >= 202207L</code> </td></tr><tr><td align="left"> Clarify handling of encodings in localized formatting of chrono types </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2419r2.html" target="_top"> P2419R2 </a> - </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_format >= 202207L</code> </td></tr><tr><td align="left"> + </td><td align="center"> 15.1 </td><td align="left"> <code class="code">__cpp_lib_format >= 202207L</code> </td></tr><tr><td align="left"> Formatting pointers </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2510r3.pdf" target="_top"> P2510R3 </a> - </td><td align="center"> 13.2 (feature test macro not defined)</td><td align="left"> <code class="code">__cpp_lib_format >= 202207L</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> Formatting Ranges </td><td align="left"> + </td><td align="center"> 13.2 (feature test macro not updated until 15.1) </td><td align="left"> <code class="code">__cpp_lib_format >= 202207L</code> </td></tr><tr><td align="left"> Formatting Ranges </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2286r8.html" target="_top"> P2286R8 </a> - </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_format_ranges >= 202207L</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> Improve default container formatting </td><td align="left"> + </td><td align="center"> + <div class="informaltable"><table class="informaltable" border="0"><colgroup><col /></colgroup><tbody><tr><td> 15.1 (changes to adaptors missing) </td></tr><tr><td> 15.2 (complete) </td></tr></tbody></table></div> + </td><td align="left"> <code class="code">__cpp_lib_format_ranges >= 202207L</code> </td></tr><tr><td align="left"> Improve default container formatting </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2585r1.html" target="_top"> P2585R1 </a> - </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_format_ranges >= 202207L</code> </td></tr><tr><td align="left"> Formatted output </td><td align="left"> + </td><td align="center"> 15.1 (feature test macro not defined until 15.2) </td><td align="left"> <code class="code">__cpp_lib_format_ranges >= 202207L</code> </td></tr><tr><td align="left"> Formatted output </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2093r14.html" target="_top"> P2093R14 </a> @@ -2197,13 +2216,13 @@ or any notes about the implementation. <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2588r3.html" target="_top"> P2588R3 </a> - </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_barrier >= 202302L</code> </td></tr><tr bgcolor="#C8B0B0"><td align="left"> + </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_barrier >= 202302L</code> </td></tr><tr><td align="left"> Standard Library Modules <code class="code">std</code> and <code class="code">std.compat</code> </td><td align="left"> <a class="link" href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2465r3.pdf" target="_top"> P2465R3 </a> - </td><td align="center"> </td><td align="left"> <code class="code">__cpp_lib_modules >= 202207L</code> </td></tr></tbody></table></div></div><br class="table-break" /></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.tr1"></a>C++ TR1</h3></div></div></div><p> + </td><td align="center"> 15.1 </td><td align="left"> <code class="code">__cpp_lib_modules >= 202207L</code> </td></tr></tbody></table></div></div><br class="table-break" /></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="status.iso.tr1"></a>C++ TR1</h3></div></div></div><p> This table is based on the table of contents of ISO/IEC DTR 19768, Doc No: N1836=05-0096, Date: 2005-06-24, "Draft Technical Report on C++ Library Extensions". diff --git a/libstdc++-v3/doc/xml/manual/evolution.xml b/libstdc++-v3/doc/xml/manual/evolution.xml index 814473f..73b9f17 100644 --- a/libstdc++-v3/doc/xml/manual/evolution.xml +++ b/libstdc++-v3/doc/xml/manual/evolution.xml @@ -1117,7 +1117,7 @@ header were added to the static library <filename>libstdc++exp.a</filename>. <section xml:id="api.rel_141"><info><title><constant>14</constant></title></info> <para> -Deprecate the non-standard overload that allows <code>std::setfill</code> +Deprecated the non-standard overload that allows <code>std::setfill</code> to be used with <code>std::basic_istream</code>. </para> @@ -1152,4 +1152,11 @@ Nested <code>result_type</code> and <code>argument_type</code> removed from </section> +<section xml:id="api.rel_16"><info><title><constant>16</constant></title></info> +<para> +Deprecated the non-standard overload of <code>std::fabs</code> for +<code>std::complex</code> arguments. +</para> +</section> + </section> diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2017.xml b/libstdc++-v3/doc/xml/manual/status_cxx2017.xml index 48a0317..c90f91e 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx2017.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx2017.xml @@ -1183,14 +1183,31 @@ since C++14 and the implementation is complete. <row> <entry>23.2.8</entry> <entry>Primitive numeric output conversion</entry> - <entry>Partial</entry> - <entry/> + <entry>Y</entry> + <entry> + Floating-point types up to 64-bit are formatted using + <link xmlns:xlink="http://www.w3.org/1999/xlink" + xlink:href="https://github.com/ulfjack/ryu">Ryu</link>. + Types with greater precision are formatted using the C library + (<function>sprintf</function> and conditionally + <function>strfromf128</function>). + For powerpc64le-unknown-linux-gnu <function>__sprintfieee128</function> + must be provided by Glibc. + </entry> </row> <row> <entry>23.2.9</entry> <entry>Primitive numeric input conversion</entry> - <entry>Partial</entry> - <entry/> + <entry>Y</entry> + <entry> + Floating-point types up to 64-bit are parsed using + <link xmlns:xlink="http://www.w3.org/1999/xlink" + xlink:href="https://github.com/fastfloat/fast_float">fast_float</link>. + Types with greater precision are parsed using the C library + (<function>strtold</function>). + For powerpc64le-unknown-linux-gnu <function>__strtoieee128</function> + must be provided by Glibc. + </entry> </row> <row> <entry>23.3</entry> diff --git a/libstdc++-v3/doc/xml/manual/status_cxx2023.xml b/libstdc++-v3/doc/xml/manual/status_cxx2023.xml index 3c33a35..af40eab 100644 --- a/libstdc++-v3/doc/xml/manual/status_cxx2023.xml +++ b/libstdc++-v3/doc/xml/manual/status_cxx2023.xml @@ -312,17 +312,21 @@ or any notes about the implementation. </row> <row> - <?dbhtml bgcolor="#B0B0B0" ?> <entry> <code>ranges::to</code> </entry> <entry> <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1206r7.pdf"> P1206R7 </link> </entry> - <entry align="center"> 14.1 (<code>ranges::to</code> function) </entry> + <entry align="center"> + <informaltable colsep="0" rowsep="0" rowheader="norowheader" frame="none"><tgroup cols="1"><tbody> + <row><entry> 14.1 (<code>ranges::to</code> function) </entry></row> + <row><entry> 15.1 (new members in containers) </entry></row> + </tbody></tgroup></informaltable> + </entry> <entry> - <code>__cpp_lib_containers_ranges >= 202202L</code>, - <code>__cpp_lib_ranges_to_container >= 202202L</code> + <code>__cpp_lib_ranges_to_container >= 202202L</code>, + <code>__cpp_lib_containers_ranges >= 202202L</code> </entry> </row> @@ -418,14 +422,13 @@ or any notes about the implementation. </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> <entry> Relaxing Ranges Just A Smidge</entry> <entry> <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2609r3.html"> P2609R3 </link> </entry> - <entry align="center"> </entry> + <entry align="center"> 14.3 </entry> <entry> <code>__cpp_lib_ranges >= 202302L</code> </entry> </row> @@ -513,14 +516,13 @@ or any notes about the implementation. </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> <entry> Deprecate std::aligned_storage and std::aligned_union </entry> <entry> <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1413r3.pdf"> P1413R3 </link> </entry> - <entry align="center"> </entry> + <entry align="center"> 13.1 </entry> <entry /> </row> @@ -635,26 +637,24 @@ or any notes about the implementation. </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> <entry> <code><flat_map></code> </entry> <entry> <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0429r9.pdf"> P0429R9 </link> </entry> - <entry align="center"> </entry> + <entry align="center"> 15.1 </entry> <entry> <code>__cpp_lib_flat_map >= 202207L</code> </entry> </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> <entry> <code><flat_set></code> </entry> <entry> <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p1222r4.pdf"> P1222R4 </link> </entry> - <entry align="center"> </entry> + <entry align="center"> 15.1 </entry> <entry> <code>__cpp_lib_flat_set >= 202207L</code> </entry> </row> @@ -823,12 +823,11 @@ or any notes about the implementation. P2508R1 </link> </entry> - <entry align="center"> 13.1 (feature test macro not defined)</entry> + <entry align="center"> 13.1 (feature test macro not updated until 15.1) </entry> <entry> <code>__cpp_lib_format >= 202207L</code> </entry> </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> <entry> Clarify handling of encodings in localized formatting of chrono types </entry> @@ -837,7 +836,7 @@ or any notes about the implementation. P2419R2 </link> </entry> - <entry align="center"> </entry> + <entry align="center"> 15.1 </entry> <entry> <code>__cpp_lib_format >= 202207L</code> </entry> </row> @@ -850,31 +849,34 @@ or any notes about the implementation. P2510R3 </link> </entry> - <entry align="center"> 13.2 (feature test macro not defined)</entry> + <entry align="center"> 13.2 (feature test macro not updated until 15.1) </entry> <entry> <code>__cpp_lib_format >= 202207L</code> </entry> </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> <entry> Formatting Ranges </entry> <entry> <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2286r8.html"> P2286R8 </link> </entry> - <entry align="center"> </entry> + <entry align="center"> + <informaltable colsep="0" rowsep="0" rowheader="norowheader" frame="none"><tgroup cols="1"><tbody> + <row><entry> 15.1 (changes to adaptors missing) </entry></row> + <row><entry> 15.2 (complete) </entry></row> + </tbody></tgroup></informaltable> + </entry> <entry> <code>__cpp_lib_format_ranges >= 202207L</code> </entry> </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> <entry> Improve default container formatting </entry> <entry> <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p2585r1.html"> P2585R1 </link> </entry> - <entry align="center"> </entry> + <entry align="center"> 15.1 (feature test macro not defined until 15.2) </entry> <entry> <code>__cpp_lib_format_ranges >= 202207L</code> </entry> </row> @@ -1249,7 +1251,6 @@ or any notes about the implementation. </row> <row> - <?dbhtml bgcolor="#C8B0B0" ?> <entry> Standard Library Modules <code>std</code> and <code>std.compat</code> </entry> @@ -1258,7 +1259,7 @@ or any notes about the implementation. P2465R3 </link> </entry> - <entry align="center"> </entry> + <entry align="center"> 15.1 </entry> <entry> <code>__cpp_lib_modules >= 202207L</code> </entry> </row> diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 1140fa0..3e5b6c4 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -194,6 +194,7 @@ bits_headers = \ ${bits_srcdir}/chrono_io.h \ ${bits_srcdir}/codecvt.h \ ${bits_srcdir}/cow_string.h \ + ${bits_srcdir}/cpyfunc_impl.h \ ${bits_srcdir}/deque.tcc \ ${bits_srcdir}/erase_if.h \ ${bits_srcdir}/formatfwd.h \ @@ -204,6 +205,7 @@ bits_headers = \ ${bits_srcdir}/fs_ops.h \ ${bits_srcdir}/fs_path.h \ ${bits_srcdir}/fstream.tcc \ + ${bits_srcdir}/funcwrap.h \ ${bits_srcdir}/gslice.h \ ${bits_srcdir}/gslice_array.h \ ${bits_srcdir}/hashtable.h \ @@ -223,7 +225,6 @@ bits_headers = \ ${bits_srcdir}/mask_array.h \ ${bits_srcdir}/memory_resource.h \ ${bits_srcdir}/mofunc_impl.h \ - ${bits_srcdir}/move_only_function.h \ ${bits_srcdir}/new_allocator.h \ ${bits_srcdir}/node_handle.h \ ${bits_srcdir}/ostream.tcc \ diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index c96e981..3531162 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -547,6 +547,7 @@ bits_freestanding = \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/chrono_io.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/codecvt.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/cow_string.h \ +@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/cpyfunc_impl.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/deque.tcc \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/erase_if.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/formatfwd.h \ @@ -557,6 +558,7 @@ bits_freestanding = \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/fs_ops.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/fs_path.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/fstream.tcc \ +@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/funcwrap.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/gslice.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/gslice_array.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/hashtable.h \ @@ -576,7 +578,6 @@ bits_freestanding = \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/mask_array.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/memory_resource.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/mofunc_impl.h \ -@GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/move_only_function.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/new_allocator.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/node_handle.h \ @GLIBCXX_HOSTED_TRUE@ ${bits_srcdir}/ostream.tcc \ diff --git a/libstdc++-v3/include/bits/cpyfunc_impl.h b/libstdc++-v3/include/bits/cpyfunc_impl.h new file mode 100644 index 0000000..bc44cd3e --- /dev/null +++ b/libstdc++-v3/include/bits/cpyfunc_impl.h @@ -0,0 +1,269 @@ +// Implementation of std::copyable_function -*- C++ -*- + +// Copyright The GNU Toolchain Authors. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +/** @file include/bits/cpyfunc_impl.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{functional} + */ + +#ifndef _GLIBCXX_MOF_CV +# define _GLIBCXX_MOF_CV +#endif + +#ifdef _GLIBCXX_MOF_REF +# define _GLIBCXX_MOF_INV_QUALS _GLIBCXX_MOF_CV _GLIBCXX_MOF_REF +#else +# define _GLIBCXX_MOF_REF +# define _GLIBCXX_MOF_INV_QUALS _GLIBCXX_MOF_CV & +#endif + +#define _GLIBCXX_MOF_CV_REF _GLIBCXX_MOF_CV _GLIBCXX_MOF_REF + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /** + * @brief Polymorphic copyable function wrapper. + * @ingroup functors + * @since C++26 + * @headerfile functional + * + * The `std::copyable_function` class template is a call wrapper similar + * to `std::function`, but it does not provide information about it's + * target, and preserves constness. + * + * It also supports const-qualification, ref-qualification, and + * no-throw guarantees. The qualifications and exception-specification + * of the `copyable_function::operator()` member function are respected + * when invoking the target function. + */ + template<typename _Res, typename... _ArgTypes, bool _Noex> + class copyable_function<_Res(_ArgTypes...) _GLIBCXX_MOF_CV + _GLIBCXX_MOF_REF noexcept(_Noex)> + : __polyfunc::_Cpy_base + { + using _Base = __polyfunc::_Cpy_base; + using _Invoker = __polyfunc::_Invoker<_Noex, _Res, _ArgTypes...>; + using _Signature = _Invoker::_Signature; + + template<typename _Tp> + using __callable + = __conditional_t<_Noex, + is_nothrow_invocable_r<_Res, _Tp, _ArgTypes...>, + is_invocable_r<_Res, _Tp, _ArgTypes...>>; + + // [func.wrap.copy.con]/1 is-callable-from<VT> + template<typename _Vt> + static constexpr bool __is_callable_from + = __and_v<__callable<_Vt _GLIBCXX_MOF_CV_REF>, + __callable<_Vt _GLIBCXX_MOF_INV_QUALS>>; + + public: + using result_type = _Res; + + /// Creates an empty object. + copyable_function() noexcept { } + + /// Creates an empty object. + copyable_function(nullptr_t) noexcept { } + + /// Moves the target object, leaving the source empty. + copyable_function(copyable_function&& __x) noexcept + : _Base(static_cast<_Base&&>(__x)), + _M_invoke(std::__exchange(__x._M_invoke, nullptr)) + { } + + /// Copies the target object. + copyable_function(copyable_function const& __x) + : _Base(static_cast<const _Base&>(__x)), + _M_invoke(__x._M_invoke) + { } + + /// Stores a target object initialized from the argument. + template<typename _Fn, typename _Vt = decay_t<_Fn>> + requires (!is_same_v<_Vt, copyable_function>) + && (!__is_in_place_type_v<_Vt>) && __is_callable_from<_Vt> + copyable_function(_Fn&& __f) noexcept(_S_nothrow_init<_Vt, _Fn>()) + { + static_assert(is_copy_constructible_v<_Vt>); + if constexpr (is_function_v<remove_pointer_t<_Vt>> + || is_member_pointer_v<_Vt> + || __is_polymorphic_function_v<_Vt>) + { + if (__f == nullptr) + return; + } + + if constexpr (!__is_polymorphic_function_v<_Vt> + || !__polyfunc::__is_invoker_convertible<_Vt, copyable_function>()) + { + _M_init<_Vt>(std::forward<_Fn>(__f)); + _M_invoke = _Invoker::template _S_storage<_Vt _GLIBCXX_MOF_INV_QUALS>(); + } + else if constexpr (is_lvalue_reference_v<_Fn>) + { + _M_copy(__polyfunc::__base_of(__f)); + _M_invoke = __polyfunc::__invoker_of(__f); + } + else + { + _M_move(__polyfunc::__base_of(__f)); + _M_invoke = std::__exchange(__polyfunc::__invoker_of(__f), nullptr); + } + } + + /// Stores a target object initialized from the arguments. + template<typename _Tp, typename... _Args> + requires is_constructible_v<_Tp, _Args...> + && __is_callable_from<_Tp> + explicit + copyable_function(in_place_type_t<_Tp>, _Args&&... __args) + noexcept(_S_nothrow_init<_Tp, _Args...>()) + : _M_invoke(_Invoker::template _S_storage<_Tp _GLIBCXX_MOF_INV_QUALS>()) + { + static_assert(is_same_v<decay_t<_Tp>, _Tp>); + static_assert(is_copy_constructible_v<_Tp>); + _M_init<_Tp>(std::forward<_Args>(__args)...); + } + + /// Stores a target object initialized from the arguments. + template<typename _Tp, typename _Up, typename... _Args> + requires is_constructible_v<_Tp, initializer_list<_Up>&, _Args...> + && __is_callable_from<_Tp> + explicit + copyable_function(in_place_type_t<_Tp>, initializer_list<_Up> __il, + _Args&&... __args) + noexcept(_S_nothrow_init<_Tp, initializer_list<_Up>&, _Args...>()) + : _M_invoke(_Invoker::template _S_storage<_Tp _GLIBCXX_MOF_INV_QUALS>()) + { + static_assert(is_same_v<decay_t<_Tp>, _Tp>); + static_assert(is_copy_constructible_v<_Tp>); + _M_init<_Tp>(__il, std::forward<_Args>(__args)...); + } + + /// Stores a new target object, leaving `x` empty. + copyable_function& + operator=(copyable_function&& __x) noexcept + { + // Standard requires support of self assigment, by specifying it as + // copy and swap. + if (this != std::addressof(__x)) [[likely]] + { + _Base::operator=(static_cast<_Base&&>(__x)); + _M_invoke = std::__exchange(__x._M_invoke, nullptr); + } + return *this; + } + + /// Stores a copy of the source target object + copyable_function& + operator=(const copyable_function& __x) + { + copyable_function(__x).swap(*this); + return *this; + } + + /// Destroys the target object (if any). + copyable_function& + operator=(nullptr_t) noexcept + { + _M_reset(); + _M_invoke = nullptr; + return *this; + } + + /// Stores a new target object, initialized from the argument. + template<typename _Fn> + requires is_constructible_v<copyable_function, _Fn> + copyable_function& + operator=(_Fn&& __f) + noexcept(is_nothrow_constructible_v<copyable_function, _Fn>) + { + copyable_function(std::forward<_Fn>(__f)).swap(*this); + return *this; + } + + ~copyable_function() = default; + + /// True if a target object is present, false otherwise. + explicit operator bool() const noexcept + { return _M_invoke != nullptr; } + + /** Invoke the target object. + * + * The target object will be invoked using the supplied arguments, + * and as an lvalue or rvalue, and as const or non-const, as dictated + * by the template arguments of the `copyable_function` specialization. + * + * @pre Must not be empty. + */ + _Res + operator()(_ArgTypes... __args) _GLIBCXX_MOF_CV_REF noexcept(_Noex) + { + __glibcxx_assert(*this != nullptr); + return _M_invoke(this->_M_storage, std::forward<_ArgTypes>(__args)...); + } + + /// Exchange the target objects (if any). + void + swap(copyable_function& __x) noexcept + { + _Base::swap(__x); + std::swap(_M_invoke, __x._M_invoke); + } + + /// Exchange the target objects (if any). + friend void + swap(copyable_function& __x, copyable_function& __y) noexcept + { __x.swap(__y); } + + /// Check for emptiness by comparing with `nullptr`. + friend bool + operator==(const copyable_function& __x, nullptr_t) noexcept + { return __x._M_invoke == nullptr; } + + private: + typename _Invoker::__storage_func_t _M_invoke = nullptr; + + template<typename _Func> + friend auto& + __polyfunc::__invoker_of(_Func&) noexcept; + + template<typename _Func> + friend auto& + __polyfunc::__base_of(_Func&) noexcept; + + template<typename _Dst, typename _Src> + friend consteval bool + __polyfunc::__is_invoker_convertible() noexcept; + }; + +#undef _GLIBCXX_MOF_CV_REF +#undef _GLIBCXX_MOF_CV +#undef _GLIBCXX_MOF_REF +#undef _GLIBCXX_MOF_INV_QUALS + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std diff --git a/libstdc++-v3/include/bits/funcwrap.h b/libstdc++-v3/include/bits/funcwrap.h new file mode 100644 index 0000000..4e05353 --- /dev/null +++ b/libstdc++-v3/include/bits/funcwrap.h @@ -0,0 +1,507 @@ +// Implementation of std::move_only_function and std::copyable_function -*- C++ -*- + +// Copyright The GNU Toolchain Authors. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +/** @file include/bits/funcwrap.h + * This is an internal header file, included by other library headers. + * Do not attempt to use it directly. @headername{functional} + */ + +#ifndef _GLIBCXX_FUNCWRAP_H +#define _GLIBCXX_FUNCWRAP_H 1 + +#ifdef _GLIBCXX_SYSHDR +#pragma GCC system_header +#endif + +#include <bits/version.h> + +#if defined(__glibcxx_move_only_function) || defined(__glibcxx_copyable_function) + +#include <bits/invoke.h> +#include <bits/utility.h> + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + + /// @cond undocumented + template<typename _Tp> + inline constexpr bool __is_polymorphic_function_v = false; + + namespace __polyfunc + { + union _Ptrs + { + void* _M_obj; + void (*_M_func)(); + }; + + struct _Storage + { + void* _M_addr() noexcept { return &_M_bytes[0]; } + void const* _M_addr() const noexcept { return &_M_bytes[0]; } + + template<typename _Tp> + static consteval bool + _S_stored_locally() noexcept + { + return sizeof(_Tp) <= sizeof(_Storage) + && alignof(_Tp) <= alignof(_Storage) + && is_nothrow_move_constructible_v<_Tp>; + } + + template<typename _Tp, typename... _Args> + static consteval bool + _S_nothrow_init() noexcept + { + if constexpr (_S_stored_locally<_Tp>()) + return is_nothrow_constructible_v<_Tp, _Args...>; + return false; + } + + template<typename _Tp, typename... _Args> + void + _M_init(_Args&&... __args) noexcept(_S_nothrow_init<_Tp, _Args...>()) + { + if constexpr (is_function_v<remove_pointer_t<_Tp>>) + { + static_assert( sizeof...(__args) <= 1 ); + // __args can have up to one element, returns nullptr if empty. + _Tp __func = (nullptr, ..., __args); + _M_ptrs._M_func = reinterpret_cast<void(*)()>(__func); + } + else if constexpr (!_S_stored_locally<_Tp>()) + _M_ptrs._M_obj = new _Tp(std::forward<_Args>(__args)...); + else + ::new (_M_addr()) _Tp(std::forward<_Args>(__args)...); + } + + template<typename _Tp> + [[__gnu__::__always_inline__]] + _Tp* + _M_ptr() const noexcept + { + if constexpr (!_S_stored_locally<remove_const_t<_Tp>>()) + return static_cast<_Tp*>(_M_ptrs._M_obj); + else if constexpr (is_const_v<_Tp>) + return static_cast<_Tp*>(_M_addr()); + else + // _Manager and _Invoker pass _Storage by const&, even for mutable sources. + return static_cast<_Tp*>(const_cast<void*>(_M_addr())); + } + + template<typename _Ref> + [[__gnu__::__always_inline__]] + _Ref + _M_ref() const noexcept + { + using _Tp = remove_reference_t<_Ref>; + if constexpr (is_function_v<remove_pointer_t<_Tp>>) + return reinterpret_cast<_Tp>(_M_ptrs._M_func); + else + return static_cast<_Ref>(*_M_ptr<_Tp>()); + } + + // We want to have enough space to store a simple delegate type. + struct _Delegate { void (_Storage::*__pfm)(); _Storage* __obj; }; + union { + _Ptrs _M_ptrs; + alignas(_Delegate) alignas(void(*)()) + unsigned char _M_bytes[sizeof(_Delegate)]; + }; + }; + + template<bool _Noex, typename _Ret, typename... _Args> + struct _Base_invoker + { + using _Signature = _Ret(*)(_Args...) noexcept(_Noex); + + using __storage_func_t = _Ret(*)(const _Storage&, _Args...) noexcept(_Noex); + template<typename _Tp> + static consteval __storage_func_t + _S_storage() + { return &_S_call_storage<_Adjust_target<_Tp>>; } + + private: + template<typename _Tp, typename _Td = remove_cvref_t<_Tp>> + using _Adjust_target = + __conditional_t<is_pointer_v<_Td> || is_member_pointer_v<_Td>, _Td, _Tp>; + + template<typename _Tp> + static _Ret + _S_call_storage(const _Storage& __ref, _Args... __args) noexcept(_Noex) + { + return std::__invoke_r<_Ret>(__ref._M_ref<_Tp>(), + std::forward<_Args>(__args)...); + } + }; + + template<typename _Tp> + using __param_t = __conditional_t<is_scalar_v<_Tp>, _Tp, _Tp&&>; + + template<bool _Noex, typename _Ret, typename... _Args> + using _Invoker = _Base_invoker<_Noex, remove_cv_t<_Ret>, __param_t<_Args>...>; + + template<typename _Func> + auto& + __invoker_of(_Func& __f) noexcept + { return __f._M_invoke; } + + template<typename _Func> + auto& + __base_of(_Func& __f) noexcept + { return static_cast<__like_t<_Func&, typename _Func::_Base>>(__f); } + + template<typename _Src, typename _Dst> + consteval bool + __is_invoker_convertible() noexcept + { + if constexpr (requires { typename _Src::_Signature; }) + return is_convertible_v<typename _Src::_Signature, + typename _Dst::_Signature>; + else + return false; + } + + struct _Manager + { + enum class _Op + { + // saves address of entity in *__src to __target._M_ptrs, + _Address, + // moves entity stored in *__src to __target, __src becomes empty + _Move, + // copies entity stored in *__src to __target, supported only if + // _ProvideCopy is specified. + _Copy, + // destroys entity stored in __target, __src is ignoring + _Destroy, + }; + + // A function that performs operation __op on the __target and possibly __src. + using _Func = void (*)(_Op __op, _Storage& __target, const _Storage* __src); + + // The no-op manager function for objects with no target. + static void _S_empty(_Op, _Storage&, const _Storage*) noexcept { } + + template<bool _ProvideCopy, typename _Tp> + consteval static auto + _S_select() + { + if constexpr (is_function_v<remove_pointer_t<_Tp>>) + return &_S_func; + else if constexpr (!_Storage::_S_stored_locally<_Tp>()) + return &_S_ptr<_ProvideCopy, _Tp>; + else if constexpr (is_trivially_copyable_v<_Tp>) + return &_S_trivial; + else + return &_S_local<_ProvideCopy, _Tp>; + } + + private: + static void + _S_func(_Op __op, _Storage& __target, const _Storage* __src) noexcept + { + switch (__op) + { + case _Op::_Address: + case _Op::_Move: + case _Op::_Copy: + __target._M_ptrs._M_func = __src->_M_ptrs._M_func; + return; + case _Op::_Destroy: + return; + } + } + + static void + _S_trivial(_Op __op, _Storage& __target, const _Storage* __src) noexcept + { + switch (__op) + { + case _Op::_Address: + __target._M_ptrs._M_obj = const_cast<void*>(__src->_M_addr()); + return; + case _Op::_Move: + case _Op::_Copy: + // N.B. Creating _Storage starts lifetime of _M_bytes char array, + // that implicitly creates, amongst other, all possible trivially + // copyable objects, so we copy any object present in __src._M_bytes. + ::new (&__target) _Storage(*__src); + return; + case _Op::_Destroy: + return; + } + } + + template<bool _Provide_copy, typename _Tp> + static void + _S_local(_Op __op, _Storage& __target, const _Storage* __src) + noexcept(!_Provide_copy) + { + switch (__op) + { + case _Op::_Address: + __target._M_ptrs._M_obj = __src->_M_ptr<_Tp>(); + return; + case _Op::_Move: + { + _Tp* __obj = __src->_M_ptr<_Tp>(); + ::new(__target._M_addr()) _Tp(std::move(*__obj)); + __obj->~_Tp(); + } + return; + case _Op::_Destroy: + __target._M_ptr<_Tp>()->~_Tp(); + return; + case _Op::_Copy: + if constexpr (_Provide_copy) + ::new (__target._M_addr()) _Tp(__src->_M_ref<const _Tp&>()); + else + __builtin_unreachable(); + return; + } + } + + template<bool _Provide_copy, typename _Tp> + static void + _S_ptr(_Op __op, _Storage& __target, const _Storage* __src) + noexcept(!_Provide_copy) + { + switch (__op) + { + case _Op::_Address: + case _Op::_Move: + __target._M_ptrs._M_obj = __src->_M_ptrs._M_obj; + return; + case _Op::_Destroy: + delete __target._M_ptr<_Tp>(); + return; + case _Op::_Copy: + if constexpr (_Provide_copy) + __target._M_ptrs._M_obj = new _Tp(__src->_M_ref<const _Tp&>()); + else + __builtin_unreachable(); + return; + } + } + }; + + class _Mo_base + { + protected: + _Mo_base() noexcept + : _M_manage(_Manager::_S_empty) + { } + + _Mo_base(_Mo_base&& __x) noexcept + { _M_move(__x); } + + template<typename _Tp, typename... _Args> + static consteval bool + _S_nothrow_init() noexcept + { return _Storage::_S_nothrow_init<_Tp, _Args...>(); } + + template<typename _Tp, typename... _Args> + void + _M_init(_Args&&... __args) + noexcept(_S_nothrow_init<_Tp, _Args...>()) + { + _M_storage._M_init<_Tp>(std::forward<_Args>(__args)...); + _M_manage = _Manager::_S_select<false, _Tp>(); + } + + void + _M_move(_Mo_base& __x) noexcept + { + using _Op = _Manager::_Op; + _M_manage = std::__exchange(__x._M_manage, _Manager::_S_empty); + _M_manage(_Op::_Move, _M_storage, &__x._M_storage); + } + + _Mo_base& + operator=(_Mo_base&& __x) noexcept + { + _M_destroy(); + _M_move(__x); + return *this; + } + + void + _M_reset() noexcept + { + _M_destroy(); + _M_manage = _Manager::_S_empty; + } + + ~_Mo_base() + { _M_destroy(); } + + void + swap(_Mo_base& __x) noexcept + { + using _Op = _Manager::_Op; + // Order of operations here is more efficient if __x is empty. + _Storage __s; + __x._M_manage(_Op::_Move, __s, &__x._M_storage); + _M_manage(_Op::_Move, __x._M_storage, &_M_storage); + __x._M_manage(_Op::_Move, _M_storage, &__s); + std::swap(_M_manage, __x._M_manage); + } + + _Storage _M_storage; + + private: + void _M_destroy() noexcept + { _M_manage(_Manager::_Op::_Destroy, _M_storage, nullptr); } + + _Manager::_Func _M_manage; + +#ifdef __glibcxx_copyable_function // C++ >= 26 && HOSTED + friend class _Cpy_base; +#endif // __glibcxx_copyable_function + }; + +} // namespace __polyfunc + /// @endcond + +#ifdef __glibcxx_move_only_function // C++ >= 23 && HOSTED + template<typename... _Signature> + class move_only_function; // not defined + + /// @cond undocumented + template<typename _Tp> + constexpr bool __is_polymorphic_function_v<move_only_function<_Tp>> = true; + + namespace __detail::__variant + { + template<typename> struct _Never_valueless_alt; // see <variant> + + // Provide the strong exception-safety guarantee when emplacing a + // move_only_function into a variant. + template<typename... _Signature> + struct _Never_valueless_alt<std::move_only_function<_Signature...>> + : true_type + { }; + } // namespace __detail::__variant + /// @endcond +#endif // __glibcxx_move_only_function + +#ifdef __glibcxx_copyable_function // C++ >= 26 && HOSTED + /// @cond undocumented + namespace __polyfunc + { + class _Cpy_base : public _Mo_base + { + protected: + _Cpy_base() = default; + + template<typename _Tp, typename... _Args> + void + _M_init(_Args&&... __args) + noexcept(_S_nothrow_init<_Tp, _Args...>()) + { + _M_storage._M_init<_Tp>(std::forward<_Args>(__args)...); + _M_manage = _Manager::_S_select<true, _Tp>(); + } + + void + _M_copy(_Cpy_base const& __x) + { + using _Op = _Manager::_Op; + __x._M_manage(_Op::_Copy, _M_storage, &__x._M_storage); + _M_manage = __x._M_manage; + } + + _Cpy_base(_Cpy_base&&) = default; + + _Cpy_base(_Cpy_base const& __x) + { _M_copy(__x); } + + _Cpy_base& + operator=(_Cpy_base&&) = default; + + _Cpy_base& + // Needs to use copy and swap for exception guarantees. + operator=(_Cpy_base const&) = delete; + }; + } // namespace __polyfunc + /// @endcond + + template<typename... _Signature> + class copyable_function; // not defined + + template<typename _Tp> + constexpr bool __is_polymorphic_function_v<copyable_function<_Tp>> = true; + + namespace __detail::__variant + { + template<typename> struct _Never_valueless_alt; // see <variant> + + // Provide the strong exception-safety guarantee when emplacing a + // copyable_function into a variant. + template<typename... _Signature> + struct _Never_valueless_alt<std::copyable_function<_Signature...>> + : true_type + { }; + } // namespace __detail::__variant +#endif // __glibcxx_copyable_function + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std + +#ifdef __glibcxx_move_only_function // C++ >= 23 && HOSTED +#include "mofunc_impl.h" +#define _GLIBCXX_MOF_CV const +#include "mofunc_impl.h" +#define _GLIBCXX_MOF_REF & +#include "mofunc_impl.h" +#define _GLIBCXX_MOF_REF && +#include "mofunc_impl.h" +#define _GLIBCXX_MOF_CV const +#define _GLIBCXX_MOF_REF & +#include "mofunc_impl.h" +#define _GLIBCXX_MOF_CV const +#define _GLIBCXX_MOF_REF && +#include "mofunc_impl.h" +#endif // __glibcxx_move_only_function + +#ifdef __glibcxx_copyable_function // C++ >= 26 && HOSTED +#include "cpyfunc_impl.h" +#define _GLIBCXX_MOF_CV const +#include "cpyfunc_impl.h" +#define _GLIBCXX_MOF_REF & +#include "cpyfunc_impl.h" +#define _GLIBCXX_MOF_REF && +#include "cpyfunc_impl.h" +#define _GLIBCXX_MOF_CV const +#define _GLIBCXX_MOF_REF & +#include "cpyfunc_impl.h" +#define _GLIBCXX_MOF_CV const +#define _GLIBCXX_MOF_REF && +#include "cpyfunc_impl.h" +#endif // __glibcxx_copyable_function + +#endif // __glibcxx_copyable_function || __glibcxx_copyable_function +#endif // _GLIBCXX_FUNCWRAP_H diff --git a/libstdc++-v3/include/bits/mofunc_impl.h b/libstdc++-v3/include/bits/mofunc_impl.h index 318a55e..1ceb910 100644 --- a/libstdc++-v3/include/bits/mofunc_impl.h +++ b/libstdc++-v3/include/bits/mofunc_impl.h @@ -62,8 +62,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Res, typename... _ArgTypes, bool _Noex> class move_only_function<_Res(_ArgTypes...) _GLIBCXX_MOF_CV _GLIBCXX_MOF_REF noexcept(_Noex)> - : _Mofunc_base + : __polyfunc::_Mo_base { + using _Base = __polyfunc::_Mo_base; + using _Invoker = __polyfunc::_Invoker<_Noex, _Res, _ArgTypes...>; + using _Signature = _Invoker::_Signature; + template<typename _Tp> using __callable = __conditional_t<_Noex, @@ -87,7 +91,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Moves the target object, leaving the source empty. move_only_function(move_only_function&& __x) noexcept - : _Mofunc_base(static_cast<_Mofunc_base&&>(__x)), + : _Base(static_cast<_Base&&>(__x)), _M_invoke(std::__exchange(__x._M_invoke, nullptr)) { } @@ -97,15 +101,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION && (!__is_in_place_type_v<_Vt>) && __is_callable_from<_Vt> move_only_function(_Fn&& __f) noexcept(_S_nothrow_init<_Vt, _Fn>()) { + // _GLIBCXX_RESOLVE_LIB_DEFECTS + // 4255. move_only_function constructor should recognize empty + // copyable_functions if constexpr (is_function_v<remove_pointer_t<_Vt>> || is_member_pointer_v<_Vt> - || __is_move_only_function_v<_Vt>) + || __is_polymorphic_function_v<_Vt>) { if (__f == nullptr) return; } - _M_init<_Vt>(std::forward<_Fn>(__f)); - _M_invoke = &_S_invoke<_Vt>; + + if constexpr (__is_polymorphic_function_v<_Vt> + && __polyfunc::__is_invoker_convertible<_Vt, move_only_function>()) + { + // Handle cases where _Fn is const reference to copyable_function, + // by firstly creating temporary and moving from it. + _Vt __tmp(std::forward<_Fn>(__f)); + _M_move(__polyfunc::__base_of(__tmp)); + _M_invoke = std::__exchange(__polyfunc::__invoker_of(__tmp), nullptr); + } + else + { + _M_init<_Vt>(std::forward<_Fn>(__f)); + _M_invoke = _Invoker::template _S_storage<_Vt _GLIBCXX_MOF_INV_QUALS>(); + } } /// Stores a target object initialized from the arguments. @@ -115,7 +135,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION explicit move_only_function(in_place_type_t<_Tp>, _Args&&... __args) noexcept(_S_nothrow_init<_Tp, _Args...>()) - : _M_invoke(&_S_invoke<_Tp>) + : _M_invoke(_Invoker::template _S_storage<_Tp _GLIBCXX_MOF_INV_QUALS>()) { static_assert(is_same_v<decay_t<_Tp>, _Tp>); _M_init<_Tp>(std::forward<_Args>(__args)...); @@ -129,7 +149,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION move_only_function(in_place_type_t<_Tp>, initializer_list<_Up> __il, _Args&&... __args) noexcept(_S_nothrow_init<_Tp, initializer_list<_Up>&, _Args...>()) - : _M_invoke(&_S_invoke<_Tp>) + : _M_invoke(_Invoker::template _S_storage<_Tp _GLIBCXX_MOF_INV_QUALS>()) { static_assert(is_same_v<decay_t<_Tp>, _Tp>); _M_init<_Tp>(__il, std::forward<_Args>(__args)...); @@ -139,8 +159,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION move_only_function& operator=(move_only_function&& __x) noexcept { - _Mofunc_base::operator=(static_cast<_Mofunc_base&&>(__x)); - _M_invoke = std::__exchange(__x._M_invoke, nullptr); + // Standard requires support of self assigment, by specifying it as + // copy and swap. + if (this != std::addressof(__x)) [[likely]] + { + _Base::operator=(static_cast<_Base&&>(__x)); + _M_invoke = std::__exchange(__x._M_invoke, nullptr); + } return *this; } @@ -148,7 +173,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION move_only_function& operator=(nullptr_t) noexcept { - _Mofunc_base::operator=(nullptr); + _M_reset(); _M_invoke = nullptr; return *this; } @@ -167,7 +192,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ~move_only_function() = default; /// True if a target object is present, false otherwise. - explicit operator bool() const noexcept { return _M_invoke != nullptr; } + explicit operator bool() const noexcept + { return _M_invoke != nullptr; } /** Invoke the target object. * @@ -181,14 +207,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION operator()(_ArgTypes... __args) _GLIBCXX_MOF_CV_REF noexcept(_Noex) { __glibcxx_assert(*this != nullptr); - return _M_invoke(this, std::forward<_ArgTypes>(__args)...); + return _M_invoke(this->_M_storage, std::forward<_ArgTypes>(__args)...); } /// Exchange the target objects (if any). void swap(move_only_function& __x) noexcept { - _Mofunc_base::swap(__x); + _Base::swap(__x); std::swap(_M_invoke, __x._M_invoke); } @@ -203,25 +229,19 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return __x._M_invoke == nullptr; } private: - template<typename _Tp> - using __param_t = __conditional_t<is_scalar_v<_Tp>, _Tp, _Tp&&>; + typename _Invoker::__storage_func_t _M_invoke = nullptr; - using _Invoker = _Res (*)(_Mofunc_base _GLIBCXX_MOF_CV*, - __param_t<_ArgTypes>...) noexcept(_Noex); + template<typename _Func> + friend auto& + __polyfunc::__invoker_of(_Func&) noexcept; - template<typename _Tp> - static _Res - _S_invoke(_Mofunc_base _GLIBCXX_MOF_CV* __self, - __param_t<_ArgTypes>... __args) noexcept(_Noex) - { - using _TpCv = _Tp _GLIBCXX_MOF_CV; - using _TpInv = _Tp _GLIBCXX_MOF_INV_QUALS; - return std::__invoke_r<_Res>( - std::forward<_TpInv>(*_S_access<_TpCv>(__self)), - std::forward<__param_t<_ArgTypes>>(__args)...); - } + template<typename _Func> + friend auto& + __polyfunc::__base_of(_Func&) noexcept; - _Invoker _M_invoke = nullptr; + template<typename _Dst, typename _Src> + friend consteval bool + __polyfunc::__is_invoker_convertible() noexcept; }; #undef _GLIBCXX_MOF_CV_REF diff --git a/libstdc++-v3/include/bits/move_only_function.h b/libstdc++-v3/include/bits/move_only_function.h deleted file mode 100644 index 42b33d0..0000000 --- a/libstdc++-v3/include/bits/move_only_function.h +++ /dev/null @@ -1,218 +0,0 @@ -// Implementation of std::move_only_function -*- C++ -*- - -// Copyright The GNU Toolchain Authors. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 3, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// Under Section 7 of GPL version 3, you are granted additional -// permissions described in the GCC Runtime Library Exception, version -// 3.1, as published by the Free Software Foundation. - -// You should have received a copy of the GNU General Public License and -// a copy of the GCC Runtime Library Exception along with this program; -// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -// <http://www.gnu.org/licenses/>. - -/** @file include/bits/move_only_function.h - * This is an internal header file, included by other library headers. - * Do not attempt to use it directly. @headername{functional} - */ - -#ifndef _GLIBCXX_MOVE_ONLY_FUNCTION_H -#define _GLIBCXX_MOVE_ONLY_FUNCTION_H 1 - -#ifdef _GLIBCXX_SYSHDR -#pragma GCC system_header -#endif - -#include <bits/version.h> - -#ifdef __glibcxx_move_only_function // C++ >= 23 && HOSTED - -#include <bits/invoke.h> -#include <bits/utility.h> - -namespace std _GLIBCXX_VISIBILITY(default) -{ -_GLIBCXX_BEGIN_NAMESPACE_VERSION - - template<typename... _Signature> - class move_only_function; // not defined - - /// @cond undocumented - class _Mofunc_base - { - protected: - _Mofunc_base() noexcept - : _M_manage(_S_empty) - { } - - _Mofunc_base(_Mofunc_base&& __x) noexcept - { - _M_manage = std::__exchange(__x._M_manage, _S_empty); - _M_manage(_M_storage, &__x._M_storage); - } - - template<typename _Tp, typename... _Args> - static constexpr bool - _S_nothrow_init() noexcept - { - if constexpr (__stored_locally<_Tp>) - return is_nothrow_constructible_v<_Tp, _Args...>; - return false; - } - - template<typename _Tp, typename... _Args> - void - _M_init(_Args&&... __args) noexcept(_S_nothrow_init<_Tp, _Args...>()) - { - if constexpr (__stored_locally<_Tp>) - ::new (_M_storage._M_addr()) _Tp(std::forward<_Args>(__args)...); - else - _M_storage._M_p = new _Tp(std::forward<_Args>(__args)...); - - _M_manage = &_S_manage<_Tp>; - } - - _Mofunc_base& - operator=(_Mofunc_base&& __x) noexcept - { - _M_manage(_M_storage, nullptr); - _M_manage = std::__exchange(__x._M_manage, _S_empty); - _M_manage(_M_storage, &__x._M_storage); - return *this; - } - - _Mofunc_base& - operator=(nullptr_t) noexcept - { - _M_manage(_M_storage, nullptr); - _M_manage = _S_empty; - return *this; - } - - ~_Mofunc_base() { _M_manage(_M_storage, nullptr); } - - void - swap(_Mofunc_base& __x) noexcept - { - // Order of operations here is more efficient if __x is empty. - _Storage __s; - __x._M_manage(__s, &__x._M_storage); - _M_manage(__x._M_storage, &_M_storage); - __x._M_manage(_M_storage, &__s); - std::swap(_M_manage, __x._M_manage); - } - - template<typename _Tp, typename _Self> - static _Tp* - _S_access(_Self* __self) noexcept - { - if constexpr (__stored_locally<remove_const_t<_Tp>>) - return static_cast<_Tp*>(__self->_M_storage._M_addr()); - else - return static_cast<_Tp*>(__self->_M_storage._M_p); - } - - private: - struct _Storage - { - void* _M_addr() noexcept { return &_M_bytes[0]; } - const void* _M_addr() const noexcept { return &_M_bytes[0]; } - - // We want to have enough space to store a simple delegate type. - struct _Delegate { void (_Storage::*__pfm)(); _Storage* __obj; }; - union { - void* _M_p; - alignas(_Delegate) alignas(void(*)()) - unsigned char _M_bytes[sizeof(_Delegate)]; - }; - }; - - template<typename _Tp> - static constexpr bool __stored_locally - = sizeof(_Tp) <= sizeof(_Storage) && alignof(_Tp) <= alignof(_Storage) - && is_nothrow_move_constructible_v<_Tp>; - - // A function that either destroys the target object stored in __target, - // or moves the target object from *__src to __target. - using _Manager = void (*)(_Storage& __target, _Storage* __src) noexcept; - - // The no-op manager function for objects with no target. - static void _S_empty(_Storage&, _Storage*) noexcept { } - - // The real manager function for a target object of type _Tp. - template<typename _Tp> - static void - _S_manage(_Storage& __target, _Storage* __src) noexcept - { - if constexpr (__stored_locally<_Tp>) - { - if (__src) - { - _Tp* __rval = static_cast<_Tp*>(__src->_M_addr()); - ::new (__target._M_addr()) _Tp(std::move(*__rval)); - __rval->~_Tp(); - } - else - static_cast<_Tp*>(__target._M_addr())->~_Tp(); - } - else - { - if (__src) - __target._M_p = __src->_M_p; - else - delete static_cast<_Tp*>(__target._M_p); - } - } - - _Storage _M_storage; - _Manager _M_manage; - }; - - template<typename _Tp> - inline constexpr bool __is_move_only_function_v = false; - template<typename _Tp> - constexpr bool __is_move_only_function_v<move_only_function<_Tp>> = true; - /// @endcond - - namespace __detail::__variant - { - template<typename> struct _Never_valueless_alt; // see <variant> - - // Provide the strong exception-safety guarantee when emplacing a - // move_only_function into a variant. - template<typename... _Signature> - struct _Never_valueless_alt<std::move_only_function<_Signature...>> - : true_type - { }; - } // namespace __detail::__variant - -_GLIBCXX_END_NAMESPACE_VERSION -} // namespace std - -#include "mofunc_impl.h" -#define _GLIBCXX_MOF_CV const -#include "mofunc_impl.h" -#define _GLIBCXX_MOF_REF & -#include "mofunc_impl.h" -#define _GLIBCXX_MOF_REF && -#include "mofunc_impl.h" -#define _GLIBCXX_MOF_CV const -#define _GLIBCXX_MOF_REF & -#include "mofunc_impl.h" -#define _GLIBCXX_MOF_CV const -#define _GLIBCXX_MOF_REF && -#include "mofunc_impl.h" - -#endif // __glibcxx_move_only_function -#endif // _GLIBCXX_MOVE_ONLY_FUNCTION_H diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def index f4d3de8..6ca148f 100644 --- a/libstdc++-v3/include/bits/version.def +++ b/libstdc++-v3/include/bits/version.def @@ -679,8 +679,6 @@ ftms = { values = { v = 201703; cxxmin = 17; - hosted = yes; - gthread = yes; }; }; @@ -1750,6 +1748,15 @@ ftms = { }; ftms = { + name = copyable_function; + values = { + v = 202306; + cxxmin = 26; + hosted = yes; + }; +}; + +ftms = { name = out_ptr; values = { v = 202311; diff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h index d5d75ce..48a090c 100644 --- a/libstdc++-v3/include/bits/version.h +++ b/libstdc++-v3/include/bits/version.h @@ -751,7 +751,7 @@ #undef __glibcxx_want_parallel_algorithm #if !defined(__cpp_lib_scoped_lock) -# if (__cplusplus >= 201703L) && defined(_GLIBCXX_HAS_GTHREADS) && _GLIBCXX_HOSTED +# if (__cplusplus >= 201703L) # define __glibcxx_scoped_lock 201703L # if defined(__glibcxx_want_all) || defined(__glibcxx_want_scoped_lock) # define __cpp_lib_scoped_lock 201703L @@ -1948,6 +1948,16 @@ #endif /* !defined(__cpp_lib_move_only_function) && defined(__glibcxx_want_move_only_function) */ #undef __glibcxx_want_move_only_function +#if !defined(__cpp_lib_copyable_function) +# if (__cplusplus > 202302L) && _GLIBCXX_HOSTED +# define __glibcxx_copyable_function 202306L +# if defined(__glibcxx_want_all) || defined(__glibcxx_want_copyable_function) +# define __cpp_lib_copyable_function 202306L +# endif +# endif +#endif /* !defined(__cpp_lib_copyable_function) && defined(__glibcxx_want_copyable_function) */ +#undef __glibcxx_want_copyable_function + #if !defined(__cpp_lib_out_ptr) # if (__cplusplus >= 202100L) # define __glibcxx_out_ptr 202311L diff --git a/libstdc++-v3/include/c_global/ccomplex b/libstdc++-v3/include/c_global/ccomplex index 7044cf7..a39273f 100644 --- a/libstdc++-v3/include/c_global/ccomplex +++ b/libstdc++-v3/include/c_global/ccomplex @@ -24,6 +24,8 @@ /** @file include/ccomplex * This is a Standard C++ Library header. + * + * @since C++11 (removed in C++20) */ #ifndef _GLIBCXX_CCOMPLEX diff --git a/libstdc++-v3/include/c_global/ciso646 b/libstdc++-v3/include/c_global/ciso646 index a663e04..6dec7df 100644 --- a/libstdc++-v3/include/c_global/ciso646 +++ b/libstdc++-v3/include/c_global/ciso646 @@ -28,6 +28,8 @@ * * This is the C++ version of the Standard C Library header @c iso646.h, * which is empty in C++. + * + * @since C++11 (removed in C++20) */ #ifndef _GLIBCXX_CISO646 #define _GLIBCXX_CISO646 @@ -38,13 +40,15 @@ #include <bits/c++config.h> -#if __cplusplus >= 202002L && ! _GLIBCXX_USE_DEPRECATED -# error "<ciso646> is not a standard header in C++20, use <version> to detect implementation-specific macros" -#elif __cplusplus >= 201703L && defined __DEPRECATED -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wc++23-extensions" -# warning "<ciso646> is deprecated in C++17, use <version> to detect implementation-specific macros" -# pragma GCC diagnostic pop +#if __cplusplus >= 202002L +# if ! _GLIBCXX_USE_DEPRECATED +# error "<ciso646> is not a standard header since C++20, use <version> to detect implementation-specific macros" +# elif defined __DEPRECATED +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wc++23-extensions" +# warning "<ciso646> is not a standard header since C++20, use <version> to detect implementation-specific macros" +# pragma GCC diagnostic pop +# endif #endif #endif diff --git a/libstdc++-v3/include/c_global/cstdalign b/libstdc++-v3/include/c_global/cstdalign index 92e0ad6..41ce506 100644 --- a/libstdc++-v3/include/c_global/cstdalign +++ b/libstdc++-v3/include/c_global/cstdalign @@ -24,6 +24,8 @@ /** @file include/cstdalign * This is a Standard C++ Library header. + * + * @since C++11 (removed in C++20) */ #ifndef _GLIBCXX_CSTDALIGN diff --git a/libstdc++-v3/include/c_global/cstdbool b/libstdc++-v3/include/c_global/cstdbool index e75f56c..5933d7d 100644 --- a/libstdc++-v3/include/c_global/cstdbool +++ b/libstdc++-v3/include/c_global/cstdbool @@ -24,6 +24,8 @@ /** @file include/cstdbool * This is a Standard C++ Library header. + * + * @since C++11 (removed in C++20) */ #ifndef _GLIBCXX_CSTDBOOL diff --git a/libstdc++-v3/include/c_global/ctgmath b/libstdc++-v3/include/c_global/ctgmath index 0a5a0e7..b708878 100644 --- a/libstdc++-v3/include/c_global/ctgmath +++ b/libstdc++-v3/include/c_global/ctgmath @@ -24,6 +24,8 @@ /** @file include/ctgmath * This is a Standard C++ Library header. + * + * @since C++11 (removed in C++20) */ #ifndef _GLIBCXX_CTGMATH diff --git a/libstdc++-v3/include/std/complex b/libstdc++-v3/include/std/complex index 59ef905..d9d2d8a 100644 --- a/libstdc++-v3/include/std/complex +++ b/libstdc++-v3/include/std/complex @@ -969,7 +969,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif - // 26.2.7/4: arg(__z): Returns the phase angle of __z. + // C++11 26.4.7 [complex.value.ops]/4: arg(z): Returns the phase angle of z. template<typename _Tp> inline _Tp __complex_arg(const complex<_Tp>& __z) @@ -2123,8 +2123,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Tp> std::complex<_Tp> acosh(const std::complex<_Tp>&); template<typename _Tp> std::complex<_Tp> asinh(const std::complex<_Tp>&); template<typename _Tp> std::complex<_Tp> atanh(const std::complex<_Tp>&); - // DR 595. - template<typename _Tp> _Tp fabs(const std::complex<_Tp>&); template<typename _Tp> inline std::complex<_Tp> @@ -2309,7 +2307,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION acos(const std::complex<_Tp>& __z) { return __complex_acos(__z.__rep()); } #else - /// acos(__z) [8.1.2]. + /// acos(__z) C++11 26.4.8 [complex.transcendentals] // Effects: Behaves the same as C99 function cacos, defined // in subclause 7.3.5.1. template<typename _Tp> @@ -2345,7 +2343,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION asin(const std::complex<_Tp>& __z) { return __complex_asin(__z.__rep()); } #else - /// asin(__z) [8.1.3]. + /// asin(__z) C++11 26.4.8 [complex.transcendentals] // Effects: Behaves the same as C99 function casin, defined // in subclause 7.3.5.2. template<typename _Tp> @@ -2389,7 +2387,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION atan(const std::complex<_Tp>& __z) { return __complex_atan(__z.__rep()); } #else - /// atan(__z) [8.1.4]. + /// atan(__z) C++11 26.4.8 [complex.transcendentals] // Effects: Behaves the same as C99 function catan, defined // in subclause 7.3.5.3. template<typename _Tp> @@ -2425,7 +2423,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION acosh(const std::complex<_Tp>& __z) { return __complex_acosh(__z.__rep()); } #else - /// acosh(__z) [8.1.5]. + /// acosh(__z) C++11 26.4.8 [complex.transcendentals] // Effects: Behaves the same as C99 function cacosh, defined // in subclause 7.3.6.1. template<typename _Tp> @@ -2464,7 +2462,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION asinh(const std::complex<_Tp>& __z) { return __complex_asinh(__z.__rep()); } #else - /// asinh(__z) [8.1.6]. + /// asinh(__z) C++11 26.4.8 [complex.transcendentals] // Effects: Behaves the same as C99 function casin, defined // in subclause 7.3.6.2. template<typename _Tp> @@ -2508,7 +2506,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION atanh(const std::complex<_Tp>& __z) { return __complex_atanh(__z.__rep()); } #else - /// atanh(__z) [8.1.7]. + /// atanh(__z) C++11 26.4.8 [complex.transcendentals] // Effects: Behaves the same as C99 function catanh, defined // in subclause 7.3.6.3. template<typename _Tp> @@ -2518,22 +2516,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif template<typename _Tp> + _GLIBCXX11_DEPRECATED_SUGGEST("std::abs") inline _Tp - /// fabs(__z) [8.1.8]. + /// fabs(__z) TR1 8.1.8 [tr.c99.cmplx.fabs] // Effects: Behaves the same as C99 function cabs, defined // in subclause 7.3.8.1. fabs(const std::complex<_Tp>& __z) { return std::abs(__z); } - /// Additional overloads [8.1.9]. + // Additional overloads C++11 26.4.9 [cmplx.over] + template<typename _Tp> inline typename __gnu_cxx::__promote<_Tp>::__type arg(_Tp __x) { typedef typename __gnu_cxx::__promote<_Tp>::__type __type; #if (_GLIBCXX11_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) - return std::signbit(__x) ? __type(3.1415926535897932384626433832795029L) - : __type(); + return __builtin_signbit(__type(__x)) + ? __type(3.1415926535897932384626433832795029L) : __type(); #else return std::arg(std::complex<__type>(__x)); #endif diff --git a/libstdc++-v3/include/std/expected b/libstdc++-v3/include/std/expected index 5dc1dfb..60f1565 100644 --- a/libstdc++-v3/include/std/expected +++ b/libstdc++-v3/include/std/expected @@ -1169,13 +1169,13 @@ namespace __expected return !__y.has_value() && bool(__x.error() == __y.error()); } - template<typename _Up> + template<typename _Up, same_as<_Tp> _Vp> requires (!__expected::__is_expected<_Up>) && requires (const _Tp& __t, const _Up& __u) { { __t == __u } -> convertible_to<bool>; } friend constexpr bool - operator==(const expected& __x, const _Up& __v) + operator==(const expected<_Vp, _Er>& __x, const _Up& __v) noexcept(noexcept(bool(*__x == __v))) { return __x.has_value() && bool(*__x == __v); } diff --git a/libstdc++-v3/include/std/format b/libstdc++-v3/include/std/format index b3192cf..b1823db 100644 --- a/libstdc++-v3/include/std/format +++ b/libstdc++-v3/include/std/format @@ -1863,20 +1863,24 @@ namespace __format _Spec<_CharT> _M_spec{}; }; +#ifdef __BFLT16_DIG__ + using __bflt16_t = decltype(0.0bf16); +#endif + // Decide how 128-bit floating-point types should be formatted (or not). - // When supported, the typedef __format::__float128_t is the type that - // format arguments should be converted to for storage in basic_format_arg. + // When supported, the typedef __format::__flt128_t is the type that format + // arguments should be converted to before passing them to __formatter_fp. // Define the macro _GLIBCXX_FORMAT_F128 to say they're supported. - // _GLIBCXX_FORMAT_F128=1 means __float128, _Float128 etc. will be formatted - // by converting them to long double (or __ieee128 for powerpc64le). - // _GLIBCXX_FORMAT_F128=2 means basic_format_arg needs to enable explicit - // support for _Float128, rather than formatting it as another type. + // The __float128, _Float128 will be formatted by converting them to: + // __ieee128 (same as __float128) when _GLIBCXX_FORMAT_F128=1, + // long double when _GLIBCXX_FORMAT_F128=2, + // _Float128 when _GLIBCXX_FORMAT_F128=3. #undef _GLIBCXX_FORMAT_F128 #ifdef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT // Format 128-bit floating-point types using __ieee128. - using __float128_t = __ieee128; + using __flt128_t = __ieee128; # define _GLIBCXX_FORMAT_F128 1 #ifdef __LONG_DOUBLE_IEEE128__ @@ -1910,14 +1914,14 @@ namespace __format #elif defined _GLIBCXX_LDOUBLE_IS_IEEE_BINARY128 // Format 128-bit floating-point types using long double. - using __float128_t = long double; -# define _GLIBCXX_FORMAT_F128 1 + using __flt128_t = long double; +# define _GLIBCXX_FORMAT_F128 2 #elif __FLT128_DIG__ && defined(_GLIBCXX_HAVE_FLOAT128_MATH) // Format 128-bit floating-point types using _Float128. - using __float128_t = _Float128; -# define _GLIBCXX_FORMAT_F128 2 + using __flt128_t = _Float128; +# define _GLIBCXX_FORMAT_F128 3 # if __cplusplus == 202002L // These overloads exist in the library, but are not declared for C++20. @@ -2947,8 +2951,8 @@ namespace __format }; #endif -#if defined(__FLT128_DIG__) && _GLIBCXX_FORMAT_F128 == 1 - // Reuse __formatter_fp<C>::format<__float128_t, Out> for _Float128. +#if defined(__FLT128_DIG__) && _GLIBCXX_FORMAT_F128 + // Use __formatter_fp<C>::format<__format::__flt128_t, Out> for _Float128. template<__format::__char _CharT> struct formatter<_Float128, _CharT> { @@ -2962,17 +2966,45 @@ namespace __format template<typename _Out> typename basic_format_context<_Out, _CharT>::iterator format(_Float128 __u, basic_format_context<_Out, _CharT>& __fc) const - { return _M_f.format((__format::__float128_t)__u, __fc); } + { return _M_f.format((__format::__flt128_t)__u, __fc); } private: __format::__formatter_fp<_CharT> _M_f; }; #endif +#if defined(__SIZEOF_FLOAT128__) && _GLIBCXX_FORMAT_F128 > 1 + // Reuse __formatter_fp<C>::format<__format::__flt128_t, Out> for __float128. + // This formatter is not declared if _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT is true, + // as __float128 when present is same type as __ieee128, which may be same as + // long double. + template<__format::__char _CharT> + struct formatter<__float128, _CharT> + { + formatter() = default; + + [[__gnu__::__always_inline__]] + constexpr typename basic_format_parse_context<_CharT>::iterator + parse(basic_format_parse_context<_CharT>& __pc) + { return _M_f.parse(__pc); } + + template<typename _Out> + typename basic_format_context<_Out, _CharT>::iterator + format(__float128 __u, basic_format_context<_Out, _CharT>& __fc) const + { return _M_f.format((__format::__flt128_t)__u, __fc); } + + private: + __format::__formatter_fp<_CharT> _M_f; + + static_assert( !is_same_v<__float128, long double>, + "This specialization should not be used for long double" ); + }; +#endif + #if defined(__STDCPP_BFLOAT16_T__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) // Reuse __formatter_fp<C>::format<float, Out> for bfloat16_t. template<__format::__char _CharT> - struct formatter<__gnu_cxx::__bfloat16_t, _CharT> + struct formatter<__format::__bflt16_t, _CharT> { formatter() = default; @@ -3835,16 +3867,14 @@ namespace __format enum _Arg_t : unsigned char { _Arg_none, _Arg_bool, _Arg_c, _Arg_i, _Arg_u, _Arg_ll, _Arg_ull, _Arg_flt, _Arg_dbl, _Arg_ldbl, _Arg_str, _Arg_sv, _Arg_ptr, _Arg_handle, - _Arg_i128, _Arg_u128, - _Arg_bf16, _Arg_f16, _Arg_f32, _Arg_f64, // These are unused. + _Arg_i128, _Arg_u128, _Arg_float128, + _Arg_bf16, _Arg_f16, _Arg_f32, _Arg_f64, + _Arg_max_, + #ifdef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT - _Arg_next_value_, - _Arg_f128 = _Arg_ldbl, - _Arg_ibm128 = _Arg_next_value_, -#else - _Arg_f128, + _Arg_ibm128 = _Arg_ldbl, + _Arg_ieee128 = _Arg_float128, #endif - _Arg_max_ }; template<typename _Context> @@ -3871,6 +3901,12 @@ namespace __format double _M_dbl; #ifndef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT // No long double if it's ambiguous. long double _M_ldbl; +#else + __ibm128 _M_ibm128; + __ieee128 _M_ieee128; +#endif +#ifdef __SIZEOF_FLOAT128__ + __float128 _M_float128; #endif const _CharT* _M_str; basic_string_view<_CharT> _M_sv; @@ -3880,11 +3916,17 @@ namespace __format __int128 _M_i128; unsigned __int128 _M_u128; #endif -#ifdef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT - __ieee128 _M_f128; - __ibm128 _M_ibm128; -#elif _GLIBCXX_FORMAT_F128 == 2 - __float128_t _M_f128; +#ifdef __BFLT16_DIG__ + __bflt16_t _M_bf16; +#endif +#ifdef __FLT16_DIG__ + _Float16 _M_f16; +#endif +#ifdef __FLT32_DIG__ + _Float32 _M_f32; +#endif +#ifdef __FLT64_DIG__ + _Float64 _M_f64; #endif }; @@ -3922,10 +3964,14 @@ namespace __format else if constexpr (is_same_v<_Tp, long double>) return __u._M_ldbl; #else - else if constexpr (is_same_v<_Tp, __ieee128>) - return __u._M_f128; else if constexpr (is_same_v<_Tp, __ibm128>) return __u._M_ibm128; + else if constexpr (is_same_v<_Tp, __ieee128>) + return __u._M_ieee128; +#endif +#ifdef __SIZEOF_FLOAT128__ + else if constexpr (is_same_v<_Tp, __float128>) + return __u._M_float128; #endif else if constexpr (is_same_v<_Tp, const _CharT*>) return __u._M_str; @@ -3939,9 +3985,21 @@ namespace __format else if constexpr (is_same_v<_Tp, unsigned __int128>) return __u._M_u128; #endif -#if _GLIBCXX_FORMAT_F128 == 2 - else if constexpr (is_same_v<_Tp, __float128_t>) - return __u._M_f128; +#ifdef __BFLT16_DIG__ + else if constexpr (is_same_v<_Tp, __bflt16_t>) + return __u._M_bf16; +#endif +#ifdef __FLT16_DIG__ + else if constexpr (is_same_v<_Tp, _Float16>) + return __u._M_f16; +#endif +#ifdef __FLT32_DIG__ + else if constexpr (is_same_v<_Tp, _Float32>) + return __u._M_f32; +#endif +#ifdef __FLT64_DIG__ + else if constexpr (is_same_v<_Tp, _Float64>) + return __u._M_f64; #endif else if constexpr (derived_from<_Tp, _HandleBase>) return static_cast<_Tp&>(__u._M_handle); @@ -4120,36 +4178,25 @@ namespace __format else if constexpr (is_same_v<_Td, __ieee128>) return type_identity<__ieee128>(); #endif - -#if defined(__FLT16_DIG__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) - else if constexpr (is_same_v<_Td, _Float16>) - return type_identity<float>(); +#if defined(__SIZEOF_FLOAT128__) && _GLIBCXX_FORMAT_F128 + else if constexpr (is_same_v<_Td, __float128>) + return type_identity<__float128>(); #endif - -#if defined(__BFLT16_DIG__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) - else if constexpr (is_same_v<_Td, decltype(0.0bf16)>) - return type_identity<float>(); +#if defined(__STDCPP_BFLOAT16_T__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) + else if constexpr (is_same_v<_Td, __format::__bflt16_t>) + return type_identity<__format::__bflt16_t>(); +#endif +#if defined(__STDCPP_FLOAT16_T__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) + else if constexpr (is_same_v<_Td, _Float16>) + return type_identity<_Float16>(); #endif - #if defined(__FLT32_DIG__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) else if constexpr (is_same_v<_Td, _Float32>) - return type_identity<float>(); + return type_identity<_Float32>(); #endif - #if defined(__FLT64_DIG__) && defined(_GLIBCXX_DOUBLE_IS_IEEE_BINARY64) else if constexpr (is_same_v<_Td, _Float64>) - return type_identity<double>(); -#endif - -#if _GLIBCXX_FORMAT_F128 -# if __FLT128_DIG__ - else if constexpr (is_same_v<_Td, _Float128>) - return type_identity<__format::__float128_t>(); -# endif -# if __SIZEOF_FLOAT128__ - else if constexpr (is_same_v<_Td, __float128>) - return type_identity<__format::__float128_t>(); -# endif + return type_identity<_Float64>(); #endif else if constexpr (__is_specialization_of<_Td, basic_string_view> || __is_specialization_of<_Td, basic_string>) @@ -4205,7 +4252,27 @@ namespace __format else if constexpr (is_same_v<_Tp, __ibm128>) return _Arg_ibm128; else if constexpr (is_same_v<_Tp, __ieee128>) - return _Arg_f128; + return _Arg_ieee128; +#endif +#if defined(__SIZEOF_FLOAT128__) && _GLIBCXX_FORMAT_F128 + else if constexpr (is_same_v<_Tp, __float128>) + return _Arg_float128; +#endif +#if defined(__STDCPP_BFLOAT16_T__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) + else if constexpr (is_same_v<_Tp, __format::__bflt16_t>) + return _Arg_bf16; +#endif +#if defined(__STDCPP_FLOAT16_T__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) + else if constexpr (is_same_v<_Tp, _Float16>) + return _Arg_f16; +#endif +#if defined(__FLT32_DIG__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) + else if constexpr (is_same_v<_Tp, _Float32>) + return _Arg_f32; +#endif +#if defined(__FLT64_DIG__) && defined(_GLIBCXX_DOUBLE_IS_IEEE_BINARY64) + else if constexpr (is_same_v<_Tp, _Float64>) + return _Arg_f64; #endif else if constexpr (is_same_v<_Tp, const _CharT*>) return _Arg_str; @@ -4219,11 +4286,6 @@ namespace __format else if constexpr (is_same_v<_Tp, unsigned __int128>) return _Arg_u128; #endif - -#if _GLIBCXX_FORMAT_F128 == 2 - else if constexpr (is_same_v<_Tp, __format::__float128_t>) - return _Arg_f128; -#endif else if constexpr (is_same_v<_Tp, handle>) return _Arg_handle; } @@ -4296,13 +4358,33 @@ namespace __format #ifndef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT case _Arg_ldbl: return std::forward<_Visitor>(__vis)(_M_val._M_ldbl); +#if defined(__SIZEOF_FLOAT128__) && _GLIBCXX_FORMAT_F128 + case _Arg_float128: + return std::forward<_Visitor>(__vis)(_M_val._M_float128); +#endif #else - case _Arg_f128: - return std::forward<_Visitor>(__vis)(_M_val._M_f128); case _Arg_ibm128: return std::forward<_Visitor>(__vis)(_M_val._M_ibm128); + case _Arg_ieee128: + return std::forward<_Visitor>(__vis)(_M_val._M_ieee128); #endif +#if defined(__STDCPP_BFLOAT16_T__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) + case _Arg_bf16: + return std::forward<_Visitor>(__vis)(_M_val._M_bf16); +#endif +#if defined(__STDCPP_FLOAT16_T__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) + case _Arg_f16: + return std::forward<_Visitor>(__vis)(_M_val._M_f16); +#endif +#if defined(__FLT32_DIG__) && defined(_GLIBCXX_FLOAT_IS_IEEE_BINARY32) + case _Arg_f32: + return std::forward<_Visitor>(__vis)(_M_val._M_f32); #endif +#if defined(__FLT64_DIG__) && defined(_GLIBCXX_DOUBLE_IS_IEEE_BINARY64) + case _Arg_f64: + return std::forward<_Visitor>(__vis)(_M_val._M_f64); +#endif +#endif // __glibcxx_to_chars case _Arg_str: return std::forward<_Visitor>(__vis)(_M_val._M_str); case _Arg_sv: @@ -4320,14 +4402,7 @@ namespace __format case _Arg_u128: return std::forward<_Visitor>(__vis)(_M_val._M_u128); #endif - -#if _GLIBCXX_FORMAT_F128 == 2 - case _Arg_f128: - return std::forward<_Visitor>(__vis)(_M_val._M_f128); -#endif - default: - // _Arg_f16 etc. __builtin_unreachable(); } } @@ -5389,13 +5464,22 @@ namespace __format debug_string }; - /// @cond undocumented + /** @brief A constant determining how a range should be formatted. + * + * The primary template of `std::format_kind` cannot be instantiated. + * There is a partial specialization for input ranges and you can + * specialize the variable template for your own cv-unqualified types + * that satisfy the `ranges::input_range` concept. + * + * @since C++23 + */ template<typename _Rg> - constexpr auto format_kind = - __primary_template_not_defined( - format_kind<_Rg> // you can specialize this for non-const input ranges - ); + constexpr auto format_kind = []{ + static_assert(false, "cannot use primary template of 'std::format_kind'"); + return type_identity<_Rg>{}; + }(); + /// @cond undocumented template<typename _Tp> consteval range_format __fmt_kind() diff --git a/libstdc++-v3/include/std/functional b/libstdc++-v3/include/std/functional index 1077e96..9a55b18 100644 --- a/libstdc++-v3/include/std/functional +++ b/libstdc++-v3/include/std/functional @@ -52,6 +52,20 @@ #if __cplusplus >= 201103L +#define __glibcxx_want_boyer_moore_searcher +#define __glibcxx_want_bind_front +#define __glibcxx_want_bind_back +#define __glibcxx_want_constexpr_functional +#define __glibcxx_want_copyable_function +#define __glibcxx_want_invoke +#define __glibcxx_want_invoke_r +#define __glibcxx_want_move_only_function +#define __glibcxx_want_not_fn +#define __glibcxx_want_ranges +#define __glibcxx_want_reference_wrapper +#define __glibcxx_want_transparent_operators +#include <bits/version.h> + #include <tuple> #include <type_traits> #include <bits/functional_hash.h> @@ -72,23 +86,10 @@ # include <bits/ranges_cmp.h> // std::identity, ranges::equal_to etc. # include <compare> #endif -#if __cplusplus > 202002L && _GLIBCXX_HOSTED -# include <bits/move_only_function.h> +#if defined(__glibcxx_move_only_function) || defined(__glibcxx_copyable_function) +# include <bits/funcwrap.h> #endif -#define __glibcxx_want_boyer_moore_searcher -#define __glibcxx_want_bind_front -#define __glibcxx_want_bind_back -#define __glibcxx_want_constexpr_functional -#define __glibcxx_want_invoke -#define __glibcxx_want_invoke_r -#define __glibcxx_want_move_only_function -#define __glibcxx_want_not_fn -#define __glibcxx_want_ranges -#define __glibcxx_want_reference_wrapper -#define __glibcxx_want_transparent_operators -#include <bits/version.h> - #endif // C++11 namespace std _GLIBCXX_VISIBILITY(default) diff --git a/libstdc++-v3/include/std/mdspan b/libstdc++-v3/include/std/mdspan index aee96dd..47cfa40 100644 --- a/libstdc++-v3/include/std/mdspan +++ b/libstdc++-v3/include/std/mdspan @@ -163,10 +163,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _IndexType, size_t... _Extents> class extents { - static_assert(is_integral_v<_IndexType>, "_IndexType must be integral."); + static_assert(__is_standard_integer<_IndexType>::value, + "IndexType must be a signed or unsigned integer type"); static_assert( (__mdspan::__valid_static_extent<_Extents, _IndexType> && ...), - "Extents must either be dynamic or representable as _IndexType"); + "Extents must either be dynamic or representable as IndexType"); public: using index_type = _IndexType; diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index b3f89c0..e575a81 100644 --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -733,7 +733,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } } -#ifdef __cpp_lib_scoped_lock // C++ >= 17 && hosted && gthread +#ifdef __cpp_lib_scoped_lock // C++ >= 17 /** @brief A scoped lock type for multiple lockable objects. * * A scoped_lock controls mutex ownership within a scope, releasing diff --git a/libstdc++-v3/include/std/utility b/libstdc++-v3/include/std/utility index 1c15c75..8a85ccf 100644 --- a/libstdc++-v3/include/std/utility +++ b/libstdc++-v3/include/std/utility @@ -201,7 +201,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef __cpp_lib_to_underlying // C++ >= 23 /// Convert an object of enumeration type to its underlying type. template<typename _Tp> - [[nodiscard]] + [[nodiscard, __gnu__::__always_inline__]] constexpr underlying_type_t<_Tp> to_underlying(_Tp __value) noexcept { return static_cast<underlying_type_t<_Tp>>(__value); } diff --git a/libstdc++-v3/python/hook.in b/libstdc++-v3/python/hook.in index d63909d..74a097c 100644 --- a/libstdc++-v3/python/hook.in +++ b/libstdc++-v3/python/hook.in @@ -55,10 +55,14 @@ if gdb.current_objfile () is not None: if not dir_ in sys.path: sys.path.insert(0, dir_) - gdb.execute('skip -rfu ^std::(move|forward|as_const|(__)?addressof)') - gdb.execute('skip -rfu ^std::(shared|unique)_ptr<.*>::(get|operator)') - gdb.execute('skip -rfu ^std::(basic_string|vector|array|deque|(forward_)?list|(unordered_|flat_)?(multi)?(map|set)|span)<.*>::(c?r?(begin|end)|front|back|data|size|empty)') - gdb.execute('skip -rfu ^std::(basic_string|vector|array|deque|span)<.*>::operator.]') + gdb.execute('skip -rfu ^std::(move|forward|as_const|(__)?addressof)', + to_string=True) + gdb.execute('skip -rfu ^std::(shared|unique)_ptr<.*>::(get|operator)', + to_string=True) + gdb.execute('skip -rfu ^std::(basic_string|vector|array|deque|(forward_)?list|(unordered_|flat_)?(multi)?(map|set)|span)<.*>::(c?r?(begin|end)|front|back|data|size|empty)', + to_string=True) + gdb.execute('skip -rfu ^std::(basic_string|vector|array|deque|span)<.*>::operator.]', + to_string=True) # Call a function as a plain import would not execute body of the included file # on repeated reloads of this object file. diff --git a/libstdc++-v3/src/c++23/std.cc.in b/libstdc++-v3/src/c++23/std.cc.in index d45ae63..417c8a1 100644 --- a/libstdc++-v3/src/c++23/std.cc.in +++ b/libstdc++-v3/src/c++23/std.cc.in @@ -1412,6 +1412,9 @@ export namespace std #if __cpp_lib_move_only_function using std::move_only_function; #endif +#if __cpp_lib_copyable_function + using std::copyable_function; +#endif using std::multiplies; using std::negate; using std::not_equal_to; diff --git a/libstdc++-v3/testsuite/18_support/headers/ciso646/macros-2.cc b/libstdc++-v3/testsuite/18_support/headers/ciso646/macros-2.cc new file mode 100644 index 0000000..a492924 --- /dev/null +++ b/libstdc++-v3/testsuite/18_support/headers/ciso646/macros-2.cc @@ -0,0 +1,7 @@ +// { dg-options " -Wdeprecated -fno-operator-names" } +// { dg-do preprocess } + +// Should get a warning for C++20 and up without -D_GLIBCXX_USE_DEPRECATED=0 +// { dg-warning "not a standard header" "" { target c++20 } 0 } + +#include "macros.cc" diff --git a/libstdc++-v3/testsuite/18_support/headers/ciso646/macros.cc b/libstdc++-v3/testsuite/18_support/headers/ciso646/macros.cc index ab3a041..0cb5168 100644 --- a/libstdc++-v3/testsuite/18_support/headers/ciso646/macros.cc +++ b/libstdc++-v3/testsuite/18_support/headers/ciso646/macros.cc @@ -3,7 +3,6 @@ #include <ciso646> -// { dg-warning "deprecated" "" { target c++17_only } 0 } // { dg-error "not a standard header" "" { target c++20 } 0 } #ifdef and diff --git a/libstdc++-v3/testsuite/20_util/copyable_function/call.cc b/libstdc++-v3/testsuite/20_util/copyable_function/call.cc new file mode 100644 index 0000000..cf99757 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/copyable_function/call.cc @@ -0,0 +1,224 @@ +// { dg-do run { target c++26 } } +// { dg-require-effective-target hosted } + +#include <functional> +#include <utility> +#include <testsuite_hooks.h> + +using std::copyable_function; + +using std::is_same_v; +using std::is_invocable_v; +using std::is_nothrow_invocable_v; +using std::invoke_result_t; + +// Check return types +static_assert( is_same_v<void, invoke_result_t<copyable_function<void()>>> ); +static_assert( is_same_v<int, invoke_result_t<copyable_function<int()>>> ); +static_assert( is_same_v<int&, invoke_result_t<copyable_function<int&()>>> ); + +// With const qualifier +static_assert( ! is_invocable_v< copyable_function<void()> const > ); +static_assert( ! is_invocable_v< copyable_function<void()> const &> ); +static_assert( is_invocable_v< copyable_function<void() const> > ); +static_assert( is_invocable_v< copyable_function<void() const> &> ); +static_assert( is_invocable_v< copyable_function<void() const> const > ); +static_assert( is_invocable_v< copyable_function<void() const> const &> ); + +// With no ref-qualifier +static_assert( is_invocable_v< copyable_function<void()> > ); +static_assert( is_invocable_v< copyable_function<void()> &> ); +static_assert( is_invocable_v< copyable_function<void() const> > ); +static_assert( is_invocable_v< copyable_function<void() const> &> ); +static_assert( is_invocable_v< copyable_function<void() const> const > ); +static_assert( is_invocable_v< copyable_function<void() const> const &> ); + +// With & ref-qualifier +static_assert( ! is_invocable_v< copyable_function<void()&> > ); +static_assert( is_invocable_v< copyable_function<void()&> &> ); +static_assert( is_invocable_v< copyable_function<void() const&> > ); +static_assert( is_invocable_v< copyable_function<void() const&> &> ); +static_assert( is_invocable_v< copyable_function<void() const&> const > ); +static_assert( is_invocable_v< copyable_function<void() const&> const &> ); + +// With && ref-qualifier +static_assert( is_invocable_v< copyable_function<void()&&> > ); +static_assert( ! is_invocable_v< copyable_function<void()&&> &> ); +static_assert( is_invocable_v< copyable_function<void() const&&> > ); +static_assert( ! is_invocable_v< copyable_function<void() const&&> &> ); +static_assert( is_invocable_v< copyable_function<void() const&&> const > ); +static_assert( ! is_invocable_v< copyable_function<void() const&&> const &> ); + +// With noexcept-specifier +static_assert( ! is_nothrow_invocable_v< copyable_function<void()> > ); +static_assert( ! is_nothrow_invocable_v< copyable_function<void() noexcept(false)> > ); +static_assert( is_nothrow_invocable_v< copyable_function<void() noexcept> > ); +static_assert( is_nothrow_invocable_v< copyable_function<void()& noexcept>& > ); + +void +test01() +{ + struct F + { + int operator()() { return 0; } + int operator()() const { return 1; } + }; + + copyable_function<int()> f0{F{}}; + VERIFY( f0() == 0 ); + VERIFY( std::move(f0)() == 0 ); + + copyable_function<int() const> f1{F{}}; + VERIFY( f1() == 1 ); + VERIFY( std::as_const(f1)() == 1 ); + VERIFY( std::move(f1)() == 1 ); + VERIFY( std::move(std::as_const(f1))() == 1 ); + + copyable_function<int()&> f2{F{}}; + VERIFY( f2() == 0 ); + // Not rvalue-callable: std::move(f2)() + + copyable_function<int() const&> f3{F{}}; + VERIFY( f3() == 1 ); + VERIFY( std::as_const(f3)() == 1 ); + VERIFY( std::move(f3)() == 1 ); + VERIFY( std::move(std::as_const(f3))() == 1 ); + + copyable_function<int()&&> f4{F{}}; + // Not lvalue-callable: f4() + VERIFY( std::move(f4)() == 0 ); + + copyable_function<int() const&&> f5{F{}}; + // Not lvalue-callable: f5() + VERIFY( std::move(f5)() == 1 ); + VERIFY( std::move(std::as_const(f5))() == 1 ); +} + +void +test02() +{ + struct F + { + int operator()() & { return 0; } + int operator()() && { return 1; } + }; + + copyable_function<int()> f0{F{}}; + VERIFY( f0() == 0 ); + VERIFY( std::move(f0)() == 0 ); + + copyable_function<int()&&> f1{F{}}; + // Not lvalue callable: f1() + VERIFY( std::move(f1)() == 1 ); + + copyable_function<int()&> f2{F{}}; + VERIFY( f2() == 0 ); + // Not rvalue-callable: std::move(f2)() +} + +void +test03() +{ + struct F + { + int operator()() const & { return 0; } + int operator()() && { return 1; } + }; + + copyable_function<int()> f0{F{}}; + VERIFY( f0() == 0 ); + VERIFY( std::move(f0)() == 0 ); + + copyable_function<int()&&> f1{F{}}; + // Not lvalue callable: f1() + VERIFY( std::move(f1)() == 1 ); + + copyable_function<int() const> f2{F{}}; + VERIFY( f2() == 0 ); + VERIFY( std::as_const(f2)() == 0 ); + VERIFY( std::move(f2)() == 0 ); + VERIFY( std::move(std::as_const(f2))() == 0 ); + + copyable_function<int() const &&> f3{F{}}; + // Not lvalue callable: f3() + VERIFY( std::move(f3)() == 0 ); + VERIFY( std::move(std::as_const(f3))() == 0 ); + + copyable_function<int() const &> f4{F{}}; + VERIFY( f4() == 0 ); + VERIFY( std::as_const(f4)() == 0 ); + // Not rvalue-callable: std::move(f4)() +} + +void +test04() +{ + struct F + { + int operator()() & { return 0; } + int operator()() && { return 1; } + int operator()() const & { return 2; } + int operator()() const && { return 3; } + }; + + copyable_function<int()> f0{F{}}; + VERIFY( f0() == 0 ); + VERIFY( std::move(f0)() == 0 ); + + copyable_function<int()&> f1{F{}}; + VERIFY( f1() == 0 ); + // Not rvalue-callable: std::move(f1)() + + copyable_function<int()&&> f2{F{}}; + // Not lvalue callable: f2() + VERIFY( std::move(f2)() == 1 ); + + copyable_function<int() const> f3{F{}}; + VERIFY( f3() == 2 ); + VERIFY( std::as_const(f3)() == 2 ); + VERIFY( std::move(f3)() == 2 ); + VERIFY( std::move(std::as_const(f3))() == 2 ); + + copyable_function<int() const &> f4{F{}}; + VERIFY( f4() == 2 ); + VERIFY( std::as_const(f4)() == 2 ); + // Not rvalue-callable: std::move(f4)() + + copyable_function<int() const &&> f5{F{}}; + // Not lvalue callable: f5() + VERIFY( std::move(f5)() == 3 ); + VERIFY( std::move(std::as_const(f5))() == 3 ); +} + +void +test05() +{ + int (*fp)() = [] { return 0; }; + copyable_function<int()> f0{fp}; + VERIFY( f0() == 0 ); + VERIFY( std::move(f0)() == 0 ); + + const copyable_function<int() const> f1{fp}; + VERIFY( f1() == 0 ); + VERIFY( std::move(f1)() == 0 ); +} + +struct Incomplete; + +void +test_params() +{ + std::copyable_function<void(Incomplete)> f1; + std::copyable_function<void(Incomplete&)> f2; + std::copyable_function<void(Incomplete&&)> f3; +} + +int main() +{ + test01(); + test02(); + test03(); + test04(); + test05(); + test_params(); +} diff --git a/libstdc++-v3/testsuite/20_util/copyable_function/cons.cc b/libstdc++-v3/testsuite/20_util/copyable_function/cons.cc new file mode 100644 index 0000000..8d422dc --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/copyable_function/cons.cc @@ -0,0 +1,126 @@ +// { dg-do compile { target c++26 } } +// { dg-require-effective-target hosted } +// { dg-add-options no_pch } + +#include <functional> + +#ifndef __cpp_lib_copyable_function +# error "Feature-test macro for copyable_function missing in <functional>" +#elif __cpp_lib_copyable_function != 202306L +# error "Feature-test macro for copyable_function has wrong value in <functional>" +#endif + +using std::copyable_function; + +using std::is_constructible_v; +using std::is_copy_constructible_v; +using std::is_nothrow_default_constructible_v; +using std::is_nothrow_move_constructible_v; +using std::is_nothrow_constructible_v; +using std::nullptr_t; +using std::in_place_type_t; + +static_assert( is_nothrow_default_constructible_v<copyable_function<void()>> ); +static_assert( is_nothrow_constructible_v<copyable_function<void()>, nullptr_t> ); +static_assert( is_nothrow_move_constructible_v<copyable_function<void()>> ); +static_assert( is_copy_constructible_v<copyable_function<void()>> ); + +static_assert( is_constructible_v<copyable_function<void()>, void()> ); +static_assert( is_constructible_v<copyable_function<void()>, void(&)()> ); +static_assert( is_constructible_v<copyable_function<void()>, void(*)()> ); +static_assert( is_constructible_v<copyable_function<void()>, int()> ); +static_assert( is_constructible_v<copyable_function<void()>, int(&)()> ); +static_assert( is_constructible_v<copyable_function<void()>, int(*)()> ); +static_assert( ! is_constructible_v<copyable_function<void()>, void(int)> ); +static_assert( is_constructible_v<copyable_function<void(int)>, void(int)> ); + +static_assert( is_constructible_v<copyable_function<void(int)>, + in_place_type_t<void(*)(int)>, void(int)> ); + +static_assert( is_constructible_v<copyable_function<void()>, + void() noexcept> ); +static_assert( is_constructible_v<copyable_function<void() noexcept>, + void() noexcept> ); +static_assert( ! is_constructible_v<copyable_function<void() noexcept>, + void() > ); + +struct Q +{ + void operator()() const &; + void operator()() &&; +}; + +static_assert( is_constructible_v<copyable_function<void()>, Q> ); +static_assert( is_constructible_v<copyable_function<void() const>, Q> ); +static_assert( is_constructible_v<copyable_function<void() &>, Q> ); +static_assert( is_constructible_v<copyable_function<void() const &>, Q> ); +static_assert( is_constructible_v<copyable_function<void() &&>, Q> ); +static_assert( is_constructible_v<copyable_function<void() const &&>, Q> ); + +struct R +{ + void operator()() &; + void operator()() &&; +}; + +static_assert( is_constructible_v<copyable_function<void()>, R> ); +static_assert( is_constructible_v<copyable_function<void()&>, R> ); +static_assert( is_constructible_v<copyable_function<void()&&>, R> ); +static_assert( ! is_constructible_v<copyable_function<void() const>, R> ); +static_assert( ! is_constructible_v<copyable_function<void() const&>, R> ); +static_assert( ! is_constructible_v<copyable_function<void() const&&>, R> ); + +// The following nothrow-constructible guarantees are a GCC extension, +// not required by the standard. + +static_assert( is_nothrow_constructible_v<copyable_function<void()>, void()> ); +static_assert( is_nothrow_constructible_v<copyable_function<void(int)>, + in_place_type_t<void(*)(int)>, + void(int)> ); + +// These types are all small and nothrow move constructible +struct F { void operator()(); }; +struct G { void operator()() const; }; +static_assert( is_nothrow_constructible_v<copyable_function<void()>, F> ); +static_assert( is_nothrow_constructible_v<copyable_function<void()>, G> ); +static_assert( is_nothrow_constructible_v<copyable_function<void() const>, G> ); + +struct H { + H(int); + H(int, int) noexcept; + void operator()() noexcept; +}; +static_assert( is_nothrow_constructible_v<copyable_function<void()>, H> ); +static_assert( is_nothrow_constructible_v<copyable_function<void() noexcept>, + H> ); +static_assert( ! is_nothrow_constructible_v<copyable_function<void() noexcept>, + in_place_type_t<H>, int> ); +static_assert( is_nothrow_constructible_v<copyable_function<void() noexcept>, + in_place_type_t<H>, int, int> ); + +struct I { + I(int, const char*); + I(std::initializer_list<char>); + int operator()() const noexcept; +}; + +static_assert( is_constructible_v<copyable_function<void()>, + std::in_place_type_t<I>, + int, const char*> ); +static_assert( is_constructible_v<copyable_function<void()>, + std::in_place_type_t<I>, + std::initializer_list<char>> ); + +void +test_instantiation() +{ + // Instantiate the constructor bodies + copyable_function<void()> f0; + copyable_function<void()> f1(nullptr); + copyable_function<void()> f2( I(1, "two") ); + copyable_function<void()> f3(std::in_place_type<I>, 3, "four"); + copyable_function<void()> f4(std::in_place_type<I>, // PR libstdc++/102825 + { 'P', 'R', '1', '0', '2', '8', '2', '5'}); + auto f5 = std::move(f4); + f4 = std::move(f5); +} diff --git a/libstdc++-v3/testsuite/20_util/copyable_function/conv.cc b/libstdc++-v3/testsuite/20_util/copyable_function/conv.cc new file mode 100644 index 0000000..e678e16 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/copyable_function/conv.cc @@ -0,0 +1,251 @@ +// { dg-do run { target c++26 } } +// { dg-require-effective-target hosted } + +#include <functional> +#include <testsuite_hooks.h> + +using std::copyable_function; + +static_assert( !std::is_constructible_v<std::copyable_function<void()>, + std::copyable_function<void()&>> ); +static_assert( !std::is_constructible_v<std::copyable_function<void()>, + std::copyable_function<void()&&>> ); +static_assert( !std::is_constructible_v<std::copyable_function<void()&>, + std::copyable_function<void()&&>> ); +static_assert( !std::is_constructible_v<std::copyable_function<void() const>, + std::copyable_function<void()>> ); + +// Non-trivial args, guarantess that type is not passed by copy +struct CountedArg +{ + CountedArg() = default; + CountedArg(const CountedArg& f) noexcept : counter(f.counter) { ++counter; } + CountedArg& operator=(CountedArg&&) = delete; + + int counter = 0; +}; +CountedArg const c; + +// When copyable_function or move_only_function is constructed from other copyable_function, +// the compiler can avoid double indirection per C++26 [func.wrap.general] p2. + +void +test01() +{ + auto f = [](CountedArg const& arg) noexcept { return arg.counter; }; + std::copyable_function<int(CountedArg) const noexcept> c1(f); + using CF = std::copyable_function<int(CountedArg) const noexcept>; + VERIFY( c1(c) == 1 ); + + std::copyable_function<int(CountedArg) const> c2a(c1); + VERIFY( c2a(c) == 1 ); + + std::copyable_function<int(CountedArg) const> c2b(static_cast<CF>(c1)); + VERIFY( c2b(c) == 1 ); + + std::move_only_function<int(CountedArg) const> m2a(c1); + VERIFY( m2a(c) == 1 ); + + std::move_only_function<int(CountedArg) const> m2b(static_cast<CF>(c1)); + VERIFY( m2b(c) == 1 ); + + std::copyable_function<int(CountedArg)> c3a(c1); + VERIFY( c3a(c) == 1 ); + + std::copyable_function<int(CountedArg)> c3b(static_cast<CF>(c1)); + VERIFY( c3b(c) == 1 ); + + std::move_only_function<int(CountedArg)> m3a(c1); + VERIFY( m3a(c) == 1 ); + + std::move_only_function<int(CountedArg)> m3b(static_cast<CF>(c1)); + VERIFY( m3b(c) == 1 ); + + // Invokers internally uses Counted&& for non-trivial types, + // sinature remain compatible. + std::copyable_function<int(CountedArg&&)> c4a(c1); + VERIFY( c4a({}) == 0 ); + + std::copyable_function<int(CountedArg&&)> c4b(static_cast<CF>(c1)); + VERIFY( c4b({}) == 0 ); + + std::move_only_function<int(CountedArg&&)> m4a(c1); + VERIFY( m4a({}) == 0 ); + + std::move_only_function<int(CountedArg&&)> m4b(static_cast<CF>(c1)); + VERIFY( m4b({}) == 0 ); + + std::copyable_function<int(CountedArg&&)&> c5a(c1); + VERIFY( c5a({}) == 0 ); + + std::copyable_function<int(CountedArg&&)&&> c5b(static_cast<CF>(c1)); + VERIFY( std::move(c5b)({}) == 0 ); + + std::move_only_function<int(CountedArg&&)&> m5a(c1); + VERIFY( m5a({}) == 0 ); + + std::move_only_function<int(CountedArg&&)&&> m5b(static_cast<CF>(c1)); + VERIFY( std::move(m5b)({}) == 0 ); + + // Incompatible signatures + std::copyable_function<long(CountedArg) const noexcept> c6a(c1); + VERIFY( c6a(c) == 2 ); + + std::copyable_function<long(CountedArg) const noexcept> c6b(static_cast<CF>(c1)); + VERIFY( c6b(c) == 2 ); + + std::move_only_function<long(CountedArg) const noexcept> m6a(c1); + VERIFY( m6a(c) == 2 ); + + std::move_only_function<long(CountedArg) const noexcept> m6b(static_cast<CF>(c1)); + VERIFY( m6b(c) == 2 ); +} + +void +test02() +{ + auto f = [](CountedArg const& arg) noexcept { return arg.counter; }; + std::copyable_function<int(CountedArg) const noexcept> c1(f); + using CF = std::copyable_function<int(CountedArg) const noexcept>; + VERIFY( c1(c) == 1 ); + + std::copyable_function<int(CountedArg) const> c2; + c2 = c1; + VERIFY( c2(c) == 1 ); + c2 = static_cast<CF>(c1); + VERIFY( c2(c) == 1 ); + + std::move_only_function<int(CountedArg) const> m2; + m2 = c1; + VERIFY( m2(c) == 1 ); + m2 = static_cast<CF>(c1); + VERIFY( m2(c) == 1 ); + + // Incompatible signatures + std::copyable_function<long(CountedArg) const noexcept> c3; + c3 = c1; + VERIFY( c3(c) == 2 ); + c3 = static_cast<CF>(c1); + VERIFY( c3(c) == 2 ); + + std::move_only_function<long(CountedArg) const noexcept> m3; + m3 = c1; + VERIFY( m3(c) == 2 ); + m3 = static_cast<CF>(c1); + VERIFY( m3(c) == 2 ); +} + +void +test03() +{ + std::copyable_function<int(long) const noexcept> c1; + VERIFY( c1 == nullptr ); + + std::copyable_function<int(long) const> c2(c1); + VERIFY( c2 == nullptr ); + c2 = c1; + VERIFY( c2 == nullptr ); + c2 = std::move(c1); + VERIFY( c2 == nullptr ); + + std::copyable_function<bool(int) const> c3(std::move(c1)); + VERIFY( c3 == nullptr ); + c3 = c1; + VERIFY( c3 == nullptr ); + c3 = std::move(c1); + VERIFY( c3 == nullptr ); + + // LWG4255 move_only_function constructor should recognize empty + // copyable_functions + std::move_only_function<int(long) const noexcept> m1(c1); + VERIFY( m1 == nullptr ); + m1 = c1; + VERIFY( m1 == nullptr ); + m1 = std::move(c1); + VERIFY( m1 == nullptr ); + + std::move_only_function<int(long) const> m2(c1); + VERIFY( m2 == nullptr ); + m2 = c1; + VERIFY( m2 == nullptr ); + m2 = std::move(c1); + VERIFY( m2 == nullptr ); + + std::move_only_function<bool(int) const> m3(std::move(c1)); + VERIFY( m3 == nullptr ); + m3 = c1; + VERIFY( m3 == nullptr ); + m3 = std::move(c1); + VERIFY( m3 == nullptr ); +} + +void +test04() +{ + struct F + { + int operator()(CountedArg const& arg) noexcept + { return arg.counter; } + + int operator()(CountedArg const& arg) const noexcept + { return arg.counter + 1000; } + }; + + F f; + std::copyable_function<int(CountedArg) const> c1(f); + VERIFY( c1(c) == 1001 ); + + // Call const overload as std::copyable_function<int(CountedArg) const> + // inside td::copyable_function<int(CountedArg)> would do. + std::copyable_function<int(CountedArg)> c2(c1); + VERIFY( c2(c) == 1001 ); + std::move_only_function<int(CountedArg)> m2(c1); + VERIFY( m2(c) == 1001 ); + + std::copyable_function<int(CountedArg)> m3(f); + VERIFY( m3(c) == 1 ); +} + +void +test05() +{ + auto f = [](CountedArg const& arg) noexcept { return arg.counter; }; + std::copyable_function<int(CountedArg)> w1(f); + // copyable_function stores copyable_function due incompatibile signatures + std::copyable_function<int(CountedArg const&)> w2(std::move(w1)); + // copy is made when passing to int(CountedArg) + VERIFY( w2(c) == 1 ); + // wrapped 3 times + w1 = std::move(w2); + VERIFY( w1(c) == 2 ); + // wrapped 4 times + w2 = std::move(w1); + VERIFY( w2(c) == 2 ); + // wrapped 5 times + w1 = std::move(w2); + VERIFY( w1(c) == 3 ); +} + +void +test06() +{ + // No special interoperability with std::function + auto f = [](CountedArg const& arg) noexcept { return arg.counter; }; + std::function<int(CountedArg)> f1(f); + std::copyable_function<int(CountedArg) const> c1(std::move(f1)); + VERIFY( c1(c) == 2 ); + + std::copyable_function<int(CountedArg) const> c2(f); + std::function<int(CountedArg)> f2(c2); + VERIFY( f2(c) == 2 ); +} + +int main() +{ + test01(); + test02(); + test03(); + test04(); + test05(); + test06(); +} diff --git a/libstdc++-v3/testsuite/20_util/copyable_function/copy.cc b/libstdc++-v3/testsuite/20_util/copyable_function/copy.cc new file mode 100644 index 0000000..6445a27 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/copyable_function/copy.cc @@ -0,0 +1,154 @@ +// { dg-do run { target c++26 } } +// { dg-require-effective-target hosted } + +#include <functional> +#include <testsuite_hooks.h> + +using std::copyable_function; + +void +test01() +{ + // Small type with non-throwing move constructor. Not allocated on the heap. + struct F + { + F() = default; + F(const F& f) : counters(f.counters) { ++counters.copy; } + F(F&& f) noexcept : counters(f.counters) { ++counters.move; } + + F& operator=(F&&) = delete; + + struct Counters + { + int copy = 0; + int move = 0; + } counters; + + const Counters& operator()() const { return counters; } + }; + + F f; + std::copyable_function<const F::Counters&() const> m1(f); + VERIFY( m1().copy == 1 ); + VERIFY( m1().move == 0 ); + + // This will copy construct a new target object + auto m2 = m1; + VERIFY( m1 != nullptr && m2 != nullptr ); + VERIFY( m2().copy == 2 ); + VERIFY( m2().move == 0 ); + + m1 = m2; + VERIFY( m1 != nullptr && m2 != nullptr ); + VERIFY( m1().copy == 3 ); + VERIFY( m1().move == 1 ); // Copies object first and then swaps + + m1 = m1; + VERIFY( m1 != nullptr && m2 != nullptr ); + VERIFY( m1().copy == 4 ); + VERIFY( m1().move == 2 ); // Copies object first and then swaps + + m2 = f; + VERIFY( m2().copy == 1 ); + VERIFY( m2().move == 1 ); // Copy construct target object, then swap into m2. +} + +void +test02() +{ + // Move constructor is potentially throwing. Allocated on the heap. + struct F + { + F() = default; + F(const F& f) noexcept : counters(f.counters) { ++counters.copy; } + F(F&& f) noexcept(false) : counters(f.counters) { ++counters.move; } + + F& operator=(F&&) = delete; + + struct Counters + { + int copy = 0; + int move = 0; + } counters; + + Counters operator()() const noexcept { return counters; } + }; + + F f; + std::copyable_function<F::Counters() const> m1(f); + VERIFY( m1().copy == 1 ); + VERIFY( m1().move == 0 ); + + // The target object is on the heap, but we need to allocate new one + auto m2 = m1; + VERIFY( m1 != nullptr && m2 != nullptr ); + VERIFY( m2().copy == 2 ); + VERIFY( m2().move == 0 ); + + m1 = m2; + VERIFY( m1 != nullptr && m2 != nullptr ); + VERIFY( m1().copy == 3 ); + VERIFY( m1().move == 0 ); + + m1 = m1; + VERIFY( m1 != nullptr && m2 != nullptr ); + VERIFY( m1().copy == 4 ); + VERIFY( m1().move == 0 ); + + m2 = f; + VERIFY( m2().copy == 1 ); + VERIFY( m2().move == 0 ); +} + +void +test03() +{ + // Small type with non-throwing, but not non-trivial move constructor. + struct F + { + F(int i) noexcept : id(i) {} + F(const F& f) : id(f.id) + { if (id == 3) throw id; } + F(F&& f) noexcept : id(f.id) { } + + int operator()() const + { return id; } + + int id; + }; + + std::copyable_function<int() const> m1(std::in_place_type<F>, 1); + const std::copyable_function<int() const> m2(std::in_place_type<F>, 2); + const std::copyable_function<int() const> m3(std::in_place_type<F>, 3); + + try + { + auto mc = m3; + VERIFY( false ); + } + catch(int i) + { + VERIFY( i == 3 ); + } + + m1 = m2; + VERIFY( m1() == 2 ); + + try + { + m1 = m3; + VERIFY( false ); + } + catch (int i) + { + VERIFY( i == 3 ); + } + VERIFY( m1() == 2 ); +} + +int main() +{ + test01(); + test02(); + test03(); +} diff --git a/libstdc++-v3/testsuite/20_util/copyable_function/move.cc b/libstdc++-v3/testsuite/20_util/copyable_function/move.cc new file mode 100644 index 0000000..ec9d0d1 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/copyable_function/move.cc @@ -0,0 +1,120 @@ +// { dg-do run { target c++26 } } +// { dg-require-effective-target hosted } + +#include <functional> +#include <testsuite_hooks.h> + +using std::copyable_function; + +void +test01() +{ + // Small type with non-throwing move constructor. Not allocated on the heap. + struct F + { + F() = default; + F(const F& f) : counters(f.counters) { ++counters.copy; } + F(F&& f) noexcept : counters(f.counters) { ++counters.move; } + + F& operator=(F&&) = delete; + + struct Counters + { + int copy = 0; + int move = 0; + } counters; + + const Counters& operator()() const { return counters; } + }; + + F f; + std::copyable_function<const F::Counters&() const> m1(f); + VERIFY( m1().copy == 1 ); + VERIFY( m1().move == 0 ); + + // Standard specifies move assigment as copy and swap + m1 = std::move(m1); + VERIFY( m1 != nullptr ); + VERIFY( m1().copy == 1 ); + VERIFY( m1().move == 0 ); + + // This will move construct a new target object and destroy the old one: + auto m2 = std::move(m1); + VERIFY( m1 == nullptr && m2 != nullptr ); + VERIFY( m2().copy == 1 ); + VERIFY( m2().move == 1 ); + + m1 = std::move(m2); + VERIFY( m1 != nullptr && m2 == nullptr ); + VERIFY( m1().copy == 1 ); + VERIFY( m1().move == 2 ); + + m2 = std::move(f); + VERIFY( m2().copy == 0 ); + VERIFY( m2().move == 2 ); // Move construct target object, then swap into m2. + const int moves = m1().move + m2().move; + // This will do three moves: + swap(m1, m2); + VERIFY( m1().copy == 0 ); + VERIFY( m2().copy == 1 ); + VERIFY( (m1().move + m2().move) == (moves + 3) ); +} + +void +test02() +{ + // Move constructor is potentially throwing. Allocated on the heap. + struct F + { + F() = default; + F(const F& f) noexcept : counters(f.counters) { ++counters.copy; } + F(F&& f) noexcept(false) : counters(f.counters) { ++counters.move; } + + F& operator=(F&&) = delete; + + struct Counters + { + int copy = 0; + int move = 0; + } counters; + + Counters operator()() const noexcept { return counters; } + }; + + F f; + std::copyable_function<F::Counters() const> m1(f); + VERIFY( m1().copy == 1 ); + VERIFY( m1().move == 0 ); + + m1 = std::move(m1); + VERIFY( m1 != nullptr ); + VERIFY( m1().copy == 1 ); + VERIFY( m1().move == 0 ); + + // The target object is on the heap so this just moves a pointer: + auto m2 = std::move(m1); + VERIFY( m1 == nullptr && m2 != nullptr ); + VERIFY( m2().copy == 1 ); + VERIFY( m2().move == 0 ); + + m1 = std::move(m2); + VERIFY( m1 != nullptr && m2 == nullptr ); + VERIFY( m1().copy == 1 ); + VERIFY( m1().move == 0 ); + + m2 = std::move(f); + VERIFY( m2().copy == 0 ); + VERIFY( m2().move == 1 ); + const int moves = m1().move + m2().move; + // This just swaps the pointers, so no moves: + swap(m1, m2); + VERIFY( m1().copy == 0 ); + VERIFY( m2().copy == 1 ); + VERIFY( (m1().move + m2().move) == moves ); +} + +int main() +{ + test01(); + test02(); +} diff --git a/libstdc++-v3/testsuite/20_util/expected/119714.cc b/libstdc++-v3/testsuite/20_util/expected/119714.cc new file mode 100644 index 0000000..a8dc6e8 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/expected/119714.cc @@ -0,0 +1,9 @@ +// { dg-do compile { target c++23 } } + +// PR libstdc++/119714 - constraint recursion with std::expected::operator== + +#include <expected> +#include <vector> + +using I = std::vector<std::expected<int,int>>::iterator; +static_assert(std::totally_ordered<I>); diff --git a/libstdc++-v3/testsuite/20_util/move_only_function/call.cc b/libstdc++-v3/testsuite/20_util/move_only_function/call.cc index bfc609a..217de37 100644 --- a/libstdc++-v3/testsuite/20_util/move_only_function/call.cc +++ b/libstdc++-v3/testsuite/20_util/move_only_function/call.cc @@ -190,6 +190,19 @@ test04() VERIFY( std::move(std::as_const(f5))() == 3 ); } +void +test05() +{ + int (*fp)() = [] { return 0; }; + move_only_function<int()> f0{fp}; + VERIFY( f0() == 0 ); + VERIFY( std::move(f0)() == 0 ); + + const move_only_function<int() const> f1{fp}; + VERIFY( f1() == 0 ); + VERIFY( std::move(f1)() == 0 ); +} + struct Incomplete; void @@ -206,5 +219,6 @@ int main() test02(); test03(); test04(); + test05(); test_params(); } diff --git a/libstdc++-v3/testsuite/20_util/move_only_function/conv.cc b/libstdc++-v3/testsuite/20_util/move_only_function/conv.cc new file mode 100644 index 0000000..3da5e9e --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/move_only_function/conv.cc @@ -0,0 +1,188 @@ +// { dg-do run { target c++23 } } +// { dg-require-effective-target hosted } + +#include <functional> +#include <testsuite_hooks.h> + +using std::move_only_function; + +static_assert( !std::is_constructible_v<std::move_only_function<void()>, + std::move_only_function<void()&>> ); +static_assert( !std::is_constructible_v<std::move_only_function<void()>, + std::move_only_function<void()&&>> ); +static_assert( !std::is_constructible_v<std::move_only_function<void()&>, + std::move_only_function<void()&&>> ); +static_assert( !std::is_constructible_v<std::move_only_function<void() const>, + std::move_only_function<void()>> ); + +// Non-trivial args, guarantess that type is not passed by copy +struct CountedArg +{ + CountedArg() = default; + CountedArg(const CountedArg& f) noexcept : counter(f.counter) { ++counter; } + CountedArg& operator=(CountedArg&&) = delete; + + int counter = 0; +}; +CountedArg const c; + +// When move_only_functions is constructed from other move_only_function, +// the compiler can avoid double indirection per C++26 [func.wrap.general] p2. + +void +test01() +{ + auto f = [](CountedArg const& arg) noexcept { return arg.counter; }; + std::move_only_function<int(CountedArg) const noexcept> m1(f); + VERIFY( m1(c) == 1 ); + + std::move_only_function<int(CountedArg) const> m2(std::move(m1)); + VERIFY( m2(c) == 1 ); + + std::move_only_function<int(CountedArg)> m3(std::move(m2)); + VERIFY( m3(c) == 1 ); + + // Invokers internally uses Counted&& for non-trivial types, + // sinature remain compatible. + std::move_only_function<int(CountedArg&&)> m4(std::move(m3)); + VERIFY( m4({}) == 0 ); + + std::move_only_function<int(CountedArg&&)&&> m5(std::move(m4)); + VERIFY( std::move(m5)({}) == 0 ); + + m4 = f; + std::move_only_function<int(CountedArg&&)&> m7(std::move(m4)); + VERIFY( m7({}) == 0 ); + + m4 = f; + std::move_only_function<int(CountedArg&&)&> m8(std::move(m4)); + VERIFY( m8({}) == 0 ); + + // Incompatible signatures + m1 = f; + std::move_only_function<long(CountedArg) const noexcept> m9(std::move(m1)); + VERIFY( m9(c) == 2 ); +} + +void +test02() +{ + auto f = [](CountedArg const& arg) noexcept { return arg.counter; }; + std::move_only_function<int(CountedArg) const noexcept> m1(f); + VERIFY( m1(c) == 1 ); + + std::move_only_function<int(CountedArg) const> m2; + m2 = std::move(m1); + VERIFY( m2(c) == 1 ); + + std::move_only_function<int(CountedArg)> m3; + m3 = std::move(m2); + VERIFY( m3(c) == 1 ); + + // Invokers internally uses Counted&& for non-trivial types, + // sinature remain compatible. + std::move_only_function<int(CountedArg&&)> m4; + m4 = std::move(m3); + VERIFY( m4({}) == 0 ); + + std::move_only_function<int(CountedArg&&)&&> m5; + m5 = std::move(m4); + VERIFY( std::move(m5)({}) == 0 ); + + m4 = f; + std::move_only_function<int(CountedArg&&)&> m7; + m7 = std::move(m4); + VERIFY( m7({}) == 0 ); + + m4 = f; + std::move_only_function<int(CountedArg&&)&> m8; + m8 = std::move(m4); + VERIFY( m8({}) == 0 ); + + m1 = f; + std::move_only_function<long(CountedArg) const noexcept> m9; + m9 = std::move(m1); + VERIFY( m9(c) == 2 ); +} + +void +test03() +{ + std::move_only_function<int(long) const noexcept> e; + VERIFY( e == nullptr ); + + std::move_only_function<int(long) const> e2(std::move(e)); + VERIFY( e2 == nullptr ); + e2 = std::move(e); + VERIFY( e2 == nullptr ); + + std::move_only_function<bool(int) const> e3(std::move(e)); + VERIFY( e3 == nullptr ); + e3 = std::move(e); + VERIFY( e3 == nullptr ); +} + +void +test04() +{ + struct F + { + int operator()(CountedArg const& arg) noexcept + { return arg.counter; } + + int operator()(CountedArg const& arg) const noexcept + { return arg.counter + 1000; } + }; + + F f; + std::move_only_function<int(CountedArg) const> m1(f); + VERIFY( m1(c) == 1001 ); + + // Call const overload as std::move_only_function<int(CountedArg) const> + // inside std::move_only_function<int(CountedArg)> would do. + std::move_only_function<int(CountedArg)> m2(std::move(m1)); + VERIFY( m2(c) == 1001 ); + + std::move_only_function<int(CountedArg)> m3(f); + VERIFY( m3(c) == 1 ); +} + +void +test05() +{ + auto f = [](CountedArg const& arg) noexcept { return arg.counter; }; + std::move_only_function<int(CountedArg)> w1(f); + // move_only_function stores move_only_function due incompatibile signatures + std::move_only_function<int(CountedArg const&)> w2(std::move(w1)); + // copy is made when passing to int(CountedArg) + VERIFY( w2(c) == 1 ); + // wrapped 3 times + w1 = std::move(w2); + VERIFY( w1(c) == 2 ); + // wrapped 4 times + w2 = std::move(w1); + VERIFY( w2(c) == 2 ); + // wrapped 5 times + w1 = std::move(w2); + VERIFY( w1(c) == 3 ); +} + +void +test06() +{ + // No special interoperability with std::function + auto f = [](CountedArg const& arg) noexcept { return arg.counter; }; + std::function<int(CountedArg)> f1(f); + std::move_only_function<int(CountedArg) const> m1(std::move(f1)); + VERIFY( m1(c) == 2 ); +} + +int main() +{ + test01(); + test02(); + test03(); + test04(); + test05(); + test06(); +} diff --git a/libstdc++-v3/testsuite/20_util/move_only_function/move.cc b/libstdc++-v3/testsuite/20_util/move_only_function/move.cc index 51e31a6..6da02c9 100644 --- a/libstdc++-v3/testsuite/20_util/move_only_function/move.cc +++ b/libstdc++-v3/testsuite/20_util/move_only_function/move.cc @@ -32,6 +32,12 @@ test01() VERIFY( m1().copy == 1 ); VERIFY( m1().move == 0 ); + // Standard specifies move assigment as copy and swap + m1 = std::move(m1); + VERIFY( m1 != nullptr ); + VERIFY( m1().copy == 1 ); + VERIFY( m1().move == 0 ); + // This will move construct a new target object and destroy the old one: auto m2 = std::move(m1); VERIFY( m1 == nullptr && m2 != nullptr ); @@ -80,6 +86,11 @@ test02() VERIFY( m1().copy == 1 ); VERIFY( m1().move == 0 ); + m1 = std::move(m1); + VERIFY( m1 != nullptr ); + VERIFY( m1().copy == 1 ); + VERIFY( m1().move == 0 ); + // The target object is on the heap so this just moves a pointer: auto m2 = std::move(m1); VERIFY( m1 == nullptr && m2 != nullptr ); diff --git a/libstdc++-v3/testsuite/23_containers/mdspan/extents/class_mandates_neg.cc b/libstdc++-v3/testsuite/23_containers/mdspan/extents/class_mandates_neg.cc index b654e39..f9c1c01 100644 --- a/libstdc++-v3/testsuite/23_containers/mdspan/extents/class_mandates_neg.cc +++ b/libstdc++-v3/testsuite/23_containers/mdspan/extents/class_mandates_neg.cc @@ -1,8 +1,12 @@ // { dg-do compile { target c++23 } } #include<mdspan> -std::extents<char, size_t(1) << 9> e1; // { dg-error "from here" } -std::extents<double, 1> e2; // { dg-error "from here" } -// { dg-prune-output "dynamic or representable as _IndexType" } -// { dg-prune-output "must be integral" } +#include <cstdint> + +std::extents<uint8_t, size_t(1) << 9> e1; // { dg-error "from here" } +std::extents<char, 1> e2; // { dg-error "from here" } +std::extents<bool, 1> e3; // { dg-error "from here" } +std::extents<double, 1> e4; // { dg-error "from here" } +// { dg-prune-output "dynamic or representable as IndexType" } +// { dg-prune-output "signed or unsigned integer" } // { dg-prune-output "invalid use of incomplete type" } diff --git a/libstdc++-v3/testsuite/23_containers/mdspan/extents/misc.cc b/libstdc++-v3/testsuite/23_containers/mdspan/extents/misc.cc index 16204aa..e71fdc5 100644 --- a/libstdc++-v3/testsuite/23_containers/mdspan/extents/misc.cc +++ b/libstdc++-v3/testsuite/23_containers/mdspan/extents/misc.cc @@ -1,6 +1,7 @@ // { dg-do run { target c++23 } } #include <mdspan> +#include <cstdint> #include <testsuite_hooks.h> constexpr size_t dyn = std::dynamic_extent; @@ -20,7 +21,6 @@ static_assert(std::is_same_v<std::extents<int, 1, 2>::rank_type, size_t>); static_assert(std::is_unsigned_v<std::extents<int, 2>::size_type>); static_assert(std::is_unsigned_v<std::extents<unsigned int, 2>::size_type>); -static_assert(std::is_same_v<std::extents<char, 2>::index_type, char>); static_assert(std::is_same_v<std::extents<int, 2>::index_type, int>); static_assert(std::is_same_v<std::extents<unsigned int, 2>::index_type, unsigned int>); @@ -49,7 +49,7 @@ static_assert(check_rank_return_types<int, 1>()); // Check that the static extents don't take up space. static_assert(sizeof(std::extents<int, 1, dyn>) == sizeof(int)); -static_assert(sizeof(std::extents<char, 1, dyn>) == sizeof(char)); +static_assert(sizeof(std::extents<short, 1, dyn>) == sizeof(short)); template<typename Extents> class Container @@ -58,7 +58,7 @@ class Container [[no_unique_address]] std::extents<size_t> b0; }; -static_assert(sizeof(Container<std::extents<char, 1, 2>>) == sizeof(int)); +static_assert(sizeof(Container<std::extents<short, 1, 2>>) == sizeof(int)); static_assert(sizeof(Container<std::extents<size_t, 1, 2>>) == sizeof(int)); // operator= @@ -103,7 +103,7 @@ test_deduction_all() test_deduction<0>(); test_deduction<1>(1); test_deduction<2>(1.0, 2.0f); - test_deduction<3>(int(1), char(2), size_t(3)); + test_deduction<3>(int(1), short(2), size_t(3)); return true; } diff --git a/libstdc++-v3/testsuite/26_numerics/complex/fabs_neg.cc b/libstdc++-v3/testsuite/26_numerics/complex/fabs_neg.cc new file mode 100644 index 0000000..36c483e --- /dev/null +++ b/libstdc++-v3/testsuite/26_numerics/complex/fabs_neg.cc @@ -0,0 +1,13 @@ +// { dg-do compile } +// Bug 120235 std::fabs(const std::complex<T>&) should not be defined + +#include <complex> + +void test_pr120235(std::complex<double> c) +{ + (void) std::fabs(c); + // { dg-error "no matching function" "" { target c++98_only } 8 } + // { dg-warning "deprecated: use 'std::abs'" "" { target c++11 } 8 } +} + +// { dg-prune-output "no type named '__type'" } diff --git a/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc b/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc index 4cd07da..ba52b36 100644 --- a/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc +++ b/libstdc++-v3/testsuite/30_threads/scoped_lock/requirements/typedefs.cc @@ -1,5 +1,4 @@ // { dg-do compile { target c++17 } } -// { dg-require-gthreads "" } // { dg-add-options no_pch } // Copyright (C) 2017-2025 Free Software Foundation, Inc. @@ -29,9 +28,30 @@ # error "Feature-test macro for scoped_lock has wrong value" #endif +struct BasicLockable +{ + BasicLockable() = default; + ~BasicLockable() = default; + void lock() { } + void unlock() { } +}; + void test01() { - // Check for required typedefs - typedef std::scoped_lock<std::mutex> test_type; - typedef test_type::mutex_type mutex_type; + // Check for required typedef. + using test_type = std::scoped_lock<BasicLockable>; + static_assert(std::is_same_v<test_type::mutex_type, BasicLockable>); +} + +template<typename T, typename = void> +constexpr bool has_mutex_type = false; + +template<typename T> +constexpr bool has_mutex_type<T, std::void_t<typename T::mutex_type>> = true; + +void test02() +{ + // Check that typedef is absent as required. + using test_type = std::scoped_lock<BasicLockable, BasicLockable>; + static_assert(!has_mutex_type<test_type>); } diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 5e958d1..da1f424 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -586,6 +586,7 @@ proc v3_target_compile { source dest type options } { global tool lappend options "additional_flags=-fdiagnostics-plain-output" + lappend options "additional_flags=-Wabi=20"; if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } { lappend options "libs=${gluefile}" @@ -1034,7 +1035,7 @@ proc check_v3_target_namedlocale { args } { puts $f "using namespace std;" puts $f "char *transform_locale(const char *name)" puts $f "{" - puts $f " char *result = new char\[50\];" + puts $f " char *result = new char\[strlen(name)+6\];" puts $f " strcpy(result, name);" puts $f "#if defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__" puts $f " /* fall-through */" @@ -1045,14 +1046,9 @@ proc check_v3_target_namedlocale { args } { puts $f "#endif" puts $f " return result;" puts $f "}" - puts $f "int main (int argc, char** argv)" + puts $f "int main ()" puts $f "{" - puts $f " if (argc < 2)" - puts $f " {" - puts $f " printf(\"locale support test not supported\\n\");" - puts $f " return 1;" - puts $f " }" - puts $f " const char *namedloc = transform_locale(*(argv + 1));" + puts $f " const char *namedloc = transform_locale(\"$args\");" puts $f " try" puts $f " {" puts $f " locale((const char*)namedloc);" @@ -1076,7 +1072,7 @@ proc check_v3_target_namedlocale { args } { return 0 } - set result [${tool}_load "./$exe" "$args" ""] + set result [${tool}_load "./$exe" "" ""] set status [lindex $result 0] verbose "check_v3_target_namedlocale <$args>: status is <$status>" 2 diff --git a/libstdc++-v3/testsuite/std/format/arguments/args.cc b/libstdc++-v3/testsuite/std/format/arguments/args.cc index 4c50bc7..6029675 100644 --- a/libstdc++-v3/testsuite/std/format/arguments/args.cc +++ b/libstdc++-v3/testsuite/std/format/arguments/args.cc @@ -164,24 +164,6 @@ void test_visited_as_handle() #endif } -template<typename E, typename S> -void test_visited_as() -{ - auto v = static_cast<S>(1.0); - auto store = std::make_format_args(v); - std::format_args args = store; - - auto is_expected_val = [v](auto arg) { - if constexpr (std::is_same_v<decltype(arg), E>) - return arg == static_cast<E>(v); - return false; - }; - VERIFY( std::visit_format_arg(is_expected_val, args.get(0)) ); -#if __cpp_lib_format >= 202306L // C++26 adds std::basic_format_arg::visit - VERIFY( args.get(0).visit(is_expected_val) ); -#endif -} - template<typename T> concept can_format = std::is_default_constructible_v<std::formatter<T, char>>; @@ -195,30 +177,31 @@ int main() test_visited_as_handle<__int128>(); test_visited_as_handle<unsigned __int128>(); #endif -// TODO: This should be visited as handle. -#ifdef __STDCPP_FLOAT16_T__ - if constexpr (can_format<_Float16>) - test_visited_as<float, _Float16>(); -#endif -#ifdef __STDCPP_BFLOAT16_T__ +#ifdef __BFLT16_DIG__ if constexpr (can_format<__gnu_cxx::__bfloat16_t>) - test_visited_as<float, __gnu_cxx::__bfloat16_t>(); + test_visited_as_handle<__gnu_cxx::__bfloat16_t>(); +#endif +#ifdef __FLT16_DIG__ + if constexpr (can_format<_Float16>) + test_visited_as_handle<_Float16>(); #endif #ifdef __FLT32_DIG__ if constexpr (can_format<_Float32>) - test_visited_as<float, _Float32>(); + test_visited_as_handle<_Float32>(); #endif #ifdef __FLT64_DIG__ if constexpr (can_format<_Float64>) - test_visited_as<double, _Float64>(); + test_visited_as_handle<_Float64>(); #endif #ifdef __FLT128_DIG__ if constexpr (can_format<_Float128>) -# ifdef _GLIBCXX_LDOUBLE_IS_IEEE_BINARY128 - test_visited_as<long double, _Float128>(); -# else test_visited_as_handle<_Float128>(); -# endif +#endif +#ifdef __SIZEOF_FLOAT128__ + // __ieee128 is same type as __float128, and may be long double + if constexpr (!std::is_same_v<__float128, long double>) + if constexpr (can_format<__float128>) + test_visited_as_handle<__float128>(); #endif #ifdef _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT if constexpr (!std::is_same_v<__ieee128, long double>) diff --git a/libstdc++-v3/testsuite/std/format/parse_ctx.cc b/libstdc++-v3/testsuite/std/format/parse_ctx.cc index b5dd7cd..adafc58 100644 --- a/libstdc++-v3/testsuite/std/format/parse_ctx.cc +++ b/libstdc++-v3/testsuite/std/format/parse_ctx.cc @@ -443,6 +443,8 @@ test_custom() } #if __cpp_lib_format >= 202305 +#include <stdfloat> + struct X { }; template<> @@ -458,13 +460,20 @@ struct std::formatter<X, char> if (spec == "int") { pc.check_dynamic_spec_integral(pc.next_arg_id()); - integer = true; + type = Type::integral; } else if (spec == "str") { pc.check_dynamic_spec_string(pc.next_arg_id()); - integer = false; + type = Type::string; + } + else if (spec == "float") + { + pc.check_dynamic_spec<float, double, long double>(pc.next_arg_id()); + type = Type::floating; } + else if (spec == "other") + type = Type::other; else throw std::format_error("invalid format-spec"); return pc.begin() + spec.size(); @@ -474,13 +483,44 @@ struct std::formatter<X, char> format(X, std::format_context& c) const { std::visit_format_arg([this]<typename T>(T) { // { dg-warning "deprecated" "" { target c++26 } } - if (is_integral_v<T> != this->integer) - throw std::format_error("invalid argument type"); + constexpr bool is_handle + = std::is_same_v<std::basic_format_arg<std::format_context>::handle, T>; + constexpr bool is_integral + = std::is_same_v<int, T> || std::is_same_v<unsigned int, T> + || is_same_v<long long, T> || std::is_same_v<unsigned long long, T>; + constexpr bool is_string + = std::is_same_v<const char*, T> || std::is_same_v<std::string_view, T>; + constexpr bool is_floating + = std::is_same_v<float, T> || std::is_same_v<double, T> + || std::is_same_v<long double, T>; + switch (this->type) + { + case Type::other: + if (is_handle) return; + break; + case Type::integral: + if (is_integral) return; + break; + case Type::string: + if (is_string) return; + break; + case Type::floating: + if (is_floating) return; + break; + } + throw std::format_error("invalid argument type"); }, c.arg(1)); return c.out(); } private: - bool integer = false; + enum class Type + { + other, + integral, + string, + floating, + }; + Type type = Type::other; }; #endif @@ -497,6 +537,28 @@ test_dynamic_type_check() (void) std::format("{:int}", X{}, 42L); (void) std::format("{:str}", X{}, "H2G2"); + (void) std::format("{:float}", X{}, 10.0); + +#ifdef __STDCPP_FLOAT16_T__ + if constexpr (std::formattable<std::bfloat16_t, char>) + (void) std::format("{:other}", X{}, 10.0bf16); +#endif +#ifdef __STDCPP_FLOAT16_T__ + if constexpr (std::formattable<std::float16_t, char>) + (void) std::format("{:other}", X{}, 10.0f16); +#endif +#ifdef __STDCPP_FLOAT32_T__ + if constexpr (std::formattable<std::float32_t, char>) + (void) std::format("{:other}", X{}, 10.0f32); +#endif +#ifdef __STDCPP_FLOAT64_T__ + if constexpr (std::formattable<std::float64_t, char>) + (void) std::format("{:other}", X{}, 10.0f64); +#endif +#ifdef __STDCPP_FLOAT128_T__ + if constexpr (std::formattable<std::float128_t, char>) + (void) std::format("{:other}", X{}, 10.0f128); +#endif #endif } diff --git a/libstdc++-v3/testsuite/std/format/ranges/format_kind_neg.cc b/libstdc++-v3/testsuite/std/format/ranges/format_kind_neg.cc index bf8619d..0d761ae 100644 --- a/libstdc++-v3/testsuite/std/format/ranges/format_kind_neg.cc +++ b/libstdc++-v3/testsuite/std/format/ranges/format_kind_neg.cc @@ -5,9 +5,14 @@ #include <format> -template<auto> struct Tester { }; +void test() +{ + (void) std::format_kind<void>; // { dg-error "here" } + (void) std::format_kind<const void>; // { dg-error "here" } + (void) std::format_kind<int>; // { dg-error "here" } + (void) std::format_kind<int&>; // { dg-error "here" } + (void) std::format_kind<const int(&)[10]>; // { dg-error "here" } + (void) std::format_kind<void()>; // { dg-error "here" } +} -Tester<std::format_kind<const int(&)[1]>> t; // { dg-error "here" } - -// { dg-error "use of 'std::format_kind" "" { target *-*-* } 0 } -// { dg-error "primary_template_not_defined" "" { target *-*-* } 0 } +// { dg-error "cannot use primary template of 'std::format_kind'" "" { target *-*-* } 0 } |