summaryrefslogtreecommitdiff
path: root/gcc/config/sh
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-08-20 08:53:23 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-08-20 08:53:23 +0000
commit7256c7194e186fce6ff866a124a77b08196c2a5f (patch)
tree24b47c0624b9395db68addd8cb07d4e5b581050b /gcc/config/sh
parent6930c98c69ad695469ee7daa74b3b6d578afdd0d (diff)
Use function_arg_info for TARGET_CALLEE_COPIES
The hook is passed the unpromoted type mode instead of the promoted mode. The aarch64 definition is redundant, but worth keeping for emphasis. 2019-08-20 Richard Sandiford <richard.sandiford@arm.com> gcc/ * target.def (callee_copies): Take a function_arg_info instead of a mode, type and named flag. * doc/tm.texi: Regenerate. * targhooks.h (hook_callee_copies_named): Take a function_arg_info instead of a mode, type and named flag. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Delete. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_bool_CUMULATIVE_ARGS_arg_info_true): New function. * targhooks.c (hook_callee_copies_named): Take a function_arg_info instead of a mode, type and named flag. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Delete. (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): Likewise. (hook_bool_CUMULATIVE_ARGS_arg_info_true): New function. * calls.h (reference_callee_copied): Take a function_arg_info instead of a mode, type and named flag. * calls.c (reference_callee_copied): Likewise. (initialize_argument_information): Update call accordingly. (emit_library_call_value_1): Likewise. * function.c (gimplify_parameters): Likewise. * config/aarch64/aarch64.c (TARGET_CALLEE_COPIES): Define to hook_bool_CUMULATIVE_ARGS_arg_info_false instead of hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false. * config/c6x/c6x.c (c6x_callee_copies): Delete. (TARGET_CALLEE_COPIES): Define to hook_bool_CUMULATIVE_ARGS_arg_info_true instead. * config/epiphany/epiphany.c (TARGET_CALLEE_COPIES): Define to hook_bool_CUMULATIVE_ARGS_arg_info_true instead of hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true. * config/mips/mips.c (mips_callee_copies): Take a function_arg_info instead of a mode, type and named flag. * config/mmix/mmix.c (TARGET_CALLEE_COPIES): Define to hook_bool_CUMULATIVE_ARGS_arg_info_true instead of hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true. * config/mn10300/mn10300.c (TARGET_CALLEE_COPIES): Likewise. * config/msp430/msp430.c (msp430_callee_copies): Delete. (TARGET_CALLEE_COPIES): Define to hook_bool_CUMULATIVE_ARGS_arg_info_true instead. * config/pa/pa.c (pa_callee_copies): Take a function_arg_info instead of a mode, type and named flag. * config/sh/sh.c (sh_callee_copies): Likewise. * config/v850/v850.c (TARGET_CALLEE_COPIES): Define to hook_bool_CUMULATIVE_ARGS_arg_info_true instead of hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true. From-SVN: r274702
Diffstat (limited to 'gcc/config/sh')
-rw-r--r--gcc/config/sh/sh.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index ac3c5a57f86..da912ca9abd 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -296,8 +296,7 @@ static machine_mode sh_promote_function_mode (const_tree type,
int for_return);
static bool sh_pass_by_reference (cumulative_args_t,
const function_arg_info &);
-static bool sh_callee_copies (cumulative_args_t, machine_mode,
- const_tree, bool);
+static bool sh_callee_copies (cumulative_args_t, const function_arg_info &);
static int sh_arg_partial_bytes (cumulative_args_t, const function_arg_info &);
static void sh_function_arg_advance (cumulative_args_t,
const function_arg_info &);
@@ -7915,14 +7914,15 @@ sh_pass_by_reference (cumulative_args_t cum_v, const function_arg_info &arg)
}
static bool
-sh_callee_copies (cumulative_args_t cum, machine_mode mode,
- const_tree type, bool named ATTRIBUTE_UNUSED)
+sh_callee_copies (cumulative_args_t cum, const function_arg_info &arg)
{
/* ??? How can it possibly be correct to return true only on the
caller side of the equation? Is there someplace else in the
sh backend that's magically producing the copies? */
return (get_cumulative_args (cum)->outgoing
- && ((mode == BLKmode ? TYPE_ALIGN (type) : GET_MODE_ALIGNMENT (mode))
+ && ((arg.mode == BLKmode
+ ? TYPE_ALIGN (arg.type)
+ : GET_MODE_ALIGNMENT (arg.mode))
% SH_MIN_ALIGN_FOR_CALLEE_COPY == 0));
}