diff options
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; |