summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-08 13:16:43 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-08 13:16:43 +0000
commitee9034d42b22394b81ca54766c252c1efd72913d (patch)
tree50c078ae2972860c192f3a5a912f036cf988f3a5 /gcc
parentf8ce304c608f2294518ef35b7c9b498cc3726616 (diff)
downloadgcc-ee9034d42b22394b81ca54766c252c1efd72913d.tar.gz
* config/spu/spu-protos.h (spu_function_arg): Delete.
* config/spu/spu.h (FUNCTION_ARG): Delete. (FUNCTION_ARG_ADVANCE): Move code to ... * config/spu/spu.c (spu_function_arg_advance): New function. (spu_function_arg): Make static. Take a const_tree and a bool. (spu_setup_incoming_varargs): Call spu_function_arg_advance. (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165179 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/config/spu/spu-protos.h2
-rw-r--r--gcc/config/spu/spu.c31
-rw-r--r--gcc/config/spu/spu.h11
4 files changed, 41 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f75bbe4862b..7ff2a848faf 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,19 @@
2010-10-08 Nathan Froyd <froydnj@codesourcery.com>
+ * config/spu/spu-protos.h (spu_function_arg): Delete.
+ * config/spu/spu.h (FUNCTION_ARG): Delete.
+ (FUNCTION_ARG_ADVANCE): Move code to ...
+ * config/spu/spu.c (spu_function_arg_advance): New function.
+ (spu_function_arg): Make static. Take a const_tree and a bool.
+ (spu_setup_incoming_varargs): Call spu_function_arg_advance.
+ (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+
+2010-10-08 Nathan Froyd <froydnj@codesourcery.com>
+
+ * config/rx/rx.c (TARGET_EXCEPT_UNWIND_INFO): Define.
+
+2010-10-08 Nathan Froyd <froydnj@codesourcery.com>
+
* tree-ssa-sccvn.c (init_vn_nary_op_from_pieces): New function.
(init_vn_nary_op_from_op): New function.
(init_vn_nary_op_from_stmt): New function.
diff --git a/gcc/config/spu/spu-protos.h b/gcc/config/spu/spu-protos.h
index f0ecd93f3f9..d350c27ed8d 100644
--- a/gcc/config/spu/spu-protos.h
+++ b/gcc/config/spu/spu-protos.h
@@ -55,8 +55,6 @@ extern int spu_constant_address_p (rtx x);
extern int spu_legitimate_constant_p (rtx x);
extern int spu_initial_elimination_offset (int from, int to);
extern rtx spu_function_value (const_tree type, const_tree func);
-extern rtx spu_function_arg (int cum, enum machine_mode mode, tree type,
- int named);
extern void spu_setup_incoming_varargs (int *cum, enum machine_mode mode,
tree type, int *pretend_size,
int no_rtl);
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index d2f10ac18e2..36c48ee7f14 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -190,6 +190,10 @@ static tree spu_handle_vector_attribute (tree * node, tree name, tree args,
static int spu_naked_function_p (tree func);
static bool spu_pass_by_reference (CUMULATIVE_ARGS *cum, enum machine_mode mode,
const_tree type, bool named);
+static rtx spu_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool named);
+static void spu_function_arg_advance (CUMULATIVE_ARGS *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);
static tree spu_gimplify_va_arg_expr (tree valist, tree type,
@@ -391,6 +395,12 @@ static const struct attribute_spec spu_attribute_table[] =
#undef TARGET_PASS_BY_REFERENCE
#define TARGET_PASS_BY_REFERENCE spu_pass_by_reference
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG spu_function_arg
+
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE spu_function_arg_advance
+
#undef TARGET_MUST_PASS_IN_STACK
#define TARGET_MUST_PASS_IN_STACK must_pass_in_stack_var_size
@@ -3994,10 +4004,10 @@ spu_function_value (const_tree type, const_tree func ATTRIBUTE_UNUSED)
return gen_rtx_REG (mode, FIRST_RETURN_REGNUM);
}
-rtx
-spu_function_arg (CUMULATIVE_ARGS cum,
+static rtx
+spu_function_arg (CUMULATIVE_ARGS *cum,
enum machine_mode mode,
- tree type, int named ATTRIBUTE_UNUSED)
+ const_tree type, bool named ATTRIBUTE_UNUSED)
{
int byte_size;
@@ -4030,6 +4040,19 @@ spu_function_arg (CUMULATIVE_ARGS cum,
return gen_rtx_REG (mode, FIRST_ARG_REGNUM + cum);
}
+static void
+spu_function_arg_advance (CUMULATIVE_ARGS * cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
+{
+ *cum += (type && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST
+ ? 1
+ : mode == BLKmode
+ ? ((int_size_in_bytes (type) + 15) / 16)
+ : mode == VOIDmode
+ ? 1
+ : HARD_REGNO_NREGS (cum, mode));
+}
+
/* Variable sized types are passed by reference. */
static bool
spu_pass_by_reference (CUMULATIVE_ARGS * cum ATTRIBUTE_UNUSED,
@@ -4238,7 +4261,7 @@ spu_setup_incoming_varargs (CUMULATIVE_ARGS * cum, enum machine_mode mode,
/* cum currently points to the last named argument, we want to
start at the next argument. */
- FUNCTION_ARG_ADVANCE (ncum, mode, type, 1);
+ spu_function_arg_advance (&ncum, mode, type, true);
offset = -STACK_POINTER_OFFSET;
for (regno = ncum; regno < MAX_REGISTER_ARGS; regno++)
diff --git a/gcc/config/spu/spu.h b/gcc/config/spu/spu.h
index 9f72cb228f5..f1b8cabd0a1 100644
--- a/gcc/config/spu/spu.h
+++ b/gcc/config/spu/spu.h
@@ -330,22 +330,11 @@ targetm.resolve_overloaded_builtin = spu_resolve_overloaded_builtin; \
/* Register Arguments */
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
- (spu_function_arg((CUM),(MODE),(TYPE),(NAMED)))
-
#define CUMULATIVE_ARGS int
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS) \
((CUM) = 0)
-#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
- ((CUM) += \
- (TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST ? 1 \
- : (MODE) == BLKmode ? ((int_size_in_bytes(TYPE)+15) / 16) \
- : (MODE) == VOIDmode ? 1 \
- : HARD_REGNO_NREGS(CUM,MODE))
-
-
/* The SPU ABI wants 32/64-bit types at offset 0 in the quad-word on the
stack. 8/16-bit types should be at offsets 3/2 respectively. */
#define FUNCTION_ARG_OFFSET(MODE, TYPE) \