aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-10-28 19:59:07 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-10-28 19:59:07 +0000
commitbf425ddd466469e89f4d3d8ffdfb10f51fd6787a (patch)
tree45ea10855bdb7b469aa4ae01ba6659e6f23c17f8 /gcc
parent4c05cbb2a7e272fc046e62c19c5a1c1b17a9be05 (diff)
downloadgcc-bf425ddd466469e89f4d3d8ffdfb10f51fd6787a.zip
gcc-bf425ddd466469e89f4d3d8ffdfb10f51fd6787a.tar.gz
gcc-bf425ddd466469e89f4d3d8ffdfb10f51fd6787a.tar.bz2
stormy16-protos.h (xstormy16_function_arg): Delete.
* config/stormy16/stormy16-protos.h (xstormy16_function_arg): Delete. (xstormy16_function_arg_advance): Delete. * config/stormy16/stormy16.h (FUNCTION_ARG): Delete. (FUNCTION_ARG_ADVANCE): Delete. * config/stormy16/stormy16.c (xstormy16_function_arg): Make static. Take a const_tree and a bool. (xstormy16_function_arg_advance): Likewise. Return void, updating the CUM parameter instead. (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define. From-SVN: r166038
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/stormy16/stormy16-protos.h7
-rw-r--r--gcc/config/stormy16/stormy16.c36
-rw-r--r--gcc/config/stormy16/stormy16.h6
4 files changed, 31 insertions, 30 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 34d3e91..ae687f1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,17 @@
2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
+ * config/stormy16/stormy16-protos.h (xstormy16_function_arg): Delete.
+ (xstormy16_function_arg_advance): Delete.
+ * config/stormy16/stormy16.h (FUNCTION_ARG): Delete.
+ (FUNCTION_ARG_ADVANCE): Delete.
+ * config/stormy16/stormy16.c (xstormy16_function_arg): Make static.
+ Take a const_tree and a bool.
+ (xstormy16_function_arg_advance): Likewise. Return void, updating
+ the CUM parameter instead.
+ (TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
+
+2010-10-28 Nathan Froyd <froydnj@codesourcery.com>
+
* config/moxie/moxie-protos.h (moxie_function_arg): Delete.
* config/moxie/moxie.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
(MOXIE_FUNCTION_ARG_SIZE): Move to...
diff --git a/gcc/config/stormy16/stormy16-protos.h b/gcc/config/stormy16/stormy16-protos.h
index e6fe4c0..d41bb80 100644
--- a/gcc/config/stormy16/stormy16-protos.h
+++ b/gcc/config/stormy16/stormy16-protos.h
@@ -35,13 +35,6 @@ extern void xstormy16_asm_output_aligned_common (FILE *, tree, const char *,
int, int, int);
#endif
-#if defined (TREE_CODE) && defined (HAVE_MACHINE_MODES)
-extern CUMULATIVE_ARGS xstormy16_function_arg_advance
- (CUMULATIVE_ARGS, enum machine_mode, tree, int);
-extern rtx xstormy16_function_arg
- (CUMULATIVE_ARGS, enum machine_mode, tree, int);
-#endif
-
#if defined (TREE_CODE) && defined (RTX_CODE)
extern void xstormy16_initialize_trampoline (rtx, rtx, rtx);
extern rtx xstormy16_function_value (const_tree, const_tree);
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 7143c17..e5bf08b 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -1247,11 +1247,10 @@ xstormy16_function_profiler (void)
sorry ("function_profiler support");
}
-/* Return an updated summarizer variable CUM to advance past an
- argument in the argument list. The values MODE, TYPE and NAMED
- describe that argument. Once this is done, the variable CUM is
- suitable for analyzing the *following* argument with
- `FUNCTION_ARG', etc.
+/* Update CUM to advance past an argument in the argument list. The
+ values MODE, TYPE and NAMED describe that argument. Once this is
+ done, the variable CUM is suitable for analyzing the *following*
+ argument with `TARGET_FUNCTION_ARG', etc.
This function need not do anything if the argument in question was
passed on the stack. The compiler knows how to track the amount of
@@ -1259,25 +1258,23 @@ xstormy16_function_profiler (void)
it makes life easier for xstormy16_build_va_list if it does update
the word count. */
-CUMULATIVE_ARGS
-xstormy16_function_arg_advance (CUMULATIVE_ARGS cum, enum machine_mode mode,
- tree type, int named ATTRIBUTE_UNUSED)
+static void
+xstormy16_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
{
/* If an argument would otherwise be passed partially in registers,
and partially on the stack, the whole of it is passed on the
stack. */
- if (cum < NUM_ARGUMENT_REGISTERS
- && cum + XSTORMY16_WORD_SIZE (type, mode) > NUM_ARGUMENT_REGISTERS)
- cum = NUM_ARGUMENT_REGISTERS;
-
- cum += XSTORMY16_WORD_SIZE (type, mode);
+ if (*cum < NUM_ARGUMENT_REGISTERS
+ && *cum + XSTORMY16_WORD_SIZE (type, mode) > NUM_ARGUMENT_REGISTERS)
+ *cum = NUM_ARGUMENT_REGISTERS;
- return cum;
+ *cum += XSTORMY16_WORD_SIZE (type, mode);
}
-rtx
-xstormy16_function_arg (CUMULATIVE_ARGS cum, enum machine_mode mode,
- tree type, int named ATTRIBUTE_UNUSED)
+static rtx
+xstormy16_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode,
+ const_tree type, bool named ATTRIBUTE_UNUSED)
{
if (mode == VOIDmode)
return const0_rtx;
@@ -2663,6 +2660,11 @@ static const struct default_options xstorym16_option_optimization_table[] =
#undef TARGET_PROMOTE_PROTOTYPES
#define TARGET_PROMOTE_PROTOTYPES hook_bool_const_tree_true
+#undef TARGET_FUNCTION_ARG
+#define TARGET_FUNCTION_ARG xstormy16_function_arg
+#undef TARGET_FUNCTION_ARG_ADVANCE
+#define TARGET_FUNCTION_ARG_ADVANCE xstormy16_function_arg_advance
+
#undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY xstormy16_return_in_memory
diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h
index 2440213..1ac73c4 100644
--- a/gcc/config/stormy16/stormy16.h
+++ b/gcc/config/stormy16/stormy16.h
@@ -337,9 +337,6 @@ enum reg_class
+ 1) \
/ 2)
-#define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
- xstormy16_function_arg (CUM, MODE, TYPE, NAMED)
-
/* For this platform, the value of CUMULATIVE_ARGS is the number of words
of arguments that have been passed in registers so far. */
#define CUMULATIVE_ARGS int
@@ -347,9 +344,6 @@ enum reg_class
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
(CUM) = 0
-#define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
- ((CUM) = xstormy16_function_arg_advance (CUM, MODE, TYPE, NAMED))
-
#define FUNCTION_ARG_REGNO_P(REGNO) \
((REGNO) >= FIRST_ARGUMENT_REGISTER \
&& (REGNO) < FIRST_ARGUMENT_REGISTER + NUM_ARGUMENT_REGISTERS)