diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-29 12:18:36 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-29 12:18:36 +0000 |
commit | f5bc28dae417e7cd7eddaa71046445d359481467 (patch) | |
tree | 2ea3f022499b2b52e578f958001d178d596536d8 /gcc/calls.c | |
parent | 2f25e4ca07e6763cd89b62f7c54e6c962580c9f0 (diff) | |
download | gcc-f5bc28dae417e7cd7eddaa71046445d359481467.tar.gz |
* reginfo.c (init_reg_sets_1): Adjust comments.
* combine-stack-adj.c (rest_of_handle_stack_adjustments): Likewise.
* calls.c (prepare_call_address): Likewise.
(emit_call_1): Use targetm.calls.return_pops_args.
(expand_call): Likewise.
* function.c (assign_parms): Likewise.
* system.h (RETURN_POPS_ARGS): Add to #pragma poison list.
* target.h (struct gcc_target) [struct calls]: Add
return_pops_args field.
* targhooks.h (default_return_pops_args): Declare.
* targhooks.c (default_return_pops_args): Define.
* target-def.h (TARGET_RETURN_POPS_ARGS): Define.
(TARGET_CALLS): Add TARGET_RETURN_POPS_ARGS.
* doc/tm.texi (RETURN_POPS_ARGS): Rename to...
(TARGET_RETURN_POPS_ARGS): ...this. Use deftypefn. Adjust
documentation.
* config/alpha/alpha.h (RETURN_POPS_ARGS): Delete.
* config/arc/arc.h (RETURN_POPS_ARGS): Likewise.
* config/arm/arm.h (RETURN_POPS_ARGS): Likewise.
* config/avr/avr.h (RETURN_POPS_ARGS): Likewise.
* config/bfin/bfin.h (RETURN_POPS_ARGS): Likewise.
* config/cris/cris.h (RETURN_POPS_ARGS): Likewise.
* config/crx/crx.h (RETURN_POPS_ARGS): Likewise.
* config/fr30/fr30.h (RETURN_POPS_ARGS): Likewise.
* config/frv/frv.h (RETURN_POPS_ARGS): Likewise.
* config/h8300/h8300.h (RETURN_POPS_ARGS): Likewise.
* config/ia64/ia64.h (RETURN_POPS_ARGS): Likewise.
* config/iq2000/iq2000.h (RETURN_POPS_ARGS): Likewise.
* config/lm32/lm32.h (RETURN_POPS_ARGS): Likewise.
* config/m32c/m32c.h (RETURN_POPS_ARGS): Likewise.
* config/m32r/m32r.h (RETURN_POPS_ARGS): Likewise.
* config/m68hc11/m68hc11.h (RETURN_POPS_ARGS): Likewise.
* config/mcore/mcore.h (RETURN_POPS_ARGS): Likewise.
* config/mep/mep.h (RETURN_POPS_ARGS): Likewise.
* config/mips/mips.h (RETURN_POPS_ARGS): Likewise.
* config/mmix/mmix.h (RETURN_POPS_ARGS): Likewise.
* config/mn10300/mn10300.h (RETURN_POPS_ARGS): Likewise.
* config/moxie/moxie.h (RETURN_POPS_ARGS): Likewise.
* config/pa/pa.h (RETURN_POPS_ARGS): Likewise.
* config/pdp11/pdp11.h (RETURN_POPS_ARGS): Likewise.
* config/picochip/picochip.h (RETURN_POPS_ARGS): Likewise.
* config/rs6000/rs6000.h (RETURN_POPS_ARGS): Likewise.
* config/rx/rx.h (RETURN_POPS_ARGS): Likewise.
* config/s390/s390.h (RETURN_POPS_ARGS): Likewise.
* config/score/score.h (RETURN_POPS_ARGS): Likewise.
* config/sh/sh.h (RETURN_POPS_ARGS): Likewise.
* config/sparc/sparc.h (RETURN_POPS_ARGS): Likewise.
* config/spu/spu.h (RETURN_POPS_ARGS): Likewise.
* config/stormy16/stormy16.h (RETURN_POPS_ARGS): Likewise.
* config/v850/v850.h (RETURN_POPS_ARGS): Likewise.
* config/xtensa/xtensa.h (RETURN_POPS_ARGS): Likewise.
* config/i386/i386-protos.h (ix86_return_pops_args): Delete.
* config/i386/i386.h (RETURN_POPS_ARGS): Delete.
* config/i386/i386.c (ix86_return_pops_args): Make static.
Constify arguments.
(TARGET_RETURN_POPS_ARGS): Define.
* config/m68k/m68k.h (RETURN_POPS_ARGS): Move to...
* config/m68k/m68k.c (m68k_return_pops_args): ...here. New function.
(TARGET_RETURN_POPS_ARGS): Define.
* config/vax/vax.h (RETURN_POPS_ARGS): Move to...
* config/vax/vax.c (vax_return_pops_args): ...here. New function.
(TARGET_RETURN_POPS_ARGS): Define.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161528 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 9c51f1a5a74..c6d4706733a 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -208,13 +208,15 @@ prepare_call_address (tree fndecl, rtx funexp, rtx static_chain_value, The CALL_INSN is the first insn generated. FNDECL is the declaration node of the function. This is given to the - macro RETURN_POPS_ARGS to determine whether this function pops its own args. + hook TARGET_RETURN_POPS_ARGS to determine whether this function pops + its own args. - FUNTYPE is the data type of the function. This is given to the macro - RETURN_POPS_ARGS to determine whether this function pops its own args. - We used to allow an identifier for library functions, but that doesn't - work when the return type is an aggregate type and the calling convention - says that the pointer to this aggregate is to be popped by the callee. + FUNTYPE is the data type of the function. This is given to the hook + TARGET_RETURN_POPS_ARGS to determine whether this function pops its + own args. We used to allow an identifier for library functions, but + that doesn't work when the return type is an aggregate type and the + calling convention says that the pointer to this aggregate is to be + popped by the callee. STACK_SIZE is the number of bytes of arguments on the stack, ROUNDED_STACK_SIZE is that number rounded up to @@ -256,7 +258,8 @@ emit_call_1 (rtx funexp, tree fntree ATTRIBUTE_UNUSED, tree fndecl ATTRIBUTE_UNU rtx rounded_stack_size_rtx = GEN_INT (rounded_stack_size); rtx call_insn; int already_popped = 0; - HOST_WIDE_INT n_popped = RETURN_POPS_ARGS (fndecl, funtype, stack_size); + HOST_WIDE_INT n_popped + = targetm.calls.return_pops_args (fndecl, funtype, stack_size); #ifdef CALL_POPS_ARGS n_popped += CALL_POPS_ARGS (* args_so_far); @@ -2323,10 +2326,10 @@ expand_call (tree exp, rtx target, int ignore) - crtl->args.pretend_args_size) /* If the callee pops its own arguments, then it must pop exactly the same number of arguments as the current function. */ - || (RETURN_POPS_ARGS (fndecl, funtype, args_size.constant) - != RETURN_POPS_ARGS (current_function_decl, - TREE_TYPE (current_function_decl), - crtl->args.size)) + || (targetm.calls.return_pops_args (fndecl, funtype, args_size.constant) + != targetm.calls.return_pops_args (current_function_decl, + TREE_TYPE (current_function_decl), + crtl->args.size)) || !lang_hooks.decls.ok_for_sibcall (fndecl)) try_tail_call = 0; |