summaryrefslogtreecommitdiff
path: root/gcc/config/spu/spu.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/spu/spu.c')
-rw-r--r--gcc/config/spu/spu.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index 38db96934f3..0da736c8be1 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -187,11 +187,13 @@ static tree spu_handle_vector_attribute (tree * node, tree name, tree args,
int flags,
bool *no_add_attrs);
static int spu_naked_function_p (tree func);
-static bool spu_pass_by_reference (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+static bool spu_pass_by_reference (cumulative_args_t cum,
+ enum machine_mode mode,
const_tree type, bool named);
-static rtx spu_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+static rtx spu_function_arg (cumulative_args_t cum, enum machine_mode mode,
const_tree type, bool named);
-static void spu_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+static void spu_function_arg_advance (cumulative_args_t cum,
+ enum machine_mode mode,
const_tree type, bool named);
static tree spu_build_builtin_va_list (void);
static void spu_va_start (tree, rtx);
@@ -412,6 +414,10 @@ static const struct attribute_spec spu_attribute_table[] =
#undef TARGET_EXPAND_BUILTIN_VA_START
#define TARGET_EXPAND_BUILTIN_VA_START spu_va_start
+static void spu_setup_incoming_varargs (cumulative_args_t cum,
+ enum machine_mode mode,
+ tree type, int *pretend_size,
+ int no_rtl);
#undef TARGET_SETUP_INCOMING_VARARGS
#define TARGET_SETUP_INCOMING_VARARGS spu_setup_incoming_varargs
@@ -4039,10 +4045,11 @@ spu_function_value (const_tree type, const_tree func ATTRIBUTE_UNUSED)
}
static rtx
-spu_function_arg (CUMULATIVE_ARGS *cum,
+spu_function_arg (cumulative_args_t cum_v,
enum machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
+ CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
int byte_size;
if (*cum >= MAX_REGISTER_ARGS)
@@ -4075,9 +4082,11 @@ spu_function_arg (CUMULATIVE_ARGS *cum,
}
static void
-spu_function_arg_advance (CUMULATIVE_ARGS * cum, enum machine_mode mode,
+spu_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
+ CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
+
*cum += (type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST
? 1
: mode == BLKmode
@@ -4089,7 +4098,7 @@ spu_function_arg_advance (CUMULATIVE_ARGS * cum, enum machine_mode mode,
/* Variable sized types are passed by reference. */
static bool
-spu_pass_by_reference (CUMULATIVE_ARGS * cum ATTRIBUTE_UNUSED,
+spu_pass_by_reference (cumulative_args_t cum ATTRIBUTE_UNUSED,
enum machine_mode mode ATTRIBUTE_UNUSED,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
@@ -4282,8 +4291,8 @@ spu_gimplify_va_arg_expr (tree valist, tree type, gimple_seq * pre_p,
to the first unnamed parameters. If the first unnamed parameter is
in the stack then save no registers. Set pretend_args_size to the
amount of space needed to save the registers. */
-void
-spu_setup_incoming_varargs (CUMULATIVE_ARGS * cum, enum machine_mode mode,
+static void
+spu_setup_incoming_varargs (cumulative_args_t cum, enum machine_mode mode,
tree type, int *pretend_size, int no_rtl)
{
if (!no_rtl)
@@ -4291,11 +4300,11 @@ spu_setup_incoming_varargs (CUMULATIVE_ARGS * cum, enum machine_mode mode,
rtx tmp;
int regno;
int offset;
- int ncum = *cum;
+ int ncum = *get_cumulative_args (cum);
/* cum currently points to the last named argument, we want to
start at the next argument. */
- spu_function_arg_advance (&ncum, mode, type, true);
+ spu_function_arg_advance (pack_cumulative_args (&ncum), mode, type, true);
offset = -STACK_POINTER_OFFSET;
for (regno = ncum; regno < MAX_REGISTER_ARGS; regno++)