Commit Graph

425 Commits

Author SHA1 Message Date
Kaveh R. Ghazi e34d07f255 builtins.c (validate_arglist): Eliminate libiberty VA_ macros, always use stdarg.
gcc:
	* builtins.c (validate_arglist): Eliminate libiberty VA_ macros,
	always use stdarg.
	* c-errors.c (pedwarn_c99): Likewise.
	* c-format.c (status_warning): Likewise.
	* c-semantics.c (build_stmt): Likewise.
	* calls.c (emit_library_call, emit_library_call_value): Likewise.
	* collect2.c (notice, fatal_perror, fatal, error): Likewise.
	* cpperror.c (cpp_error, cpp_error_with_line): Likewise.
	* diagnostic.c (build_message_string, output_printf,
	output_verbatim, verbatim, inform, warning, pedwarn, error, sorry,
	fatal_error, internal_error, warning_with_decl, pedwarn_with_decl,
	error_with_decl, fnotice): Likewise.
	* dwarf2asm.c (dw2_asm_output_data, dw2_asm_output_delta,
	dw2_asm_output_offset, dw2_asm_output_pcrel, dw2_asm_output_addr,
	dw2_asm_output_addr_rtx, dw2_asm_output_nstring,
	dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128,
	dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128,
	dw2_asm_output_encoded_addr_rtx): Likewise.
	* emit-rtl.c (gen_rtx, gen_rtvec): Likewise.
	* errors.c (warning, error, fatal, internal_error): Likewise.
	* final.c (output_operand_lossage, asm_fprintf): Likewise.
	* fix-header.c (fatal): Likewise.
	* gcc.c (fatal, error, notice): Likewise.
	* gcov.c (fnotice): Likewise.
	* genattrtab.c (attr_rtx, attr_printf): Likewise.
	* gengtype.c (error_at_line, xasprintf, oprintf): Likewise.
	* gensupport.c (message_with_line): Likewise.
	* mips-tfile.c (fatal, error): Likewise.
	* protoize.c (notice): Likewise.
	* ra-debug.c (ra_debug_msg): Likewise.
	* read-rtl.c (fatal_with_file_and_line): Likewise.
	* rtl-error.c (error_for_asm, warning_for_asm): Likewise.
	* tree.c (build, build_nt, build_function_type_list): Likewise.

cp:
	* error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
	libiberty VA_ macros, always use stdarg.
	* rtti.c (create_pseudo_type_info): Likewise.
	* tree.c (build_min_nt, build_min): Likewise.

From-SVN: r66919
2003-05-17 22:21:35 +00:00
Olivier Hainque ee9609391b emit-rtl.c (last_call_insn, [...]): New functions.
* 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-03 10:25:22 -04:00
Alan Modra e79498768f calls.c (struct arg_data): Move offset, slot_offset, size and alignment_pad to struct locate_and_pad_arg_data.
* calls.c (struct arg_data): Move offset, slot_offset, size and
	alignment_pad to struct locate_and_pad_arg_data.  Update all refs.
	(initialize_argument_information): Adjust call to locate_and_pad_parm.
	Delete alignment_pad var.  Don't calculate slot_offset here.
	(emit_library_call_value_1): Delete alignment_pad, offset and size
	vars.  Use struct locate_and_pad_arg_data instead.  Adjust refs.
	Adjust call to locate_and_pad_parm.  Don't tweak arg size for
	partial in-regs here.  Formatting fixes.
	* expr.h (struct locate_and_pad_arg_data): New struct.
	(locate_and_pad_parm): Adjust declaration.
	* function.c (assign_parms): Localize vars.  Use "locate" instead of
	other arg location vars.  Don't invoke FUNCTION_ARG or
	FUNCTION_INCOMING_ARG unless pretend_named is different from
	named_arg.  Heed MUST_PASS_IN_STACK and set up "partial" before
	calling locate_and_pad_parm.  Adjust locate_and_pad_parm call.
	Use slot_offset for stack home of reg parms.  Correct test for
	parm passed in memory.  Formatting fixes.
	(locate_and_pad_parm): Add "partial" to params.  Replace offset_ptr
	arg_size_ptr and alignment pad with "locate".  Set slot_offset here.
	Correct initial_offset_ptr handling.  Localize vars.  Always pad
	locate->offset even when in_regs.

From-SVN: r66383
2003-05-02 23:52:09 +09:30
Olivier Hainque 0219237c53 calls.c (expand_call): When modes of target and valreg match, force sibcall failure when target is a MEM.
* calls.c (expand_call): When modes of target and valreg match,	force
	sibcall failure when target is a MEM.

From-SVN: r66260
2003-04-29 17:47:42 -04:00
Mark Mitchell b2dd096b0c Makefile.in (calls.o): Depend on except.h.
* Makefile.in (calls.o): Depend on except.h.
	* calls.c: Include except.h.
	(emit_call_1): Call note_eh_region_may_contain_throw if
	appropriate.
	* except.c (eh_region): Add may_contain_throw.
	(expand_eh_region_end_cleanup): Do not include handler code when
	it cannot be reached.
	(note_eh_region_may_contain_throw): New function.
	* except.h (note_eh_region_may_contain_throw): New function.

	* call.c (build_over_call): Use build_cxx_call.
	(build_cxx_call): New method, split out of build_over_call.
	* cp-tree.h (language_function): Add can_throw.
	(build_cxx_call): Declare it.
	* decl.c (finish_function): If a function does not contain any
	calls to functions that can throw an exception, indicate that
	fact.
	* decl2.c (mark_used): Do not defer the instantiation of
	functions, if the current function does not throw.
	* optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
	* pt.c (instantiate_decl): Make sure import_export_decl is called
	before emitting things.
	* rtti.c (throw_bad_cast): Use build_cxx_call.
	(build_dynamic_cast_1): Likewise.
	* typeck.c (build_function_call): Likewise.

	* g++.dg/template/recurse.C: Adjust location of error messages.

From-SVN: r65929
2003-04-22 05:44:12 +00:00
Olivier Hainque 6a48df451f calls.c (expand_call): Prevent sibcall optimization for calls to nested subprograms.
* calls.c (expand_call): Prevent sibcall optimization for calls to
	nested subprograms.

From-SVN: r65904
2003-04-21 17:08:50 -04:00
Richard Kenner f1d1b741e8 Install proper version.
From-SVN: r65815
2003-04-19 07:57:59 -04:00
Richard Kenner a259f21876 * calls.c (expand_call): Provide init for old_stack_pointer_delta.
From-SVN: r65814
2003-04-19 07:56:13 -04:00
Olivier Hainque 38afb23f55 calls.c (expand_call): Move special case for constructor calls to right place.
* calls.c (expand_call): Move special case for constructor calls
	to right place. Ensures constructor calls used to initialize
	arguments get a clean outgoing argument block for themselves.
	Move check for stack deallocation completeness until after last
	deallocation.  Add stack_pointer_delta to set of state
	variables saved and restored along with current stack_level.

From-SVN: r65795
2003-04-18 18:20:55 -04:00
Roger Sayle 1331d16fd4 builtin-types.def (BT_FN_STRING_CONST_STRING): New builtin type.
* builtin-types.def (BT_FN_STRING_CONST_STRING): New builtin type.
	(BT_FN_PTR_SIZE_SIZE): Likewise.
	* builtins.def (BUILT_IN_MALLOC, BUILT_IN_CALLOC, BUILT_IN_STRDUP):
	New built-in functions for malloc, calloc and strdup respectively.
	* calls.c (special_function_p): No need to handle malloc-like
	functions any longer.  ECF_MALLOC is set via built-in attributes.

	* c-decl.c (duplicate_decls): Preserve pure and malloc attributes.
	* cp/decl.c (duplicate_decls): Preserve pure and malloc attributes.
	* f/com.c (duplicate_decls): Preserve pure and malloc attributes.

	* doc/extend.texi: Document these new built-in functions.

	* gcc.dg/builtins-13.c: New test case.
	* gcc.dg/builtins-14.c: New test case.

From-SVN: r65560
2003-04-14 02:55:31 +00:00
Richard Henderson 68d28100a0 libfuncs.h (LTI_setbits, [...]): New.
* 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-11 12:45:32 -07:00
Roger Sayle 36dbb93d9f calls.c (flags_from_decl_or_type): Factor and remove redundant conditional tests.
* calls.c (flags_from_decl_or_type): Factor and remove redundant
	conditional tests.

From-SVN: r64347
2003-03-14 01:59:16 +00:00
Kazu Hirata 3dc575ffdb calls.c: Fix comment formatting.
* calls.c: Fix comment formatting.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* combine.c: Likewise.
	* dwarf2out.c: Likewise.
	* ggc-common.c: Likewise.
	* langhooks.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop.c: Likewise.
	* ra-build.c: Likewise.
	* sbitmap.c: Likewise.
	* toplev.c: Likewise.

From-SVN: r63966
2003-03-08 01:38:27 +00:00
Jan Hubicka b255a03659 Makefile.in (calls.o, [...]): Depend on cgraph.h
* Makefile.in (calls.o, toplev.o alias.o): Depend on cgraph.h
	* alias.c:  Include cgraph.h
	(mark_constant_function): Use cgraph_rtl_info.
	* calls.c:  Include cgraph.h
	(flags_from_decl_or_type): Use cgraph_rtl_info to find pure and const
	calls.
	(expand_call): Use cgraph_rtl_info to set preferred stack boundary.
	* cgraph.c (cgraph_rtl_info): New function.
	* cgraph.h (cgraph_rtl_info): Declare
	(cgraph_rtl_info): Likewise.
	* function.h (struct function): Add recursive_call_emit.
	* toplev.c: Include cgraph.h.
	(rest_of_compilation): Set preferred_incoming_stack_boundary.

	* gcc.dg/i386-local2.c: New.

From-SVN: r63868
2003-03-05 22:19:33 +00:00
Jason Merrill d1a74aa7d3 tree-inline.c (find_builtin_longjmp_call): Save and restore lineno and input_filename.
* tree-inline.c (find_builtin_longjmp_call): Save and restore
        lineno and input_filename.
        (find_alloca_call): Likewise.
        (inlinable_function_p): Run the langhook earlier.

        * calls.c (compute_argument_addresses): Give the new MEMs a
        minimum alignment of PARM_BOUNDARY.
cp/
        * decl.c (start_function): Clear DECL_NUM_STMTS.

        * class.c (get_vtable_decl): Use vtbl_type_node.
        (build_primary_vtable): Check for it.

From-SVN: r63733
2003-03-03 16:28:23 -05:00
Jan Hubicka 09e2bf486d calls.c (rtx_for_function_call): Take the address as an argument
* calls.c (rtx_for_function_call): Take the address as an argument
	(expand_call): Do not modify the expression.

From-SVN: r63725
2003-03-03 18:27:09 +00:00
Alan Modra 8403445aba calls.c (store_one_arg): Revert 1999-02-16 change.
* calls.c (store_one_arg): Revert 1999-02-16 change.  Revert
	2000-12-17 change.  Pass EXPAND_STACK_PARM to expand_expr.
	* expr.h (enum expand_modifier): Define EXPAND_STACK_PARM.
	(enum block_op_methods): Reorder for better store_expr optimization.
	* expr.c (store_expr): Test bit 1 of "want_value" for call param
	stores, test bit 0 for original want_value meaning.  Pass
	BLOCK_OP_CALL_PARM to emit_block_move when bit 1 set.  Adjust
	recursive calls, and calls to expand_param.
	(expand_expr): Handle EXPAND_STACK_PARM modifier.  When cse
	expected, set target to 0 rather than to subtarget.  Formatting.

From-SVN: r63337
2003-02-24 08:49:39 +10:30
Jan Hubicka 563a317a85 calls.c (expand_call): Update call of INIT_CUMULATIVE_ARGS
* calls.c (expand_call): Update call of INIT_CUMULATIVE_ARGS
	* function.c (assign_params): Likewise.
	* arm-protos.h (arm_init_cumulative_args): Update prototype.
	* arm.c (arm_init_cumulative_args): Update function.
	* arm.h (INIT_CUMULATIVE_ARGS): Update.
	* avr-protos.h (init_cumulative_args): Update prototype.
	* avr.c (init_cumulative_args): Update function.
	* avr.h (INIT_CUMULATIVE_ARGS): Update.
	* d30v-protos.h (d30v_init_cumulative_args): Update prototype.
	* d30v.c (d30v_init_cumulative_args): Update function.
	* d30v.h (INIT_CUMULATIVE_ARGS): Update.
	* frv-protos.h (frv_init_cumulative_args): Update prototype.
	* frv.c (frv_init_cumulative_args): Update function.
	* frv.h (INIT_CUMULATIVE_ARGS): Update.
	* mips.c (mips_expand_prolgue): Update call of INIT_CUMULATIVE_ARGS.
	* pa.h (INIT_CUMULATIVE_ARGS): Update.
	* sparc-protos.h (init_cumulative_args): Update prototype.
	* sparc.c (init_cumulative_args): Update function.
	* sparc.h (INIT_CUMULATIVE_ARGS): Update.
	* tm.texi (INIT_CUMULATIVE_ARGS): Update documentation.

From-SVN: r63126
2003-02-19 18:03:11 +00:00
Alan Modra 546ff7777c calls.c (try_to_integrate): Tidy stack_usage_map access.
* calls.c (try_to_integrate): Tidy stack_usage_map access.
	(emit_library_call_value_1): Likewise.	Formatting.
	(store_one_arg): Likewise.

From-SVN: r62622
2003-02-10 16:46:53 +10:30
Richard Henderson 40cdfd5aa4 * calls.c (default_must_pass_in_stack): Fix typo in !type case.
From-SVN: r61980
2003-01-28 08:56:36 -08:00
Alexandre Oliva c329756171 calls.c (emit_library_call_value_1): Handle return values in a PARALLEL.
* calls.c (emit_library_call_value_1): Handle return values
in a PARALLEL.

From-SVN: r61826
2003-01-26 09:06:36 +00:00
Alan Modra b820d2b870 calls.c (save_fixed_argument_area): Tidy.
* calls.c (save_fixed_argument_area): Tidy.
	(restore_fixed_argument_area): Tidy.  Set alignment of stack_area.
	(expand_call): Comment typo fixes.  Don't init low_to_save.  Start
	call chain loop at 1 if !try_tail_call.  Formatting.
	(emit_library_call_value_1): Don't init low_to_save or high_to_save.
	Use save_fixed_argument_area and restore_fixed_argument_area.

From-SVN: r61818
2003-01-26 12:37:48 +10:30
Kaveh R. Ghazi 1f5b3282d9 * calls.c (fix_unsafe_tree): Prototype.
From-SVN: r61545
2003-01-21 14:28:38 +00:00
Christian Ehrhardt 292e35a31b re PR rtl-optimization/7507 (ICE (segfault) with -O2)
PR opt/7507
        * calls.c (fix_unsafe_tree): Split out from ...
        (expand_call): ... here.  Use it on the function address too.

From-SVN: r61539
2003-01-21 00:02:31 -08:00
Richard Henderson a4b1b92af3 expr.h (MUST_PASS_IN_STACK): Move implementation...
* expr.h (MUST_PASS_IN_STACK): Move implementation...
        * calls.c (default_must_pass_in_stack): ... here.

From-SVN: r61514
2003-01-20 15:20:18 -08:00
Kazu Hirata 32dd366d5e basic-block.h: Fix comment formatting.
* basic-block.h: Fix comment formatting.
	* calls.c: Likewise.
	* combine.c: Likewise.
	* convert.c: Likewise.
	* gcov.c: Likewise.
	* haifa-sched.c: Likewise.
	* libgcc2.c: Likewise.
	* loop.c: Likewise.
	* profile.c: Likewise.
	* system.h: Likewise.

From-SVN: r61478
2003-01-18 22:32:06 +00:00
Dale Johannesen 0cdca92b46 calls.c (load_register_parameters): Add is_sibcall, sibcall_failure parameters.
2003-01-10  Dale Johannesen <dalej@apple.com>
        * calls.c (load_register_parameters):  Add is_sibcall, sibcall_failure
        parameters.  Call check_sibcall_argument_overlap if indicated.
        (check_sibcall_argument_overlap):  Add mark_stored_args_map
        parameter.  Don't mark parameter area as clobbered if not set.
        (expand_call):  Adjust calls to above.

From-SVN: r61165
2003-01-10 19:49:09 +00:00
Jason Merrill f32ac70dae calls.c (expand_call): Don't try to be clever about expanding the return slot address.
* calls.c (expand_call): Don't try to be clever about expanding
        the return slot address.

From-SVN: r60234
2002-12-18 00:57:43 -05:00
Jason Merrill 89ea02fbac calls.c (expand_call): Handle CALL_EXPR_HAS_RETURN_SLOT_ADDR with special struct-return ABIs.
* calls.c (expand_call): Handle CALL_EXPR_HAS_RETURN_SLOT_ADDR
        with special struct-return ABIs.

cp/
        * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
        of the CALL_EXPR.

From-SVN: r60223
2002-12-17 16:29:29 -05:00
Zack Weinberg 4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Steve Ellcey 9ac3e73b40 tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition.
* doc/tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition.
	* defaults.h (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition.
	* calls.c (store_unaligned_arguments_into_pseudos) Remove
	FUNCTION_ARG_REG_LITTLE_ENDIAN.
	* stmt.c (expand_return): Ditto.
	* expr.c (move_block_from_reg): Ditto.
	(copy_blkmode_from_reg): Ditto.
	* expmed.c (store_bit_field): Ditto.

From-SVN: r59962
2002-12-09 17:54:07 +00:00
Jan Hubicka c986baf631 calls.c (alloca_call_p): New global function.
* calls.c (alloca_call_p): New global function.
	* tree.h (alloca_call_p): New.
	* tree-inline.c (inlinable_function_p):  Do not inline when
	function calls alloca.
	(find_alloca_call, find_alloca_call_1): New functions.

From-SVN: r59228
2002-11-18 19:30:34 +00:00
H.J. Lu 2da4124d3d calls.c (PUSH_ARGS_REVERSED): Define only if not defined.
2002-11-10  H.J. Lu <hjl@gnu.org>

	* calls.c (PUSH_ARGS_REVERSED): Define only if not defined.
	* expr.c (PUSH_ARGS_REVERSED): Likewise.

	* config/i386/i386.h (PUSH_ARGS_REVERSED): Set to 1.

From-SVN: r59002
2002-11-10 19:13:18 -08:00
Ulrich Weigand 97d05bfdd2 c-opts.c (missing_arg): Use cl_options[opt_index].opt_code instead of just opt_index as switch expression.
* c-opts.c (missing_arg): Use cl_options[opt_index].opt_code
	instead of just opt_index as switch expression.

	* calls.c (store_one_arg): Change type of 'excess_align'
	to unsigned int.

	* profile.c (output_gcov_string): Change type of 'temp'
	to size_t.

From-SVN: r58381
2002-10-21 20:24:57 +00:00
Jan Hubicka db6556348d re PR c/7344 (performance regression on huge case statements)
* calls.c (expand_call): Simplify noreturn call.

	PR c/7344
	* cfgbuild.c (make_edges): Create edge cache when we do have
	large jumptable.
	(do_tablejump): Note size of maximal jumptable.
	* function.c (prepare_function_start): Zero out size.
	* function.h (function): Add max_jumptable_ents.

	* cfgcleanup.c (insn_match_p): Verify sibcall flag for calls to.

From-SVN: r58063
2002-10-11 20:26:50 +00:00
Richard Henderson fd1e5d25e3 calls.c (precompute_register_parameters): Force non-legitimate constants into pseudos.
* calls.c (precompute_register_parameters): Force non-legitimate
        constants into pseudos.
	* gcc.dg/tls/opt-3.c: New.

From-SVN: r57709
2002-10-01 13:49:39 -07:00
David S. Miller 99a3256796 re PR rtl-optimization/7335 (Sparc: ICE in verify_wide_reg (flow.c:557) with long double and optimization)
2002-09-26  David S. Miller  <davem@redhat.com>

	PR optimization/7335
	* calls.c (emit_library_call_value_1): Passing args by reference
	converts a CONST function into a PURE one.

From-SVN: r57576
2002-09-26 21:12:51 -07:00
Kazu Hirata da7d830409 ChangeLog: Follow spelling conventions.
* ChangeLog: Follow spelling conventions.
	* ChangeLog.0: Likewise.
	* ChangeLog.1: Likewise.
	* ChangeLog.2: Likewise.
	* ChangeLog.3: Likewise.
	* ChangeLog.4: Likewise.
	* ChangeLog.5: Likewise.
	* ChangeLog.6: Likewise.
	* FSFChangeLog.10: Likewise.
	* FSFChangeLog.11: Likewise.
	* alias.c: Likewise.
	* basic-block.h: Likewise.
	* c-aux-info.c: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-decl.c: Likewise.
	* c-format.c: Likewise.
	* c-semantics.c: Likewise.
	* c-typeck.c: Likewise.
	* calls.c: Likewise.
	* cfganal.c: Likewise.
	* cfgloop.c: Likewise.
	* collect2.c: Likewise.
	* combine.c: Likewise.
	* conflict.c: Likewise.
	* cppexp.c: Likewise.
	* cppfiles.c: Likewise.
	* cpphash.h: Likewise.
	* cppinit.c: Likewise.
	* cpplex.c: Likewise.
	* cpplib.c: Likewise.
	* cpplib.h: Likewise.
	* cppmacro.c: Likewise.
	* cse.c: Likewise.

From-SVN: r57398
2002-09-22 02:03:17 +00:00
Richard Henderson 1b1f20cab9 calls.c (store_one_arg): Rename default_align to parm_align; always adjust parm_align for downward padding.
* calls.c (store_one_arg): Rename default_align to parm_align;
	always adjust parm_align for downward padding.

From-SVN: r57292
2002-09-18 17:37:24 -07:00
John David Anglin 9dff28ab53 calls.c (store_one_arg): Set default alignment for BLKmode arguments to BITS_PER_UNIT when...
* calls.c (store_one_arg): Set default alignment for BLKmode arguments
	to BITS_PER_UNIT when ARGS_GROW_DOWNWARD and the padding direction is
	downward.
	* function.c (pad_below):  Always compile.
	(locate_and_pad_parm): If defined ARGS_GROW_DOWNWARD, pad argument to
	alignment when it is not in a register or REG_PARM_STACK_SPACE is true.
	Pad below when the argument is not in a register and the padding
	direction is downward.
	* pa-64.h (MUST_PASS_IN_STACK): Move define to pa.h.
	(PAD_VARARGS_DOWN): Define.
	* pa.c (function_arg_padding): Revise padding directions to make them
	compatible with the 32 and 64-bit runtime architecture documentation.
	(hppa_va_arg):  Add code to handle variable and size zero arguments
	passed by reference on TARGET_64BIT.  Reformat.
	(function_arg): Use a PARALLEL for BLKmode and aggregates args on
	TARGET_64BIT.  Use a DImode PARALLEL for BLKmode args 5 to 8 bytes
	wide when !TARGET_64BIT.  Move forward check for mode==VOIDmode.
	Add comments.
	* pa.h (MAX_PARM_BOUNDARY): Correct define for TARGET_64BIT.
	(RETURN_IN_MEMORY): Return size zero types in memory.
	(FUNCTION_VALUE): Return TFmode in general registers.
	(MUST_PASS_IN_STACK): Define.
	(FUNCTION_ARG_BOUNDARY): Simplify.
	(FUNCTION_ARG_PASS_BY_REFERENCE): Pass variable and zero sized types
	by reference.
	(FUNCTION_ARG_CALLEE_COPIES): Define to FUNCTION_ARG_PASS_BY_REFERENCE.

From-SVN: r57226
2002-09-17 03:30:37 +00:00
Kazu Hirata d57551c71b calls.c (emit_library_call_value_1): Don't refer to hard_libcall_value.
* calls.c (emit_library_call_value_1): Don't refer to
	hard_libcall_value.
	* optabs.c (prepare_float_lib_cmp): Likewise.

From-SVN: r57207
2002-09-16 18:47:59 +00:00
Jason Merrill db4c55f693 calls.c (store_one_arg): Use size_in_bytes to determine the amount of space to push.
* calls.c (store_one_arg): Use size_in_bytes to determine the
        amount of space to push.

From-SVN: r57064
2002-09-12 10:00:21 -04:00
Richard Henderson 44bb111a78 expr.h (enum block_op_methods): New.
* expr.h (enum block_op_methods): New.
        (emit_block_move): Update prototype.
        * expr.c (block_move_libcall_safe_for_call_parm): New.
        (emit_block_move_via_loop): New.
        (emit_block_move): Use them.  New argument METHOD.
        (emit_push_insn): Always respect the given alignment.
        (expand_assignment): Update call to emit_block_move.
        (store_expr, store_field, expand_expr): Likewise.
        * builtins.c (expand_builtin_apply): Likewise.
        (expand_builtin_memcpy, expand_builtin_va_copy): Likewise.
        * function.c (expand_function_end): Likewise.
        * config/sh/sh.c (sh_initialize_trampoline): Likewise.
        * config/sparc/sparc.c (sparc_va_arg): Likewise.
        * calls.c (expand_call, emit_library_call_value_1): Likewise.
        (save_fixed_argument_area): Use emit_block_move with
        BLOCK_OP_CALL_PARM instead of move_by_pieces.
        (restore_fixed_argument_area): Likewise.
        (store_one_arg): Fix alignment parameter to emit_push_insn.

From-SVN: r56661
2002-08-29 12:20:01 -07:00
Richard Henderson 236261548b calls.c: Include target.h.
* calls.c: Include target.h.
        * Makefile.in (calls.o): Update.

        * config/alpha/alpha.c (alpha_end_function): Use targetm.binds_local_p.
        * config/alpha/alpha.h (FUNCTION_OK_FOR_SIBCALL): Likewise.

From-SVN: r56335
2002-08-14 17:07:55 -07:00
J"orn Rennecke a0dc500c86 calls.c (emit_library_call_value_1): If FUNCTION_ARG_PASS_BY_REFERENCE is true...
* calls.c (emit_library_call_value_1): If
	FUNCTION_ARG_PASS_BY_REFERENCE is true, pretend this is neither
	libcall, const call nor pure call.

From-SVN: r55676
2002-07-23 12:18:10 +01:00
David S. Miller 2f937369fa Delete SEQUENCE rtl usage outside of reorg and ssa passes.
2002-06-05  David S. Miller  <davem@redhat.com>

	Delete SEQUENCE rtl usage outside of reorg and ssa passes.
	* rtl.h (gen_sequence, emit_insns, emit_insns_before,
	emit_insns_before_scope, emit_insns_after,
	emit_insns_after_scope): Delete declaration.
	* ada/misc.c (insert_code_for): Use emit_insn* instead of
	emit_insns_foo.
	* config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE.
	(alpha_set_memflags): Fix comment.
	(set_frame_related_p): Use get_insns instead of gen_sequence.
	* config/alpha/alpha.md (setjmp receiver splitter): Avoid
	emitting no insns.
	* config/arm/arm.c (arm_finalize_pic): Use get_insns instead of
	gen_sequence.
	(arm_gen_load_multiple, arm_gen_store_multiple): Likewise.
	* config/fr30/fr30.c (fr30_move_double): Likewise.
	* config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr):
	Likewise.
	* config/ia64/ia64.c (spill_restore_mem): Likewise.
	* config/ia64/ia64.md (conditional move spliiter): Avoid emitting
	no insns.
	* config/m32r/m32r.c (gen_split_move_double): Use get_insns
	instead of gen_sequence.
	* config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise.
	(mips_expand_prologue, mips16_gp_pseudo_reg): Likewise.
	* config/sh/sh.c (sh_need_epilogue): Likewise.
	* config/sparc/sparc.md (current_function_calls_alloca, flat): New
	attributes.
	(setjmp pattern and split): Use them to avoid splitter which emits
	no RTL.
	* genattrtab.c (main): Emit include of function.h
	* config/stormy16/stormy16.c (xstormy16_split_cbranch): Use
	get_insns instead of gen_sequence.
	* config/cris/cris.c (cris_split_movdx): Likewise.
	* emit-rtl.c (emit_insns*): Kill.
	(try_split): Expect insn list instead of SEQUENCE.
	(make_jump_insn_raw, make_call_insn_raw): Fix comments.
	(emit_*insn*): Reimplement to work with INSN lists and PATTERNs.
	Make them abort if a SEQUENCE is given and RTL checking is
	enabled.
	(emit_*_scope): Don't forget to set scope on final insn.
	(gen_sequence): Move from here...
	* ssa.c (gen_sequence): To here as private function.
	* builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix
	comments.
	(expand_builtin_return, expand_builtin_mathfn): Likewise.
	(expand_builtin_strlen): Use get_insns instead of gen_sequence.
	(expand_builtin_saveregs): Use emit_insn_foo, fix comments.
	(expand_builtin_expect_jump): Use get_insns and fix comments.
	* calls.c (try_to_integrate): Use emit_insn_foo.
	(expand_call, emit_library_call_value_1): Likewise.
	* expr.c (emit_queue): Handle insn lists instead of SEQUENCE.
	(emit_move_insn_1): Use get_insns instead of gen_sequence.
	(expand_expr): Use emit_insn_foo.
	* cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo.
	* except.c (build_post_landing_pads): Likewise.
	* flow.c (attempt_auto_inc): Likewise.
	* stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label,
	expand_nl_goto_receivers, expand_decl_cleanup): Likewise.
	* function.c (fixup_var_refs_insn): Use get_insns instead of
	gen_sequence.
	(fixup_var_refs_1): Likewise and expect insn list from gen_foo.
	(fixup_memory_subreg): Use get_insns instead of gen_sequence.
	(fixup_stack_1, purge_addressof_1, expand_main_function,
	get_arg_pointer_save_area): Likewise.
	(optimize_bit_field, instantiate_virtual_regs_1, assign_parms,
	expand_function_end): Use emit_insn_foo.
	(record_insns, keep_stack_depressed): Work with insn list instead
	of SEQUENCE, fix comments.
	* ifcvt.c (noce_emit_store_flag, noce_try_store_flag,
	noce_try_store_flag_constants, noce_try_store_flag_inc,
	noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith,
	noce_try_minmax, noce_try_abs): Use emit_insn_foo.
	(noce_process_if_block): Use get_insns instead of gen_sequence.
	* optabs.c (add_equal_note): Work with insn list, fix comments.
	(expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo.
	(expand_unop, expand_complex_abs, expand_unop_insn,
	expand_no_conflict_block): Likewise.
	(gen_move_insn): Use get_insns instead of gen_sequence.
	(gen_cond_trap): Likewise.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	(emit_initial_value_sets): Use emit_insn_foo.
	* reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise.
	(fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently
	now that RTL generators give insn lists.
	* sibcall.c (replace_call_placeholder): Use emit_insn_foo.
	* doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns
	instead of gen_sequence.
	(doloop_optimize): Work with insn lists instead of SEQUENCE rtl.
	* explow.c (emit_stack_save, emit_stack_restore): Use get_insns
	instead of gen_sequence.
	* loop.c (move_movables, emit_prefetch_instructions,
	gen_add_mult, check_dbra_loop, gen_load_of_final_value):
	Likewise.
	(loop_regs_update): Work with insn list instead of SEQUENCE rtl.
	(product_cheap_p): Likewise, and add commentary about RTL wastage
	here.
	* lcm.c (optimize_mode_switching): Use get_insns instead of
	gen_sequence.
	* profile.c (gen_edge_profiler): Likewise.
	* regmove.c (copy_src_to_dest): Likewise.
	* reg-stack.c (compensate_edge): Likewise and fix comment.
	* gcse.c (process_insert_insn): Likewise.
	(insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl.
	* jump.c (delete_prior_computation): Update comment.
	* genemit.c (gen_expand, gen_split, main): Use get_insns instead
	of gen_sequence, update comments to match.
	* recog.c (peephole2_optimize): Work with insn lists instead of
	SEQUENCE rtl.
	* sched-vis.c (print_pattern): Abort on SEQUENCE.
	* unroll.c (unroll_loop, find_splittable_givs, final_giv_value):
	Use get_insns instead of gen_sequence.
	(copy_loop_body): Likewise and don't emit dummy NOTE.
	* genrecog.c: Don't mention SEQUENCE rtl in comments.
	* combine.c (try_combine): Expect insn lists from split generator.
	* reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by
	hand.

From-SVN: r54497
2002-06-11 05:22:48 -07:00
J"orn Rennecke fcae219ac4 loop.c (load_mems): Don't change the interface of called functions.
* loop.c (load_mems): Don't change the interface of called functions.

	* calls.c (expand_call): Take current_function_pretend_args_size
	into account when setting argblock for sibcalls.

From-SVN: r52745
2002-04-25 00:52:16 +01:00
Jason Merrill e6f648758e fix whitespace
From-SVN: r52210
2002-04-12 06:35:30 -04:00
David S. Miller aa7634ddf7 calls.c (store_one_arg): If ECF_SIBCALL, use tail_call_reg.
2002-04-04  David S. Miller  <davem@redhat.com>

	* calls.c (store_one_arg): If ECF_SIBCALL, use tail_call_reg.

From-SVN: r51886
2002-04-04 15:30:18 -08:00
Neil Booth dffd7eb68a c-decl.c (grokdeclarator): Update.
* c-decl.c (grokdeclarator): Update.
	* c-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
	* c-tree.h (c_mark_addressable): New.
	* c-typeck.c (default_function_array_conversion, build_unary_op,
	build_array_ref, convert_for_assignment): Update.
	(mark_addressable): Rename.
	* calls.c (try_to_integrate, expand_call): Use langhook.
	* expr.c (expand_expr): Use langhook.
	* langhooks-def.h (LANG_HOOKS_INITIALIZER): Update.
	* langhooks.h (struct lang_hooks): New hook.
	* stmt.c (expand_asm_operands): Use langhook.
	* tree.h (mark_addressable): Remove.
ada:
	* decl.c (gnat_to_gnu_entity): Update.
	* gigi.h (mark_addressable): Rename.
	* misc.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
	* trans.c (tree_transform): Update.
	* utils.c (create_var_decl): Update.
	* util2.c (build_binary_op, build_unary_op,
	fill_vms_descriptor): Update.
	(mark_addressable): Rename, update.
cp:
	* call.c (build_addr_func): Update.
	* class.c (resolve_address_of_overloaded_function): Update.
	* cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
	* cp-tree.h (cxx_mark_addressable): New.
	* decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
	* decl2.c (build_cleanup): Update.
	* except.c (build_throw): Update.
	* init.c (resolve_offset_ref): Update.
	* pt.c (convert_nontype_argument): Update.
	* semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
	* typeck.c (decay_conversion, build_array_ref, build_unary_op,
	unary_complex_lvalue): Update.
	(mark_addressable): Rename.
f:
	* com.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
	(mark_addressable): Rename.
	(ffecom_arrayref_, ffecom_1): Update.
java:
	* java-tree.h (java_mark_addressable): New.
	* lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
	* typeck.c (mark_addressable): Rename, update.
objc:
	* objc-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.

From-SVN: r51705
2002-04-01 20:26:18 +00:00