aboutsummaryrefslogtreecommitdiff
path: root/gcc/calls.c
AgeCommit message (Collapse)AuthorFilesLines
2000-01-18calls.c (emit_call_1): Mark parameter with ATTRIBUTE_UNUSED.Kaveh R. Ghazi1-1/+1
* calls.c (emit_call_1): Mark parameter with ATTRIBUTE_UNUSED. * except.c (eh_regs): Likewise. * final.c (output_operand): Likewise. * fold-const.c (target_isinf, target_isnan): Likewise. From-SVN: r31490
2000-01-13calls.c (emit_call_1): Wrap varaible `struct_value_size_rtx' in macro ↵Kaveh R. Ghazi1-0/+2
conditionals guarding use. * calls.c (emit_call_1): Wrap varaible `struct_value_size_rtx' in macro conditionals guarding use. * dwarf2out.c: Include "tm_p.h". * function.c (locate_and_pad_parm): Mark parameter with ATTRIBUTE_UNUSED. (expand_function_end): Likewise for variable `context'. * reorg.c (make_return_insns): Wrap prototype in macro HAVE_return. cp: * call.c: If GATHER_STATISTICS, declare `n_build_method_call'. From-SVN: r31398
2000-01-11alias.c: PROTO -> PARAMS.Kaveh R. Ghazi1-37/+38
* alias.c: PROTO -> PARAMS. * basic-block.h: Likewise. * bitmap.c: Likewise. * bitmap.h: Likewise. * builtins.c: Likewise. * c-aux-info.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. From-SVN: r31338
2000-01-04builtins.c (expand_builtin_strlen): Initialize variable `icode'.Kaveh R. Ghazi1-2/+2
* builtins.c (expand_builtin_strlen): Initialize variable `icode'. * calls.c (expand_call): Likewise for `old_stack_arg_under_construction'. * cpphash.c (macroexpand): Likewise for `args' and `rest_zero'. * function.c (pad_to_arg_alignment): Likewise for `save_var' and `save_constant'. * gcc.c (execute): Likewise for `ut' and `st'. * genattrtab.c (attr_rtx): Likewise for `rt_val'. * genopinit.c (gen_insn): Likewise for `m1', `m2' and `op'. * jump.c (jump_optimize_1): Likewise for `temp2'. * local-alloc.c (block_alloc): Likewise for `r1'. * loop.c (recombine_givs): Likewise for `life_start' and `life_end'. * reg-stack.c (check_asm_stack_operands): Likewise for `clobber_reg'. (subst_asm_stack_regs): Likewise for `clobber_reg' and `clobber_loc'. * regmove.c (fixup_match_1): Likewise for `insn_const', `dst_node' and `set2'. * reload.c (find_reloads): Likewise for `goal_alternative_number' and `goal_earlyclobber'. * scan-decls.c (scan_decls): Likewise for `prev_id_end'. * sdbout.c (sdbout_one_type): Likewise for `member_scl'. * stupid.c (stupid_life_analysis): Likewise for `chain'. * unroll.c (copy_loop_body): Likewise for `copy'. * varasm.c (output_constructor): Likewise for `byte'. ch: * actions.c (update_else_range_for_int_const): Initialize variables `lowval' and `highval'. (update_else_range_for_range): Likewise for `low_range_val' and `high_range_val'. cp: * class.c (warn_hidden): Initialize variable `fndecl'. From-SVN: r31207
1999-12-09sparc.h (PROMOTE_FOR_CALL_ONLY): Define.Jakub Jelinek1-6/+23
* config/sparc/sparc.h (PROMOTE_FOR_CALL_ONLY): Define. * calls.c (precompute_arguments): Make sure initial_value contains value pseudo which CSE expects. * cse.c (struct set): New entry orig_src. (cse_insn): Set it early on entry, use it for libcall EQUIV note replacement. From-SVN: r30846
1999-12-06calls.c (save_fixed_argument_area): If save_mode is BLKmode, always use ↵Jakub Jelinek1-6/+11
move_by_pieces to avoid infinite recursion. * calls.c (save_fixed_argument_area): If save_mode is BLKmode, always use move_by_pieces to avoid infinite recursion. (restore_fixed_argument_area): Likewise. From-SVN: r30805
1999-12-05tree.h (special_function_p): Declare.Mark Mitchell1-8/+6
* tree.h (special_function_p): Declare. * calls.c (special_function_p): Make it global. Don't take `name' as a parameter. Fix typo in 1999-11-28 change. (expand_cal): Adjust. From-SVN: r30788
1999-11-30calls.c (special_function_p): Remove `realloc' and add `strdup' to the list ↵Kaveh R. Ghazi1-2/+4
of functions which have attribute... * calls.c (special_function_p): Remove `realloc' and add `strdup' to the list of functions which have attribute malloc by default. From-SVN: r30731
1999-11-28tree.h (struct tree_decl): Add malloc_flag.Anthony Green1-4/+8
* tree.h (struct tree_decl): Add malloc_flag. (DECL_IS_MALLOC): Define. * c-common.c (attrs): Add A_MALLOC attribute. (init_attributes): Add this attribute to the table. (decl_attributes): Handle malloc attribute. * calls.c (special_function_p): Check for the malloc attribute. * extend.texi (Function Attributes): Document malloc attribute. From-SVN: r30689
1999-11-16explow.c (hard_function_value): Add outgoing argument.Jakub Jelinek1-3/+3
* explow.c (hard_function_value): Add outgoing argument. * expr.h (hard_function_value): Declare it. * calls.c (expand_call, emit_library_call_value): Update callers. * function.c (aggregate_value_p): Ditto. (diddle_return_value): Must look at the outgoing registers on archs with register windows. From-SVN: r30550
1999-10-31[multiple changes]Richard Kenner1-0/+1
Fri Oct 29 15:25:07 1999 Arnaud Charlet <charlet@ACT-Europe.FR> * gcov.c (DIR_SEPARATOR): Provide default. (output_data): Add test for MS-DOS format absolute filename. (fancy_abort): Correct program name. (open_files): Open all files in binary mode. * libgcc2.c (__bb_exit_func): Likewise. * profile.c (init_branch_prob): Specify binary when opening files. * flags.h (flag_unwind_tables): New decl. * toplev.c (flag_unwind_table): New definition. (f_options): Add -funwind-tables. (decode_g_option): Clarify warning when unknown -g option is given. (rest_of_compilation): If inside an inlined external function, pretend we are just being declared. * dwarf2out.c (dwarf2out_do_frame): Check -funwind_tables. (dwarf2out_frame_finish): Likewise. Fri Oct 29 06:32:44 1999 Geoffrey Keating <geoffk@cygnus.com> * flow.c (propagate_block): When the last reference to a label before an ADDR_VEC is deleted because the reference is a dead store, delete the ADDR_VEC. Fri Oct 29 07:44:26 1999 Vasco Pedro <vp@di.fct.unl.pt> * fold-const.c (merge_ranges): In not in0, but in1, handle upper bounds equal like subset case. Thu Oct 28 19:22:24 1999 Douglas Rupp <rupp@gnat.com> * dbxout.c (dbxout_parms): Generate a second stabs line for parameters passed in a register but moved to the stack. Thu Oct 28 19:12:57 1999 Sam Tardieu <tardieu@act-europe.fr> * gcc.c (pass_exit_codes, greatest_status): New variables. (struct option_map): Add entry for "--pass-exit-codes". (execute): Update greatest_status if error. (display_help): Add documentation for -pass-exit-codes. (process_command): Handle -pass-exit-codes. (main): Look at pass_exit_codes and greatest_status on call to exit. Thu Oct 28 18:06:50 1999 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * reload.c (find_reloads): Refine test for no input reload case to not includes reloads emitted after insn. * function.c (find_temp_slots_from_address): Handle sum involving a register that points to a temp slot. (update_temp_slot_address): Make recursive call if both old and new are PLUS with a common operand. * calls.c (expand_call): Mark temp slot for result as having address taken. * rtlanal.c (reg_referenced_p, case IF_THEN_ELSE): New case. * gcc.c (process_command): Add standard_exec_prefix with "GCC" component as well as "BINUTILS". * integrate.h (copy_rtx_and_substitute): New arg, FOR_LHS. * integrate.c (copy_rtx_and_substitute): Likewise. (expand_inline_function, integrate_parm_decls, integrate_decl_tree): All callers changed. * unroll.c (inital_reg_note_copy, copy_loop_body): Likewise. * dbxout.c (dbxout_type, case INTEGER_TYPE_NODE): If can use gdb extensions, write size of type; also be more consistent in using references when this is a subtype. * pa.md (extv, extzv, insv): Use define_expand to reject constant that is out of range. * loop.c (unknown_constant_address_altered): New variable. (prescan_loop): Initialize it. (note_addr_stored): Set it for RTX_UNCHANGING_P MEM. (invariant_p, case MEM): Remove handling for volatile and readony; check new variable if readonly. (check_dbra_loop): Chdeck unknown_constant_address_altered. * cse.c (canon_hash, case MEM): Do not record if BLKmode. (addr_affects_sp_p): Removed from note_mem_written and only define #ifdef AUTO_INC_DEC. * alpha.c (input_operand, case ADDRESSOF): Treat as REG. * regclass.c (record_reg_classes): Properly handle register move directions. * varasm.c (initializer_constant_valid_p, case MINUS_EXPR): Don't think valid if both operands are invalid. (struct constant_descriptor): New field RTL. (mark_const_hash_entry): Mark it. (record_constant{,_rtx}): Initialize it. (output_constant_def): Allocate RTL in permanent obstack and save in table. ({record,compare}_constant_1): Modes must match for CONSTRUCTOR of ARRAY_TYPE. * c-common.h (initializer_constant_valid_p): Delete decl from here. * output.h (initializer_constant_valid_p): Move decl to here. * c-common.c (initializer_constant_valid_p): Delete function from here. * varasm.c (initializer_constant_valid_p): Move function to here. * tree.h (STRIP_SIGN_NOPS): New macro. * fold-const.c (optimize_minmax_comparison): New function. (invert_truthvalue, case WITH_RECORD_EXPR): New case. (fold): Use STRIP_SIGN_NOPS instead of STRIP_TYPE_NOPS. (fold, case EQ_EXPR): Call optimize_minmax_comparison and add cases with ABS_EXPR, NEGATE_EXPR, PLUS_EXPR, MINUS_EXPR, and widening conversions. (fold, case LE_EXPR): Rework changing unsigned to signed comparisons to look at size of mode, not precision of type; also add missing cases. (optimize_bit_field_compare, decode_field_reference): Don't try to optimize COMPONENT_REF of a PLACEHOLDER_EXPR. * dwarf2out.c (ctype.h): Include. (dwarf2out_set_demangle_name_func): New function. (size_of_line_info): Deleted. (output_line_info): Compute size of line info table from difference of labels. (base_type_die, add_name_attribute): Call demangle function, if any. (field_byte_offset): Use bits per word for variable length fields. (gen_array_type_die): Add array name. (gen_subprogram_die): Ignore DECL_INLINE if -fno-inline. (dwarf2out_add_library_unit_info): New function. * explow.c (set_stack_check_libfunc): New function. (stack_check_libfunc): New static variable. (probe_stack_range): Allow front-end to set up a libfunc to call. * combine.c (simplify_comparison): When making comparison in wider mode, check for having commuted an AND and a SUBREG. (contains_muldiv): New function. (try_combine): Call it when dividing a PARALLEL. (simplify_rtx, case TRUNCATE): Don't remove for umulsi3_highpart. (simplify_comparison, case ASHIFTRT): Recognize sign-extension of a PLUS. (record_value_for_reg): If TEM is a binary operation with two CLOBBERs, use one of the CLOBBERs instead. (if_then_else_cond): If comparing against zero, just return thing being compared. * optabs.c (expand_abs): If machine has MAX, ABS (x) is MAX (x, -x). Don't generate shifts and subtract if have conditional arithmetic. * rtl.h (delete_barrier): New declaration. * jump.c (jump_optimize): Set up to handle conditional call. In conditional arithmetic case, handle CALL_INSN followed by a BARRIER. (delete_barrier): New function. * rtl.c (read_rtx): Call fatal if bad RTL code; check for bad mode. * recog.c (nonmemory_operand): Accept ADDRESSOF. * tree.c (build_type_attribute_variant): Push to obstack of ttype around type_hash_canon call. * expr.c (placeholder_list): Move decl to file scope. (expand_expr): Don't force access to volatile just because its address is taken. If ignoring reference operations, just expand the operands. (expand_expr, case COMPONENT_REF): Propagate EXPAND_CONST_ADDRESS to recursive call when expanding inner. Refine test for using bitfield operations vs pointer punning. (expand_expr, case CONVERT_EXPR): If converting to BLKmode UNION_TYPE from BLKmode, just return inner object. Use proper mode in store_field call. Properly set sizes of object to store and total size in store_field call for convert to union. (expand_expr, case ARRAY_REF): If OP0 is in a register, put it in memory (like for ADDR_EXPR). Also, don't put constant in register if we'll want it in memory. (readonly_fields_p): New function. (expand_expr, case INDIRECT_REF): Call it if LHS. (expand_assignment): Handle a RESULT_DECL where DECL_RTL is a PARALLEL. (do_jump, case WITH_RECORD_EXPR): New case. (get_inner_reference): Always go inside a CONVERT_EXPR and NOP_EXPR if both modes are the same. (store_field): Use bitfield operations if size of bitsize is not same as size of RHS's type. Check for bitpos not a multiple of alignment in BLKmode case. Do block move in largest possible alignment. (store_constructor): Set BITSIZE to -1 for variable size and properly in case of array of BLKmode. (expand_expr_unaligned): New function. (do_compare_and_jump): Call it. * mips/iris5.h (SWITCHES_NEED_SPACES): New macro. * collect2.c (main): Only allow -ofoo if SWITCHES_NEED_SPACES does not include 'o'. * function.c (instantiate_virtual_regs_1, case SET): Handle case where both SET_DEST and SET_SRC reference a virtual register. (gen_mem_addressof): Copy RTX_UNCHANGING_P from new REG to old REG. * integrate.c (expand_inline_function): Handle case of setting virtual stack vars register (from built in setjmp); when parameter lives in memory, expand virtual_{stack_vars,incoming_args}_rtx early. (subst_constant): Add new parm, MEMONLY. (expand_inline_function, integrate_parm_decls): Pass new parm. (integrate_decl_tree): Likewise. (copy_rtx_and_substitute, case MEM): Do copy RTX_UNCHANGING_P. (try_constants): Call subst_constants twice, with MEMONLY 0 and 1. (copy_rtx_and_substitute, case SET): Add explicit calls to copy_rtx_and_substitute for both sides. * stmt.c (expand_asm_operands): Don't use TREE_STRING_LENGTH for constraints. (pushcase{,_range}): Convert to NOMINAL_TYPE after checking for within INDEX_TYPE, instead of before. (fixup_gotos): Use f->target_rtl, not the next insn, since latter may be from a later fixup. (expand_value_return): Correctly convert VAL when promoting function return; support RETURN_REG being a PARALLEL. (expand_return): When checking for result in regs and having cleanup, consider PARALLEL in DECL_RTL as being in regs. From-SVN: r30299
1999-10-29Fix up last patch.Catherine Moore1-1/+1
From-SVN: r30265
1999-10-29expr.c (emit_push_insn): New argument alignment_pad.Catherine Moore1-8/+19
* expr.c (emit_push_insn): New argument alignment_pad. Update all callers. Adjust stack pointer based on alignment pad. * function.c (pad_to_arg_alignment): New argument alignment_pad. Update all callers. Track alignment_pad if boundary > PARM_BOUNDARY. (locate_and_pad_parm): New argument alignment_pad. Update all callers. * expr.h (emit_push_insn): Update prototype. (locate_and_pad_parm): Update prototype. * calls.c (arg_data): Add new field alignment_pad. (initialize_argument_information): Initialize alignment_pad. From-SVN: r30257
1999-10-26c-typeck.c (build_function_call): Check that the built-in function is of ↵Jeffrey A Law1-0/+1
class BUILT_IN_NORMAL before trying to... * c-typeck.c (build_function_call): Check that the built-in function is of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS. * calls.c (calls_function_1): Similarly for BUILT_IN_ALLOCA. * stmt.c (expand_end_cae): Similarly for BUILT_IN_CLASSIFY_TYPE. * call.c (build_over_call): Check that the built-in function is of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS. * typeck.c (build_function_call_real): Similarly. From-SVN: r30208
1999-10-21calls.c: Include tm_p.h later, so everything we need is defined.Kaveh R. Ghazi1-1/+1
* calls.c: Include tm_p.h later, so everything we need is defined. * expr.c: Likewise. * function.c: Likewise. * except.c: Include tm_p.h. * sparc.c: Likewise. (dwarf2out_cfi_label): Don't prototype. (check_return_regs, epilogue_renumber, ultra_cmove_results_ready_p, ultra_fpmode_conflict_exists, ultra_find_type, ultra_build_types_avail, ultra_flush_pipeline, ultra_rescan_pipeline_state, set_extends, ultra_code_from_mask, ultra_schedule_insn): Add static prototype. (data_segment_operand, text_segment_operand): Call itself with the proper number of arguments. (sparc_flat_save_restore, sparc_v8plus_shift): Constify a char*. * sparc.h: Move all declarations to sparc-protos.h. (SELECT_RTX_SECTION): Pass a missing MODE argument to symbolic_operand. * sparc/sysv4.h (SELECT_RTX_SECTION): Likewise. * config/svr4.h (text_section, ctors_section, dtors_section): Add Prototypes. (ASM_OUTPUT_SECTION_NAME, UNIQUE_SECTION, ASM_FINISH_DECLARE_OBJECT, ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII): Constify a char*. * sparc-protos.h: New file for sparc prototypes. cp: * expr.c: Include tm_p.h. From-SVN: r30122
1999-09-20Make it possible to prototype port-specific functions (and convert i386 to ↵Bernd Schmidt1-0/+1
use this) From-SVN: r29514
1999-09-15calls.c (precompute_arguments): Fix typo in comment.Mark Mitchell1-1/+1
* calls.c (precompute_arguments): Fix typo in comment. * expr.c (preexpand_calls): Don't preexpand the cleanup in a TARGET_EXPR. From-SVN: r29438
1999-09-06Merge in gcc2-ss-010999Jeff Law1-15/+26
From-SVN: r29150
1999-08-25Warning fixes:Kaveh R. Ghazi1-5/+5
* calls.c (emit_call_1): Mark parameter `stack_size' with ATTRIBUTE_UNUSED. (expand_call): Initialize variable `insn'. (emit_library_call): Likewise for variable `high_to_save'. (emit_library_call_value): Likewise. (store_one_arg): Likewise for variables `lower_bound' and `upper_bound'. * combine.c (try_combine): Likewise for variables `i2_code_number' and `other_code_number'. (find_split_point): Likewise for variables `pos', `unsignedp' and `inner'. (simplify_if_then_else): Likewise for variables `op' and `c1'. (simplify_and_const_int): Remove unused variable `width'. (merge_outer_ops): Likewise. * cse.c (simplify_binary_operation): Cast an INTVAL() to `unsigned HOST_WIDE_INT' when comparing against one. (simplify_relational_operation): Likewise. (cse_insn): Initialize variables `src_eqv_volatile', `src_eqv_in_memory', `src_eqv_in_struct', `src_eqv_hash' and `sets'. * final.c (init_final): Constify parameter `filename'. (final_start_function): Mark parameter `optimize' with ATTRIBUTE_UNUSED. (profile_function): Likewise for parameters `first' and `optimize'. (output_source_line): Likewise for parameter `file'. * integrate.c (subst_constants): Cast a value to `size_t' when comparing against one. (mark_stores): Initialize variable `mode'. Cast a value to `size_t' when comparing against one. * integrate.h (MAYBE_EXTEND_CONST_EQUIV_VARRAY): Likewise. * loop.c (move_movables): Initialize variable `first'. (strength_reduce): Likewise for variable `increment'. (check_dbra_loop): Likewise for variable `comparison_val'. Cast a value to `size_t' when comparing against one. (load_mems): Initialize variable `end_label'. * output.h (init_final): Constify parameter. * reload.c (decompose): Initialize variable `base'. * reload1.c (reload): Likewise for variable `is_scalar'. (spill_hard_reg): Mark parameter `dumpfile' with ATTRIBUTE_UNUSED. (choose_reload_regs): Initialize variable `mode'. (emit_reload_insns): Likewise for variable `store_insn'. (reload_cse_noop_set_p): Mark parameter `insn' with ATTRIBUTE_UNUSED. (reload_combine): Initialize variable `set'. * unroll.c (unroll_loop): Likewise for variable `local_label'. (copy_loop_body): Cast a value to `size_t' when comparing against one. * varasm.c (assemble_variable): Initialize variable `size_tree'. (const_hash): Add an `else abort()' in an if-else-if-else sequence. (remove_from_pending_weak_list): Mark parameter `name' with ATTRIBUTE_UNUSED. From-SVN: r28860
1999-08-25calls.c (emit_call_1): Use call_pop/call_value_pop for all values of ↵John David Anglin1-1/+10
n_popped when... * calls.c (emit_call_1): Use call_pop/call_value_pop for all values of n_popped when call/call_value are not defined. From-SVN: r28846
1999-08-09Include function.h in most files.Bernd Schmidt1-6/+6
Include function.h in most files. Remove most of the global variables duplicated in function.h. Add accessor macros for them which access current_function. Delete INLINE_HEADER rtx and related code, replace with code using struct function to store inlining related data. From-SVN: r28626
1999-05-07Donn Terry (donn@interix.com)Donn Terry1-4/+14
Donn Terry (donn@interix.com) * calls.c (rtx_for_function_call): Extend function pointer being passed to chkr_check_exec_libfunc, if needed. From-SVN: r26838
1999-04-29calls.c (emit_call_1): Pass rounded_stack_size to emit_call instead of the ↵Richard Henderson1-7/+7
unrounded size. * calls.c (emit_call_1): Pass rounded_stack_size to emit_call instead of the unrounded size. From-SVN: r26694
1999-04-26function.c (put_var_into_stack): Change ptr_mode to Pmode in setup for ↵Mumit Khan1-3/+3
chkr_set_right_libfunc calls. * function.c (put_var_into_stack): Change ptr_mode to Pmode in setup for chkr_set_right_libfunc calls. (assign_params): Likewise. * expr.c (emit_push_insn): Change ptr_mode to Pmode in setup for chkr_copy_bitmap_libfunc and chkr_set_right_libfunc calls. (expand_assignment): Change ptr_mode to Pmode in setup for chkr_add_libfunc and chkr_copy_bitmap_libfunc. (store_expr): Change ptr_mode to Pmode in setup for chkr_add_libfunc and chkr_copy_bitmap_libfunc. (expand_expr): Change ptr_mode to Pmode in setup for chkr_check_addr_libfunc. (expand_builtin): Change ptr_mode to Pmode in setup for chkr_check_str_libfunc, chkr_copy_bitmap_libfunc and chkr_check_addr_libfunc. * calls.c (rtx_for_function_call): Change ptr_mode to Pmode in setup for chkr_check_exec_libfunc. (expand_call): Change ptr_mode to Pmode in setup for chkr_set_right_libfunc. (expand_call): Change ptr_mode to Pmode in setup for chkr_set_right_libfunc. (store_one_arg): Change ptr_mode to Pmode in setup for chkr_set_right_libfunc. Co-Authored-By: Donn Terry <donn@interix.com> From-SVN: r26664
1999-04-25calls.c (emit_call_1): New arg rounded_stack_size; update callers.Richard Henderson1-20/+25
* calls.c (emit_call_1): New arg rounded_stack_size; update callers. Update pending_stack_adjust based on this value. (compute_argument_block_size): Include pending_stack_adjust in PREFERRED_STACK_BOUNDARY alignment. * function.c (assign_parms): Don't round to PREFERRED_STACK_BOUNDARY. From-SVN: r26623
1999-03-19Warning fixes:Kaveh R. Ghazi1-2/+2
* calls.c (initialize_argument_information): Mark parameters `num_actuals' and `n_named_args' with ATTRIBUTE_UNUSED. * dbxout.c (dbxout_start_new_source_file): Likewise for parameter `filename'. (dbxout_finish): Likewise for parameters `file' and `filename'. (dbxout_prepare_symbol): Likewise for parameter `decl'. (dbxout_begin_function): Likewise. * explow.c (hard_function_value): Likewise for parameter `func'. * function.c (locate_and_pad_parm): Likewise for parameter `fndecl'. * expmed.c (expand_divmod): Omit unused argument to `expand_abs'. * expr.c (expand_expr): Likewise. * expr.h (expand_abs): Delete unused argument from prototype. * optabs.c (expand_abs): Remove unused parameter `unsignedp'. * sdbout.c (sdbout_init): Mark parameter `syms' with ATTRIBUTE_UNUSED. (sdbout_end_block): Likewise for parameter `n'. * toplev.c (debug_define): Likewise for parameters `lineno' and `buffer'. (debug_undef): Likewise. * varasm.c (named_section): Likewise for parameter 'reloc'. (assemble_external): Likewise for parameter `decl'. (assemble_alias): Likewise for parameter `target'. From-SVN: r25858
1999-03-09calls.c (load_register_parameters): New function.Jeffrey A Law1-72/+85
* calls.c (load_register_parameters): New function. (expand_call): Use it. From-SVN: r25658
1999-03-09* calls.c (expand_call): Slightly reorganize code.Jeffrey A Law1-12/+11
From-SVN: r25655
1999-03-09calls.c (compute_argument_addresses): New function.Jeffrey A Law1-71/+106
* calls.c (compute_argument_addresses): New function. (rtx_for_function_call): New function. (expand_call): Use them. From-SVN: r25653
1999-03-08calls.c (initialize_argument_info): Accept a pointer to CUMULATIVE_ARGS.Jeffrey A Law1-8/+8
* calls.c (initialize_argument_info): Accept a pointer to CUMULATIVE_ARGS. (expand_call): Pass the address of CUMULATIVE_ARGS. From-SVN: r25646
1999-02-25sh.h (PASS_IN_REG_P): For TARGET_HITACHI, don't pass structures in registers.J"orn Rennecke1-7/+4
* sh.h (PASS_IN_REG_P): For TARGET_HITACHI, don't pass structures in registers. * expr.h (PRETEND_OUTGOING_VARARGS_NAMED): Provide default definition. * function.c (assign_parms): Honour PRETEND_OUTGOING_VARARGS_NAMED. * calls.c (expand_call): Likewise. * sh.c (sh_expand_prologue): For TARGET_HITACHI, don't push varargs / stdarg arguments. * sh.h (CPP_SPEC): Add -D__HITACHI__ for -mhitachi. (FUNCTION_ARG): For TARGET_HITACHI, don't pass unnamed arguments in registers. (PRETEND_OUTGOING_VARARGS_NAMED): Define. * va-sh.h (entire file): If __HITACHI__ is defined, use sh[123] flavour varargs. From-SVN: r25440
1999-02-24calls.c (initialize_argument_information): New function extracted from ↵Jeffrey A Law1-235/+295
expand_call. * calls.c (initialize_argument_information): New function extracted from expand_call. (expand_call): Use initialize_argument_information. Remove variables which are no longer used due to cleanups. From-SVN: r25416
1999-02-24calls.c (compute_argument_block_size): New function, extracted from ↵Jeffrey A Law1-52/+75
expand_calls. * calls.c (compute_argument_block_size): New function, extracted from expand_calls. (expand_calls): Use compute_argument_block_size. Delete original_args_size, use unadjusted_args_size instead. From-SVN: r25411
1999-02-24calls.c (precompute_arguments): New function, extracted from expand_call.Jeffrey A Law1-45/+78
* calls.c (precompute_arguments): New function, extracted from expand_call. (expand_call): Use precompute_arguments. From-SVN: r25409
1999-02-24calls.c (finalize_must_preallocate): New function, extracted from expand_call.Jeffrey A Law1-45/+66
* calls.c (finalize_must_preallocate): New function, extracted from expand_call. (expand_call): Use finalize_must_preallocate. * calls.c (store_one_arg): Mark "variable_size" as possibly unused. From-SVN: r25407
1999-02-16calls.c (store_one_arg): Mark any slots used for the argument as in-use ↵Jeffrey A Law1-7/+8
immediately after we're done... * calls.c (store_one_arg): Mark any slots used for the argument as in-use immediately after we're done saving any slots which will be overwritten by this argument. From-SVN: r25256
1999-01-26Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog forJeffrey A Law1-3/+4
details. From-SVN: r24879
1999-01-19calls.c (expand_call): Strip a TARGET_EXPR if we're passing by invisible ↵Jason Merrill1-0/+16
reference. * calls.c (expand_call): Strip a TARGET_EXPR if we're passing by invisible reference. From-SVN: r24763
1999-01-19rtl.h (rtx_def): Update documentation.Mark Mitchell1-11/+11
* rtl.h (rtx_def): Update documentation. (MEM_IN_STRUCT_P): Likewise. (MEM_SCALAR_P): New macro. (MEM_COPY_ATTRIBUTES): Likewise. (MEM_SET_IN_STRUCT_P): Likewise. * rtl.texi (MEM_SCALAR_P): Document. * alias.c (canon_rtx): Use MEM_COPY_ATTRIBUTES. (fixed_scalar_and_varying_struct_p): New function. Use MEM_SCALAR_P rather than !MEM_IN_STRUCT_P. (aliases_everything_p): Likewise. (true_dependence): Use them. (write_dependence_p): New function, containing code common to anti_dependence and output_dependence. (anti_dependence): Use it. (output_dependence): Likewise. * calls.c (save_fixed_argument_area): Don't clear MEM_IN_STRUCT_P. (expand_call): Use MEM_SET_IN_STRUCT_P. (emit_library_call): Don't clear MEM_IN_STRUCT_P. (emit_library_call_value): Likewise. (store_one_arg): Use MEM_SET_IN_STRUCT_P. * combine.c (simplify_rtx): Use MEM_COPY_ATTRIBUTES. (make_extraction): Likewise. (simplify_shift_const): Likewise. (gen_lowpart_for_combine): Likewise. * cse.c (gen_lowpart_if_possible): Use MEM_COPY_ATTRIBUTES. * emit-rtl.c (operand_subword): Likewise. (change_address): Likewise. * explow.c (stabilize): Use MEM_COPY_ATTRIBUTES. * expr.c (protect_from_queue): Use MEM_COPY_ATTRIBUTES. (emit_group_store): Use MEM_SET_IN_STRUCT_P. (copy_blkmode_from_reg): Likewise. (store_field): Likewise. (expand_expr): Remove bogus guesswork setting MEM_IN_STRUCT_P heuristically. Use MEM_SET_IN_STRUCT_P. (get_memory_rtx): Likewise. * final.c (alter_subreg): Use MEM_COPY_ATTRIBUTES. * function.c (assign_stack_temp): Clear MEM_SCALAR_P and MEM_ALIAS_SET on newly returned MEMs. (assign_temp): Use MEM_SET_IN_STRUCT_P. (put_reg_into_stack): Likewise. (fixup_var_refs1): Use MEM_COPY_ATTRIBUTES. (gen_mem_addressof): Use MEM_SET_IN_STRUCT_P. (assign_parms): Likewise. (expand_function): Likewise. * integrate.c (expand_inline_function): Likewise. (copy_rtx_and_substitute): Use MEM_COPY_ATTRIBUTES. * loop.c (note_addr_stored): Remove check on MEM_IN_STRUCT_P. * optabs.c (gen_move_insn): Use MEM_COPY_ATTRIBUTES. * print-rtl.c (print_rtx): Print /f for frame_related. * recog.c (validate_replace_rtx_1): Use MEM_COPY_ATTRIBUTES. * reload1.c (reload): Copy MEM_SCALAR_P as well. * stmt.c (expand_decl): Use MEM_SET_IN_STRUCT_P. (expand_anon_union_decl): Use MEM_COPY_ATTRIBUTES. * varasm.c (make_decl_rtl): Use MEM_SET_IN_STRUCT_P. (output_constant_def): Likewise. * a29k.c (a29k_set_memflags_1): Take scalar_p. Set MEM_SCALAR_P. (a29k_set_memflags): Use it. * alpha.c (get_aligned_mem): Use MEM_COPY_ATTRIBUTES. * c4x.c (c4x_scan_for_ld): Likewise. * h8300.c (fix_bit_operand): Likewise. * m88k.c (legitimize_address): Likewise. (block_move_loop): Likewise. (block_move_no_loop): Likewise. (block_move_sequence): Likewise. (m88k_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * mips/abi64.h (SETUP_INCOMING_VARARGS): Likewise. * rs6000.c (expand_block_move_insn): Use MEM_COPY_ATTRIBUTES. * sh.c (sh_builtin_saveregs): Use MEM_SET_IN_STRUCT_P. * arm.h (arm_gen_load_multiple): Take scalar_p. (arm_store_load_multiple): Likewise. * arm.c (arm_gen_load_multiple): Likewise. (arm_gen_store_multiple): Likewise. (arm_gen_movstrqi): Treat MEM_SCALAR_P like MEM_IN_STRUCT_P. From-SVN: r24759
1999-01-07calls.c (store_unaligned_arguments_into_pseudos): Use xmalloc to allocate ↵Mark Mitchell1-3/+13
memory that will live beyond this function. * calls.c (store_unaligned_arguments_into_pseudos): Use xmalloc to allocate memory that will live beyond this function. (expand_call): Free it here. From-SVN: r24561
1999-01-06Copyright fixes.Jeff Law1-1/+1
From-SVN: r24535
1999-01-06Revert changes which crept in by accident.Jeff Law1-98/+1
From-SVN: r24526
1999-01-06calls.c (special_function_p): Push alloca test inside the large conditional ↵Jeffrey A Law1-12/+109
which excludes functions not at... * calls.c (special_function_p): Push alloca test inside the large conditional which excludes functions not at file scope or not extern. From-SVN: r24524
1999-01-06calls.c (special_function_p): New function broken out of expand_call.Jeffrey A Law1-271/+360
* calls.c (special_function_p): New function broken out of expand_call. (precompute_register_parameters): Likewise. (store_one_arg): Likewise. (store_unaligned_argumetns_into_pseudos): Likewise. (save_fixed_argument_area): Likewise. (restore_fixed_argument_area): Likewise. (expand_call): Corresponding changes. From-SVN: r24516
1998-11-20function.c (nonlocal_goto_handler_slots): Renamed from ↵Bernd Schmidt1-1/+1
nonlocal_goto_handler_slot; now an EXPR_LIST chain. * function.c (nonlocal_goto_handler_slots): Renamed from nonlocal_goto_handler_slot; now an EXPR_LIST chain. (push_function_context_to): Adjust for this change. (pop_function_context_from): Likewise. (init_function_start): Likewise. (expand_function_end): Likewise. * function.h (struct function): Likewise. * calls.c (expand_call): Likewise. * explow.c (allocate_dynamic_stack_space): Likewise. * expr.h (nonlocal_goto_handler_slots): Rename its declaration. * stmt.c (declare_nonlocal_label): Make a new handler slot for each label. (expand_goto): When doing a nonlocal goto, find corresponding handler slot for it. Don't put the label address in the static chain register. (expand_end_bindings): Break out nonlocal goto handling code into three new functions. (expand_nl_handler_label, expand_nl_goto_receiver, expand_nl_goto_receivers): New static functions, broken out of expand_end_bindings and adapted to create one handler per nonlocal label. * function.c (delete_handlers): Delete insn if it references any of the nonlocal goto handler slots. * i960.md (nonlocal_goto): Comment out code that modifies static_chain_rtx. * sparc.md (nonlocal_goto): Likewise. (goto_handler_and_restore_v9): Comment out. (goto_handler_and_restore_v9_sp64): Comment out. From-SVN: r23732
1998-11-19expr.c (STACK_BYTES): Delete unused macro.Bernd Schmidt1-14/+18
* expr.c (STACK_BYTES): Delete unused macro. * calls.c: Provide default for PREFERRED_STACK_BOUNDARY. (STACK_BYTES): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY. (expand_call): Likewise. (emit_library_call): Likewise. (emit_library_call_value): Likewise. * function.c: Provide default for PREFERRED_STACK_BOUNDARY. (STACK_BYTES): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY. * explow.c: Provide default for PREFERRED_STACK_BOUNDARY. (round_push): Use PREFERRED_STACK_BOUNDARY, not STACK_BOUNDARY. (allocate_dynamic_stack_space): Likewise. * tm.texi (PREFERRED_STACK_BOUNDARY): Document new macro. (STACK_BOUNDARY): Update description to reflect the new situation. From-SVN: r23730
1998-11-08gansidecl.h: Prepend a "G" to the macro wrapping this file (to distinguish ↵Kaveh R. Ghazi1-4/+4
it from the macro... * gansidecl.h: Prepend a "G" to the macro wrapping this file (to distinguish it from the macro wrapping ansidecl.h.) Include libiberty's ansidecl.h. Remove all redundant definitions. Define the PROTO() style macros in terms of the PARAMS() ones. * calls.c (emit_library_call): Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to use ANSI variable args. (emit_library_call_value): Likewise. * cccp.c (error): Likewise. (warning): Likewise. (error_with_line): Likewise. (warning_with_line): Likewise. (pedwarn): Likewise. (pedwarn_with_line): Likewise. (pedwarn_with_file_and_line): Likewise. (fatal): Likewise. * cexp.y (error): Likewise. (pedwarn): Likewise. (warning): Likewise. * collect2.c (fatal_perror): Likewise. (fatal): Likewise. (error): Likewise. * combine.c (gen_rtx_combine): Likewise. * cpperror.c (cpp_message): Likewise. (cpp_fatal): Likewise. * cpplib.c (cpp_error): Likewise. (cpp_warning): Likewise. (cpp_pedwarn): Likewise. (cpp_error_with_line): Likewise. (cpp_warning_with_line): Likewise. (cpp_pedwarn_with_line): Likewise. (cpp_pedwarn_with_file_and_line): Likewise. * cpplib.h: Don't define PARAMS() macro. * demangle.h: Likewise. * doprint.c (checkit): Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to use ANSI variable args. * emit-rtl.c (gen_rtx): Likewise. (gen_rtvec): Likewise. * final.c (asm_fprintf): Likewise. * fix-header.c (cpp_message): Likewise. (fatal): Likewise. (cpp_fatal): Likewise. * gcc.c (concat): Likewise. (fatal): Likewise. (error): Likewise. * genattr.c (fatal): Likewise. * genattrtab.c (attr_rtx): Likewise. (attr_printf): Likewise. (fatal): Likewise. * gencodes.c (fatal): Likewise. * genconfig.c (fatal): Likewise. * genemit.c (fatal): Likewise. * genextract.c (fatal): Likewise. * genflags.c (fatal): Likewise. * genopinit.c (fatal): Likewise. * genoutput.c (fatal): Likewise. (error): Likewise. * genpeep.c (fatal): Likewise. * genrecog.c (fatal): Likewise. * halfpic.h: Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to declare `tree_node' and `rtx_def'. * hash.h: Don't define stuff we get from gansidecl.h. * mips-tfile.c: Likewise. Define __proto() in terms of PARAMS(). (fatal): Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to use ANSI variable args. (error): Likewise. * prefix.c (concat): Likewise. * scan.h: Likewise. * system.h: Likewise. * toplev.c (error_with_file_and_line): Likewise. (error_with_decl): Likewise. (error_for_asm): Likewise. (error): Likewise. (fatal): Likewise. (warning_with_file_and_line): Likewise. (warning_with_decl): Likewise. (warning_for_asm): Likewise. (warning): Likewise. (pedwarn): Likewise. (pedwarn_with_decl): Likewise. (pedwarn_with_file_and_line): Likewise. (sorry): Likewise. (really_sorry): Likewise. * toplev.h: Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to declare `tree_node' and `rtx_def'. * tree.c (build): Switch on ANSI_PROTOTYPES, not __STDC__, when deciding whether to use ANSI variable args. (build_nt): Likewise. (build_parse_node): Likewise. From-SVN: r23577
1998-10-13Warning fixes:Kaveh R. Ghazi1-8/+7
* Makefile.in (gencheck.o): Depend on gansidecl.h. * c-common.c (print_char_table): Add missing initializers. (scan_char_table): Likewise. (time_char_table): Likewise. * c-decl.c (c_decode_option): Mark parameter `argc' with ATTRIBUTE_UNUSED. (declare_parm_level): Mark parameter `definition_flag' with ATTRIBUTE_UNUSED. * c-lex.c (readescape): Use `(unsigned)1' in shift. (yylex): Likewise. Cast `sizeof' to an (int) when comparing against one. * calls.c (store_one_arg): Remove unused parameter `fndecl'. All callers changed. (emit_call_1): Mark parameters `fndecl' and `funtype' with ATTRIBUTE_UNUSED. (expand_call): Cast result of MIN() to (unsigned int) when comparing against an unsigned value. * cccp.c (pcfinclude): Remove unused parameter `limit'. All callers changed. (make_definition): Remove unused parameter `op'. All callers changed. (create_definition): Cast REST_EXTENSION_LENGTH to (long) when comparing against the result of pointer arithmetic. * config/mips/mips.h (FUNCTION_ARG_BOUNDARY): Cast to (unsigned) when comparing against one. * dwarf2out.c (dwarf2out_frame_debug): Cast REGNO() and HARD_FRAME_POINTER_REGNUM to (unsigned) when comparing against one. (output_die): Move variable `i' into the scope in which it is used. Change its type to `unsigned'. (output_die): Cast the result of `strlen' to (int) when passing it to ASM_OUTPUT_ASCII(). (output_pubnames): Likewise. (output_line_info): Likewise. * emit-rtl.c (global_rtl): Add missing initializers. * explow.c (promote_mode): Mark parameter `for_call' with ATTRIBUTE_UNUSED. * expmed.c (expand_shift): Cast the result of GET_MODE_BITSIZE to `unsigned HOST_WIDE_INT' when comparing against one. (synth_mult): Change type of variable `cost' to int. (emit_store_flag): Use `(unsigned HOST_WIDE_INT) 1' in shift. * expr.c (copy_blkmode_from_reg): Cast BITS_PER_WORD to (unsigned) when comparing against one. (get_inner_reference): Change variable `alignment' to unsigned. (expand_expr): Cast the result of GET_MODE_ALIGNMENT to (unsigned int) when comparing against one. (expand_builtin_setjmp): Change type of variable `i' to size_t. * fold-const.c (div_and_round_double): Cast BASE to (HOST_WIDE_INT) when comparing against one. * gencheck.c: Include gansidecl.h. (main): Mark parameter `argv' with ATTRIBUTE_UNUSED. * optabs.c (gen_cond_trap): Mark parameters `code', `op2' and `tcode' with ATTRIBUTE_UNUSED. * real.c (edivm): Cast constant value to (unsigned long) in expression compared against an unsigned value. * stmt.c (expand_return): Cast BITS_PER_WORD to (unsigned) when comparing against one. (expand_end_case): Cast CASE_VALUES_THRESHOLD to (unsigned int) when comparing against one. * stor-layout.c (mode_for_size): Cast MAX_FIXED_MODE_SIZE to (unsigned int) when comparing against one. Likewise for GET_MODE_BITSIZE. (smallest_mode_for_size): Likewise. (save_storage_status): Mark parameter `p' with ATTRIBUTE_UNUSED. (restore_storage_status): Likewise. * toplev.c (debug_args): Add missing initializer. (f_options): Spelling correction. Add missing initializers. (documented_lang_options): Likewise. (debug_end_source_file): Mark parameter `lineno' with ATTRIBUTE_UNUSED. * tree.c (valid_machine_attribute): Mark parameters `attr_args', `decl' and `type' with ATTRIBUTE_UNUSED. * varasm.c (decode_reg_name): Cast `sizeof' expression to (int) when comparing against one. (assemble_variable): Mark parameter `top_level' with ATTRIBUTE_UNUSED. (assemble_external_libcall): Mark parameter `fun' with ATTRIBUTE_UNUSED. (output_constant_pool): Mark parameters `fnname' and `fndecl' with ATTRIBUTE_UNUSED. From-SVN: r23054
1998-10-11Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage ↵Ken Raeburn1-9/+7
attribute. Fine-grained control of -fcheck-memory-usage with new no_check_memory_usage attribute. Misc minor bugfixes and tests for it too. From-SVN: r22983
1998-10-01calls.c (expand_call): Encapsulate code into copy_blkmode_from_reg.Gavin Romig-Koch1-69/+1
* calls.c (expand_call) : Encapsulate code into copy_blkmode_from_reg. * expr.c (copy_blkmode_from_reg): New function. * expr.h (copy_blkmode_from_reg): New function. * integrate.c (function_cannot_inline_p): We can inline these now. (expand_inline_function): Use copy_blkmode_from_reg if needed. Avoid creating BLKmode REGs. (copy_rtx_and_substitute): Don't try to SUBREG a BLKmode object. From-SVN: r22714