aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
AgeCommit message (Collapse)AuthorFilesLines
2003-07-02expr.c (do_store_flag): Remove special case folding for single bit tests.Jeff Law1-55/+7
* expr.c (do_store_flag): Remove special case folding for single bit tests. Instead call back into the commonized folder routine. * fold-const.c (fold_single_bit_test): New function, mostly extracted from do_store_flag, with an additional case extracted from fold. (fold): Call fold_single_bit_test appropriately. * tree.h (fold_single_bit_test): Prototype. From-SVN: r68867
2003-07-02re PR rtl-optimization/11210 (optimizer drops conditional with typecast from ↵Eric Botcazou1-0/+3
signed to unsigned char) PR optimization/11210 * expr.c (handled_component_p) [NOP_EXPR]: Add ??? note about the behaviour with regard to bitfields. * fold-const (decode_field_reference): Record outermost type in case the expression is a NOP. Strip all NOPs. Set the signedness to that of the outermost type (if any) when the bitsize is equal to the size of the type. From-SVN: r68823
2003-06-29* expr.c (clear_by_pieces): Fix prototype.Ulrich Weigand1-1/+1
From-SVN: r68676
2003-06-29except.c: Convert prototypes to ISO C90.Andreas Jaeger1-311/+149
* except.c: Convert prototypes to ISO C90. * except.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * et-forest.h: Likewise. * except.c: Likewise. * explow.c: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. From-SVN: r68674
2003-06-29expr.c (emit_single_push_insn): If padding is needed downward...Kazu Hirata1-0/+36
* expr.c (emit_single_push_insn): If padding is needed downward, adjust the stack pointer first, and then store the data into the stack location using an offset. From-SVN: r68670
2003-06-27rtl.h (emit_note): Remove FILE parameter.Nathan Sidwell1-3/+3
* rtl.h (emit_note): Remove FILE parameter. * emit-rtl.c (emit_line_note): Adjust emit_note call. (emit_note): Remove FILE parameter. Adjust. * builtins.c (expand_builtin_expect): Adjust emit_note call. * c-semantics.c (genrtl_scope_stmt): Likewise. (expand_stmt): Likewise. * cfglayout.c (reemit_insn_block_notes): Likewise. (duplicate_insn_chain): Likewise. * except.c (expand_eh_region_start, expand_eh_region_end, sjlj_emit_function_enter): Likewise. * explow.c (probe_stack_range): Likewise. * expr.c (emit_block_move_via_loop): Likewise. * function.c (init_function_start, expand_function_start, expand_function_end, thread_prologue_and_epilogue_insns): Likewise. * integrate.c (expand_inline_function, copy_insn_list): Likewise. * reg-stack.c (compensate_edge): Likewise. * reload1.c (reload): Likewise. * rtlanal.c (hoist_insn_to_edge): Likewise. * stmt.c (expand_fixup, expand_start_loop, expand_start_null_loop, expand_loop_continue_here, expand_end_loop, expand_continue_loop, expand_exit_loop_top_cond, expand_value_return, expand_start_bindings_and_block, expand_end_bindings, expand_decl_cleanup, expand_start_case): Likewise. * unroll.c (copy_loop_body * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise. * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise. * config/rs6000/rs6000.c (rs6000_emit_eh_toc_restore, rs6000_emit_allocate_stack, rs6000_output_function_prologue, rs6000_output_function_epilogue, rs6000_output_mi_thunk): Likewise. * config/sh/sh.c (sh_output_mi_thunk): Likewise. * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise. * ada/misc.c (record_code_position): Likewise. From-SVN: r68561
2003-06-23basic-block.h: Fix comment formatting.Kazu Hirata1-2/+2
* basic-block.h: Fix comment formatting. * bt-load.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-format.c: Likewise. * coverage.c: Likewise. * cpplib.h: Likewise. * cpppch.c: Likewise. * dbxout.c: Likewise. * diagnostic.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * profile.c: Likewise. * real.h: Likewise. * sched-deps.c: Likewise. From-SVN: r68369
2003-06-22* expr.c (emit_move_insn_1): Fix a comment typo.Kazu Hirata1-2/+2
From-SVN: r68341
2003-06-19expr.c (const_vector_from_tree): Initialize remaining elements to 0.Aldy Hernandez1-0/+4
2003-06-19 Aldy Hernandez <aldyh@redhat.com> * expr.c (const_vector_from_tree): Initialize remaining elements to 0. From-SVN: r68210
2003-06-16decl.c, [...]: Don't use the PTR macro.Kaveh R. Ghazi1-8/+8
cp: * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR macro. gcc: * bitmap.c, builtins.c, c-incpath.c, cgraph.c, config/frv/frv.c, config/mips/mips.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c, dwarf2out.c, dwarfout.c, except.c, expr.c, expr.h, fold-const.c, function.c, gcc.c, genoutput.c, gensupport.c, global.c, haifa-sched.c, hashtable.c, ifcvt.c, integrate.c, local-alloc.c, loop.c, mips-tdump.c, mips-tfile.c, mkdeps.c, protoize.c, read-rtl.c, recog.h, reload1.c, sbitmap.c, ssa-dce.c, stringpool.c, tlink.c, tree.c, varasm.c, varray.c: Don't use the PTR macro. From-SVN: r68043
2003-06-16expr.c (expand_expr <PLUS_EXPR>): If operand_equal_p considers both operands ↵Roger Sayle1-3/+16
of the addition equal... * expr.c (expand_expr <PLUS_EXPR>): If operand_equal_p considers both operands of the addition equal, reuse the expanded RTL. (expand_expr <MULT_EXPR>): Likewise for multiplication. From-SVN: r68012
2003-06-14expr.c (expand_expr <COMPLEX_CST>): Handle the case of expanding a complex ↵Roger Sayle1-0/+23
constant into a CONCAT target. * expr.c (expand_expr <COMPLEX_CST>): Handle the case of expanding a complex constant into a CONCAT target. From-SVN: r67928
2003-06-11* expr.c (can_move_by_pieces): align argument may be unused.Ulrich Weigand1-1/+1
From-SVN: r67764
2003-06-11* expr.c (convert_move): Handle moves between two CONCATs.J"orn Rennecke1-0/+7
From-SVN: r67760
2003-06-08expr.h (EXPAND_MEMORY): New.Richard Henderson1-3/+9
* expr.h (EXPAND_MEMORY): New. * expr.c (expand_expr): Check it. * stmt.c (expand_asm_operands): Provide it when the constraint requires a memory. Warn for memory input constraints without a memory operand. * gcc.dg/20011029-2.c: Fix the array reference. * gcc.dg/asm-7.c: New. From-SVN: r67645
2003-06-03expr.c (emit_move_insn_1): Use emit_move_insn to move the parts of a complex ↵Roger Sayle1-16/+10
number rather than invoke... * expr.c (emit_move_insn_1): Use emit_move_insn to move the parts of a complex number rather than invoke mov_optab directly. From-SVN: r67389
2003-06-03builtins.c (expand_builtin_memcpy): Remove endp argument and endp != 0 handling.Jakub Jelinek1-9/+89
* builtins.c (expand_builtin_memcpy): Remove endp argument and endp != 0 handling. Pass 0 to store_by_pieces. (expand_builtin_mempcpy): Add endp argument. Don't call expand_builtin_memcpy, call store_by_pieces resp. move_by_pieces directly. If ignoring result, only do expand_call. (expand_builtin_stpcpy): Likewise. Call expand_builtin_mempcpy otherwise. (expand_builtin_strncpy, expand_builtin_memset): Adjust store_by_pices callers. (expand_builtin): Adjust expand_builtin_memcpy and expand_builtin_mempcpy callers. * expr.c (can_move_by_pieces): New function. (move_by_pieces): Add endp argument, return to resp. memory at end or one byte earlier depending on endp. (store_by_pieces): Likewise. (emit_block_move): Adjust call to move_by_pieces. (emit_push_insn): Adjust move_by_pieces caller. * expr.h (can_move_by_pieces): New prototype. (store_by_pieces): Adjust prototypes. * rtl.h (move_by_pieces): Adjust prototype. * config/mips/mips.c (expand_block_move): Adjust move_by_pieces caller. * gcc.c-torture/execute/builtins/string-4.c (main_test): Remove mempcpy test with post-increments. * gcc.c-torture/execute/string-opt-3.c: New test. * gcc.dg/string-opt-1.c: New test. From-SVN: r67358
2003-05-30cse.c (cse_insn): Simplify REG_EQUAL note on libcalls when making a ↵Roger Sayle1-5/+8
substitution. * cse.c (cse_insn): Simplify REG_EQUAL note on libcalls when making a substitution. (dead_libcall_p): If directly replacing a libcall with a constant value produces an invalid instruction, also try forcing the constant into the constant pool. * expr.c (emit_move_insn): Add a REG_EQUAL note when it is not obvious that the source is a constant. (compress_float_constant): Use set_unique_reg_note to place REG_EQUAL notes on instructions. From-SVN: r67247
2003-05-27tree.h (contains_placeholder_p): Now returns bool.Richard Kenner1-4/+4
* tree.h (contains_placeholder_p): Now returns bool. (CONTAINS_PLACEHOLDER_P): New macro. (type_contains_placeholder_p): New function. * tree.c (save_expr): Remove code avoiding folding COMPONENT_REF. (contains_placeholder_p): Now returns bool. Rework to use CONTAINS_PLACEHOLDER_P macro. (type_contains_placeholder_p): New function. * fold-const.c (fold, case COMPONENT_REF): Don't fold if type_contains_placeholder_p. (fold_range_test, fold_mathfn_compare, fold_inf_compare, fold): Use CONTAINS_PLACEHOLDER_P macro. * builtins.c (fold_builtin): Likewise. * calls.c (initialize_argument_information): Likewise. * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise. * explow.c (expr_size): Likewise. * expr.c (store_constructor, get_inner_reference): Likewise. * function.c (assign_parms): Likewise. * stor-layout.c (variable_size): Likewise. From-SVN: r67189
2003-05-22Finish correcting inadvertent checkin.Richard Kenner1-3/+3
From-SVN: r67107
2003-05-22Remove hunk commited in error.Richard Kenner1-1/+1
From-SVN: r67103
2003-05-22expr.c (expand_expr, [...]): Put into memory if constant and ↵Richard Kenner1-8/+7
EXPAND_CONST_ADDRESS, not just EXPAND_INITIALIZER. * expr.c (expand_expr, case CONSTRUCTOR): Put into memory if constant and EXPAND_CONST_ADDRESS, not just EXPAND_INITIALIZER. From-SVN: r67098
2003-05-13expr.c (move_by_pieces): Honor the alignment of TO and FROM.DJ Delorie1-1/+4
* expr.c (move_by_pieces): Honor the alignment of TO and FROM. (emit_push_insn): Don't use push when the source alignment is less than the stack's push rounding. From-SVN: r66770
2003-05-09expr.c (move_block_from_reg): Remove "size" parm.Alan Modra1-40/+5
* expr.c (move_block_from_reg): Remove "size" parm. Localize vars. Move code handling pieces not larger than a word to.. * function.c (assign_parms): ..here, but use change_address instead of adjust_address and operand_subword, and expand_binop instead of expand_shift. Adjust calls to move_block_from_reg. * expr.h (move_block_from_reg): Update declaration. (copy_blkmode_from_reg): Formatting. * Makefile.in (function.o): Add $(OPTABS_H) to deps. * config/alpha/alpha.c (alpha_setup_incoming_varargs): Adjust move_block_from_reg calls. * config/arc/arc.c (arc_setup_incoming_varargs): Likewise. * config/i960/i960.c (i960_setup_incoming_varargs): Likewise. * config/m32r/m32r.c (m32r_setup_incoming_varargs): Likewise. * config/m88k/m88k.c (m88k_builtin_saveregsk): Likewise. * config/mips/mips.c (mips_setup_incoming_varargs): Likewise. * config/pa/pa.c (hppa_builtin_saveregs): Likewise. * config/romp/romp.h (SETUP_INCOMING_VARARGS): Likewise. * config/rs6000/rs6000.c (setup_incoming_varargs): Likewise. * config/sh/sh.c (sh_builtin_saveregs): Likewise. From-SVN: r66623
2003-05-07stmt.c (force_label_rtx): New function, based on logic formerly found in ↵Zack Weinberg1-17/+9
expand_expr. * stmt.c (force_label_rtx): New function, based on logic formerly found in expand_expr. * expr.h: Prototype it. * expr.c (expand_expr <LABEL_DECL>): Use force_label_rtx if appropriate. * varasm.c (decode_addr_const <LABEL_DECL>): Use force_label_rtx. * print-tree.c (debug_tree): Free the table after we're done with it. Use putc. treelang: * Make-lang.in: Set -Wno-error for treelang/lex.o. From-SVN: r66579
2003-05-05expr.c (expand_expr, [...]): Refine the test forcing usage of bitfield ↵Olivier Hainque1-5/+7
instructions for mode1 != BLKmode... * expr.c (expand_expr, case BIT_FIELD_REF): Refine the test forcing usage of bitfield instructions for mode1 != BLKmode, only ignoring SLOW_UNALIGNED_ACCESS if the field is not byte aligned. (store_field): Likewise. From-SVN: r66492
2003-05-04expr.c (store_field): Don't clobber TEMP in shift: it might be a variable.Richard Kenner1-3/+15
* expr.c (store_field): Don't clobber TEMP in shift: it might be a variable. (get_inner_reference): Don't go through a VIEW_CONVERT_EXPR whose purpose is to step up the alignment. (expand_expr, case ADDR_EXPR): Force LO_SUM into memory, just like REG. From-SVN: r66465
2003-05-03expr.c (expand_expr, [...]): Don't use gen_lowpart on non-integer modes.Richard Kenner1-3/+5
* expr.c (expand_expr, case VIEW_CONVERT_EXPR): Don't use gen_lowpart on non-integer modes. From-SVN: r66430
2003-05-03emit-rtl.c (last_call_insn, [...]): New functions.Olivier Hainque1-27/+39
* emit-rtl.c (last_call_insn, add_function_usage_to): New functions. * rtl.h (last_call_insn, add_function_usage_to): New prototypes. * builtins.c (expand_builtin_apply): Use the new emit-rtl functions. * calls.c (emit_call_1): Likewise. (expand_call): For calls initializing constant memory, replace emission of standalone mem /u clobber with function usage entry. * expr.c (emit_block_move_via_libcall): Likewise. * cse.c (count_reg_usage, case EXPR_LIST): New case. * flow.c (propagate_one_insn): Pass entire operand of CALL_INSN_FUNCTION_USAGE to mark_used_regs. * integrate.c (try_constants): For CALL_INSNs, substitute constants within the FUNCTION_USAGE also. * loop.c (prescan_loop): Note clobbers of const mem mentioned in FUNCTION_USAGE lists. * reload1.c (replace_pseudos_in): Renamed. (reload): Use it for clobbers surviving until the end of the reload. From-SVN: r66429
2003-05-03c-decl.c (pending_invalid_xref_file): Remove.Nathan Sidwell1-4/+2
* c-decl.c (pending_invalid_xref_file): Remove. (pending_invalid_xref_line): Remove. (pending_invalid_xref_location): New. (lookup_label): Use location_t and input_location directly. (lookup_tag): Likewise. (pending_xref_error): Likewise. (c_expand_body_1): Likewise. * c-common.c (x_expand_start_cond): Likewise. * c-semantics.c (genrtl_for_stmt): Likewise. (find_reachable_label): Likewise. * expr.c (expand_expr): Likewise. * integrate.c (output_inline_function): Likewise. * tree-inline.c (find_alloca_call): Likewise. (find_builtin_longjmp_call): Likewise. * gcc.c (input_filename): Make static. From-SVN: r66425
2003-05-01input.h (lineno): Rename to ...Nathan Sidwell1-4/+4
* input.h (lineno): Rename to ... (input_line): ... here. * tree.h (lineno): Rename to ... (input_line): ... here. * scan.h (lineno): Rename to ... (input_line): ... here. * toplev.c (lineno): Rename to ... (input_line): ... here. (push_srcloc, pop_srcloc): Rename lineno to input_line. * c-common.c (c_expand_start_cond, fname_decl): Likewise. * c-decl.c (poplevel, pop_label_level, lookup_label, lookup_tag, store_parm_decls, c_expand_body_1): Likewise. * c-errors.c (pedwarn_c99): Likewise. * c-format.c (status_warning): Likewise. * c-lex.c (fe_file_change, cb_def_pragma, c_lex): Likewise. * c-opts.c (c_common_post_options, c_common_parse_file): Likewise. * c-parse.in (save_filename, maybe_type_qual, ifc): Likwise. * c-semantics.c (finish_stmt_tree, build_stmt, emit_local_var, gentrtl_goto_stmt, genrtl_expr_stmt_value, genrtl_decl_stmt, genrtl_if_stmt, genrtl_while_stmt, genrtl_do_stmt, genrtl_return_stmt, genrtl_for_stmt, build_break_stmt, build_continue_stmt, genrtl_switch_stmt, genrtl_asm_stmt, prep_stmt, find_reachable_label, expand_unreachable_stmt): Likewise. * coverage.c (create_coverage): Likewise. * diagnostic.c (pedwarn, sorry, error, fatal_error, internal_error, warning, diagnostic_report_current_module, inform): Likewise. * expr.c (expand_expr): Likewise. * integrate.c (expand_inline_function, output_inline_function): Likewise. * rtl-error.c (file_and_line_for_asm): Likewise. * tree-inline.c (find_alloca_call, find_builtin_longjmp_call, walk_tree): Likewise. * tree.c (make_node): Likewise. * ada, cp, f, java, objc, treelang: Likewise. ada * trans.c (build_unit_elab, set_lineno): Rename lineno to input_line. * utils.c (pushdecl, create_label_decl, begin_subprog_body, end_subprog_body): Likewise. * utils2.c (build_call_raise): Likewise. cp * class.c (finish_struct): Rename lineno to input_line. * decl.c (push_binding_level, pop_binding_level, suspend_binding_level, resume_binding_level, make_label_decl, use_label, start_function): Likewise. * decl2.c (warn_if_unknown_interface, start_static_initialization_or_destruction, generate_ctor_or_dtor_function, finish_file): Likewise. * error.c (cp_line_of, print_instantiation_full_context, print_instantiation_context): Likewise. * except.c (check_handlers_1, check_handlers): Likewise. * init.c (create_temporary_var): Likewise. * method.c (use_thunk, synthesize_method): Likewise. * parser.c (cp_lexer_set_source_position_from_token, cp_lexer_get_preprocessor_token): Likewise. * pt.c (push_tinst_level, pop_tinst_level, tsubst_friend_function, instantiate_class_template, tsubst_decl, tsubst, tsubst_expr, instantiate_decl): Likewise. * semantics.c (genrtl_try_block, finish_label_stmt, begin_class_definition, expand_body, genrtl_finish_function): Likewise. * tree.c (build_min_nt, build_min): Likewise. f * ansify.c (die_unless): Rename lineno to input_line. * com.c (ffecom_subscript_check_, ffecom_do_entry_, ffecom_gen_sfuncdef_, ffecom_start_progunit_, ffecom_sym_transform_, ffecom_sym_transform_assign_, bison_rule_pushlevel_, bison_rule_compstmt_, finish_function, store_parm_decls): Likewise. * intrin.c (ffeintrin_fulfill_generic): Likewise. * lex.c (ffelex_hash_, ffelex_include_, ffelex_next_line_, ffelex_file_fixed, ffelex_file_free): Likewise. * std.c (ffestd_exec_end): Likewise. * ste.c (ffeste_emit_line_note_, ffeste_start_block_, ffeste_start_stmt_): Likewise. * ste.h (ffeste_filelinenum, ffeste_set_line): Likewise. java * lex.h (lineno): Rename to ... (input_line): ... here * parse-scan.y (lineno): Rename to ... (input_line): ... here. (reset_report): Rename lineno to input_line. * check-init.c (check_init): Likewise. * class.c (push_class): Likewise. * decl.c (complete_start_java_method, end_java_method): Likewise. * expr.c (expand_byte_code): Likewise. * jcf-parse.c (give_name_to_class, parse_class_file): Likewise. * jcf-write.c (generate_bytecode_insns): Likewise. * lex.c (java_init_lex, java_allocate_new_line, do_java_lex): Likewise. * parse.h (YYNOT_TWICE): Likewise. * parse.y (empty_statement, expression_statement, java_pop_parser_context, java_parser_context_save_global, yyerror, register_fields, method_header, safe_layout_class, find_in_imports_on_demand, create_artificial_method, source_end_java_method, start_complete_expand_method, build_thisn_assign, java_complete_lhs, maybe_absorb_scoping_block): Likewise. objc * objc-act.c (objc_init): Rename lineno to input_line. (build_module_descriptor, build_selector_translation_table, build_protocol_template, build_method_prototype_list_template, build_category_template, build_selector_table, build_class_template, build_super_template, build_ivar_template, build_ivar_list_template, build_method_list_template, build_method_template, add_instance_variable): Likewise. treelang * tree1.c (treelang_init): Rename lineno to input_line. From-SVN: r66333
2003-04-30expr.c (emit_group_load): Dump parallels of simd types to memory.Aldy Hernandez1-0/+13
2003-04-29 Aldy Hernandez <aldyh@redhat.com> * expr.c (emit_group_load): Dump parallels of simd types to memory. From-SVN: r66280
2003-04-28c-decl.c (finish_decl): When prototype with asmspec is found for built-in...Jakub Jelinek1-20/+50
* c-decl.c (finish_decl): When prototype with asmspec is found for built-in, adjust built_in_decls as well as expr.c decls. * expr.c (init_block_move_fn, init_block_clear_fn): New functions. (emit_block_move_libcall_fn, clear_storage_libcall_fn): Use it. * expr.c (init_block_move_fn, init_block_clear_fn): New prototypes. * gcc.c-torture/execute/string-opt-asm-1.c: New test. * gcc.c-torture/execute/string-opt-asm-2.c: New test. From-SVN: r66181
2003-04-28expr.c (expand_expr <COMPLEX_CST, [...]): Always call output_constant_def, ↵Zack Weinberg1-20/+15
use its result instead of TREE_CST_RTL (exp). * expr.c (expand_expr <COMPLEX_CST, STRING_CST>): Always call output_constant_def, use its result instead of TREE_CST_RTL (exp). Can assume it has the form (mem (symbol_ref ".LCxxx")). (expand_expr <COMPONENT_REF>): Can always just extract the relevant field of a CONSTRUCTOR. (expand_expr <ARRAY_REF, COMPONENT_REF, BIT_FIELD_REF, ARRAY_RANGE_REF>): Make control flow explicit. * varasm.c (output_constant_def): Can look at TREE_CST_RTL of an INTEGER_CST. From-SVN: r66148
2003-04-26expr.c (store_field): When making temporary for store, don't make it ↵Richard Kenner1-5/+3
TYPE_QUAL_CONST. * expr.c (store_field): When making temporary for store, don't make it TYPE_QUAL_CONST. From-SVN: r66103
2003-04-22re PR middle-end/8866 (Bug in switch statement code generation -- missing label)Richard Henderson1-0/+1
PR 8866 * rtl.h (MEM_NOTRAP_P): New. (MEM_COPY_ATTRIBUTES): Copy it. * rtlanal.c (may_trap_p): Check it. * expr.c (do_tablejump): Set it. * doc/rtl.texi (Flags): Document it. * cfgrtl.c (try_redirect_by_replacing_jump): Revert last three changes. From-SVN: r65967
2003-04-21expr.c (store_constructor): Set RTX_UNCHANGING_P if readonly_field_p before ↵Richard Kenner1-1/+9
clearing. * expr.c (store_constructor): Set RTX_UNCHANGING_P if readonly_field_p before clearing. From-SVN: r65890
2003-04-16expr.c (store_field): Force usage of bitfield instructions when the field ↵Olivier Hainque1-5/+5
position requires it... * expr.c (store_field): Force usage of bitfield instructions when the field position requires it, whatever SLOW_UNALIGNED_ACCESS. (expand_expr, case BIT_FIELD_REF): likewise. From-SVN: r65701
2003-04-14expr.c (highest_pow2_factor): Return unsigned.Olivier Hainque1-6/+9
* expr.c (highest_pow2_factor): Return unsigned. * expr.h (offset_address): Likewise. * emit-rtl.c (offset_address): POW2 argument now unsigned. From-SVN: r65589
2003-04-11re PR c++/10202 ([IA64] ICE in int_mode_for_mode, at stor-layout.c)Richard Henderson1-1/+2
PR c++/10202 * expr.c (expand_expr): Use COMPLETE_OR_UNBOUND_ARRAY_TYPE_P not COMPLETE_TYPE_P for re-invoking layout_decl. * g++.dg/expr/incomplete1.C: New. From-SVN: r65484
2003-04-11libfuncs.h (LTI_setbits, [...]): New.Richard Henderson1-2/+2
* libfuncs.h (LTI_setbits, LTI_gcov_flush, LTI_gcov_init): New. (setbits_libfunc, gcov_flush_libfunc, gcov_init_libfunc): New. * optabs.c (init_optabs): Initialize them. (init_libfuncs): Use init_one_libfunc. * calls.c (expand_call): Use gcov_flush_libfunc. * expr.c (store_constructor): Use setbits_libfunc. * function.c (expand_main_function): Use init_one_libfunc. * profile.c (create_profiler): Use gcov_init_libfunc and DECL_RTL. From-SVN: r65478
2003-04-11re PR c/10201 ([IA64] ICE in int_mode_for_mode, at stor-layout.c)Richard Henderson1-15/+1
PR c/10201 * expr.c (expand_expr): Move DECL_RTL frobbing ... * stor-layout.c (layout_decl): ... here. From-SVN: r65467
2003-04-10expr.c (expand_assignment): Extend offset_rtx with convert_to_mode not with ↵Steve Ellcey1-6/+7
convert_memory_address. * expr.c (expand_assignment): Extend offset_rtx with convert_to_mode not with convert_memory_address. (store_constructor): Ditto, and same for copy_size_rtx. (expand_expr): Ditto. From-SVN: r65433
2003-04-07re PR c/9516 (Internal error when using a big array)Christian Ehrhardt1-9/+18
PR c/9516 * expr.c (safe_from_p): Rearrange to avoid deep recursion in favour of looping and tail recursion for TREE_LIST and binops. Co-Authored-By: Richard Henderson <rth@redhat.com> From-SVN: r65363
2003-04-01simd-3.c: New.Aldy Hernandez1-1/+42
* testsuite/gcc.c-torture/execute/simd-3.c: New. * expr.c (expand_expr): Handle VECTOR_CST. (const_vector_from_tree): New. * varasm.c (output_constant): Handle VECTOR_CST. * c-typeck.c (digest_init): Build a vector constant from a VECTOR_TYPE. * config/rs6000/rs6000.c: Remove prototype for easy_vector_constant. (easy_vector_constant): Add mode parameter. Rewrite to handle more easy constants. (rs6000_emit_move): Pass mode to easy_vector_constant. Call emit_easy_vector_insn for SPE V2SI vector constant moves. (emit_easy_vector_insn): New. (easy_vector_same): New. (EASY_VECTOR_15): New macro. (EASY_VECTOR_15_ADD_SELF): New macro. (bdesc_2arg): Rename to xorv2si3. (easy_vector_constant_add_self): New. (input_operand): Allow vector constants. * config/rs6000/rs6000.h (PREDICATE_CODES): Add easy_vector_constant, easy_vector_constant_add_self. (EXTRA_CONSTRAINT): Add 'W'. * config/rs6000/rs6000-protos.h: Add prototype for easy_vector_constant, emit_easy_vector_insn. * config/rs6000/altivec.md (xorv8hi3): New. (xorv16qi3): New. Remove all _const0 patterns. (movv4si_internal): Rewrite to use code. Add vector constant to vector alternative. Add splitter. (movv8hi_internal): Same. (movv16qi_internal): Same. (movv4sf_internal): Same. Change the unspecs for vspltis* to use constants. * config/rs6000/spe.md ("xorv4hi3"): New. ("spe_evxor"): Rename to xorv2si3. ("xorv1di3"): New. Remove all _const0 patterns. (movv2si_internal): Rewrite to use code. Add vector constant to alternatives. Add splitter. (movv4hi_internal): Add vector constant to alternatives. (movv1di_internal): Same. (movv2sf_internal): Same. From-SVN: r65130
2003-03-24re PR c++/7086 (compile time regression)Mark Mitchell1-5/+7
PR c++/7086 * c-typeck.c (c_mark_addressable): Adjust calls to put_var_into_stack. * expr.c (expand_expr): Likewise. * function.c (put_var_into_stack): Add rescan parameter. Do not call fixup_var_refs when rescan is false. (gen_mem_addressof): Likewise. (assign_parms): Adjust calls to put_var_into_stack. (setjmp_protect): Likewise. (setjmp_protect_args): Likewise. * rtl.h (gen_mem_addressof): Change prototype. * stmt.c (expand_decl): Adjust calls to put_var_into_stack. * tree.h (put_var_into_stack): Change prototype. PR c++/7086 * utils2.c: Adjust calls to put_var_into_stack. PR c++/7086 * semantics.c (genrtl_named_return_value): Adjust calls to put_var_into_stack. * typeck.c (cxx_mark_addressable): Likewise. PR c++/7086 * com.c (ffecom_sym_transform_): Adjust calls to put_var_into_stack. (ffe_mark_addressable): Likewise. From-SVN: r64781
2003-03-17re PR c++/10091 ([parisc] ICE in cp_expr_size, at cp/cp-lang.c:307)Jason Merrill1-8/+17
PR c++/10091 * expr.c (expand_expr) [ADDR_EXPR]: Disallow taking the address of an unaligned member of TREE_ADDRESSABLE type. * cp/typeck.c (build_class_member_access_expr): Compare TYPE_MAIN_VARIANTs. From-SVN: r64520
2003-03-15c-cppbuiltin.c (builtin_define_with_value_n): Fix whitespace.Roger Sayle1-1/+1
* c-cppbuiltin.c (builtin_define_with_value_n): Fix whitespace. * c-typeck.c (c_tree_expr_nonnegative_p): Likewise. * cfgbuild.c (find_many_sub_basic_blocks): Likewise. (find_sub_basic_blocks): Likewise. * cgraphunit.c (cgraph_expand_functions): Likewise. * dwarf2out.c (prune_unused_types): Likewise. * expr.c (store_field): Likewise. * genextract.c (print_path): Likewise. * haifa-sched.c (schedule_insn): Likewise. * lcm.c (compute_antinout_edge): Likewise. * loop-unroll.c (decide_peel_once_rolling): Likewise. * ra-colorize.c (ra_colorize_free_all): Likewise. * ra-debug.c (dump_igraph): Likewise. (debug_hard_reg_set): Likewise. * reg-stack.c (reg_to_stack): Likewise. * rtlanal.c (refers_to_regno_p): Likewise. * tracer.c (layout_superblocks): Likewise. * cp/tree.c (count_functions): Fix whitespace. * f/ste.c (ffeste_R810): Fix whitespace. From-SVN: r64402
2003-03-13Makefile.in (dojump.o): New target.Ansgar Esztermann1-979/+1
2003-03-13 Ansgar Esztermann <ansgar@thphy.uni-duesseldorf.de> * Makefile.in (dojump.o): New target. * dojump.c: New file. (init_pending_stack_adjust): Moved here from expr.c. (clear_pending_stack_adjust): Likewise. (do_pending_stack_adjust): Likewise. (jumpifnot): Likewise. (jumpif): Likewise. (do_jump): Likewise. (do_jump_by_parts_greater): Likewise. (do_jump_by_parts_greater_rtx): Likewise. (do_jump_by_parts_equality): Likewise. (do_jump_by_parts_equality_rtx): Likewise. (compare_from_rtx): Likewise. (do_compare_rtx_and_jump): Likewise. (do_compare_and_jump): Likewise. * expr.c (init_pending_stack_adjust): Removed to dojump.c. (clear_pending_stack_adjust): Likewise. (do_pending_stack_adjust): Likewise. (jumpifnot): Likewise. (jumpif): Likewise. (do_jump): Likewise. (do_jump_by_parts_greater): Likewise. (do_jump_by_parts_greater_rtx): Likewise. (do_jump_by_parts_equality): Likewise. (do_jump_by_parts_equality_rtx): Likewise. (compare_from_rtx): Likewise. (do_compare_rtx_and_jump): Likewise. (do_compare_and_jump): Likewise. (placeholder_list): Made declaration extern. * expr.h (placeholder_list): Declare. From-SVN: r64309
2003-03-12re PR c++/7050 (g++ segfaults on: (i ? get_string() : throw))Andrew Lewycky1-0/+10
PR c++/7050 * expr.c (store_expr): Don't attempt to store void-typed trees, just evaluate them for side effects. * cp/expr.c (cxx_expand_expr): Return const0_rtx for throw expressions. From-SVN: r64268