aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
AgeCommit message (Collapse)AuthorFilesLines
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-05-31expr.c (convert_move): When a partial_int requires multiple conversion steps...DJ Delorie1-1/+1
* expr.c (convert_move): When a partial_int requires multiple conversion steps, make sure successive steps convert the intermediate value, not the original value. * expmed.c (expand_mult): Convert partial_int multiplies to shift/add combinations too. * genmodes.c (mode_data): Add wider_2x. (calc_wider_mode): Calculate twice-wider mode too. (emit_mode_wider): Emit twice-wider mode too. * machmode.h (mode_2xwider, GET_MODE_2XWIDER_MODE): New. * expr.c (expand_expr_real_1): Use it for expanding multiplies. From-SVN: r100414
2005-04-27dojump.c: Fix comment typos.Kazu Hirata1-22/+22
* dojump.c: Fix comment typos. emit-rtl.c, expmed.c, expr.c, stmt.c, stor-layout.c: Use fold_buildN instead of fold (buildN (...)). From-SVN: r98848
2005-04-22builtins.c (gimplify_va_arg_expr): Reword comments to avoid 'abort'.Nathan Sidwell1-11/+11
* builtins.c (gimplify_va_arg_expr): Reword comments to avoid 'abort'. Use gcc_assert and gcc_unreachable as appropriate. * c-format.c (get_constant, decode_format_attr, get_flag_spec, find_char_info_specifier_index, find_length_info_modifier_index): Likewise. * c-typeck.c (composite_type, pop_init_level): Likewise. * combine.c (cant_combine_insn_p, try_combine): Likewise. * cse.c (cse_insn): Likewise * dominance.c (calc_dfs_tree): Likewise dwarf2out.c (loc_descriptor_from_tree_1, add_abstract_origin_attribute, force_decl_die, force_type_die): Likewise emit-rtl.c (operand_subword_force): Likewise explow.c (hard_function_value): Likewise expmed.c (store_bit_field, expand_divmod, emit_store_flag_force): Likewise expr.c (emit_move_multi_word, store_expr, expand_expr_real_1): Likewise final.c (this_is_asm_operands, shorten_branches, final_scan_insn, output_operand): Likewise flow.c (recompute_reg_usage): Likewise * function.c (assign_stack_temp_for_type, assign_temp, handle_epilogue_set): Likewise * genextract.c (main): Likewise * gimplify.c (mostly_copy_tree_r, gimplify_return_expr, gimplify_modify_expr_rhs, gimplify_expr): Likewise * haifa-sched.c (ready_lastpos, ready_remove_first, ready_element, ready_remove, rm_line_notes, rm_other_notes, schedule_block): Likewise mips-tfile.c (copy_object, out_of_bounds): Likewise From-SVN: r98567
2005-03-13expmed.c (expand_mult): Use synthetic multiplication sequences for more ↵Roger Sayle1-43/+82
classes of DImode... * expmed.c (expand_mult): Use synthetic multiplication sequences for more classes of DImode multiplication by constant. Allow both multiplication by small negative constants (by performing a multiplication by a positive constant and negating the result) and multiplications by large powers of two, by using a left shift. From-SVN: r96377
2005-02-21tree-ssa-loop-ivopts.c (computation_cost): Start register numbering at ↵DJ Delorie1-1/+2
LAST_VIRTUAL_REGISTER+1 to avoid possibly using... * tree-ssa-loop-ivopts.c (computation_cost): Start register numbering at LAST_VIRTUAL_REGISTER+1 to avoid possibly using hard registers in unsupported ways. * expmed.c (init_expmed): Likewise. From-SVN: r95373
2005-02-18stmt.c (emit_case_bit_tests): Call fold_convert instead of convert.James A. Morrison1-20/+15
2005-02-18 James A. Morrison <phython@gcc.gnu.org> * stmt.c (emit_case_bit_tests): Call fold_convert instead of convert. (estimate_case_costs): Don't call convert. * expmed.c (expand_shift): Likewise. (make_tree): Call fold_convert instead of convert. From-SVN: r95224
2005-02-12c-tree.h, [...]: Fix comment typos.Kazu Hirata1-1/+1
* c-tree.h, combine.c, expmed.c, flow.c, libgcc2.c, simplify-rtx.c, tree-ssa-live.h: Fix comment typos. Follow spelling conventions. From-SVN: r94939
2005-02-06expmed.c (store_bit_field): Make the SUBREG code adjust bitnum.Richard Sandiford1-13/+20
* expmed.c (store_bit_field): Make the SUBREG code adjust bitnum. Set bitpos and offset later in the function. Do nothing if the target is a register and if the bitfield lies completely outside that register. (extract_bit_field): Make the same SUBREG, bitpos and offset changes here. Return an uninitialised register if the source value is stored in a register and the bitfield lies completely outside that register. From-SVN: r94677
2005-01-28expmed.c (expand_mult_highpart_optab): When attempting to use a non-widening ↵Roger Sayle1-3/+17
multiplication in a wider mode... * expmed.c (expand_mult_highpart_optab): When attempting to use a non-widening multiplication in a wider mode, the operands need to be converted (zero or sign extended) to that mode. From-SVN: r94383
2005-01-26Revert last change.Richard Henderson1-1/+1
From-SVN: r94291
2005-01-26re PR middle-end/18008 (Duplicate mask on bitfield insertion)Richard Henderson1-1/+1
PR middle-end/18008 * c-decl.c (finish_struct): Set DECL_MODE after resetting a field's type. * expmed.c (store_fixed_bit_field): Create a paradoxical subreg if we don't need the bits above those present in the current mode. * expr.c (store_field): Strip conversions to odd-bit-sized types if the destination field width matches. From-SVN: r94290
2005-01-25expmed.c (choose_multiplier): Change interface to return the multiplier ↵Roger Sayle1-19/+17
lowpart as an rtx instead of an... * expmed.c (choose_multiplier): Change interface to return the multiplier lowpart as an rtx instead of an unsigned HOST_WIDE_INT. (expand_divmod): Update calls to choose_multiplier. From-SVN: r94220
2005-01-25re PR middle-end/19330 (FAIL: gcc.c-torture/execute/20010605-2.c execution, ↵John David Anglin1-5/+11
-O1) PR middle-end/19330 * expmed.c (extract_bit_field): Use adjust_address instead of gen_lowpart when op0 is a MEM. From-SVN: r94198
2005-01-24c-opts.c, [...]: Update copyright.Kazu Hirata1-1/+1
* c-opts.c, expmed.c, gengtype.c, tree-complex.c, config/arm/iwmmxt.md, config/avr/avr.c, config/s390/s390.h: Update copyright. From-SVN: r94154
2005-01-24expmed.c (expand_mult_highpart): Make static.Roger Sayle1-15/+21
* expmed.c (expand_mult_highpart): Make static. Change type of constant multiplier argument from unsigned HOST_WIDE_INT to rtx. (expand_divmod): Updates calls to expand_mult_highpart by using gen_int_mode to pass a CONST_INT rtx. * rtl.h (expand_mult_highpart): Remove prototype. From-SVN: r94139
2004-12-10expmed.c (synth_mult): Initialize new_limit.latency before making a ↵Kazu Hirata1-1/+1
recursive call. * expmed.c (synth_mult): Initialize new_limit.latency before making a recursive call. From-SVN: r91992
2004-12-09simplify-rtx.c (simplify_subreg): In the CONCAT case...Richard Sandiford1-8/+10
* simplify-rtx.c (simplify_subreg): In the CONCAT case, check whether the request subreg is entirely contained in the requested component. (simplify_gen_subreg): Return null for CONCATs that are rejected by simplify_subreg. * expmed.c (store_bit_field): Create a temporary when changing the value to an integer mode. From-SVN: r91965
2004-12-08re PR middle-end/18293 (Redundant copy operation introduced by expand)Roger Sayle1-5/+20
PR middle-end/18293 * expmed.c (EXACT_POWER_OF_2_OR_ZERO_P): Move definition earlier. (expand_mult): Special case powers of two to avoid synth_mult. * loop.c (product_cheap_p): Handle case where expand_mult does require/generate any instructions (i.e. multiplication by zero). From-SVN: r91851
2004-12-01re PR rtl-optimization/15289 (reload error with non-lowpart subregs)Richard Henderson1-22/+0
PR rtl-opt/15289 * emit-rtl.c (gen_complex_constant_part): Remove. (gen_realpart, gen_imagpart): Remove. * rtl.h (gen_realpart, gen_imagpart): Remove. * expmed.c (extract_bit_field): Remove CONCAT hack catering to gen_realpart/gen_imagpart. * expr.c (write_complex_part, read_complex_part): New. (emit_move_via_alt_mode, emit_move_via_integer, emit_move_resolve_push, emit_move_complex_push, emit_move_complex, emit_move_ccmode, emit_move_multi_word): Split out from ... (emit_move_insn_1): ... here. (expand_expr_real_1) <COMPLEX_EXPR>: Use write_complex_part. <REALPART_EXPR, IMAGPART_EXPR>: Use read_complex_part. * function.c (assign_parm_setup_reg): Hard-code transformations instead of using gen_realpart/gen_imagpart. From-SVN: r91571
2004-12-01expmed.c (store_bit_field): Use simplify_gen_subreg instead of ↵Richard Henderson1-14/+4
gen_rtx_SUBREG directly. * expmed.c (store_bit_field): Use simplify_gen_subreg instead of gen_rtx_SUBREG directly. From-SVN: r91569
2004-11-26expmed.c (extract_bit_field): When extracting from non-integer mode...Richard Kenner1-7/+6
* expmed.c (extract_bit_field): When extracting from non-integer mode, force a SUBREG into a register because we may be taking a further SUBREG of it. From-SVN: r91361
2004-11-23expmed.c (extract_bit_field): Use simplify_gen_subreg instead of hard-coding ↵Richard Henderson1-20/+36
avoiding calls to gen_rtx_SUBREG. * expmed.c (extract_bit_field): Use simplify_gen_subreg instead of hard-coding avoiding calls to gen_rtx_SUBREG. Split complex return modes to CONCAT. From-SVN: r91124
2004-11-17expmed.c (alg_code): Add alg_unknown.Kazu Hirata1-3/+86
* expmed.c (alg_code): Add alg_unknown. (alg_hash_entry): New. (NUM_ALG_HASH_ENTRIES): Likewise. (alg_hash): Likewise. (synth_mult): Cache the result into alg_hash. From-SVN: r90825
2004-11-16* expmed.c, ra-colorize.c: Fix comment typos.Kazu Hirata1-1/+1
From-SVN: r90771
2004-11-13expmed.c (extract_split_bit_field): Temporarily disable call to ↵Richard Henderson1-1/+1
extract_force_align_mem_bit_field. * expmed.c (extract_split_bit_field): Temporarily disable call to extract_force_align_mem_bit_field. From-SVN: r90597
2004-11-13bitmap.c, [...]: Fix comment formatting.Kazu Hirata1-1/+1
* bitmap.c, bitmap.h, expmed.c, tree-cfg.c: Fix comment formatting. From-SVN: r90595
2004-11-08expmed.c (extract_force_align_mem_bit_field): Correct handling at the end of ↵Richard Henderson1-4/+12
a page. * expmed.c (extract_force_align_mem_bit_field): Correct handling at the end of a page. From-SVN: r90288
2004-11-06* expmed.c: Fix a comment typo.Kazu Hirata1-1/+1
From-SVN: r90171
2004-11-05expmed.c (extract_force_align_mem_bit_field): New.Richard Henderson1-1/+148
* expmed.c (extract_force_align_mem_bit_field): New. (extract_split_bit_field): Call it. From-SVN: r90150
2004-10-21re PR target/18004 (ICE in output_constant_pool_2 for aligned(1) float in ↵Aldy Hernandez1-1/+3
struct) PR 18004. * expmed.c (store_bit_field): Pass original 'value' before recursing. From-SVN: r89369
2004-10-18re PR middle-end/18045 (signed integer remainder for power of 2 broken)Eric Botcazou1-12/+22
PR middle-end/18045 * expmed.c (expand_smod_pow2): Handle modes whose size is greater than that of HOST_WIDE_INT. From-SVN: r89253
2004-10-07re PR middle-end/17835 (stage2 compiler is broken because it is built with ↵Eric Botcazou1-0/+5
-fomit-frame-pointer) PR middle-end/17835 * expmed.c (expand_sdiv_pow2): Force a stack adjustment before tentatively building the conditional move sequence. From-SVN: r88661
2004-09-13expmed.c (synth_mult): Initialize latency.Daniel Jacobowitz1-4/+5
* expmed.c (synth_mult): Initialize latency. Check cost before checking ops count. From-SVN: r87456
2004-09-12re PR middle-end/16795 (PowerPC - Divide sequences by negative power of two ↵David Edelsohn1-1/+13
could be more efficient) PR target/16795 * expmed.c (expand_divmod): If cheap power of 2 divide is available, use it for negative constant as well. From-SVN: r87403
2004-09-08emit-rtl.c (immed_double_const): Use gcc_assert and gcc_unreachable.Nathan Sidwell1-93/+74
* emit-rtl.c (immed_double_const): Use gcc_assert and gcc_unreachable. (gen_rtx_SUBREG, gen_reg_rtx, mark_user_reg, subreg_hard_regno, gen_lowpart_common, gen_highpart, gen_highpart_mode, subreg_highpart_offset, operand_subword, operand_subword_force, mem_expr_equal_p, set_mem_attributes_minus_bitpos, set_mem_alias_set, change_address_1, verify_rtx_sharing, copy_most_rtx, set_first_insn, set_last_insn, prev_cc0_setter, try_split, add_insn_after, add_insn_before, remove_insn, remove_unnecessary_notes, emit_insn_before, emit_jump_insn_before, emit_call_insn_before, emit_insn_after, emit_jump_insn_after, emit_call_insn_after, emit_insn, emit_jump_insn, emit_call_insn, set_unique_reg_note, emit, push_to_full_sequence, copy_insn_1, gen_const_vector_0, emit_copy_of_insn_after): Likewise. * et-forest.c (set_prev, set_next, et_check_occ_sanity, record_path_before_1, check_path_after_1, check_path_after): Likewise. * except.c (gen_eh_region, resolve_one_fixup_region, remove_unreachable_regions, convert_from_eh_region_ranges_1, add_ehl_entry, duplicate_eh_region_1, build_post_landing_pads, connect_post_landing_pads, sjlj_emit_function_exit, remove_exception_handler_label, remove_eh_handler, reachable_next_level, collect_one_action_chain, output_function_exception_table): Likewise. * explow.c (trunc_int_for_mode, copy_to_mode_reg, optimize_save_area_alloca, allocate_dynamic_stack_space, probe_stack_range, hard_function_value): Likewise. * expmed.c (mode_for_extraction, store_bit_field, store_fixed_bit_field, extract_bit_field, expand_shift, expand_mult_const, expand_mult, choose_multiplier, expand_mult_highpart, expand_divmod, emit_store_flag, do_cmp_and_jump): Likewise. * expr.c (convert_move, convert_modes, move_by_pieces, move_by_pieces_ninsns, move_by_pieces_1, emit_block_move, move_block_from_reg, gen_group_rtx, emit_group_load, emit_group_move, emit_group_store, use_reg, use_regs, can_store_by_pieces, store_by_pieces, store_by_pieces_1, emit_move_insn, emit_move_insn_1, emit_push_insn, expand_assignment, store_expr, count_type_elements, store_constructor, store_field, safe_from_p, expand_var, expand_expr_addr_expr, expand_expr_real_1, do_store_flag): Likewise. From-SVN: r87178
2004-09-02expmed.c (enum alg_code): Remove long unused enumeration values.Roger Sayle1-73/+184
* expmed.c (enum alg_code): Remove long unused enumeration values. (struct mult_cost): New structure to hold the "score" of a synthetic multiply sequence, including both a rtx_cost and a latency field. (MULT_COST_LESS): New macro to compare mult_cost to a constant. (CHEAPER_MULT_COST): New macro to compare two mult_costs. (struct algorithm): Change type of cost field to be mult_cost. (synth_mult): Change type of cost_limit argument to be a pointer to a mult_cost. Update all cost comparisons to use the new mult_cost infrastructure. For alg_add_factor and alg_sub_factor operations, latency is lower than the rtx_cost. (choose_mult_variant): Update calls to synth_mult. Perform cost comparisons using the new mult_cost infrastructure. (expand_mult_highpart): Use alg.cost.cost instead of alg.cost to optain the total rtx_cost of a synth_mult "algorithm". From-SVN: r86954
2004-08-25tree.h (build_int_cst): New, sign extended constant.Nathan Sidwell1-57/+47
* tree.h (build_int_cst): New, sign extended constant. (build_int_cstu): New, zero extended constant. (build_int_cst_wide): Renamed from build_int_cst. * tree.c (build_int_cst, build_int_cstu): New. (build_int_cst_wide): Renamed from build_int_cst. (make_vector_type, build_common_tree_nodes, build_common_tree_nodes_2): Adjust build_int_cst calls. * builtins.c (expand_builtin_prefetch, expand_builtin_strstr, expand_builtin_strpbrk, expand_builtin_fputs, build_string_literal, expand_builtin_printf, expand_builtin_sprintf, fold_builtin_classify_type, fold_builtin_lround, fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii, fold_builtin_isdigit, simplify_builtin_strstr, simplify_builtin_strpbrk, fold_builtin_fputs, simplify_builtin_sprintf): Likewise. * c-common.c (start_fname_decls, fix_string_type, shorten_compare, DEF_ATTR_INT): Likewise. * c-decl.c (complete_array_type, check_bitfield_type_and_width): Likewise. * c-lex.c (interpret_integer, lex_charconst): Likewise. * c-parse.in (primary) <TYPES_COMPATIBLE_P> Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. * c-typeck.c (really_start_incremental_init, push_init_level, set_nonincremental_init_from_string): Likewise. * calls.c (load_register_parameters): Likewise. convert.c (convert_to_pointer): Likewise. coverage.c (coverage_counter_alloc, tree_coverage_counter_ref, build_fn_info_type, build_fn_info_value, build_ctr_info_value, build_gcov_info): Likewise. * except.c (init_eh, assign_filter_values): Likewise. * expmed.c (store_fixed_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_shift, expand_mult_const, expand_mult_highpart_adjust, extract_high_half, expand_sdiv_pow2, expand_divmod, make_tree): Likewise. * expr.c (convert_move, emit_group_load, emit_group_store, expand_assignment, store_constructor, store_field, expand_expr_real_1, reduce_to_bit_field_precision): Likewise. fold-const.c (force_fit_type, int_const_binop, fold_convert_const, invert_truthvalue, optimize_bit_field_compare, decode_field_reference, all_ones_mask_p, constant_boolean_node, fold_div_compare, fold, fold_read_from_constant_string, fold_negate_const, fold_abs_const, fold_not_const, round_up, round_down): Likewise. * function.c (assign_parm_setup_block): Likewise. * stmt.c (shift_return_value, expand_case, estimate_case_costs): Likewise. * stor-layout.c (layout_type, initialize_sizetypes, set_min_and_max_values_for_integral_type): Likewise. * tree-chrec.c (chrec_fold_multiply_poly_poly, reset_evolution_in_loop): Likewise. * tree-chrec.h (build_polynomial_chrec): Likewise. * tree-complex.c (build_replicated_const): Likewise. * tree-eh.c (honor_protect_cleanup_actions, lower_try_finally_onedest, lower_try_finally_copy, lower_try_finally_switch): Likewise. * tree-mudflap.c (mf_build_string, mx_register_decls, mudflap_register_call, mudflap_enqueue_constant): Likewise. * tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref): Likewise. * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_cond, loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type): Likewise. * tree-ssa-loop-ivcanon.c (create_canonical_iv, canonicalize_loop_induction_variables): Likewise. * tree-vectorizer.c (vect_create_index_for_array_ref, vect_transform_loop_bound, vect_compute_data_ref_alignment): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start, alpha_gimplify_va_arg_1): Likewise. * config/arm/arm.c (arm_get_cookie_size): Likewise. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mips/mips.c (mips_build_builtin_va_list, mips_va_start, mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg, add_compiler_branch_island): Likewise. * config/s390/s390.c (s390_va_start): Likewise. * config/sh/sh.c (sh_va_start): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): Likewise. * objc/objc-act.c (build_objc_string_object, build_objc_symtab_template, init_def_list, init_objc_symtab, init_module_descriptor, generate_static_references, build_selector_translation_table, get_proto_encoding, build_typed_selector_reference, build_selector_reference, build_next_objc_exception_stuff, build_method_prototype_list_template, generate_descriptor_table, generate_protocols, build_protocol_initializer, build_ivar_list_template, build_method_list_template, build_ivar_list_initializer, generate_ivars_list, generate_dispatch_table, generate_protocol_list, build_category_initializer, build_shared_structure_initializer, generate_shared_structures, handle_impent, generate_objc_image_info): Likewise. 2004-04-25 Paolo Bonzini <bonzini@gnu.org> * cfglayout.c (duplicate_insn_chain): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator. * cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT. * final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove. * jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT. * loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop, check_dbra_loop, loop_dump_aux): Remove references to removed notes and fields. * reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs. * unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove references to removed notes and fields. (subtract_reg_term, ujump_to_loop_cont): Remove. From-SVN: r86544
2004-08-24c-decl.c (c_init_decl_processing): Adjust build_common_tree_nodes call.Nathan Sidwell1-7/+1
* c-decl.c (c_init_decl_processing): Adjust build_common_tree_nodes call. * expmed.c (const_mult_add_overflow_p): Use build_distinct_type_copy. * stor-layout.c (early_type_list): Remove. (layout_type): Don't append to early_type_list. (initialize_sizetypes): Add signed_p argument. (set_sizetype): Overwrite the stub type nodes directly. * tree.c (copy_node_stat): Clear a type's value cache here ... (build_distinct_type): ... not here. (build_common_tree_nodes): Add signed_sizetype argument. Adjust. * tree.h (initialize_sizetypes): Add signed_p argument. (build_common_tree_nodes): Likewise. * ada/utils.c (gnat_init_decl_processing): Adjust build_common_tree_nodes call. * cp/decl.c (cxx_init_decl_processing): Adjust build_common_tree_nodes call. * fortran/f95-lang.c (gfc_init_decl_processing): Adjust build_common_tree_nodes call. * java/decl.c (java_init_decl_processing): Adjust initialize_sizetypes call. * objc/objc-act.c (get_static_reference): Use build_variant_type_copy. (get_protocol_reference): Likewise. * objc/objc-act.h (TREE_STATIC_TEMPLATE): Use TREE_PRIVATE. * treelang/treetree.c (treelang_init_decl_processing): Adjust build_common_tree_nodes call. From-SVN: r86493
2004-08-19tree.h (TYPE_CACHED_VALUES_P): New.Nathan Sidwell1-1/+10
* tree.h (TYPE_CACHED_VALUES_P): New. (TYPE_CACHED_VALUES): New. (TYPE_ORIG_SIZE_TYPE): Adjust. * tree.def (INTEGER_CST): Update documentation. * tree.c: Inlcude params.h. (build_int_cst): Cache small values. (build_type_copy): Do not copy the value cache. * c-common.c (c_common_nodes_and_builtins): Add comment, remove unneeded zeroing. * c-typeck.c (build_c_cast): Add comment about OVERFLOW setting. * expmed.c (const_mult_add_overflow_p): Clear type copy's value cache. * fold-const.c (force_fit_type): Copy value when setting overflows. (int_const_binop): Likewise. * stor-layout.c: Include params.h (set_sizetype): Create values cache. (fixup_unsigned_type): Set UNSIGNED_P before caching any values. * params.def (PARAM_INTEGER_SHARE_LIMIT): New. * params.h (INTEGER_SHARE_LIMIT): New. * Makefile.in (tree.o, stor-layout.o): Depend on PARAMS_H. * cp/decl.c (finish_enum): Do not copy value node early, copy later. * cp/lex.c (cxx_init): Force null_node to be unique. * java/parse.h (JAVA_RADIX10_FLAG): Rename to ... (JAVA_NOT_RADIX10_FLAG): ... here. Invert meaning. * java/lex.c (do_java_lex): Adjust. (error_if_numeric_overflow): Likewise. From-SVN: r86247
2004-08-17Makefile.in: Regenerate.Paolo Bonzini1-13/+11
2004-08-17 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Regenerate. * configure: Regenerate. * Makefile.def (bootstrap-stage): Rename extra_*_flags to stage_*_flags. * Makefile.tpl (configure-[+module+], all-[+module+]): Exit for bootstrapped modules if toplevel bootstrap is going. (GCC bootstrap): Generate per-stage targets for all bootstrapped modules. Adjust for changes in Makefile.def. Enable several rules even in non-bootstrap mode, just to avoid peppering the template with unnecessary "@if/@endif gcc-bootstrap" pairs. (stage-[+prev+]-bubble): Remove. * Makefile.def (Dependencies): Depend on all-build-bison, all-build-flex, all-build-byacc, all-build-texinfo, rather than the host variations. * Makefile.tpl (BUILD_DIR_PREFIX): Remove. Replace throughout with BUILD_SUBDIR. (BISON): Update for recent Bisons. (YACC): Fix typo. (cross): Depend on all-build. (all): Do not depend on all-build. (prebootstrap): Remove. (dep-kind): Accept separate prefixes for MODULE and ON variables. (Prebootstrap dependencies): Add them to the per-stage targets and to all-prebootstrap. * configure.in (build_configdirs): Always enable build_tools. (BUILD_DIR_PREFIX): Remove. * Makefile.def (gcc): Add target variable. (gdb, expect, guile, tk, tix): Replace with_x with extra_make_flags. * Makefile.tpl (Autogenerated `all-*' targets): Invoke $(TARGET-*) in the recursive `make', instead of hardwiring `all'. (Autogenerated TARGET-* variables): New. gcc/ChangeLog: 2004-08-17 Paolo Bonzini <bonzini@gnu.org> * configure.ac: Trust toplevel's notion of BISON/FLEX/MAKEINFO. No need to check if in a cross configuration. * configure: Regenerate. * calls.c (precompute_register_parameters): Inline preserve_subexpressions_p (). * expmed.c (expand_mult_const, emit_store_flag): Likewise. * optabs.c (expand_binop, expand_twoval_binop, prepare_cmp_insn): Likewise. * expr.c (get_subtarget): Likewise. * rtl.h (preserve_subexpressions_p): Remove. * stmt.c (preserve_subexpressions_p): Remove. * dojump.c (do_jump) <COND_EXPR, EQ_EXPR, NE_EXPR, TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, COMPOUND_EXPR>: Abort on gimplified cases. From-SVN: r86111
2004-08-15tree.h (build_int_cst): New.Nathan Sidwell1-79/+126
.: * tree.h (build_int_cst): New. (build_int_2): Remove. * tree.c (build_int_2): Remove. (build_int_cst): New. (make_vector_type, build_common_tree_nodes, build_common_tree_nodes_2): Use build_int_cst. * builtins.c (expand_builtin_prefetch, expand_builtin_strstr, expand_builtin_strpbrk, expand_builtin_fputs, build_string_literal, expand_builtin_printf, expand_builtin_sprintf, fold_builtin_lround, fold_builtin_bitop, fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii, fold_builtin_isdigit, simplify_builtin_strstr, simplify_builtin_strpbrk, fold_builtin_fputs, simplify_builtin_sprintf): Use build_int_cst. * c-common.c (start_fname_decls, fix_string_type, c_common_nodes_and_builtins, c_init_attributes, shorten_compare): Likewise. * c-decl.c (complete_array_type, check_bitfield_type_and_width): Likewise. * c-lex.c (interpret_integer, lex_charconst): Likewise. * c-parse.in (primary): <TYPES_COMPATIBLE_P> Likewise. * c-pretty-print.c (pp_c_integer_constant): Likewise. * c-typeck.c (really_start_incremental_init, push_init_level, set_nonincremental_init_from_string): Likewise. * calls.c (load_register_parameters): Likewise. * convert.c (convert_to_pointer): Likewise. * coverage.c (coverage_counter_alloc, tree_coverage_counter_ref, build_fn_info_type, build_ctr_info_value, build_gcov_info): Likewise. * except.c (init_eh, assign_filter_values, assign_filter_values): Likewise. * expmed.c (store_fixed_bit_field, extract_bit_field, extract_fixed_bit_field, extract_split_bit_field, expand_shift, expand_mult_const, expand_mult_highpart_adjust, extract_high_half, expand_sdiv_pow2, expand_divmod, make_tree): Likewise. * expr.c (convert_move, emit_group_load, emit_group_store, expand_assignment, store_constructor, store_field, expand_expr_real_1, reduce_to_bit_field_precision): Likewise. * fold-const.c (force_fit_type, int_const_binop, fold_convert_const, invert_truthvalue, optimize_bit_field_compare, decode_field_reference, all_ones_mask_p, constant_boolean_node, fold_div_compare, fold, fold_read_from_constant_string, fold_negate_const, fold_abs_const, fold_not_const): Likewise. * function.c (assign_parm_setup_block): Likewise. * stmt.c (shift_return_value, expand_end_case_type, estimate_case_costs): Likewise. * stor-layout.c (layout_type, initialize_sizetypes, set_min_and_max_values_for_integral_type): Likewise. * tree-chrec.c (chrec_fold_multiply_poly_poly, reset_evolution_in_loop): Likewise. * tree-chrec.h (build_polynomial_chrec): Likewise. * tree-complex.c (build_replicated_const): Likewise. * tree-eh.c (honor_protect_cleanup_actions, lower_try_finally_onedest, lower_try_finally_copy, lower_try_finally_switch): Likewise. * tree-mudflap.c (mf_build_string, mx_register_decls, mudflap_register_call, mudflap_enqueue_constant): Likewise. * tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref): Likewise. * tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_cond, loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start, alpha_gimplify_va_arg_1): Use build_int_cst. * config/arm/arm.c (arm_get_cookie_size): Likewise. * config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise. * config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise. * config/i860/i860.c (i860_va_start): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mips/mips.c (mips_build_builtin_va_list, mips_va_start, mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg, add_compiler_branch_island): Likewise. * config/s390/s390.c (s390_va_start): Likewise. * config/sh/sh.c (sh_va_start): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. * config/xtensa/xtensa.c (xtensa_va_start, xtensa_gimplify_va_arg_expr): Likewise. * objc/objc-act.c (build_objc_string_object, build_objc_symtab_template, init_def_list, init_objc_symtab, init_module_descriptor, generate_static_references, build_selector_translation_table, get_proto_encoding, build_typed_selector_reference, build_selector_reference, build_next_objc_exception_stuff, build_method_prototype_list_template, generate_descriptor_table, generate_protocols, build_protocol_initializer, build_ivar_list_template, build_method_list_template, build_ivar_list_initializer, generate_ivars_list, generate_dispatch_table, generate_protocol_list, build_category_initializer, build_shared_structure_initializer, generate_shared_structures, handle_impent, generate_objc_image_info): Use build_int_cst. ada: * cuintp.c (UI_To_gnu): Use build_int_cst.. * trans.c (Exception_Handler_to_gnu_sjlj, gnat_to_gnu): Likewise. * utils.c (init_gigi_decls): Likewise. * utils2.c (build_call_raise): Likewise. cp: * call.c (convert_class_to_reference, build_user_type_conversion_1, convert_like_real, build_java_interface_fn_ref, build_special_member_call): Use build_int_cst. * class.c (build_vtbl_initializer): Likewise. * cp-gimplify.c (cp_gimplify_expr): Likewise. * cvt.c (cp_convert_to_pointer): Likewise. * decl.c (cxx_init_decl_processing, complete_array_type): Likewise. * decl2.c (start_static_initialization_or_destruction, generate_ctor_or_dtor_function): Likewise. * except.c (build_throw): Likewise. * lex.c (cxx_init): Likewise. * mangle.c (write_integer_cst): Likewise. * rtti.c (build_headof, get_tinfo_decl_dynamic, build_dynamic_cast_1, ptr_initializer, ptm_initializer, get_pseudo_ti_init): Likewise. * search.c (get_dynamic_cast_base_type): Likewise. * tree.c (build_shared_int_cst): Likewise. fortran: * trans-array.c (gfc_trans_array_constructor_value): Use build_int_cst. * trans-const.c (gfc_build_string_const, gfc_init_constants, gfc_conv_mpz_to_tree, gfc_conv_constant_to_tree): Likewise. * trans-decl.c (gfc_get_symbol_decl): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_len, prepare_arg_info): Likewise. * trans-io.c (add_case, set_error_locus, build_dt, transfer_expr): Likewise. * trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause, gfc_trans_stop, gfc_trans_character_select): Likewise. * trans-types.c (gfc_init_types, gfc_get_dtype): Likewise. * trans.c (gfc_trans_runtime_check): Likewise. java: * boehm.c (get_boehm_type_descriptor): Use build_int_cst. * class.c (build_utf8_ref, build_static_field_ref, make_field_value, make_method_value, get_dispatch_table, make_class_data, emit_symbol_table, emit_catch_table): Likewise. * constants.c (get_tag_node, build_ref_from_constant_pool, build_constants_constructor): Likewise. * decl.c (java_init_decl_processing): Likewise. * expr.c (build_java_array_length_access, build_newarray, expand_java_multianewarray, expand_java_pushc, expand_iinc, build_java_binop, build_field_ref, expand_java_add_case, expand_java_call, build_known_method_ref, build_invokevirtual, build_invokeinterface, build_jni_stub): Likewise. * java-gimplify.c (java_gimplify_new_array_init): Likewise. * jcf-parse.c (get_constant): Likewise. * lex.c (do_java_lex): Likewise. * parse.y (patch_binop, patch_unaryop, patch_cast, build_null_of_type, patch_newarray): Likewise. * resource.c (compile_resource_data): Likewise. * typeck.c (build_prim_array_type): Likewise. From-SVN: r86022
2004-08-11configure.in (arm*-*-eabi*): New target.Mark Mitchell1-4/+18
* configure.in (arm*-*-eabi*): New target. * configure: Regenerate. * configure.ac (arm*-*-eabi*): New target. (arm*-*-symbianelf*): Likewise. * configure: Regenerated. * config.gcc (arm*-*-eabi*): New target. * defaults.h (TARGET_LIBGCC_FUNCS): New macro. (TARGET_LIB_INT_CMP_BIASED): Likewise. * expmed.c (expand_divmod): Try a two-valued divmod function as a last resort. * gthr.h: Remove bogus tokens at end of #pragma. * optabs.c (expand_twoval_binop_libfunc): New function. (prepare_cmp_insn): Handle the !TARGET_LIB_INT_CMP_BIASED case. (prepare_float_lib_cmp): Try reversing the condition. (debug_optab_libfuncs): New function. * optabs.h (expand_twoval_binop_libfunc): Declare. * config/arm/arm.c (arm_init_libfuncs): New function. (arm_compute_initial_eliminatino_offset): Return HOST_WIDE_INT. (TARGET_INIT_LIBFUNCS): Define it. * config/arm/arm.h (TARGET_BPABI): New macro. * config/arm/arm-protos.h (arm_compute_initial_elimination_offset): Return HOST_WIDE_INT. * config/arm/bpabi.S: New file. * config/arm/bpabi.c: Likewise. * config/arm/bpabi.h: Likewise. * config/arm/ieee754-df.S (__aeabi_dneg): New function or alias. (__aeabi_drsub): Likewise. (__aeabi_dsub): Likewise. (__aeabi_dadd): Likewise. (__aeabi_ui2d): Likewise. (__aeabi_i2d): Likewise. (__aeabi_f2d): Likewise. (__aeabi_dmul): Likewise. (__aeabi_ddiv): Likewise. (__aeabi_cdrcmple): Likewise. (__aeabi_cdcmpeq): Likewise. (__aeabi_cdcmple): Likewise. (__aeabi_dcmpeq): Likewise. (__aeabi_dcmplt): Likewise. (__aeabi_dcmple): Likewise. (__aeabi_dcmpge): Likewise. (__aeabi_dcmpgt): Likewise. (__aeabi_dcmpun): Likewise. (__aeabi_d2iz): Likewise. (__aeabi_d2uiz): Likewise. (__aeabi_d2f): Likewise. * config/arm/ieee754-sf.S (__aeabi_fneg): New function or alias. (__aeabi_frsub): Likewise. (__aeabi_fsub): Likewise. (__aeabi_fadd): Likewise. (__aeabi_ui2f): Likewise. (__aeabi_i2f): Likewise. (__aeabi_fmul): Likewise. (__aeabi_fdiv): Likewise. (__aeabi_cfrcmple): Likewise. (__aeabi_cfcmpeq): Likewise. (__aeabi_cfcmple): Likewise. (__aeabi_fcmpeq): Likewise. (__aeabi_fcmplt): Likewise. (__aeabi_fcmple): Likewise. (__aeabi_fcmpge): Likewise. (__aeabi_fcmpgt): Likewise. (__aeabi_fcmpun): Likewise. (__aeabi_f2iz): Likewise. (__aeabi_f2uiz): Likewise. * config/arm/lib1funcs.asm (ARM_CALL): New macro. (__aeabi_uidivmod): New function or alias. (__aeabi_idivmod): Likewise. (__aeabi_idiv0): Likewise. (__aeabi_ldiv0): Likewise. (__aeabi_llsr): Likewise. (__aeabi_lasr): Likewise. (__aeabi_llsl): Likewise. (bpabi.S): Include it. * config/arm/libgcc-bpabi.ver: New file. * config/arm/symbian.h (ARM_DEFAULT_ABI): Remove. (LINK_SPEC): Remove. * config/arm/t-arm-elf (LIB1ASMFUNCS): Add __aeabi_lcmp and __aeabi_ulcmp. * config/arm/t-bpabi: New file. * doc/tm.texi (TARGET_LIBGCC_FUNCS): New entry. (TARGET_LIB_INT_CMP_BIASED): Likewise. * gcc.dg/testsuite/gcc.dg/arm-eabi1.c: New test. * gcc.dg/dll-2.c: Fix dg-require syntax. * gcc.misc-tests/arm-isr.c (abort): Declare. (exit): Likewise. From-SVN: r85788
2004-08-09expmed.c (sdiv_pow2_cheap, [...]): Change type to bool.Roger Sayle1-3/+28
* expmed.c (sdiv_pow2_cheap, smod_pow2_cheap): Change type to bool. (init_expmed): Fix potential overrun problem with "all.reg". (expand_sdiv2_pow2): Add an alternate implementation for signed division, if the target provides a suitable conditional move insn. From-SVN: r85728
2004-07-25convert.c (convert_to_real, [...]): Replace calls to build with calls to buildN.Roger Sayle1-35/+35
* convert.c (convert_to_real, convert_to_integer, convert_to_complex): Replace calls to build with calls to buildN. * coverage.c (tree_coverage_counter_ref): Likewise. * dojump.c (do_jump): Likewise. * dwarf2out.c (loc_descriptor_from_tree): Likewise. * emit-rtl.c (component_ref_for_mem_expr, set_mem_attributes_minus_bitpos): Likewise. * explow.c (update_nonlocal_goto_save_area): Likewise. * expmed.c (expand_shift, make_tree, const_mult_add_overflow_p, expand_mult_add): Likewise. * expr.c (emit_block_move_via_libcall, clear_storage_via_libcall, store_constructor, get_inner_reference, expand_expr_real_1, try_casesi, try_tablejump): Likewise. * function.c (expand_function_start): Likewise. * stmt.c (emit_case_bit_tests, expand_end_case_type, node_has_low_bound, node_has_high_bound, emit_case_nodes): Likewise. * stor-layout.c (place_union_field, layout_type): Likewise. * tree.c (substitute_in_expr, tree_fold_gcd): Likewise. * varasm.c (copy_constant): Likewise. From-SVN: r85160
2004-07-25expmed.c (init_expmed): A signed modulus by a power of two is considered ↵Roger Sayle1-1/+1
cheap if... * expmed.c (init_expmed): A signed modulus by a power of two is considered cheap if its less than or equal to four instructions. From-SVN: r85134
2004-07-14expmed.c (expand_sdiv_pow2): New function to expand signed division by a ↵Roger Sayle1-32/+49
positive power of two... * expmed.c (expand_sdiv_pow2): New function to expand signed division by a positive power of two, split out from expand_divmod. Provide an alternate implementation when shifts are expensive. Lower the threshold for using a branchless implementation to BRANCH_COST >= 2. (expand_divmod): Call expand_sdiv_pow2 for suitable divisions. From-SVN: r84686
2004-07-14expmed.c: Remove more references to QUEUED in the comments.Paolo Bonzini1-1/+0
2004-07-14 Paolo Bonzini <bonzini@gnu.org> * expmed.c: Remove more references to QUEUED in the comments. * expr.c: Likewise. From-SVN: r84678
2004-07-14expr.c (enqueue_insn, [...]): Remove.Paolo Bonzini1-29/+4
2004-07-14 Paolo Bonzini <bonzini@gnu.org> * expr.c (enqueue_insn, finish_expr_for_function, protect_from_queue, queued_subexp_p, mark_queue, emit_insns_enqueued_after_mark, emit_queue, expand_increment): Remove. (store_constructor): Expand increment as an assignment. (expand_expr_real_1 <case PREINCREMENT_EXPR, case PREDECREMENT_EXPR, case POSTINCREMENT_EXPR, case POSTDECREMENT_EXPR>): Abort. * expr.h (QUEUED_VAR, QUEUED_INSN, QUEUED_COPY, QUEUED_BODY, QUEUED_NEXT, finish_expr_for_function, protect_from_queue, emit_queue, queued_subexp_p): Remove. * function.h (pending_chain, x_pending_chain): Remove. * rtl.def (QUEUED): Remove. * emit-rtl.c (copy_insn_1, copy_most_rtx, set_used_flags, verify_rtx_sharing): Remove references to QUEUED. * genattrtab.c (attr_copy_rtx, clear_struct_flag, encode_units_mask): Likewise. * local-alloc.c (equiv_init_varies_p): Likewise. * rtl.c (copy_rtx): Likewise. * rtlanal.c (rtx_unstable_p, rtx_varies_p): Likewise. * simplify-rtx.c (simplify_gen_subreg): Likewise. * config/mn10300/mn10300.c (legitimate_pic_operand_p): Likewise. * builtins.c (expand_builtin, expand_builtin_apply, expand_builtin_mathfn, expand_builtin_mathfn_2, expand_builtin_mathfn_3, expand_builtin_setjmp_setup): Remove calls to emit_queue and protect_from_queue. * calls.c (expand_call, precompute_arguments, precompute_register_parameters, rtx_for_function_call, store_one_arg): Likewise. * dojump.c (do_compare_and_jump, do_jump): Likewise. * explow.c (memory_address): Likewise. * expmed.c (clear_by_pieces_1, clear_storage, clear_storage_via_libcall, emit_group_load, emit_group_store, emit_store_flag, expand_expr_real_1, store_by_pieces, store_constructor, store_expr, try_casesi, try_tablejump): Likewise. * function.c (expand_pending_sizes): Likewise. * optabs.c (emit_cmp_and_jump_insns, emit_conditional_add, emit_conditional_move, expand_fix, expand_float, prepare_cmp_insn): Likewise. * stmt.c (emit_case_bit_tests, expand_asm_expr, expand_computed_goto, expand_decl_init, expand_end_case_type, expand_end_stmt_expr, expand_expr_stmt_value, expand_return, expand_start_case, optimize_tail_recursion): Likewise. * config/c4x/c4x.c (c4x_expand_builtin): Likewise. * config/s390/s390.c (s390_expand_cmpmem): Likewise. From-SVN: r84675
2004-07-11expmed.c (init_expmed): Use stack-local structures for temporary rtl.Richard Henderson1-82/+114
* expmed.c (init_expmed): Use stack-local structures for temporary rtl. Don't recognize shifts. From-SVN: r84502