aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
AgeCommit message (Collapse)AuthorFilesLines
2002-04-01c-common.c (unsigned_conversion_warning, [...]): Use new hooks.Neil Booth1-5/+3
* c-common.c (unsigned_conversion_warning, convert_and_check, unsigned_type, signed_type, shorten_compare, c_common_get_alias_set, c_common_nodes_and_builtins): Use new hooks. (unsigned_type, signed_type, signed_or_unsigned_type): Rename. * c-common.h (unsigned_type, signed_type, signed_or_unsigned_type): New. * c-decl.c (grokdeclarator): Update. * c-format.c (check_format_types): Update. * c-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * c-typeck.c (build_binary_op, convert_for_assignment): Update. * convert.c (convert_to_integer): Use new hooks. * expmed.c (make_tree): Use new hooks. * expr.c (store_expr): Use new hooks. * fold-const.c (operand_equal_for_comparison_p, build_range_check, all_ones_mask_p, unextend, fold): Use new hooks. * langhooks.h (struct lang_hooks_for_types): New hooks. * tree.h (signed_or_unsigned_type, signed_type, unsigned_type): Remove. ada: * gigi.h (unsigned_type, signed_type, signed_or_unsigned_type): Rename. * misc.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * trans.c (tree_transform, convert_with_check): Update. * utils.c (unsigned_type, signed_type, signed_or_unsigned_type): Rename. cp: * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * decl.c (grokdeclarator): Update. * mangle.c (write_integer_cst): Update. * typeck.c (build_binary_op): Update. f: * com.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. (unsigned_type, signed_type, signed_or_unsigned_type): Rename. java: * expr.c (build_java_binop): Update. * java-tree.h (java_signed_type, java_unsigned_type, java_signed_or_unsigned_type): Update. * lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. * parse.y (patch_binop): Update. * typeck.c (signed_or_unsigned_type, unsigned_type, signed_type): Update. objc: * objc-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New. From-SVN: r51684
2002-03-29re PR target/5672 ([mn10200] Compiler segmentation fault in static initialiser.)Richard Henderson1-1/+2
PR target/5672 * expr.c (expand_expr): Pass along EXPAND_INITIALIZER one more place. From-SVN: r51593
2002-03-29Makefile.in (convert.o, [...]): Update.Neil Booth1-9/+13
* Makefile.in (convert.o, calls.o, expmed.o): Update. * attribs.c (handle_mode_attribute, handle_vector_size_attribute): Use new hooks. * builtin-types.def (BT_PTRMODE): Update. * c-common.c (type_for_size): Rename c_common_type_for_size. (type_for_mode): Similarly. (shorten_compare, pointer_int_sum, c_common_nodes_and_builtins): Use new hook. * c-bommon.h (c_common_type_for_size, c_common_type_for_mode): New. * c-decl.c (finish_enum, build_enumerator): Use new hooks. * c-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * c-typeck.c (common_type, comptypes, default_conversion): Use new hooks. * calls.c: Include langhooks.h. (emit_library_call_value_1): Use new hooks. Avoid redundant calls. * convert.c: Include langhooks.h (convert_to_pointer, convert_to_integer): Use new hooks. * except.c (init_eh): Similarly. * expmed.c: Include langhooks.h. (expand_mult_add): Use new hooks. * expr.c (store_expr, store_constructor, expand_expr, do_jump, try_casesi): Similarly. * fold-const.c (optimize_bit_field_compare, make_range, decode_field_reference, fold_truthop, fold): Similarly. * function.c (assign_stack_local_1, assign_stack_temp_for_type, put_var_into_stack): Similarly. * langhooks-def.h (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): New. (LANG_HOOKS_TYPES_INITIALIZER): Update. * langhooks.h (lang_hooks_for_types): New hooks. * stmt.c (expand_decl_cleanup, emit_case_nodes): Use new hooks. * tree.c (get_unwidened, get_narrower): Similarly. * tree.h (type_for_mode, type_for_size): Remove. * varasm.c (force_const_mem): Use new hooks. ada: * gigi.h (type_for_size, type_for_mode): Rename. * misc.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * trans.c (tree_transform): Update. * utils.c (gnat_init_decl_processing, init_gigi_decls, builtin_function, float_type_for_size, signed_or_unsigned_type, build_vms_descriptor, unchecked_convert): Update. (type_for_mode, type_for_size): Rename. * utils2.c (nonbinary_modular_operation): Update. cp: * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks. * decl.c (finish_enum): Similarly. * error.c (dump_type): Similarly. * lex.c (cxx_init): Similarly. * mangle.c (write_builtin_type): Similarly. * typeck.c (comptypes): Similarly. f: * com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE): Redefine. (type_for_mode, type_for_size): Rename. (signed_or_unsigned_type, signed_type, truthvalue_conversion, unsigned_type): Use new hooks. java: * Make-lang.in (builtins.o): Update. * boehm.c (get_boehm_type_descriptor): Update. * builtins.c: Include langhooks.h. * decl.c (java_init_decl_processing): Update. * java-tree.h (java_type_for_mode, java_type_for_size): New. * lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. * typeck.c (type_for_mode, type_for_size): Update. objc: * objc-act.c (handle_impent): Update. * objc-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE): Redefine. From-SVN: r51571
2002-03-27c-common.c (c_expand_expr): Fix prototype.Neil Booth1-2/+3
* c-common.c (c_expand_expr): Fix prototype. * c-common.h (c_expand_expr): Always declare, update. * c-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. * c-objc-common.c (c_objc_common_init): No global hook. * expr.c (expand_expr): Use langhook. * expr.h (enum expand_modifier): Conditionally declare. * langhooks-def.h (lhd_expand_expr, LANG_HOOKS_EXPAND_EXPR): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_expand_expr): New. * langhooks.h (struct lang_hooks): New hook. * toplev.c (lang_expand_expr_t, lang_expand_expr): Delete. (lang_independent_init): Don't default hook. ada: * misc.c (LANG_HOOKS_EXPAND_EXPR): Redefine. (gnat_init): Don't set hook. (gnat_expand_expr): Fix prototype. cp: * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. * cp-tree.h (init_cplus_expand): Remove. (cxx_expand_expr): New. * expr.c (cplus_expand_expr): Rename cxx_expand_expr, fix prototype. (init_cplus_expand): Remove. * lex.c (cxx_init): Don't call init_cplus_expand. java: * expr.c (java_lang_expand_expr): Rename java_expand_expr, fix prototype. * java-tree.h (java_lang_expand_expr): Similarly. * lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. (java_init): Don't set hook. objc: * objc-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine. From-SVN: r51462
2002-03-25c-decl.c (maybe_build_cleanup): Remove.Neil Booth1-1/+2
* c-decl.c (maybe_build_cleanup): Remove. * expr.c (expand_expr): Use langhook. * langhooks-def.h (lhd_return_null_tree, LANG_HOOKS_MAYBE_BUILD_CLEANUP): New. (LANGHOOKS_INITIALIZER): Update. * langhooks.c (lhd_return_null_tree): New. * langhooks.h (struct lang_hooks): New hook. * tree-inline.c (initialize_inlined_parameters): Use langhook. * tree.h (maybe_build_cleanup): Remove. ada: * misc.c (maybe_build_cleanup): Remove. cp: * cp-tree.h (cxx_maybe_build_cleanup): New. * decl.c (destroy_local_var, hack_incomplete_structures): Update. (maybe_build_cleanup): Rename cxx_maybe_build_cleanup. * tree.c (build_target_expr): Update. f: * com.c (maybe_build_cleanup): Remove. java: * decl.c (maybe_build_cleanup): Remove. From-SVN: r51324
2002-03-25re PR target/6043 (IICE on ia64 for Blitz config test for C++ complex math)Jakub Jelinek1-4/+18
PR target/6043 * expr.c (emit_group_store): Handle storing into CONCAT. * g++.dg/opt/conj2.C: New test. From-SVN: r51311
2002-03-22fix g++ testcase crash namedret1.c on sparcv9 and s390Andrew MacLeod1-1/+2
2002-03-22 Andrew MacLeod <amacleod@redhat.com> * expr.c (expand_expr): A RESULT_DECL is part of a call. From-SVN: r51177
2002-03-21Makefile.in (fold-const.o, [...]): Update.Neil Booth1-1/+1
* Makefile.in (fold-const.o, stor-layout.o, stmt.o, sdbout.o, profile.o): Update. * c-common.c (c_common_nodes_and_builtins): Use pushdecl langhook. * c-common.h (gettags): Move here from tree.h. * c-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. * dbxout.c (dbxout_init): Use getdecls langhook. * expr.c (expand_expr): Use insert_block langhook. * fold-const.c: Include langhooks.h. (fold_range_test, fold_binary_op_with_conditional_arg, fold): Use global_bindings_p langhook. * integrate.c (expand_inline_function): Use insert_block langhook. * langhooks-def.h (LANG_HOOKS_DECLS, LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_GLOBAL_BINDINGS_P, LANG_HOOKS_INSERT_BLOCK, LANG_HOOKS_SET_BLOCK, LANG_HOOKS_PUSHDECL, LANG_HOOKS_GETDECLS): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.c (lhd_clear_binding_stack): Use global_bindings_p langhook. * langhooks.h (struct lang_hooks_for_decls): New. (struct lang_hooks): Update. * profile.c: Include langhooks.h. (output_func_start_profiler): Use new langhooks. * sdbout.c: Include langhooks.h. (sdbout_init, sdbout_finish): Use getdecls langhook. * stmt.c: Include langhooks.h. (expand_fixup, fixup_gotos): Use new langhooks. * stor-layout.c: Include langhooks.h. (variable_size): Use global_bindings_p langhook. * toplev.c (compile_file): Use getdecls langhook. * tree-inline.c (remap_block): Use insert_block langhook. * tree.h (pushdecl, pushlevel, poplevel, set_block, gettags, insert_block, getdecls, kept_level_p, global_bindings_p): Remove. cp: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. java: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, kept_level_p, global_bindings_p): New. f: * cp-tree.h (pushdecl, pushlevel, poplevel, set_block, insert_block, getdecls, global_bindings_p): New. From-SVN: r51136
2002-03-21* expr.c (emit_group_store): Don't copy const0_rtx to a CONCAT.Richard Kenner1-1/+1
From-SVN: r51123
2002-03-20PR optimization/5999, middle-end/5731Dale Johannesen1-0/+1
PR optimization/5999, middle-end/5731 * expr.c (expand_expr) [RDIV_EXPR]: Only convert real divisions into multiplications by reciprocals. * gcc.c-torture/compile/20020319-1.c: New test. From-SVN: r51071
2002-03-19expr.c (expand_expr): Sign-extend CONST_INT generated from TREE_STRING_POINTER.David Edelsohn1-7/+6
* expr.c (expand_expr): Sign-extend CONST_INT generated from TREE_STRING_POINTER. From-SVN: r51033
2002-03-19emit-rtl.c (gen_int_mode): New function.Lars Brinkhoff1-3/+2
* emit-rtl.c (gen_int_mode): New function. * rtl.h: Prototype for it. * combine.c (make_extraction, simplify_comparison), expmed.c (store_bit_field, expand_mult_highpart, expand_divmod), expr.c (convert_modes, store_field), optabs.c (expand_fix), simplify-rtx.c (neg_const_int, simplify_unary_real), * config/rs6000/rs6000.c, config/rs6000/rs6000.md: Use it instead of GEN_INT (trunc_int_for_mode (...)). From-SVN: r51030
2002-03-18re PR target/5740 (sparcv9 ICE on complex_value.cc in libstdc++ test suite)Jakub Jelinek1-6/+11
PR target/5740 * expr.c (emit_group_load): Use extract_bit_field if needed for CONCAT arguments. * g++.dg/opt/conj1.C: New test. From-SVN: r50975
2002-03-13expr.c (expand_expr, [...]): Do not call copy_to_reg with VOIDmode operand.Ulrich Weigand1-1/+18
* expr.c (expand_expr, case NE_EXPR): Do not call copy_to_reg with VOIDmode operand. Add compile-time optimization for constant results. From-SVN: r50734
2002-03-09re PR middle-end/5877 (negative offset to array index leads to inefficient code)Jakub Jelinek1-11/+12
PR middle-end/5877 * expr.c (highest_pow2_factor): Check TREE_INT_CST_LOW even for non-representable constants. From-SVN: r50495
2002-03-08expr.c (expand_expr): Use unsave lang hook.Neil Booth1-1/+2
* expr.c (expand_expr): Use unsave lang hook. * langhooks-def.h (LANG_HOOKS_UNSAVE): New. (LANG_HOOKS_INITIALIZER): Update. * langhooks.h (struct lang_hooks): New hook unsave. * tree.c (lang_unsave, lang_unsave_expr_now): Remove. (unsave_expr_1): Remove unused lang_unsave_expr_now. (unsave_expr_now_r): Rename lhd_unsave. Update. Return input. (unsave_expr_now): Remove. * tree.h (unsave_expr_now, lang_unsave, lang_unsave_expr_now): Remove. (lhd_unsave): New. cp: * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine. * cp-tree.h (cxx_unsave): New. * tree.c (cp_unsave): Rename cxx_unsave, update prototype. (init_tree): Update. From-SVN: r50449
2002-02-28rtl.texi (SUBREG_PROMOTED_UNSIGNED_P): Change definition to take ptr_extend ↵Steve Ellcey1-5/+5
into account as third type of extension. * doc/rtl.texi (SUBREG_PROMOTED_UNSIGNED_P): Change definition to take ptr_extend into account as third type of extension. (SUBREG_PROMOTED_UNSIGNED_SET): Definition of new macro to set bit fields used by SUBREG_PROMOTED_UNSIGNED_P. * rtl.h (SUBREG_PROMOTED_UNSIGNED_SET): New macro. (SUBREG_PROMOTED_UNSIGNED_P): Change to return -1 as well as 0 or 1. * calls.c (precompute_arguments): Use new macro. (expand_call): Ditto. * combine.c (nonzero_bits): Ditto. (record_promoted_value): Ditto. * expr.c (store_expr): Ditto. (expand_expr): Ditto. * function.c (assign_parms): Ditto. From-SVN: r50174
2002-02-25expr.c (expand_expr): Do not apply distributive law in EXPAND_SUM case.Richard Henderson1-14/+11
* expr.c (expand_expr) [MULT_EXPR]: Do not apply distributive law in EXPAND_SUM case. Use host_integerp/tree_low_cst. From-SVN: r50033
2002-02-22expr.c (store_expr): When converting expression to promoted equivalent type...Richard Kenner1-1/+5
* expr.c (store_expr): When converting expression to promoted equivalent type, allow using SUBREG_REG of TARGET as the target of the expansion of EXP. * loop.c (basic_induction_var, case SUBREG): Always look inside. * config/alpha/alpha.c (rtx_equiv_function_matters): Delete decl. (alpha_emit_set_const): Handle SImode when can't make new pseudos. (alpha_emit_set_const_1, alpha_sa_mask): Use no_new_pseudos. * config/alpha/alpha.md (addsi3, subsi3): Don't use if optimizing. From-SVN: r49972
2002-02-21emit-rtl.c (offset_address): Use simplify_gen_binary rather than ↵Richard Henderson1-20/+4
gen_rtx_PLUS to form the sum. * emit-rtl.c (offset_address): Use simplify_gen_binary rather than gen_rtx_PLUS to form the sum. * explow.c (force_reg): Rearrange to not allocate new pseudo when force_operand returns a register. * expr.c (expand_assignment): Allow offset_rtx expansion to return a sum. Do not force addresses into registers. (expand_expr): Likewise. * simplify-rtx.c (simplify_gen_binary): Use simplify_plus_minus to canonicalize arithmetic that didn't simpify. (simplify_plus_minus): New argument force; update all callers. Don't split CONST unless we can do something with it, and wouldn't lose the constness of the operands. * config/i386/i386.c (legitimize_pic_address): Recognize UNSPECs that we generated earlier. From-SVN: r49945
2002-02-21re PR c++/4574 (Internal compiler error in `expand_and', at expmed.c:4055)Jakub Jelinek1-13/+11
PR c++/4574 * expr.h (expand_and): Add mode argument. * expmed.c (expand_and): Add mode argument. (expand_mult_highpart_adjust, emit_store_flag): Adjust callers. * expr.c (store_field, expand_expr, do_store_flag): Likewise. * except.c (expand_builtin_extract_return_addr): Likewise. * config/alpha/alpha.c (alpha_initialize_trampoline): Likewise. * config/sparc/sparc.c (sparc_initialize_trampoline): Likewise. * config/c4x/c4x.h (INITIALIZE_TRAMPOLINE): Likewise. Use GEN_INT (x) instead of gen_rtx (CONST_INT, VOIDmode, x). * config/c4x/c4x.md: Use GEN_INT (x) instead of gen_rtx (CONST_INT, VOIDmode, x). * gcc.dg/20020220-1.c: New test. From-SVN: r49938
2002-02-19i386.md ("mmx_uavgv8qi3"): Use const_vector.Aldy Hernandez1-2/+9
2002-02-19 Aldy Hernandez <aldyh@redhat.com> * config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector. ("mmx_uavgv4hi3"): Same. ("pmulhrwv4hi3"): Same. * tree-inline.c (walk_tree): Handle vectors. * c-common.c (constant_expression_warning): Handle vectors. (overflow_warning): Same. * sched-deps.c (sched_analyze_2): Handle vectors. * rtlanal.c (rtx_unstable_p): Handle vectors. (rtx_varies_p): Same. (count_occurrences): Same. (regs_set_between_p): Same. (modified_between_p): Same. (modified_in_p): Same. (volatile_insn_p): Same. (volatile_refs_p): Same. (side_effects_p): Same. (may_trap_p): Same. (inequality_comparisons_p): Same. (replace_regs): Same. (computed_jump_p_1): Same. * rtl.c (DEF_MACHMODE): Change all definitions to accept 8th argument. (inner_mode_array): New. (copy_rtx): Handle vectors. (copy_most_rtx): Same. (rtx_equal_p): Same. (get_mode_alignment): Adjust for vectors. * resource.c (mark_referenced_resources): Handle vectors. (mark_set_resources): Same. * reload1.c (eliminate_regs): Handle vectors. (elimination_effects): Same. (scan_paradoxical_subregs): Same. * reload.c (subst_reg_equivs): Handle vectors. * regrename.c (scan_rtx): Handle vectors. * regclass.c (reg_scan_mark_refs): Handle vectors. * recog.c (find_single_use_1): Handle vectors. * local-alloc.c (equiv_init_varies_p): Handle vectors. (contains_replace_regs): Same. (memref_referenced_p): Same. * integrate.c (copy_rtx_and_substitute): Handle vectors. (subst_constants): Same. * genattrtab.c (attr_copy_rtx): Handle vectors. (encode_units_mask): Same. (clear_struct_flag): Same. (count_sub_rtxs): Same. * gcse.c (want_to_gcse_p): Handle vectors. (oprs_unchanged_p): Same. (hash_expr_1): Same. (oprs_not_set_p): Same. (expr_killed_p): Same. (compute_transp): Same. (store_ops_ok): Same. * function.c (purge_addressof_1): Do not allow paradoxical subregs of vectors. (fixup_var_refs_1): Same. (instantiate_virtual_regs_1): Same. * fold-const.c (operand_equal_p): Handle vectors. (fold): Same. (rtl_expr_nonnegative_p): Same. * flow.c (mark_used_regs): Handle vectors. * df.c (df_uses_record): Handle vectors. * cselib.c (cselib_subst_to_values): Handle vectors. (cselib_mem_conflict_p): Same. (hash_rtx): Same. * cse.c (canon_reg): Handle vectors. (fold_rt): Same. (cse_process_notes): Same. (count_reg_usage): Same. (canon_hash): Same. * alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR. * combine.c (mark_used_regs_combine): Add case for CONST_VECTOR. * emit-rtl.c (init_emit_once): Generate const0_rtx for vectors. (gen_rtx): Handle CONST_VECTOR. (gen_const_vector_0): New. (copy_rtx_if_shared): CONST_VECTORs can be shared. (reset_used_flags): Same. (copy_insn_1): Same. (initializer_constant_valid_p): Handle VECTOR_CST. * doc/c-tree.texi (Expression trees): Document VECTOR_CST. * doc/rtl.texi (Constants): Document const_vector. (CONST0_RTX): Update for vectors. (RTL sharing): Same. * print-tree.c (print_node): Add case for VECTOR_CST. * tree.h (TREE_VECTOR_CST_ELTS): New. (struct tree_vector): New. (union tree_node): Add vector node. (build_vector): Add prototype. * tree.def (VECTOR_CST): New. * tree.c (build_vector): New. * expmed.c (make_tree): Handle CONST_VECTOR. * rtl.h (CONSTANT_P): CONST_VECTORs are constants too. (CONST_VECTOR_ELT): New. (CONST_VECTOR_NUNITS): New. * machmode.h (GET_MODE_INNER): New. (DEF_MACHMODE): Accept 8th arg. * machmode.def: Add 8th argument for vector inner mode. Add inner vector modes for vectors. * rtl.def (VEC_CONST): Remove. (CONST_VECTOR): New. * expr.c (clear_storage): Allow vectors. (is_zeros_p): Handle VECTOR_CST. * varasm.c (output_constant_pool): Handle vectors. (rtx_const): Add veclo and vechi fields. (kind): Add RTX_VECTOR. (decode_rtx_const): Add case for vector. * config/rs6000/rs6000-protos.h: Add zero_constant. * config/rs6000/rs6000.c (rs6000_emit_move): Handle vector constants. Force easy vector constants into memory. (easy_vector_constant): New. (emit_easy_vector_constant): New. (rs6000_legitimize_reload_address): Do not generate bad reloads on darwin. * config/rs6000/rs6000.md ("altivec_lvx"): Reflect what instruction does. ("altivec_lvxl"): Same. (altivec_lvebx): Same. (altivec_lvehx): Same. (altivec_lvewx): Same. ("*movv4si_const0"): New. ("*movv4sf_const0"): New. ("*movv8hi_const0"): New. ("*movv16qi_const0"): New. From-SVN: r49853
2002-02-16* expr.c (store_constructor): Handle target REG case for ARRAY_TYPE.Richard Kenner1-1/+6
From-SVN: r49805
2002-02-13re PR c/5681 (gcc 3.0.3 produces wrong assembler code)Jakub Jelinek1-1/+1
PR c/5681: * expr.c (safe_from_p): Pass VOIDmode to true_dependence instead of GET_MODE (x). * gcc.c-torture/execute/20020213-1.c: New test. From-SVN: r49746
2002-02-12c-typeck.c (digest_init): Handle vectors.Stan Shebs1-6/+23
* c-typeck.c (digest_init): Handle vectors. (really_start_incremental_init): Same. (pop_init_level): Same. (process_init_element): Same. * varasm.c (output_constant): Same. * expr.c (clear_storage): Same. (store_constructor): Same. * gcc.dg/altivec-3.c: New. From-SVN: r49715
2002-02-08expr.c (expand_expr): Mind EXPAND_INITIALIZER for truncation also.Richard Henderson1-4/+13
* expr.c (expand_expr): Mind EXPAND_INITIALIZER for truncation also. * final.c (output_addr_const): Accept and discard SUBREG. * varasm.c (decode_addr_const): Don't abort on unknown expressions -- mark them unknown instead. (simplify_subtraction): Handle RTX_UNKNOWN. (initializer_constant_valid_p): Strip NOP_EXPRs that narrow the mode. * gcc.c-torture/compile/labels-3.c: New. From-SVN: r49622
2002-01-29expr.c (force_operand): Ignore flag_pic for detecting pic address loads.Richard Henderson1-2/+1
* expr.c (force_operand): Ignore flag_pic for detecting pic address loads. * regclass.c (init_reg_sets_1): Test fixed_regs not flag_pic for determining if PIC_OFFSET_TABLE_REGNUM is call-clobbered. * resource.c (mark_target_live_regs): Use regs_invalidated_by_call instead of open-coded loop. * doc/tm.texi (PIC_OFFSET_TABLE_REGNUM): Clarify that it must be fixed when in use. From-SVN: r49329
2002-01-23* expr.c (move_by_pieces_1): Extend size before negation.Richard Henderson1-2/+4
From-SVN: r49158
2002-01-12Fix editing errorRichard Kenner1-1/+1
From-SVN: r48802
2002-01-12diagnostic.c (warn_deprecated_use): Rework to lower indentation.Richard Kenner1-21/+25
* diagnostic.c (warn_deprecated_use): Rework to lower indentation. * expr.c (emit_move_insn_1): Remove warning, use HOST_WIDE_INT for offsets, and change line folding. * optabs.c (expand_binop): Remove warnings. * sdbout.c (sdbout_record_type_name): Constify NAME to avoid warning. From-SVN: r48801
2002-01-11* expr.c (expand_assignment): Fix misuse of MEM_KEEP_ALIAS_SET.Janis Johnson1-1/+1
From-SVN: r48785
2002-01-08expr.c (store_expr): Convert VOIDmode constants back to target's mode.Jakub Jelinek1-6/+12
* expr.c (store_expr): Convert VOIDmode constants back to target's mode. * gcc.dg/20020108-1.c: New test. From-SVN: r48658
2002-01-04tree.h (expand_expr_stmt_value): Add maybe_last argument.Jakub Jelinek1-2/+2
* tree.h (expand_expr_stmt_value): Add maybe_last argument. * c-common.h (genrtl_expr_stmt_value): Likewise. * stmt.c (expand_expr_stmt): Pass 1 as maybe_last. (expand_expr_stmt_value): Add maybe_last argument. Don't warn about statement with no effect if it is the last statement in expression statement. * c-semantics.c (genrtl_expr_stmt): Pass 1 as maybe_last. (genrtl_expr_stmt_value): Add maybe_last argument, pass it down to expand_expr_stmt_value. (expand_stmt) [EXPR_STMT]: Pass 1 as maybe_last to genrtl_expr_stmt_value if t is the last EXPR_STMT in its scope. * expr.c (expand_expr) [LABELED_BLOCK_EXPR, LOOP_EXPR]: Pass 1 as maybe_last to expand_expr_stmt_value. * gcc.dg/20020104-1.c: New test. From-SVN: r48541
2002-01-03builtins.c: Fix formatting.Kazu Hirata1-4/+4
* builtins.c: Fix formatting. * c-typeck.c: Likewise. * combine.c: Likewise. * expr.c: Likewise. * loop.c: Likewise. From-SVN: r48512
2002-01-02c-common.h (genrtl_expr_stmt_value): Declare.Alexandre Oliva1-3/+3
* c-common.h (genrtl_expr_stmt_value): Declare. * c-semantics.c (genrtl_goto_stmt): Redirect to... (genrtl_goto_stmt_value): ... this new function. Pass new argument down to expand_expr_stmt_value, taking TREE_ADDRESSABLE into account. * c-common.c (c_expand_expr): Mark the last EXPR_STMT of a STMT_EXPR as addressable, i.e., one whose result we want. * expr.c (expand_expr): Don't save expression statement value of labeled_blocks or loop_exprs. * stmt.c (expand_expr_stmt): Redirect to... (expand_expr_stmt_value): ... this new function. Use new argument to tell whether to save expression value. (expand_end_stmt_expr): Reset last_expr_type and last_expr_value if we don't have either. * tree-inline.c (declare_return_variable): Mark its use statement as addressable. * tree.h: Document new use of TREE_ADDRESSABLE. (expand_expr_stmt_value): Declare. From-SVN: r48456
2001-12-29expr.c (store_field): Use adjust_address, not PUT_MODE.Richard Kenner1-6/+3
* expr.c (store_field): Use adjust_address, not PUT_MODE. (expand_expr, case VIEW_CONVERT_EXPR): Likewise. * reload1.c (eliminate_regs, case SUBREG): Likewise, but use adjust_address_nv. * varasm.c (make_decl_rtl): Likewise. * integrate.c (copy_rtx_and_substitute, case MEM): Likewise, but use replace_equiv_address_nv. From-SVN: r48387
2001-12-29* expr.c (convert_move): If -fforce-mem, force FROM to not be memory.Richard Kenner1-0/+3
From-SVN: r48385
2001-12-28expr.c (expand_expr): Don't mark memory for non-constants as constant.Geoffrey Keating1-4/+1
* expr.c (expand_expr): Don't mark memory for non-constants as constant. From-SVN: r48338
2001-12-22expr.c (expand_expr, [...]): Handling taking address of SAVE_EXPR.Richard Kenner1-14/+26
* expr.c (expand_expr, case ADDR_EXPR): Handling taking address of SAVE_EXPR. * function.c (gen_mem_addressof): Add missing tests for SAVE_EXPR. (put_addressof_into_stack): Clarify code in setting of used_p. From-SVN: r48268
2001-12-17expmed.c (emit_store_flag): Extract updated comparison code from the return ↵Jeff Law1-0/+8
value of compare_from_rtx. * expmed.c (emit_store_flag): Extract updated comparison code from the return value of compare_from_rtx. * expr.c (do_store_flag): Similarly. From-SVN: r48128
2001-12-16expr.c (highest_pow2_factor, [...]): Fix error in last change.Richard Kenner1-1/+2
* expr.c (highest_pow2_factor, case INTEGER_CST): Fix error in last change. From-SVN: r48077
2001-12-15expr.c (highest_pow2_factor, [...]): Return BIGGEST_ALIGNMENT for 0.Richard Kenner1-8/+8
* expr.c (highest_pow2_factor, case INTEGER_CST): Return BIGGEST_ALIGNMENT for 0. From-SVN: r48042
2001-12-14expr.c (expand_expr, [...]): Don't honor flag_force_addr for modifier != ↵Hans-Peter Nilsson1-1/+5
EXPAND_CONST_ADDRESS... * expr.c (expand_expr, case ADDR_EXPR): Don't honor flag_force_addr for modifier != EXPAND_CONST_ADDRESS, modifier != EXPAND_INITIALIZER and modifier != EXPAND_SUM. * gcc.dg/20011113-1.c: New test. From-SVN: r47984
2001-12-13expr.c (copy_blkmode_from_reg): Add missing braces to eliminate warning and ↵Richard Kenner1-14/+19
reformat comments. * expr.c (copy_blkmode_from_reg): Add missing braces to eliminate warning and reformat comments. (expand_assignment): Don't pass EXPAND_WRITE if LHS is component. (highest_pow2_factor, case INTEGER_CST): Return BIGGEST_ALIGNMENT if overflow. From-SVN: r47983
2001-12-12Add missing blank.Richard Kenner1-1/+1
From-SVN: r47930
2001-12-11tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): New.Steve Ellcey1-4/+17
2001-12-11 Steve Ellcey <sje@cup.hp.com> * doc/tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): New. * defaults.h (FUNCTION_ARG_REG_LITTLE_ENDIAN): New. * calls.c (store_unaligned_arguments_into_pseudos): Check FUNCTION_ARG_REG_LITTLE_ENDIAN to see how structures are passed/returned. * expr.c (move_block_from_reg): Ditto. (move_block_from_reg): Ditto. (copy_blkmode_from_reg): Ditto. * stmt.c (expand_return): Ditto. * stor-layout.c (compute_record_mode): If FUNCTION_ARG_REG_LITTLE_ENDIAN is set then check MEMBER_TYPE_FORCES_BLK even if mode == VOIDmode. * config/ia64/hpux.h (MEMBER_TYPE_FORCES_BLK): Set to true so that Structures of one field are still treated as structures. (FUNCTION_ARG_REG_LITTLE_ENDIAN): New, set it to true. (FUNCTION_ARG_PADDING): Set to ia64_hpux_function_arg_padding(). (PAD_VARARGS_DOWN): Modify from default to not pad structures down. * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): New. * config/ia64/ia64.c (ia64_hpux_function_arg_padding): New function to special case handling of structure padding. From-SVN: r47904
2001-12-09ChangeLog.2, [...]: Fix spelling errors.Joseph Myers1-1/+1
* ChangeLog.2, ChangeLog.3, ChangeLog.5, ChangeLog, alias.c, cfgbuild.c, expmed.c, expr.c, final.c, flow.c, fold-const.c, function.c, config/alpha/alpha.md, config/alpha/vms-ld.c, config/arm/arm.c, config/arm/arm.h, config/c4x/libgcc.S, config/i370/i370.c, config/i386/i386.c, config/i386/i386-interix.h, config/i386/i386.md, config/i386/i386.h, config/i386/netbsd-elf.h, config/ia64/ia64.c, config/m32r/m32r-protos.h, config/mcore/mcore.h, config/rs6000/rs6000.h, config/sparc/linux64.h, config/sparc/sparc.c, config/v850/v850-protos.h, config/cris/cris.h, config/s390/s390.md, config/elfos.h: Fix spelling errors. From-SVN: r47815
2001-12-07expr.c (store_field): Remove warning.Richard Kenner1-9/+18
* expr.c (store_field): Remove warning. (expand_expr, case COMPONENT_REF, case VIEW_CONVERT_EXPR): Likewise. (highest_pow2_factor, case MIN_EXPR, case MAX_EXPR): Add cases. (highest_pow2_factor, case *_DIV_EXPR): Only can do something if divisor constant power of 2. (highest_pow2_factor, case COMPOUND_EXPR): Look at operand 1. From-SVN: r47753
2001-12-05attribs.c (handle_no_check_memory_usage_atribute): Deleted.Richard Kenner1-336/+51
* attribs.c (handle_no_check_memory_usage_atribute): Deleted. (c_com): Delete its reference. * builtins.c: Delete memory checking code. * calls.c, expr.c, function.c, stmt.c: Likewise. * builtins.c (expand_builtin_arg_info): Remove reference to EXPAND_MEMORY_USE_* modifiers. * explow.c (expr_size): Likewise. * expr.c (expand_expr, expand_increment): Likewise. * expr.h (ARGS_SIZE_RTX): Likewise. * function.c (assign_parms, expand_pending_sizeso): Likewise. * c-decl.c (duplicate_decls): Don't handle DECL_NO_CHECK_MEMORY_USAGE. * expr.c (in_check_memory_usage): Delete. (get_push_address, get_memory_usage_from_modifier): Delete. (expand_assigment): Use EXPAND_WRITE on destination. (expand_expr): Delete ro_modifier. * expr.h (expand_modifier): Delete EXPAND_MEMORY_* entries and add EXPAND_WRITE. (memory_use_mode): Delete. * flags.h (flag_check_memory_usage): Deleted. (flag_prefix_function_name): Likewise. * function.c (expand_function_start): Don't set current_function_check_memory_usage. * function.h (check_memory_usage): Delete. * libfuncs.h, optabs.c: Delete chkr_* stuff. * stmt.c (expand_asm_opernd): Change EXPAND_MEMORY_USE_WO to EXPAND_WRITE. * toplev.c (flag_check_memory_usage): Deleted. (flag_prefix_function_name): Likewise. (f_options, process_options): Delete references to above. * tree.h (DECL_NO_CHECK_MEMORY_USAGE): Deleted. * varasm.c (CHKR_PREFIX): Deleted. (make_decl_rtl): Remove flag_prefix_function_name handling. (assemble_name): Likewise. * doc/extend.texi: Remove no_check_memory_usage attribute. * doc/invoke.texi: Remove -fcheck-memory-usage and -fprefix-function-name. * cp/decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE. From-SVN: r47697
2001-12-05expr.c (expand_expr): When checking promoted value, use DECL_MODE (exp) and ↵Jakub Jelinek1-1/+1
not mode. * expr.c (expand_expr): When checking promoted value, use DECL_MODE (exp) and not mode. * g++.dg/other/anon-union.C: New test. From-SVN: r47674